@voicenter-team/events-sdk 0.0.52 → 0.0.53
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/dist/voicenter-events-sdk.cjs.js +29 -28
- package/dist/voicenter-events-sdk.cjs.js.map +1 -1
- package/dist/voicenter-events-sdk.d.ts +24 -10
- package/dist/voicenter-events-sdk.es.js +5895 -6020
- package/dist/voicenter-events-sdk.es.js.map +1 -1
- package/dist/voicenter-events-sdk.iife.js +29 -28
- package/dist/voicenter-events-sdk.iife.js.map +1 -1
- package/dist/voicenter-events-sdk.umd.js +29 -28
- package/dist/voicenter-events-sdk.umd.js.map +1 -1
- package/package.json +3 -3
|
@@ -1,45 +1,46 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var bv=Object.defineProperty;var Cv=(r,o,n)=>o in r?bv(r,o,{enumerable:!0,configurable:!0,writable:!0,value:n}):r[o]=n;var At=(r,o,n)=>(Cv(r,typeof o!="symbol"?o+"":o,n),n);Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});var fr=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Sv(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var su={exports:{}},au={exports:{}};(function(){var r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o={rotl:function(n,s){return n<<s|n>>>32-s},rotr:function(n,s){return n<<32-s|n>>>s},endian:function(n){if(n.constructor==Number)return o.rotl(n,8)&16711935|o.rotl(n,24)&4278255360;for(var s=0;s<n.length;s++)n[s]=o.endian(n[s]);return n},randomBytes:function(n){for(var s=[];n>0;n--)s.push(Math.floor(Math.random()*256));return s},bytesToWords:function(n){for(var s=[],c=0,f=0;c<n.length;c++,f+=8)s[f>>>5]|=n[c]<<24-f%32;return s},wordsToBytes:function(n){for(var s=[],c=0;c<n.length*32;c+=8)s.push(n[c>>>5]>>>24-c%32&255);return s},bytesToHex:function(n){for(var s=[],c=0;c<n.length;c++)s.push((n[c]>>>4).toString(16)),s.push((n[c]&15).toString(16));return s.join("")},hexToBytes:function(n){for(var s=[],c=0;c<n.length;c+=2)s.push(parseInt(n.substr(c,2),16));return s},bytesToBase64:function(n){for(var s=[],c=0;c<n.length;c+=3)for(var f=n[c]<<16|n[c+1]<<8|n[c+2],v=0;v<4;v++)c*8+v*6<=n.length*8?s.push(r.charAt(f>>>6*(3-v)&63)):s.push("=");return s.join("")},base64ToBytes:function(n){n=n.replace(/[^A-Z0-9+\/]/ig,"");for(var s=[],c=0,f=0;c<n.length;f=++c%4)f!=0&&s.push((r.indexOf(n.charAt(c-1))&Math.pow(2,-2*f+8)-1)<<f*2|r.indexOf(n.charAt(c))>>>6-f*2);return s}};au.exports=o})();var kv=au.exports,$o={utf8:{stringToBytes:function(r){return $o.bin.stringToBytes(unescape(encodeURIComponent(r)))},bytesToString:function(r){return decodeURIComponent(escape($o.bin.bytesToString(r)))}},bin:{stringToBytes:function(r){for(var o=[],n=0;n<r.length;n++)o.push(r.charCodeAt(n)&255);return o},bytesToString:function(r){for(var o=[],n=0;n<r.length;n++)o.push(String.fromCharCode(r[n]));return o.join("")}}},Gc=$o;/*!
|
|
2
2
|
* Determine if an object is a Buffer
|
|
3
3
|
*
|
|
4
4
|
* @author Feross Aboukhadijeh <https://feross.org>
|
|
5
5
|
* @license MIT
|
|
6
|
-
*/var Mv=function(s){return s!=null&&(Lu(s)||qv(s)||!!s._isBuffer)};function Lu(s){return!!s.constructor&&typeof s.constructor.isBuffer=="function"&&s.constructor.isBuffer(s)}function qv(s){return typeof s.readFloatLE=="function"&&typeof s.slice=="function"&&Lu(s.slice(0,0))}(function(){var s=Fv,r=vu.utf8,n=Mv,o=vu.bin,u=function(f,m){f.constructor==String?m&&m.encoding==="binary"?f=o.stringToBytes(f):f=r.stringToBytes(f):n(f)?f=Array.prototype.slice.call(f,0):!Array.isArray(f)&&f.constructor!==Uint8Array&&(f=f.toString());for(var g=s.bytesToWords(f),S=f.length*8,v=1732584193,_=-271733879,y=-1732584194,l=271733878,h=0;h<g.length;h++)g[h]=(g[h]<<8|g[h]>>>24)&16711935|(g[h]<<24|g[h]>>>8)&4278255360;g[S>>>5]|=128<<S%32,g[(S+64>>>9<<4)+14]=S;for(var b=u._ff,E=u._gg,x=u._hh,W=u._ii,h=0;h<g.length;h+=16){var st=v,V=_,ot=y,H=l;v=b(v,_,y,l,g[h+0],7,-680876936),l=b(l,v,_,y,g[h+1],12,-389564586),y=b(y,l,v,_,g[h+2],17,606105819),_=b(_,y,l,v,g[h+3],22,-1044525330),v=b(v,_,y,l,g[h+4],7,-176418897),l=b(l,v,_,y,g[h+5],12,1200080426),y=b(y,l,v,_,g[h+6],17,-1473231341),_=b(_,y,l,v,g[h+7],22,-45705983),v=b(v,_,y,l,g[h+8],7,1770035416),l=b(l,v,_,y,g[h+9],12,-1958414417),y=b(y,l,v,_,g[h+10],17,-42063),_=b(_,y,l,v,g[h+11],22,-1990404162),v=b(v,_,y,l,g[h+12],7,1804603682),l=b(l,v,_,y,g[h+13],12,-40341101),y=b(y,l,v,_,g[h+14],17,-1502002290),_=b(_,y,l,v,g[h+15],22,1236535329),v=E(v,_,y,l,g[h+1],5,-165796510),l=E(l,v,_,y,g[h+6],9,-1069501632),y=E(y,l,v,_,g[h+11],14,643717713),_=E(_,y,l,v,g[h+0],20,-373897302),v=E(v,_,y,l,g[h+5],5,-701558691),l=E(l,v,_,y,g[h+10],9,38016083),y=E(y,l,v,_,g[h+15],14,-660478335),_=E(_,y,l,v,g[h+4],20,-405537848),v=E(v,_,y,l,g[h+9],5,568446438),l=E(l,v,_,y,g[h+14],9,-1019803690),y=E(y,l,v,_,g[h+3],14,-187363961),_=E(_,y,l,v,g[h+8],20,1163531501),v=E(v,_,y,l,g[h+13],5,-1444681467),l=E(l,v,_,y,g[h+2],9,-51403784),y=E(y,l,v,_,g[h+7],14,1735328473),_=E(_,y,l,v,g[h+12],20,-1926607734),v=x(v,_,y,l,g[h+5],4,-378558),l=x(l,v,_,y,g[h+8],11,-2022574463),y=x(y,l,v,_,g[h+11],16,1839030562),_=x(_,y,l,v,g[h+14],23,-35309556),v=x(v,_,y,l,g[h+1],4,-1530992060),l=x(l,v,_,y,g[h+4],11,1272893353),y=x(y,l,v,_,g[h+7],16,-155497632),_=x(_,y,l,v,g[h+10],23,-1094730640),v=x(v,_,y,l,g[h+13],4,681279174),l=x(l,v,_,y,g[h+0],11,-358537222),y=x(y,l,v,_,g[h+3],16,-722521979),_=x(_,y,l,v,g[h+6],23,76029189),v=x(v,_,y,l,g[h+9],4,-640364487),l=x(l,v,_,y,g[h+12],11,-421815835),y=x(y,l,v,_,g[h+15],16,530742520),_=x(_,y,l,v,g[h+2],23,-995338651),v=W(v,_,y,l,g[h+0],6,-198630844),l=W(l,v,_,y,g[h+7],10,1126891415),y=W(y,l,v,_,g[h+14],15,-1416354905),_=W(_,y,l,v,g[h+5],21,-57434055),v=W(v,_,y,l,g[h+12],6,1700485571),l=W(l,v,_,y,g[h+3],10,-1894986606),y=W(y,l,v,_,g[h+10],15,-1051523),_=W(_,y,l,v,g[h+1],21,-2054922799),v=W(v,_,y,l,g[h+8],6,1873313359),l=W(l,v,_,y,g[h+15],10,-30611744),y=W(y,l,v,_,g[h+6],15,-1560198380),_=W(_,y,l,v,g[h+13],21,1309151649),v=W(v,_,y,l,g[h+4],6,-145523070),l=W(l,v,_,y,g[h+11],10,-1120210379),y=W(y,l,v,_,g[h+2],15,718787259),_=W(_,y,l,v,g[h+9],21,-343485551),v=v+st>>>0,_=_+V>>>0,y=y+ot>>>0,l=l+H>>>0}return s.endian([v,_,y,l])};u._ff=function(f,m,g,S,v,_,y){var l=f+(m&g|~m&S)+(v>>>0)+y;return(l<<_|l>>>32-_)+m},u._gg=function(f,m,g,S,v,_,y){var l=f+(m&S|g&~S)+(v>>>0)+y;return(l<<_|l>>>32-_)+m},u._hh=function(f,m,g,S,v,_,y){var l=f+(m^g^S)+(v>>>0)+y;return(l<<_|l>>>32-_)+m},u._ii=function(f,m,g,S,v,_,y){var l=f+(g^(m|~S))+(v>>>0)+y;return(l<<_|l>>>32-_)+m},u._blocksize=16,u._digestsize=16,Ou.exports=function(f,m){if(f==null)throw new Error("Illegal argument "+f);var g=s.wordsToBytes(u(f,m));return m&&m.asBytes?g:m&&m.asString?o.bytesToString(g):s.bytesToHex(g)}})();var Wv=Ou.exports;const Kv=Pv(Wv);var pn=(s=>(s.MAIN="main",s.NEXT="next",s))(pn||{}),ze=(s=>(s.USER="User",s.TOKEN="Token",s))(ze||{});class Qn{static async getSessionStorageDataByKey(r,n=!0){if(typeof chrome<"u"&&typeof chrome.storage<"u"){const o=await chrome.storage.session.get(r);if(o[r])return n?JSON.parse(o[r]):o[r]}if(typeof window<"u"){const o=window.sessionStorage.getItem(r);if(o)return n?JSON.parse(o):o}}static async updateSessionStorageKey(r,n){typeof chrome<"u"&&typeof chrome.storage<"u"&&await chrome.storage.session.set({[r]:JSON.stringify(n)}),typeof window<"u"&&window.sessionStorage.setItem(r,JSON.stringify(n))}static clearSessionStorage(){typeof chrome<"u"&&typeof chrome.storage<"u"&&chrome.storage.session.clear(),typeof window<"u"&&window.sessionStorage.clear()}}var Jt=(s=>(s.INFO="INFO",s.WARN="WARN",s.ERROR="ERROR",s))(Jt||{});class Gv{constructor(r){wt(this,"delay",1e3);wt(this,"lastLoginTimestamp");wt(this,"token");wt(this,"storageKey");this.eventsSdkClass=r,this.eventsSdkClass=r,this.storageKey=""}async login(r){const n={token:r.token,email:r.email,password:r.password};if(this.storageKey=Kv(JSON.stringify({...r,loggerSocketConnection:null})),this.lastLoginTimestamp&&this.lastLoginTimestamp+this.delay>new Date().getTime())return;this.updateLastLoginTimestamp(),await this.checkLoginStatus(this.storageKey)||(Qn.clearSessionStorage(),await this.userLoginFunction(n,this.storageKey,r.loginType))}updateLastLoginTimestamp(){this.lastLoginTimestamp=new Date().getTime()}async checkLoginStatus(r){const n=await Qn.getSessionStorageDataByKey(r);return n?(this.eventsSdkClass.loggerClass.log(Jt.INFO,"got data from session",n),this.onLoginResponse(n),!0):!1}async userLoginFunction(r,n,o){let u,f,m;this.eventsSdkClass.options.isNewStack?(u=await this.externalLogin(this.eventsSdkClass.options.loginUrl,r,o),f=await this.getSettings(u.Data.AccessToken),m={...u.Data,...f}):(u=await this.externalLogin(this.eventsSdkClass.options.loginUrl,r,o),m={...u.Data.Socket}),this.onLoginResponse(m),await Qn.updateSessionStorageKey(n,m)}onLoginResponse(r){if(!this.eventsSdkClass.options.isNewStack&&this.eventsSdkClass.options.servers&&(this.eventsSdkClass.servers=[...this.eventsSdkClass.options.servers],this.eventsSdkClass.server=this.eventsSdkClass.servers.reduce((n,o)=>n.Priority>o.Priority?n:o)),this.eventsSdkClass.options.isNewStack&&this.eventsSdkClass.options.servers&&(this.eventsSdkClass.servers=[...this.eventsSdkClass.options.servers],this.eventsSdkClass.server=this.eventsSdkClass.servers.reduce((n,o)=>n.Priority>o.Priority?n:o)),r.MonitorList&&r.MonitorList.length&&(this.eventsSdkClass.servers=[...r.MonitorList],this.eventsSdkClass.server=this.eventsSdkClass.servers.reduce((n,o)=>n.Priority>o.Priority?n:o)),!this.eventsSdkClass.options.isNewStack&&!this.eventsSdkClass.servers.length&&r.URLList&&(this.eventsSdkClass.URLList=r.URLList),!this.eventsSdkClass.options.isNewStack&&!this.eventsSdkClass.URLList.length&&!this.eventsSdkClass.servers.length)throw new Error("Socket servers not defined");if(this.eventsSdkClass.options.isNewStack&&!this.eventsSdkClass.servers.length)throw new Error("Socket servers not defined");this.eventsSdkClass.server&&this.eventsSdkClass.socketIoClass.getSocketIoFunction(`v=${this.eventsSdkClass.server.Version}`),!this.eventsSdkClass.server&&this.eventsSdkClass.URLList.length&&this.eventsSdkClass.socketIoClass.getSocketIoFunction(`v=${r.Client}`),r.IdentityCode&&(this.token=r.IdentityCode,this.eventsSdkClass.connect(pn.MAIN)),r.Token&&(this.token=r.Token,this.eventsSdkClass.connect(pn.MAIN)),r.RefreshToken&&r.IdentityCodeExpiry&&this.eventsSdkClass.options.loginType===ze.USER&&(this.eventsSdkClass.options.refreshToken=r.RefreshToken,this.eventsSdkClass.options.tokenExpiry=r.IdentityCodeExpiry,this.handleTokenExpiry()),r.RefreshToken&&r.TokenExpiry&&this.eventsSdkClass.options.loginType===ze.USER&&(this.eventsSdkClass.options.refreshToken=r.RefreshToken,this.eventsSdkClass.options.tokenExpiry=r.TokenExpiry,this.handleTokenExpiry())}handleTokenExpiry(){if(!this.eventsSdkClass.options.refreshTokenUrl)throw new Error("refreshTokenUrl not provided");let r;if(this.eventsSdkClass.options.tokenExpiry)r=new Date(this.eventsSdkClass.options.tokenExpiry);else return;const n=r.getTime()-new Date().getTime()-5e3,o=Math.min(n,2147483647);setTimeout(async()=>{if(this.eventsSdkClass.options.refreshToken){this.eventsSdkClass.socketIoClass.closeAllConnections();let u,f;if(this.eventsSdkClass.options.isNewStack){const m=await this.refreshToken(this.eventsSdkClass.options.refreshTokenUrl,this.eventsSdkClass.options.refreshToken);u=await this.getSettings(m.Data.AccessToken),f={...m.Data,...u}}else f={...(await this.refreshToken(this.eventsSdkClass.options.refreshTokenUrl,this.eventsSdkClass.options.refreshToken)).Data.Socket};this.onLoginResponse(f),await Qn.updateSessionStorageKey(this.storageKey,f)}},o)}async externalLogin(r,{password:n,token:o,email:u},f){if(!r)throw new Error("loginUrl not provided");let m;this.eventsSdkClass.options.isNewStack?f===ze.TOKEN?m=JSON.stringify({identityType:ze.TOKEN,token:o}):m=JSON.stringify({identityType:ze.USER,username:u,password:n}):this.eventsSdkClass.options.loginType===ze.TOKEN?(m=JSON.stringify({token:o}),r=`${r}/${ze.TOKEN}`):(m=JSON.stringify({email:u,pin:n}),r=`${r}/${ze.USER}`);try{const g=await fetch(r,{method:"POST",headers:{"Content-Type":"application/json"},body:m});if(!g.ok&&g.status===400)throw new Error("Bad body request. Login type or isNewStack values not correct or not provided");if(!g.ok&&g.status===401)throw new Error("Unauthorized. Invalid token provided");if(!g.ok&&g.status===403)throw new Error("Forbidden. Identity token not provided or not valid");const S=await g.json();if(S.error)throw new Error(S.error);return S}catch(g){throw this.eventsSdkClass.loggerClass.log(Jt.ERROR,`External login ${r}`,g),g}}async getSettings(r){try{if(!this.eventsSdkClass.options.getSettingsUrl)throw new Error("getSettingsUrl not provided");const n=await fetch(this.eventsSdkClass.options.getSettingsUrl,{headers:{Authorization:`Bearer ${r}`}});if(!n.ok&&n.status===401)throw new Error("Unauthorized. Access token not provided or not valid");return n.json()}catch(n){throw this.eventsSdkClass.loggerClass.log(Jt.ERROR,`Get settings ${this.eventsSdkClass.options.getSettingsUrl}`,n),n}}async refreshToken(r,n){try{return(await fetch(r,{method:"GET",headers:{"Content-Type":"application/json",Authorization:`Bearer ${n}`}})).json()}catch(o){throw this.eventsSdkClass.loggerClass.log(Jt.ERROR,`Refresh token ${r}`,o),o}}}var Zr={exports:{}};/**
|
|
6
|
+
*/var Av=function(r){return r!=null&&(cu(r)||xv(r)||!!r._isBuffer)};function cu(r){return!!r.constructor&&typeof r.constructor.isBuffer=="function"&&r.constructor.isBuffer(r)}function xv(r){return typeof r.readFloatLE=="function"&&typeof r.slice=="function"&&cu(r.slice(0,0))}(function(){var r=kv,o=Gc.utf8,n=Av,s=Gc.bin,c=function(f,v){f.constructor==String?v&&v.encoding==="binary"?f=s.stringToBytes(f):f=o.stringToBytes(f):n(f)?f=Array.prototype.slice.call(f,0):!Array.isArray(f)&&f.constructor!==Uint8Array&&(f=f.toString());for(var d=r.bytesToWords(f),b=f.length*8,p=1732584193,w=-271733879,g=-1732584194,l=271733878,u=0;u<d.length;u++)d[u]=(d[u]<<8|d[u]>>>24)&16711935|(d[u]<<24|d[u]>>>8)&4278255360;d[b>>>5]|=128<<b%32,d[(b+64>>>9<<4)+14]=b;for(var _=c._ff,A=c._gg,k=c._hh,B=c._ii,u=0;u<d.length;u+=16){var Y=p,j=w,N=g,U=l;p=_(p,w,g,l,d[u+0],7,-680876936),l=_(l,p,w,g,d[u+1],12,-389564586),g=_(g,l,p,w,d[u+2],17,606105819),w=_(w,g,l,p,d[u+3],22,-1044525330),p=_(p,w,g,l,d[u+4],7,-176418897),l=_(l,p,w,g,d[u+5],12,1200080426),g=_(g,l,p,w,d[u+6],17,-1473231341),w=_(w,g,l,p,d[u+7],22,-45705983),p=_(p,w,g,l,d[u+8],7,1770035416),l=_(l,p,w,g,d[u+9],12,-1958414417),g=_(g,l,p,w,d[u+10],17,-42063),w=_(w,g,l,p,d[u+11],22,-1990404162),p=_(p,w,g,l,d[u+12],7,1804603682),l=_(l,p,w,g,d[u+13],12,-40341101),g=_(g,l,p,w,d[u+14],17,-1502002290),w=_(w,g,l,p,d[u+15],22,1236535329),p=A(p,w,g,l,d[u+1],5,-165796510),l=A(l,p,w,g,d[u+6],9,-1069501632),g=A(g,l,p,w,d[u+11],14,643717713),w=A(w,g,l,p,d[u+0],20,-373897302),p=A(p,w,g,l,d[u+5],5,-701558691),l=A(l,p,w,g,d[u+10],9,38016083),g=A(g,l,p,w,d[u+15],14,-660478335),w=A(w,g,l,p,d[u+4],20,-405537848),p=A(p,w,g,l,d[u+9],5,568446438),l=A(l,p,w,g,d[u+14],9,-1019803690),g=A(g,l,p,w,d[u+3],14,-187363961),w=A(w,g,l,p,d[u+8],20,1163531501),p=A(p,w,g,l,d[u+13],5,-1444681467),l=A(l,p,w,g,d[u+2],9,-51403784),g=A(g,l,p,w,d[u+7],14,1735328473),w=A(w,g,l,p,d[u+12],20,-1926607734),p=k(p,w,g,l,d[u+5],4,-378558),l=k(l,p,w,g,d[u+8],11,-2022574463),g=k(g,l,p,w,d[u+11],16,1839030562),w=k(w,g,l,p,d[u+14],23,-35309556),p=k(p,w,g,l,d[u+1],4,-1530992060),l=k(l,p,w,g,d[u+4],11,1272893353),g=k(g,l,p,w,d[u+7],16,-155497632),w=k(w,g,l,p,d[u+10],23,-1094730640),p=k(p,w,g,l,d[u+13],4,681279174),l=k(l,p,w,g,d[u+0],11,-358537222),g=k(g,l,p,w,d[u+3],16,-722521979),w=k(w,g,l,p,d[u+6],23,76029189),p=k(p,w,g,l,d[u+9],4,-640364487),l=k(l,p,w,g,d[u+12],11,-421815835),g=k(g,l,p,w,d[u+15],16,530742520),w=k(w,g,l,p,d[u+2],23,-995338651),p=B(p,w,g,l,d[u+0],6,-198630844),l=B(l,p,w,g,d[u+7],10,1126891415),g=B(g,l,p,w,d[u+14],15,-1416354905),w=B(w,g,l,p,d[u+5],21,-57434055),p=B(p,w,g,l,d[u+12],6,1700485571),l=B(l,p,w,g,d[u+3],10,-1894986606),g=B(g,l,p,w,d[u+10],15,-1051523),w=B(w,g,l,p,d[u+1],21,-2054922799),p=B(p,w,g,l,d[u+8],6,1873313359),l=B(l,p,w,g,d[u+15],10,-30611744),g=B(g,l,p,w,d[u+6],15,-1560198380),w=B(w,g,l,p,d[u+13],21,1309151649),p=B(p,w,g,l,d[u+4],6,-145523070),l=B(l,p,w,g,d[u+11],10,-1120210379),g=B(g,l,p,w,d[u+2],15,718787259),w=B(w,g,l,p,d[u+9],21,-343485551),p=p+Y>>>0,w=w+j>>>0,g=g+N>>>0,l=l+U>>>0}return r.endian([p,w,g,l])};c._ff=function(f,v,d,b,p,w,g){var l=f+(v&d|~v&b)+(p>>>0)+g;return(l<<w|l>>>32-w)+v},c._gg=function(f,v,d,b,p,w,g){var l=f+(v&b|d&~b)+(p>>>0)+g;return(l<<w|l>>>32-w)+v},c._hh=function(f,v,d,b,p,w,g){var l=f+(v^d^b)+(p>>>0)+g;return(l<<w|l>>>32-w)+v},c._ii=function(f,v,d,b,p,w,g){var l=f+(d^(v|~b))+(p>>>0)+g;return(l<<w|l>>>32-w)+v},c._blocksize=16,c._digestsize=16,su.exports=function(f,v){if(f==null)throw new Error("Illegal argument "+f);var d=r.wordsToBytes(c(f,v));return v&&v.asBytes?d:v&&v.asString?s.bytesToString(d):r.bytesToHex(d)}})();var Ev=su.exports;const Tv=Sv(Ev);var wn=(r=>(r.MAIN="main",r.NEXT="next",r))(wn||{}),$e=(r=>(r.USER="User",r.TOKEN="Token",r))($e||{});class hr{static async getSessionStorageDataByKey(o,n=!0){if(typeof chrome<"u"&&typeof chrome.storage<"u"){const s=await chrome.storage.session.get(o);if(s[o])return n?JSON.parse(s[o]):s[o]}if(typeof window<"u"){const s=window.sessionStorage.getItem(o);if(s)return n?JSON.parse(s):s}}static async updateSessionStorageKey(o,n){typeof chrome<"u"&&typeof chrome.storage<"u"&&await chrome.storage.session.set({[o]:JSON.stringify(n)}),typeof window<"u"&&window.sessionStorage.setItem(o,JSON.stringify(n))}static clearSessionStorage(){typeof chrome<"u"&&typeof chrome.storage<"u"&&chrome.storage.session.clear(),typeof window<"u"&&window.sessionStorage.clear()}}class Rv{constructor(o){At(this,"delay",1e3);At(this,"lastLoginTimestamp");At(this,"token");At(this,"storageKey");this.eventsSdkClass=o,this.eventsSdkClass=o,this.storageKey=""}async login(o){const n={token:o.token,email:o.email,password:o.password};if(this.storageKey=Tv(JSON.stringify({...o,loggerSocketConnection:null})),this.lastLoginTimestamp&&this.lastLoginTimestamp+this.delay>new Date().getTime())return;this.updateLastLoginTimestamp(),await this.checkLoginStatus(this.storageKey)||(hr.clearSessionStorage(),await this.userLoginFunction(n,this.storageKey,o.loginType))}updateLastLoginTimestamp(){this.lastLoginTimestamp=new Date().getTime()}async checkLoginStatus(o){const n=await hr.getSessionStorageDataByKey(o);return n?(this.onLoginResponse(n),!0):!1}async userLoginFunction(o,n,s){let c,f,v;this.eventsSdkClass.options.isNewStack?(c=await this.externalLogin(this.eventsSdkClass.options.loginUrl,o,s),f=await this.getSettings(c.Data.AccessToken),v={...c.Data,...f}):(c=await this.externalLogin(this.eventsSdkClass.options.loginUrl,o,s),v={...c.Data.Socket}),this.onLoginResponse(v),await hr.updateSessionStorageKey(n,v)}onLoginResponse(o){if(!this.eventsSdkClass.options.isNewStack&&this.eventsSdkClass.options.servers&&(this.eventsSdkClass.servers=[...this.eventsSdkClass.options.servers],this.eventsSdkClass.server=this.eventsSdkClass.servers.reduce((n,s)=>n.Priority>s.Priority?n:s)),this.eventsSdkClass.options.isNewStack&&this.eventsSdkClass.options.servers&&(this.eventsSdkClass.servers=[...this.eventsSdkClass.options.servers],this.eventsSdkClass.server=this.eventsSdkClass.servers.reduce((n,s)=>n.Priority>s.Priority?n:s)),o.MonitorList&&o.MonitorList.length&&(this.eventsSdkClass.servers=[...o.MonitorList],this.eventsSdkClass.server=this.eventsSdkClass.servers.reduce((n,s)=>n.Priority>s.Priority?n:s)),!this.eventsSdkClass.options.isNewStack&&!this.eventsSdkClass.servers.length&&o.URLList&&(this.eventsSdkClass.URLList=o.URLList),!this.eventsSdkClass.options.isNewStack&&!this.eventsSdkClass.URLList.length&&!this.eventsSdkClass.servers.length)throw new Error("Socket servers not defined");if(this.eventsSdkClass.options.isNewStack&&!this.eventsSdkClass.servers.length)throw new Error("Socket servers not defined");this.eventsSdkClass.server&&this.eventsSdkClass.socketIoClass.getSocketIoFunction(`v=${this.eventsSdkClass.server.Version}`),!this.eventsSdkClass.server&&this.eventsSdkClass.URLList.length&&this.eventsSdkClass.socketIoClass.getSocketIoFunction(`v=${o.Client}`),o.IdentityCode&&(this.token=o.IdentityCode,this.eventsSdkClass.connect(wn.MAIN)),o.Token&&(this.token=o.Token,this.eventsSdkClass.connect(wn.MAIN)),o.RefreshToken&&o.IdentityCodeExpiry&&this.eventsSdkClass.options.loginType===$e.USER&&(this.eventsSdkClass.options.refreshToken=o.RefreshToken,this.eventsSdkClass.options.tokenExpiry=o.IdentityCodeExpiry,this.handleTokenExpiry()),o.RefreshToken&&o.TokenExpiry&&this.eventsSdkClass.options.loginType===$e.USER&&(this.eventsSdkClass.options.refreshToken=o.RefreshToken,this.eventsSdkClass.options.tokenExpiry=o.TokenExpiry,this.handleTokenExpiry())}handleTokenExpiry(){if(!this.eventsSdkClass.options.refreshTokenUrl)throw new Error("refreshTokenUrl not provided");let o;if(this.eventsSdkClass.options.tokenExpiry)o=new Date(this.eventsSdkClass.options.tokenExpiry);else return;const n=o.getTime()-new Date().getTime()-5e3,s=Math.min(n,2147483647);setTimeout(async()=>{if(this.eventsSdkClass.options.refreshToken){this.eventsSdkClass.socketIoClass.closeAllConnections();let c,f;if(this.eventsSdkClass.options.isNewStack){const v=await this.refreshToken(this.eventsSdkClass.options.refreshTokenUrl,this.eventsSdkClass.options.refreshToken);c=await this.getSettings(v.Data.AccessToken),f={...v.Data,...c}}else f={...(await this.refreshToken(this.eventsSdkClass.options.refreshTokenUrl,this.eventsSdkClass.options.refreshToken)).Data.Socket};this.onLoginResponse(f),await hr.updateSessionStorageKey(this.storageKey,f)}},s)}async externalLogin(o,{password:n,token:s,email:c},f){if(!o)throw new Error("loginUrl not provided");let v;this.eventsSdkClass.options.isNewStack?f===$e.TOKEN?v=JSON.stringify({identityType:$e.TOKEN,token:s}):v=JSON.stringify({identityType:$e.USER,username:c,password:n}):this.eventsSdkClass.options.loginType===$e.TOKEN?(v=JSON.stringify({token:s}),o=`${o}/${$e.TOKEN}`):(v=JSON.stringify({email:c,pin:n}),o=`${o}/${$e.USER}`);try{const d=await fetch(o,{method:"POST",headers:{"Content-Type":"application/json"},body:v});if(!d.ok&&d.status===400)throw new Error("Bad body request. Login type or isNewStack values not correct or not provided");if(!d.ok&&d.status===401)throw new Error("Unauthorized. Invalid token provided");if(!d.ok&&d.status===403)throw new Error("Forbidden. Identity token not provided or not valid");const b=await d.json();if(b.error)throw new Error(b.error);return b}catch(d){throw d}}async getSettings(o){try{if(!this.eventsSdkClass.options.getSettingsUrl)throw new Error("getSettingsUrl not provided");const n=await fetch(this.eventsSdkClass.options.getSettingsUrl,{headers:{Authorization:`Bearer ${o}`}});if(!n.ok&&n.status===401)throw new Error("Unauthorized. Access token not provided or not valid");return n.json()}catch(n){throw n}}async refreshToken(o,n){try{return(await fetch(o,{method:"GET",headers:{"Content-Type":"application/json",Authorization:`Bearer ${n}`}})).json()}catch(s){throw s}}}var fi={exports:{}};/**
|
|
7
7
|
* @license
|
|
8
8
|
* Lodash <https://lodash.com/>
|
|
9
9
|
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
|
|
10
10
|
* Released under MIT license <https://lodash.com/license>
|
|
11
11
|
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
|
12
12
|
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
|
13
|
-
*/Zr.exports;(function(s,r){(function(){var n,o="4.17.21",u=200,f="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",m="Expected a function",g="Invalid `variable` option passed into `_.template`",S="__lodash_hash_undefined__",v=500,_="__lodash_placeholder__",y=1,l=2,h=4,b=1,E=2,x=1,W=2,st=4,V=8,ot=16,H=32,D=64,M=128,G=256,L=512,U=30,X="...",Q=800,j=16,B=1,kt=2,At=3,Rt=1/0,ut=9007199254740991,Ht=17976931348623157e292,xe=NaN,se=4294967295,er=se-1,q=se>>>1,J=[["ary",M],["bind",x],["bindKey",W],["curry",V],["curryRight",ot],["flip",L],["partial",H],["partialRight",D],["rearg",G]],F="[object Arguments]",et="[object Array]",P="[object AsyncFunction]",Z="[object Boolean]",tt="[object Date]",z="[object DOMException]",at="[object Error]",bt="[object Function]",$t="[object GeneratorFunction]",Ot="[object Map]",Se="[object Number]",Ln="[object Null]",oe="[object Object]",dn="[object Promise]",Nn="[object Proxy]",Vt="[object RegExp]",Yt="[object Set]",Re="[object String]",Oe="[object Symbol]",Bn="[object Undefined]",De="[object WeakMap]",Un="[object WeakSet]",Xe="[object ArrayBuffer]",gn="[object DataView]",ti="[object Float32Array]",ei="[object Float64Array]",ni="[object Int8Array]",ri="[object Int16Array]",ii="[object Int32Array]",si="[object Uint8Array]",oi="[object Uint8ClampedArray]",ai="[object Uint16Array]",ui="[object Uint32Array]",ec=/\b__p \+= '';/g,nc=/\b(__p \+=) '' \+/g,rc=/(__e\(.*?\)|\b__t\)) \+\n'';/g,qs=/&(?:amp|lt|gt|quot|#39);/g,Ws=/[&<>"']/g,ic=RegExp(qs.source),sc=RegExp(Ws.source),oc=/<%-([\s\S]+?)%>/g,ac=/<%([\s\S]+?)%>/g,Ks=/<%=([\s\S]+?)%>/g,uc=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,cc=/^\w*$/,fc=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ci=/[\\^$.*+?()[\]{}|]/g,hc=RegExp(ci.source),fi=/^\s+/,lc=/\s/,pc=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,dc=/\{\n\/\* \[wrapped with (.+)\] \*/,gc=/,? & /,vc=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,yc=/[()=,{}\[\]\/\s]/,mc=/\\(\\)?/g,_c=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Gs=/\w*$/,wc=/^[-+]0x[0-9a-f]+$/i,bc=/^0b[01]+$/i,Sc=/^\[object .+?Constructor\]$/,Cc=/^0o[0-7]+$/i,kc=/^(?:0|[1-9]\d*)$/,Ac=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,nr=/($^)/,Ec=/['\n\r\u2028\u2029\\]/g,rr="\\ud800-\\udfff",Tc="\\u0300-\\u036f",xc="\\ufe20-\\ufe2f",Rc="\\u20d0-\\u20ff",Hs=Tc+xc+Rc,$s="\\u2700-\\u27bf",zs="a-z\\xdf-\\xf6\\xf8-\\xff",Oc="\\xac\\xb1\\xd7\\xf7",Ic="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Lc="\\u2000-\\u206f",Nc=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Xs="A-Z\\xc0-\\xd6\\xd8-\\xde",Js="\\ufe0e\\ufe0f",Vs=Oc+Ic+Lc+Nc,hi="['’]",Bc="["+rr+"]",Ys="["+Vs+"]",ir="["+Hs+"]",js="\\d+",Uc="["+$s+"]",Zs="["+zs+"]",Qs="[^"+rr+Vs+js+$s+zs+Xs+"]",li="\\ud83c[\\udffb-\\udfff]",Dc="(?:"+ir+"|"+li+")",to="[^"+rr+"]",pi="(?:\\ud83c[\\udde6-\\uddff]){2}",di="[\\ud800-\\udbff][\\udc00-\\udfff]",vn="["+Xs+"]",eo="\\u200d",no="(?:"+Zs+"|"+Qs+")",Pc="(?:"+vn+"|"+Qs+")",ro="(?:"+hi+"(?:d|ll|m|re|s|t|ve))?",io="(?:"+hi+"(?:D|LL|M|RE|S|T|VE))?",so=Dc+"?",oo="["+Js+"]?",Fc="(?:"+eo+"(?:"+[to,pi,di].join("|")+")"+oo+so+")*",Mc="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",qc="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",ao=oo+so+Fc,Wc="(?:"+[Uc,pi,di].join("|")+")"+ao,Kc="(?:"+[to+ir+"?",ir,pi,di,Bc].join("|")+")",Gc=RegExp(hi,"g"),Hc=RegExp(ir,"g"),gi=RegExp(li+"(?="+li+")|"+Kc+ao,"g"),$c=RegExp([vn+"?"+Zs+"+"+ro+"(?="+[Ys,vn,"$"].join("|")+")",Pc+"+"+io+"(?="+[Ys,vn+no,"$"].join("|")+")",vn+"?"+no+"+"+ro,vn+"+"+io,qc,Mc,js,Wc].join("|"),"g"),zc=RegExp("["+eo+rr+Hs+Js+"]"),Xc=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Jc=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Vc=-1,xt={};xt[ti]=xt[ei]=xt[ni]=xt[ri]=xt[ii]=xt[si]=xt[oi]=xt[ai]=xt[ui]=!0,xt[F]=xt[et]=xt[Xe]=xt[Z]=xt[gn]=xt[tt]=xt[at]=xt[bt]=xt[Ot]=xt[Se]=xt[oe]=xt[Vt]=xt[Yt]=xt[Re]=xt[De]=!1;var Tt={};Tt[F]=Tt[et]=Tt[Xe]=Tt[gn]=Tt[Z]=Tt[tt]=Tt[ti]=Tt[ei]=Tt[ni]=Tt[ri]=Tt[ii]=Tt[Ot]=Tt[Se]=Tt[oe]=Tt[Vt]=Tt[Yt]=Tt[Re]=Tt[Oe]=Tt[si]=Tt[oi]=Tt[ai]=Tt[ui]=!0,Tt[at]=Tt[bt]=Tt[De]=!1;var Yc={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},jc={"&":"&","<":"<",">":">",'"':""","'":"'"},Zc={"&":"&","<":"<",">":">",""":'"',"'":"'"},Qc={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},tf=parseFloat,ef=parseInt,uo=typeof jn=="object"&&jn&&jn.Object===Object&&jn,nf=typeof self=="object"&&self&&self.Object===Object&&self,Wt=uo||nf||Function("return this")(),vi=r&&!r.nodeType&&r,rn=vi&&!0&&s&&!s.nodeType&&s,co=rn&&rn.exports===vi,yi=co&&uo.process,pe=function(){try{var k=rn&&rn.require&&rn.require("util").types;return k||yi&&yi.binding&&yi.binding("util")}catch{}}(),fo=pe&&pe.isArrayBuffer,ho=pe&&pe.isDate,lo=pe&&pe.isMap,po=pe&&pe.isRegExp,go=pe&&pe.isSet,vo=pe&&pe.isTypedArray;function ae(k,R,T){switch(T.length){case 0:return k.call(R);case 1:return k.call(R,T[0]);case 2:return k.call(R,T[0],T[1]);case 3:return k.call(R,T[0],T[1],T[2])}return k.apply(R,T)}function rf(k,R,T,$){for(var ct=-1,_t=k==null?0:k.length;++ct<_t;){var Pt=k[ct];R($,Pt,T(Pt),k)}return $}function de(k,R){for(var T=-1,$=k==null?0:k.length;++T<$&&R(k[T],T,k)!==!1;);return k}function sf(k,R){for(var T=k==null?0:k.length;T--&&R(k[T],T,k)!==!1;);return k}function yo(k,R){for(var T=-1,$=k==null?0:k.length;++T<$;)if(!R(k[T],T,k))return!1;return!0}function Je(k,R){for(var T=-1,$=k==null?0:k.length,ct=0,_t=[];++T<$;){var Pt=k[T];R(Pt,T,k)&&(_t[ct++]=Pt)}return _t}function sr(k,R){var T=k==null?0:k.length;return!!T&&yn(k,R,0)>-1}function mi(k,R,T){for(var $=-1,ct=k==null?0:k.length;++$<ct;)if(T(R,k[$]))return!0;return!1}function It(k,R){for(var T=-1,$=k==null?0:k.length,ct=Array($);++T<$;)ct[T]=R(k[T],T,k);return ct}function Ve(k,R){for(var T=-1,$=R.length,ct=k.length;++T<$;)k[ct+T]=R[T];return k}function _i(k,R,T,$){var ct=-1,_t=k==null?0:k.length;for($&&_t&&(T=k[++ct]);++ct<_t;)T=R(T,k[ct],ct,k);return T}function of(k,R,T,$){var ct=k==null?0:k.length;for($&&ct&&(T=k[--ct]);ct--;)T=R(T,k[ct],ct,k);return T}function wi(k,R){for(var T=-1,$=k==null?0:k.length;++T<$;)if(R(k[T],T,k))return!0;return!1}var af=bi("length");function uf(k){return k.split("")}function cf(k){return k.match(vc)||[]}function mo(k,R,T){var $;return T(k,function(ct,_t,Pt){if(R(ct,_t,Pt))return $=_t,!1}),$}function or(k,R,T,$){for(var ct=k.length,_t=T+($?1:-1);$?_t--:++_t<ct;)if(R(k[_t],_t,k))return _t;return-1}function yn(k,R,T){return R===R?bf(k,R,T):or(k,_o,T)}function ff(k,R,T,$){for(var ct=T-1,_t=k.length;++ct<_t;)if($(k[ct],R))return ct;return-1}function _o(k){return k!==k}function wo(k,R){var T=k==null?0:k.length;return T?Ci(k,R)/T:xe}function bi(k){return function(R){return R==null?n:R[k]}}function Si(k){return function(R){return k==null?n:k[R]}}function bo(k,R,T,$,ct){return ct(k,function(_t,Pt,Et){T=$?($=!1,_t):R(T,_t,Pt,Et)}),T}function hf(k,R){var T=k.length;for(k.sort(R);T--;)k[T]=k[T].value;return k}function Ci(k,R){for(var T,$=-1,ct=k.length;++$<ct;){var _t=R(k[$]);_t!==n&&(T=T===n?_t:T+_t)}return T}function ki(k,R){for(var T=-1,$=Array(k);++T<k;)$[T]=R(T);return $}function lf(k,R){return It(R,function(T){return[T,k[T]]})}function So(k){return k&&k.slice(0,Eo(k)+1).replace(fi,"")}function ue(k){return function(R){return k(R)}}function Ai(k,R){return It(R,function(T){return k[T]})}function Dn(k,R){return k.has(R)}function Co(k,R){for(var T=-1,$=k.length;++T<$&&yn(R,k[T],0)>-1;);return T}function ko(k,R){for(var T=k.length;T--&&yn(R,k[T],0)>-1;);return T}function pf(k,R){for(var T=k.length,$=0;T--;)k[T]===R&&++$;return $}var df=Si(Yc),gf=Si(jc);function vf(k){return"\\"+Qc[k]}function yf(k,R){return k==null?n:k[R]}function mn(k){return zc.test(k)}function mf(k){return Xc.test(k)}function _f(k){for(var R,T=[];!(R=k.next()).done;)T.push(R.value);return T}function Ei(k){var R=-1,T=Array(k.size);return k.forEach(function($,ct){T[++R]=[ct,$]}),T}function Ao(k,R){return function(T){return k(R(T))}}function Ye(k,R){for(var T=-1,$=k.length,ct=0,_t=[];++T<$;){var Pt=k[T];(Pt===R||Pt===_)&&(k[T]=_,_t[ct++]=T)}return _t}function ar(k){var R=-1,T=Array(k.size);return k.forEach(function($){T[++R]=$}),T}function wf(k){var R=-1,T=Array(k.size);return k.forEach(function($){T[++R]=[$,$]}),T}function bf(k,R,T){for(var $=T-1,ct=k.length;++$<ct;)if(k[$]===R)return $;return-1}function Sf(k,R,T){for(var $=T+1;$--;)if(k[$]===R)return $;return $}function _n(k){return mn(k)?kf(k):af(k)}function Ce(k){return mn(k)?Af(k):uf(k)}function Eo(k){for(var R=k.length;R--&&lc.test(k.charAt(R)););return R}var Cf=Si(Zc);function kf(k){for(var R=gi.lastIndex=0;gi.test(k);)++R;return R}function Af(k){return k.match(gi)||[]}function Ef(k){return k.match($c)||[]}var Tf=function k(R){R=R==null?Wt:wn.defaults(Wt.Object(),R,wn.pick(Wt,Jc));var T=R.Array,$=R.Date,ct=R.Error,_t=R.Function,Pt=R.Math,Et=R.Object,Ti=R.RegExp,xf=R.String,ge=R.TypeError,ur=T.prototype,Rf=_t.prototype,bn=Et.prototype,cr=R["__core-js_shared__"],fr=Rf.toString,Ct=bn.hasOwnProperty,Of=0,To=function(){var t=/[^.]+$/.exec(cr&&cr.keys&&cr.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}(),hr=bn.toString,If=fr.call(Et),Lf=Wt._,Nf=Ti("^"+fr.call(Ct).replace(ci,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),lr=co?R.Buffer:n,je=R.Symbol,pr=R.Uint8Array,xo=lr?lr.allocUnsafe:n,dr=Ao(Et.getPrototypeOf,Et),Ro=Et.create,Oo=bn.propertyIsEnumerable,gr=ur.splice,Io=je?je.isConcatSpreadable:n,Pn=je?je.iterator:n,sn=je?je.toStringTag:n,vr=function(){try{var t=fn(Et,"defineProperty");return t({},"",{}),t}catch{}}(),Bf=R.clearTimeout!==Wt.clearTimeout&&R.clearTimeout,Uf=$&&$.now!==Wt.Date.now&&$.now,Df=R.setTimeout!==Wt.setTimeout&&R.setTimeout,yr=Pt.ceil,mr=Pt.floor,xi=Et.getOwnPropertySymbols,Pf=lr?lr.isBuffer:n,Lo=R.isFinite,Ff=ur.join,Mf=Ao(Et.keys,Et),Ft=Pt.max,zt=Pt.min,qf=$.now,Wf=R.parseInt,No=Pt.random,Kf=ur.reverse,Ri=fn(R,"DataView"),Fn=fn(R,"Map"),Oi=fn(R,"Promise"),Sn=fn(R,"Set"),Mn=fn(R,"WeakMap"),qn=fn(Et,"create"),_r=Mn&&new Mn,Cn={},Gf=hn(Ri),Hf=hn(Fn),$f=hn(Oi),zf=hn(Sn),Xf=hn(Mn),wr=je?je.prototype:n,Wn=wr?wr.valueOf:n,Bo=wr?wr.toString:n;function p(t){if(Nt(t)&&!ft(t)&&!(t instanceof vt)){if(t instanceof ve)return t;if(Ct.call(t,"__wrapped__"))return Ua(t)}return new ve(t)}var kn=function(){function t(){}return function(e){if(!Lt(e))return{};if(Ro)return Ro(e);t.prototype=e;var i=new t;return t.prototype=n,i}}();function br(){}function ve(t,e){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!e,this.__index__=0,this.__values__=n}p.templateSettings={escape:oc,evaluate:ac,interpolate:Ks,variable:"",imports:{_:p}},p.prototype=br.prototype,p.prototype.constructor=p,ve.prototype=kn(br.prototype),ve.prototype.constructor=ve;function vt(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=se,this.__views__=[]}function Jf(){var t=new vt(this.__wrapped__);return t.__actions__=te(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=te(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=te(this.__views__),t}function Vf(){if(this.__filtered__){var t=new vt(this);t.__dir__=-1,t.__filtered__=!0}else t=this.clone(),t.__dir__*=-1;return t}function Yf(){var t=this.__wrapped__.value(),e=this.__dir__,i=ft(t),a=e<0,c=i?t.length:0,d=ul(0,c,this.__views__),w=d.start,C=d.end,A=C-w,O=a?C:w-1,I=this.__iteratees__,N=I.length,K=0,Y=zt(A,this.__takeCount__);if(!i||!a&&c==A&&Y==A)return ia(t,this.__actions__);var rt=[];t:for(;A--&&K<Y;){O+=e;for(var pt=-1,it=t[O];++pt<N;){var gt=I[pt],yt=gt.iteratee,he=gt.type,Qt=yt(it);if(he==kt)it=Qt;else if(!Qt){if(he==B)continue t;break t}}rt[K++]=it}return rt}vt.prototype=kn(br.prototype),vt.prototype.constructor=vt;function on(t){var e=-1,i=t==null?0:t.length;for(this.clear();++e<i;){var a=t[e];this.set(a[0],a[1])}}function jf(){this.__data__=qn?qn(null):{},this.size=0}function Zf(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}function Qf(t){var e=this.__data__;if(qn){var i=e[t];return i===S?n:i}return Ct.call(e,t)?e[t]:n}function th(t){var e=this.__data__;return qn?e[t]!==n:Ct.call(e,t)}function eh(t,e){var i=this.__data__;return this.size+=this.has(t)?0:1,i[t]=qn&&e===n?S:e,this}on.prototype.clear=jf,on.prototype.delete=Zf,on.prototype.get=Qf,on.prototype.has=th,on.prototype.set=eh;function Pe(t){var e=-1,i=t==null?0:t.length;for(this.clear();++e<i;){var a=t[e];this.set(a[0],a[1])}}function nh(){this.__data__=[],this.size=0}function rh(t){var e=this.__data__,i=Sr(e,t);if(i<0)return!1;var a=e.length-1;return i==a?e.pop():gr.call(e,i,1),--this.size,!0}function ih(t){var e=this.__data__,i=Sr(e,t);return i<0?n:e[i][1]}function sh(t){return Sr(this.__data__,t)>-1}function oh(t,e){var i=this.__data__,a=Sr(i,t);return a<0?(++this.size,i.push([t,e])):i[a][1]=e,this}Pe.prototype.clear=nh,Pe.prototype.delete=rh,Pe.prototype.get=ih,Pe.prototype.has=sh,Pe.prototype.set=oh;function Fe(t){var e=-1,i=t==null?0:t.length;for(this.clear();++e<i;){var a=t[e];this.set(a[0],a[1])}}function ah(){this.size=0,this.__data__={hash:new on,map:new(Fn||Pe),string:new on}}function uh(t){var e=Br(this,t).delete(t);return this.size-=e?1:0,e}function ch(t){return Br(this,t).get(t)}function fh(t){return Br(this,t).has(t)}function hh(t,e){var i=Br(this,t),a=i.size;return i.set(t,e),this.size+=i.size==a?0:1,this}Fe.prototype.clear=ah,Fe.prototype.delete=uh,Fe.prototype.get=ch,Fe.prototype.has=fh,Fe.prototype.set=hh;function an(t){var e=-1,i=t==null?0:t.length;for(this.__data__=new Fe;++e<i;)this.add(t[e])}function lh(t){return this.__data__.set(t,S),this}function ph(t){return this.__data__.has(t)}an.prototype.add=an.prototype.push=lh,an.prototype.has=ph;function ke(t){var e=this.__data__=new Pe(t);this.size=e.size}function dh(){this.__data__=new Pe,this.size=0}function gh(t){var e=this.__data__,i=e.delete(t);return this.size=e.size,i}function vh(t){return this.__data__.get(t)}function yh(t){return this.__data__.has(t)}function mh(t,e){var i=this.__data__;if(i instanceof Pe){var a=i.__data__;if(!Fn||a.length<u-1)return a.push([t,e]),this.size=++i.size,this;i=this.__data__=new Fe(a)}return i.set(t,e),this.size=i.size,this}ke.prototype.clear=dh,ke.prototype.delete=gh,ke.prototype.get=vh,ke.prototype.has=yh,ke.prototype.set=mh;function Uo(t,e){var i=ft(t),a=!i&&ln(t),c=!i&&!a&&nn(t),d=!i&&!a&&!c&&xn(t),w=i||a||c||d,C=w?ki(t.length,xf):[],A=C.length;for(var O in t)(e||Ct.call(t,O))&&!(w&&(O=="length"||c&&(O=="offset"||O=="parent")||d&&(O=="buffer"||O=="byteLength"||O=="byteOffset")||Ke(O,A)))&&C.push(O);return C}function Do(t){var e=t.length;return e?t[Wi(0,e-1)]:n}function _h(t,e){return Ur(te(t),un(e,0,t.length))}function wh(t){return Ur(te(t))}function Ii(t,e,i){(i!==n&&!Ae(t[e],i)||i===n&&!(e in t))&&Me(t,e,i)}function Kn(t,e,i){var a=t[e];(!(Ct.call(t,e)&&Ae(a,i))||i===n&&!(e in t))&&Me(t,e,i)}function Sr(t,e){for(var i=t.length;i--;)if(Ae(t[i][0],e))return i;return-1}function bh(t,e,i,a){return Ze(t,function(c,d,w){e(a,c,i(c),w)}),a}function Po(t,e){return t&&Le(e,Mt(e),t)}function Sh(t,e){return t&&Le(e,ne(e),t)}function Me(t,e,i){e=="__proto__"&&vr?vr(t,e,{configurable:!0,enumerable:!0,value:i,writable:!0}):t[e]=i}function Li(t,e){for(var i=-1,a=e.length,c=T(a),d=t==null;++i<a;)c[i]=d?n:ls(t,e[i]);return c}function un(t,e,i){return t===t&&(i!==n&&(t=t<=i?t:i),e!==n&&(t=t>=e?t:e)),t}function ye(t,e,i,a,c,d){var w,C=e&y,A=e&l,O=e&h;if(i&&(w=c?i(t,a,c,d):i(t)),w!==n)return w;if(!Lt(t))return t;var I=ft(t);if(I){if(w=fl(t),!C)return te(t,w)}else{var N=Xt(t),K=N==bt||N==$t;if(nn(t))return aa(t,C);if(N==oe||N==F||K&&!c){if(w=A||K?{}:Ea(t),!C)return A?Qh(t,Sh(w,t)):Zh(t,Po(w,t))}else{if(!Tt[N])return c?t:{};w=hl(t,N,C)}}d||(d=new ke);var Y=d.get(t);if(Y)return Y;d.set(t,w),eu(t)?t.forEach(function(it){w.add(ye(it,e,i,it,t,d))}):Qa(t)&&t.forEach(function(it,gt){w.set(gt,ye(it,e,i,gt,t,d))});var rt=O?A?Zi:ji:A?ne:Mt,pt=I?n:rt(t);return de(pt||t,function(it,gt){pt&&(gt=it,it=t[gt]),Kn(w,gt,ye(it,e,i,gt,t,d))}),w}function Ch(t){var e=Mt(t);return function(i){return Fo(i,t,e)}}function Fo(t,e,i){var a=i.length;if(t==null)return!a;for(t=Et(t);a--;){var c=i[a],d=e[c],w=t[c];if(w===n&&!(c in t)||!d(w))return!1}return!0}function Mo(t,e,i){if(typeof t!="function")throw new ge(m);return Vn(function(){t.apply(n,i)},e)}function Gn(t,e,i,a){var c=-1,d=sr,w=!0,C=t.length,A=[],O=e.length;if(!C)return A;i&&(e=It(e,ue(i))),a?(d=mi,w=!1):e.length>=u&&(d=Dn,w=!1,e=new an(e));t:for(;++c<C;){var I=t[c],N=i==null?I:i(I);if(I=a||I!==0?I:0,w&&N===N){for(var K=O;K--;)if(e[K]===N)continue t;A.push(I)}else d(e,N,a)||A.push(I)}return A}var Ze=la(Ie),qo=la(Bi,!0);function kh(t,e){var i=!0;return Ze(t,function(a,c,d){return i=!!e(a,c,d),i}),i}function Cr(t,e,i){for(var a=-1,c=t.length;++a<c;){var d=t[a],w=e(d);if(w!=null&&(C===n?w===w&&!fe(w):i(w,C)))var C=w,A=d}return A}function Ah(t,e,i,a){var c=t.length;for(i=lt(i),i<0&&(i=-i>c?0:c+i),a=a===n||a>c?c:lt(a),a<0&&(a+=c),a=i>a?0:ru(a);i<a;)t[i++]=e;return t}function Wo(t,e){var i=[];return Ze(t,function(a,c,d){e(a,c,d)&&i.push(a)}),i}function Kt(t,e,i,a,c){var d=-1,w=t.length;for(i||(i=pl),c||(c=[]);++d<w;){var C=t[d];e>0&&i(C)?e>1?Kt(C,e-1,i,a,c):Ve(c,C):a||(c[c.length]=C)}return c}var Ni=pa(),Ko=pa(!0);function Ie(t,e){return t&&Ni(t,e,Mt)}function Bi(t,e){return t&&Ko(t,e,Mt)}function kr(t,e){return Je(e,function(i){return Ge(t[i])})}function cn(t,e){e=tn(e,t);for(var i=0,a=e.length;t!=null&&i<a;)t=t[Ne(e[i++])];return i&&i==a?t:n}function Go(t,e,i){var a=e(t);return ft(t)?a:Ve(a,i(t))}function jt(t){return t==null?t===n?Bn:Ln:sn&&sn in Et(t)?al(t):wl(t)}function Ui(t,e){return t>e}function Eh(t,e){return t!=null&&Ct.call(t,e)}function Th(t,e){return t!=null&&e in Et(t)}function xh(t,e,i){return t>=zt(e,i)&&t<Ft(e,i)}function Di(t,e,i){for(var a=i?mi:sr,c=t[0].length,d=t.length,w=d,C=T(d),A=1/0,O=[];w--;){var I=t[w];w&&e&&(I=It(I,ue(e))),A=zt(I.length,A),C[w]=!i&&(e||c>=120&&I.length>=120)?new an(w&&I):n}I=t[0];var N=-1,K=C[0];t:for(;++N<c&&O.length<A;){var Y=I[N],rt=e?e(Y):Y;if(Y=i||Y!==0?Y:0,!(K?Dn(K,rt):a(O,rt,i))){for(w=d;--w;){var pt=C[w];if(!(pt?Dn(pt,rt):a(t[w],rt,i)))continue t}K&&K.push(rt),O.push(Y)}}return O}function Rh(t,e,i,a){return Ie(t,function(c,d,w){e(a,i(c),d,w)}),a}function Hn(t,e,i){e=tn(e,t),t=Oa(t,e);var a=t==null?t:t[Ne(_e(e))];return a==null?n:ae(a,t,i)}function Ho(t){return Nt(t)&&jt(t)==F}function Oh(t){return Nt(t)&&jt(t)==Xe}function Ih(t){return Nt(t)&&jt(t)==tt}function $n(t,e,i,a,c){return t===e?!0:t==null||e==null||!Nt(t)&&!Nt(e)?t!==t&&e!==e:Lh(t,e,i,a,$n,c)}function Lh(t,e,i,a,c,d){var w=ft(t),C=ft(e),A=w?et:Xt(t),O=C?et:Xt(e);A=A==F?oe:A,O=O==F?oe:O;var I=A==oe,N=O==oe,K=A==O;if(K&&nn(t)){if(!nn(e))return!1;w=!0,I=!1}if(K&&!I)return d||(d=new ke),w||xn(t)?Ca(t,e,i,a,c,d):sl(t,e,A,i,a,c,d);if(!(i&b)){var Y=I&&Ct.call(t,"__wrapped__"),rt=N&&Ct.call(e,"__wrapped__");if(Y||rt){var pt=Y?t.value():t,it=rt?e.value():e;return d||(d=new ke),c(pt,it,i,a,d)}}return K?(d||(d=new ke),ol(t,e,i,a,c,d)):!1}function Nh(t){return Nt(t)&&Xt(t)==Ot}function Pi(t,e,i,a){var c=i.length,d=c,w=!a;if(t==null)return!d;for(t=Et(t);c--;){var C=i[c];if(w&&C[2]?C[1]!==t[C[0]]:!(C[0]in t))return!1}for(;++c<d;){C=i[c];var A=C[0],O=t[A],I=C[1];if(w&&C[2]){if(O===n&&!(A in t))return!1}else{var N=new ke;if(a)var K=a(O,I,A,t,e,N);if(!(K===n?$n(I,O,b|E,a,N):K))return!1}}return!0}function $o(t){if(!Lt(t)||gl(t))return!1;var e=Ge(t)?Nf:Sc;return e.test(hn(t))}function Bh(t){return Nt(t)&&jt(t)==Vt}function Uh(t){return Nt(t)&&Xt(t)==Yt}function Dh(t){return Nt(t)&&Wr(t.length)&&!!xt[jt(t)]}function zo(t){return typeof t=="function"?t:t==null?re:typeof t=="object"?ft(t)?Vo(t[0],t[1]):Jo(t):du(t)}function Fi(t){if(!Jn(t))return Mf(t);var e=[];for(var i in Et(t))Ct.call(t,i)&&i!="constructor"&&e.push(i);return e}function Ph(t){if(!Lt(t))return _l(t);var e=Jn(t),i=[];for(var a in t)a=="constructor"&&(e||!Ct.call(t,a))||i.push(a);return i}function Mi(t,e){return t<e}function Xo(t,e){var i=-1,a=ee(t)?T(t.length):[];return Ze(t,function(c,d,w){a[++i]=e(c,d,w)}),a}function Jo(t){var e=ts(t);return e.length==1&&e[0][2]?xa(e[0][0],e[0][1]):function(i){return i===t||Pi(i,t,e)}}function Vo(t,e){return ns(t)&&Ta(e)?xa(Ne(t),e):function(i){var a=ls(i,t);return a===n&&a===e?ps(i,t):$n(e,a,b|E)}}function Ar(t,e,i,a,c){t!==e&&Ni(e,function(d,w){if(c||(c=new ke),Lt(d))Fh(t,e,w,i,Ar,a,c);else{var C=a?a(is(t,w),d,w+"",t,e,c):n;C===n&&(C=d),Ii(t,w,C)}},ne)}function Fh(t,e,i,a,c,d,w){var C=is(t,i),A=is(e,i),O=w.get(A);if(O){Ii(t,i,O);return}var I=d?d(C,A,i+"",t,e,w):n,N=I===n;if(N){var K=ft(A),Y=!K&&nn(A),rt=!K&&!Y&&xn(A);I=A,K||Y||rt?ft(C)?I=C:Bt(C)?I=te(C):Y?(N=!1,I=aa(A,!0)):rt?(N=!1,I=ua(A,!0)):I=[]:Yn(A)||ln(A)?(I=C,ln(C)?I=iu(C):(!Lt(C)||Ge(C))&&(I=Ea(A))):N=!1}N&&(w.set(A,I),c(I,A,a,d,w),w.delete(A)),Ii(t,i,I)}function Yo(t,e){var i=t.length;if(i)return e+=e<0?i:0,Ke(e,i)?t[e]:n}function jo(t,e,i){e.length?e=It(e,function(d){return ft(d)?function(w){return cn(w,d.length===1?d[0]:d)}:d}):e=[re];var a=-1;e=It(e,ue(nt()));var c=Xo(t,function(d,w,C){var A=It(e,function(O){return O(d)});return{criteria:A,index:++a,value:d}});return hf(c,function(d,w){return jh(d,w,i)})}function Mh(t,e){return Zo(t,e,function(i,a){return ps(t,a)})}function Zo(t,e,i){for(var a=-1,c=e.length,d={};++a<c;){var w=e[a],C=cn(t,w);i(C,w)&&zn(d,tn(w,t),C)}return d}function qh(t){return function(e){return cn(e,t)}}function qi(t,e,i,a){var c=a?ff:yn,d=-1,w=e.length,C=t;for(t===e&&(e=te(e)),i&&(C=It(t,ue(i)));++d<w;)for(var A=0,O=e[d],I=i?i(O):O;(A=c(C,I,A,a))>-1;)C!==t&&gr.call(C,A,1),gr.call(t,A,1);return t}function Qo(t,e){for(var i=t?e.length:0,a=i-1;i--;){var c=e[i];if(i==a||c!==d){var d=c;Ke(c)?gr.call(t,c,1):Hi(t,c)}}return t}function Wi(t,e){return t+mr(No()*(e-t+1))}function Wh(t,e,i,a){for(var c=-1,d=Ft(yr((e-t)/(i||1)),0),w=T(d);d--;)w[a?d:++c]=t,t+=i;return w}function Ki(t,e){var i="";if(!t||e<1||e>ut)return i;do e%2&&(i+=t),e=mr(e/2),e&&(t+=t);while(e);return i}function dt(t,e){return ss(Ra(t,e,re),t+"")}function Kh(t){return Do(Rn(t))}function Gh(t,e){var i=Rn(t);return Ur(i,un(e,0,i.length))}function zn(t,e,i,a){if(!Lt(t))return t;e=tn(e,t);for(var c=-1,d=e.length,w=d-1,C=t;C!=null&&++c<d;){var A=Ne(e[c]),O=i;if(A==="__proto__"||A==="constructor"||A==="prototype")return t;if(c!=w){var I=C[A];O=a?a(I,A,C):n,O===n&&(O=Lt(I)?I:Ke(e[c+1])?[]:{})}Kn(C,A,O),C=C[A]}return t}var ta=_r?function(t,e){return _r.set(t,e),t}:re,Hh=vr?function(t,e){return vr(t,"toString",{configurable:!0,enumerable:!1,value:gs(e),writable:!0})}:re;function $h(t){return Ur(Rn(t))}function me(t,e,i){var a=-1,c=t.length;e<0&&(e=-e>c?0:c+e),i=i>c?c:i,i<0&&(i+=c),c=e>i?0:i-e>>>0,e>>>=0;for(var d=T(c);++a<c;)d[a]=t[a+e];return d}function zh(t,e){var i;return Ze(t,function(a,c,d){return i=e(a,c,d),!i}),!!i}function Er(t,e,i){var a=0,c=t==null?a:t.length;if(typeof e=="number"&&e===e&&c<=q){for(;a<c;){var d=a+c>>>1,w=t[d];w!==null&&!fe(w)&&(i?w<=e:w<e)?a=d+1:c=d}return c}return Gi(t,e,re,i)}function Gi(t,e,i,a){var c=0,d=t==null?0:t.length;if(d===0)return 0;e=i(e);for(var w=e!==e,C=e===null,A=fe(e),O=e===n;c<d;){var I=mr((c+d)/2),N=i(t[I]),K=N!==n,Y=N===null,rt=N===N,pt=fe(N);if(w)var it=a||rt;else O?it=rt&&(a||K):C?it=rt&&K&&(a||!Y):A?it=rt&&K&&!Y&&(a||!pt):Y||pt?it=!1:it=a?N<=e:N<e;it?c=I+1:d=I}return zt(d,er)}function ea(t,e){for(var i=-1,a=t.length,c=0,d=[];++i<a;){var w=t[i],C=e?e(w):w;if(!i||!Ae(C,A)){var A=C;d[c++]=w===0?0:w}}return d}function na(t){return typeof t=="number"?t:fe(t)?xe:+t}function ce(t){if(typeof t=="string")return t;if(ft(t))return It(t,ce)+"";if(fe(t))return Bo?Bo.call(t):"";var e=t+"";return e=="0"&&1/t==-Rt?"-0":e}function Qe(t,e,i){var a=-1,c=sr,d=t.length,w=!0,C=[],A=C;if(i)w=!1,c=mi;else if(d>=u){var O=e?null:rl(t);if(O)return ar(O);w=!1,c=Dn,A=new an}else A=e?[]:C;t:for(;++a<d;){var I=t[a],N=e?e(I):I;if(I=i||I!==0?I:0,w&&N===N){for(var K=A.length;K--;)if(A[K]===N)continue t;e&&A.push(N),C.push(I)}else c(A,N,i)||(A!==C&&A.push(N),C.push(I))}return C}function Hi(t,e){return e=tn(e,t),t=Oa(t,e),t==null||delete t[Ne(_e(e))]}function ra(t,e,i,a){return zn(t,e,i(cn(t,e)),a)}function Tr(t,e,i,a){for(var c=t.length,d=a?c:-1;(a?d--:++d<c)&&e(t[d],d,t););return i?me(t,a?0:d,a?d+1:c):me(t,a?d+1:0,a?c:d)}function ia(t,e){var i=t;return i instanceof vt&&(i=i.value()),_i(e,function(a,c){return c.func.apply(c.thisArg,Ve([a],c.args))},i)}function $i(t,e,i){var a=t.length;if(a<2)return a?Qe(t[0]):[];for(var c=-1,d=T(a);++c<a;)for(var w=t[c],C=-1;++C<a;)C!=c&&(d[c]=Gn(d[c]||w,t[C],e,i));return Qe(Kt(d,1),e,i)}function sa(t,e,i){for(var a=-1,c=t.length,d=e.length,w={};++a<c;){var C=a<d?e[a]:n;i(w,t[a],C)}return w}function zi(t){return Bt(t)?t:[]}function Xi(t){return typeof t=="function"?t:re}function tn(t,e){return ft(t)?t:ns(t,e)?[t]:Ba(St(t))}var Xh=dt;function en(t,e,i){var a=t.length;return i=i===n?a:i,!e&&i>=a?t:me(t,e,i)}var oa=Bf||function(t){return Wt.clearTimeout(t)};function aa(t,e){if(e)return t.slice();var i=t.length,a=xo?xo(i):new t.constructor(i);return t.copy(a),a}function Ji(t){var e=new t.constructor(t.byteLength);return new pr(e).set(new pr(t)),e}function Jh(t,e){var i=e?Ji(t.buffer):t.buffer;return new t.constructor(i,t.byteOffset,t.byteLength)}function Vh(t){var e=new t.constructor(t.source,Gs.exec(t));return e.lastIndex=t.lastIndex,e}function Yh(t){return Wn?Et(Wn.call(t)):{}}function ua(t,e){var i=e?Ji(t.buffer):t.buffer;return new t.constructor(i,t.byteOffset,t.length)}function ca(t,e){if(t!==e){var i=t!==n,a=t===null,c=t===t,d=fe(t),w=e!==n,C=e===null,A=e===e,O=fe(e);if(!C&&!O&&!d&&t>e||d&&w&&A&&!C&&!O||a&&w&&A||!i&&A||!c)return 1;if(!a&&!d&&!O&&t<e||O&&i&&c&&!a&&!d||C&&i&&c||!w&&c||!A)return-1}return 0}function jh(t,e,i){for(var a=-1,c=t.criteria,d=e.criteria,w=c.length,C=i.length;++a<w;){var A=ca(c[a],d[a]);if(A){if(a>=C)return A;var O=i[a];return A*(O=="desc"?-1:1)}}return t.index-e.index}function fa(t,e,i,a){for(var c=-1,d=t.length,w=i.length,C=-1,A=e.length,O=Ft(d-w,0),I=T(A+O),N=!a;++C<A;)I[C]=e[C];for(;++c<w;)(N||c<d)&&(I[i[c]]=t[c]);for(;O--;)I[C++]=t[c++];return I}function ha(t,e,i,a){for(var c=-1,d=t.length,w=-1,C=i.length,A=-1,O=e.length,I=Ft(d-C,0),N=T(I+O),K=!a;++c<I;)N[c]=t[c];for(var Y=c;++A<O;)N[Y+A]=e[A];for(;++w<C;)(K||c<d)&&(N[Y+i[w]]=t[c++]);return N}function te(t,e){var i=-1,a=t.length;for(e||(e=T(a));++i<a;)e[i]=t[i];return e}function Le(t,e,i,a){var c=!i;i||(i={});for(var d=-1,w=e.length;++d<w;){var C=e[d],A=a?a(i[C],t[C],C,i,t):n;A===n&&(A=t[C]),c?Me(i,C,A):Kn(i,C,A)}return i}function Zh(t,e){return Le(t,es(t),e)}function Qh(t,e){return Le(t,ka(t),e)}function xr(t,e){return function(i,a){var c=ft(i)?rf:bh,d=e?e():{};return c(i,t,nt(a,2),d)}}function An(t){return dt(function(e,i){var a=-1,c=i.length,d=c>1?i[c-1]:n,w=c>2?i[2]:n;for(d=t.length>3&&typeof d=="function"?(c--,d):n,w&&Zt(i[0],i[1],w)&&(d=c<3?n:d,c=1),e=Et(e);++a<c;){var C=i[a];C&&t(e,C,a,d)}return e})}function la(t,e){return function(i,a){if(i==null)return i;if(!ee(i))return t(i,a);for(var c=i.length,d=e?c:-1,w=Et(i);(e?d--:++d<c)&&a(w[d],d,w)!==!1;);return i}}function pa(t){return function(e,i,a){for(var c=-1,d=Et(e),w=a(e),C=w.length;C--;){var A=w[t?C:++c];if(i(d[A],A,d)===!1)break}return e}}function tl(t,e,i){var a=e&x,c=Xn(t);function d(){var w=this&&this!==Wt&&this instanceof d?c:t;return w.apply(a?i:this,arguments)}return d}function da(t){return function(e){e=St(e);var i=mn(e)?Ce(e):n,a=i?i[0]:e.charAt(0),c=i?en(i,1).join(""):e.slice(1);return a[t]()+c}}function En(t){return function(e){return _i(lu(hu(e).replace(Gc,"")),t,"")}}function Xn(t){return function(){var e=arguments;switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3]);case 5:return new t(e[0],e[1],e[2],e[3],e[4]);case 6:return new t(e[0],e[1],e[2],e[3],e[4],e[5]);case 7:return new t(e[0],e[1],e[2],e[3],e[4],e[5],e[6])}var i=kn(t.prototype),a=t.apply(i,e);return Lt(a)?a:i}}function el(t,e,i){var a=Xn(t);function c(){for(var d=arguments.length,w=T(d),C=d,A=Tn(c);C--;)w[C]=arguments[C];var O=d<3&&w[0]!==A&&w[d-1]!==A?[]:Ye(w,A);if(d-=O.length,d<i)return _a(t,e,Rr,c.placeholder,n,w,O,n,n,i-d);var I=this&&this!==Wt&&this instanceof c?a:t;return ae(I,this,w)}return c}function ga(t){return function(e,i,a){var c=Et(e);if(!ee(e)){var d=nt(i,3);e=Mt(e),i=function(C){return d(c[C],C,c)}}var w=t(e,i,a);return w>-1?c[d?e[w]:w]:n}}function va(t){return We(function(e){var i=e.length,a=i,c=ve.prototype.thru;for(t&&e.reverse();a--;){var d=e[a];if(typeof d!="function")throw new ge(m);if(c&&!w&&Nr(d)=="wrapper")var w=new ve([],!0)}for(a=w?a:i;++a<i;){d=e[a];var C=Nr(d),A=C=="wrapper"?Qi(d):n;A&&rs(A[0])&&A[1]==(M|V|H|G)&&!A[4].length&&A[9]==1?w=w[Nr(A[0])].apply(w,A[3]):w=d.length==1&&rs(d)?w[C]():w.thru(d)}return function(){var O=arguments,I=O[0];if(w&&O.length==1&&ft(I))return w.plant(I).value();for(var N=0,K=i?e[N].apply(this,O):I;++N<i;)K=e[N].call(this,K);return K}})}function Rr(t,e,i,a,c,d,w,C,A,O){var I=e&M,N=e&x,K=e&W,Y=e&(V|ot),rt=e&L,pt=K?n:Xn(t);function it(){for(var gt=arguments.length,yt=T(gt),he=gt;he--;)yt[he]=arguments[he];if(Y)var Qt=Tn(it),le=pf(yt,Qt);if(a&&(yt=fa(yt,a,c,Y)),d&&(yt=ha(yt,d,w,Y)),gt-=le,Y&><O){var Ut=Ye(yt,Qt);return _a(t,e,Rr,it.placeholder,i,yt,Ut,C,A,O-gt)}var Ee=N?i:this,$e=K?Ee[t]:t;return gt=yt.length,C?yt=bl(yt,C):rt&>>1&&yt.reverse(),I&&A<gt&&(yt.length=A),this&&this!==Wt&&this instanceof it&&($e=pt||Xn($e)),$e.apply(Ee,yt)}return it}function ya(t,e){return function(i,a){return Rh(i,t,e(a),{})}}function Or(t,e){return function(i,a){var c;if(i===n&&a===n)return e;if(i!==n&&(c=i),a!==n){if(c===n)return a;typeof i=="string"||typeof a=="string"?(i=ce(i),a=ce(a)):(i=na(i),a=na(a)),c=t(i,a)}return c}}function Vi(t){return We(function(e){return e=It(e,ue(nt())),dt(function(i){var a=this;return t(e,function(c){return ae(c,a,i)})})})}function Ir(t,e){e=e===n?" ":ce(e);var i=e.length;if(i<2)return i?Ki(e,t):e;var a=Ki(e,yr(t/_n(e)));return mn(e)?en(Ce(a),0,t).join(""):a.slice(0,t)}function nl(t,e,i,a){var c=e&x,d=Xn(t);function w(){for(var C=-1,A=arguments.length,O=-1,I=a.length,N=T(I+A),K=this&&this!==Wt&&this instanceof w?d:t;++O<I;)N[O]=a[O];for(;A--;)N[O++]=arguments[++C];return ae(K,c?i:this,N)}return w}function ma(t){return function(e,i,a){return a&&typeof a!="number"&&Zt(e,i,a)&&(i=a=n),e=He(e),i===n?(i=e,e=0):i=He(i),a=a===n?e<i?1:-1:He(a),Wh(e,i,a,t)}}function Lr(t){return function(e,i){return typeof e=="string"&&typeof i=="string"||(e=we(e),i=we(i)),t(e,i)}}function _a(t,e,i,a,c,d,w,C,A,O){var I=e&V,N=I?w:n,K=I?n:w,Y=I?d:n,rt=I?n:d;e|=I?H:D,e&=~(I?D:H),e&st||(e&=~(x|W));var pt=[t,e,c,Y,N,rt,K,C,A,O],it=i.apply(n,pt);return rs(t)&&Ia(it,pt),it.placeholder=a,La(it,t,e)}function Yi(t){var e=Pt[t];return function(i,a){if(i=we(i),a=a==null?0:zt(lt(a),292),a&&Lo(i)){var c=(St(i)+"e").split("e"),d=e(c[0]+"e"+(+c[1]+a));return c=(St(d)+"e").split("e"),+(c[0]+"e"+(+c[1]-a))}return e(i)}}var rl=Sn&&1/ar(new Sn([,-0]))[1]==Rt?function(t){return new Sn(t)}:ms;function wa(t){return function(e){var i=Xt(e);return i==Ot?Ei(e):i==Yt?wf(e):lf(e,t(e))}}function qe(t,e,i,a,c,d,w,C){var A=e&W;if(!A&&typeof t!="function")throw new ge(m);var O=a?a.length:0;if(O||(e&=~(H|D),a=c=n),w=w===n?w:Ft(lt(w),0),C=C===n?C:lt(C),O-=c?c.length:0,e&D){var I=a,N=c;a=c=n}var K=A?n:Qi(t),Y=[t,e,i,a,c,I,N,d,w,C];if(K&&ml(Y,K),t=Y[0],e=Y[1],i=Y[2],a=Y[3],c=Y[4],C=Y[9]=Y[9]===n?A?0:t.length:Ft(Y[9]-O,0),!C&&e&(V|ot)&&(e&=~(V|ot)),!e||e==x)var rt=tl(t,e,i);else e==V||e==ot?rt=el(t,e,C):(e==H||e==(x|H))&&!c.length?rt=nl(t,e,i,a):rt=Rr.apply(n,Y);var pt=K?ta:Ia;return La(pt(rt,Y),t,e)}function ba(t,e,i,a){return t===n||Ae(t,bn[i])&&!Ct.call(a,i)?e:t}function Sa(t,e,i,a,c,d){return Lt(t)&&Lt(e)&&(d.set(e,t),Ar(t,e,n,Sa,d),d.delete(e)),t}function il(t){return Yn(t)?n:t}function Ca(t,e,i,a,c,d){var w=i&b,C=t.length,A=e.length;if(C!=A&&!(w&&A>C))return!1;var O=d.get(t),I=d.get(e);if(O&&I)return O==e&&I==t;var N=-1,K=!0,Y=i&E?new an:n;for(d.set(t,e),d.set(e,t);++N<C;){var rt=t[N],pt=e[N];if(a)var it=w?a(pt,rt,N,e,t,d):a(rt,pt,N,t,e,d);if(it!==n){if(it)continue;K=!1;break}if(Y){if(!wi(e,function(gt,yt){if(!Dn(Y,yt)&&(rt===gt||c(rt,gt,i,a,d)))return Y.push(yt)})){K=!1;break}}else if(!(rt===pt||c(rt,pt,i,a,d))){K=!1;break}}return d.delete(t),d.delete(e),K}function sl(t,e,i,a,c,d,w){switch(i){case gn:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case Xe:return!(t.byteLength!=e.byteLength||!d(new pr(t),new pr(e)));case Z:case tt:case Se:return Ae(+t,+e);case at:return t.name==e.name&&t.message==e.message;case Vt:case Re:return t==e+"";case Ot:var C=Ei;case Yt:var A=a&b;if(C||(C=ar),t.size!=e.size&&!A)return!1;var O=w.get(t);if(O)return O==e;a|=E,w.set(t,e);var I=Ca(C(t),C(e),a,c,d,w);return w.delete(t),I;case Oe:if(Wn)return Wn.call(t)==Wn.call(e)}return!1}function ol(t,e,i,a,c,d){var w=i&b,C=ji(t),A=C.length,O=ji(e),I=O.length;if(A!=I&&!w)return!1;for(var N=A;N--;){var K=C[N];if(!(w?K in e:Ct.call(e,K)))return!1}var Y=d.get(t),rt=d.get(e);if(Y&&rt)return Y==e&&rt==t;var pt=!0;d.set(t,e),d.set(e,t);for(var it=w;++N<A;){K=C[N];var gt=t[K],yt=e[K];if(a)var he=w?a(yt,gt,K,e,t,d):a(gt,yt,K,t,e,d);if(!(he===n?gt===yt||c(gt,yt,i,a,d):he)){pt=!1;break}it||(it=K=="constructor")}if(pt&&!it){var Qt=t.constructor,le=e.constructor;Qt!=le&&"constructor"in t&&"constructor"in e&&!(typeof Qt=="function"&&Qt instanceof Qt&&typeof le=="function"&&le instanceof le)&&(pt=!1)}return d.delete(t),d.delete(e),pt}function We(t){return ss(Ra(t,n,Fa),t+"")}function ji(t){return Go(t,Mt,es)}function Zi(t){return Go(t,ne,ka)}var Qi=_r?function(t){return _r.get(t)}:ms;function Nr(t){for(var e=t.name+"",i=Cn[e],a=Ct.call(Cn,e)?i.length:0;a--;){var c=i[a],d=c.func;if(d==null||d==t)return c.name}return e}function Tn(t){var e=Ct.call(p,"placeholder")?p:t;return e.placeholder}function nt(){var t=p.iteratee||vs;return t=t===vs?zo:t,arguments.length?t(arguments[0],arguments[1]):t}function Br(t,e){var i=t.__data__;return dl(e)?i[typeof e=="string"?"string":"hash"]:i.map}function ts(t){for(var e=Mt(t),i=e.length;i--;){var a=e[i],c=t[a];e[i]=[a,c,Ta(c)]}return e}function fn(t,e){var i=yf(t,e);return $o(i)?i:n}function al(t){var e=Ct.call(t,sn),i=t[sn];try{t[sn]=n;var a=!0}catch{}var c=hr.call(t);return a&&(e?t[sn]=i:delete t[sn]),c}var es=xi?function(t){return t==null?[]:(t=Et(t),Je(xi(t),function(e){return Oo.call(t,e)}))}:_s,ka=xi?function(t){for(var e=[];t;)Ve(e,es(t)),t=dr(t);return e}:_s,Xt=jt;(Ri&&Xt(new Ri(new ArrayBuffer(1)))!=gn||Fn&&Xt(new Fn)!=Ot||Oi&&Xt(Oi.resolve())!=dn||Sn&&Xt(new Sn)!=Yt||Mn&&Xt(new Mn)!=De)&&(Xt=function(t){var e=jt(t),i=e==oe?t.constructor:n,a=i?hn(i):"";if(a)switch(a){case Gf:return gn;case Hf:return Ot;case $f:return dn;case zf:return Yt;case Xf:return De}return e});function ul(t,e,i){for(var a=-1,c=i.length;++a<c;){var d=i[a],w=d.size;switch(d.type){case"drop":t+=w;break;case"dropRight":e-=w;break;case"take":e=zt(e,t+w);break;case"takeRight":t=Ft(t,e-w);break}}return{start:t,end:e}}function cl(t){var e=t.match(dc);return e?e[1].split(gc):[]}function Aa(t,e,i){e=tn(e,t);for(var a=-1,c=e.length,d=!1;++a<c;){var w=Ne(e[a]);if(!(d=t!=null&&i(t,w)))break;t=t[w]}return d||++a!=c?d:(c=t==null?0:t.length,!!c&&Wr(c)&&Ke(w,c)&&(ft(t)||ln(t)))}function fl(t){var e=t.length,i=new t.constructor(e);return e&&typeof t[0]=="string"&&Ct.call(t,"index")&&(i.index=t.index,i.input=t.input),i}function Ea(t){return typeof t.constructor=="function"&&!Jn(t)?kn(dr(t)):{}}function hl(t,e,i){var a=t.constructor;switch(e){case Xe:return Ji(t);case Z:case tt:return new a(+t);case gn:return Jh(t,i);case ti:case ei:case ni:case ri:case ii:case si:case oi:case ai:case ui:return ua(t,i);case Ot:return new a;case Se:case Re:return new a(t);case Vt:return Vh(t);case Yt:return new a;case Oe:return Yh(t)}}function ll(t,e){var i=e.length;if(!i)return t;var a=i-1;return e[a]=(i>1?"& ":"")+e[a],e=e.join(i>2?", ":" "),t.replace(pc,`{
|
|
13
|
+
*/fi.exports;(function(r,o){(function(){var n,s="4.17.21",c=200,f="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",v="Expected a function",d="Invalid `variable` option passed into `_.template`",b="__lodash_hash_undefined__",p=500,w="__lodash_placeholder__",g=1,l=2,u=4,_=1,A=2,k=1,B=2,Y=4,j=8,N=16,U=32,T=64,O=128,P=256,R=512,L=30,H="...",K=800,X=16,F=1,lt=2,ct=3,xt=1/0,ut=9007199254740991,Xt=17976931348623157e292,Ie=NaN,ae=4294967295,vr=ae-1,$=ae>>>1,Q=[["ary",O],["bind",k],["bindKey",B],["curry",j],["curryRight",N],["flip",R],["partial",U],["partialRight",T],["rearg",P]],G="[object Arguments]",rt="[object Array]",z="[object AsyncFunction]",et="[object Boolean]",nt="[object Date]",Z="[object DOMException]",at="[object Error]",St="[object Function]",$t="[object GeneratorFunction]",Ot="[object Map]",ke="[object Number]",Gn="[object Null]",ce="[object Object]",bn="[object Promise]",Xn="[object Proxy]",Vt="[object RegExp]",Zt="[object Set]",Oe="[object String]",Ne="[object Symbol]",$n="[object Undefined]",Pe="[object WeakMap]",jn="[object WeakSet]",Je="[object ArrayBuffer]",Cn="[object DataView]",wi="[object Float32Array]",_i="[object Float64Array]",bi="[object Int8Array]",Ci="[object Int16Array]",Si="[object Int32Array]",ki="[object Uint8Array]",Ai="[object Uint8ClampedArray]",xi="[object Uint16Array]",Ei="[object Uint32Array]",Wu=/\b__p \+= '';/g,Hu=/\b(__p \+=) '' \+/g,zu=/(__e\(.*?\)|\b__t\)) \+\n'';/g,ys=/&(?:amp|lt|gt|quot|#39);/g,vs=/[&<>"']/g,Ku=RegExp(ys.source),Gu=RegExp(vs.source),Xu=/<%-([\s\S]+?)%>/g,$u=/<%([\s\S]+?)%>/g,ms=/<%=([\s\S]+?)%>/g,ju=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Ju=/^\w*$/,Yu=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Ti=/[\\^$.*+?()[\]{}|]/g,Vu=RegExp(Ti.source),Ri=/^\s+/,Zu=/\s/,Qu=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,tf=/\{\n\/\* \[wrapped with (.+)\] \*/,ef=/,? & /,nf=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,rf=/[()=,{}\[\]\/\s]/,of=/\\(\\)?/g,sf=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,ws=/\w*$/,af=/^[-+]0x[0-9a-f]+$/i,cf=/^0b[01]+$/i,uf=/^\[object .+?Constructor\]$/,ff=/^0o[0-7]+$/i,hf=/^(?:0|[1-9]\d*)$/,lf=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,mr=/($^)/,pf=/['\n\r\u2028\u2029\\]/g,wr="\\ud800-\\udfff",df="\\u0300-\\u036f",gf="\\ufe20-\\ufe2f",yf="\\u20d0-\\u20ff",_s=df+gf+yf,bs="\\u2700-\\u27bf",Cs="a-z\\xdf-\\xf6\\xf8-\\xff",vf="\\xac\\xb1\\xd7\\xf7",mf="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",wf="\\u2000-\\u206f",_f=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Ss="A-Z\\xc0-\\xd6\\xd8-\\xde",ks="\\ufe0e\\ufe0f",As=vf+mf+wf+_f,Ii="['’]",bf="["+wr+"]",xs="["+As+"]",_r="["+_s+"]",Es="\\d+",Cf="["+bs+"]",Ts="["+Cs+"]",Rs="[^"+wr+As+Es+bs+Cs+Ss+"]",Oi="\\ud83c[\\udffb-\\udfff]",Sf="(?:"+_r+"|"+Oi+")",Is="[^"+wr+"]",Ni="(?:\\ud83c[\\udde6-\\uddff]){2}",Li="[\\ud800-\\udbff][\\udc00-\\udfff]",Sn="["+Ss+"]",Os="\\u200d",Ns="(?:"+Ts+"|"+Rs+")",kf="(?:"+Sn+"|"+Rs+")",Ls="(?:"+Ii+"(?:d|ll|m|re|s|t|ve))?",Bs="(?:"+Ii+"(?:D|LL|M|RE|S|T|VE))?",Us=Sf+"?",Ds="["+ks+"]?",Af="(?:"+Os+"(?:"+[Is,Ni,Li].join("|")+")"+Ds+Us+")*",xf="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Ef="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Ps=Ds+Us+Af,Tf="(?:"+[Cf,Ni,Li].join("|")+")"+Ps,Rf="(?:"+[Is+_r+"?",_r,Ni,Li,bf].join("|")+")",If=RegExp(Ii,"g"),Of=RegExp(_r,"g"),Bi=RegExp(Oi+"(?="+Oi+")|"+Rf+Ps,"g"),Nf=RegExp([Sn+"?"+Ts+"+"+Ls+"(?="+[xs,Sn,"$"].join("|")+")",kf+"+"+Bs+"(?="+[xs,Sn+Ns,"$"].join("|")+")",Sn+"?"+Ns+"+"+Ls,Sn+"+"+Bs,Ef,xf,Es,Tf].join("|"),"g"),Lf=RegExp("["+Os+wr+_s+ks+"]"),Bf=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Uf=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Df=-1,It={};It[wi]=It[_i]=It[bi]=It[Ci]=It[Si]=It[ki]=It[Ai]=It[xi]=It[Ei]=!0,It[G]=It[rt]=It[Je]=It[et]=It[Cn]=It[nt]=It[at]=It[St]=It[Ot]=It[ke]=It[ce]=It[Vt]=It[Zt]=It[Oe]=It[Pe]=!1;var Rt={};Rt[G]=Rt[rt]=Rt[Je]=Rt[Cn]=Rt[et]=Rt[nt]=Rt[wi]=Rt[_i]=Rt[bi]=Rt[Ci]=Rt[Si]=Rt[Ot]=Rt[ke]=Rt[ce]=Rt[Vt]=Rt[Zt]=Rt[Oe]=Rt[Ne]=Rt[ki]=Rt[Ai]=Rt[xi]=Rt[Ei]=!0,Rt[at]=Rt[St]=Rt[Pe]=!1;var Pf={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},Ff={"&":"&","<":"<",">":">",'"':""","'":"'"},Mf={"&":"&","<":"<",">":">",""":'"',"'":"'"},qf={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Wf=parseFloat,Hf=parseInt,Fs=typeof fr=="object"&&fr&&fr.Object===Object&&fr,zf=typeof self=="object"&&self&&self.Object===Object&&self,zt=Fs||zf||Function("return this")(),Ui=o&&!o.nodeType&&o,fn=Ui&&!0&&r&&!r.nodeType&&r,Ms=fn&&fn.exports===Ui,Di=Ms&&Fs.process,ge=function(){try{var x=fn&&fn.require&&fn.require("util").types;return x||Di&&Di.binding&&Di.binding("util")}catch{}}(),qs=ge&&ge.isArrayBuffer,Ws=ge&&ge.isDate,Hs=ge&&ge.isMap,zs=ge&&ge.isRegExp,Ks=ge&&ge.isSet,Gs=ge&&ge.isTypedArray;function ue(x,D,I){switch(I.length){case 0:return x.call(D);case 1:return x.call(D,I[0]);case 2:return x.call(D,I[0],I[1]);case 3:return x.call(D,I[0],I[1],I[2])}return x.apply(D,I)}function Kf(x,D,I,V){for(var ft=-1,Ct=x==null?0:x.length;++ft<Ct;){var Mt=x[ft];D(V,Mt,I(Mt),x)}return V}function ye(x,D){for(var I=-1,V=x==null?0:x.length;++I<V&&D(x[I],I,x)!==!1;);return x}function Gf(x,D){for(var I=x==null?0:x.length;I--&&D(x[I],I,x)!==!1;);return x}function Xs(x,D){for(var I=-1,V=x==null?0:x.length;++I<V;)if(!D(x[I],I,x))return!1;return!0}function Ye(x,D){for(var I=-1,V=x==null?0:x.length,ft=0,Ct=[];++I<V;){var Mt=x[I];D(Mt,I,x)&&(Ct[ft++]=Mt)}return Ct}function br(x,D){var I=x==null?0:x.length;return!!I&&kn(x,D,0)>-1}function Pi(x,D,I){for(var V=-1,ft=x==null?0:x.length;++V<ft;)if(I(D,x[V]))return!0;return!1}function Nt(x,D){for(var I=-1,V=x==null?0:x.length,ft=Array(V);++I<V;)ft[I]=D(x[I],I,x);return ft}function Ve(x,D){for(var I=-1,V=D.length,ft=x.length;++I<V;)x[ft+I]=D[I];return x}function Fi(x,D,I,V){var ft=-1,Ct=x==null?0:x.length;for(V&&Ct&&(I=x[++ft]);++ft<Ct;)I=D(I,x[ft],ft,x);return I}function Xf(x,D,I,V){var ft=x==null?0:x.length;for(V&&ft&&(I=x[--ft]);ft--;)I=D(I,x[ft],ft,x);return I}function Mi(x,D){for(var I=-1,V=x==null?0:x.length;++I<V;)if(D(x[I],I,x))return!0;return!1}var $f=qi("length");function jf(x){return x.split("")}function Jf(x){return x.match(nf)||[]}function $s(x,D,I){var V;return I(x,function(ft,Ct,Mt){if(D(ft,Ct,Mt))return V=Ct,!1}),V}function Cr(x,D,I,V){for(var ft=x.length,Ct=I+(V?1:-1);V?Ct--:++Ct<ft;)if(D(x[Ct],Ct,x))return Ct;return-1}function kn(x,D,I){return D===D?ah(x,D,I):Cr(x,js,I)}function Yf(x,D,I,V){for(var ft=I-1,Ct=x.length;++ft<Ct;)if(V(x[ft],D))return ft;return-1}function js(x){return x!==x}function Js(x,D){var I=x==null?0:x.length;return I?Hi(x,D)/I:Ie}function qi(x){return function(D){return D==null?n:D[x]}}function Wi(x){return function(D){return x==null?n:x[D]}}function Ys(x,D,I,V,ft){return ft(x,function(Ct,Mt,Tt){I=V?(V=!1,Ct):D(I,Ct,Mt,Tt)}),I}function Vf(x,D){var I=x.length;for(x.sort(D);I--;)x[I]=x[I].value;return x}function Hi(x,D){for(var I,V=-1,ft=x.length;++V<ft;){var Ct=D(x[V]);Ct!==n&&(I=I===n?Ct:I+Ct)}return I}function zi(x,D){for(var I=-1,V=Array(x);++I<x;)V[I]=D(I);return V}function Zf(x,D){return Nt(D,function(I){return[I,x[I]]})}function Vs(x){return x&&x.slice(0,ea(x)+1).replace(Ri,"")}function fe(x){return function(D){return x(D)}}function Ki(x,D){return Nt(D,function(I){return x[I]})}function Jn(x,D){return x.has(D)}function Zs(x,D){for(var I=-1,V=x.length;++I<V&&kn(D,x[I],0)>-1;);return I}function Qs(x,D){for(var I=x.length;I--&&kn(D,x[I],0)>-1;);return I}function Qf(x,D){for(var I=x.length,V=0;I--;)x[I]===D&&++V;return V}var th=Wi(Pf),eh=Wi(Ff);function nh(x){return"\\"+qf[x]}function rh(x,D){return x==null?n:x[D]}function An(x){return Lf.test(x)}function ih(x){return Bf.test(x)}function oh(x){for(var D,I=[];!(D=x.next()).done;)I.push(D.value);return I}function Gi(x){var D=-1,I=Array(x.size);return x.forEach(function(V,ft){I[++D]=[ft,V]}),I}function ta(x,D){return function(I){return x(D(I))}}function Ze(x,D){for(var I=-1,V=x.length,ft=0,Ct=[];++I<V;){var Mt=x[I];(Mt===D||Mt===w)&&(x[I]=w,Ct[ft++]=I)}return Ct}function Sr(x){var D=-1,I=Array(x.size);return x.forEach(function(V){I[++D]=V}),I}function sh(x){var D=-1,I=Array(x.size);return x.forEach(function(V){I[++D]=[V,V]}),I}function ah(x,D,I){for(var V=I-1,ft=x.length;++V<ft;)if(x[V]===D)return V;return-1}function ch(x,D,I){for(var V=I+1;V--;)if(x[V]===D)return V;return V}function xn(x){return An(x)?fh(x):$f(x)}function Ae(x){return An(x)?hh(x):jf(x)}function ea(x){for(var D=x.length;D--&&Zu.test(x.charAt(D)););return D}var uh=Wi(Mf);function fh(x){for(var D=Bi.lastIndex=0;Bi.test(x);)++D;return D}function hh(x){return x.match(Bi)||[]}function lh(x){return x.match(Nf)||[]}var ph=function x(D){D=D==null?zt:En.defaults(zt.Object(),D,En.pick(zt,Uf));var I=D.Array,V=D.Date,ft=D.Error,Ct=D.Function,Mt=D.Math,Tt=D.Object,Xi=D.RegExp,dh=D.String,ve=D.TypeError,kr=I.prototype,gh=Ct.prototype,Tn=Tt.prototype,Ar=D["__core-js_shared__"],xr=gh.toString,Et=Tn.hasOwnProperty,yh=0,na=function(){var t=/[^.]+$/.exec(Ar&&Ar.keys&&Ar.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}(),Er=Tn.toString,vh=xr.call(Tt),mh=zt._,wh=Xi("^"+xr.call(Et).replace(Ti,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Tr=Ms?D.Buffer:n,Qe=D.Symbol,Rr=D.Uint8Array,ra=Tr?Tr.allocUnsafe:n,Ir=ta(Tt.getPrototypeOf,Tt),ia=Tt.create,oa=Tn.propertyIsEnumerable,Or=kr.splice,sa=Qe?Qe.isConcatSpreadable:n,Yn=Qe?Qe.iterator:n,hn=Qe?Qe.toStringTag:n,Nr=function(){try{var t=yn(Tt,"defineProperty");return t({},"",{}),t}catch{}}(),_h=D.clearTimeout!==zt.clearTimeout&&D.clearTimeout,bh=V&&V.now!==zt.Date.now&&V.now,Ch=D.setTimeout!==zt.setTimeout&&D.setTimeout,Lr=Mt.ceil,Br=Mt.floor,$i=Tt.getOwnPropertySymbols,Sh=Tr?Tr.isBuffer:n,aa=D.isFinite,kh=kr.join,Ah=ta(Tt.keys,Tt),qt=Mt.max,jt=Mt.min,xh=V.now,Eh=D.parseInt,ca=Mt.random,Th=kr.reverse,ji=yn(D,"DataView"),Vn=yn(D,"Map"),Ji=yn(D,"Promise"),Rn=yn(D,"Set"),Zn=yn(D,"WeakMap"),Qn=yn(Tt,"create"),Ur=Zn&&new Zn,In={},Rh=vn(ji),Ih=vn(Vn),Oh=vn(Ji),Nh=vn(Rn),Lh=vn(Zn),Dr=Qe?Qe.prototype:n,tr=Dr?Dr.valueOf:n,ua=Dr?Dr.toString:n;function y(t){if(Bt(t)&&!ht(t)&&!(t instanceof mt)){if(t instanceof me)return t;if(Et.call(t,"__wrapped__"))return fc(t)}return new me(t)}var On=function(){function t(){}return function(e){if(!Lt(e))return{};if(ia)return ia(e);t.prototype=e;var i=new t;return t.prototype=n,i}}();function Pr(){}function me(t,e){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!e,this.__index__=0,this.__values__=n}y.templateSettings={escape:Xu,evaluate:$u,interpolate:ms,variable:"",imports:{_:y}},y.prototype=Pr.prototype,y.prototype.constructor=y,me.prototype=On(Pr.prototype),me.prototype.constructor=me;function mt(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=ae,this.__views__=[]}function Bh(){var t=new mt(this.__wrapped__);return t.__actions__=ne(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=ne(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=ne(this.__views__),t}function Uh(){if(this.__filtered__){var t=new mt(this);t.__dir__=-1,t.__filtered__=!0}else t=this.clone(),t.__dir__*=-1;return t}function Dh(){var t=this.__wrapped__.value(),e=this.__dir__,i=ht(t),a=e<0,h=i?t.length:0,m=jl(0,h,this.__views__),C=m.start,S=m.end,E=S-C,M=a?S:C-1,q=this.__iteratees__,W=q.length,J=0,tt=jt(E,this.__takeCount__);if(!i||!a&&h==E&&tt==E)return La(t,this.__actions__);var ot=[];t:for(;E--&&J<tt;){M+=e;for(var dt=-1,st=t[M];++dt<W;){var yt=q[dt],wt=yt.iteratee,pe=yt.type,ee=wt(st);if(pe==lt)st=ee;else if(!ee){if(pe==F)continue t;break t}}ot[J++]=st}return ot}mt.prototype=On(Pr.prototype),mt.prototype.constructor=mt;function ln(t){var e=-1,i=t==null?0:t.length;for(this.clear();++e<i;){var a=t[e];this.set(a[0],a[1])}}function Ph(){this.__data__=Qn?Qn(null):{},this.size=0}function Fh(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}function Mh(t){var e=this.__data__;if(Qn){var i=e[t];return i===b?n:i}return Et.call(e,t)?e[t]:n}function qh(t){var e=this.__data__;return Qn?e[t]!==n:Et.call(e,t)}function Wh(t,e){var i=this.__data__;return this.size+=this.has(t)?0:1,i[t]=Qn&&e===n?b:e,this}ln.prototype.clear=Ph,ln.prototype.delete=Fh,ln.prototype.get=Mh,ln.prototype.has=qh,ln.prototype.set=Wh;function Fe(t){var e=-1,i=t==null?0:t.length;for(this.clear();++e<i;){var a=t[e];this.set(a[0],a[1])}}function Hh(){this.__data__=[],this.size=0}function zh(t){var e=this.__data__,i=Fr(e,t);if(i<0)return!1;var a=e.length-1;return i==a?e.pop():Or.call(e,i,1),--this.size,!0}function Kh(t){var e=this.__data__,i=Fr(e,t);return i<0?n:e[i][1]}function Gh(t){return Fr(this.__data__,t)>-1}function Xh(t,e){var i=this.__data__,a=Fr(i,t);return a<0?(++this.size,i.push([t,e])):i[a][1]=e,this}Fe.prototype.clear=Hh,Fe.prototype.delete=zh,Fe.prototype.get=Kh,Fe.prototype.has=Gh,Fe.prototype.set=Xh;function Me(t){var e=-1,i=t==null?0:t.length;for(this.clear();++e<i;){var a=t[e];this.set(a[0],a[1])}}function $h(){this.size=0,this.__data__={hash:new ln,map:new(Vn||Fe),string:new ln}}function jh(t){var e=Yr(this,t).delete(t);return this.size-=e?1:0,e}function Jh(t){return Yr(this,t).get(t)}function Yh(t){return Yr(this,t).has(t)}function Vh(t,e){var i=Yr(this,t),a=i.size;return i.set(t,e),this.size+=i.size==a?0:1,this}Me.prototype.clear=$h,Me.prototype.delete=jh,Me.prototype.get=Jh,Me.prototype.has=Yh,Me.prototype.set=Vh;function pn(t){var e=-1,i=t==null?0:t.length;for(this.__data__=new Me;++e<i;)this.add(t[e])}function Zh(t){return this.__data__.set(t,b),this}function Qh(t){return this.__data__.has(t)}pn.prototype.add=pn.prototype.push=Zh,pn.prototype.has=Qh;function xe(t){var e=this.__data__=new Fe(t);this.size=e.size}function tl(){this.__data__=new Fe,this.size=0}function el(t){var e=this.__data__,i=e.delete(t);return this.size=e.size,i}function nl(t){return this.__data__.get(t)}function rl(t){return this.__data__.has(t)}function il(t,e){var i=this.__data__;if(i instanceof Fe){var a=i.__data__;if(!Vn||a.length<c-1)return a.push([t,e]),this.size=++i.size,this;i=this.__data__=new Me(a)}return i.set(t,e),this.size=i.size,this}xe.prototype.clear=tl,xe.prototype.delete=el,xe.prototype.get=nl,xe.prototype.has=rl,xe.prototype.set=il;function fa(t,e){var i=ht(t),a=!i&&mn(t),h=!i&&!a&&on(t),m=!i&&!a&&!h&&Un(t),C=i||a||h||m,S=C?zi(t.length,dh):[],E=S.length;for(var M in t)(e||Et.call(t,M))&&!(C&&(M=="length"||h&&(M=="offset"||M=="parent")||m&&(M=="buffer"||M=="byteLength"||M=="byteOffset")||ze(M,E)))&&S.push(M);return S}function ha(t){var e=t.length;return e?t[so(0,e-1)]:n}function ol(t,e){return Vr(ne(t),dn(e,0,t.length))}function sl(t){return Vr(ne(t))}function Yi(t,e,i){(i!==n&&!Ee(t[e],i)||i===n&&!(e in t))&&qe(t,e,i)}function er(t,e,i){var a=t[e];(!(Et.call(t,e)&&Ee(a,i))||i===n&&!(e in t))&&qe(t,e,i)}function Fr(t,e){for(var i=t.length;i--;)if(Ee(t[i][0],e))return i;return-1}function al(t,e,i,a){return tn(t,function(h,m,C){e(a,h,i(h),C)}),a}function la(t,e){return t&&Be(e,Ht(e),t)}function cl(t,e){return t&&Be(e,ie(e),t)}function qe(t,e,i){e=="__proto__"&&Nr?Nr(t,e,{configurable:!0,enumerable:!0,value:i,writable:!0}):t[e]=i}function Vi(t,e){for(var i=-1,a=e.length,h=I(a),m=t==null;++i<a;)h[i]=m?n:No(t,e[i]);return h}function dn(t,e,i){return t===t&&(i!==n&&(t=t<=i?t:i),e!==n&&(t=t>=e?t:e)),t}function we(t,e,i,a,h,m){var C,S=e&g,E=e&l,M=e&u;if(i&&(C=h?i(t,a,h,m):i(t)),C!==n)return C;if(!Lt(t))return t;var q=ht(t);if(q){if(C=Yl(t),!S)return ne(t,C)}else{var W=Jt(t),J=W==St||W==$t;if(on(t))return Da(t,S);if(W==ce||W==G||J&&!h){if(C=E||J?{}:ec(t),!S)return E?Ml(t,cl(C,t)):Fl(t,la(C,t))}else{if(!Rt[W])return h?t:{};C=Vl(t,W,S)}}m||(m=new xe);var tt=m.get(t);if(tt)return tt;m.set(t,C),Ic(t)?t.forEach(function(st){C.add(we(st,e,i,st,t,m))}):Tc(t)&&t.forEach(function(st,yt){C.set(yt,we(st,e,i,yt,t,m))});var ot=M?E?mo:vo:E?ie:Ht,dt=q?n:ot(t);return ye(dt||t,function(st,yt){dt&&(yt=st,st=t[yt]),er(C,yt,we(st,e,i,yt,t,m))}),C}function ul(t){var e=Ht(t);return function(i){return pa(i,t,e)}}function pa(t,e,i){var a=i.length;if(t==null)return!a;for(t=Tt(t);a--;){var h=i[a],m=e[h],C=t[h];if(C===n&&!(h in t)||!m(C))return!1}return!0}function da(t,e,i){if(typeof t!="function")throw new ve(v);return cr(function(){t.apply(n,i)},e)}function nr(t,e,i,a){var h=-1,m=br,C=!0,S=t.length,E=[],M=e.length;if(!S)return E;i&&(e=Nt(e,fe(i))),a?(m=Pi,C=!1):e.length>=c&&(m=Jn,C=!1,e=new pn(e));t:for(;++h<S;){var q=t[h],W=i==null?q:i(q);if(q=a||q!==0?q:0,C&&W===W){for(var J=M;J--;)if(e[J]===W)continue t;E.push(q)}else m(e,W,a)||E.push(q)}return E}var tn=Wa(Le),ga=Wa(Qi,!0);function fl(t,e){var i=!0;return tn(t,function(a,h,m){return i=!!e(a,h,m),i}),i}function Mr(t,e,i){for(var a=-1,h=t.length;++a<h;){var m=t[a],C=e(m);if(C!=null&&(S===n?C===C&&!le(C):i(C,S)))var S=C,E=m}return E}function hl(t,e,i,a){var h=t.length;for(i=pt(i),i<0&&(i=-i>h?0:h+i),a=a===n||a>h?h:pt(a),a<0&&(a+=h),a=i>a?0:Nc(a);i<a;)t[i++]=e;return t}function ya(t,e){var i=[];return tn(t,function(a,h,m){e(a,h,m)&&i.push(a)}),i}function Kt(t,e,i,a,h){var m=-1,C=t.length;for(i||(i=Ql),h||(h=[]);++m<C;){var S=t[m];e>0&&i(S)?e>1?Kt(S,e-1,i,a,h):Ve(h,S):a||(h[h.length]=S)}return h}var Zi=Ha(),va=Ha(!0);function Le(t,e){return t&&Zi(t,e,Ht)}function Qi(t,e){return t&&va(t,e,Ht)}function qr(t,e){return Ye(e,function(i){return Ke(t[i])})}function gn(t,e){e=nn(e,t);for(var i=0,a=e.length;t!=null&&i<a;)t=t[Ue(e[i++])];return i&&i==a?t:n}function ma(t,e,i){var a=e(t);return ht(t)?a:Ve(a,i(t))}function Qt(t){return t==null?t===n?$n:Gn:hn&&hn in Tt(t)?$l(t):sp(t)}function to(t,e){return t>e}function ll(t,e){return t!=null&&Et.call(t,e)}function pl(t,e){return t!=null&&e in Tt(t)}function dl(t,e,i){return t>=jt(e,i)&&t<qt(e,i)}function eo(t,e,i){for(var a=i?Pi:br,h=t[0].length,m=t.length,C=m,S=I(m),E=1/0,M=[];C--;){var q=t[C];C&&e&&(q=Nt(q,fe(e))),E=jt(q.length,E),S[C]=!i&&(e||h>=120&&q.length>=120)?new pn(C&&q):n}q=t[0];var W=-1,J=S[0];t:for(;++W<h&&M.length<E;){var tt=q[W],ot=e?e(tt):tt;if(tt=i||tt!==0?tt:0,!(J?Jn(J,ot):a(M,ot,i))){for(C=m;--C;){var dt=S[C];if(!(dt?Jn(dt,ot):a(t[C],ot,i)))continue t}J&&J.push(ot),M.push(tt)}}return M}function gl(t,e,i,a){return Le(t,function(h,m,C){e(a,i(h),m,C)}),a}function rr(t,e,i){e=nn(e,t),t=oc(t,e);var a=t==null?t:t[Ue(be(e))];return a==null?n:ue(a,t,i)}function wa(t){return Bt(t)&&Qt(t)==G}function yl(t){return Bt(t)&&Qt(t)==Je}function vl(t){return Bt(t)&&Qt(t)==nt}function ir(t,e,i,a,h){return t===e?!0:t==null||e==null||!Bt(t)&&!Bt(e)?t!==t&&e!==e:ml(t,e,i,a,ir,h)}function ml(t,e,i,a,h,m){var C=ht(t),S=ht(e),E=C?rt:Jt(t),M=S?rt:Jt(e);E=E==G?ce:E,M=M==G?ce:M;var q=E==ce,W=M==ce,J=E==M;if(J&&on(t)){if(!on(e))return!1;C=!0,q=!1}if(J&&!q)return m||(m=new xe),C||Un(t)?Za(t,e,i,a,h,m):Gl(t,e,E,i,a,h,m);if(!(i&_)){var tt=q&&Et.call(t,"__wrapped__"),ot=W&&Et.call(e,"__wrapped__");if(tt||ot){var dt=tt?t.value():t,st=ot?e.value():e;return m||(m=new xe),h(dt,st,i,a,m)}}return J?(m||(m=new xe),Xl(t,e,i,a,h,m)):!1}function wl(t){return Bt(t)&&Jt(t)==Ot}function no(t,e,i,a){var h=i.length,m=h,C=!a;if(t==null)return!m;for(t=Tt(t);h--;){var S=i[h];if(C&&S[2]?S[1]!==t[S[0]]:!(S[0]in t))return!1}for(;++h<m;){S=i[h];var E=S[0],M=t[E],q=S[1];if(C&&S[2]){if(M===n&&!(E in t))return!1}else{var W=new xe;if(a)var J=a(M,q,E,t,e,W);if(!(J===n?ir(q,M,_|A,a,W):J))return!1}}return!0}function _a(t){if(!Lt(t)||ep(t))return!1;var e=Ke(t)?wh:uf;return e.test(vn(t))}function _l(t){return Bt(t)&&Qt(t)==Vt}function bl(t){return Bt(t)&&Jt(t)==Zt}function Cl(t){return Bt(t)&&ri(t.length)&&!!It[Qt(t)]}function ba(t){return typeof t=="function"?t:t==null?oe:typeof t=="object"?ht(t)?ka(t[0],t[1]):Sa(t):zc(t)}function ro(t){if(!ar(t))return Ah(t);var e=[];for(var i in Tt(t))Et.call(t,i)&&i!="constructor"&&e.push(i);return e}function Sl(t){if(!Lt(t))return op(t);var e=ar(t),i=[];for(var a in t)a=="constructor"&&(e||!Et.call(t,a))||i.push(a);return i}function io(t,e){return t<e}function Ca(t,e){var i=-1,a=re(t)?I(t.length):[];return tn(t,function(h,m,C){a[++i]=e(h,m,C)}),a}function Sa(t){var e=_o(t);return e.length==1&&e[0][2]?rc(e[0][0],e[0][1]):function(i){return i===t||no(i,t,e)}}function ka(t,e){return Co(t)&&nc(e)?rc(Ue(t),e):function(i){var a=No(i,t);return a===n&&a===e?Lo(i,t):ir(e,a,_|A)}}function Wr(t,e,i,a,h){t!==e&&Zi(e,function(m,C){if(h||(h=new xe),Lt(m))kl(t,e,C,i,Wr,a,h);else{var S=a?a(ko(t,C),m,C+"",t,e,h):n;S===n&&(S=m),Yi(t,C,S)}},ie)}function kl(t,e,i,a,h,m,C){var S=ko(t,i),E=ko(e,i),M=C.get(E);if(M){Yi(t,i,M);return}var q=m?m(S,E,i+"",t,e,C):n,W=q===n;if(W){var J=ht(E),tt=!J&&on(E),ot=!J&&!tt&&Un(E);q=E,J||tt||ot?ht(S)?q=S:Ut(S)?q=ne(S):tt?(W=!1,q=Da(E,!0)):ot?(W=!1,q=Pa(E,!0)):q=[]:ur(E)||mn(E)?(q=S,mn(S)?q=Lc(S):(!Lt(S)||Ke(S))&&(q=ec(E))):W=!1}W&&(C.set(E,q),h(q,E,a,m,C),C.delete(E)),Yi(t,i,q)}function Aa(t,e){var i=t.length;if(i)return e+=e<0?i:0,ze(e,i)?t[e]:n}function xa(t,e,i){e.length?e=Nt(e,function(m){return ht(m)?function(C){return gn(C,m.length===1?m[0]:m)}:m}):e=[oe];var a=-1;e=Nt(e,fe(it()));var h=Ca(t,function(m,C,S){var E=Nt(e,function(M){return M(m)});return{criteria:E,index:++a,value:m}});return Vf(h,function(m,C){return Pl(m,C,i)})}function Al(t,e){return Ea(t,e,function(i,a){return Lo(t,a)})}function Ea(t,e,i){for(var a=-1,h=e.length,m={};++a<h;){var C=e[a],S=gn(t,C);i(S,C)&&or(m,nn(C,t),S)}return m}function xl(t){return function(e){return gn(e,t)}}function oo(t,e,i,a){var h=a?Yf:kn,m=-1,C=e.length,S=t;for(t===e&&(e=ne(e)),i&&(S=Nt(t,fe(i)));++m<C;)for(var E=0,M=e[m],q=i?i(M):M;(E=h(S,q,E,a))>-1;)S!==t&&Or.call(S,E,1),Or.call(t,E,1);return t}function Ta(t,e){for(var i=t?e.length:0,a=i-1;i--;){var h=e[i];if(i==a||h!==m){var m=h;ze(h)?Or.call(t,h,1):uo(t,h)}}return t}function so(t,e){return t+Br(ca()*(e-t+1))}function El(t,e,i,a){for(var h=-1,m=qt(Lr((e-t)/(i||1)),0),C=I(m);m--;)C[a?m:++h]=t,t+=i;return C}function ao(t,e){var i="";if(!t||e<1||e>ut)return i;do e%2&&(i+=t),e=Br(e/2),e&&(t+=t);while(e);return i}function gt(t,e){return Ao(ic(t,e,oe),t+"")}function Tl(t){return ha(Dn(t))}function Rl(t,e){var i=Dn(t);return Vr(i,dn(e,0,i.length))}function or(t,e,i,a){if(!Lt(t))return t;e=nn(e,t);for(var h=-1,m=e.length,C=m-1,S=t;S!=null&&++h<m;){var E=Ue(e[h]),M=i;if(E==="__proto__"||E==="constructor"||E==="prototype")return t;if(h!=C){var q=S[E];M=a?a(q,E,S):n,M===n&&(M=Lt(q)?q:ze(e[h+1])?[]:{})}er(S,E,M),S=S[E]}return t}var Ra=Ur?function(t,e){return Ur.set(t,e),t}:oe,Il=Nr?function(t,e){return Nr(t,"toString",{configurable:!0,enumerable:!1,value:Uo(e),writable:!0})}:oe;function Ol(t){return Vr(Dn(t))}function _e(t,e,i){var a=-1,h=t.length;e<0&&(e=-e>h?0:h+e),i=i>h?h:i,i<0&&(i+=h),h=e>i?0:i-e>>>0,e>>>=0;for(var m=I(h);++a<h;)m[a]=t[a+e];return m}function Nl(t,e){var i;return tn(t,function(a,h,m){return i=e(a,h,m),!i}),!!i}function Hr(t,e,i){var a=0,h=t==null?a:t.length;if(typeof e=="number"&&e===e&&h<=$){for(;a<h;){var m=a+h>>>1,C=t[m];C!==null&&!le(C)&&(i?C<=e:C<e)?a=m+1:h=m}return h}return co(t,e,oe,i)}function co(t,e,i,a){var h=0,m=t==null?0:t.length;if(m===0)return 0;e=i(e);for(var C=e!==e,S=e===null,E=le(e),M=e===n;h<m;){var q=Br((h+m)/2),W=i(t[q]),J=W!==n,tt=W===null,ot=W===W,dt=le(W);if(C)var st=a||ot;else M?st=ot&&(a||J):S?st=ot&&J&&(a||!tt):E?st=ot&&J&&!tt&&(a||!dt):tt||dt?st=!1:st=a?W<=e:W<e;st?h=q+1:m=q}return jt(m,vr)}function Ia(t,e){for(var i=-1,a=t.length,h=0,m=[];++i<a;){var C=t[i],S=e?e(C):C;if(!i||!Ee(S,E)){var E=S;m[h++]=C===0?0:C}}return m}function Oa(t){return typeof t=="number"?t:le(t)?Ie:+t}function he(t){if(typeof t=="string")return t;if(ht(t))return Nt(t,he)+"";if(le(t))return ua?ua.call(t):"";var e=t+"";return e=="0"&&1/t==-xt?"-0":e}function en(t,e,i){var a=-1,h=br,m=t.length,C=!0,S=[],E=S;if(i)C=!1,h=Pi;else if(m>=c){var M=e?null:zl(t);if(M)return Sr(M);C=!1,h=Jn,E=new pn}else E=e?[]:S;t:for(;++a<m;){var q=t[a],W=e?e(q):q;if(q=i||q!==0?q:0,C&&W===W){for(var J=E.length;J--;)if(E[J]===W)continue t;e&&E.push(W),S.push(q)}else h(E,W,i)||(E!==S&&E.push(W),S.push(q))}return S}function uo(t,e){return e=nn(e,t),t=oc(t,e),t==null||delete t[Ue(be(e))]}function Na(t,e,i,a){return or(t,e,i(gn(t,e)),a)}function zr(t,e,i,a){for(var h=t.length,m=a?h:-1;(a?m--:++m<h)&&e(t[m],m,t););return i?_e(t,a?0:m,a?m+1:h):_e(t,a?m+1:0,a?h:m)}function La(t,e){var i=t;return i instanceof mt&&(i=i.value()),Fi(e,function(a,h){return h.func.apply(h.thisArg,Ve([a],h.args))},i)}function fo(t,e,i){var a=t.length;if(a<2)return a?en(t[0]):[];for(var h=-1,m=I(a);++h<a;)for(var C=t[h],S=-1;++S<a;)S!=h&&(m[h]=nr(m[h]||C,t[S],e,i));return en(Kt(m,1),e,i)}function Ba(t,e,i){for(var a=-1,h=t.length,m=e.length,C={};++a<h;){var S=a<m?e[a]:n;i(C,t[a],S)}return C}function ho(t){return Ut(t)?t:[]}function lo(t){return typeof t=="function"?t:oe}function nn(t,e){return ht(t)?t:Co(t,e)?[t]:uc(kt(t))}var Ll=gt;function rn(t,e,i){var a=t.length;return i=i===n?a:i,!e&&i>=a?t:_e(t,e,i)}var Ua=_h||function(t){return zt.clearTimeout(t)};function Da(t,e){if(e)return t.slice();var i=t.length,a=ra?ra(i):new t.constructor(i);return t.copy(a),a}function po(t){var e=new t.constructor(t.byteLength);return new Rr(e).set(new Rr(t)),e}function Bl(t,e){var i=e?po(t.buffer):t.buffer;return new t.constructor(i,t.byteOffset,t.byteLength)}function Ul(t){var e=new t.constructor(t.source,ws.exec(t));return e.lastIndex=t.lastIndex,e}function Dl(t){return tr?Tt(tr.call(t)):{}}function Pa(t,e){var i=e?po(t.buffer):t.buffer;return new t.constructor(i,t.byteOffset,t.length)}function Fa(t,e){if(t!==e){var i=t!==n,a=t===null,h=t===t,m=le(t),C=e!==n,S=e===null,E=e===e,M=le(e);if(!S&&!M&&!m&&t>e||m&&C&&E&&!S&&!M||a&&C&&E||!i&&E||!h)return 1;if(!a&&!m&&!M&&t<e||M&&i&&h&&!a&&!m||S&&i&&h||!C&&h||!E)return-1}return 0}function Pl(t,e,i){for(var a=-1,h=t.criteria,m=e.criteria,C=h.length,S=i.length;++a<C;){var E=Fa(h[a],m[a]);if(E){if(a>=S)return E;var M=i[a];return E*(M=="desc"?-1:1)}}return t.index-e.index}function Ma(t,e,i,a){for(var h=-1,m=t.length,C=i.length,S=-1,E=e.length,M=qt(m-C,0),q=I(E+M),W=!a;++S<E;)q[S]=e[S];for(;++h<C;)(W||h<m)&&(q[i[h]]=t[h]);for(;M--;)q[S++]=t[h++];return q}function qa(t,e,i,a){for(var h=-1,m=t.length,C=-1,S=i.length,E=-1,M=e.length,q=qt(m-S,0),W=I(q+M),J=!a;++h<q;)W[h]=t[h];for(var tt=h;++E<M;)W[tt+E]=e[E];for(;++C<S;)(J||h<m)&&(W[tt+i[C]]=t[h++]);return W}function ne(t,e){var i=-1,a=t.length;for(e||(e=I(a));++i<a;)e[i]=t[i];return e}function Be(t,e,i,a){var h=!i;i||(i={});for(var m=-1,C=e.length;++m<C;){var S=e[m],E=a?a(i[S],t[S],S,i,t):n;E===n&&(E=t[S]),h?qe(i,S,E):er(i,S,E)}return i}function Fl(t,e){return Be(t,bo(t),e)}function Ml(t,e){return Be(t,Qa(t),e)}function Kr(t,e){return function(i,a){var h=ht(i)?Kf:al,m=e?e():{};return h(i,t,it(a,2),m)}}function Nn(t){return gt(function(e,i){var a=-1,h=i.length,m=h>1?i[h-1]:n,C=h>2?i[2]:n;for(m=t.length>3&&typeof m=="function"?(h--,m):n,C&&te(i[0],i[1],C)&&(m=h<3?n:m,h=1),e=Tt(e);++a<h;){var S=i[a];S&&t(e,S,a,m)}return e})}function Wa(t,e){return function(i,a){if(i==null)return i;if(!re(i))return t(i,a);for(var h=i.length,m=e?h:-1,C=Tt(i);(e?m--:++m<h)&&a(C[m],m,C)!==!1;);return i}}function Ha(t){return function(e,i,a){for(var h=-1,m=Tt(e),C=a(e),S=C.length;S--;){var E=C[t?S:++h];if(i(m[E],E,m)===!1)break}return e}}function ql(t,e,i){var a=e&k,h=sr(t);function m(){var C=this&&this!==zt&&this instanceof m?h:t;return C.apply(a?i:this,arguments)}return m}function za(t){return function(e){e=kt(e);var i=An(e)?Ae(e):n,a=i?i[0]:e.charAt(0),h=i?rn(i,1).join(""):e.slice(1);return a[t]()+h}}function Ln(t){return function(e){return Fi(Wc(qc(e).replace(If,"")),t,"")}}function sr(t){return function(){var e=arguments;switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3]);case 5:return new t(e[0],e[1],e[2],e[3],e[4]);case 6:return new t(e[0],e[1],e[2],e[3],e[4],e[5]);case 7:return new t(e[0],e[1],e[2],e[3],e[4],e[5],e[6])}var i=On(t.prototype),a=t.apply(i,e);return Lt(a)?a:i}}function Wl(t,e,i){var a=sr(t);function h(){for(var m=arguments.length,C=I(m),S=m,E=Bn(h);S--;)C[S]=arguments[S];var M=m<3&&C[0]!==E&&C[m-1]!==E?[]:Ze(C,E);if(m-=M.length,m<i)return ja(t,e,Gr,h.placeholder,n,C,M,n,n,i-m);var q=this&&this!==zt&&this instanceof h?a:t;return ue(q,this,C)}return h}function Ka(t){return function(e,i,a){var h=Tt(e);if(!re(e)){var m=it(i,3);e=Ht(e),i=function(S){return m(h[S],S,h)}}var C=t(e,i,a);return C>-1?h[m?e[C]:C]:n}}function Ga(t){return He(function(e){var i=e.length,a=i,h=me.prototype.thru;for(t&&e.reverse();a--;){var m=e[a];if(typeof m!="function")throw new ve(v);if(h&&!C&&Jr(m)=="wrapper")var C=new me([],!0)}for(a=C?a:i;++a<i;){m=e[a];var S=Jr(m),E=S=="wrapper"?wo(m):n;E&&So(E[0])&&E[1]==(O|j|U|P)&&!E[4].length&&E[9]==1?C=C[Jr(E[0])].apply(C,E[3]):C=m.length==1&&So(m)?C[S]():C.thru(m)}return function(){var M=arguments,q=M[0];if(C&&M.length==1&&ht(q))return C.plant(q).value();for(var W=0,J=i?e[W].apply(this,M):q;++W<i;)J=e[W].call(this,J);return J}})}function Gr(t,e,i,a,h,m,C,S,E,M){var q=e&O,W=e&k,J=e&B,tt=e&(j|N),ot=e&R,dt=J?n:sr(t);function st(){for(var yt=arguments.length,wt=I(yt),pe=yt;pe--;)wt[pe]=arguments[pe];if(tt)var ee=Bn(st),de=Qf(wt,ee);if(a&&(wt=Ma(wt,a,h,tt)),m&&(wt=qa(wt,m,C,tt)),yt-=de,tt&&yt<M){var Dt=Ze(wt,ee);return ja(t,e,Gr,st.placeholder,i,wt,Dt,S,E,M-yt)}var Te=W?i:this,Xe=J?Te[t]:t;return yt=wt.length,S?wt=ap(wt,S):ot&&yt>1&&wt.reverse(),q&&E<yt&&(wt.length=E),this&&this!==zt&&this instanceof st&&(Xe=dt||sr(Xe)),Xe.apply(Te,wt)}return st}function Xa(t,e){return function(i,a){return gl(i,t,e(a),{})}}function Xr(t,e){return function(i,a){var h;if(i===n&&a===n)return e;if(i!==n&&(h=i),a!==n){if(h===n)return a;typeof i=="string"||typeof a=="string"?(i=he(i),a=he(a)):(i=Oa(i),a=Oa(a)),h=t(i,a)}return h}}function go(t){return He(function(e){return e=Nt(e,fe(it())),gt(function(i){var a=this;return t(e,function(h){return ue(h,a,i)})})})}function $r(t,e){e=e===n?" ":he(e);var i=e.length;if(i<2)return i?ao(e,t):e;var a=ao(e,Lr(t/xn(e)));return An(e)?rn(Ae(a),0,t).join(""):a.slice(0,t)}function Hl(t,e,i,a){var h=e&k,m=sr(t);function C(){for(var S=-1,E=arguments.length,M=-1,q=a.length,W=I(q+E),J=this&&this!==zt&&this instanceof C?m:t;++M<q;)W[M]=a[M];for(;E--;)W[M++]=arguments[++S];return ue(J,h?i:this,W)}return C}function $a(t){return function(e,i,a){return a&&typeof a!="number"&&te(e,i,a)&&(i=a=n),e=Ge(e),i===n?(i=e,e=0):i=Ge(i),a=a===n?e<i?1:-1:Ge(a),El(e,i,a,t)}}function jr(t){return function(e,i){return typeof e=="string"&&typeof i=="string"||(e=Ce(e),i=Ce(i)),t(e,i)}}function ja(t,e,i,a,h,m,C,S,E,M){var q=e&j,W=q?C:n,J=q?n:C,tt=q?m:n,ot=q?n:m;e|=q?U:T,e&=~(q?T:U),e&Y||(e&=~(k|B));var dt=[t,e,h,tt,W,ot,J,S,E,M],st=i.apply(n,dt);return So(t)&&sc(st,dt),st.placeholder=a,ac(st,t,e)}function yo(t){var e=Mt[t];return function(i,a){if(i=Ce(i),a=a==null?0:jt(pt(a),292),a&&aa(i)){var h=(kt(i)+"e").split("e"),m=e(h[0]+"e"+(+h[1]+a));return h=(kt(m)+"e").split("e"),+(h[0]+"e"+(+h[1]-a))}return e(i)}}var zl=Rn&&1/Sr(new Rn([,-0]))[1]==xt?function(t){return new Rn(t)}:Fo;function Ja(t){return function(e){var i=Jt(e);return i==Ot?Gi(e):i==Zt?sh(e):Zf(e,t(e))}}function We(t,e,i,a,h,m,C,S){var E=e&B;if(!E&&typeof t!="function")throw new ve(v);var M=a?a.length:0;if(M||(e&=~(U|T),a=h=n),C=C===n?C:qt(pt(C),0),S=S===n?S:pt(S),M-=h?h.length:0,e&T){var q=a,W=h;a=h=n}var J=E?n:wo(t),tt=[t,e,i,a,h,q,W,m,C,S];if(J&&ip(tt,J),t=tt[0],e=tt[1],i=tt[2],a=tt[3],h=tt[4],S=tt[9]=tt[9]===n?E?0:t.length:qt(tt[9]-M,0),!S&&e&(j|N)&&(e&=~(j|N)),!e||e==k)var ot=ql(t,e,i);else e==j||e==N?ot=Wl(t,e,S):(e==U||e==(k|U))&&!h.length?ot=Hl(t,e,i,a):ot=Gr.apply(n,tt);var dt=J?Ra:sc;return ac(dt(ot,tt),t,e)}function Ya(t,e,i,a){return t===n||Ee(t,Tn[i])&&!Et.call(a,i)?e:t}function Va(t,e,i,a,h,m){return Lt(t)&&Lt(e)&&(m.set(e,t),Wr(t,e,n,Va,m),m.delete(e)),t}function Kl(t){return ur(t)?n:t}function Za(t,e,i,a,h,m){var C=i&_,S=t.length,E=e.length;if(S!=E&&!(C&&E>S))return!1;var M=m.get(t),q=m.get(e);if(M&&q)return M==e&&q==t;var W=-1,J=!0,tt=i&A?new pn:n;for(m.set(t,e),m.set(e,t);++W<S;){var ot=t[W],dt=e[W];if(a)var st=C?a(dt,ot,W,e,t,m):a(ot,dt,W,t,e,m);if(st!==n){if(st)continue;J=!1;break}if(tt){if(!Mi(e,function(yt,wt){if(!Jn(tt,wt)&&(ot===yt||h(ot,yt,i,a,m)))return tt.push(wt)})){J=!1;break}}else if(!(ot===dt||h(ot,dt,i,a,m))){J=!1;break}}return m.delete(t),m.delete(e),J}function Gl(t,e,i,a,h,m,C){switch(i){case Cn:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case Je:return!(t.byteLength!=e.byteLength||!m(new Rr(t),new Rr(e)));case et:case nt:case ke:return Ee(+t,+e);case at:return t.name==e.name&&t.message==e.message;case Vt:case Oe:return t==e+"";case Ot:var S=Gi;case Zt:var E=a&_;if(S||(S=Sr),t.size!=e.size&&!E)return!1;var M=C.get(t);if(M)return M==e;a|=A,C.set(t,e);var q=Za(S(t),S(e),a,h,m,C);return C.delete(t),q;case Ne:if(tr)return tr.call(t)==tr.call(e)}return!1}function Xl(t,e,i,a,h,m){var C=i&_,S=vo(t),E=S.length,M=vo(e),q=M.length;if(E!=q&&!C)return!1;for(var W=E;W--;){var J=S[W];if(!(C?J in e:Et.call(e,J)))return!1}var tt=m.get(t),ot=m.get(e);if(tt&&ot)return tt==e&&ot==t;var dt=!0;m.set(t,e),m.set(e,t);for(var st=C;++W<E;){J=S[W];var yt=t[J],wt=e[J];if(a)var pe=C?a(wt,yt,J,e,t,m):a(yt,wt,J,t,e,m);if(!(pe===n?yt===wt||h(yt,wt,i,a,m):pe)){dt=!1;break}st||(st=J=="constructor")}if(dt&&!st){var ee=t.constructor,de=e.constructor;ee!=de&&"constructor"in t&&"constructor"in e&&!(typeof ee=="function"&&ee instanceof ee&&typeof de=="function"&&de instanceof de)&&(dt=!1)}return m.delete(t),m.delete(e),dt}function He(t){return Ao(ic(t,n,pc),t+"")}function vo(t){return ma(t,Ht,bo)}function mo(t){return ma(t,ie,Qa)}var wo=Ur?function(t){return Ur.get(t)}:Fo;function Jr(t){for(var e=t.name+"",i=In[e],a=Et.call(In,e)?i.length:0;a--;){var h=i[a],m=h.func;if(m==null||m==t)return h.name}return e}function Bn(t){var e=Et.call(y,"placeholder")?y:t;return e.placeholder}function it(){var t=y.iteratee||Do;return t=t===Do?ba:t,arguments.length?t(arguments[0],arguments[1]):t}function Yr(t,e){var i=t.__data__;return tp(e)?i[typeof e=="string"?"string":"hash"]:i.map}function _o(t){for(var e=Ht(t),i=e.length;i--;){var a=e[i],h=t[a];e[i]=[a,h,nc(h)]}return e}function yn(t,e){var i=rh(t,e);return _a(i)?i:n}function $l(t){var e=Et.call(t,hn),i=t[hn];try{t[hn]=n;var a=!0}catch{}var h=Er.call(t);return a&&(e?t[hn]=i:delete t[hn]),h}var bo=$i?function(t){return t==null?[]:(t=Tt(t),Ye($i(t),function(e){return oa.call(t,e)}))}:Mo,Qa=$i?function(t){for(var e=[];t;)Ve(e,bo(t)),t=Ir(t);return e}:Mo,Jt=Qt;(ji&&Jt(new ji(new ArrayBuffer(1)))!=Cn||Vn&&Jt(new Vn)!=Ot||Ji&&Jt(Ji.resolve())!=bn||Rn&&Jt(new Rn)!=Zt||Zn&&Jt(new Zn)!=Pe)&&(Jt=function(t){var e=Qt(t),i=e==ce?t.constructor:n,a=i?vn(i):"";if(a)switch(a){case Rh:return Cn;case Ih:return Ot;case Oh:return bn;case Nh:return Zt;case Lh:return Pe}return e});function jl(t,e,i){for(var a=-1,h=i.length;++a<h;){var m=i[a],C=m.size;switch(m.type){case"drop":t+=C;break;case"dropRight":e-=C;break;case"take":e=jt(e,t+C);break;case"takeRight":t=qt(t,e-C);break}}return{start:t,end:e}}function Jl(t){var e=t.match(tf);return e?e[1].split(ef):[]}function tc(t,e,i){e=nn(e,t);for(var a=-1,h=e.length,m=!1;++a<h;){var C=Ue(e[a]);if(!(m=t!=null&&i(t,C)))break;t=t[C]}return m||++a!=h?m:(h=t==null?0:t.length,!!h&&ri(h)&&ze(C,h)&&(ht(t)||mn(t)))}function Yl(t){var e=t.length,i=new t.constructor(e);return e&&typeof t[0]=="string"&&Et.call(t,"index")&&(i.index=t.index,i.input=t.input),i}function ec(t){return typeof t.constructor=="function"&&!ar(t)?On(Ir(t)):{}}function Vl(t,e,i){var a=t.constructor;switch(e){case Je:return po(t);case et:case nt:return new a(+t);case Cn:return Bl(t,i);case wi:case _i:case bi:case Ci:case Si:case ki:case Ai:case xi:case Ei:return Pa(t,i);case Ot:return new a;case ke:case Oe:return new a(t);case Vt:return Ul(t);case Zt:return new a;case Ne:return Dl(t)}}function Zl(t,e){var i=e.length;if(!i)return t;var a=i-1;return e[a]=(i>1?"& ":"")+e[a],e=e.join(i>2?", ":" "),t.replace(Qu,`{
|
|
14
14
|
/* [wrapped with `+e+`] */
|
|
15
|
-
`)}function pl(t){return ft(t)||ln(t)||!!(Io&&t&&t[Io])}function Ke(t,e){var i=typeof t;return e=e??ut,!!e&&(i=="number"||i!="symbol"&&kc.test(t))&&t>-1&&t%1==0&&t<e}function Zt(t,e,i){if(!Lt(i))return!1;var a=typeof e;return(a=="number"?ee(i)&&Ke(e,i.length):a=="string"&&e in i)?Ae(i[e],t):!1}function ns(t,e){if(ft(t))return!1;var i=typeof t;return i=="number"||i=="symbol"||i=="boolean"||t==null||fe(t)?!0:cc.test(t)||!uc.test(t)||e!=null&&t in Et(e)}function dl(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}function rs(t){var e=Nr(t),i=p[e];if(typeof i!="function"||!(e in vt.prototype))return!1;if(t===i)return!0;var a=Qi(i);return!!a&&t===a[0]}function gl(t){return!!To&&To in t}var vl=cr?Ge:ws;function Jn(t){var e=t&&t.constructor,i=typeof e=="function"&&e.prototype||bn;return t===i}function Ta(t){return t===t&&!Lt(t)}function xa(t,e){return function(i){return i==null?!1:i[t]===e&&(e!==n||t in Et(i))}}function yl(t){var e=Mr(t,function(a){return i.size===v&&i.clear(),a}),i=e.cache;return e}function ml(t,e){var i=t[1],a=e[1],c=i|a,d=c<(x|W|M),w=a==M&&i==V||a==M&&i==G&&t[7].length<=e[8]||a==(M|G)&&e[7].length<=e[8]&&i==V;if(!(d||w))return t;a&x&&(t[2]=e[2],c|=i&x?0:st);var C=e[3];if(C){var A=t[3];t[3]=A?fa(A,C,e[4]):C,t[4]=A?Ye(t[3],_):e[4]}return C=e[5],C&&(A=t[5],t[5]=A?ha(A,C,e[6]):C,t[6]=A?Ye(t[5],_):e[6]),C=e[7],C&&(t[7]=C),a&M&&(t[8]=t[8]==null?e[8]:zt(t[8],e[8])),t[9]==null&&(t[9]=e[9]),t[0]=e[0],t[1]=c,t}function _l(t){var e=[];if(t!=null)for(var i in Et(t))e.push(i);return e}function wl(t){return hr.call(t)}function Ra(t,e,i){return e=Ft(e===n?t.length-1:e,0),function(){for(var a=arguments,c=-1,d=Ft(a.length-e,0),w=T(d);++c<d;)w[c]=a[e+c];c=-1;for(var C=T(e+1);++c<e;)C[c]=a[c];return C[e]=i(w),ae(t,this,C)}}function Oa(t,e){return e.length<2?t:cn(t,me(e,0,-1))}function bl(t,e){for(var i=t.length,a=zt(e.length,i),c=te(t);a--;){var d=e[a];t[a]=Ke(d,i)?c[d]:n}return t}function is(t,e){if(!(e==="constructor"&&typeof t[e]=="function")&&e!="__proto__")return t[e]}var Ia=Na(ta),Vn=Df||function(t,e){return Wt.setTimeout(t,e)},ss=Na(Hh);function La(t,e,i){var a=e+"";return ss(t,ll(a,Sl(cl(a),i)))}function Na(t){var e=0,i=0;return function(){var a=qf(),c=j-(a-i);if(i=a,c>0){if(++e>=Q)return arguments[0]}else e=0;return t.apply(n,arguments)}}function Ur(t,e){var i=-1,a=t.length,c=a-1;for(e=e===n?a:e;++i<e;){var d=Wi(i,c),w=t[d];t[d]=t[i],t[i]=w}return t.length=e,t}var Ba=yl(function(t){var e=[];return t.charCodeAt(0)===46&&e.push(""),t.replace(fc,function(i,a,c,d){e.push(c?d.replace(mc,"$1"):a||i)}),e});function Ne(t){if(typeof t=="string"||fe(t))return t;var e=t+"";return e=="0"&&1/t==-Rt?"-0":e}function hn(t){if(t!=null){try{return fr.call(t)}catch{}try{return t+""}catch{}}return""}function Sl(t,e){return de(J,function(i){var a="_."+i[0];e&i[1]&&!sr(t,a)&&t.push(a)}),t.sort()}function Ua(t){if(t instanceof vt)return t.clone();var e=new ve(t.__wrapped__,t.__chain__);return e.__actions__=te(t.__actions__),e.__index__=t.__index__,e.__values__=t.__values__,e}function Cl(t,e,i){(i?Zt(t,e,i):e===n)?e=1:e=Ft(lt(e),0);var a=t==null?0:t.length;if(!a||e<1)return[];for(var c=0,d=0,w=T(yr(a/e));c<a;)w[d++]=me(t,c,c+=e);return w}function kl(t){for(var e=-1,i=t==null?0:t.length,a=0,c=[];++e<i;){var d=t[e];d&&(c[a++]=d)}return c}function Al(){var t=arguments.length;if(!t)return[];for(var e=T(t-1),i=arguments[0],a=t;a--;)e[a-1]=arguments[a];return Ve(ft(i)?te(i):[i],Kt(e,1))}var El=dt(function(t,e){return Bt(t)?Gn(t,Kt(e,1,Bt,!0)):[]}),Tl=dt(function(t,e){var i=_e(e);return Bt(i)&&(i=n),Bt(t)?Gn(t,Kt(e,1,Bt,!0),nt(i,2)):[]}),xl=dt(function(t,e){var i=_e(e);return Bt(i)&&(i=n),Bt(t)?Gn(t,Kt(e,1,Bt,!0),n,i):[]});function Rl(t,e,i){var a=t==null?0:t.length;return a?(e=i||e===n?1:lt(e),me(t,e<0?0:e,a)):[]}function Ol(t,e,i){var a=t==null?0:t.length;return a?(e=i||e===n?1:lt(e),e=a-e,me(t,0,e<0?0:e)):[]}function Il(t,e){return t&&t.length?Tr(t,nt(e,3),!0,!0):[]}function Ll(t,e){return t&&t.length?Tr(t,nt(e,3),!0):[]}function Nl(t,e,i,a){var c=t==null?0:t.length;return c?(i&&typeof i!="number"&&Zt(t,e,i)&&(i=0,a=c),Ah(t,e,i,a)):[]}function Da(t,e,i){var a=t==null?0:t.length;if(!a)return-1;var c=i==null?0:lt(i);return c<0&&(c=Ft(a+c,0)),or(t,nt(e,3),c)}function Pa(t,e,i){var a=t==null?0:t.length;if(!a)return-1;var c=a-1;return i!==n&&(c=lt(i),c=i<0?Ft(a+c,0):zt(c,a-1)),or(t,nt(e,3),c,!0)}function Fa(t){var e=t==null?0:t.length;return e?Kt(t,1):[]}function Bl(t){var e=t==null?0:t.length;return e?Kt(t,Rt):[]}function Ul(t,e){var i=t==null?0:t.length;return i?(e=e===n?1:lt(e),Kt(t,e)):[]}function Dl(t){for(var e=-1,i=t==null?0:t.length,a={};++e<i;){var c=t[e];a[c[0]]=c[1]}return a}function Ma(t){return t&&t.length?t[0]:n}function Pl(t,e,i){var a=t==null?0:t.length;if(!a)return-1;var c=i==null?0:lt(i);return c<0&&(c=Ft(a+c,0)),yn(t,e,c)}function Fl(t){var e=t==null?0:t.length;return e?me(t,0,-1):[]}var Ml=dt(function(t){var e=It(t,zi);return e.length&&e[0]===t[0]?Di(e):[]}),ql=dt(function(t){var e=_e(t),i=It(t,zi);return e===_e(i)?e=n:i.pop(),i.length&&i[0]===t[0]?Di(i,nt(e,2)):[]}),Wl=dt(function(t){var e=_e(t),i=It(t,zi);return e=typeof e=="function"?e:n,e&&i.pop(),i.length&&i[0]===t[0]?Di(i,n,e):[]});function Kl(t,e){return t==null?"":Ff.call(t,e)}function _e(t){var e=t==null?0:t.length;return e?t[e-1]:n}function Gl(t,e,i){var a=t==null?0:t.length;if(!a)return-1;var c=a;return i!==n&&(c=lt(i),c=c<0?Ft(a+c,0):zt(c,a-1)),e===e?Sf(t,e,c):or(t,_o,c,!0)}function Hl(t,e){return t&&t.length?Yo(t,lt(e)):n}var $l=dt(qa);function qa(t,e){return t&&t.length&&e&&e.length?qi(t,e):t}function zl(t,e,i){return t&&t.length&&e&&e.length?qi(t,e,nt(i,2)):t}function Xl(t,e,i){return t&&t.length&&e&&e.length?qi(t,e,n,i):t}var Jl=We(function(t,e){var i=t==null?0:t.length,a=Li(t,e);return Qo(t,It(e,function(c){return Ke(c,i)?+c:c}).sort(ca)),a});function Vl(t,e){var i=[];if(!(t&&t.length))return i;var a=-1,c=[],d=t.length;for(e=nt(e,3);++a<d;){var w=t[a];e(w,a,t)&&(i.push(w),c.push(a))}return Qo(t,c),i}function os(t){return t==null?t:Kf.call(t)}function Yl(t,e,i){var a=t==null?0:t.length;return a?(i&&typeof i!="number"&&Zt(t,e,i)?(e=0,i=a):(e=e==null?0:lt(e),i=i===n?a:lt(i)),me(t,e,i)):[]}function jl(t,e){return Er(t,e)}function Zl(t,e,i){return Gi(t,e,nt(i,2))}function Ql(t,e){var i=t==null?0:t.length;if(i){var a=Er(t,e);if(a<i&&Ae(t[a],e))return a}return-1}function tp(t,e){return Er(t,e,!0)}function ep(t,e,i){return Gi(t,e,nt(i,2),!0)}function np(t,e){var i=t==null?0:t.length;if(i){var a=Er(t,e,!0)-1;if(Ae(t[a],e))return a}return-1}function rp(t){return t&&t.length?ea(t):[]}function ip(t,e){return t&&t.length?ea(t,nt(e,2)):[]}function sp(t){var e=t==null?0:t.length;return e?me(t,1,e):[]}function op(t,e,i){return t&&t.length?(e=i||e===n?1:lt(e),me(t,0,e<0?0:e)):[]}function ap(t,e,i){var a=t==null?0:t.length;return a?(e=i||e===n?1:lt(e),e=a-e,me(t,e<0?0:e,a)):[]}function up(t,e){return t&&t.length?Tr(t,nt(e,3),!1,!0):[]}function cp(t,e){return t&&t.length?Tr(t,nt(e,3)):[]}var fp=dt(function(t){return Qe(Kt(t,1,Bt,!0))}),hp=dt(function(t){var e=_e(t);return Bt(e)&&(e=n),Qe(Kt(t,1,Bt,!0),nt(e,2))}),lp=dt(function(t){var e=_e(t);return e=typeof e=="function"?e:n,Qe(Kt(t,1,Bt,!0),n,e)});function pp(t){return t&&t.length?Qe(t):[]}function dp(t,e){return t&&t.length?Qe(t,nt(e,2)):[]}function gp(t,e){return e=typeof e=="function"?e:n,t&&t.length?Qe(t,n,e):[]}function as(t){if(!(t&&t.length))return[];var e=0;return t=Je(t,function(i){if(Bt(i))return e=Ft(i.length,e),!0}),ki(e,function(i){return It(t,bi(i))})}function Wa(t,e){if(!(t&&t.length))return[];var i=as(t);return e==null?i:It(i,function(a){return ae(e,n,a)})}var vp=dt(function(t,e){return Bt(t)?Gn(t,e):[]}),yp=dt(function(t){return $i(Je(t,Bt))}),mp=dt(function(t){var e=_e(t);return Bt(e)&&(e=n),$i(Je(t,Bt),nt(e,2))}),_p=dt(function(t){var e=_e(t);return e=typeof e=="function"?e:n,$i(Je(t,Bt),n,e)}),wp=dt(as);function bp(t,e){return sa(t||[],e||[],Kn)}function Sp(t,e){return sa(t||[],e||[],zn)}var Cp=dt(function(t){var e=t.length,i=e>1?t[e-1]:n;return i=typeof i=="function"?(t.pop(),i):n,Wa(t,i)});function Ka(t){var e=p(t);return e.__chain__=!0,e}function kp(t,e){return e(t),t}function Dr(t,e){return e(t)}var Ap=We(function(t){var e=t.length,i=e?t[0]:0,a=this.__wrapped__,c=function(d){return Li(d,t)};return e>1||this.__actions__.length||!(a instanceof vt)||!Ke(i)?this.thru(c):(a=a.slice(i,+i+(e?1:0)),a.__actions__.push({func:Dr,args:[c],thisArg:n}),new ve(a,this.__chain__).thru(function(d){return e&&!d.length&&d.push(n),d}))});function Ep(){return Ka(this)}function Tp(){return new ve(this.value(),this.__chain__)}function xp(){this.__values__===n&&(this.__values__=nu(this.value()));var t=this.__index__>=this.__values__.length,e=t?n:this.__values__[this.__index__++];return{done:t,value:e}}function Rp(){return this}function Op(t){for(var e,i=this;i instanceof br;){var a=Ua(i);a.__index__=0,a.__values__=n,e?c.__wrapped__=a:e=a;var c=a;i=i.__wrapped__}return c.__wrapped__=t,e}function Ip(){var t=this.__wrapped__;if(t instanceof vt){var e=t;return this.__actions__.length&&(e=new vt(this)),e=e.reverse(),e.__actions__.push({func:Dr,args:[os],thisArg:n}),new ve(e,this.__chain__)}return this.thru(os)}function Lp(){return ia(this.__wrapped__,this.__actions__)}var Np=xr(function(t,e,i){Ct.call(t,i)?++t[i]:Me(t,i,1)});function Bp(t,e,i){var a=ft(t)?yo:kh;return i&&Zt(t,e,i)&&(e=n),a(t,nt(e,3))}function Up(t,e){var i=ft(t)?Je:Wo;return i(t,nt(e,3))}var Dp=ga(Da),Pp=ga(Pa);function Fp(t,e){return Kt(Pr(t,e),1)}function Mp(t,e){return Kt(Pr(t,e),Rt)}function qp(t,e,i){return i=i===n?1:lt(i),Kt(Pr(t,e),i)}function Ga(t,e){var i=ft(t)?de:Ze;return i(t,nt(e,3))}function Ha(t,e){var i=ft(t)?sf:qo;return i(t,nt(e,3))}var Wp=xr(function(t,e,i){Ct.call(t,i)?t[i].push(e):Me(t,i,[e])});function Kp(t,e,i,a){t=ee(t)?t:Rn(t),i=i&&!a?lt(i):0;var c=t.length;return i<0&&(i=Ft(c+i,0)),Kr(t)?i<=c&&t.indexOf(e,i)>-1:!!c&&yn(t,e,i)>-1}var Gp=dt(function(t,e,i){var a=-1,c=typeof e=="function",d=ee(t)?T(t.length):[];return Ze(t,function(w){d[++a]=c?ae(e,w,i):Hn(w,e,i)}),d}),Hp=xr(function(t,e,i){Me(t,i,e)});function Pr(t,e){var i=ft(t)?It:Xo;return i(t,nt(e,3))}function $p(t,e,i,a){return t==null?[]:(ft(e)||(e=e==null?[]:[e]),i=a?n:i,ft(i)||(i=i==null?[]:[i]),jo(t,e,i))}var zp=xr(function(t,e,i){t[i?0:1].push(e)},function(){return[[],[]]});function Xp(t,e,i){var a=ft(t)?_i:bo,c=arguments.length<3;return a(t,nt(e,4),i,c,Ze)}function Jp(t,e,i){var a=ft(t)?of:bo,c=arguments.length<3;return a(t,nt(e,4),i,c,qo)}function Vp(t,e){var i=ft(t)?Je:Wo;return i(t,qr(nt(e,3)))}function Yp(t){var e=ft(t)?Do:Kh;return e(t)}function jp(t,e,i){(i?Zt(t,e,i):e===n)?e=1:e=lt(e);var a=ft(t)?_h:Gh;return a(t,e)}function Zp(t){var e=ft(t)?wh:$h;return e(t)}function Qp(t){if(t==null)return 0;if(ee(t))return Kr(t)?_n(t):t.length;var e=Xt(t);return e==Ot||e==Yt?t.size:Fi(t).length}function td(t,e,i){var a=ft(t)?wi:zh;return i&&Zt(t,e,i)&&(e=n),a(t,nt(e,3))}var ed=dt(function(t,e){if(t==null)return[];var i=e.length;return i>1&&Zt(t,e[0],e[1])?e=[]:i>2&&Zt(e[0],e[1],e[2])&&(e=[e[0]]),jo(t,Kt(e,1),[])}),Fr=Uf||function(){return Wt.Date.now()};function nd(t,e){if(typeof e!="function")throw new ge(m);return t=lt(t),function(){if(--t<1)return e.apply(this,arguments)}}function $a(t,e,i){return e=i?n:e,e=t&&e==null?t.length:e,qe(t,M,n,n,n,n,e)}function za(t,e){var i;if(typeof e!="function")throw new ge(m);return t=lt(t),function(){return--t>0&&(i=e.apply(this,arguments)),t<=1&&(e=n),i}}var us=dt(function(t,e,i){var a=x;if(i.length){var c=Ye(i,Tn(us));a|=H}return qe(t,a,e,i,c)}),Xa=dt(function(t,e,i){var a=x|W;if(i.length){var c=Ye(i,Tn(Xa));a|=H}return qe(e,a,t,i,c)});function Ja(t,e,i){e=i?n:e;var a=qe(t,V,n,n,n,n,n,e);return a.placeholder=Ja.placeholder,a}function Va(t,e,i){e=i?n:e;var a=qe(t,ot,n,n,n,n,n,e);return a.placeholder=Va.placeholder,a}function Ya(t,e,i){var a,c,d,w,C,A,O=0,I=!1,N=!1,K=!0;if(typeof t!="function")throw new ge(m);e=we(e)||0,Lt(i)&&(I=!!i.leading,N="maxWait"in i,d=N?Ft(we(i.maxWait)||0,e):d,K="trailing"in i?!!i.trailing:K);function Y(Ut){var Ee=a,$e=c;return a=c=n,O=Ut,w=t.apply($e,Ee),w}function rt(Ut){return O=Ut,C=Vn(gt,e),I?Y(Ut):w}function pt(Ut){var Ee=Ut-A,$e=Ut-O,gu=e-Ee;return N?zt(gu,d-$e):gu}function it(Ut){var Ee=Ut-A,$e=Ut-O;return A===n||Ee>=e||Ee<0||N&&$e>=d}function gt(){var Ut=Fr();if(it(Ut))return yt(Ut);C=Vn(gt,pt(Ut))}function yt(Ut){return C=n,K&&a?Y(Ut):(a=c=n,w)}function he(){C!==n&&oa(C),O=0,a=A=c=C=n}function Qt(){return C===n?w:yt(Fr())}function le(){var Ut=Fr(),Ee=it(Ut);if(a=arguments,c=this,A=Ut,Ee){if(C===n)return rt(A);if(N)return oa(C),C=Vn(gt,e),Y(A)}return C===n&&(C=Vn(gt,e)),w}return le.cancel=he,le.flush=Qt,le}var rd=dt(function(t,e){return Mo(t,1,e)}),id=dt(function(t,e,i){return Mo(t,we(e)||0,i)});function sd(t){return qe(t,L)}function Mr(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new ge(m);var i=function(){var a=arguments,c=e?e.apply(this,a):a[0],d=i.cache;if(d.has(c))return d.get(c);var w=t.apply(this,a);return i.cache=d.set(c,w)||d,w};return i.cache=new(Mr.Cache||Fe),i}Mr.Cache=Fe;function qr(t){if(typeof t!="function")throw new ge(m);return function(){var e=arguments;switch(e.length){case 0:return!t.call(this);case 1:return!t.call(this,e[0]);case 2:return!t.call(this,e[0],e[1]);case 3:return!t.call(this,e[0],e[1],e[2])}return!t.apply(this,e)}}function od(t){return za(2,t)}var ad=Xh(function(t,e){e=e.length==1&&ft(e[0])?It(e[0],ue(nt())):It(Kt(e,1),ue(nt()));var i=e.length;return dt(function(a){for(var c=-1,d=zt(a.length,i);++c<d;)a[c]=e[c].call(this,a[c]);return ae(t,this,a)})}),cs=dt(function(t,e){var i=Ye(e,Tn(cs));return qe(t,H,n,e,i)}),ja=dt(function(t,e){var i=Ye(e,Tn(ja));return qe(t,D,n,e,i)}),ud=We(function(t,e){return qe(t,G,n,n,n,e)});function cd(t,e){if(typeof t!="function")throw new ge(m);return e=e===n?e:lt(e),dt(t,e)}function fd(t,e){if(typeof t!="function")throw new ge(m);return e=e==null?0:Ft(lt(e),0),dt(function(i){var a=i[e],c=en(i,0,e);return a&&Ve(c,a),ae(t,this,c)})}function hd(t,e,i){var a=!0,c=!0;if(typeof t!="function")throw new ge(m);return Lt(i)&&(a="leading"in i?!!i.leading:a,c="trailing"in i?!!i.trailing:c),Ya(t,e,{leading:a,maxWait:e,trailing:c})}function ld(t){return $a(t,1)}function pd(t,e){return cs(Xi(e),t)}function dd(){if(!arguments.length)return[];var t=arguments[0];return ft(t)?t:[t]}function gd(t){return ye(t,h)}function vd(t,e){return e=typeof e=="function"?e:n,ye(t,h,e)}function yd(t){return ye(t,y|h)}function md(t,e){return e=typeof e=="function"?e:n,ye(t,y|h,e)}function _d(t,e){return e==null||Fo(t,e,Mt(e))}function Ae(t,e){return t===e||t!==t&&e!==e}var wd=Lr(Ui),bd=Lr(function(t,e){return t>=e}),ln=Ho(function(){return arguments}())?Ho:function(t){return Nt(t)&&Ct.call(t,"callee")&&!Oo.call(t,"callee")},ft=T.isArray,Sd=fo?ue(fo):Oh;function ee(t){return t!=null&&Wr(t.length)&&!Ge(t)}function Bt(t){return Nt(t)&&ee(t)}function Cd(t){return t===!0||t===!1||Nt(t)&&jt(t)==Z}var nn=Pf||ws,kd=ho?ue(ho):Ih;function Ad(t){return Nt(t)&&t.nodeType===1&&!Yn(t)}function Ed(t){if(t==null)return!0;if(ee(t)&&(ft(t)||typeof t=="string"||typeof t.splice=="function"||nn(t)||xn(t)||ln(t)))return!t.length;var e=Xt(t);if(e==Ot||e==Yt)return!t.size;if(Jn(t))return!Fi(t).length;for(var i in t)if(Ct.call(t,i))return!1;return!0}function Td(t,e){return $n(t,e)}function xd(t,e,i){i=typeof i=="function"?i:n;var a=i?i(t,e):n;return a===n?$n(t,e,n,i):!!a}function fs(t){if(!Nt(t))return!1;var e=jt(t);return e==at||e==z||typeof t.message=="string"&&typeof t.name=="string"&&!Yn(t)}function Rd(t){return typeof t=="number"&&Lo(t)}function Ge(t){if(!Lt(t))return!1;var e=jt(t);return e==bt||e==$t||e==P||e==Nn}function Za(t){return typeof t=="number"&&t==lt(t)}function Wr(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=ut}function Lt(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}function Nt(t){return t!=null&&typeof t=="object"}var Qa=lo?ue(lo):Nh;function Od(t,e){return t===e||Pi(t,e,ts(e))}function Id(t,e,i){return i=typeof i=="function"?i:n,Pi(t,e,ts(e),i)}function Ld(t){return tu(t)&&t!=+t}function Nd(t){if(vl(t))throw new ct(f);return $o(t)}function Bd(t){return t===null}function Ud(t){return t==null}function tu(t){return typeof t=="number"||Nt(t)&&jt(t)==Se}function Yn(t){if(!Nt(t)||jt(t)!=oe)return!1;var e=dr(t);if(e===null)return!0;var i=Ct.call(e,"constructor")&&e.constructor;return typeof i=="function"&&i instanceof i&&fr.call(i)==If}var hs=po?ue(po):Bh;function Dd(t){return Za(t)&&t>=-ut&&t<=ut}var eu=go?ue(go):Uh;function Kr(t){return typeof t=="string"||!ft(t)&&Nt(t)&&jt(t)==Re}function fe(t){return typeof t=="symbol"||Nt(t)&&jt(t)==Oe}var xn=vo?ue(vo):Dh;function Pd(t){return t===n}function Fd(t){return Nt(t)&&Xt(t)==De}function Md(t){return Nt(t)&&jt(t)==Un}var qd=Lr(Mi),Wd=Lr(function(t,e){return t<=e});function nu(t){if(!t)return[];if(ee(t))return Kr(t)?Ce(t):te(t);if(Pn&&t[Pn])return _f(t[Pn]());var e=Xt(t),i=e==Ot?Ei:e==Yt?ar:Rn;return i(t)}function He(t){if(!t)return t===0?t:0;if(t=we(t),t===Rt||t===-Rt){var e=t<0?-1:1;return e*Ht}return t===t?t:0}function lt(t){var e=He(t),i=e%1;return e===e?i?e-i:e:0}function ru(t){return t?un(lt(t),0,se):0}function we(t){if(typeof t=="number")return t;if(fe(t))return xe;if(Lt(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=Lt(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=So(t);var i=bc.test(t);return i||Cc.test(t)?ef(t.slice(2),i?2:8):wc.test(t)?xe:+t}function iu(t){return Le(t,ne(t))}function Kd(t){return t?un(lt(t),-ut,ut):t===0?t:0}function St(t){return t==null?"":ce(t)}var Gd=An(function(t,e){if(Jn(e)||ee(e)){Le(e,Mt(e),t);return}for(var i in e)Ct.call(e,i)&&Kn(t,i,e[i])}),su=An(function(t,e){Le(e,ne(e),t)}),Gr=An(function(t,e,i,a){Le(e,ne(e),t,a)}),Hd=An(function(t,e,i,a){Le(e,Mt(e),t,a)}),$d=We(Li);function zd(t,e){var i=kn(t);return e==null?i:Po(i,e)}var Xd=dt(function(t,e){t=Et(t);var i=-1,a=e.length,c=a>2?e[2]:n;for(c&&Zt(e[0],e[1],c)&&(a=1);++i<a;)for(var d=e[i],w=ne(d),C=-1,A=w.length;++C<A;){var O=w[C],I=t[O];(I===n||Ae(I,bn[O])&&!Ct.call(t,O))&&(t[O]=d[O])}return t}),Jd=dt(function(t){return t.push(n,Sa),ae(ou,n,t)});function Vd(t,e){return mo(t,nt(e,3),Ie)}function Yd(t,e){return mo(t,nt(e,3),Bi)}function jd(t,e){return t==null?t:Ni(t,nt(e,3),ne)}function Zd(t,e){return t==null?t:Ko(t,nt(e,3),ne)}function Qd(t,e){return t&&Ie(t,nt(e,3))}function tg(t,e){return t&&Bi(t,nt(e,3))}function eg(t){return t==null?[]:kr(t,Mt(t))}function ng(t){return t==null?[]:kr(t,ne(t))}function ls(t,e,i){var a=t==null?n:cn(t,e);return a===n?i:a}function rg(t,e){return t!=null&&Aa(t,e,Eh)}function ps(t,e){return t!=null&&Aa(t,e,Th)}var ig=ya(function(t,e,i){e!=null&&typeof e.toString!="function"&&(e=hr.call(e)),t[e]=i},gs(re)),sg=ya(function(t,e,i){e!=null&&typeof e.toString!="function"&&(e=hr.call(e)),Ct.call(t,e)?t[e].push(i):t[e]=[i]},nt),og=dt(Hn);function Mt(t){return ee(t)?Uo(t):Fi(t)}function ne(t){return ee(t)?Uo(t,!0):Ph(t)}function ag(t,e){var i={};return e=nt(e,3),Ie(t,function(a,c,d){Me(i,e(a,c,d),a)}),i}function ug(t,e){var i={};return e=nt(e,3),Ie(t,function(a,c,d){Me(i,c,e(a,c,d))}),i}var cg=An(function(t,e,i){Ar(t,e,i)}),ou=An(function(t,e,i,a){Ar(t,e,i,a)}),fg=We(function(t,e){var i={};if(t==null)return i;var a=!1;e=It(e,function(d){return d=tn(d,t),a||(a=d.length>1),d}),Le(t,Zi(t),i),a&&(i=ye(i,y|l|h,il));for(var c=e.length;c--;)Hi(i,e[c]);return i});function hg(t,e){return au(t,qr(nt(e)))}var lg=We(function(t,e){return t==null?{}:Mh(t,e)});function au(t,e){if(t==null)return{};var i=It(Zi(t),function(a){return[a]});return e=nt(e),Zo(t,i,function(a,c){return e(a,c[0])})}function pg(t,e,i){e=tn(e,t);var a=-1,c=e.length;for(c||(c=1,t=n);++a<c;){var d=t==null?n:t[Ne(e[a])];d===n&&(a=c,d=i),t=Ge(d)?d.call(t):d}return t}function dg(t,e,i){return t==null?t:zn(t,e,i)}function gg(t,e,i,a){return a=typeof a=="function"?a:n,t==null?t:zn(t,e,i,a)}var uu=wa(Mt),cu=wa(ne);function vg(t,e,i){var a=ft(t),c=a||nn(t)||xn(t);if(e=nt(e,4),i==null){var d=t&&t.constructor;c?i=a?new d:[]:Lt(t)?i=Ge(d)?kn(dr(t)):{}:i={}}return(c?de:Ie)(t,function(w,C,A){return e(i,w,C,A)}),i}function yg(t,e){return t==null?!0:Hi(t,e)}function mg(t,e,i){return t==null?t:ra(t,e,Xi(i))}function _g(t,e,i,a){return a=typeof a=="function"?a:n,t==null?t:ra(t,e,Xi(i),a)}function Rn(t){return t==null?[]:Ai(t,Mt(t))}function wg(t){return t==null?[]:Ai(t,ne(t))}function bg(t,e,i){return i===n&&(i=e,e=n),i!==n&&(i=we(i),i=i===i?i:0),e!==n&&(e=we(e),e=e===e?e:0),un(we(t),e,i)}function Sg(t,e,i){return e=He(e),i===n?(i=e,e=0):i=He(i),t=we(t),xh(t,e,i)}function Cg(t,e,i){if(i&&typeof i!="boolean"&&Zt(t,e,i)&&(e=i=n),i===n&&(typeof e=="boolean"?(i=e,e=n):typeof t=="boolean"&&(i=t,t=n)),t===n&&e===n?(t=0,e=1):(t=He(t),e===n?(e=t,t=0):e=He(e)),t>e){var a=t;t=e,e=a}if(i||t%1||e%1){var c=No();return zt(t+c*(e-t+tf("1e-"+((c+"").length-1))),e)}return Wi(t,e)}var kg=En(function(t,e,i){return e=e.toLowerCase(),t+(i?fu(e):e)});function fu(t){return ds(St(t).toLowerCase())}function hu(t){return t=St(t),t&&t.replace(Ac,df).replace(Hc,"")}function Ag(t,e,i){t=St(t),e=ce(e);var a=t.length;i=i===n?a:un(lt(i),0,a);var c=i;return i-=e.length,i>=0&&t.slice(i,c)==e}function Eg(t){return t=St(t),t&&sc.test(t)?t.replace(Ws,gf):t}function Tg(t){return t=St(t),t&&hc.test(t)?t.replace(ci,"\\$&"):t}var xg=En(function(t,e,i){return t+(i?"-":"")+e.toLowerCase()}),Rg=En(function(t,e,i){return t+(i?" ":"")+e.toLowerCase()}),Og=da("toLowerCase");function Ig(t,e,i){t=St(t),e=lt(e);var a=e?_n(t):0;if(!e||a>=e)return t;var c=(e-a)/2;return Ir(mr(c),i)+t+Ir(yr(c),i)}function Lg(t,e,i){t=St(t),e=lt(e);var a=e?_n(t):0;return e&&a<e?t+Ir(e-a,i):t}function Ng(t,e,i){t=St(t),e=lt(e);var a=e?_n(t):0;return e&&a<e?Ir(e-a,i)+t:t}function Bg(t,e,i){return i||e==null?e=0:e&&(e=+e),Wf(St(t).replace(fi,""),e||0)}function Ug(t,e,i){return(i?Zt(t,e,i):e===n)?e=1:e=lt(e),Ki(St(t),e)}function Dg(){var t=arguments,e=St(t[0]);return t.length<3?e:e.replace(t[1],t[2])}var Pg=En(function(t,e,i){return t+(i?"_":"")+e.toLowerCase()});function Fg(t,e,i){return i&&typeof i!="number"&&Zt(t,e,i)&&(e=i=n),i=i===n?se:i>>>0,i?(t=St(t),t&&(typeof e=="string"||e!=null&&!hs(e))&&(e=ce(e),!e&&mn(t))?en(Ce(t),0,i):t.split(e,i)):[]}var Mg=En(function(t,e,i){return t+(i?" ":"")+ds(e)});function qg(t,e,i){return t=St(t),i=i==null?0:un(lt(i),0,t.length),e=ce(e),t.slice(i,i+e.length)==e}function Wg(t,e,i){var a=p.templateSettings;i&&Zt(t,e,i)&&(e=n),t=St(t),e=Gr({},e,a,ba);var c=Gr({},e.imports,a.imports,ba),d=Mt(c),w=Ai(c,d),C,A,O=0,I=e.interpolate||nr,N="__p += '",K=Ti((e.escape||nr).source+"|"+I.source+"|"+(I===Ks?_c:nr).source+"|"+(e.evaluate||nr).source+"|$","g"),Y="//# sourceURL="+(Ct.call(e,"sourceURL")?(e.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Vc+"]")+`
|
|
16
|
-
`;t.replace(
|
|
17
|
-
__e(`+
|
|
18
|
-
'`),
|
|
19
|
-
`+
|
|
20
|
-
__p += '`),
|
|
21
|
-
((__t = (`+
|
|
22
|
-
'`),
|
|
23
|
-
`;var
|
|
24
|
-
`+
|
|
15
|
+
`)}function Ql(t){return ht(t)||mn(t)||!!(sa&&t&&t[sa])}function ze(t,e){var i=typeof t;return e=e??ut,!!e&&(i=="number"||i!="symbol"&&hf.test(t))&&t>-1&&t%1==0&&t<e}function te(t,e,i){if(!Lt(i))return!1;var a=typeof e;return(a=="number"?re(i)&&ze(e,i.length):a=="string"&&e in i)?Ee(i[e],t):!1}function Co(t,e){if(ht(t))return!1;var i=typeof t;return i=="number"||i=="symbol"||i=="boolean"||t==null||le(t)?!0:Ju.test(t)||!ju.test(t)||e!=null&&t in Tt(e)}function tp(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}function So(t){var e=Jr(t),i=y[e];if(typeof i!="function"||!(e in mt.prototype))return!1;if(t===i)return!0;var a=wo(i);return!!a&&t===a[0]}function ep(t){return!!na&&na in t}var np=Ar?Ke:qo;function ar(t){var e=t&&t.constructor,i=typeof e=="function"&&e.prototype||Tn;return t===i}function nc(t){return t===t&&!Lt(t)}function rc(t,e){return function(i){return i==null?!1:i[t]===e&&(e!==n||t in Tt(i))}}function rp(t){var e=ei(t,function(a){return i.size===p&&i.clear(),a}),i=e.cache;return e}function ip(t,e){var i=t[1],a=e[1],h=i|a,m=h<(k|B|O),C=a==O&&i==j||a==O&&i==P&&t[7].length<=e[8]||a==(O|P)&&e[7].length<=e[8]&&i==j;if(!(m||C))return t;a&k&&(t[2]=e[2],h|=i&k?0:Y);var S=e[3];if(S){var E=t[3];t[3]=E?Ma(E,S,e[4]):S,t[4]=E?Ze(t[3],w):e[4]}return S=e[5],S&&(E=t[5],t[5]=E?qa(E,S,e[6]):S,t[6]=E?Ze(t[5],w):e[6]),S=e[7],S&&(t[7]=S),a&O&&(t[8]=t[8]==null?e[8]:jt(t[8],e[8])),t[9]==null&&(t[9]=e[9]),t[0]=e[0],t[1]=h,t}function op(t){var e=[];if(t!=null)for(var i in Tt(t))e.push(i);return e}function sp(t){return Er.call(t)}function ic(t,e,i){return e=qt(e===n?t.length-1:e,0),function(){for(var a=arguments,h=-1,m=qt(a.length-e,0),C=I(m);++h<m;)C[h]=a[e+h];h=-1;for(var S=I(e+1);++h<e;)S[h]=a[h];return S[e]=i(C),ue(t,this,S)}}function oc(t,e){return e.length<2?t:gn(t,_e(e,0,-1))}function ap(t,e){for(var i=t.length,a=jt(e.length,i),h=ne(t);a--;){var m=e[a];t[a]=ze(m,i)?h[m]:n}return t}function ko(t,e){if(!(e==="constructor"&&typeof t[e]=="function")&&e!="__proto__")return t[e]}var sc=cc(Ra),cr=Ch||function(t,e){return zt.setTimeout(t,e)},Ao=cc(Il);function ac(t,e,i){var a=e+"";return Ao(t,Zl(a,cp(Jl(a),i)))}function cc(t){var e=0,i=0;return function(){var a=xh(),h=X-(a-i);if(i=a,h>0){if(++e>=K)return arguments[0]}else e=0;return t.apply(n,arguments)}}function Vr(t,e){var i=-1,a=t.length,h=a-1;for(e=e===n?a:e;++i<e;){var m=so(i,h),C=t[m];t[m]=t[i],t[i]=C}return t.length=e,t}var uc=rp(function(t){var e=[];return t.charCodeAt(0)===46&&e.push(""),t.replace(Yu,function(i,a,h,m){e.push(h?m.replace(of,"$1"):a||i)}),e});function Ue(t){if(typeof t=="string"||le(t))return t;var e=t+"";return e=="0"&&1/t==-xt?"-0":e}function vn(t){if(t!=null){try{return xr.call(t)}catch{}try{return t+""}catch{}}return""}function cp(t,e){return ye(Q,function(i){var a="_."+i[0];e&i[1]&&!br(t,a)&&t.push(a)}),t.sort()}function fc(t){if(t instanceof mt)return t.clone();var e=new me(t.__wrapped__,t.__chain__);return e.__actions__=ne(t.__actions__),e.__index__=t.__index__,e.__values__=t.__values__,e}function up(t,e,i){(i?te(t,e,i):e===n)?e=1:e=qt(pt(e),0);var a=t==null?0:t.length;if(!a||e<1)return[];for(var h=0,m=0,C=I(Lr(a/e));h<a;)C[m++]=_e(t,h,h+=e);return C}function fp(t){for(var e=-1,i=t==null?0:t.length,a=0,h=[];++e<i;){var m=t[e];m&&(h[a++]=m)}return h}function hp(){var t=arguments.length;if(!t)return[];for(var e=I(t-1),i=arguments[0],a=t;a--;)e[a-1]=arguments[a];return Ve(ht(i)?ne(i):[i],Kt(e,1))}var lp=gt(function(t,e){return Ut(t)?nr(t,Kt(e,1,Ut,!0)):[]}),pp=gt(function(t,e){var i=be(e);return Ut(i)&&(i=n),Ut(t)?nr(t,Kt(e,1,Ut,!0),it(i,2)):[]}),dp=gt(function(t,e){var i=be(e);return Ut(i)&&(i=n),Ut(t)?nr(t,Kt(e,1,Ut,!0),n,i):[]});function gp(t,e,i){var a=t==null?0:t.length;return a?(e=i||e===n?1:pt(e),_e(t,e<0?0:e,a)):[]}function yp(t,e,i){var a=t==null?0:t.length;return a?(e=i||e===n?1:pt(e),e=a-e,_e(t,0,e<0?0:e)):[]}function vp(t,e){return t&&t.length?zr(t,it(e,3),!0,!0):[]}function mp(t,e){return t&&t.length?zr(t,it(e,3),!0):[]}function wp(t,e,i,a){var h=t==null?0:t.length;return h?(i&&typeof i!="number"&&te(t,e,i)&&(i=0,a=h),hl(t,e,i,a)):[]}function hc(t,e,i){var a=t==null?0:t.length;if(!a)return-1;var h=i==null?0:pt(i);return h<0&&(h=qt(a+h,0)),Cr(t,it(e,3),h)}function lc(t,e,i){var a=t==null?0:t.length;if(!a)return-1;var h=a-1;return i!==n&&(h=pt(i),h=i<0?qt(a+h,0):jt(h,a-1)),Cr(t,it(e,3),h,!0)}function pc(t){var e=t==null?0:t.length;return e?Kt(t,1):[]}function _p(t){var e=t==null?0:t.length;return e?Kt(t,xt):[]}function bp(t,e){var i=t==null?0:t.length;return i?(e=e===n?1:pt(e),Kt(t,e)):[]}function Cp(t){for(var e=-1,i=t==null?0:t.length,a={};++e<i;){var h=t[e];a[h[0]]=h[1]}return a}function dc(t){return t&&t.length?t[0]:n}function Sp(t,e,i){var a=t==null?0:t.length;if(!a)return-1;var h=i==null?0:pt(i);return h<0&&(h=qt(a+h,0)),kn(t,e,h)}function kp(t){var e=t==null?0:t.length;return e?_e(t,0,-1):[]}var Ap=gt(function(t){var e=Nt(t,ho);return e.length&&e[0]===t[0]?eo(e):[]}),xp=gt(function(t){var e=be(t),i=Nt(t,ho);return e===be(i)?e=n:i.pop(),i.length&&i[0]===t[0]?eo(i,it(e,2)):[]}),Ep=gt(function(t){var e=be(t),i=Nt(t,ho);return e=typeof e=="function"?e:n,e&&i.pop(),i.length&&i[0]===t[0]?eo(i,n,e):[]});function Tp(t,e){return t==null?"":kh.call(t,e)}function be(t){var e=t==null?0:t.length;return e?t[e-1]:n}function Rp(t,e,i){var a=t==null?0:t.length;if(!a)return-1;var h=a;return i!==n&&(h=pt(i),h=h<0?qt(a+h,0):jt(h,a-1)),e===e?ch(t,e,h):Cr(t,js,h,!0)}function Ip(t,e){return t&&t.length?Aa(t,pt(e)):n}var Op=gt(gc);function gc(t,e){return t&&t.length&&e&&e.length?oo(t,e):t}function Np(t,e,i){return t&&t.length&&e&&e.length?oo(t,e,it(i,2)):t}function Lp(t,e,i){return t&&t.length&&e&&e.length?oo(t,e,n,i):t}var Bp=He(function(t,e){var i=t==null?0:t.length,a=Vi(t,e);return Ta(t,Nt(e,function(h){return ze(h,i)?+h:h}).sort(Fa)),a});function Up(t,e){var i=[];if(!(t&&t.length))return i;var a=-1,h=[],m=t.length;for(e=it(e,3);++a<m;){var C=t[a];e(C,a,t)&&(i.push(C),h.push(a))}return Ta(t,h),i}function xo(t){return t==null?t:Th.call(t)}function Dp(t,e,i){var a=t==null?0:t.length;return a?(i&&typeof i!="number"&&te(t,e,i)?(e=0,i=a):(e=e==null?0:pt(e),i=i===n?a:pt(i)),_e(t,e,i)):[]}function Pp(t,e){return Hr(t,e)}function Fp(t,e,i){return co(t,e,it(i,2))}function Mp(t,e){var i=t==null?0:t.length;if(i){var a=Hr(t,e);if(a<i&&Ee(t[a],e))return a}return-1}function qp(t,e){return Hr(t,e,!0)}function Wp(t,e,i){return co(t,e,it(i,2),!0)}function Hp(t,e){var i=t==null?0:t.length;if(i){var a=Hr(t,e,!0)-1;if(Ee(t[a],e))return a}return-1}function zp(t){return t&&t.length?Ia(t):[]}function Kp(t,e){return t&&t.length?Ia(t,it(e,2)):[]}function Gp(t){var e=t==null?0:t.length;return e?_e(t,1,e):[]}function Xp(t,e,i){return t&&t.length?(e=i||e===n?1:pt(e),_e(t,0,e<0?0:e)):[]}function $p(t,e,i){var a=t==null?0:t.length;return a?(e=i||e===n?1:pt(e),e=a-e,_e(t,e<0?0:e,a)):[]}function jp(t,e){return t&&t.length?zr(t,it(e,3),!1,!0):[]}function Jp(t,e){return t&&t.length?zr(t,it(e,3)):[]}var Yp=gt(function(t){return en(Kt(t,1,Ut,!0))}),Vp=gt(function(t){var e=be(t);return Ut(e)&&(e=n),en(Kt(t,1,Ut,!0),it(e,2))}),Zp=gt(function(t){var e=be(t);return e=typeof e=="function"?e:n,en(Kt(t,1,Ut,!0),n,e)});function Qp(t){return t&&t.length?en(t):[]}function td(t,e){return t&&t.length?en(t,it(e,2)):[]}function ed(t,e){return e=typeof e=="function"?e:n,t&&t.length?en(t,n,e):[]}function Eo(t){if(!(t&&t.length))return[];var e=0;return t=Ye(t,function(i){if(Ut(i))return e=qt(i.length,e),!0}),zi(e,function(i){return Nt(t,qi(i))})}function yc(t,e){if(!(t&&t.length))return[];var i=Eo(t);return e==null?i:Nt(i,function(a){return ue(e,n,a)})}var nd=gt(function(t,e){return Ut(t)?nr(t,e):[]}),rd=gt(function(t){return fo(Ye(t,Ut))}),id=gt(function(t){var e=be(t);return Ut(e)&&(e=n),fo(Ye(t,Ut),it(e,2))}),od=gt(function(t){var e=be(t);return e=typeof e=="function"?e:n,fo(Ye(t,Ut),n,e)}),sd=gt(Eo);function ad(t,e){return Ba(t||[],e||[],er)}function cd(t,e){return Ba(t||[],e||[],or)}var ud=gt(function(t){var e=t.length,i=e>1?t[e-1]:n;return i=typeof i=="function"?(t.pop(),i):n,yc(t,i)});function vc(t){var e=y(t);return e.__chain__=!0,e}function fd(t,e){return e(t),t}function Zr(t,e){return e(t)}var hd=He(function(t){var e=t.length,i=e?t[0]:0,a=this.__wrapped__,h=function(m){return Vi(m,t)};return e>1||this.__actions__.length||!(a instanceof mt)||!ze(i)?this.thru(h):(a=a.slice(i,+i+(e?1:0)),a.__actions__.push({func:Zr,args:[h],thisArg:n}),new me(a,this.__chain__).thru(function(m){return e&&!m.length&&m.push(n),m}))});function ld(){return vc(this)}function pd(){return new me(this.value(),this.__chain__)}function dd(){this.__values__===n&&(this.__values__=Oc(this.value()));var t=this.__index__>=this.__values__.length,e=t?n:this.__values__[this.__index__++];return{done:t,value:e}}function gd(){return this}function yd(t){for(var e,i=this;i instanceof Pr;){var a=fc(i);a.__index__=0,a.__values__=n,e?h.__wrapped__=a:e=a;var h=a;i=i.__wrapped__}return h.__wrapped__=t,e}function vd(){var t=this.__wrapped__;if(t instanceof mt){var e=t;return this.__actions__.length&&(e=new mt(this)),e=e.reverse(),e.__actions__.push({func:Zr,args:[xo],thisArg:n}),new me(e,this.__chain__)}return this.thru(xo)}function md(){return La(this.__wrapped__,this.__actions__)}var wd=Kr(function(t,e,i){Et.call(t,i)?++t[i]:qe(t,i,1)});function _d(t,e,i){var a=ht(t)?Xs:fl;return i&&te(t,e,i)&&(e=n),a(t,it(e,3))}function bd(t,e){var i=ht(t)?Ye:ya;return i(t,it(e,3))}var Cd=Ka(hc),Sd=Ka(lc);function kd(t,e){return Kt(Qr(t,e),1)}function Ad(t,e){return Kt(Qr(t,e),xt)}function xd(t,e,i){return i=i===n?1:pt(i),Kt(Qr(t,e),i)}function mc(t,e){var i=ht(t)?ye:tn;return i(t,it(e,3))}function wc(t,e){var i=ht(t)?Gf:ga;return i(t,it(e,3))}var Ed=Kr(function(t,e,i){Et.call(t,i)?t[i].push(e):qe(t,i,[e])});function Td(t,e,i,a){t=re(t)?t:Dn(t),i=i&&!a?pt(i):0;var h=t.length;return i<0&&(i=qt(h+i,0)),ii(t)?i<=h&&t.indexOf(e,i)>-1:!!h&&kn(t,e,i)>-1}var Rd=gt(function(t,e,i){var a=-1,h=typeof e=="function",m=re(t)?I(t.length):[];return tn(t,function(C){m[++a]=h?ue(e,C,i):rr(C,e,i)}),m}),Id=Kr(function(t,e,i){qe(t,i,e)});function Qr(t,e){var i=ht(t)?Nt:Ca;return i(t,it(e,3))}function Od(t,e,i,a){return t==null?[]:(ht(e)||(e=e==null?[]:[e]),i=a?n:i,ht(i)||(i=i==null?[]:[i]),xa(t,e,i))}var Nd=Kr(function(t,e,i){t[i?0:1].push(e)},function(){return[[],[]]});function Ld(t,e,i){var a=ht(t)?Fi:Ys,h=arguments.length<3;return a(t,it(e,4),i,h,tn)}function Bd(t,e,i){var a=ht(t)?Xf:Ys,h=arguments.length<3;return a(t,it(e,4),i,h,ga)}function Ud(t,e){var i=ht(t)?Ye:ya;return i(t,ni(it(e,3)))}function Dd(t){var e=ht(t)?ha:Tl;return e(t)}function Pd(t,e,i){(i?te(t,e,i):e===n)?e=1:e=pt(e);var a=ht(t)?ol:Rl;return a(t,e)}function Fd(t){var e=ht(t)?sl:Ol;return e(t)}function Md(t){if(t==null)return 0;if(re(t))return ii(t)?xn(t):t.length;var e=Jt(t);return e==Ot||e==Zt?t.size:ro(t).length}function qd(t,e,i){var a=ht(t)?Mi:Nl;return i&&te(t,e,i)&&(e=n),a(t,it(e,3))}var Wd=gt(function(t,e){if(t==null)return[];var i=e.length;return i>1&&te(t,e[0],e[1])?e=[]:i>2&&te(e[0],e[1],e[2])&&(e=[e[0]]),xa(t,Kt(e,1),[])}),ti=bh||function(){return zt.Date.now()};function Hd(t,e){if(typeof e!="function")throw new ve(v);return t=pt(t),function(){if(--t<1)return e.apply(this,arguments)}}function _c(t,e,i){return e=i?n:e,e=t&&e==null?t.length:e,We(t,O,n,n,n,n,e)}function bc(t,e){var i;if(typeof e!="function")throw new ve(v);return t=pt(t),function(){return--t>0&&(i=e.apply(this,arguments)),t<=1&&(e=n),i}}var To=gt(function(t,e,i){var a=k;if(i.length){var h=Ze(i,Bn(To));a|=U}return We(t,a,e,i,h)}),Cc=gt(function(t,e,i){var a=k|B;if(i.length){var h=Ze(i,Bn(Cc));a|=U}return We(e,a,t,i,h)});function Sc(t,e,i){e=i?n:e;var a=We(t,j,n,n,n,n,n,e);return a.placeholder=Sc.placeholder,a}function kc(t,e,i){e=i?n:e;var a=We(t,N,n,n,n,n,n,e);return a.placeholder=kc.placeholder,a}function Ac(t,e,i){var a,h,m,C,S,E,M=0,q=!1,W=!1,J=!0;if(typeof t!="function")throw new ve(v);e=Ce(e)||0,Lt(i)&&(q=!!i.leading,W="maxWait"in i,m=W?qt(Ce(i.maxWait)||0,e):m,J="trailing"in i?!!i.trailing:J);function tt(Dt){var Te=a,Xe=h;return a=h=n,M=Dt,C=t.apply(Xe,Te),C}function ot(Dt){return M=Dt,S=cr(yt,e),q?tt(Dt):C}function dt(Dt){var Te=Dt-E,Xe=Dt-M,Kc=e-Te;return W?jt(Kc,m-Xe):Kc}function st(Dt){var Te=Dt-E,Xe=Dt-M;return E===n||Te>=e||Te<0||W&&Xe>=m}function yt(){var Dt=ti();if(st(Dt))return wt(Dt);S=cr(yt,dt(Dt))}function wt(Dt){return S=n,J&&a?tt(Dt):(a=h=n,C)}function pe(){S!==n&&Ua(S),M=0,a=E=h=S=n}function ee(){return S===n?C:wt(ti())}function de(){var Dt=ti(),Te=st(Dt);if(a=arguments,h=this,E=Dt,Te){if(S===n)return ot(E);if(W)return Ua(S),S=cr(yt,e),tt(E)}return S===n&&(S=cr(yt,e)),C}return de.cancel=pe,de.flush=ee,de}var zd=gt(function(t,e){return da(t,1,e)}),Kd=gt(function(t,e,i){return da(t,Ce(e)||0,i)});function Gd(t){return We(t,R)}function ei(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new ve(v);var i=function(){var a=arguments,h=e?e.apply(this,a):a[0],m=i.cache;if(m.has(h))return m.get(h);var C=t.apply(this,a);return i.cache=m.set(h,C)||m,C};return i.cache=new(ei.Cache||Me),i}ei.Cache=Me;function ni(t){if(typeof t!="function")throw new ve(v);return function(){var e=arguments;switch(e.length){case 0:return!t.call(this);case 1:return!t.call(this,e[0]);case 2:return!t.call(this,e[0],e[1]);case 3:return!t.call(this,e[0],e[1],e[2])}return!t.apply(this,e)}}function Xd(t){return bc(2,t)}var $d=Ll(function(t,e){e=e.length==1&&ht(e[0])?Nt(e[0],fe(it())):Nt(Kt(e,1),fe(it()));var i=e.length;return gt(function(a){for(var h=-1,m=jt(a.length,i);++h<m;)a[h]=e[h].call(this,a[h]);return ue(t,this,a)})}),Ro=gt(function(t,e){var i=Ze(e,Bn(Ro));return We(t,U,n,e,i)}),xc=gt(function(t,e){var i=Ze(e,Bn(xc));return We(t,T,n,e,i)}),jd=He(function(t,e){return We(t,P,n,n,n,e)});function Jd(t,e){if(typeof t!="function")throw new ve(v);return e=e===n?e:pt(e),gt(t,e)}function Yd(t,e){if(typeof t!="function")throw new ve(v);return e=e==null?0:qt(pt(e),0),gt(function(i){var a=i[e],h=rn(i,0,e);return a&&Ve(h,a),ue(t,this,h)})}function Vd(t,e,i){var a=!0,h=!0;if(typeof t!="function")throw new ve(v);return Lt(i)&&(a="leading"in i?!!i.leading:a,h="trailing"in i?!!i.trailing:h),Ac(t,e,{leading:a,maxWait:e,trailing:h})}function Zd(t){return _c(t,1)}function Qd(t,e){return Ro(lo(e),t)}function tg(){if(!arguments.length)return[];var t=arguments[0];return ht(t)?t:[t]}function eg(t){return we(t,u)}function ng(t,e){return e=typeof e=="function"?e:n,we(t,u,e)}function rg(t){return we(t,g|u)}function ig(t,e){return e=typeof e=="function"?e:n,we(t,g|u,e)}function og(t,e){return e==null||pa(t,e,Ht(e))}function Ee(t,e){return t===e||t!==t&&e!==e}var sg=jr(to),ag=jr(function(t,e){return t>=e}),mn=wa(function(){return arguments}())?wa:function(t){return Bt(t)&&Et.call(t,"callee")&&!oa.call(t,"callee")},ht=I.isArray,cg=qs?fe(qs):yl;function re(t){return t!=null&&ri(t.length)&&!Ke(t)}function Ut(t){return Bt(t)&&re(t)}function ug(t){return t===!0||t===!1||Bt(t)&&Qt(t)==et}var on=Sh||qo,fg=Ws?fe(Ws):vl;function hg(t){return Bt(t)&&t.nodeType===1&&!ur(t)}function lg(t){if(t==null)return!0;if(re(t)&&(ht(t)||typeof t=="string"||typeof t.splice=="function"||on(t)||Un(t)||mn(t)))return!t.length;var e=Jt(t);if(e==Ot||e==Zt)return!t.size;if(ar(t))return!ro(t).length;for(var i in t)if(Et.call(t,i))return!1;return!0}function pg(t,e){return ir(t,e)}function dg(t,e,i){i=typeof i=="function"?i:n;var a=i?i(t,e):n;return a===n?ir(t,e,n,i):!!a}function Io(t){if(!Bt(t))return!1;var e=Qt(t);return e==at||e==Z||typeof t.message=="string"&&typeof t.name=="string"&&!ur(t)}function gg(t){return typeof t=="number"&&aa(t)}function Ke(t){if(!Lt(t))return!1;var e=Qt(t);return e==St||e==$t||e==z||e==Xn}function Ec(t){return typeof t=="number"&&t==pt(t)}function ri(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=ut}function Lt(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}function Bt(t){return t!=null&&typeof t=="object"}var Tc=Hs?fe(Hs):wl;function yg(t,e){return t===e||no(t,e,_o(e))}function vg(t,e,i){return i=typeof i=="function"?i:n,no(t,e,_o(e),i)}function mg(t){return Rc(t)&&t!=+t}function wg(t){if(np(t))throw new ft(f);return _a(t)}function _g(t){return t===null}function bg(t){return t==null}function Rc(t){return typeof t=="number"||Bt(t)&&Qt(t)==ke}function ur(t){if(!Bt(t)||Qt(t)!=ce)return!1;var e=Ir(t);if(e===null)return!0;var i=Et.call(e,"constructor")&&e.constructor;return typeof i=="function"&&i instanceof i&&xr.call(i)==vh}var Oo=zs?fe(zs):_l;function Cg(t){return Ec(t)&&t>=-ut&&t<=ut}var Ic=Ks?fe(Ks):bl;function ii(t){return typeof t=="string"||!ht(t)&&Bt(t)&&Qt(t)==Oe}function le(t){return typeof t=="symbol"||Bt(t)&&Qt(t)==Ne}var Un=Gs?fe(Gs):Cl;function Sg(t){return t===n}function kg(t){return Bt(t)&&Jt(t)==Pe}function Ag(t){return Bt(t)&&Qt(t)==jn}var xg=jr(io),Eg=jr(function(t,e){return t<=e});function Oc(t){if(!t)return[];if(re(t))return ii(t)?Ae(t):ne(t);if(Yn&&t[Yn])return oh(t[Yn]());var e=Jt(t),i=e==Ot?Gi:e==Zt?Sr:Dn;return i(t)}function Ge(t){if(!t)return t===0?t:0;if(t=Ce(t),t===xt||t===-xt){var e=t<0?-1:1;return e*Xt}return t===t?t:0}function pt(t){var e=Ge(t),i=e%1;return e===e?i?e-i:e:0}function Nc(t){return t?dn(pt(t),0,ae):0}function Ce(t){if(typeof t=="number")return t;if(le(t))return Ie;if(Lt(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=Lt(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=Vs(t);var i=cf.test(t);return i||ff.test(t)?Hf(t.slice(2),i?2:8):af.test(t)?Ie:+t}function Lc(t){return Be(t,ie(t))}function Tg(t){return t?dn(pt(t),-ut,ut):t===0?t:0}function kt(t){return t==null?"":he(t)}var Rg=Nn(function(t,e){if(ar(e)||re(e)){Be(e,Ht(e),t);return}for(var i in e)Et.call(e,i)&&er(t,i,e[i])}),Bc=Nn(function(t,e){Be(e,ie(e),t)}),oi=Nn(function(t,e,i,a){Be(e,ie(e),t,a)}),Ig=Nn(function(t,e,i,a){Be(e,Ht(e),t,a)}),Og=He(Vi);function Ng(t,e){var i=On(t);return e==null?i:la(i,e)}var Lg=gt(function(t,e){t=Tt(t);var i=-1,a=e.length,h=a>2?e[2]:n;for(h&&te(e[0],e[1],h)&&(a=1);++i<a;)for(var m=e[i],C=ie(m),S=-1,E=C.length;++S<E;){var M=C[S],q=t[M];(q===n||Ee(q,Tn[M])&&!Et.call(t,M))&&(t[M]=m[M])}return t}),Bg=gt(function(t){return t.push(n,Va),ue(Uc,n,t)});function Ug(t,e){return $s(t,it(e,3),Le)}function Dg(t,e){return $s(t,it(e,3),Qi)}function Pg(t,e){return t==null?t:Zi(t,it(e,3),ie)}function Fg(t,e){return t==null?t:va(t,it(e,3),ie)}function Mg(t,e){return t&&Le(t,it(e,3))}function qg(t,e){return t&&Qi(t,it(e,3))}function Wg(t){return t==null?[]:qr(t,Ht(t))}function Hg(t){return t==null?[]:qr(t,ie(t))}function No(t,e,i){var a=t==null?n:gn(t,e);return a===n?i:a}function zg(t,e){return t!=null&&tc(t,e,ll)}function Lo(t,e){return t!=null&&tc(t,e,pl)}var Kg=Xa(function(t,e,i){e!=null&&typeof e.toString!="function"&&(e=Er.call(e)),t[e]=i},Uo(oe)),Gg=Xa(function(t,e,i){e!=null&&typeof e.toString!="function"&&(e=Er.call(e)),Et.call(t,e)?t[e].push(i):t[e]=[i]},it),Xg=gt(rr);function Ht(t){return re(t)?fa(t):ro(t)}function ie(t){return re(t)?fa(t,!0):Sl(t)}function $g(t,e){var i={};return e=it(e,3),Le(t,function(a,h,m){qe(i,e(a,h,m),a)}),i}function jg(t,e){var i={};return e=it(e,3),Le(t,function(a,h,m){qe(i,h,e(a,h,m))}),i}var Jg=Nn(function(t,e,i){Wr(t,e,i)}),Uc=Nn(function(t,e,i,a){Wr(t,e,i,a)}),Yg=He(function(t,e){var i={};if(t==null)return i;var a=!1;e=Nt(e,function(m){return m=nn(m,t),a||(a=m.length>1),m}),Be(t,mo(t),i),a&&(i=we(i,g|l|u,Kl));for(var h=e.length;h--;)uo(i,e[h]);return i});function Vg(t,e){return Dc(t,ni(it(e)))}var Zg=He(function(t,e){return t==null?{}:Al(t,e)});function Dc(t,e){if(t==null)return{};var i=Nt(mo(t),function(a){return[a]});return e=it(e),Ea(t,i,function(a,h){return e(a,h[0])})}function Qg(t,e,i){e=nn(e,t);var a=-1,h=e.length;for(h||(h=1,t=n);++a<h;){var m=t==null?n:t[Ue(e[a])];m===n&&(a=h,m=i),t=Ke(m)?m.call(t):m}return t}function ty(t,e,i){return t==null?t:or(t,e,i)}function ey(t,e,i,a){return a=typeof a=="function"?a:n,t==null?t:or(t,e,i,a)}var Pc=Ja(Ht),Fc=Ja(ie);function ny(t,e,i){var a=ht(t),h=a||on(t)||Un(t);if(e=it(e,4),i==null){var m=t&&t.constructor;h?i=a?new m:[]:Lt(t)?i=Ke(m)?On(Ir(t)):{}:i={}}return(h?ye:Le)(t,function(C,S,E){return e(i,C,S,E)}),i}function ry(t,e){return t==null?!0:uo(t,e)}function iy(t,e,i){return t==null?t:Na(t,e,lo(i))}function oy(t,e,i,a){return a=typeof a=="function"?a:n,t==null?t:Na(t,e,lo(i),a)}function Dn(t){return t==null?[]:Ki(t,Ht(t))}function sy(t){return t==null?[]:Ki(t,ie(t))}function ay(t,e,i){return i===n&&(i=e,e=n),i!==n&&(i=Ce(i),i=i===i?i:0),e!==n&&(e=Ce(e),e=e===e?e:0),dn(Ce(t),e,i)}function cy(t,e,i){return e=Ge(e),i===n?(i=e,e=0):i=Ge(i),t=Ce(t),dl(t,e,i)}function uy(t,e,i){if(i&&typeof i!="boolean"&&te(t,e,i)&&(e=i=n),i===n&&(typeof e=="boolean"?(i=e,e=n):typeof t=="boolean"&&(i=t,t=n)),t===n&&e===n?(t=0,e=1):(t=Ge(t),e===n?(e=t,t=0):e=Ge(e)),t>e){var a=t;t=e,e=a}if(i||t%1||e%1){var h=ca();return jt(t+h*(e-t+Wf("1e-"+((h+"").length-1))),e)}return so(t,e)}var fy=Ln(function(t,e,i){return e=e.toLowerCase(),t+(i?Mc(e):e)});function Mc(t){return Bo(kt(t).toLowerCase())}function qc(t){return t=kt(t),t&&t.replace(lf,th).replace(Of,"")}function hy(t,e,i){t=kt(t),e=he(e);var a=t.length;i=i===n?a:dn(pt(i),0,a);var h=i;return i-=e.length,i>=0&&t.slice(i,h)==e}function ly(t){return t=kt(t),t&&Gu.test(t)?t.replace(vs,eh):t}function py(t){return t=kt(t),t&&Vu.test(t)?t.replace(Ti,"\\$&"):t}var dy=Ln(function(t,e,i){return t+(i?"-":"")+e.toLowerCase()}),gy=Ln(function(t,e,i){return t+(i?" ":"")+e.toLowerCase()}),yy=za("toLowerCase");function vy(t,e,i){t=kt(t),e=pt(e);var a=e?xn(t):0;if(!e||a>=e)return t;var h=(e-a)/2;return $r(Br(h),i)+t+$r(Lr(h),i)}function my(t,e,i){t=kt(t),e=pt(e);var a=e?xn(t):0;return e&&a<e?t+$r(e-a,i):t}function wy(t,e,i){t=kt(t),e=pt(e);var a=e?xn(t):0;return e&&a<e?$r(e-a,i)+t:t}function _y(t,e,i){return i||e==null?e=0:e&&(e=+e),Eh(kt(t).replace(Ri,""),e||0)}function by(t,e,i){return(i?te(t,e,i):e===n)?e=1:e=pt(e),ao(kt(t),e)}function Cy(){var t=arguments,e=kt(t[0]);return t.length<3?e:e.replace(t[1],t[2])}var Sy=Ln(function(t,e,i){return t+(i?"_":"")+e.toLowerCase()});function ky(t,e,i){return i&&typeof i!="number"&&te(t,e,i)&&(e=i=n),i=i===n?ae:i>>>0,i?(t=kt(t),t&&(typeof e=="string"||e!=null&&!Oo(e))&&(e=he(e),!e&&An(t))?rn(Ae(t),0,i):t.split(e,i)):[]}var Ay=Ln(function(t,e,i){return t+(i?" ":"")+Bo(e)});function xy(t,e,i){return t=kt(t),i=i==null?0:dn(pt(i),0,t.length),e=he(e),t.slice(i,i+e.length)==e}function Ey(t,e,i){var a=y.templateSettings;i&&te(t,e,i)&&(e=n),t=kt(t),e=oi({},e,a,Ya);var h=oi({},e.imports,a.imports,Ya),m=Ht(h),C=Ki(h,m),S,E,M=0,q=e.interpolate||mr,W="__p += '",J=Xi((e.escape||mr).source+"|"+q.source+"|"+(q===ms?sf:mr).source+"|"+(e.evaluate||mr).source+"|$","g"),tt="//# sourceURL="+(Et.call(e,"sourceURL")?(e.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Df+"]")+`
|
|
16
|
+
`;t.replace(J,function(st,yt,wt,pe,ee,de){return wt||(wt=pe),W+=t.slice(M,de).replace(pf,nh),yt&&(S=!0,W+=`' +
|
|
17
|
+
__e(`+yt+`) +
|
|
18
|
+
'`),ee&&(E=!0,W+=`';
|
|
19
|
+
`+ee+`;
|
|
20
|
+
__p += '`),wt&&(W+=`' +
|
|
21
|
+
((__t = (`+wt+`)) == null ? '' : __t) +
|
|
22
|
+
'`),M=de+st.length,st}),W+=`';
|
|
23
|
+
`;var ot=Et.call(e,"variable")&&e.variable;if(!ot)W=`with (obj) {
|
|
24
|
+
`+W+`
|
|
25
25
|
}
|
|
26
|
-
`;else if(
|
|
27
|
-
`+(
|
|
28
|
-
`)+"var __t, __p = ''"+(
|
|
26
|
+
`;else if(rf.test(ot))throw new ft(d);W=(E?W.replace(Wu,""):W).replace(Hu,"$1").replace(zu,"$1;"),W="function("+(ot||"obj")+`) {
|
|
27
|
+
`+(ot?"":`obj || (obj = {});
|
|
28
|
+
`)+"var __t, __p = ''"+(S?", __e = _.escape":"")+(E?`, __j = Array.prototype.join;
|
|
29
29
|
function print() { __p += __j.call(arguments, '') }
|
|
30
30
|
`:`;
|
|
31
|
-
`)+
|
|
32
|
-
}`;var pt=pu(function(){return _t(d,Y+"return "+N).apply(n,w)});if(pt.source=N,fs(pt))throw pt;return pt}function Kg(t){return St(t).toLowerCase()}function Gg(t){return St(t).toUpperCase()}function Hg(t,e,i){if(t=St(t),t&&(i||e===n))return So(t);if(!t||!(e=ce(e)))return t;var a=Ce(t),c=Ce(e),d=Co(a,c),w=ko(a,c)+1;return en(a,d,w).join("")}function $g(t,e,i){if(t=St(t),t&&(i||e===n))return t.slice(0,Eo(t)+1);if(!t||!(e=ce(e)))return t;var a=Ce(t),c=ko(a,Ce(e))+1;return en(a,0,c).join("")}function zg(t,e,i){if(t=St(t),t&&(i||e===n))return t.replace(fi,"");if(!t||!(e=ce(e)))return t;var a=Ce(t),c=Co(a,Ce(e));return en(a,c).join("")}function Xg(t,e){var i=U,a=X;if(Lt(e)){var c="separator"in e?e.separator:c;i="length"in e?lt(e.length):i,a="omission"in e?ce(e.omission):a}t=St(t);var d=t.length;if(mn(t)){var w=Ce(t);d=w.length}if(i>=d)return t;var C=i-_n(a);if(C<1)return a;var A=w?en(w,0,C).join(""):t.slice(0,C);if(c===n)return A+a;if(w&&(C+=A.length-C),hs(c)){if(t.slice(C).search(c)){var O,I=A;for(c.global||(c=Ti(c.source,St(Gs.exec(c))+"g")),c.lastIndex=0;O=c.exec(I);)var N=O.index;A=A.slice(0,N===n?C:N)}}else if(t.indexOf(ce(c),C)!=C){var K=A.lastIndexOf(c);K>-1&&(A=A.slice(0,K))}return A+a}function Jg(t){return t=St(t),t&&ic.test(t)?t.replace(qs,Cf):t}var Vg=En(function(t,e,i){return t+(i?" ":"")+e.toUpperCase()}),ds=da("toUpperCase");function lu(t,e,i){return t=St(t),e=i?n:e,e===n?mf(t)?Ef(t):cf(t):t.match(e)||[]}var pu=dt(function(t,e){try{return ae(t,n,e)}catch(i){return fs(i)?i:new ct(i)}}),Yg=We(function(t,e){return de(e,function(i){i=Ne(i),Me(t,i,us(t[i],t))}),t});function jg(t){var e=t==null?0:t.length,i=nt();return t=e?It(t,function(a){if(typeof a[1]!="function")throw new ge(m);return[i(a[0]),a[1]]}):[],dt(function(a){for(var c=-1;++c<e;){var d=t[c];if(ae(d[0],this,a))return ae(d[1],this,a)}})}function Zg(t){return Ch(ye(t,y))}function gs(t){return function(){return t}}function Qg(t,e){return t==null||t!==t?e:t}var tv=va(),ev=va(!0);function re(t){return t}function vs(t){return zo(typeof t=="function"?t:ye(t,y))}function nv(t){return Jo(ye(t,y))}function rv(t,e){return Vo(t,ye(e,y))}var iv=dt(function(t,e){return function(i){return Hn(i,t,e)}}),sv=dt(function(t,e){return function(i){return Hn(t,i,e)}});function ys(t,e,i){var a=Mt(e),c=kr(e,a);i==null&&!(Lt(e)&&(c.length||!a.length))&&(i=e,e=t,t=this,c=kr(e,Mt(e)));var d=!(Lt(i)&&"chain"in i)||!!i.chain,w=Ge(t);return de(c,function(C){var A=e[C];t[C]=A,w&&(t.prototype[C]=function(){var O=this.__chain__;if(d||O){var I=t(this.__wrapped__),N=I.__actions__=te(this.__actions__);return N.push({func:A,args:arguments,thisArg:t}),I.__chain__=O,I}return A.apply(t,Ve([this.value()],arguments))})}),t}function ov(){return Wt._===this&&(Wt._=Lf),this}function ms(){}function av(t){return t=lt(t),dt(function(e){return Yo(e,t)})}var uv=Vi(It),cv=Vi(yo),fv=Vi(wi);function du(t){return ns(t)?bi(Ne(t)):qh(t)}function hv(t){return function(e){return t==null?n:cn(t,e)}}var lv=ma(),pv=ma(!0);function _s(){return[]}function ws(){return!1}function dv(){return{}}function gv(){return""}function vv(){return!0}function yv(t,e){if(t=lt(t),t<1||t>ut)return[];var i=se,a=zt(t,se);e=nt(e),t-=se;for(var c=ki(a,e);++i<t;)e(i);return c}function mv(t){return ft(t)?It(t,Ne):fe(t)?[t]:te(Ba(St(t)))}function _v(t){var e=++Of;return St(t)+e}var wv=Or(function(t,e){return t+e},0),bv=Yi("ceil"),Sv=Or(function(t,e){return t/e},1),Cv=Yi("floor");function kv(t){return t&&t.length?Cr(t,re,Ui):n}function Av(t,e){return t&&t.length?Cr(t,nt(e,2),Ui):n}function Ev(t){return wo(t,re)}function Tv(t,e){return wo(t,nt(e,2))}function xv(t){return t&&t.length?Cr(t,re,Mi):n}function Rv(t,e){return t&&t.length?Cr(t,nt(e,2),Mi):n}var Ov=Or(function(t,e){return t*e},1),Iv=Yi("round"),Lv=Or(function(t,e){return t-e},0);function Nv(t){return t&&t.length?Ci(t,re):0}function Bv(t,e){return t&&t.length?Ci(t,nt(e,2)):0}return p.after=nd,p.ary=$a,p.assign=Gd,p.assignIn=su,p.assignInWith=Gr,p.assignWith=Hd,p.at=$d,p.before=za,p.bind=us,p.bindAll=Yg,p.bindKey=Xa,p.castArray=dd,p.chain=Ka,p.chunk=Cl,p.compact=kl,p.concat=Al,p.cond=jg,p.conforms=Zg,p.constant=gs,p.countBy=Np,p.create=zd,p.curry=Ja,p.curryRight=Va,p.debounce=Ya,p.defaults=Xd,p.defaultsDeep=Jd,p.defer=rd,p.delay=id,p.difference=El,p.differenceBy=Tl,p.differenceWith=xl,p.drop=Rl,p.dropRight=Ol,p.dropRightWhile=Il,p.dropWhile=Ll,p.fill=Nl,p.filter=Up,p.flatMap=Fp,p.flatMapDeep=Mp,p.flatMapDepth=qp,p.flatten=Fa,p.flattenDeep=Bl,p.flattenDepth=Ul,p.flip=sd,p.flow=tv,p.flowRight=ev,p.fromPairs=Dl,p.functions=eg,p.functionsIn=ng,p.groupBy=Wp,p.initial=Fl,p.intersection=Ml,p.intersectionBy=ql,p.intersectionWith=Wl,p.invert=ig,p.invertBy=sg,p.invokeMap=Gp,p.iteratee=vs,p.keyBy=Hp,p.keys=Mt,p.keysIn=ne,p.map=Pr,p.mapKeys=ag,p.mapValues=ug,p.matches=nv,p.matchesProperty=rv,p.memoize=Mr,p.merge=cg,p.mergeWith=ou,p.method=iv,p.methodOf=sv,p.mixin=ys,p.negate=qr,p.nthArg=av,p.omit=fg,p.omitBy=hg,p.once=od,p.orderBy=$p,p.over=uv,p.overArgs=ad,p.overEvery=cv,p.overSome=fv,p.partial=cs,p.partialRight=ja,p.partition=zp,p.pick=lg,p.pickBy=au,p.property=du,p.propertyOf=hv,p.pull=$l,p.pullAll=qa,p.pullAllBy=zl,p.pullAllWith=Xl,p.pullAt=Jl,p.range=lv,p.rangeRight=pv,p.rearg=ud,p.reject=Vp,p.remove=Vl,p.rest=cd,p.reverse=os,p.sampleSize=jp,p.set=dg,p.setWith=gg,p.shuffle=Zp,p.slice=Yl,p.sortBy=ed,p.sortedUniq=rp,p.sortedUniqBy=ip,p.split=Fg,p.spread=fd,p.tail=sp,p.take=op,p.takeRight=ap,p.takeRightWhile=up,p.takeWhile=cp,p.tap=kp,p.throttle=hd,p.thru=Dr,p.toArray=nu,p.toPairs=uu,p.toPairsIn=cu,p.toPath=mv,p.toPlainObject=iu,p.transform=vg,p.unary=ld,p.union=fp,p.unionBy=hp,p.unionWith=lp,p.uniq=pp,p.uniqBy=dp,p.uniqWith=gp,p.unset=yg,p.unzip=as,p.unzipWith=Wa,p.update=mg,p.updateWith=_g,p.values=Rn,p.valuesIn=wg,p.without=vp,p.words=lu,p.wrap=pd,p.xor=yp,p.xorBy=mp,p.xorWith=_p,p.zip=wp,p.zipObject=bp,p.zipObjectDeep=Sp,p.zipWith=Cp,p.entries=uu,p.entriesIn=cu,p.extend=su,p.extendWith=Gr,ys(p,p),p.add=wv,p.attempt=pu,p.camelCase=kg,p.capitalize=fu,p.ceil=bv,p.clamp=bg,p.clone=gd,p.cloneDeep=yd,p.cloneDeepWith=md,p.cloneWith=vd,p.conformsTo=_d,p.deburr=hu,p.defaultTo=Qg,p.divide=Sv,p.endsWith=Ag,p.eq=Ae,p.escape=Eg,p.escapeRegExp=Tg,p.every=Bp,p.find=Dp,p.findIndex=Da,p.findKey=Vd,p.findLast=Pp,p.findLastIndex=Pa,p.findLastKey=Yd,p.floor=Cv,p.forEach=Ga,p.forEachRight=Ha,p.forIn=jd,p.forInRight=Zd,p.forOwn=Qd,p.forOwnRight=tg,p.get=ls,p.gt=wd,p.gte=bd,p.has=rg,p.hasIn=ps,p.head=Ma,p.identity=re,p.includes=Kp,p.indexOf=Pl,p.inRange=Sg,p.invoke=og,p.isArguments=ln,p.isArray=ft,p.isArrayBuffer=Sd,p.isArrayLike=ee,p.isArrayLikeObject=Bt,p.isBoolean=Cd,p.isBuffer=nn,p.isDate=kd,p.isElement=Ad,p.isEmpty=Ed,p.isEqual=Td,p.isEqualWith=xd,p.isError=fs,p.isFinite=Rd,p.isFunction=Ge,p.isInteger=Za,p.isLength=Wr,p.isMap=Qa,p.isMatch=Od,p.isMatchWith=Id,p.isNaN=Ld,p.isNative=Nd,p.isNil=Ud,p.isNull=Bd,p.isNumber=tu,p.isObject=Lt,p.isObjectLike=Nt,p.isPlainObject=Yn,p.isRegExp=hs,p.isSafeInteger=Dd,p.isSet=eu,p.isString=Kr,p.isSymbol=fe,p.isTypedArray=xn,p.isUndefined=Pd,p.isWeakMap=Fd,p.isWeakSet=Md,p.join=Kl,p.kebabCase=xg,p.last=_e,p.lastIndexOf=Gl,p.lowerCase=Rg,p.lowerFirst=Og,p.lt=qd,p.lte=Wd,p.max=kv,p.maxBy=Av,p.mean=Ev,p.meanBy=Tv,p.min=xv,p.minBy=Rv,p.stubArray=_s,p.stubFalse=ws,p.stubObject=dv,p.stubString=gv,p.stubTrue=vv,p.multiply=Ov,p.nth=Hl,p.noConflict=ov,p.noop=ms,p.now=Fr,p.pad=Ig,p.padEnd=Lg,p.padStart=Ng,p.parseInt=Bg,p.random=Cg,p.reduce=Xp,p.reduceRight=Jp,p.repeat=Ug,p.replace=Dg,p.result=pg,p.round=Iv,p.runInContext=k,p.sample=Yp,p.size=Qp,p.snakeCase=Pg,p.some=td,p.sortedIndex=jl,p.sortedIndexBy=Zl,p.sortedIndexOf=Ql,p.sortedLastIndex=tp,p.sortedLastIndexBy=ep,p.sortedLastIndexOf=np,p.startCase=Mg,p.startsWith=qg,p.subtract=Lv,p.sum=Nv,p.sumBy=Bv,p.template=Wg,p.times=yv,p.toFinite=He,p.toInteger=lt,p.toLength=ru,p.toLower=Kg,p.toNumber=we,p.toSafeInteger=Kd,p.toString=St,p.toUpper=Gg,p.trim=Hg,p.trimEnd=$g,p.trimStart=zg,p.truncate=Xg,p.unescape=Jg,p.uniqueId=_v,p.upperCase=Vg,p.upperFirst=ds,p.each=Ga,p.eachRight=Ha,p.first=Ma,ys(p,function(){var t={};return Ie(p,function(e,i){Ct.call(p.prototype,i)||(t[i]=e)}),t}(),{chain:!1}),p.VERSION=o,de(["bind","bindKey","curry","curryRight","partial","partialRight"],function(t){p[t].placeholder=p}),de(["drop","take"],function(t,e){vt.prototype[t]=function(i){i=i===n?1:Ft(lt(i),0);var a=this.__filtered__&&!e?new vt(this):this.clone();return a.__filtered__?a.__takeCount__=zt(i,a.__takeCount__):a.__views__.push({size:zt(i,se),type:t+(a.__dir__<0?"Right":"")}),a},vt.prototype[t+"Right"]=function(i){return this.reverse()[t](i).reverse()}}),de(["filter","map","takeWhile"],function(t,e){var i=e+1,a=i==B||i==At;vt.prototype[t]=function(c){var d=this.clone();return d.__iteratees__.push({iteratee:nt(c,3),type:i}),d.__filtered__=d.__filtered__||a,d}}),de(["head","last"],function(t,e){var i="take"+(e?"Right":"");vt.prototype[t]=function(){return this[i](1).value()[0]}}),de(["initial","tail"],function(t,e){var i="drop"+(e?"":"Right");vt.prototype[t]=function(){return this.__filtered__?new vt(this):this[i](1)}}),vt.prototype.compact=function(){return this.filter(re)},vt.prototype.find=function(t){return this.filter(t).head()},vt.prototype.findLast=function(t){return this.reverse().find(t)},vt.prototype.invokeMap=dt(function(t,e){return typeof t=="function"?new vt(this):this.map(function(i){return Hn(i,t,e)})}),vt.prototype.reject=function(t){return this.filter(qr(nt(t)))},vt.prototype.slice=function(t,e){t=lt(t);var i=this;return i.__filtered__&&(t>0||e<0)?new vt(i):(t<0?i=i.takeRight(-t):t&&(i=i.drop(t)),e!==n&&(e=lt(e),i=e<0?i.dropRight(-e):i.take(e-t)),i)},vt.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},vt.prototype.toArray=function(){return this.take(se)},Ie(vt.prototype,function(t,e){var i=/^(?:filter|find|map|reject)|While$/.test(e),a=/^(?:head|last)$/.test(e),c=p[a?"take"+(e=="last"?"Right":""):e],d=a||/^find/.test(e);c&&(p.prototype[e]=function(){var w=this.__wrapped__,C=a?[1]:arguments,A=w instanceof vt,O=C[0],I=A||ft(w),N=function(gt){var yt=c.apply(p,Ve([gt],C));return a&&K?yt[0]:yt};I&&i&&typeof O=="function"&&O.length!=1&&(A=I=!1);var K=this.__chain__,Y=!!this.__actions__.length,rt=d&&!K,pt=A&&!Y;if(!d&&I){w=pt?w:new vt(this);var it=t.apply(w,C);return it.__actions__.push({func:Dr,args:[N],thisArg:n}),new ve(it,K)}return rt&&pt?t.apply(this,C):(it=this.thru(N),rt?a?it.value()[0]:it.value():it)})}),de(["pop","push","shift","sort","splice","unshift"],function(t){var e=ur[t],i=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",a=/^(?:pop|shift)$/.test(t);p.prototype[t]=function(){var c=arguments;if(a&&!this.__chain__){var d=this.value();return e.apply(ft(d)?d:[],c)}return this[i](function(w){return e.apply(ft(w)?w:[],c)})}}),Ie(vt.prototype,function(t,e){var i=p[e];if(i){var a=i.name+"";Ct.call(Cn,a)||(Cn[a]=[]),Cn[a].push({name:e,func:i})}}),Cn[Rr(n,W).name]=[{name:"wrapper",func:n}],vt.prototype.clone=Jf,vt.prototype.reverse=Vf,vt.prototype.value=Yf,p.prototype.at=Ap,p.prototype.chain=Ep,p.prototype.commit=Tp,p.prototype.next=xp,p.prototype.plant=Op,p.prototype.reverse=Ip,p.prototype.toJSON=p.prototype.valueOf=p.prototype.value=Lp,p.prototype.first=p.prototype.head,Pn&&(p.prototype[Pn]=Rp),p},wn=Tf();rn?((rn.exports=wn)._=wn,vi._=wn):Wt._=wn}).call(jn)})(Zr,Zr.exports);var Hv=Zr.exports;const $v={isNewStack:!1,forceNew:!0,reconnectionDelay:1e4,reconnectionDelayMax:1e4,maxReconnectAttempts:5,timeout:1e4,keepAliveTimeout:6e4,idleInterval:6e4*5,protocol:"https",transports:["websocket"],upgrade:!1,serverFetchStrategy:"static",serverType:0,useLogger:!0,loggerServer:"http://socketlog.voicenter.co",loggerConfig:{logToConsole:!0,overloadGlobalConsole:!1,namespace:"events-sdk",socketEmitInterval:1e4},loggerConnectOptions:{reconnection:!0,reconnectionDelay:5e3,reconnectionAttempts:10,perMessageDeflate:void 0,upgrade:!1,transports:["websocket"],debug:!1}};function zv(){return function s(r,n,o){function u(g,S){if(!n[g]){if(!r[g]){var v=typeof require=="function"&&require;if(!S&&v)return v(g,!0);if(f)return f(g,!0);throw new Error("Cannot find module '"+g+"'")}var _=n[g]={exports:{}};r[g][0].call(_.exports,function(y){var l=r[g][1][y];return u(l||y)},_,_.exports,s,r,n,o)}return n[g].exports}for(var f=typeof require=="function"&&require,m=0;m<o.length;m++)u(o[m]);return u}({1:[function(s,r){r.exports=s("./lib/")},{"./lib/":2}],2:[function(s,r,n){function o(v,_){typeof v=="object"&&(_=v,v=void 0),_=_||{};var y,l=u(v),h=l.source,b=l.id;return _.forceNew||_["force new connection"]||_.multiplex===!1?(g("ignoring socket cache for %s",h),y=m(h,_)):(S[b]||(g("new io instance for %s",h),S[b]=m(h,_)),y=S[b]),y.socket(l.path)}var u=s("./url"),f=s("socket.io-parser"),m=s("./manager"),g=s("debug")("socket.io-client");r.exports=n=o;var S=n.managers={};n.protocol=f.protocol,n.connect=o,n.Manager=s("./manager"),n.Socket=s("./socket")},{"./manager":3,"./socket":5,"./url":6,debug:10,"socket.io-parser":44}],3:[function(s,r){function n(l,h){return this instanceof n?(l&&typeof l=="object"&&(h=l,l=void 0),h=h||{},h.path=h.path||"/socket.io",this.nsps={},this.subs=[],this.opts=h,this.reconnection(h.reconnection!==!1),this.reconnectionAttempts(h.reconnectionAttempts||1/0),this.reconnectionDelay(h.reconnectionDelay||1e3),this.reconnectionDelayMax(h.reconnectionDelayMax||5e3),this.randomizationFactor(h.randomizationFactor||.5),this.backoff=new y({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(h.timeout==null?2e4:h.timeout),this.readyState="closed",this.uri=l,this.connected=[],this.encoding=!1,this.packetBuffer=[],this.encoder=new m.Encoder,this.decoder=new m.Decoder,this.autoConnect=h.autoConnect!==!1,void(this.autoConnect&&this.open())):new n(l,h)}var o=(s("./url"),s("engine.io-client")),u=s("./socket"),f=s("component-emitter"),m=s("socket.io-parser"),g=s("./on"),S=s("component-bind"),v=(s("object-component"),s("debug")("socket.io-client:manager")),_=s("indexof"),y=s("backo2");r.exports=n,n.prototype.emitAll=function(){this.emit.apply(this,arguments);for(var l in this.nsps)this.nsps[l].emit.apply(this.nsps[l],arguments)},n.prototype.updateSocketIds=function(){for(var l in this.nsps)this.nsps[l].id=this.engine.id},f(n.prototype),n.prototype.reconnection=function(l){return arguments.length?(this._reconnection=!!l,this):this._reconnection},n.prototype.reconnectionAttempts=function(l){return arguments.length?(this._reconnectionAttempts=l,this):this._reconnectionAttempts},n.prototype.reconnectionDelay=function(l){return arguments.length?(this._reconnectionDelay=l,this.backoff&&this.backoff.setMin(l),this):this._reconnectionDelay},n.prototype.randomizationFactor=function(l){return arguments.length?(this._randomizationFactor=l,this.backoff&&this.backoff.setJitter(l),this):this._randomizationFactor},n.prototype.reconnectionDelayMax=function(l){return arguments.length?(this._reconnectionDelayMax=l,this.backoff&&this.backoff.setMax(l),this):this._reconnectionDelayMax},n.prototype.timeout=function(l){return arguments.length?(this._timeout=l,this):this._timeout},n.prototype.maybeReconnectOnOpen=function(){!this.reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()},n.prototype.open=n.prototype.connect=function(l){if(v("readyState %s",this.readyState),~this.readyState.indexOf("open"))return this;v("opening %s",this.uri),this.engine=o(this.uri,this.opts);var h=this.engine,b=this;this.readyState="opening",this.skipReconnect=!1;var E=g(h,"open",function(){b.onopen(),l&&l()}),x=g(h,"error",function(V){if(v("connect_error"),b.cleanup(),b.readyState="closed",b.emitAll("connect_error",V),l){var ot=new Error("Connection error");ot.data=V,l(ot)}else b.maybeReconnectOnOpen()});if(this._timeout!==!1){var W=this._timeout;v("connect attempt will timeout after %d",W);var st=setTimeout(function(){v("connect attempt timed out after %d",W),E.destroy(),h.close(),h.emit("error","timeout"),b.emitAll("connect_timeout",W)},W);this.subs.push({destroy:function(){clearTimeout(st)}})}return this.subs.push(E),this.subs.push(x),this},n.prototype.onopen=function(){v("open"),this.cleanup(),this.readyState="open",this.emit("open");var l=this.engine;this.subs.push(g(l,"data",S(this,"ondata"))),this.subs.push(g(this.decoder,"decoded",S(this,"ondecoded"))),this.subs.push(g(l,"error",S(this,"onerror"))),this.subs.push(g(l,"close",S(this,"onclose")))},n.prototype.ondata=function(l){this.decoder.add(l)},n.prototype.ondecoded=function(l){this.emit("packet",l)},n.prototype.onerror=function(l){v("error",l),this.emitAll("error",l)},n.prototype.socket=function(l){var h=this.nsps[l];if(!h){h=new u(this,l),this.nsps[l]=h;var b=this;h.on("connect",function(){h.id=b.engine.id,~_(b.connected,h)||b.connected.push(h)})}return h},n.prototype.destroy=function(l){var h=_(this.connected,l);~h&&this.connected.splice(h,1),this.connected.length||this.close()},n.prototype.packet=function(l){v("writing packet %j",l);var h=this;h.encoding?h.packetBuffer.push(l):(h.encoding=!0,this.encoder.encode(l,function(b){for(var E=0;E<b.length;E++)h.engine.write(b[E]);h.encoding=!1,h.processPacketQueue()}))},n.prototype.processPacketQueue=function(){if(this.packetBuffer.length>0&&!this.encoding){var l=this.packetBuffer.shift();this.packet(l)}},n.prototype.cleanup=function(){for(var l;l=this.subs.shift();)l.destroy();this.packetBuffer=[],this.encoding=!1,this.decoder.destroy()},n.prototype.close=n.prototype.disconnect=function(){this.skipReconnect=!0,this.backoff.reset(),this.readyState="closed",this.engine&&this.engine.close()},n.prototype.onclose=function(l){v("close"),this.cleanup(),this.backoff.reset(),this.readyState="closed",this.emit("close",l),this._reconnection&&!this.skipReconnect&&this.reconnect()},n.prototype.reconnect=function(){if(this.reconnecting||this.skipReconnect)return this;var l=this;if(this.backoff.attempts>=this._reconnectionAttempts)v("reconnect failed"),this.backoff.reset(),this.emitAll("reconnect_failed"),this.reconnecting=!1;else{var h=this.backoff.duration();v("will wait %dms before reconnect attempt",h),this.reconnecting=!0;var b=setTimeout(function(){l.skipReconnect||(v("attempting reconnect"),l.emitAll("reconnect_attempt",l.backoff.attempts),l.emitAll("reconnecting",l.backoff.attempts),l.skipReconnect||l.open(function(E){E?(v("reconnect attempt error"),l.reconnecting=!1,l.reconnect(),l.emitAll("reconnect_error",E.data)):(v("reconnect success"),l.onreconnect())}))},h);this.subs.push({destroy:function(){clearTimeout(b)}})}},n.prototype.onreconnect=function(){var l=this.backoff.attempts;this.reconnecting=!1,this.backoff.reset(),this.updateSocketIds(),this.emitAll("reconnect",l)}},{"./on":4,"./socket":5,"./url":6,backo2:7,"component-bind":8,"component-emitter":9,debug:10,"engine.io-client":11,indexof:40,"object-component":41,"socket.io-parser":44}],4:[function(s,r){function n(o,u,f){return o.on(u,f),{destroy:function(){o.removeListener(u,f)}}}r.exports=n},{}],5:[function(s,r,n){function o(h,b){this.io=h,this.nsp=b,this.json=this,this.ids=0,this.acks={},this.io.autoConnect&&this.open(),this.receiveBuffer=[],this.sendBuffer=[],this.connected=!1,this.disconnected=!0}var u=s("socket.io-parser"),f=s("component-emitter"),m=s("to-array"),g=s("./on"),S=s("component-bind"),v=s("debug")("socket.io-client:socket"),_=s("has-binary");r.exports=o;var y={connect:1,connect_error:1,connect_timeout:1,disconnect:1,error:1,reconnect:1,reconnect_attempt:1,reconnect_failed:1,reconnect_error:1,reconnecting:1},l=f.prototype.emit;f(o.prototype),o.prototype.subEvents=function(){if(!this.subs){var h=this.io;this.subs=[g(h,"open",S(this,"onopen")),g(h,"packet",S(this,"onpacket")),g(h,"close",S(this,"onclose"))]}},o.prototype.open=o.prototype.connect=function(){return this.connected?this:(this.subEvents(),this.io.open(),this.io.readyState=="open"&&this.onopen(),this)},o.prototype.send=function(){var h=m(arguments);return h.unshift("message"),this.emit.apply(this,h),this},o.prototype.emit=function(h){if(y.hasOwnProperty(h))return l.apply(this,arguments),this;var b=m(arguments),E=u.EVENT;_(b)&&(E=u.BINARY_EVENT);var x={type:E,data:b};return typeof b[b.length-1]=="function"&&(v("emitting packet with ack id %d",this.ids),this.acks[this.ids]=b.pop(),x.id=this.ids++),this.connected?this.packet(x):this.sendBuffer.push(x),this},o.prototype.packet=function(h){h.nsp=this.nsp,this.io.packet(h)},o.prototype.onopen=function(){v("transport is open - connecting"),this.nsp!="/"&&this.packet({type:u.CONNECT})},o.prototype.onclose=function(h){v("close (%s)",h),this.connected=!1,this.disconnected=!0,delete this.id,this.emit("disconnect",h)},o.prototype.onpacket=function(h){if(h.nsp==this.nsp)switch(h.type){case u.CONNECT:this.onconnect();break;case u.EVENT:this.onevent(h);break;case u.BINARY_EVENT:this.onevent(h);break;case u.ACK:this.onack(h);break;case u.BINARY_ACK:this.onack(h);break;case u.DISCONNECT:this.ondisconnect();break;case u.ERROR:this.emit("error",h.data)}},o.prototype.onevent=function(h){var b=h.data||[];v("emitting event %j",b),h.id!=null&&(v("attaching ack callback to event"),b.push(this.ack(h.id))),this.connected?l.apply(this,b):this.receiveBuffer.push(b)},o.prototype.ack=function(h){var b=this,E=!1;return function(){if(!E){E=!0;var x=m(arguments);v("sending ack %j",x);var W=_(x)?u.BINARY_ACK:u.ACK;b.packet({type:W,id:h,data:x})}}},o.prototype.onack=function(h){v("calling ack %s with %j",h.id,h.data);var b=this.acks[h.id];b.apply(this,h.data),delete this.acks[h.id]},o.prototype.onconnect=function(){this.connected=!0,this.disconnected=!1,this.emit("connect"),this.emitBuffered()},o.prototype.emitBuffered=function(){var h;for(h=0;h<this.receiveBuffer.length;h++)l.apply(this,this.receiveBuffer[h]);for(this.receiveBuffer=[],h=0;h<this.sendBuffer.length;h++)this.packet(this.sendBuffer[h]);this.sendBuffer=[]},o.prototype.ondisconnect=function(){v("server disconnect (%s)",this.nsp),this.destroy(),this.onclose("io server disconnect")},o.prototype.destroy=function(){if(this.subs){for(var h=0;h<this.subs.length;h++)this.subs[h].destroy();this.subs=null}this.io.destroy(this)},o.prototype.close=o.prototype.disconnect=function(){return this.connected&&(v("performing disconnect (%s)",this.nsp),this.packet({type:u.DISCONNECT})),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}},{"./on":4,"component-bind":8,"component-emitter":9,debug:10,"has-binary":36,"socket.io-parser":44,"to-array":48}],6:[function(s,r){(function(n){function o(m,v){var S=m,v=v||n.location;return m==null&&(m=v.protocol+"//"+v.host),typeof m=="string"&&(m.charAt(0)=="/"&&(m=m.charAt(1)=="/"?v.protocol+m:v.hostname+m),/^(https?|wss?):\/\//.test(m)||(f("protocol-less url %s",m),m=typeof v<"u"?v.protocol+"//"+m:"https://"+m),f("parse %s",m),S=u(m)),S.port||(/^(http|ws)$/.test(S.protocol)?S.port="80":/^(http|ws)s$/.test(S.protocol)&&(S.port="443")),S.path=S.path||"/",S.id=S.protocol+"://"+S.host+":"+S.port,S.href=S.protocol+"://"+S.host+(v&&v.port==S.port?"":":"+S.port),S}var u=s("parseuri"),f=s("debug")("socket.io-client:url");r.exports=o}).call(this,typeof self<"u"?self:typeof window<"u"?window:{})},{debug:10,parseuri:42}],7:[function(s,r){function n(o){o=o||{},this.ms=o.min||100,this.max=o.max||1e4,this.factor=o.factor||2,this.jitter=o.jitter>0&&o.jitter<=1?o.jitter:0,this.attempts=0}r.exports=n,n.prototype.duration=function(){var o=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var u=Math.random(),f=Math.floor(u*this.jitter*o);o=1&Math.floor(10*u)?o+f:o-f}return 0|Math.min(o,this.max)},n.prototype.reset=function(){this.attempts=0},n.prototype.setMin=function(o){this.ms=o},n.prototype.setMax=function(o){this.max=o},n.prototype.setJitter=function(o){this.jitter=o}},{}],8:[function(s,r){var n=[].slice;r.exports=function(o,u){if(typeof u=="string"&&(u=o[u]),typeof u!="function")throw new Error("bind() requires a function");var f=n.call(arguments,2);return function(){return u.apply(o,f.concat(n.call(arguments)))}}},{}],9:[function(s,r){function n(u){return u?o(u):void 0}function o(u){for(var f in n.prototype)u[f]=n.prototype[f];return u}r.exports=n,n.prototype.on=n.prototype.addEventListener=function(u,f){return this._callbacks=this._callbacks||{},(this._callbacks[u]=this._callbacks[u]||[]).push(f),this},n.prototype.once=function(u,f){function m(){g.off(u,m),f.apply(this,arguments)}var g=this;return this._callbacks=this._callbacks||{},m.fn=f,this.on(u,m),this},n.prototype.off=n.prototype.removeListener=n.prototype.removeAllListeners=n.prototype.removeEventListener=function(u,f){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var m=this._callbacks[u];if(!m)return this;if(arguments.length==1)return delete this._callbacks[u],this;for(var g,S=0;S<m.length;S++)if(g=m[S],g===f||g.fn===f){m.splice(S,1);break}return this},n.prototype.emit=function(u){this._callbacks=this._callbacks||{};var f=[].slice.call(arguments,1),m=this._callbacks[u];if(m){m=m.slice(0);for(var g=0,S=m.length;S>g;++g)m[g].apply(this,f)}return this},n.prototype.listeners=function(u){return this._callbacks=this._callbacks||{},this._callbacks[u]||[]},n.prototype.hasListeners=function(u){return!!this.listeners(u).length}},{}],10:[function(s,r){function n(u){return n.enabled(u)?function(f){f=o(f);var m=new Date,g=m-(n[u]||m);n[u]=m,f=u+" "+f+" +"+n.humanize(g),window.console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}:function(){}}function o(u){return u instanceof Error?u.stack||u.message:u}r.exports=n,n.names=[],n.skips=[],n.enable=function(u){try{localStorage.debug=u}catch{}for(var f=(u||"").split(/[\s,]+/),m=f.length,g=0;m>g;g++)u=f[g].replace("*",".*?"),u[0]==="-"?n.skips.push(new RegExp("^"+u.substr(1)+"$")):n.names.push(new RegExp("^"+u+"$"))},n.disable=function(){n.enable("")},n.humanize=function(u){var f=1e3,m=6e4,g=60*m;return u>=g?(u/g).toFixed(1)+"h":u>=m?(u/m).toFixed(1)+"m":u>=f?(u/f|0)+"s":u+"ms"},n.enabled=function(u){for(var f=0,m=n.skips.length;m>f;f++)if(n.skips[f].test(u))return!1;for(var f=0,m=n.names.length;m>f;f++)if(n.names[f].test(u))return!0;return!1};try{window.localStorage&&n.enable(localStorage.debug)}catch{}},{}],11:[function(s,r){r.exports=s("./lib/")},{"./lib/":12}],12:[function(s,r){r.exports=s("./socket"),r.exports.parser=s("engine.io-parser")},{"./socket":13,"engine.io-parser":25}],13:[function(s,r){(function(n){function o(h,b){if(!(this instanceof o))return new o(h,b);if(b=b||{},h&&typeof h=="object"&&(b=h,h=null),h&&(h=_(h),b.host=h.host,b.secure=h.protocol=="https"||h.protocol=="wss",b.port=h.port,h.query&&(b.query=h.query)),this.secure=b.secure!=null?b.secure:n.location&&location.protocol=="https:",b.host){var E=b.host.split(":");b.hostname=E.shift(),E.length?b.port=E.pop():b.port||(b.port=this.secure?"443":"80")}this.agent=b.agent||!1,this.hostname=b.hostname||(n.location?location.hostname:"localhost"),this.port=b.port||(n.location&&location.port?location.port:this.secure?443:80),this.query=b.query||{},typeof this.query=="string"&&(this.query=l.decode(this.query)),this.upgrade=b.upgrade!==!1,this.path=(b.path||"/engine.io").replace(/\/$/,"")+"/",this.forceJSONP=!!b.forceJSONP,this.jsonp=b.jsonp!==!1,this.forceBase64=!!b.forceBase64,this.enablesXDR=!!b.enablesXDR,this.timestampParam=b.timestampParam||"t",this.timestampRequests=b.timestampRequests,this.transports=b.transports||["polling","websocket"],this.readyState="",this.writeBuffer=[],this.callbackBuffer=[],this.policyPort=b.policyPort||843,this.rememberUpgrade=b.rememberUpgrade||!1,this.binaryType=null,this.onlyBinaryUpgrades=b.onlyBinaryUpgrades,this.pfx=b.pfx||null,this.key=b.key||null,this.passphrase=b.passphrase||null,this.cert=b.cert||null,this.ca=b.ca||null,this.ciphers=b.ciphers||null,this.rejectUnauthorized=b.rejectUnauthorized||null,this.open()}function u(h){var b={};for(var E in h)h.hasOwnProperty(E)&&(b[E]=h[E]);return b}var f=s("./transports"),m=s("component-emitter"),g=s("debug")("engine.io-client:socket"),S=s("indexof"),v=s("engine.io-parser"),_=s("parseuri"),y=s("parsejson"),l=s("parseqs");r.exports=o,o.priorWebsocketSuccess=!1,m(o.prototype),o.protocol=v.protocol,o.Socket=o,o.Transport=s("./transport"),o.transports=s("./transports"),o.parser=s("engine.io-parser"),o.prototype.createTransport=function(h){g('creating transport "%s"',h);var b=u(this.query);b.EIO=v.protocol,b.transport=h,this.id&&(b.sid=this.id);var E=new f[h]({agent:this.agent,hostname:this.hostname,port:this.port,secure:this.secure,path:this.path,query:b,forceJSONP:this.forceJSONP,jsonp:this.jsonp,forceBase64:this.forceBase64,enablesXDR:this.enablesXDR,timestampRequests:this.timestampRequests,timestampParam:this.timestampParam,policyPort:this.policyPort,socket:this,pfx:this.pfx,key:this.key,passphrase:this.passphrase,cert:this.cert,ca:this.ca,ciphers:this.ciphers,rejectUnauthorized:this.rejectUnauthorized});return E},o.prototype.open=function(){var b;if(this.rememberUpgrade&&o.priorWebsocketSuccess&&this.transports.indexOf("websocket")!=-1)b="websocket";else{if(this.transports.length==0){var h=this;return void setTimeout(function(){h.emit("error","No transports available")},0)}b=this.transports[0]}this.readyState="opening";var b;try{b=this.createTransport(b)}catch{return this.transports.shift(),void this.open()}b.open(),this.setTransport(b)},o.prototype.setTransport=function(h){g("setting transport %s",h.name);var b=this;this.transport&&(g("clearing existing transport %s",this.transport.name),this.transport.removeAllListeners()),this.transport=h,h.on("drain",function(){b.onDrain()}).on("packet",function(E){b.onPacket(E)}).on("error",function(E){b.onError(E)}).on("close",function(){b.onClose("transport close")})},o.prototype.probe=function(h){function b(){if(M.onlyBinaryUpgrades){var G=!this.supportsBinary&&M.transport.supportsBinary;D=D||G}D||(g('probe transport "%s" opened',h),H.send([{type:"ping",data:"probe"}]),H.once("packet",function(L){if(!D)if(L.type=="pong"&&L.data=="probe"){if(g('probe transport "%s" pong',h),M.upgrading=!0,M.emit("upgrading",H),!H)return;o.priorWebsocketSuccess=H.name=="websocket",g('pausing current transport "%s"',M.transport.name),M.transport.pause(function(){D||M.readyState!="closed"&&(g("changing transport and sending upgrade packet"),ot(),M.setTransport(H),H.send([{type:"upgrade"}]),M.emit("upgrade",H),H=null,M.upgrading=!1,M.flush())})}else{g('probe transport "%s" failed',h);var U=new Error("probe error");U.transport=H.name,M.emit("upgradeError",U)}}))}function E(){D||(D=!0,ot(),H.close(),H=null)}function x(G){var L=new Error("probe error: "+G);L.transport=H.name,E(),g('probe transport "%s" failed because of error: %s',h,G),M.emit("upgradeError",L)}function W(){x("transport closed")}function st(){x("socket closed")}function V(G){H&&G.name!=H.name&&(g('"%s" works - aborting "%s"',G.name,H.name),E())}function ot(){H.removeListener("open",b),H.removeListener("error",x),H.removeListener("close",W),M.removeListener("close",st),M.removeListener("upgrading",V)}g('probing transport "%s"',h);var H=this.createTransport(h,{probe:1}),D=!1,M=this;o.priorWebsocketSuccess=!1,H.once("open",b),H.once("error",x),H.once("close",W),this.once("close",st),this.once("upgrading",V),H.open()},o.prototype.onOpen=function(){if(g("socket open"),this.readyState="open",o.priorWebsocketSuccess=this.transport.name=="websocket",this.emit("open"),this.flush(),this.readyState=="open"&&this.upgrade&&this.transport.pause){g("starting upgrade probes");for(var h=0,b=this.upgrades.length;b>h;h++)this.probe(this.upgrades[h])}},o.prototype.onPacket=function(h){if(this.readyState=="opening"||this.readyState=="open")switch(g('socket receive: type "%s", data "%s"',h.type,h.data),this.emit("packet",h),this.emit("heartbeat"),h.type){case"open":this.onHandshake(y(h.data));break;case"pong":this.setPing();break;case"error":var b=new Error("server error");b.code=h.data,this.emit("error",b);break;case"message":this.emit("data",h.data),this.emit("message",h.data)}else g('packet received with socket readyState "%s"',this.readyState)},o.prototype.onHandshake=function(h){this.emit("handshake",h),this.id=h.sid,this.transport.query.sid=h.sid,this.upgrades=this.filterUpgrades(h.upgrades),this.pingInterval=h.pingInterval,this.pingTimeout=h.pingTimeout,this.onOpen(),this.readyState!="closed"&&(this.setPing(),this.removeListener("heartbeat",this.onHeartbeat),this.on("heartbeat",this.onHeartbeat))},o.prototype.onHeartbeat=function(h){clearTimeout(this.pingTimeoutTimer);var b=this;b.pingTimeoutTimer=setTimeout(function(){b.readyState!="closed"&&b.onClose("ping timeout")},h||b.pingInterval+b.pingTimeout)},o.prototype.setPing=function(){var h=this;clearTimeout(h.pingIntervalTimer),h.pingIntervalTimer=setTimeout(function(){g("writing ping packet - expecting pong within %sms",h.pingTimeout),h.ping(),h.onHeartbeat(h.pingTimeout)},h.pingInterval)},o.prototype.ping=function(){this.sendPacket("ping")},o.prototype.onDrain=function(){for(var h=0;h<this.prevBufferLen;h++)this.callbackBuffer[h]&&this.callbackBuffer[h]();this.writeBuffer.splice(0,this.prevBufferLen),this.callbackBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,this.writeBuffer.length==0?this.emit("drain"):this.flush()},o.prototype.flush=function(){this.readyState!="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length&&(g("flushing %d packets in socket",this.writeBuffer.length),this.transport.send(this.writeBuffer),this.prevBufferLen=this.writeBuffer.length,this.emit("flush"))},o.prototype.write=o.prototype.send=function(h,b){return this.sendPacket("message",h,b),this},o.prototype.sendPacket=function(h,b,E){if(this.readyState!="closing"&&this.readyState!="closed"){var x={type:h,data:b};this.emit("packetCreate",x),this.writeBuffer.push(x),this.callbackBuffer.push(E),this.flush()}},o.prototype.close=function(){function h(){x.onClose("forced close"),g("socket closing - telling transport to close"),x.transport.close()}function b(){x.removeListener("upgrade",b),x.removeListener("upgradeError",b),h()}function E(){x.once("upgrade",b),x.once("upgradeError",b)}if(this.readyState=="opening"||this.readyState=="open"){this.readyState="closing";var x=this;this.writeBuffer.length?this.once("drain",function(){this.upgrading?E():h()}):this.upgrading?E():h()}return this},o.prototype.onError=function(h){g("socket error %j",h),o.priorWebsocketSuccess=!1,this.emit("error",h),this.onClose("transport error",h)},o.prototype.onClose=function(h,b){if(this.readyState=="opening"||this.readyState=="open"||this.readyState=="closing"){g('socket close with reason: "%s"',h);var E=this;clearTimeout(this.pingIntervalTimer),clearTimeout(this.pingTimeoutTimer),setTimeout(function(){E.writeBuffer=[],E.callbackBuffer=[],E.prevBufferLen=0},0),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),this.readyState="closed",this.id=null,this.emit("close",h,b)}},o.prototype.filterUpgrades=function(h){for(var b=[],E=0,x=h.length;x>E;E++)~S(this.transports,h[E])&&b.push(h[E]);return b}}).call(this,typeof self<"u"?self:typeof window<"u"?window:{})},{"./transport":14,"./transports":15,"component-emitter":9,debug:22,"engine.io-parser":25,indexof:40,parsejson:32,parseqs:33,parseuri:34}],14:[function(s,r){function n(f){this.path=f.path,this.hostname=f.hostname,this.port=f.port,this.secure=f.secure,this.query=f.query,this.timestampParam=f.timestampParam,this.timestampRequests=f.timestampRequests,this.readyState="",this.agent=f.agent||!1,this.socket=f.socket,this.enablesXDR=f.enablesXDR,this.pfx=f.pfx,this.key=f.key,this.passphrase=f.passphrase,this.cert=f.cert,this.ca=f.ca,this.ciphers=f.ciphers,this.rejectUnauthorized=f.rejectUnauthorized}var o=s("engine.io-parser"),u=s("component-emitter");r.exports=n,u(n.prototype),n.timestamps=0,n.prototype.onError=function(f,m){var g=new Error(f);return g.type="TransportError",g.description=m,this.emit("error",g),this},n.prototype.open=function(){return(this.readyState=="closed"||this.readyState=="")&&(this.readyState="opening",this.doOpen()),this},n.prototype.close=function(){return(this.readyState=="opening"||this.readyState=="open")&&(this.doClose(),this.onClose()),this},n.prototype.send=function(f){if(this.readyState!="open")throw new Error("Transport not open");this.write(f)},n.prototype.onOpen=function(){this.readyState="open",this.writable=!0,this.emit("open")},n.prototype.onData=function(f){var m=o.decodePacket(f,this.socket.binaryType);this.onPacket(m)},n.prototype.onPacket=function(f){this.emit("packet",f)},n.prototype.onClose=function(){this.readyState="closed",this.emit("close")}},{"component-emitter":9,"engine.io-parser":25}],15:[function(s,r,n){(function(o){function u(v){var _,y=!1,l=!1,h=v.jsonp!==!1;if(o.location){var b=location.protocol=="https:",E=location.port;E||(E=b?443:80),y=v.hostname!=location.hostname||E!=v.port,l=v.secure!=b}if(v.xdomain=y,v.xscheme=l,_=new f(v),"open"in _&&!v.forceJSONP)return new m(v);if(!h)throw new Error("JSONP disabled");return new g(v)}var f=s("xmlhttprequest"),m=s("./polling-xhr"),g=s("./polling-jsonp"),S=s("./websocket");n.polling=u,n.websocket=S}).call(this,typeof self<"u"?self:typeof window<"u"?window:{})},{"./polling-jsonp":16,"./polling-xhr":17,"./websocket":19,xmlhttprequest:20}],16:[function(s,r){(function(n){function o(){}function u(_){f.call(this,_),this.query=this.query||{},g||(n.___eio||(n.___eio=[]),g=n.___eio),this.index=g.length;var y=this;g.push(function(l){y.onData(l)}),this.query.j=this.index,n.document&&n.addEventListener&&n.addEventListener("beforeunload",function(){y.script&&(y.script.onerror=o)},!1)}var f=s("./polling"),m=s("component-inherit");r.exports=u;var g,S=/\n/g,v=/\\n/g;m(u,f),u.prototype.supportsBinary=!1,u.prototype.doClose=function(){this.script&&(this.script.parentNode.removeChild(this.script),this.script=null),this.form&&(this.form.parentNode.removeChild(this.form),this.form=null,this.iframe=null),f.prototype.doClose.call(this)},u.prototype.doPoll=function(){var _=this,y=document.createElement("script");this.script&&(this.script.parentNode.removeChild(this.script),this.script=null),y.async=!0,y.src=this.uri(),y.onerror=function(b){_.onError("jsonp poll error",b)};var l=document.getElementsByTagName("script")[0];l.parentNode.insertBefore(y,l),this.script=y;var h=typeof navigator<"u"&&/gecko/i.test(navigator.userAgent);h&&setTimeout(function(){var b=document.createElement("iframe");document.body.appendChild(b),document.body.removeChild(b)},100)},u.prototype.doWrite=function(_,y){function l(){h(),y()}function h(){if(b.iframe)try{b.form.removeChild(b.iframe)}catch(ot){b.onError("jsonp polling iframe removal error",ot)}try{var V='<iframe src="javascript:0" name="'+b.iframeId+'">';E=document.createElement(V)}catch{E=document.createElement("iframe"),E.name=b.iframeId,E.src="javascript:0"}E.id=b.iframeId,b.form.appendChild(E),b.iframe=E}var b=this;if(!this.form){var E,x=document.createElement("form"),W=document.createElement("textarea"),st=this.iframeId="eio_iframe_"+this.index;x.className="socketio",x.style.position="absolute",x.style.top="-1000px",x.style.left="-1000px",x.target=st,x.method="POST",x.setAttribute("accept-charset","utf-8"),W.name="d",x.appendChild(W),document.body.appendChild(x),this.form=x,this.area=W}this.form.action=this.uri(),h(),_=_.replace(v,`\\
|
|
33
|
-
`),this.area.value=_.replace(S,"\\n");try{this.form.submit()}catch{}this.iframe.attachEvent?this.iframe.onreadystatechange=function(){b.iframe.readyState=="complete"&&l()}:this.iframe.onload=l}}).call(this,typeof self<"u"?self:typeof window<"u"?window:{})},{"./polling":18,"component-inherit":21}],17:[function(s,r){(function(n){function o(){}function u(l){if(S.call(this,l),n.location){var h=location.protocol=="https:",b=location.port;b||(b=h?443:80),this.xd=l.hostname!=n.location.hostname||b!=l.port,this.xs=l.secure!=h}}function f(l){this.method=l.method||"GET",this.uri=l.uri,this.xd=!!l.xd,this.xs=!!l.xs,this.async=l.async!==!1,this.data=l.data!=null?l.data:null,this.agent=l.agent,this.isBinary=l.isBinary,this.supportsBinary=l.supportsBinary,this.enablesXDR=l.enablesXDR,this.pfx=l.pfx,this.key=l.key,this.passphrase=l.passphrase,this.cert=l.cert,this.ca=l.ca,this.ciphers=l.ciphers,this.rejectUnauthorized=l.rejectUnauthorized,this.create()}function m(){for(var l in f.requests)f.requests.hasOwnProperty(l)&&f.requests[l].abort()}var g=s("xmlhttprequest"),S=s("./polling"),v=s("component-emitter"),_=s("component-inherit"),y=s("debug")("engine.io-client:polling-xhr");r.exports=u,r.exports.Request=f,_(u,S),u.prototype.supportsBinary=!0,u.prototype.request=function(l){return l=l||{},l.uri=this.uri(),l.xd=this.xd,l.xs=this.xs,l.agent=this.agent||!1,l.supportsBinary=this.supportsBinary,l.enablesXDR=this.enablesXDR,l.pfx=this.pfx,l.key=this.key,l.passphrase=this.passphrase,l.cert=this.cert,l.ca=this.ca,l.ciphers=this.ciphers,l.rejectUnauthorized=this.rejectUnauthorized,new f(l)},u.prototype.doWrite=function(l,h){var b=typeof l!="string"&&l!==void 0,E=this.request({method:"POST",data:l,isBinary:b}),x=this;E.on("success",h),E.on("error",function(W){x.onError("xhr post error",W)}),this.sendXhr=E},u.prototype.doPoll=function(){y("xhr poll");var l=this.request(),h=this;l.on("data",function(b){h.onData(b)}),l.on("error",function(b){h.onError("xhr poll error",b)}),this.pollXhr=l},v(f.prototype),f.prototype.create=function(){var l={agent:this.agent,xdomain:this.xd,xscheme:this.xs,enablesXDR:this.enablesXDR};l.pfx=this.pfx,l.key=this.key,l.passphrase=this.passphrase,l.cert=this.cert,l.ca=this.ca,l.ciphers=this.ciphers,l.rejectUnauthorized=this.rejectUnauthorized;var h=this.xhr=new g(l),b=this;try{if(y("xhr open %s: %s",this.method,this.uri),h.open(this.method,this.uri,this.async),this.supportsBinary&&(h.responseType="arraybuffer"),this.method=="POST")try{this.isBinary?h.setRequestHeader("Content-type","application/octet-stream"):h.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}"withCredentials"in h&&(h.withCredentials=!0),this.hasXDR()?(h.onload=function(){b.onLoad()},h.onerror=function(){b.onError(h.responseText)}):h.onreadystatechange=function(){h.readyState==4&&(h.status==200||h.status==1223?b.onLoad():setTimeout(function(){b.onError(h.status)},0))},y("xhr data %s",this.data),h.send(this.data)}catch(E){return void setTimeout(function(){b.onError(E)},0)}n.document&&(this.index=f.requestsCount++,f.requests[this.index]=this)},f.prototype.onSuccess=function(){this.emit("success"),this.cleanup()},f.prototype.onData=function(l){this.emit("data",l),this.onSuccess()},f.prototype.onError=function(l){this.emit("error",l),this.cleanup(!0)},f.prototype.cleanup=function(l){if(typeof this.xhr<"u"&&this.xhr!==null){if(this.hasXDR()?this.xhr.onload=this.xhr.onerror=o:this.xhr.onreadystatechange=o,l)try{this.xhr.abort()}catch{}n.document&&delete f.requests[this.index],this.xhr=null}},f.prototype.onLoad=function(){var l;try{var h;try{h=this.xhr.getResponseHeader("Content-Type").split(";")[0]}catch{}l=h==="application/octet-stream"?this.xhr.response:this.supportsBinary?"ok":this.xhr.responseText}catch(b){this.onError(b)}l!=null&&this.onData(l)},f.prototype.hasXDR=function(){return typeof n.XDomainRequest<"u"&&!this.xs&&this.enablesXDR},f.prototype.abort=function(){this.cleanup()},n.document&&(f.requestsCount=0,f.requests={},n.attachEvent?n.attachEvent("onunload",m):n.addEventListener&&n.addEventListener("beforeunload",m,!1))}).call(this,typeof self<"u"?self:typeof window<"u"?window:{})},{"./polling":18,"component-emitter":9,"component-inherit":21,debug:22,xmlhttprequest:20}],18:[function(s,r){function n(v){var _=v&&v.forceBase64;(!S||_)&&(this.supportsBinary=!1),o.call(this,v)}var o=s("../transport"),u=s("parseqs"),f=s("engine.io-parser"),m=s("component-inherit"),g=s("debug")("engine.io-client:polling");r.exports=n;var S=function(){var v=s("xmlhttprequest"),_=new v({xdomain:!1});return _.responseType!=null}();m(n,o),n.prototype.name="polling",n.prototype.doOpen=function(){this.poll()},n.prototype.pause=function(v){function _(){g("paused"),y.readyState="paused",v()}var y=this;if(this.readyState="pausing",this.polling||!this.writable){var l=0;this.polling&&(g("we are currently polling - waiting to pause"),l++,this.once("pollComplete",function(){g("pre-pause polling complete"),--l||_()})),this.writable||(g("we are currently writing - waiting to pause"),l++,this.once("drain",function(){g("pre-pause writing complete"),--l||_()}))}else _()},n.prototype.poll=function(){g("polling"),this.polling=!0,this.doPoll(),this.emit("poll")},n.prototype.onData=function(v){var _=this;g("polling got data %s",v);var y=function(l){return _.readyState=="opening"&&_.onOpen(),l.type=="close"?(_.onClose(),!1):void _.onPacket(l)};f.decodePayload(v,this.socket.binaryType,y),this.readyState!="closed"&&(this.polling=!1,this.emit("pollComplete"),this.readyState=="open"?this.poll():g('ignoring poll - transport state "%s"',this.readyState))},n.prototype.doClose=function(){function v(){g("writing close packet"),_.write([{type:"close"}])}var _=this;this.readyState=="open"?(g("transport open - closing"),v()):(g("transport not open - deferring close"),this.once("open",v))},n.prototype.write=function(v){var y=this;this.writable=!1;var _=function(){y.writable=!0,y.emit("drain")},y=this;f.encodePayload(v,this.supportsBinary,function(l){y.doWrite(l,_)})},n.prototype.uri=function(){var v=this.query||{},_=this.secure?"https":"http",y="";return this.timestampRequests!==!1&&(v[this.timestampParam]=+new Date+"-"+o.timestamps++),this.supportsBinary||v.sid||(v.b64=1),v=u.encode(v),this.port&&(_=="https"&&this.port!=443||_=="http"&&this.port!=80)&&(y=":"+this.port),v.length&&(v="?"+v),_+"://"+this.hostname+y+this.path+v}},{"../transport":14,"component-inherit":21,debug:22,"engine.io-parser":25,parseqs:33,xmlhttprequest:20}],19:[function(s,r){function n(v){var _=v&&v.forceBase64;_&&(this.supportsBinary=!1),o.call(this,v)}var o=s("../transport"),u=s("engine.io-parser"),f=s("parseqs"),m=s("component-inherit"),g=s("debug")("engine.io-client:websocket"),S=s("ws");r.exports=n,m(n,o),n.prototype.name="websocket",n.prototype.supportsBinary=!0,n.prototype.doOpen=function(){if(this.check()){var v=this.uri(),_=void 0,y={agent:this.agent};y.pfx=this.pfx,y.key=this.key,y.passphrase=this.passphrase,y.cert=this.cert,y.ca=this.ca,y.ciphers=this.ciphers,y.rejectUnauthorized=this.rejectUnauthorized,this.ws=new S(v,_,y),this.ws.binaryType===void 0&&(this.supportsBinary=!1),this.ws.binaryType="arraybuffer",this.addEventListeners()}},n.prototype.addEventListeners=function(){var v=this;this.ws.onopen=function(){v.onOpen()},this.ws.onclose=function(){v.onClose()},this.ws.onmessage=function(_){v.onData(_.data)},this.ws.onerror=function(_){v.onError("websocket error",_)}},typeof navigator<"u"&&/iPad|iPhone|iPod/i.test(navigator.userAgent)&&(n.prototype.onData=function(v){var _=this;setTimeout(function(){o.prototype.onData.call(_,v)},0)}),n.prototype.write=function(v){function _(){y.writable=!0,y.emit("drain")}var y=this;this.writable=!1;for(var l=0,h=v.length;h>l;l++)u.encodePacket(v[l],this.supportsBinary,function(b){try{y.ws.send(b)}catch{g("websocket closed before onclose event")}});setTimeout(_,0)},n.prototype.onClose=function(){o.prototype.onClose.call(this)},n.prototype.doClose=function(){typeof this.ws<"u"&&this.ws.close()},n.prototype.uri=function(){var v=this.query||{},_=this.secure?"wss":"ws",y="";return this.port&&(_=="wss"&&this.port!=443||_=="ws"&&this.port!=80)&&(y=":"+this.port),this.timestampRequests&&(v[this.timestampParam]=+new Date),this.supportsBinary||(v.b64=1),v=f.encode(v),v.length&&(v="?"+v),_+"://"+this.hostname+y+this.path+v},n.prototype.check=function(){return!(!S||"__initialize"in S&&this.name===n.prototype.name)}},{"../transport":14,"component-inherit":21,debug:22,"engine.io-parser":25,parseqs:33,ws:35}],20:[function(s,r){var n=s("has-cors");r.exports=function(o){var u=o.xdomain,f=o.xscheme,m=o.enablesXDR;try{if(typeof XMLHttpRequest<"u"&&(!u||n))return new XMLHttpRequest}catch{}try{if(typeof XDomainRequest<"u"&&!f&&m)return new XDomainRequest}catch{}if(!u)try{return new ActiveXObject("Microsoft.XMLHTTP")}catch{}}},{"has-cors":38}],21:[function(s,r){r.exports=function(n,o){var u=function(){};u.prototype=o.prototype,n.prototype=new u,n.prototype.constructor=n}},{}],22:[function(s,r,n){function o(){return"WebkitAppearance"in document.documentElement.style||window.console&&(console.firebug||console.exception&&console.table)||navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31}function u(){var S=arguments,v=this.useColors;if(S[0]=(v?"%c":"")+this.namespace+(v?" %c":" ")+S[0]+(v?"%c ":" ")+"+"+n.humanize(this.diff),!v)return S;var _="color: "+this.color;S=[S[0],_,"color: inherit"].concat(Array.prototype.slice.call(S,1));var y=0,l=0;return S[0].replace(/%[a-z%]/g,function(h){h!=="%%"&&(y++,h==="%c"&&(l=y))}),S.splice(l,0,_),S}function f(){return typeof console=="object"&&typeof console.log=="function"&&Function.prototype.apply.call(console.log,console,arguments)}function m(S){try{S==null?localStorage.removeItem("debug"):localStorage.debug=S}catch{}}function g(){var S;try{S=localStorage.debug}catch{}return S}n=r.exports=s("./debug"),n.log=f,n.formatArgs=u,n.save=m,n.load=g,n.useColors=o,n.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"],n.formatters.j=function(S){return JSON.stringify(S)},n.enable(g())},{"./debug":23}],23:[function(s,r,n){function o(){return n.colors[_++%n.colors.length]}function u(y){function l(){}function h(){var E=h,x=+new Date,W=x-(v||x);E.diff=W,E.prev=v,E.curr=x,v=x,E.useColors==null&&(E.useColors=n.useColors()),E.color==null&&E.useColors&&(E.color=o());var st=Array.prototype.slice.call(arguments);st[0]=n.coerce(st[0]),typeof st[0]!="string"&&(st=["%o"].concat(st));var V=0;st[0]=st[0].replace(/%([a-z%])/g,function(H,D){if(H==="%%")return H;V++;var M=n.formatters[D];if(typeof M=="function"){var G=st[V];H=M.call(E,G),st.splice(V,1),V--}return H}),typeof n.formatArgs=="function"&&(st=n.formatArgs.apply(E,st));var ot=h.log||n.log||console.log.bind(console);ot.apply(E,st)}l.enabled=!1,h.enabled=!0;var b=n.enabled(y)?h:l;return b.namespace=y,b}function f(y){n.save(y);for(var l=(y||"").split(/[\s,]+/),h=l.length,b=0;h>b;b++)l[b]&&(y=l[b].replace(/\*/g,".*?"),y[0]==="-"?n.skips.push(new RegExp("^"+y.substr(1)+"$")):n.names.push(new RegExp("^"+y+"$")))}function m(){n.enable("")}function g(y){var l,h;for(l=0,h=n.skips.length;h>l;l++)if(n.skips[l].test(y))return!1;for(l=0,h=n.names.length;h>l;l++)if(n.names[l].test(y))return!0;return!1}function S(y){return y instanceof Error?y.stack||y.message:y}n=r.exports=u,n.coerce=S,n.disable=m,n.enable=f,n.enabled=g,n.humanize=s("ms"),n.names=[],n.skips=[],n.formatters={};var v,_=0},{ms:24}],24:[function(s,r){function n(y){var l=/^((?:\d+)?\.?\d+) *(ms|seconds?|s|minutes?|m|hours?|h|days?|d|years?|y)?$/i.exec(y);if(l){var h=parseFloat(l[1]),b=(l[2]||"ms").toLowerCase();switch(b){case"years":case"year":case"y":return h*_;case"days":case"day":case"d":return h*v;case"hours":case"hour":case"h":return h*S;case"minutes":case"minute":case"m":return h*g;case"seconds":case"second":case"s":return h*m;case"ms":return h}}}function o(y){return y>=v?Math.round(y/v)+"d":y>=S?Math.round(y/S)+"h":y>=g?Math.round(y/g)+"m":y>=m?Math.round(y/m)+"s":y+"ms"}function u(y){return f(y,v,"day")||f(y,S,"hour")||f(y,g,"minute")||f(y,m,"second")||y+" ms"}function f(y,l,h){return l>y?void 0:1.5*l>y?Math.floor(y/l)+" "+h:Math.ceil(y/l)+" "+h+"s"}var m=1e3,g=60*m,S=60*g,v=24*S,_=365.25*v;r.exports=function(y,l){return l=l||{},typeof y=="string"?n(y):l.long?u(y):o(y)}},{}],25:[function(s,r,n){(function(o){function u(D,M){var G="b"+n.packets[D.type]+D.data.data;return M(G)}function f(D,M,G){if(!M)return n.encodeBase64Packet(D,G);var L=D.data,U=new Uint8Array(L),X=new Uint8Array(1+L.byteLength);X[0]=st[D.type];for(var Q=0;Q<U.length;Q++)X[Q+1]=U[Q];return G(X.buffer)}function m(D,M,G){if(!M)return n.encodeBase64Packet(D,G);var L=new FileReader;return L.onload=function(){D.data=L.result,n.encodePacket(D,M,!0,G)},L.readAsArrayBuffer(D.data)}function g(D,M,G){if(!M)return n.encodeBase64Packet(D,G);if(W)return m(D,M,G);var L=new Uint8Array(1);L[0]=st[D.type];var U=new H([L.buffer,D.data]);return G(U)}function S(D,M,G){for(var L=new Array(D.length),U=h(D.length,G),X=function(j,B,kt){M(B,function(At,Rt){L[j]=Rt,kt(At,L)})},Q=0;Q<D.length;Q++)X(Q,D[Q],U)}var v=s("./keys"),_=s("has-binary"),y=s("arraybuffer.slice"),l=s("base64-arraybuffer"),h=s("after"),b=s("utf8"),E=navigator.userAgent.match(/Android/i),x=/PhantomJS/i.test(navigator.userAgent),W=E||x;n.protocol=3;var st=n.packets={open:0,close:1,ping:2,pong:3,message:4,upgrade:5,noop:6},V=v(st),ot={type:"error",data:"parser error"},H=s("blob");n.encodePacket=function(D,M,G,L){typeof M=="function"&&(L=M,M=!1),typeof G=="function"&&(L=G,G=null);var U=D.data===void 0?void 0:D.data.buffer||D.data;if(o.ArrayBuffer&&U instanceof ArrayBuffer)return f(D,M,L);if(H&&U instanceof o.Blob)return g(D,M,L);if(U&&U.base64)return u(D,L);var X=st[D.type];return D.data!==void 0&&(X+=G?b.encode(String(D.data)):String(D.data)),L(""+X)},n.encodeBase64Packet=function(D,M){var G="b"+n.packets[D.type];if(H&&D.data instanceof H){var L=new FileReader;return L.onload=function(){var B=L.result.split(",")[1];M(G+B)},L.readAsDataURL(D.data)}var U;try{U=String.fromCharCode.apply(null,new Uint8Array(D.data))}catch{for(var X=new Uint8Array(D.data),Q=new Array(X.length),j=0;j<X.length;j++)Q[j]=X[j];U=String.fromCharCode.apply(null,Q)}return G+=o.btoa(U),M(G)},n.decodePacket=function(D,M,G){if(typeof D=="string"||D===void 0){if(D.charAt(0)=="b")return n.decodeBase64Packet(D.substr(1),M);if(G)try{D=b.decode(D)}catch{return ot}var U=D.charAt(0);return Number(U)==U&&V[U]?D.length>1?{type:V[U],data:D.substring(1)}:{type:V[U]}:ot}var L=new Uint8Array(D),U=L[0],X=y(D,1);return H&&M==="blob"&&(X=new H([X])),{type:V[U],data:X}},n.decodeBase64Packet=function(D,M){var G=V[D.charAt(0)];if(!o.ArrayBuffer)return{type:G,data:{base64:!0,data:D.substr(1)}};var L=l.decode(D.substr(1));return M==="blob"&&H&&(L=new H([L])),{type:G,data:L}},n.encodePayload=function(D,M,G){function L(Q){return Q.length+":"+Q}function U(Q,j){n.encodePacket(Q,X?M:!1,!0,function(B){j(null,L(B))})}typeof M=="function"&&(G=M,M=null);var X=_(D);return M&&X?H&&!W?n.encodePayloadAsBlob(D,G):n.encodePayloadAsArrayBuffer(D,G):D.length?void S(D,U,function(Q,j){return G(j.join(""))}):G("0:")},n.decodePayload=function(D,M,G){if(typeof D!="string")return n.decodePayloadAsBinary(D,M,G);typeof M=="function"&&(G=M,M=null);var L;if(D=="")return G(ot,0,1);for(var U,X,Q="",j=0,B=D.length;B>j;j++){var kt=D.charAt(j);if(kt!=":")Q+=kt;else{if(Q==""||Q!=(U=Number(Q))||(X=D.substr(j+1,U),Q!=X.length))return G(ot,0,1);if(X.length){if(L=n.decodePacket(X,M,!0),ot.type==L.type&&ot.data==L.data)return G(ot,0,1);var At=G(L,j+U,B);if(At===!1)return}j+=U,Q=""}}return Q!=""?G(ot,0,1):void 0},n.encodePayloadAsArrayBuffer=function(D,M){function G(L,U){n.encodePacket(L,!0,!0,function(X){return U(null,X)})}return D.length?void S(D,G,function(L,U){var X=U.reduce(function(B,kt){var At;return At=typeof kt=="string"?kt.length:kt.byteLength,B+At.toString().length+At+2},0),Q=new Uint8Array(X),j=0;return U.forEach(function(B){var kt=typeof B=="string",At=B;if(kt){for(var Rt=new Uint8Array(B.length),ut=0;ut<B.length;ut++)Rt[ut]=B.charCodeAt(ut);At=Rt.buffer}Q[j++]=kt?0:1;for(var Ht=At.byteLength.toString(),ut=0;ut<Ht.length;ut++)Q[j++]=parseInt(Ht[ut]);Q[j++]=255;for(var Rt=new Uint8Array(At),ut=0;ut<Rt.length;ut++)Q[j++]=Rt[ut]}),M(Q.buffer)}):M(new ArrayBuffer(0))},n.encodePayloadAsBlob=function(D,M){function G(L,U){n.encodePacket(L,!0,!0,function(X){var Q=new Uint8Array(1);if(Q[0]=1,typeof X=="string"){for(var j=new Uint8Array(X.length),B=0;B<X.length;B++)j[B]=X.charCodeAt(B);X=j.buffer,Q[0]=0}for(var kt=X instanceof ArrayBuffer?X.byteLength:X.size,At=kt.toString(),Rt=new Uint8Array(At.length+1),B=0;B<At.length;B++)Rt[B]=parseInt(At[B]);if(Rt[At.length]=255,H){var ut=new H([Q.buffer,Rt.buffer,X]);U(null,ut)}})}S(D,G,function(L,U){return M(new H(U))})},n.decodePayloadAsBinary=function(D,M,G){typeof M=="function"&&(G=M,M=null);for(var L=D,U=[],X=!1;L.byteLength>0;){for(var Q=new Uint8Array(L),j=Q[0]===0,B="",kt=1;Q[kt]!=255;kt++){if(B.length>310){X=!0;break}B+=Q[kt]}if(X)return G(ot,0,1);L=y(L,2+B.length),B=parseInt(B);var At=y(L,0,B);if(j)try{At=String.fromCharCode.apply(null,new Uint8Array(At))}catch{var Rt=new Uint8Array(At);At="";for(var kt=0;kt<Rt.length;kt++)At+=String.fromCharCode(Rt[kt])}U.push(At),L=y(L,B)}var ut=U.length;U.forEach(function(Ht,xe){G(n.decodePacket(Ht,M,!0),xe,ut)})}}).call(this,typeof self<"u"?self:typeof window<"u"?window:{})},{"./keys":26,after:27,"arraybuffer.slice":28,"base64-arraybuffer":29,blob:30,"has-binary":36,utf8:31}],26:[function(s,r){r.exports=Object.keys||function(n){var o=[],u=Object.prototype.hasOwnProperty;for(var f in n)u.call(n,f)&&o.push(f);return o}},{}],27:[function(s,r){function n(u,f,m){function g(v,_){if(g.count<=0)throw new Error("after called too many times");--g.count,v?(S=!0,f(v),f=m):g.count!==0||S||f(null,_)}var S=!1;return m=m||o,g.count=u,u===0?f():g}function o(){}r.exports=n},{}],28:[function(s,r){r.exports=function(n,o,u){var f=n.byteLength;if(o=o||0,u=u||f,n.slice)return n.slice(o,u);if(0>o&&(o+=f),0>u&&(u+=f),u>f&&(u=f),o>=f||o>=u||f===0)return new ArrayBuffer(0);for(var m=new Uint8Array(n),g=new Uint8Array(u-o),S=o,v=0;u>S;S++,v++)g[v]=m[S];return g.buffer}},{}],29:[function(s,r,n){(function(o){n.encode=function(u){var f,m=new Uint8Array(u),g=m.length,S="";for(f=0;g>f;f+=3)S+=o[m[f]>>2],S+=o[(3&m[f])<<4|m[f+1]>>4],S+=o[(15&m[f+1])<<2|m[f+2]>>6],S+=o[63&m[f+2]];return g%3===2?S=S.substring(0,S.length-1)+"=":g%3===1&&(S=S.substring(0,S.length-2)+"=="),S},n.decode=function(u){var f,m,g,S,v,_=.75*u.length,y=u.length,l=0;u[u.length-1]==="="&&(_--,u[u.length-2]==="="&&_--);var h=new ArrayBuffer(_),b=new Uint8Array(h);for(f=0;y>f;f+=4)m=o.indexOf(u[f]),g=o.indexOf(u[f+1]),S=o.indexOf(u[f+2]),v=o.indexOf(u[f+3]),b[l++]=m<<2|g>>4,b[l++]=(15&g)<<4|S>>2,b[l++]=(3&S)<<6|63&v;return h}})("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/")},{}],30:[function(s,r){(function(n){function o(_){for(var y=0;y<_.length;y++){var l=_[y];if(l.buffer instanceof ArrayBuffer){var h=l.buffer;if(l.byteLength!==h.byteLength){var b=new Uint8Array(l.byteLength);b.set(new Uint8Array(h,l.byteOffset,l.byteLength)),h=b.buffer}_[y]=h}}}function u(_,y){y=y||{};var l=new m;o(_);for(var h=0;h<_.length;h++)l.append(_[h]);return y.type?l.getBlob(y.type):l.getBlob()}function f(_,y){return o(_),new Blob(_,y||{})}var m=n.BlobBuilder||n.WebKitBlobBuilder||n.MSBlobBuilder||n.MozBlobBuilder,g=function(){try{var _=new Blob(["hi"]);return _.size===2}catch{return!1}}(),S=g&&function(){try{var _=new Blob([new Uint8Array([1,2])]);return _.size===2}catch{return!1}}(),v=m&&m.prototype.append&&m.prototype.getBlob;r.exports=function(){return g?S?n.Blob:f:v?u:void 0}()}).call(this,typeof self<"u"?self:typeof window<"u"?window:{})},{}],31:[function(s,r,n){(function(o){(function(u){function f(L){for(var U,X,Q=[],j=0,B=L.length;B>j;)U=L.charCodeAt(j++),U>=55296&&56319>=U&&B>j?(X=L.charCodeAt(j++),(64512&X)==56320?Q.push(((1023&U)<<10)+(1023&X)+65536):(Q.push(U),j--)):Q.push(U);return Q}function m(L){for(var U,X=L.length,Q=-1,j="";++Q<X;)U=L[Q],U>65535&&(U-=65536,j+=ot(U>>>10&1023|55296),U=56320|1023&U),j+=ot(U);return j}function g(L){if(L>=55296&&57343>=L)throw Error("Lone surrogate U+"+L.toString(16).toUpperCase()+" is not a scalar value")}function S(L,U){return ot(L>>U&63|128)}function v(L){if(!(4294967168&L))return ot(L);var U="";return 4294965248&L?4294901760&L?!(4292870144&L)&&(U=ot(L>>18&7|240),U+=S(L,12),U+=S(L,6)):(g(L),U=ot(L>>12&15|224),U+=S(L,6)):U=ot(L>>6&31|192),U+=ot(63&L|128)}function _(L){for(var U,X=f(L),Q=X.length,j=-1,B="";++j<Q;)U=X[j],B+=v(U);return B}function y(){if(V>=st)throw Error("Invalid byte index");var L=255&W[V];if(V++,(192&L)==128)return 63&L;throw Error("Invalid continuation byte")}function l(){var L,U,X,Q,j;if(V>st)throw Error("Invalid byte index");if(V==st)return!1;if(L=255&W[V],V++,(128&L)==0)return L;if((224&L)==192){var U=y();if(j=(31&L)<<6|U,j>=128)return j;throw Error("Invalid continuation byte")}if((240&L)==224){if(U=y(),X=y(),j=(15&L)<<12|U<<6|X,j>=2048)return g(j),j;throw Error("Invalid continuation byte")}if((248&L)==240&&(U=y(),X=y(),Q=y(),j=(15&L)<<18|U<<12|X<<6|Q,j>=65536&&1114111>=j))return j;throw Error("Invalid UTF-8 detected")}function h(L){W=f(L),st=W.length,V=0;for(var U,X=[];(U=l())!==!1;)X.push(U);return m(X)}var b=typeof n=="object"&&n,E=typeof r=="object"&&r&&r.exports==b&&r,x=typeof o=="object"&&o;(x.global===x||x.window===x)&&(u=x);var W,st,V,ot=String.fromCharCode,H={version:"2.0.0",encode:_,decode:h};if(b&&!b.nodeType)if(E)E.exports=H;else{var D={},M=D.hasOwnProperty;for(var G in H)M.call(H,G)&&(b[G]=H[G])}else u.utf8=H})(this)}).call(this,typeof self<"u"?self:typeof window<"u"?window:{})},{}],32:[function(s,r){(function(n){var o=/^[\],:{}\s]*$/,u=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,f=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,m=/(?:^|:|,)(?:\s*\[)+/g,g=/^\s+/,S=/\s+$/;r.exports=function(v){return typeof v=="string"&&v?(v=v.replace(g,"").replace(S,""),n.JSON&&JSON.parse?JSON.parse(v):o.test(v.replace(u,"@").replace(f,"]").replace(m,""))?new Function("return "+v)():void 0):null}}).call(this,typeof self<"u"?self:typeof window<"u"?window:{})},{}],33:[function(s,r,n){n.encode=function(o){var u="";for(var f in o)o.hasOwnProperty(f)&&(u.length&&(u+="&"),u+=encodeURIComponent(f)+"="+encodeURIComponent(o[f]));return u},n.decode=function(o){for(var u={},f=o.split("&"),m=0,g=f.length;g>m;m++){var S=f[m].split("=");u[decodeURIComponent(S[0])]=decodeURIComponent(S[1])}return u}},{}],34:[function(s,r){var n=/^(?:(?![^:@]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,o=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];r.exports=function(u){var f=u,m=u.indexOf("["),g=u.indexOf("]");m!=-1&&g!=-1&&(u=u.substring(0,m)+u.substring(m,g).replace(/:/g,";")+u.substring(g,u.length));for(var S=n.exec(u||""),v={},_=14;_--;)v[o[_]]=S[_]||"";return m!=-1&&g!=-1&&(v.source=f,v.host=v.host.substring(1,v.host.length-1).replace(/;/g,":"),v.authority=v.authority.replace("[","").replace("]","").replace(/;/g,":"),v.ipv6uri=!0),v}},{}],35:[function(s,r){function n(f,m){return m?new u(f,m):new u(f)}var o=function(){return self}(),u=o.WebSocket||o.MozWebSocket;r.exports=u?n:null,u&&(n.prototype=u.prototype)},{}],36:[function(s,r){(function(n){function o(f){function m(g){if(!g)return!1;if(n.Buffer&&n.Buffer.isBuffer(g)||n.ArrayBuffer&&g instanceof ArrayBuffer||n.Blob&&g instanceof Blob||n.File&&g instanceof File)return!0;if(u(g)){for(var S=0;S<g.length;S++)if(m(g[S]))return!0}else if(g&&typeof g=="object"){g.toJSON&&(g=g.toJSON());for(var v in g)if(Object.prototype.hasOwnProperty.call(g,v)&&m(g[v]))return!0}return!1}return m(f)}var u=s("isarray");r.exports=o}).call(this,typeof self<"u"?self:typeof window<"u"?window:{})},{isarray:37}],37:[function(s,r){r.exports=Array.isArray||function(n){return Object.prototype.toString.call(n)=="[object Array]"}},{}],38:[function(s,r){var n=s("global");try{r.exports="XMLHttpRequest"in n&&"withCredentials"in new n.XMLHttpRequest}catch{r.exports=!1}},{global:39}],39:[function(s,r){r.exports=function(){return this}()},{}],40:[function(s,r){var n=[].indexOf;r.exports=function(o,u){if(n)return o.indexOf(u);for(var f=0;f<o.length;++f)if(o[f]===u)return f;return-1}},{}],41:[function(s,r,n){var o=Object.prototype.hasOwnProperty;n.keys=Object.keys||function(u){var f=[];for(var m in u)o.call(u,m)&&f.push(m);return f},n.values=function(u){var f=[];for(var m in u)o.call(u,m)&&f.push(u[m]);return f},n.merge=function(u,f){for(var m in f)o.call(f,m)&&(u[m]=f[m]);return u},n.length=function(u){return n.keys(u).length},n.isEmpty=function(u){return n.length(u)==0}},{}],42:[function(s,r){var n=/^(?:(?![^:@]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,o=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];r.exports=function(u){for(var f=n.exec(u||""),m={},g=14;g--;)m[o[g]]=f[g]||"";return m}},{}],43:[function(s,r,n){(function(o){var u=s("isarray"),f=s("./is-buffer");n.deconstructPacket=function(m){function g(y){if(!y)return y;if(f(y)){var l={_placeholder:!0,num:S.length};return S.push(y),l}if(u(y)){for(var h=new Array(y.length),b=0;b<y.length;b++)h[b]=g(y[b]);return h}if(typeof y=="object"&&!(y instanceof Date)){var h={};for(var E in y)h[E]=g(y[E]);return h}return y}var S=[],v=m.data,_=m;return _.data=g(v),_.attachments=S.length,{packet:_,buffers:S}},n.reconstructPacket=function(m,g){function S(v){if(v&&v._placeholder){var _=g[v.num];return _}if(u(v)){for(var y=0;y<v.length;y++)v[y]=S(v[y]);return v}if(v&&typeof v=="object"){for(var l in v)v[l]=S(v[l]);return v}return v}return m.data=S(m.data),m.attachments=void 0,m},n.removeBlobs=function(m,g){function S(y,l,h){if(!y)return y;if(o.Blob&&y instanceof Blob||o.File&&y instanceof File){v++;var b=new FileReader;b.onload=function(){h?h[l]=this.result:_=this.result,--v||g(_)},b.readAsArrayBuffer(y)}else if(u(y))for(var E=0;E<y.length;E++)S(y[E],E,y);else if(y&&typeof y=="object"&&!f(y))for(var x in y)S(y[x],x,y)}var v=0,_=m;S(_),v||g(_)}}).call(this,typeof self<"u"?self:typeof window<"u"?window:{})},{"./is-buffer":45,isarray:46}],44:[function(s,r,n){function o(){}function u(E){var x="",W=!1;return x+=E.type,(n.BINARY_EVENT==E.type||n.BINARY_ACK==E.type)&&(x+=E.attachments,x+="-"),E.nsp&&E.nsp!="/"&&(W=!0,x+=E.nsp),E.id!=null&&(W&&(x+=",",W=!1),x+=E.id),E.data!=null&&(W&&(x+=","),x+=y.stringify(E.data)),_("encoded %j as %s",E,x),x}function f(E,x){function W(st){var V=h.deconstructPacket(st),ot=u(V.packet),H=V.buffers;H.unshift(ot),x(H)}h.removeBlobs(E,W)}function m(){this.reconstructor=null}function g(E){var x={},W=0;if(x.type=Number(E.charAt(0)),n.types[x.type]==null)return v();if(n.BINARY_EVENT==x.type||n.BINARY_ACK==x.type){for(var st="";E.charAt(++W)!="-"&&(st+=E.charAt(W),W!=E.length););if(st!=Number(st)||E.charAt(W)!="-")throw new Error("Illegal attachments");x.attachments=Number(st)}if(E.charAt(W+1)=="/")for(x.nsp="";++W;){var V=E.charAt(W);if(V==","||(x.nsp+=V,W==E.length))break}else x.nsp="/";var ot=E.charAt(W+1);if(ot!==""&&Number(ot)==ot){for(x.id="";++W;){var V=E.charAt(W);if(V==null||Number(V)!=V){--W;break}if(x.id+=E.charAt(W),W==E.length)break}x.id=Number(x.id)}if(E.charAt(++W))try{x.data=y.parse(E.substr(W))}catch{return v()}return _("decoded %s as %j",E,x),x}function S(E){this.reconPack=E,this.buffers=[]}function v(){return{type:n.ERROR,data:"parser error"}}var _=s("debug")("socket.io-parser"),y=s("json3"),l=(s("isarray"),s("component-emitter")),h=s("./binary"),b=s("./is-buffer");n.protocol=4,n.types=["CONNECT","DISCONNECT","EVENT","BINARY_EVENT","ACK","BINARY_ACK","ERROR"],n.CONNECT=0,n.DISCONNECT=1,n.EVENT=2,n.ACK=3,n.ERROR=4,n.BINARY_EVENT=5,n.BINARY_ACK=6,n.Encoder=o,n.Decoder=m,o.prototype.encode=function(E,x){if(_("encoding packet %j",E),n.BINARY_EVENT==E.type||n.BINARY_ACK==E.type)f(E,x);else{var W=u(E);x([W])}},l(m.prototype),m.prototype.add=function(E){var x;if(typeof E=="string")x=g(E),n.BINARY_EVENT==x.type||n.BINARY_ACK==x.type?(this.reconstructor=new S(x),this.reconstructor.reconPack.attachments===0&&this.emit("decoded",x)):this.emit("decoded",x);else{if(!b(E)&&!E.base64)throw new Error("Unknown type: "+E);if(!this.reconstructor)throw new Error("got binary data when not reconstructing a packet");x=this.reconstructor.takeBinaryData(E),x&&(this.reconstructor=null,this.emit("decoded",x))}},m.prototype.destroy=function(){this.reconstructor&&this.reconstructor.finishedReconstruction()},S.prototype.takeBinaryData=function(E){if(this.buffers.push(E),this.buffers.length==this.reconPack.attachments){var x=h.reconstructPacket(this.reconPack,this.buffers);return this.finishedReconstruction(),x}return null},S.prototype.finishedReconstruction=function(){this.reconPack=null,this.buffers=[]}},{"./binary":43,"./is-buffer":45,"component-emitter":9,debug:10,isarray:46,json3:47}],45:[function(s,r){(function(n){function o(u){return n.Buffer&&n.Buffer.isBuffer(u)||n.ArrayBuffer&&u instanceof ArrayBuffer}r.exports=o}).call(this,typeof self<"u"?self:typeof window<"u"?window:{})},{}],46:[function(s,r){r.exports=s(37)},{}],47:[function(s,r,n){(function(o){function u(q){if(u[q]!==g)return u[q];var J;if(q=="bug-string-char-index")J=!1;else if(q=="json")J=u("json-stringify")&&u("json-parse");else{var F,et='{"a":[1,true,false,null,"\\u0000\\b\\n\\f\\r\\t"]}';if(q=="json-stringify"){var P=_.stringify,Z=typeof P=="function"&&y;if(Z){(F=function(){return 1}).toJSON=F;try{Z=P(0)==="0"&&P(new Number)==="0"&&P(new String)=='""'&&P(S)===g&&P(g)===g&&P()===g&&P(F)==="1"&&P([F])=="[1]"&&P([g])=="[null]"&&P(null)=="null"&&P([g,S,null])=="[null,null,null]"&&P({a:[F,!0,!1,null,`\0\b
|
|
34
|
-
\f\r `]})==
|
|
31
|
+
`)+W+`return __p
|
|
32
|
+
}`;var dt=Hc(function(){return Ct(m,tt+"return "+W).apply(n,C)});if(dt.source=W,Io(dt))throw dt;return dt}function Ty(t){return kt(t).toLowerCase()}function Ry(t){return kt(t).toUpperCase()}function Iy(t,e,i){if(t=kt(t),t&&(i||e===n))return Vs(t);if(!t||!(e=he(e)))return t;var a=Ae(t),h=Ae(e),m=Zs(a,h),C=Qs(a,h)+1;return rn(a,m,C).join("")}function Oy(t,e,i){if(t=kt(t),t&&(i||e===n))return t.slice(0,ea(t)+1);if(!t||!(e=he(e)))return t;var a=Ae(t),h=Qs(a,Ae(e))+1;return rn(a,0,h).join("")}function Ny(t,e,i){if(t=kt(t),t&&(i||e===n))return t.replace(Ri,"");if(!t||!(e=he(e)))return t;var a=Ae(t),h=Zs(a,Ae(e));return rn(a,h).join("")}function Ly(t,e){var i=L,a=H;if(Lt(e)){var h="separator"in e?e.separator:h;i="length"in e?pt(e.length):i,a="omission"in e?he(e.omission):a}t=kt(t);var m=t.length;if(An(t)){var C=Ae(t);m=C.length}if(i>=m)return t;var S=i-xn(a);if(S<1)return a;var E=C?rn(C,0,S).join(""):t.slice(0,S);if(h===n)return E+a;if(C&&(S+=E.length-S),Oo(h)){if(t.slice(S).search(h)){var M,q=E;for(h.global||(h=Xi(h.source,kt(ws.exec(h))+"g")),h.lastIndex=0;M=h.exec(q);)var W=M.index;E=E.slice(0,W===n?S:W)}}else if(t.indexOf(he(h),S)!=S){var J=E.lastIndexOf(h);J>-1&&(E=E.slice(0,J))}return E+a}function By(t){return t=kt(t),t&&Ku.test(t)?t.replace(ys,uh):t}var Uy=Ln(function(t,e,i){return t+(i?" ":"")+e.toUpperCase()}),Bo=za("toUpperCase");function Wc(t,e,i){return t=kt(t),e=i?n:e,e===n?ih(t)?lh(t):Jf(t):t.match(e)||[]}var Hc=gt(function(t,e){try{return ue(t,n,e)}catch(i){return Io(i)?i:new ft(i)}}),Dy=He(function(t,e){return ye(e,function(i){i=Ue(i),qe(t,i,To(t[i],t))}),t});function Py(t){var e=t==null?0:t.length,i=it();return t=e?Nt(t,function(a){if(typeof a[1]!="function")throw new ve(v);return[i(a[0]),a[1]]}):[],gt(function(a){for(var h=-1;++h<e;){var m=t[h];if(ue(m[0],this,a))return ue(m[1],this,a)}})}function Fy(t){return ul(we(t,g))}function Uo(t){return function(){return t}}function My(t,e){return t==null||t!==t?e:t}var qy=Ga(),Wy=Ga(!0);function oe(t){return t}function Do(t){return ba(typeof t=="function"?t:we(t,g))}function Hy(t){return Sa(we(t,g))}function zy(t,e){return ka(t,we(e,g))}var Ky=gt(function(t,e){return function(i){return rr(i,t,e)}}),Gy=gt(function(t,e){return function(i){return rr(t,i,e)}});function Po(t,e,i){var a=Ht(e),h=qr(e,a);i==null&&!(Lt(e)&&(h.length||!a.length))&&(i=e,e=t,t=this,h=qr(e,Ht(e)));var m=!(Lt(i)&&"chain"in i)||!!i.chain,C=Ke(t);return ye(h,function(S){var E=e[S];t[S]=E,C&&(t.prototype[S]=function(){var M=this.__chain__;if(m||M){var q=t(this.__wrapped__),W=q.__actions__=ne(this.__actions__);return W.push({func:E,args:arguments,thisArg:t}),q.__chain__=M,q}return E.apply(t,Ve([this.value()],arguments))})}),t}function Xy(){return zt._===this&&(zt._=mh),this}function Fo(){}function $y(t){return t=pt(t),gt(function(e){return Aa(e,t)})}var jy=go(Nt),Jy=go(Xs),Yy=go(Mi);function zc(t){return Co(t)?qi(Ue(t)):xl(t)}function Vy(t){return function(e){return t==null?n:gn(t,e)}}var Zy=$a(),Qy=$a(!0);function Mo(){return[]}function qo(){return!1}function tv(){return{}}function ev(){return""}function nv(){return!0}function rv(t,e){if(t=pt(t),t<1||t>ut)return[];var i=ae,a=jt(t,ae);e=it(e),t-=ae;for(var h=zi(a,e);++i<t;)e(i);return h}function iv(t){return ht(t)?Nt(t,Ue):le(t)?[t]:ne(uc(kt(t)))}function ov(t){var e=++yh;return kt(t)+e}var sv=Xr(function(t,e){return t+e},0),av=yo("ceil"),cv=Xr(function(t,e){return t/e},1),uv=yo("floor");function fv(t){return t&&t.length?Mr(t,oe,to):n}function hv(t,e){return t&&t.length?Mr(t,it(e,2),to):n}function lv(t){return Js(t,oe)}function pv(t,e){return Js(t,it(e,2))}function dv(t){return t&&t.length?Mr(t,oe,io):n}function gv(t,e){return t&&t.length?Mr(t,it(e,2),io):n}var yv=Xr(function(t,e){return t*e},1),vv=yo("round"),mv=Xr(function(t,e){return t-e},0);function wv(t){return t&&t.length?Hi(t,oe):0}function _v(t,e){return t&&t.length?Hi(t,it(e,2)):0}return y.after=Hd,y.ary=_c,y.assign=Rg,y.assignIn=Bc,y.assignInWith=oi,y.assignWith=Ig,y.at=Og,y.before=bc,y.bind=To,y.bindAll=Dy,y.bindKey=Cc,y.castArray=tg,y.chain=vc,y.chunk=up,y.compact=fp,y.concat=hp,y.cond=Py,y.conforms=Fy,y.constant=Uo,y.countBy=wd,y.create=Ng,y.curry=Sc,y.curryRight=kc,y.debounce=Ac,y.defaults=Lg,y.defaultsDeep=Bg,y.defer=zd,y.delay=Kd,y.difference=lp,y.differenceBy=pp,y.differenceWith=dp,y.drop=gp,y.dropRight=yp,y.dropRightWhile=vp,y.dropWhile=mp,y.fill=wp,y.filter=bd,y.flatMap=kd,y.flatMapDeep=Ad,y.flatMapDepth=xd,y.flatten=pc,y.flattenDeep=_p,y.flattenDepth=bp,y.flip=Gd,y.flow=qy,y.flowRight=Wy,y.fromPairs=Cp,y.functions=Wg,y.functionsIn=Hg,y.groupBy=Ed,y.initial=kp,y.intersection=Ap,y.intersectionBy=xp,y.intersectionWith=Ep,y.invert=Kg,y.invertBy=Gg,y.invokeMap=Rd,y.iteratee=Do,y.keyBy=Id,y.keys=Ht,y.keysIn=ie,y.map=Qr,y.mapKeys=$g,y.mapValues=jg,y.matches=Hy,y.matchesProperty=zy,y.memoize=ei,y.merge=Jg,y.mergeWith=Uc,y.method=Ky,y.methodOf=Gy,y.mixin=Po,y.negate=ni,y.nthArg=$y,y.omit=Yg,y.omitBy=Vg,y.once=Xd,y.orderBy=Od,y.over=jy,y.overArgs=$d,y.overEvery=Jy,y.overSome=Yy,y.partial=Ro,y.partialRight=xc,y.partition=Nd,y.pick=Zg,y.pickBy=Dc,y.property=zc,y.propertyOf=Vy,y.pull=Op,y.pullAll=gc,y.pullAllBy=Np,y.pullAllWith=Lp,y.pullAt=Bp,y.range=Zy,y.rangeRight=Qy,y.rearg=jd,y.reject=Ud,y.remove=Up,y.rest=Jd,y.reverse=xo,y.sampleSize=Pd,y.set=ty,y.setWith=ey,y.shuffle=Fd,y.slice=Dp,y.sortBy=Wd,y.sortedUniq=zp,y.sortedUniqBy=Kp,y.split=ky,y.spread=Yd,y.tail=Gp,y.take=Xp,y.takeRight=$p,y.takeRightWhile=jp,y.takeWhile=Jp,y.tap=fd,y.throttle=Vd,y.thru=Zr,y.toArray=Oc,y.toPairs=Pc,y.toPairsIn=Fc,y.toPath=iv,y.toPlainObject=Lc,y.transform=ny,y.unary=Zd,y.union=Yp,y.unionBy=Vp,y.unionWith=Zp,y.uniq=Qp,y.uniqBy=td,y.uniqWith=ed,y.unset=ry,y.unzip=Eo,y.unzipWith=yc,y.update=iy,y.updateWith=oy,y.values=Dn,y.valuesIn=sy,y.without=nd,y.words=Wc,y.wrap=Qd,y.xor=rd,y.xorBy=id,y.xorWith=od,y.zip=sd,y.zipObject=ad,y.zipObjectDeep=cd,y.zipWith=ud,y.entries=Pc,y.entriesIn=Fc,y.extend=Bc,y.extendWith=oi,Po(y,y),y.add=sv,y.attempt=Hc,y.camelCase=fy,y.capitalize=Mc,y.ceil=av,y.clamp=ay,y.clone=eg,y.cloneDeep=rg,y.cloneDeepWith=ig,y.cloneWith=ng,y.conformsTo=og,y.deburr=qc,y.defaultTo=My,y.divide=cv,y.endsWith=hy,y.eq=Ee,y.escape=ly,y.escapeRegExp=py,y.every=_d,y.find=Cd,y.findIndex=hc,y.findKey=Ug,y.findLast=Sd,y.findLastIndex=lc,y.findLastKey=Dg,y.floor=uv,y.forEach=mc,y.forEachRight=wc,y.forIn=Pg,y.forInRight=Fg,y.forOwn=Mg,y.forOwnRight=qg,y.get=No,y.gt=sg,y.gte=ag,y.has=zg,y.hasIn=Lo,y.head=dc,y.identity=oe,y.includes=Td,y.indexOf=Sp,y.inRange=cy,y.invoke=Xg,y.isArguments=mn,y.isArray=ht,y.isArrayBuffer=cg,y.isArrayLike=re,y.isArrayLikeObject=Ut,y.isBoolean=ug,y.isBuffer=on,y.isDate=fg,y.isElement=hg,y.isEmpty=lg,y.isEqual=pg,y.isEqualWith=dg,y.isError=Io,y.isFinite=gg,y.isFunction=Ke,y.isInteger=Ec,y.isLength=ri,y.isMap=Tc,y.isMatch=yg,y.isMatchWith=vg,y.isNaN=mg,y.isNative=wg,y.isNil=bg,y.isNull=_g,y.isNumber=Rc,y.isObject=Lt,y.isObjectLike=Bt,y.isPlainObject=ur,y.isRegExp=Oo,y.isSafeInteger=Cg,y.isSet=Ic,y.isString=ii,y.isSymbol=le,y.isTypedArray=Un,y.isUndefined=Sg,y.isWeakMap=kg,y.isWeakSet=Ag,y.join=Tp,y.kebabCase=dy,y.last=be,y.lastIndexOf=Rp,y.lowerCase=gy,y.lowerFirst=yy,y.lt=xg,y.lte=Eg,y.max=fv,y.maxBy=hv,y.mean=lv,y.meanBy=pv,y.min=dv,y.minBy=gv,y.stubArray=Mo,y.stubFalse=qo,y.stubObject=tv,y.stubString=ev,y.stubTrue=nv,y.multiply=yv,y.nth=Ip,y.noConflict=Xy,y.noop=Fo,y.now=ti,y.pad=vy,y.padEnd=my,y.padStart=wy,y.parseInt=_y,y.random=uy,y.reduce=Ld,y.reduceRight=Bd,y.repeat=by,y.replace=Cy,y.result=Qg,y.round=vv,y.runInContext=x,y.sample=Dd,y.size=Md,y.snakeCase=Sy,y.some=qd,y.sortedIndex=Pp,y.sortedIndexBy=Fp,y.sortedIndexOf=Mp,y.sortedLastIndex=qp,y.sortedLastIndexBy=Wp,y.sortedLastIndexOf=Hp,y.startCase=Ay,y.startsWith=xy,y.subtract=mv,y.sum=wv,y.sumBy=_v,y.template=Ey,y.times=rv,y.toFinite=Ge,y.toInteger=pt,y.toLength=Nc,y.toLower=Ty,y.toNumber=Ce,y.toSafeInteger=Tg,y.toString=kt,y.toUpper=Ry,y.trim=Iy,y.trimEnd=Oy,y.trimStart=Ny,y.truncate=Ly,y.unescape=By,y.uniqueId=ov,y.upperCase=Uy,y.upperFirst=Bo,y.each=mc,y.eachRight=wc,y.first=dc,Po(y,function(){var t={};return Le(y,function(e,i){Et.call(y.prototype,i)||(t[i]=e)}),t}(),{chain:!1}),y.VERSION=s,ye(["bind","bindKey","curry","curryRight","partial","partialRight"],function(t){y[t].placeholder=y}),ye(["drop","take"],function(t,e){mt.prototype[t]=function(i){i=i===n?1:qt(pt(i),0);var a=this.__filtered__&&!e?new mt(this):this.clone();return a.__filtered__?a.__takeCount__=jt(i,a.__takeCount__):a.__views__.push({size:jt(i,ae),type:t+(a.__dir__<0?"Right":"")}),a},mt.prototype[t+"Right"]=function(i){return this.reverse()[t](i).reverse()}}),ye(["filter","map","takeWhile"],function(t,e){var i=e+1,a=i==F||i==ct;mt.prototype[t]=function(h){var m=this.clone();return m.__iteratees__.push({iteratee:it(h,3),type:i}),m.__filtered__=m.__filtered__||a,m}}),ye(["head","last"],function(t,e){var i="take"+(e?"Right":"");mt.prototype[t]=function(){return this[i](1).value()[0]}}),ye(["initial","tail"],function(t,e){var i="drop"+(e?"":"Right");mt.prototype[t]=function(){return this.__filtered__?new mt(this):this[i](1)}}),mt.prototype.compact=function(){return this.filter(oe)},mt.prototype.find=function(t){return this.filter(t).head()},mt.prototype.findLast=function(t){return this.reverse().find(t)},mt.prototype.invokeMap=gt(function(t,e){return typeof t=="function"?new mt(this):this.map(function(i){return rr(i,t,e)})}),mt.prototype.reject=function(t){return this.filter(ni(it(t)))},mt.prototype.slice=function(t,e){t=pt(t);var i=this;return i.__filtered__&&(t>0||e<0)?new mt(i):(t<0?i=i.takeRight(-t):t&&(i=i.drop(t)),e!==n&&(e=pt(e),i=e<0?i.dropRight(-e):i.take(e-t)),i)},mt.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},mt.prototype.toArray=function(){return this.take(ae)},Le(mt.prototype,function(t,e){var i=/^(?:filter|find|map|reject)|While$/.test(e),a=/^(?:head|last)$/.test(e),h=y[a?"take"+(e=="last"?"Right":""):e],m=a||/^find/.test(e);h&&(y.prototype[e]=function(){var C=this.__wrapped__,S=a?[1]:arguments,E=C instanceof mt,M=S[0],q=E||ht(C),W=function(yt){var wt=h.apply(y,Ve([yt],S));return a&&J?wt[0]:wt};q&&i&&typeof M=="function"&&M.length!=1&&(E=q=!1);var J=this.__chain__,tt=!!this.__actions__.length,ot=m&&!J,dt=E&&!tt;if(!m&&q){C=dt?C:new mt(this);var st=t.apply(C,S);return st.__actions__.push({func:Zr,args:[W],thisArg:n}),new me(st,J)}return ot&&dt?t.apply(this,S):(st=this.thru(W),ot?a?st.value()[0]:st.value():st)})}),ye(["pop","push","shift","sort","splice","unshift"],function(t){var e=kr[t],i=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",a=/^(?:pop|shift)$/.test(t);y.prototype[t]=function(){var h=arguments;if(a&&!this.__chain__){var m=this.value();return e.apply(ht(m)?m:[],h)}return this[i](function(C){return e.apply(ht(C)?C:[],h)})}}),Le(mt.prototype,function(t,e){var i=y[e];if(i){var a=i.name+"";Et.call(In,a)||(In[a]=[]),In[a].push({name:e,func:i})}}),In[Gr(n,B).name]=[{name:"wrapper",func:n}],mt.prototype.clone=Bh,mt.prototype.reverse=Uh,mt.prototype.value=Dh,y.prototype.at=hd,y.prototype.chain=ld,y.prototype.commit=pd,y.prototype.next=dd,y.prototype.plant=yd,y.prototype.reverse=vd,y.prototype.toJSON=y.prototype.valueOf=y.prototype.value=md,y.prototype.first=y.prototype.head,Yn&&(y.prototype[Yn]=gd),y},En=ph();fn?((fn.exports=En)._=En,Ui._=En):zt._=En}).call(fr)})(fi,fi.exports);var Iv=fi.exports;const Ov={isNewStack:!1,forceNew:!0,reconnectionDelay:1e4,reconnectionDelayMax:1e4,maxReconnectAttempts:5,timeout:1e4,keepAliveTimeout:6e4,idleInterval:6e4*5,protocol:"https",transports:["websocket"],upgrade:!1,serverFetchStrategy:"static",serverType:0,useLogger:!0,loggerServer:"http://socketlog.voicenter.co",loggerConfig:{logToConsole:!0,overloadGlobalConsole:!1,system:"events-sdk",socketEmitInterval:1e4},loggerConnectOptions:{reconnection:!0,reconnectionDelay:5e3,reconnectionAttempts:10,perMessageDeflate:void 0,upgrade:!1,transports:["websocket"],debug:!1}};function Nv(){return function r(o,n,s){function c(d,b){if(!n[d]){if(!o[d]){var p=typeof require=="function"&&require;if(!b&&p)return p(d,!0);if(f)return f(d,!0);throw new Error("Cannot find module '"+d+"'")}var w=n[d]={exports:{}};o[d][0].call(w.exports,function(g){var l=o[d][1][g];return c(l||g)},w,w.exports,r,o,n,s)}return n[d].exports}for(var f=typeof require=="function"&&require,v=0;v<s.length;v++)c(s[v]);return c}({1:[function(r,o){o.exports=r("./lib/")},{"./lib/":2}],2:[function(r,o,n){function s(p,w){typeof p=="object"&&(w=p,p=void 0),w=w||{};var g,l=c(p),u=l.source,_=l.id;return w.forceNew||w["force new connection"]||w.multiplex===!1?(d("ignoring socket cache for %s",u),g=v(u,w)):(b[_]||(d("new io instance for %s",u),b[_]=v(u,w)),g=b[_]),g.socket(l.path)}var c=r("./url"),f=r("socket.io-parser"),v=r("./manager"),d=r("debug")("socket.io-client");o.exports=n=s;var b=n.managers={};n.protocol=f.protocol,n.connect=s,n.Manager=r("./manager"),n.Socket=r("./socket")},{"./manager":3,"./socket":5,"./url":6,debug:10,"socket.io-parser":44}],3:[function(r,o){function n(l,u){return this instanceof n?(l&&typeof l=="object"&&(u=l,l=void 0),u=u||{},u.path=u.path||"/socket.io",this.nsps={},this.subs=[],this.opts=u,this.reconnection(u.reconnection!==!1),this.reconnectionAttempts(u.reconnectionAttempts||1/0),this.reconnectionDelay(u.reconnectionDelay||1e3),this.reconnectionDelayMax(u.reconnectionDelayMax||5e3),this.randomizationFactor(u.randomizationFactor||.5),this.backoff=new g({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(u.timeout==null?2e4:u.timeout),this.readyState="closed",this.uri=l,this.connected=[],this.encoding=!1,this.packetBuffer=[],this.encoder=new v.Encoder,this.decoder=new v.Decoder,this.autoConnect=u.autoConnect!==!1,void(this.autoConnect&&this.open())):new n(l,u)}var s=(r("./url"),r("engine.io-client")),c=r("./socket"),f=r("component-emitter"),v=r("socket.io-parser"),d=r("./on"),b=r("component-bind"),p=(r("object-component"),r("debug")("socket.io-client:manager")),w=r("indexof"),g=r("backo2");o.exports=n,n.prototype.emitAll=function(){this.emit.apply(this,arguments);for(var l in this.nsps)this.nsps[l].emit.apply(this.nsps[l],arguments)},n.prototype.updateSocketIds=function(){for(var l in this.nsps)this.nsps[l].id=this.engine.id},f(n.prototype),n.prototype.reconnection=function(l){return arguments.length?(this._reconnection=!!l,this):this._reconnection},n.prototype.reconnectionAttempts=function(l){return arguments.length?(this._reconnectionAttempts=l,this):this._reconnectionAttempts},n.prototype.reconnectionDelay=function(l){return arguments.length?(this._reconnectionDelay=l,this.backoff&&this.backoff.setMin(l),this):this._reconnectionDelay},n.prototype.randomizationFactor=function(l){return arguments.length?(this._randomizationFactor=l,this.backoff&&this.backoff.setJitter(l),this):this._randomizationFactor},n.prototype.reconnectionDelayMax=function(l){return arguments.length?(this._reconnectionDelayMax=l,this.backoff&&this.backoff.setMax(l),this):this._reconnectionDelayMax},n.prototype.timeout=function(l){return arguments.length?(this._timeout=l,this):this._timeout},n.prototype.maybeReconnectOnOpen=function(){!this.reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()},n.prototype.open=n.prototype.connect=function(l){if(p("readyState %s",this.readyState),~this.readyState.indexOf("open"))return this;p("opening %s",this.uri),this.engine=s(this.uri,this.opts);var u=this.engine,_=this;this.readyState="opening",this.skipReconnect=!1;var A=d(u,"open",function(){_.onopen(),l&&l()}),k=d(u,"error",function(j){if(p("connect_error"),_.cleanup(),_.readyState="closed",_.emitAll("connect_error",j),l){var N=new Error("Connection error");N.data=j,l(N)}else _.maybeReconnectOnOpen()});if(this._timeout!==!1){var B=this._timeout;p("connect attempt will timeout after %d",B);var Y=setTimeout(function(){p("connect attempt timed out after %d",B),A.destroy(),u.close(),u.emit("error","timeout"),_.emitAll("connect_timeout",B)},B);this.subs.push({destroy:function(){clearTimeout(Y)}})}return this.subs.push(A),this.subs.push(k),this},n.prototype.onopen=function(){p("open"),this.cleanup(),this.readyState="open",this.emit("open");var l=this.engine;this.subs.push(d(l,"data",b(this,"ondata"))),this.subs.push(d(this.decoder,"decoded",b(this,"ondecoded"))),this.subs.push(d(l,"error",b(this,"onerror"))),this.subs.push(d(l,"close",b(this,"onclose")))},n.prototype.ondata=function(l){this.decoder.add(l)},n.prototype.ondecoded=function(l){this.emit("packet",l)},n.prototype.onerror=function(l){p("error",l),this.emitAll("error",l)},n.prototype.socket=function(l){var u=this.nsps[l];if(!u){u=new c(this,l),this.nsps[l]=u;var _=this;u.on("connect",function(){u.id=_.engine.id,~w(_.connected,u)||_.connected.push(u)})}return u},n.prototype.destroy=function(l){var u=w(this.connected,l);~u&&this.connected.splice(u,1),this.connected.length||this.close()},n.prototype.packet=function(l){p("writing packet %j",l);var u=this;u.encoding?u.packetBuffer.push(l):(u.encoding=!0,this.encoder.encode(l,function(_){for(var A=0;A<_.length;A++)u.engine.write(_[A]);u.encoding=!1,u.processPacketQueue()}))},n.prototype.processPacketQueue=function(){if(this.packetBuffer.length>0&&!this.encoding){var l=this.packetBuffer.shift();this.packet(l)}},n.prototype.cleanup=function(){for(var l;l=this.subs.shift();)l.destroy();this.packetBuffer=[],this.encoding=!1,this.decoder.destroy()},n.prototype.close=n.prototype.disconnect=function(){this.skipReconnect=!0,this.backoff.reset(),this.readyState="closed",this.engine&&this.engine.close()},n.prototype.onclose=function(l){p("close"),this.cleanup(),this.backoff.reset(),this.readyState="closed",this.emit("close",l),this._reconnection&&!this.skipReconnect&&this.reconnect()},n.prototype.reconnect=function(){if(this.reconnecting||this.skipReconnect)return this;var l=this;if(this.backoff.attempts>=this._reconnectionAttempts)p("reconnect failed"),this.backoff.reset(),this.emitAll("reconnect_failed"),this.reconnecting=!1;else{var u=this.backoff.duration();p("will wait %dms before reconnect attempt",u),this.reconnecting=!0;var _=setTimeout(function(){l.skipReconnect||(p("attempting reconnect"),l.emitAll("reconnect_attempt",l.backoff.attempts),l.emitAll("reconnecting",l.backoff.attempts),l.skipReconnect||l.open(function(A){A?(p("reconnect attempt error"),l.reconnecting=!1,l.reconnect(),l.emitAll("reconnect_error",A.data)):(p("reconnect success"),l.onreconnect())}))},u);this.subs.push({destroy:function(){clearTimeout(_)}})}},n.prototype.onreconnect=function(){var l=this.backoff.attempts;this.reconnecting=!1,this.backoff.reset(),this.updateSocketIds(),this.emitAll("reconnect",l)}},{"./on":4,"./socket":5,"./url":6,backo2:7,"component-bind":8,"component-emitter":9,debug:10,"engine.io-client":11,indexof:40,"object-component":41,"socket.io-parser":44}],4:[function(r,o){function n(s,c,f){return s.on(c,f),{destroy:function(){s.removeListener(c,f)}}}o.exports=n},{}],5:[function(r,o,n){function s(u,_){this.io=u,this.nsp=_,this.json=this,this.ids=0,this.acks={},this.io.autoConnect&&this.open(),this.receiveBuffer=[],this.sendBuffer=[],this.connected=!1,this.disconnected=!0}var c=r("socket.io-parser"),f=r("component-emitter"),v=r("to-array"),d=r("./on"),b=r("component-bind"),p=r("debug")("socket.io-client:socket"),w=r("has-binary");o.exports=s;var g={connect:1,connect_error:1,connect_timeout:1,disconnect:1,error:1,reconnect:1,reconnect_attempt:1,reconnect_failed:1,reconnect_error:1,reconnecting:1},l=f.prototype.emit;f(s.prototype),s.prototype.subEvents=function(){if(!this.subs){var u=this.io;this.subs=[d(u,"open",b(this,"onopen")),d(u,"packet",b(this,"onpacket")),d(u,"close",b(this,"onclose"))]}},s.prototype.open=s.prototype.connect=function(){return this.connected?this:(this.subEvents(),this.io.open(),this.io.readyState=="open"&&this.onopen(),this)},s.prototype.send=function(){var u=v(arguments);return u.unshift("message"),this.emit.apply(this,u),this},s.prototype.emit=function(u){if(g.hasOwnProperty(u))return l.apply(this,arguments),this;var _=v(arguments),A=c.EVENT;w(_)&&(A=c.BINARY_EVENT);var k={type:A,data:_};return typeof _[_.length-1]=="function"&&(p("emitting packet with ack id %d",this.ids),this.acks[this.ids]=_.pop(),k.id=this.ids++),this.connected?this.packet(k):this.sendBuffer.push(k),this},s.prototype.packet=function(u){u.nsp=this.nsp,this.io.packet(u)},s.prototype.onopen=function(){p("transport is open - connecting"),this.nsp!="/"&&this.packet({type:c.CONNECT})},s.prototype.onclose=function(u){p("close (%s)",u),this.connected=!1,this.disconnected=!0,delete this.id,this.emit("disconnect",u)},s.prototype.onpacket=function(u){if(u.nsp==this.nsp)switch(u.type){case c.CONNECT:this.onconnect();break;case c.EVENT:this.onevent(u);break;case c.BINARY_EVENT:this.onevent(u);break;case c.ACK:this.onack(u);break;case c.BINARY_ACK:this.onack(u);break;case c.DISCONNECT:this.ondisconnect();break;case c.ERROR:this.emit("error",u.data)}},s.prototype.onevent=function(u){var _=u.data||[];p("emitting event %j",_),u.id!=null&&(p("attaching ack callback to event"),_.push(this.ack(u.id))),this.connected?l.apply(this,_):this.receiveBuffer.push(_)},s.prototype.ack=function(u){var _=this,A=!1;return function(){if(!A){A=!0;var k=v(arguments);p("sending ack %j",k);var B=w(k)?c.BINARY_ACK:c.ACK;_.packet({type:B,id:u,data:k})}}},s.prototype.onack=function(u){p("calling ack %s with %j",u.id,u.data);var _=this.acks[u.id];_.apply(this,u.data),delete this.acks[u.id]},s.prototype.onconnect=function(){this.connected=!0,this.disconnected=!1,this.emit("connect"),this.emitBuffered()},s.prototype.emitBuffered=function(){var u;for(u=0;u<this.receiveBuffer.length;u++)l.apply(this,this.receiveBuffer[u]);for(this.receiveBuffer=[],u=0;u<this.sendBuffer.length;u++)this.packet(this.sendBuffer[u]);this.sendBuffer=[]},s.prototype.ondisconnect=function(){p("server disconnect (%s)",this.nsp),this.destroy(),this.onclose("io server disconnect")},s.prototype.destroy=function(){if(this.subs){for(var u=0;u<this.subs.length;u++)this.subs[u].destroy();this.subs=null}this.io.destroy(this)},s.prototype.close=s.prototype.disconnect=function(){return this.connected&&(p("performing disconnect (%s)",this.nsp),this.packet({type:c.DISCONNECT})),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}},{"./on":4,"component-bind":8,"component-emitter":9,debug:10,"has-binary":36,"socket.io-parser":44,"to-array":48}],6:[function(r,o){(function(n){function s(v,p){var b=v,p=p||n.location;return v==null&&(v=p.protocol+"//"+p.host),typeof v=="string"&&(v.charAt(0)=="/"&&(v=v.charAt(1)=="/"?p.protocol+v:p.hostname+v),/^(https?|wss?):\/\//.test(v)||(f("protocol-less url %s",v),v=typeof p<"u"?p.protocol+"//"+v:"https://"+v),f("parse %s",v),b=c(v)),b.port||(/^(http|ws)$/.test(b.protocol)?b.port="80":/^(http|ws)s$/.test(b.protocol)&&(b.port="443")),b.path=b.path||"/",b.id=b.protocol+"://"+b.host+":"+b.port,b.href=b.protocol+"://"+b.host+(p&&p.port==b.port?"":":"+b.port),b}var c=r("parseuri"),f=r("debug")("socket.io-client:url");o.exports=s}).call(this,typeof self<"u"?self:typeof window<"u"?window:{})},{debug:10,parseuri:42}],7:[function(r,o){function n(s){s=s||{},this.ms=s.min||100,this.max=s.max||1e4,this.factor=s.factor||2,this.jitter=s.jitter>0&&s.jitter<=1?s.jitter:0,this.attempts=0}o.exports=n,n.prototype.duration=function(){var s=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var c=Math.random(),f=Math.floor(c*this.jitter*s);s=1&Math.floor(10*c)?s+f:s-f}return 0|Math.min(s,this.max)},n.prototype.reset=function(){this.attempts=0},n.prototype.setMin=function(s){this.ms=s},n.prototype.setMax=function(s){this.max=s},n.prototype.setJitter=function(s){this.jitter=s}},{}],8:[function(r,o){var n=[].slice;o.exports=function(s,c){if(typeof c=="string"&&(c=s[c]),typeof c!="function")throw new Error("bind() requires a function");var f=n.call(arguments,2);return function(){return c.apply(s,f.concat(n.call(arguments)))}}},{}],9:[function(r,o){function n(c){return c?s(c):void 0}function s(c){for(var f in n.prototype)c[f]=n.prototype[f];return c}o.exports=n,n.prototype.on=n.prototype.addEventListener=function(c,f){return this._callbacks=this._callbacks||{},(this._callbacks[c]=this._callbacks[c]||[]).push(f),this},n.prototype.once=function(c,f){function v(){d.off(c,v),f.apply(this,arguments)}var d=this;return this._callbacks=this._callbacks||{},v.fn=f,this.on(c,v),this},n.prototype.off=n.prototype.removeListener=n.prototype.removeAllListeners=n.prototype.removeEventListener=function(c,f){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var v=this._callbacks[c];if(!v)return this;if(arguments.length==1)return delete this._callbacks[c],this;for(var d,b=0;b<v.length;b++)if(d=v[b],d===f||d.fn===f){v.splice(b,1);break}return this},n.prototype.emit=function(c){this._callbacks=this._callbacks||{};var f=[].slice.call(arguments,1),v=this._callbacks[c];if(v){v=v.slice(0);for(var d=0,b=v.length;b>d;++d)v[d].apply(this,f)}return this},n.prototype.listeners=function(c){return this._callbacks=this._callbacks||{},this._callbacks[c]||[]},n.prototype.hasListeners=function(c){return!!this.listeners(c).length}},{}],10:[function(r,o){function n(c){return n.enabled(c)?function(f){f=s(f);var v=new Date,d=v-(n[c]||v);n[c]=v,f=c+" "+f+" +"+n.humanize(d),window.console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}:function(){}}function s(c){return c instanceof Error?c.stack||c.message:c}o.exports=n,n.names=[],n.skips=[],n.enable=function(c){try{localStorage.debug=c}catch{}for(var f=(c||"").split(/[\s,]+/),v=f.length,d=0;v>d;d++)c=f[d].replace("*",".*?"),c[0]==="-"?n.skips.push(new RegExp("^"+c.substr(1)+"$")):n.names.push(new RegExp("^"+c+"$"))},n.disable=function(){n.enable("")},n.humanize=function(c){var f=1e3,v=6e4,d=60*v;return c>=d?(c/d).toFixed(1)+"h":c>=v?(c/v).toFixed(1)+"m":c>=f?(c/f|0)+"s":c+"ms"},n.enabled=function(c){for(var f=0,v=n.skips.length;v>f;f++)if(n.skips[f].test(c))return!1;for(var f=0,v=n.names.length;v>f;f++)if(n.names[f].test(c))return!0;return!1};try{window.localStorage&&n.enable(localStorage.debug)}catch{}},{}],11:[function(r,o){o.exports=r("./lib/")},{"./lib/":12}],12:[function(r,o){o.exports=r("./socket"),o.exports.parser=r("engine.io-parser")},{"./socket":13,"engine.io-parser":25}],13:[function(r,o){(function(n){function s(u,_){if(!(this instanceof s))return new s(u,_);if(_=_||{},u&&typeof u=="object"&&(_=u,u=null),u&&(u=w(u),_.host=u.host,_.secure=u.protocol=="https"||u.protocol=="wss",_.port=u.port,u.query&&(_.query=u.query)),this.secure=_.secure!=null?_.secure:n.location&&location.protocol=="https:",_.host){var A=_.host.split(":");_.hostname=A.shift(),A.length?_.port=A.pop():_.port||(_.port=this.secure?"443":"80")}this.agent=_.agent||!1,this.hostname=_.hostname||(n.location?location.hostname:"localhost"),this.port=_.port||(n.location&&location.port?location.port:this.secure?443:80),this.query=_.query||{},typeof this.query=="string"&&(this.query=l.decode(this.query)),this.upgrade=_.upgrade!==!1,this.path=(_.path||"/engine.io").replace(/\/$/,"")+"/",this.forceJSONP=!!_.forceJSONP,this.jsonp=_.jsonp!==!1,this.forceBase64=!!_.forceBase64,this.enablesXDR=!!_.enablesXDR,this.timestampParam=_.timestampParam||"t",this.timestampRequests=_.timestampRequests,this.transports=_.transports||["polling","websocket"],this.readyState="",this.writeBuffer=[],this.callbackBuffer=[],this.policyPort=_.policyPort||843,this.rememberUpgrade=_.rememberUpgrade||!1,this.binaryType=null,this.onlyBinaryUpgrades=_.onlyBinaryUpgrades,this.pfx=_.pfx||null,this.key=_.key||null,this.passphrase=_.passphrase||null,this.cert=_.cert||null,this.ca=_.ca||null,this.ciphers=_.ciphers||null,this.rejectUnauthorized=_.rejectUnauthorized||null,this.open()}function c(u){var _={};for(var A in u)u.hasOwnProperty(A)&&(_[A]=u[A]);return _}var f=r("./transports"),v=r("component-emitter"),d=r("debug")("engine.io-client:socket"),b=r("indexof"),p=r("engine.io-parser"),w=r("parseuri"),g=r("parsejson"),l=r("parseqs");o.exports=s,s.priorWebsocketSuccess=!1,v(s.prototype),s.protocol=p.protocol,s.Socket=s,s.Transport=r("./transport"),s.transports=r("./transports"),s.parser=r("engine.io-parser"),s.prototype.createTransport=function(u){d('creating transport "%s"',u);var _=c(this.query);_.EIO=p.protocol,_.transport=u,this.id&&(_.sid=this.id);var A=new f[u]({agent:this.agent,hostname:this.hostname,port:this.port,secure:this.secure,path:this.path,query:_,forceJSONP:this.forceJSONP,jsonp:this.jsonp,forceBase64:this.forceBase64,enablesXDR:this.enablesXDR,timestampRequests:this.timestampRequests,timestampParam:this.timestampParam,policyPort:this.policyPort,socket:this,pfx:this.pfx,key:this.key,passphrase:this.passphrase,cert:this.cert,ca:this.ca,ciphers:this.ciphers,rejectUnauthorized:this.rejectUnauthorized});return A},s.prototype.open=function(){var _;if(this.rememberUpgrade&&s.priorWebsocketSuccess&&this.transports.indexOf("websocket")!=-1)_="websocket";else{if(this.transports.length==0){var u=this;return void setTimeout(function(){u.emit("error","No transports available")},0)}_=this.transports[0]}this.readyState="opening";var _;try{_=this.createTransport(_)}catch{return this.transports.shift(),void this.open()}_.open(),this.setTransport(_)},s.prototype.setTransport=function(u){d("setting transport %s",u.name);var _=this;this.transport&&(d("clearing existing transport %s",this.transport.name),this.transport.removeAllListeners()),this.transport=u,u.on("drain",function(){_.onDrain()}).on("packet",function(A){_.onPacket(A)}).on("error",function(A){_.onError(A)}).on("close",function(){_.onClose("transport close")})},s.prototype.probe=function(u){function _(){if(O.onlyBinaryUpgrades){var P=!this.supportsBinary&&O.transport.supportsBinary;T=T||P}T||(d('probe transport "%s" opened',u),U.send([{type:"ping",data:"probe"}]),U.once("packet",function(R){if(!T)if(R.type=="pong"&&R.data=="probe"){if(d('probe transport "%s" pong',u),O.upgrading=!0,O.emit("upgrading",U),!U)return;s.priorWebsocketSuccess=U.name=="websocket",d('pausing current transport "%s"',O.transport.name),O.transport.pause(function(){T||O.readyState!="closed"&&(d("changing transport and sending upgrade packet"),N(),O.setTransport(U),U.send([{type:"upgrade"}]),O.emit("upgrade",U),U=null,O.upgrading=!1,O.flush())})}else{d('probe transport "%s" failed',u);var L=new Error("probe error");L.transport=U.name,O.emit("upgradeError",L)}}))}function A(){T||(T=!0,N(),U.close(),U=null)}function k(P){var R=new Error("probe error: "+P);R.transport=U.name,A(),d('probe transport "%s" failed because of error: %s',u,P),O.emit("upgradeError",R)}function B(){k("transport closed")}function Y(){k("socket closed")}function j(P){U&&P.name!=U.name&&(d('"%s" works - aborting "%s"',P.name,U.name),A())}function N(){U.removeListener("open",_),U.removeListener("error",k),U.removeListener("close",B),O.removeListener("close",Y),O.removeListener("upgrading",j)}d('probing transport "%s"',u);var U=this.createTransport(u,{probe:1}),T=!1,O=this;s.priorWebsocketSuccess=!1,U.once("open",_),U.once("error",k),U.once("close",B),this.once("close",Y),this.once("upgrading",j),U.open()},s.prototype.onOpen=function(){if(d("socket open"),this.readyState="open",s.priorWebsocketSuccess=this.transport.name=="websocket",this.emit("open"),this.flush(),this.readyState=="open"&&this.upgrade&&this.transport.pause){d("starting upgrade probes");for(var u=0,_=this.upgrades.length;_>u;u++)this.probe(this.upgrades[u])}},s.prototype.onPacket=function(u){if(this.readyState=="opening"||this.readyState=="open")switch(d('socket receive: type "%s", data "%s"',u.type,u.data),this.emit("packet",u),this.emit("heartbeat"),u.type){case"open":this.onHandshake(g(u.data));break;case"pong":this.setPing();break;case"error":var _=new Error("server error");_.code=u.data,this.emit("error",_);break;case"message":this.emit("data",u.data),this.emit("message",u.data)}else d('packet received with socket readyState "%s"',this.readyState)},s.prototype.onHandshake=function(u){this.emit("handshake",u),this.id=u.sid,this.transport.query.sid=u.sid,this.upgrades=this.filterUpgrades(u.upgrades),this.pingInterval=u.pingInterval,this.pingTimeout=u.pingTimeout,this.onOpen(),this.readyState!="closed"&&(this.setPing(),this.removeListener("heartbeat",this.onHeartbeat),this.on("heartbeat",this.onHeartbeat))},s.prototype.onHeartbeat=function(u){clearTimeout(this.pingTimeoutTimer);var _=this;_.pingTimeoutTimer=setTimeout(function(){_.readyState!="closed"&&_.onClose("ping timeout")},u||_.pingInterval+_.pingTimeout)},s.prototype.setPing=function(){var u=this;clearTimeout(u.pingIntervalTimer),u.pingIntervalTimer=setTimeout(function(){d("writing ping packet - expecting pong within %sms",u.pingTimeout),u.ping(),u.onHeartbeat(u.pingTimeout)},u.pingInterval)},s.prototype.ping=function(){this.sendPacket("ping")},s.prototype.onDrain=function(){for(var u=0;u<this.prevBufferLen;u++)this.callbackBuffer[u]&&this.callbackBuffer[u]();this.writeBuffer.splice(0,this.prevBufferLen),this.callbackBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,this.writeBuffer.length==0?this.emit("drain"):this.flush()},s.prototype.flush=function(){this.readyState!="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length&&(d("flushing %d packets in socket",this.writeBuffer.length),this.transport.send(this.writeBuffer),this.prevBufferLen=this.writeBuffer.length,this.emit("flush"))},s.prototype.write=s.prototype.send=function(u,_){return this.sendPacket("message",u,_),this},s.prototype.sendPacket=function(u,_,A){if(this.readyState!="closing"&&this.readyState!="closed"){var k={type:u,data:_};this.emit("packetCreate",k),this.writeBuffer.push(k),this.callbackBuffer.push(A),this.flush()}},s.prototype.close=function(){function u(){k.onClose("forced close"),d("socket closing - telling transport to close"),k.transport.close()}function _(){k.removeListener("upgrade",_),k.removeListener("upgradeError",_),u()}function A(){k.once("upgrade",_),k.once("upgradeError",_)}if(this.readyState=="opening"||this.readyState=="open"){this.readyState="closing";var k=this;this.writeBuffer.length?this.once("drain",function(){this.upgrading?A():u()}):this.upgrading?A():u()}return this},s.prototype.onError=function(u){d("socket error %j",u),s.priorWebsocketSuccess=!1,this.emit("error",u),this.onClose("transport error",u)},s.prototype.onClose=function(u,_){if(this.readyState=="opening"||this.readyState=="open"||this.readyState=="closing"){d('socket close with reason: "%s"',u);var A=this;clearTimeout(this.pingIntervalTimer),clearTimeout(this.pingTimeoutTimer),setTimeout(function(){A.writeBuffer=[],A.callbackBuffer=[],A.prevBufferLen=0},0),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),this.readyState="closed",this.id=null,this.emit("close",u,_)}},s.prototype.filterUpgrades=function(u){for(var _=[],A=0,k=u.length;k>A;A++)~b(this.transports,u[A])&&_.push(u[A]);return _}}).call(this,typeof self<"u"?self:typeof window<"u"?window:{})},{"./transport":14,"./transports":15,"component-emitter":9,debug:22,"engine.io-parser":25,indexof:40,parsejson:32,parseqs:33,parseuri:34}],14:[function(r,o){function n(f){this.path=f.path,this.hostname=f.hostname,this.port=f.port,this.secure=f.secure,this.query=f.query,this.timestampParam=f.timestampParam,this.timestampRequests=f.timestampRequests,this.readyState="",this.agent=f.agent||!1,this.socket=f.socket,this.enablesXDR=f.enablesXDR,this.pfx=f.pfx,this.key=f.key,this.passphrase=f.passphrase,this.cert=f.cert,this.ca=f.ca,this.ciphers=f.ciphers,this.rejectUnauthorized=f.rejectUnauthorized}var s=r("engine.io-parser"),c=r("component-emitter");o.exports=n,c(n.prototype),n.timestamps=0,n.prototype.onError=function(f,v){var d=new Error(f);return d.type="TransportError",d.description=v,this.emit("error",d),this},n.prototype.open=function(){return(this.readyState=="closed"||this.readyState=="")&&(this.readyState="opening",this.doOpen()),this},n.prototype.close=function(){return(this.readyState=="opening"||this.readyState=="open")&&(this.doClose(),this.onClose()),this},n.prototype.send=function(f){if(this.readyState!="open")throw new Error("Transport not open");this.write(f)},n.prototype.onOpen=function(){this.readyState="open",this.writable=!0,this.emit("open")},n.prototype.onData=function(f){var v=s.decodePacket(f,this.socket.binaryType);this.onPacket(v)},n.prototype.onPacket=function(f){this.emit("packet",f)},n.prototype.onClose=function(){this.readyState="closed",this.emit("close")}},{"component-emitter":9,"engine.io-parser":25}],15:[function(r,o,n){(function(s){function c(p){var w,g=!1,l=!1,u=p.jsonp!==!1;if(s.location){var _=location.protocol=="https:",A=location.port;A||(A=_?443:80),g=p.hostname!=location.hostname||A!=p.port,l=p.secure!=_}if(p.xdomain=g,p.xscheme=l,w=new f(p),"open"in w&&!p.forceJSONP)return new v(p);if(!u)throw new Error("JSONP disabled");return new d(p)}var f=r("xmlhttprequest"),v=r("./polling-xhr"),d=r("./polling-jsonp"),b=r("./websocket");n.polling=c,n.websocket=b}).call(this,typeof self<"u"?self:typeof window<"u"?window:{})},{"./polling-jsonp":16,"./polling-xhr":17,"./websocket":19,xmlhttprequest:20}],16:[function(r,o){(function(n){function s(){}function c(w){f.call(this,w),this.query=this.query||{},d||(n.___eio||(n.___eio=[]),d=n.___eio),this.index=d.length;var g=this;d.push(function(l){g.onData(l)}),this.query.j=this.index,n.document&&n.addEventListener&&n.addEventListener("beforeunload",function(){g.script&&(g.script.onerror=s)},!1)}var f=r("./polling"),v=r("component-inherit");o.exports=c;var d,b=/\n/g,p=/\\n/g;v(c,f),c.prototype.supportsBinary=!1,c.prototype.doClose=function(){this.script&&(this.script.parentNode.removeChild(this.script),this.script=null),this.form&&(this.form.parentNode.removeChild(this.form),this.form=null,this.iframe=null),f.prototype.doClose.call(this)},c.prototype.doPoll=function(){var w=this,g=document.createElement("script");this.script&&(this.script.parentNode.removeChild(this.script),this.script=null),g.async=!0,g.src=this.uri(),g.onerror=function(_){w.onError("jsonp poll error",_)};var l=document.getElementsByTagName("script")[0];l.parentNode.insertBefore(g,l),this.script=g;var u=typeof navigator<"u"&&/gecko/i.test(navigator.userAgent);u&&setTimeout(function(){var _=document.createElement("iframe");document.body.appendChild(_),document.body.removeChild(_)},100)},c.prototype.doWrite=function(w,g){function l(){u(),g()}function u(){if(_.iframe)try{_.form.removeChild(_.iframe)}catch(N){_.onError("jsonp polling iframe removal error",N)}try{var j='<iframe src="javascript:0" name="'+_.iframeId+'">';A=document.createElement(j)}catch{A=document.createElement("iframe"),A.name=_.iframeId,A.src="javascript:0"}A.id=_.iframeId,_.form.appendChild(A),_.iframe=A}var _=this;if(!this.form){var A,k=document.createElement("form"),B=document.createElement("textarea"),Y=this.iframeId="eio_iframe_"+this.index;k.className="socketio",k.style.position="absolute",k.style.top="-1000px",k.style.left="-1000px",k.target=Y,k.method="POST",k.setAttribute("accept-charset","utf-8"),B.name="d",k.appendChild(B),document.body.appendChild(k),this.form=k,this.area=B}this.form.action=this.uri(),u(),w=w.replace(p,`\\
|
|
33
|
+
`),this.area.value=w.replace(b,"\\n");try{this.form.submit()}catch{}this.iframe.attachEvent?this.iframe.onreadystatechange=function(){_.iframe.readyState=="complete"&&l()}:this.iframe.onload=l}}).call(this,typeof self<"u"?self:typeof window<"u"?window:{})},{"./polling":18,"component-inherit":21}],17:[function(r,o){(function(n){function s(){}function c(l){if(b.call(this,l),n.location){var u=location.protocol=="https:",_=location.port;_||(_=u?443:80),this.xd=l.hostname!=n.location.hostname||_!=l.port,this.xs=l.secure!=u}}function f(l){this.method=l.method||"GET",this.uri=l.uri,this.xd=!!l.xd,this.xs=!!l.xs,this.async=l.async!==!1,this.data=l.data!=null?l.data:null,this.agent=l.agent,this.isBinary=l.isBinary,this.supportsBinary=l.supportsBinary,this.enablesXDR=l.enablesXDR,this.pfx=l.pfx,this.key=l.key,this.passphrase=l.passphrase,this.cert=l.cert,this.ca=l.ca,this.ciphers=l.ciphers,this.rejectUnauthorized=l.rejectUnauthorized,this.create()}function v(){for(var l in f.requests)f.requests.hasOwnProperty(l)&&f.requests[l].abort()}var d=r("xmlhttprequest"),b=r("./polling"),p=r("component-emitter"),w=r("component-inherit"),g=r("debug")("engine.io-client:polling-xhr");o.exports=c,o.exports.Request=f,w(c,b),c.prototype.supportsBinary=!0,c.prototype.request=function(l){return l=l||{},l.uri=this.uri(),l.xd=this.xd,l.xs=this.xs,l.agent=this.agent||!1,l.supportsBinary=this.supportsBinary,l.enablesXDR=this.enablesXDR,l.pfx=this.pfx,l.key=this.key,l.passphrase=this.passphrase,l.cert=this.cert,l.ca=this.ca,l.ciphers=this.ciphers,l.rejectUnauthorized=this.rejectUnauthorized,new f(l)},c.prototype.doWrite=function(l,u){var _=typeof l!="string"&&l!==void 0,A=this.request({method:"POST",data:l,isBinary:_}),k=this;A.on("success",u),A.on("error",function(B){k.onError("xhr post error",B)}),this.sendXhr=A},c.prototype.doPoll=function(){g("xhr poll");var l=this.request(),u=this;l.on("data",function(_){u.onData(_)}),l.on("error",function(_){u.onError("xhr poll error",_)}),this.pollXhr=l},p(f.prototype),f.prototype.create=function(){var l={agent:this.agent,xdomain:this.xd,xscheme:this.xs,enablesXDR:this.enablesXDR};l.pfx=this.pfx,l.key=this.key,l.passphrase=this.passphrase,l.cert=this.cert,l.ca=this.ca,l.ciphers=this.ciphers,l.rejectUnauthorized=this.rejectUnauthorized;var u=this.xhr=new d(l),_=this;try{if(g("xhr open %s: %s",this.method,this.uri),u.open(this.method,this.uri,this.async),this.supportsBinary&&(u.responseType="arraybuffer"),this.method=="POST")try{this.isBinary?u.setRequestHeader("Content-type","application/octet-stream"):u.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}"withCredentials"in u&&(u.withCredentials=!0),this.hasXDR()?(u.onload=function(){_.onLoad()},u.onerror=function(){_.onError(u.responseText)}):u.onreadystatechange=function(){u.readyState==4&&(u.status==200||u.status==1223?_.onLoad():setTimeout(function(){_.onError(u.status)},0))},g("xhr data %s",this.data),u.send(this.data)}catch(A){return void setTimeout(function(){_.onError(A)},0)}n.document&&(this.index=f.requestsCount++,f.requests[this.index]=this)},f.prototype.onSuccess=function(){this.emit("success"),this.cleanup()},f.prototype.onData=function(l){this.emit("data",l),this.onSuccess()},f.prototype.onError=function(l){this.emit("error",l),this.cleanup(!0)},f.prototype.cleanup=function(l){if(typeof this.xhr<"u"&&this.xhr!==null){if(this.hasXDR()?this.xhr.onload=this.xhr.onerror=s:this.xhr.onreadystatechange=s,l)try{this.xhr.abort()}catch{}n.document&&delete f.requests[this.index],this.xhr=null}},f.prototype.onLoad=function(){var l;try{var u;try{u=this.xhr.getResponseHeader("Content-Type").split(";")[0]}catch{}l=u==="application/octet-stream"?this.xhr.response:this.supportsBinary?"ok":this.xhr.responseText}catch(_){this.onError(_)}l!=null&&this.onData(l)},f.prototype.hasXDR=function(){return typeof n.XDomainRequest<"u"&&!this.xs&&this.enablesXDR},f.prototype.abort=function(){this.cleanup()},n.document&&(f.requestsCount=0,f.requests={},n.attachEvent?n.attachEvent("onunload",v):n.addEventListener&&n.addEventListener("beforeunload",v,!1))}).call(this,typeof self<"u"?self:typeof window<"u"?window:{})},{"./polling":18,"component-emitter":9,"component-inherit":21,debug:22,xmlhttprequest:20}],18:[function(r,o){function n(p){var w=p&&p.forceBase64;(!b||w)&&(this.supportsBinary=!1),s.call(this,p)}var s=r("../transport"),c=r("parseqs"),f=r("engine.io-parser"),v=r("component-inherit"),d=r("debug")("engine.io-client:polling");o.exports=n;var b=function(){var p=r("xmlhttprequest"),w=new p({xdomain:!1});return w.responseType!=null}();v(n,s),n.prototype.name="polling",n.prototype.doOpen=function(){this.poll()},n.prototype.pause=function(p){function w(){d("paused"),g.readyState="paused",p()}var g=this;if(this.readyState="pausing",this.polling||!this.writable){var l=0;this.polling&&(d("we are currently polling - waiting to pause"),l++,this.once("pollComplete",function(){d("pre-pause polling complete"),--l||w()})),this.writable||(d("we are currently writing - waiting to pause"),l++,this.once("drain",function(){d("pre-pause writing complete"),--l||w()}))}else w()},n.prototype.poll=function(){d("polling"),this.polling=!0,this.doPoll(),this.emit("poll")},n.prototype.onData=function(p){var w=this;d("polling got data %s",p);var g=function(l){return w.readyState=="opening"&&w.onOpen(),l.type=="close"?(w.onClose(),!1):void w.onPacket(l)};f.decodePayload(p,this.socket.binaryType,g),this.readyState!="closed"&&(this.polling=!1,this.emit("pollComplete"),this.readyState=="open"?this.poll():d('ignoring poll - transport state "%s"',this.readyState))},n.prototype.doClose=function(){function p(){d("writing close packet"),w.write([{type:"close"}])}var w=this;this.readyState=="open"?(d("transport open - closing"),p()):(d("transport not open - deferring close"),this.once("open",p))},n.prototype.write=function(p){var g=this;this.writable=!1;var w=function(){g.writable=!0,g.emit("drain")},g=this;f.encodePayload(p,this.supportsBinary,function(l){g.doWrite(l,w)})},n.prototype.uri=function(){var p=this.query||{},w=this.secure?"https":"http",g="";return this.timestampRequests!==!1&&(p[this.timestampParam]=+new Date+"-"+s.timestamps++),this.supportsBinary||p.sid||(p.b64=1),p=c.encode(p),this.port&&(w=="https"&&this.port!=443||w=="http"&&this.port!=80)&&(g=":"+this.port),p.length&&(p="?"+p),w+"://"+this.hostname+g+this.path+p}},{"../transport":14,"component-inherit":21,debug:22,"engine.io-parser":25,parseqs:33,xmlhttprequest:20}],19:[function(r,o){function n(p){var w=p&&p.forceBase64;w&&(this.supportsBinary=!1),s.call(this,p)}var s=r("../transport"),c=r("engine.io-parser"),f=r("parseqs"),v=r("component-inherit"),d=r("debug")("engine.io-client:websocket"),b=r("ws");o.exports=n,v(n,s),n.prototype.name="websocket",n.prototype.supportsBinary=!0,n.prototype.doOpen=function(){if(this.check()){var p=this.uri(),w=void 0,g={agent:this.agent};g.pfx=this.pfx,g.key=this.key,g.passphrase=this.passphrase,g.cert=this.cert,g.ca=this.ca,g.ciphers=this.ciphers,g.rejectUnauthorized=this.rejectUnauthorized,this.ws=new b(p,w,g),this.ws.binaryType===void 0&&(this.supportsBinary=!1),this.ws.binaryType="arraybuffer",this.addEventListeners()}},n.prototype.addEventListeners=function(){var p=this;this.ws.onopen=function(){p.onOpen()},this.ws.onclose=function(){p.onClose()},this.ws.onmessage=function(w){p.onData(w.data)},this.ws.onerror=function(w){p.onError("websocket error",w)}},typeof navigator<"u"&&/iPad|iPhone|iPod/i.test(navigator.userAgent)&&(n.prototype.onData=function(p){var w=this;setTimeout(function(){s.prototype.onData.call(w,p)},0)}),n.prototype.write=function(p){function w(){g.writable=!0,g.emit("drain")}var g=this;this.writable=!1;for(var l=0,u=p.length;u>l;l++)c.encodePacket(p[l],this.supportsBinary,function(_){try{g.ws.send(_)}catch{d("websocket closed before onclose event")}});setTimeout(w,0)},n.prototype.onClose=function(){s.prototype.onClose.call(this)},n.prototype.doClose=function(){typeof this.ws<"u"&&this.ws.close()},n.prototype.uri=function(){var p=this.query||{},w=this.secure?"wss":"ws",g="";return this.port&&(w=="wss"&&this.port!=443||w=="ws"&&this.port!=80)&&(g=":"+this.port),this.timestampRequests&&(p[this.timestampParam]=+new Date),this.supportsBinary||(p.b64=1),p=f.encode(p),p.length&&(p="?"+p),w+"://"+this.hostname+g+this.path+p},n.prototype.check=function(){return!(!b||"__initialize"in b&&this.name===n.prototype.name)}},{"../transport":14,"component-inherit":21,debug:22,"engine.io-parser":25,parseqs:33,ws:35}],20:[function(r,o){var n=r("has-cors");o.exports=function(s){var c=s.xdomain,f=s.xscheme,v=s.enablesXDR;try{if(typeof XMLHttpRequest<"u"&&(!c||n))return new XMLHttpRequest}catch{}try{if(typeof XDomainRequest<"u"&&!f&&v)return new XDomainRequest}catch{}if(!c)try{return new ActiveXObject("Microsoft.XMLHTTP")}catch{}}},{"has-cors":38}],21:[function(r,o){o.exports=function(n,s){var c=function(){};c.prototype=s.prototype,n.prototype=new c,n.prototype.constructor=n}},{}],22:[function(r,o,n){function s(){return"WebkitAppearance"in document.documentElement.style||window.console&&(console.firebug||console.exception&&console.table)||navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31}function c(){var b=arguments,p=this.useColors;if(b[0]=(p?"%c":"")+this.namespace+(p?" %c":" ")+b[0]+(p?"%c ":" ")+"+"+n.humanize(this.diff),!p)return b;var w="color: "+this.color;b=[b[0],w,"color: inherit"].concat(Array.prototype.slice.call(b,1));var g=0,l=0;return b[0].replace(/%[a-z%]/g,function(u){u!=="%%"&&(g++,u==="%c"&&(l=g))}),b.splice(l,0,w),b}function f(){return typeof console=="object"&&typeof console.log=="function"&&Function.prototype.apply.call(console.log,console,arguments)}function v(b){try{b==null?localStorage.removeItem("debug"):localStorage.debug=b}catch{}}function d(){var b;try{b=localStorage.debug}catch{}return b}n=o.exports=r("./debug"),n.log=f,n.formatArgs=c,n.save=v,n.load=d,n.useColors=s,n.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"],n.formatters.j=function(b){return JSON.stringify(b)},n.enable(d())},{"./debug":23}],23:[function(r,o,n){function s(){return n.colors[w++%n.colors.length]}function c(g){function l(){}function u(){var A=u,k=+new Date,B=k-(p||k);A.diff=B,A.prev=p,A.curr=k,p=k,A.useColors==null&&(A.useColors=n.useColors()),A.color==null&&A.useColors&&(A.color=s());var Y=Array.prototype.slice.call(arguments);Y[0]=n.coerce(Y[0]),typeof Y[0]!="string"&&(Y=["%o"].concat(Y));var j=0;Y[0]=Y[0].replace(/%([a-z%])/g,function(U,T){if(U==="%%")return U;j++;var O=n.formatters[T];if(typeof O=="function"){var P=Y[j];U=O.call(A,P),Y.splice(j,1),j--}return U}),typeof n.formatArgs=="function"&&(Y=n.formatArgs.apply(A,Y));var N=u.log||n.log||console.log.bind(console);N.apply(A,Y)}l.enabled=!1,u.enabled=!0;var _=n.enabled(g)?u:l;return _.namespace=g,_}function f(g){n.save(g);for(var l=(g||"").split(/[\s,]+/),u=l.length,_=0;u>_;_++)l[_]&&(g=l[_].replace(/\*/g,".*?"),g[0]==="-"?n.skips.push(new RegExp("^"+g.substr(1)+"$")):n.names.push(new RegExp("^"+g+"$")))}function v(){n.enable("")}function d(g){var l,u;for(l=0,u=n.skips.length;u>l;l++)if(n.skips[l].test(g))return!1;for(l=0,u=n.names.length;u>l;l++)if(n.names[l].test(g))return!0;return!1}function b(g){return g instanceof Error?g.stack||g.message:g}n=o.exports=c,n.coerce=b,n.disable=v,n.enable=f,n.enabled=d,n.humanize=r("ms"),n.names=[],n.skips=[],n.formatters={};var p,w=0},{ms:24}],24:[function(r,o){function n(g){var l=/^((?:\d+)?\.?\d+) *(ms|seconds?|s|minutes?|m|hours?|h|days?|d|years?|y)?$/i.exec(g);if(l){var u=parseFloat(l[1]),_=(l[2]||"ms").toLowerCase();switch(_){case"years":case"year":case"y":return u*w;case"days":case"day":case"d":return u*p;case"hours":case"hour":case"h":return u*b;case"minutes":case"minute":case"m":return u*d;case"seconds":case"second":case"s":return u*v;case"ms":return u}}}function s(g){return g>=p?Math.round(g/p)+"d":g>=b?Math.round(g/b)+"h":g>=d?Math.round(g/d)+"m":g>=v?Math.round(g/v)+"s":g+"ms"}function c(g){return f(g,p,"day")||f(g,b,"hour")||f(g,d,"minute")||f(g,v,"second")||g+" ms"}function f(g,l,u){return l>g?void 0:1.5*l>g?Math.floor(g/l)+" "+u:Math.ceil(g/l)+" "+u+"s"}var v=1e3,d=60*v,b=60*d,p=24*b,w=365.25*p;o.exports=function(g,l){return l=l||{},typeof g=="string"?n(g):l.long?c(g):s(g)}},{}],25:[function(r,o,n){(function(s){function c(T,O){var P="b"+n.packets[T.type]+T.data.data;return O(P)}function f(T,O,P){if(!O)return n.encodeBase64Packet(T,P);var R=T.data,L=new Uint8Array(R),H=new Uint8Array(1+R.byteLength);H[0]=Y[T.type];for(var K=0;K<L.length;K++)H[K+1]=L[K];return P(H.buffer)}function v(T,O,P){if(!O)return n.encodeBase64Packet(T,P);var R=new FileReader;return R.onload=function(){T.data=R.result,n.encodePacket(T,O,!0,P)},R.readAsArrayBuffer(T.data)}function d(T,O,P){if(!O)return n.encodeBase64Packet(T,P);if(B)return v(T,O,P);var R=new Uint8Array(1);R[0]=Y[T.type];var L=new U([R.buffer,T.data]);return P(L)}function b(T,O,P){for(var R=new Array(T.length),L=u(T.length,P),H=function(X,F,lt){O(F,function(ct,xt){R[X]=xt,lt(ct,R)})},K=0;K<T.length;K++)H(K,T[K],L)}var p=r("./keys"),w=r("has-binary"),g=r("arraybuffer.slice"),l=r("base64-arraybuffer"),u=r("after"),_=r("utf8"),A=navigator.userAgent.match(/Android/i),k=/PhantomJS/i.test(navigator.userAgent),B=A||k;n.protocol=3;var Y=n.packets={open:0,close:1,ping:2,pong:3,message:4,upgrade:5,noop:6},j=p(Y),N={type:"error",data:"parser error"},U=r("blob");n.encodePacket=function(T,O,P,R){typeof O=="function"&&(R=O,O=!1),typeof P=="function"&&(R=P,P=null);var L=T.data===void 0?void 0:T.data.buffer||T.data;if(s.ArrayBuffer&&L instanceof ArrayBuffer)return f(T,O,R);if(U&&L instanceof s.Blob)return d(T,O,R);if(L&&L.base64)return c(T,R);var H=Y[T.type];return T.data!==void 0&&(H+=P?_.encode(String(T.data)):String(T.data)),R(""+H)},n.encodeBase64Packet=function(T,O){var P="b"+n.packets[T.type];if(U&&T.data instanceof U){var R=new FileReader;return R.onload=function(){var F=R.result.split(",")[1];O(P+F)},R.readAsDataURL(T.data)}var L;try{L=String.fromCharCode.apply(null,new Uint8Array(T.data))}catch{for(var H=new Uint8Array(T.data),K=new Array(H.length),X=0;X<H.length;X++)K[X]=H[X];L=String.fromCharCode.apply(null,K)}return P+=s.btoa(L),O(P)},n.decodePacket=function(T,O,P){if(typeof T=="string"||T===void 0){if(T.charAt(0)=="b")return n.decodeBase64Packet(T.substr(1),O);if(P)try{T=_.decode(T)}catch{return N}var L=T.charAt(0);return Number(L)==L&&j[L]?T.length>1?{type:j[L],data:T.substring(1)}:{type:j[L]}:N}var R=new Uint8Array(T),L=R[0],H=g(T,1);return U&&O==="blob"&&(H=new U([H])),{type:j[L],data:H}},n.decodeBase64Packet=function(T,O){var P=j[T.charAt(0)];if(!s.ArrayBuffer)return{type:P,data:{base64:!0,data:T.substr(1)}};var R=l.decode(T.substr(1));return O==="blob"&&U&&(R=new U([R])),{type:P,data:R}},n.encodePayload=function(T,O,P){function R(K){return K.length+":"+K}function L(K,X){n.encodePacket(K,H?O:!1,!0,function(F){X(null,R(F))})}typeof O=="function"&&(P=O,O=null);var H=w(T);return O&&H?U&&!B?n.encodePayloadAsBlob(T,P):n.encodePayloadAsArrayBuffer(T,P):T.length?void b(T,L,function(K,X){return P(X.join(""))}):P("0:")},n.decodePayload=function(T,O,P){if(typeof T!="string")return n.decodePayloadAsBinary(T,O,P);typeof O=="function"&&(P=O,O=null);var R;if(T=="")return P(N,0,1);for(var L,H,K="",X=0,F=T.length;F>X;X++){var lt=T.charAt(X);if(lt!=":")K+=lt;else{if(K==""||K!=(L=Number(K))||(H=T.substr(X+1,L),K!=H.length))return P(N,0,1);if(H.length){if(R=n.decodePacket(H,O,!0),N.type==R.type&&N.data==R.data)return P(N,0,1);var ct=P(R,X+L,F);if(ct===!1)return}X+=L,K=""}}return K!=""?P(N,0,1):void 0},n.encodePayloadAsArrayBuffer=function(T,O){function P(R,L){n.encodePacket(R,!0,!0,function(H){return L(null,H)})}return T.length?void b(T,P,function(R,L){var H=L.reduce(function(F,lt){var ct;return ct=typeof lt=="string"?lt.length:lt.byteLength,F+ct.toString().length+ct+2},0),K=new Uint8Array(H),X=0;return L.forEach(function(F){var lt=typeof F=="string",ct=F;if(lt){for(var xt=new Uint8Array(F.length),ut=0;ut<F.length;ut++)xt[ut]=F.charCodeAt(ut);ct=xt.buffer}K[X++]=lt?0:1;for(var Xt=ct.byteLength.toString(),ut=0;ut<Xt.length;ut++)K[X++]=parseInt(Xt[ut]);K[X++]=255;for(var xt=new Uint8Array(ct),ut=0;ut<xt.length;ut++)K[X++]=xt[ut]}),O(K.buffer)}):O(new ArrayBuffer(0))},n.encodePayloadAsBlob=function(T,O){function P(R,L){n.encodePacket(R,!0,!0,function(H){var K=new Uint8Array(1);if(K[0]=1,typeof H=="string"){for(var X=new Uint8Array(H.length),F=0;F<H.length;F++)X[F]=H.charCodeAt(F);H=X.buffer,K[0]=0}for(var lt=H instanceof ArrayBuffer?H.byteLength:H.size,ct=lt.toString(),xt=new Uint8Array(ct.length+1),F=0;F<ct.length;F++)xt[F]=parseInt(ct[F]);if(xt[ct.length]=255,U){var ut=new U([K.buffer,xt.buffer,H]);L(null,ut)}})}b(T,P,function(R,L){return O(new U(L))})},n.decodePayloadAsBinary=function(T,O,P){typeof O=="function"&&(P=O,O=null);for(var R=T,L=[],H=!1;R.byteLength>0;){for(var K=new Uint8Array(R),X=K[0]===0,F="",lt=1;K[lt]!=255;lt++){if(F.length>310){H=!0;break}F+=K[lt]}if(H)return P(N,0,1);R=g(R,2+F.length),F=parseInt(F);var ct=g(R,0,F);if(X)try{ct=String.fromCharCode.apply(null,new Uint8Array(ct))}catch{var xt=new Uint8Array(ct);ct="";for(var lt=0;lt<xt.length;lt++)ct+=String.fromCharCode(xt[lt])}L.push(ct),R=g(R,F)}var ut=L.length;L.forEach(function(Xt,Ie){P(n.decodePacket(Xt,O,!0),Ie,ut)})}}).call(this,typeof self<"u"?self:typeof window<"u"?window:{})},{"./keys":26,after:27,"arraybuffer.slice":28,"base64-arraybuffer":29,blob:30,"has-binary":36,utf8:31}],26:[function(r,o){o.exports=Object.keys||function(n){var s=[],c=Object.prototype.hasOwnProperty;for(var f in n)c.call(n,f)&&s.push(f);return s}},{}],27:[function(r,o){function n(c,f,v){function d(p,w){if(d.count<=0)throw new Error("after called too many times");--d.count,p?(b=!0,f(p),f=v):d.count!==0||b||f(null,w)}var b=!1;return v=v||s,d.count=c,c===0?f():d}function s(){}o.exports=n},{}],28:[function(r,o){o.exports=function(n,s,c){var f=n.byteLength;if(s=s||0,c=c||f,n.slice)return n.slice(s,c);if(0>s&&(s+=f),0>c&&(c+=f),c>f&&(c=f),s>=f||s>=c||f===0)return new ArrayBuffer(0);for(var v=new Uint8Array(n),d=new Uint8Array(c-s),b=s,p=0;c>b;b++,p++)d[p]=v[b];return d.buffer}},{}],29:[function(r,o,n){(function(s){n.encode=function(c){var f,v=new Uint8Array(c),d=v.length,b="";for(f=0;d>f;f+=3)b+=s[v[f]>>2],b+=s[(3&v[f])<<4|v[f+1]>>4],b+=s[(15&v[f+1])<<2|v[f+2]>>6],b+=s[63&v[f+2]];return d%3===2?b=b.substring(0,b.length-1)+"=":d%3===1&&(b=b.substring(0,b.length-2)+"=="),b},n.decode=function(c){var f,v,d,b,p,w=.75*c.length,g=c.length,l=0;c[c.length-1]==="="&&(w--,c[c.length-2]==="="&&w--);var u=new ArrayBuffer(w),_=new Uint8Array(u);for(f=0;g>f;f+=4)v=s.indexOf(c[f]),d=s.indexOf(c[f+1]),b=s.indexOf(c[f+2]),p=s.indexOf(c[f+3]),_[l++]=v<<2|d>>4,_[l++]=(15&d)<<4|b>>2,_[l++]=(3&b)<<6|63&p;return u}})("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/")},{}],30:[function(r,o){(function(n){function s(w){for(var g=0;g<w.length;g++){var l=w[g];if(l.buffer instanceof ArrayBuffer){var u=l.buffer;if(l.byteLength!==u.byteLength){var _=new Uint8Array(l.byteLength);_.set(new Uint8Array(u,l.byteOffset,l.byteLength)),u=_.buffer}w[g]=u}}}function c(w,g){g=g||{};var l=new v;s(w);for(var u=0;u<w.length;u++)l.append(w[u]);return g.type?l.getBlob(g.type):l.getBlob()}function f(w,g){return s(w),new Blob(w,g||{})}var v=n.BlobBuilder||n.WebKitBlobBuilder||n.MSBlobBuilder||n.MozBlobBuilder,d=function(){try{var w=new Blob(["hi"]);return w.size===2}catch{return!1}}(),b=d&&function(){try{var w=new Blob([new Uint8Array([1,2])]);return w.size===2}catch{return!1}}(),p=v&&v.prototype.append&&v.prototype.getBlob;o.exports=function(){return d?b?n.Blob:f:p?c:void 0}()}).call(this,typeof self<"u"?self:typeof window<"u"?window:{})},{}],31:[function(r,o,n){(function(s){(function(c){function f(R){for(var L,H,K=[],X=0,F=R.length;F>X;)L=R.charCodeAt(X++),L>=55296&&56319>=L&&F>X?(H=R.charCodeAt(X++),(64512&H)==56320?K.push(((1023&L)<<10)+(1023&H)+65536):(K.push(L),X--)):K.push(L);return K}function v(R){for(var L,H=R.length,K=-1,X="";++K<H;)L=R[K],L>65535&&(L-=65536,X+=N(L>>>10&1023|55296),L=56320|1023&L),X+=N(L);return X}function d(R){if(R>=55296&&57343>=R)throw Error("Lone surrogate U+"+R.toString(16).toUpperCase()+" is not a scalar value")}function b(R,L){return N(R>>L&63|128)}function p(R){if(!(4294967168&R))return N(R);var L="";return 4294965248&R?4294901760&R?!(4292870144&R)&&(L=N(R>>18&7|240),L+=b(R,12),L+=b(R,6)):(d(R),L=N(R>>12&15|224),L+=b(R,6)):L=N(R>>6&31|192),L+=N(63&R|128)}function w(R){for(var L,H=f(R),K=H.length,X=-1,F="";++X<K;)L=H[X],F+=p(L);return F}function g(){if(j>=Y)throw Error("Invalid byte index");var R=255&B[j];if(j++,(192&R)==128)return 63&R;throw Error("Invalid continuation byte")}function l(){var R,L,H,K,X;if(j>Y)throw Error("Invalid byte index");if(j==Y)return!1;if(R=255&B[j],j++,(128&R)==0)return R;if((224&R)==192){var L=g();if(X=(31&R)<<6|L,X>=128)return X;throw Error("Invalid continuation byte")}if((240&R)==224){if(L=g(),H=g(),X=(15&R)<<12|L<<6|H,X>=2048)return d(X),X;throw Error("Invalid continuation byte")}if((248&R)==240&&(L=g(),H=g(),K=g(),X=(15&R)<<18|L<<12|H<<6|K,X>=65536&&1114111>=X))return X;throw Error("Invalid UTF-8 detected")}function u(R){B=f(R),Y=B.length,j=0;for(var L,H=[];(L=l())!==!1;)H.push(L);return v(H)}var _=typeof n=="object"&&n,A=typeof o=="object"&&o&&o.exports==_&&o,k=typeof s=="object"&&s;(k.global===k||k.window===k)&&(c=k);var B,Y,j,N=String.fromCharCode,U={version:"2.0.0",encode:w,decode:u};if(_&&!_.nodeType)if(A)A.exports=U;else{var T={},O=T.hasOwnProperty;for(var P in U)O.call(U,P)&&(_[P]=U[P])}else c.utf8=U})(this)}).call(this,typeof self<"u"?self:typeof window<"u"?window:{})},{}],32:[function(r,o){(function(n){var s=/^[\],:{}\s]*$/,c=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,f=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,v=/(?:^|:|,)(?:\s*\[)+/g,d=/^\s+/,b=/\s+$/;o.exports=function(p){return typeof p=="string"&&p?(p=p.replace(d,"").replace(b,""),n.JSON&&JSON.parse?JSON.parse(p):s.test(p.replace(c,"@").replace(f,"]").replace(v,""))?new Function("return "+p)():void 0):null}}).call(this,typeof self<"u"?self:typeof window<"u"?window:{})},{}],33:[function(r,o,n){n.encode=function(s){var c="";for(var f in s)s.hasOwnProperty(f)&&(c.length&&(c+="&"),c+=encodeURIComponent(f)+"="+encodeURIComponent(s[f]));return c},n.decode=function(s){for(var c={},f=s.split("&"),v=0,d=f.length;d>v;v++){var b=f[v].split("=");c[decodeURIComponent(b[0])]=decodeURIComponent(b[1])}return c}},{}],34:[function(r,o){var n=/^(?:(?![^:@]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,s=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];o.exports=function(c){var f=c,v=c.indexOf("["),d=c.indexOf("]");v!=-1&&d!=-1&&(c=c.substring(0,v)+c.substring(v,d).replace(/:/g,";")+c.substring(d,c.length));for(var b=n.exec(c||""),p={},w=14;w--;)p[s[w]]=b[w]||"";return v!=-1&&d!=-1&&(p.source=f,p.host=p.host.substring(1,p.host.length-1).replace(/;/g,":"),p.authority=p.authority.replace("[","").replace("]","").replace(/;/g,":"),p.ipv6uri=!0),p}},{}],35:[function(r,o){function n(f,v){return v?new c(f,v):new c(f)}var s=function(){return self}(),c=s.WebSocket||s.MozWebSocket;o.exports=c?n:null,c&&(n.prototype=c.prototype)},{}],36:[function(r,o){(function(n){function s(f){function v(d){if(!d)return!1;if(n.Buffer&&n.Buffer.isBuffer(d)||n.ArrayBuffer&&d instanceof ArrayBuffer||n.Blob&&d instanceof Blob||n.File&&d instanceof File)return!0;if(c(d)){for(var b=0;b<d.length;b++)if(v(d[b]))return!0}else if(d&&typeof d=="object"){d.toJSON&&(d=d.toJSON());for(var p in d)if(Object.prototype.hasOwnProperty.call(d,p)&&v(d[p]))return!0}return!1}return v(f)}var c=r("isarray");o.exports=s}).call(this,typeof self<"u"?self:typeof window<"u"?window:{})},{isarray:37}],37:[function(r,o){o.exports=Array.isArray||function(n){return Object.prototype.toString.call(n)=="[object Array]"}},{}],38:[function(r,o){var n=r("global");try{o.exports="XMLHttpRequest"in n&&"withCredentials"in new n.XMLHttpRequest}catch{o.exports=!1}},{global:39}],39:[function(r,o){o.exports=function(){return this}()},{}],40:[function(r,o){var n=[].indexOf;o.exports=function(s,c){if(n)return s.indexOf(c);for(var f=0;f<s.length;++f)if(s[f]===c)return f;return-1}},{}],41:[function(r,o,n){var s=Object.prototype.hasOwnProperty;n.keys=Object.keys||function(c){var f=[];for(var v in c)s.call(c,v)&&f.push(v);return f},n.values=function(c){var f=[];for(var v in c)s.call(c,v)&&f.push(c[v]);return f},n.merge=function(c,f){for(var v in f)s.call(f,v)&&(c[v]=f[v]);return c},n.length=function(c){return n.keys(c).length},n.isEmpty=function(c){return n.length(c)==0}},{}],42:[function(r,o){var n=/^(?:(?![^:@]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,s=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];o.exports=function(c){for(var f=n.exec(c||""),v={},d=14;d--;)v[s[d]]=f[d]||"";return v}},{}],43:[function(r,o,n){(function(s){var c=r("isarray"),f=r("./is-buffer");n.deconstructPacket=function(v){function d(g){if(!g)return g;if(f(g)){var l={_placeholder:!0,num:b.length};return b.push(g),l}if(c(g)){for(var u=new Array(g.length),_=0;_<g.length;_++)u[_]=d(g[_]);return u}if(typeof g=="object"&&!(g instanceof Date)){var u={};for(var A in g)u[A]=d(g[A]);return u}return g}var b=[],p=v.data,w=v;return w.data=d(p),w.attachments=b.length,{packet:w,buffers:b}},n.reconstructPacket=function(v,d){function b(p){if(p&&p._placeholder){var w=d[p.num];return w}if(c(p)){for(var g=0;g<p.length;g++)p[g]=b(p[g]);return p}if(p&&typeof p=="object"){for(var l in p)p[l]=b(p[l]);return p}return p}return v.data=b(v.data),v.attachments=void 0,v},n.removeBlobs=function(v,d){function b(g,l,u){if(!g)return g;if(s.Blob&&g instanceof Blob||s.File&&g instanceof File){p++;var _=new FileReader;_.onload=function(){u?u[l]=this.result:w=this.result,--p||d(w)},_.readAsArrayBuffer(g)}else if(c(g))for(var A=0;A<g.length;A++)b(g[A],A,g);else if(g&&typeof g=="object"&&!f(g))for(var k in g)b(g[k],k,g)}var p=0,w=v;b(w),p||d(w)}}).call(this,typeof self<"u"?self:typeof window<"u"?window:{})},{"./is-buffer":45,isarray:46}],44:[function(r,o,n){function s(){}function c(A){var k="",B=!1;return k+=A.type,(n.BINARY_EVENT==A.type||n.BINARY_ACK==A.type)&&(k+=A.attachments,k+="-"),A.nsp&&A.nsp!="/"&&(B=!0,k+=A.nsp),A.id!=null&&(B&&(k+=",",B=!1),k+=A.id),A.data!=null&&(B&&(k+=","),k+=g.stringify(A.data)),w("encoded %j as %s",A,k),k}function f(A,k){function B(Y){var j=u.deconstructPacket(Y),N=c(j.packet),U=j.buffers;U.unshift(N),k(U)}u.removeBlobs(A,B)}function v(){this.reconstructor=null}function d(A){var k={},B=0;if(k.type=Number(A.charAt(0)),n.types[k.type]==null)return p();if(n.BINARY_EVENT==k.type||n.BINARY_ACK==k.type){for(var Y="";A.charAt(++B)!="-"&&(Y+=A.charAt(B),B!=A.length););if(Y!=Number(Y)||A.charAt(B)!="-")throw new Error("Illegal attachments");k.attachments=Number(Y)}if(A.charAt(B+1)=="/")for(k.nsp="";++B;){var j=A.charAt(B);if(j==","||(k.nsp+=j,B==A.length))break}else k.nsp="/";var N=A.charAt(B+1);if(N!==""&&Number(N)==N){for(k.id="";++B;){var j=A.charAt(B);if(j==null||Number(j)!=j){--B;break}if(k.id+=A.charAt(B),B==A.length)break}k.id=Number(k.id)}if(A.charAt(++B))try{k.data=g.parse(A.substr(B))}catch{return p()}return w("decoded %s as %j",A,k),k}function b(A){this.reconPack=A,this.buffers=[]}function p(){return{type:n.ERROR,data:"parser error"}}var w=r("debug")("socket.io-parser"),g=r("json3"),l=(r("isarray"),r("component-emitter")),u=r("./binary"),_=r("./is-buffer");n.protocol=4,n.types=["CONNECT","DISCONNECT","EVENT","BINARY_EVENT","ACK","BINARY_ACK","ERROR"],n.CONNECT=0,n.DISCONNECT=1,n.EVENT=2,n.ACK=3,n.ERROR=4,n.BINARY_EVENT=5,n.BINARY_ACK=6,n.Encoder=s,n.Decoder=v,s.prototype.encode=function(A,k){if(w("encoding packet %j",A),n.BINARY_EVENT==A.type||n.BINARY_ACK==A.type)f(A,k);else{var B=c(A);k([B])}},l(v.prototype),v.prototype.add=function(A){var k;if(typeof A=="string")k=d(A),n.BINARY_EVENT==k.type||n.BINARY_ACK==k.type?(this.reconstructor=new b(k),this.reconstructor.reconPack.attachments===0&&this.emit("decoded",k)):this.emit("decoded",k);else{if(!_(A)&&!A.base64)throw new Error("Unknown type: "+A);if(!this.reconstructor)throw new Error("got binary data when not reconstructing a packet");k=this.reconstructor.takeBinaryData(A),k&&(this.reconstructor=null,this.emit("decoded",k))}},v.prototype.destroy=function(){this.reconstructor&&this.reconstructor.finishedReconstruction()},b.prototype.takeBinaryData=function(A){if(this.buffers.push(A),this.buffers.length==this.reconPack.attachments){var k=u.reconstructPacket(this.reconPack,this.buffers);return this.finishedReconstruction(),k}return null},b.prototype.finishedReconstruction=function(){this.reconPack=null,this.buffers=[]}},{"./binary":43,"./is-buffer":45,"component-emitter":9,debug:10,isarray:46,json3:47}],45:[function(r,o){(function(n){function s(c){return n.Buffer&&n.Buffer.isBuffer(c)||n.ArrayBuffer&&c instanceof ArrayBuffer}o.exports=s}).call(this,typeof self<"u"?self:typeof window<"u"?window:{})},{}],46:[function(r,o){o.exports=r(37)},{}],47:[function(r,o,n){(function(s){function c($){if(c[$]!==d)return c[$];var Q;if($=="bug-string-char-index")Q=!1;else if($=="json")Q=c("json-stringify")&&c("json-parse");else{var G,rt='{"a":[1,true,false,null,"\\u0000\\b\\n\\f\\r\\t"]}';if($=="json-stringify"){var z=w.stringify,et=typeof z=="function"&&g;if(et){(G=function(){return 1}).toJSON=G;try{et=z(0)==="0"&&z(new Number)==="0"&&z(new String)=='""'&&z(b)===d&&z(d)===d&&z()===d&&z(G)==="1"&&z([G])=="[1]"&&z([d])=="[null]"&&z(null)=="null"&&z([d,b,null])=="[null,null,null]"&&z({a:[G,!0,!1,null,`\0\b
|
|
34
|
+
\f\r `]})==rt&&z(null,G)==="1"&&z([1,2],null,1)==`[
|
|
35
35
|
1,
|
|
36
36
|
2
|
|
37
|
-
]`&&
|
|
38
|
-
`+
|
|
39
|
-
`+
|
|
40
|
-
|
|
41
|
-
`+
|
|
42
|
-
`+
|
|
43
|
-
|
|
44
|
-
`,102:"\f",114:"\r"},ut=function(){throw B=kt=null,SyntaxError()},Ht=function(){for(var q,J,F,et,P,Z=kt,tt=Z.length;tt>B;)switch(P=Z.charCodeAt(B)){case 9:case 10:case 13:case 32:B++;break;case 123:case 125:case 91:case 93:case 58:case 44:return q=st?Z.charAt(B):Z[B],B++,q;case 34:for(q="@",B++;tt>B;)if(P=Z.charCodeAt(B),32>P)ut();else if(P==92)switch(P=Z.charCodeAt(++B)){case 92:case 34:case 47:case 98:case 116:case 110:case 102:case 114:q+=Rt[P],B++;break;case 117:for(J=++B,F=B+4;F>B;B++)P=Z.charCodeAt(B),P>=48&&57>=P||P>=97&&102>=P||P>=65&&70>=P||ut();q+=At("0x"+Z.slice(J,B));break;default:ut()}else{if(P==34)break;for(P=Z.charCodeAt(B),J=B;P>=32&&P!=92&&P!=34;)P=Z.charCodeAt(++B);q+=Z.slice(J,B)}if(Z.charCodeAt(B)==34)return B++,q;ut();default:if(J=B,P==45&&(et=!0,P=Z.charCodeAt(++B)),P>=48&&57>=P){for(P==48&&(P=Z.charCodeAt(B+1),P>=48&&57>=P)&&ut(),et=!1;tt>B&&(P=Z.charCodeAt(B),P>=48&&57>=P);B++);if(Z.charCodeAt(B)==46){for(F=++B;tt>F&&(P=Z.charCodeAt(F),P>=48&&57>=P);F++);F==B&&ut(),B=F}if(P=Z.charCodeAt(B),P==101||P==69){for(P=Z.charCodeAt(++B),(P==43||P==45)&&B++,F=B;tt>F&&(P=Z.charCodeAt(F),P>=48&&57>=P);F++);F==B&&ut(),B=F}return+Z.slice(J,B)}if(et&&ut(),Z.slice(B,B+4)=="true")return B+=4,!0;if(Z.slice(B,B+5)=="false")return B+=5,!1;if(Z.slice(B,B+4)=="null")return B+=4,null;ut()}return"$"},xe=function(q){var J,F;if(q=="$"&&ut(),typeof q=="string"){if((st?q.charAt(0):q[0])=="@")return q.slice(1);if(q=="["){for(J=[];q=Ht(),q!="]";F||(F=!0))F&&(q==","?(q=Ht(),q=="]"&&ut()):ut()),q==","&&ut(),J.push(xe(q));return J}if(q=="{"){for(J={};q=Ht(),q!="}";F||(F=!0))F&&(q==","?(q=Ht(),q=="}"&&ut()):ut()),(q==","||typeof q!="string"||(st?q.charAt(0):q[0])!="@"||Ht()!=":")&&ut(),J[q.slice(1)]=xe(Ht());return J}ut()}return q},se=function(q,J,F){var et=er(q,J,F);et===g?delete q[J]:q[J]=et},er=function(q,J,F){var et,P=q[J];if(typeof P=="object"&&P)if(S.call(P)==x)for(et=P.length;et--;)se(P,et,F);else m(P,function(Z){se(P,Z,F)});return F.call(q,J,P)};_.parse=function(q,J){var F,et;return B=0,kt=""+q,F=xe(Ht()),Ht()!="$"&&ut(),B=kt=null,J&&S.call(J)==l?er((et={},et[""]=F,et),"",J):F}}}})(this)},{}],48:[function(s,r){function n(o,u){var f=[];u=u||0;for(var m=u||0;m<o.length;m++)f[m-u]=o[m];return f}r.exports=n},{}]},{},[1])(1)}const Xv=Object.freeze(Object.defineProperty({__proto__:null,default:zv},Symbol.toStringTag,{value:"Module"})),Jv=Object.assign({"./v1_3_7.js":Xv}),Vv=/v\d+_\d+_\d+/;function Yv(s){return typeof s=="function"}const As=Object.entries(Jv).reduce((s,r)=>{var u;const n=r[1].default,o=(u=r[0].match(Vv))==null?void 0:u[0];return Yv(n)&&o&&(s[o]=n()),s},{}),Nu=s=>{if(s in As)return As[s];throw new Error(`Socket version ${s} not found`)},jv=(s,...r)=>Nu(s)(...r),Zv={...As,getSocketVersion:Nu,makeSocketVersion:jv};var Bu=(s=>(s.RINGING="Ringing",s.TALKING="Talking",s.DIALING="Dialing",s.HOLD="Hold",s))(Bu||{}),Uu=(s=>(s.INCOMING="Incoming",s.OUTGOING="Outgoing",s))(Uu||{}),Du=(s=>(s.AUTOMATIC="Automatic",s.IVR="IVR",s))(Du||{}),Pu=(s=>(s.INCOMINC="Incoming",s.OUTGOING="Outgoing",s.SPY="Spy",s.CLICK2CALL="Click2Call",s))(Pu||{}),Fu=(s=>(s.RESPONSE_FROM_API_VALID="RESPONSE_FROM_API_VALID",s.RESPONSE_FROM_API_INVALID="RESPONSE_FROM_API_INVALID",s))(Fu||{}),ht=(s=>(s.ALL_DIALER_STATUS="AllDialersStatus",s.ALL_EXTENSION_STATUS="AllExtensionsStatus",s.ALL_USERS_STATUS="AllUsersStatus",s.CONNECT="connect",s.DISCONNECT="disconnect",s.CONNECT_ERROR_EVENT="connect_error",s.EXTENSION_EVENT="ExtensionEvent",s.KEEP_ALIVE="keepalive",s.KEEP_ALIVE_RESPONSE="keepaliveResponse",s.LOGIN_STATUS="loginStatus",s.LOGIN_SUCCESS="loginSuccess",s.QUEUE_EVENT="QueueEvent",s.ONLINE_STATUS_EVENT="onlineStatusEvent",s.DIALER_EVENT="DialerEvent",s.EXTENSIONS_UPDATED="ExtensionsUpdated",s))(ht||{}),Ls=(s=>(s.NEWCALL="NEWCALL",s.ANSWER="ANSWER",s.HOLD="HOLD",s.UNHOLD="UNHOLD",s.HANGUP="HANGUP",s.USER_STATUS_UPDATE="userStatusUpdate",s))(Ls||{}),Mu=(s=>(s.NORMAL_HANGUP="Normal hangup",s.USER_BUSY="User busy",s.CALL_REJECTED="Call Rejected",s.UNALLOCATED_NUMBER="Unallocated (unassigned) number",s.UNKNOWN="Unknown",s.NO_USER_RESPONDING="No user responding",s.USER_ALERTING="User alerting, no answer",s.ANSWERED_ELSEWHERE="Answered elsewhere",s))(Mu||{}),qu=(s=>(s.ANSWER="ANSWER",s.ABANDONED="ABANDONED",s.EXIT="EXIT",s.JOIN="JOIN",s))(qu||{});class yu{static mapExtensionEvent(r){var m,g;const n=r.reason;let o,u;r.data.currentCall&&(u=this.mapExtensionCall(r,r.data.currentCall));const f=this.mapExtensionData(r,r.data);return n===Ls.HANGUP?o={...r,reason:n,data:{...f,currentCall:u?{...u,duration:Date.now()-((u==null?void 0:u.callAnswered_UTC_CLIENT)??0)}:void 0,calls:(m=r.data.calls)==null?void 0:m.map(S=>{const v=this.mapExtensionCall(r,S);return{...v,duration:Date.now()-(v.callAnswered_UTC_CLIENT??0)}})}}:o={...r,data:{...f,currentCall:u,calls:(g=r.data.calls)==null?void 0:g.map(S=>this.mapExtensionCall(r,S))},reason:n},o}static mapAllExtensionStatus(r){return{...r,extensions:r.extensions.map(n=>{var o;return{...this.mapExtensionData(r,n),currentCall:n.currentCall?this.mapExtensionCall(r,n.currentCall):void 0,calls:(o=n.calls)==null?void 0:o.map(u=>this.mapExtensionCall(r,u))}})}}static mapExtensionData(r,n){return this.configureUTCForObject(n,[{key:"lastAnsweredCallEventEpoch",format:"sec"},{key:"lastCallEventEpoch",format:"sec"},{key:"lastHangupCallEpoch",format:"sec"},{key:"representativeUpdated",format:"ms"}],r.servertime,r.servertimeoffset)}static mapExtensionCall(r,n){return this.configureUTCForObject(n,[{key:"callAnswered",format:"sec"},{key:"callStarted",format:"sec"}],r.servertime,r.servertimeoffset)}static assignProperty(r,n,o){r[n]=o}static configureUTCForObject(r,n,o,u){const f=(o-u*60)*1e3,m=Date.now()-f,g={};return n.forEach(S=>{const v=r[S.key],_=S.key;if(v!==0&&typeof v=="number"&&!isNaN(v)){let y=v;S.format==="ms"&&(y=Math.floor(y/1e3));const l=(y-u*60)*1e3;this.assignProperty(g,`${_}_UTC`,l),this.assignProperty(g,`${_}_UTC_CLIENT`,l+m)}else this.assignProperty(g,`${_}_UTC`,0),this.assignProperty(g,`${_}_UTC_CLIENT`,0)}),{...r,...g}}}var Ns=(s=>(s.UPDATE_MONITORED_EXTENSIONS="updateMonitoredExtensions",s.KEEP_ALIVE="keepAlive",s))(Ns||{});class Qv{constructor(r){wt(this,"io");wt(this,"ioFunction");wt(this,"lastEventTimestamp",new Date().getTime());wt(this,"doReconnect",!0);wt(this,"keepAliveInterval");wt(this,"keepReconnectInterval");wt(this,"connected",!1);this.eventsSdkClass=r,this.eventsSdkClass=r}getSocketIoFunction(r){const n=r.split("v="),o="v".concat(n[n.length-1]).replaceAll(".","_");this.ioFunction=Zv.getSocketVersion(o)}initSocketConnection(){const r=this.eventsSdkClass.authClass.token,n=this.eventsSdkClass.options.protocol,o=this.eventsSdkClass.server;try{const u=o?o.Domain:this.eventsSdkClass.URL,f=o?`${n}://${u}`:this.eventsSdkClass.URL;this.eventsSdkClass.loggerClass.log(Jt.INFO,"Connecting to..",f),this.eventsSdkClass.eventEmitterClass.emit(ht.ONLINE_STATUS_EVENT,{isSocketConnected:!1,attemptToConnect:f,doReconnect:this.doReconnect});const m={reconnection:!1,upgrade:!1,transports:["websocket"],forceNew:!0,query:{token:r},timeout:this.eventsSdkClass.options.timeout};if(r&&(m.query={token:r}),this.ioFunction&&f)this.io=this.ioFunction(f,m);else throw new Error("Socket server url no defined")}catch(u){this.eventsSdkClass.loggerClass.log(Jt.ERROR,"init socket connection error",u)}}clearKeepAliveInterval(){this.keepAliveInterval&&clearInterval(this.keepAliveInterval)}initKeepAlive(){this.clearKeepAliveInterval(),this.keepAliveInterval=setInterval(async()=>{if(new Date().getTime()>this.lastEventTimestamp+this.eventsSdkClass.options.keepAliveTimeout&&this.io&&this.eventsSdkClass.authClass.token){this.eventsSdkClass.emit(Ns.KEEP_ALIVE,this.eventsSdkClass.authClass.token),this.eventsSdkClass.loggerClass.log(Jt.INFO,`EMIT -> ${ht.KEEP_ALIVE}`,this.eventsSdkClass.authClass.token);return}},this.eventsSdkClass.options.keepAliveTimeout)}closeAllConnections(){var r;this.io&&(this.io.close(),(r=this.io)==null||r.disconnect(),this.io=void 0),Qn.clearSessionStorage()}initSocketEvents(){this.io&&this.io.on(ht.LOGIN_SUCCESS,r=>this.onLoginSuccessEvent(r)).on(ht.QUEUE_EVENT,r=>this.onQueueEvent(r)).on(ht.EXTENSION_EVENT,r=>this.onExtensionEvent(r)).on(ht.DIALER_EVENT,r=>this.onDialerEvent(r)).on(ht.LOGIN_STATUS,r=>this.onLoginStatusEvent(r)).on(ht.ALL_EXTENSION_STATUS,r=>this.onAllExtensionStatus(r)).on(ht.ALL_DIALER_STATUS,r=>this.onAllDialerStatus(r)).on(ht.KEEP_ALIVE_RESPONSE,r=>this.onKeepAliveResponse(r)).on(ht.EXTENSIONS_UPDATED,r=>this.onExtensionsUpdatedEvent(r)).on(ht.CONNECT,()=>this.onConnect()).on(ht.DISCONNECT,r=>this.onDisconnect(r)).on(ht.CONNECT_ERROR_EVENT,r=>this.onConnectError(r))}onLoginSuccessEvent(r){this.eventsSdkClass.eventEmitterClass.emit(ht.LOGIN_SUCCESS,r)}onQueueEvent(r){this.eventsSdkClass.eventEmitterClass.emit(ht.QUEUE_EVENT,r)}onExtensionEvent(r){const n=yu.mapExtensionEvent(r);n&&this.eventsSdkClass.eventEmitterClass.emit(ht.EXTENSION_EVENT,n)}onDialerEvent(r){this.eventsSdkClass.eventEmitterClass.emit(ht.DIALER_EVENT,r)}onLoginStatusEvent(r){this.eventsSdkClass.eventEmitterClass.emit(ht.LOGIN_STATUS,r)}onAllExtensionStatus(r){const n=yu.mapAllExtensionStatus(r);this.eventsSdkClass.eventEmitterClass.emit(ht.ALL_EXTENSION_STATUS,n)}onAllDialerStatus(r){this.eventsSdkClass.eventEmitterClass.emit(ht.ALL_DIALER_STATUS,r)}onKeepAliveResponse(r){if(this.eventsSdkClass.loggerClass.log(Jt.INFO,ht.KEEP_ALIVE_RESPONSE),r.errorCode){this.initSocketConnection();return}this.connected?this.lastEventTimestamp=new Date().getTime():this.initSocketConnection()}onExtensionsUpdatedEvent(r){this.eventsSdkClass.eventEmitterClass.emit(ht.EXTENSIONS_UPDATED,r)}onConnect(){this.keepReconnectInterval&&clearInterval(this.keepReconnectInterval),this.connected=!0,this.eventsSdkClass.loggerClass.log(Jt.INFO,ht.CONNECT,this.eventsSdkClass.reconnectOptions),this.eventsSdkClass.eventEmitterClass.emit(ht.ONLINE_STATUS_EVENT,{isSocketConnected:!0,doReconnect:this.doReconnect})}onDisconnect(r){this.connected=!1,this.eventsSdkClass.loggerClass.log(Jt.INFO,ht.DISCONNECT,r),this.closeAllConnections(),this.eventsSdkClass.eventEmitterClass.emit(ht.ONLINE_STATUS_EVENT,{isSocketConnected:!1,doReconnect:this.doReconnect}),this.doReconnect&&(console.log("attempt to connect..."),this.eventsSdkClass.connect(pn.NEXT))}onConnectError(r){this.eventsSdkClass.eventEmitterClass.emit(ht.ONLINE_STATUS_EVENT,{isSocketConnected:!1,doReconnect:this.doReconnect}),this.eventsSdkClass.loggerClass.log(Jt.ERROR,ht.CONNECT_ERROR_EVENT,r),setTimeout(()=>{this.eventsSdkClass.connect(pn.NEXT)},this.eventsSdkClass.options.reconnectionDelay)}}var ty=Object.defineProperty,ey=(s,r,n)=>r in s?ty(s,r,{enumerable:!0,configurable:!0,writable:!0,value:n}):s[r]=n,qt=(s,r,n)=>(ey(s,typeof r!="symbol"?r+"":r,n),n);const Ue=Object.create(null);Ue.open="0";Ue.close="1";Ue.ping="2";Ue.pong="3";Ue.message="4";Ue.upgrade="5";Ue.noop="6";const Vr=Object.create(null);Object.keys(Ue).forEach(s=>{Vr[Ue[s]]=s});const Es={type:"error",data:"parser error"},Wu=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",Ku=typeof ArrayBuffer=="function",Gu=s=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(s):s&&s.buffer instanceof ArrayBuffer,Bs=({type:s,data:r},n,o)=>Wu&&r instanceof Blob?n?o(r):mu(r,o):Ku&&(r instanceof ArrayBuffer||Gu(r))?n?o(r):mu(new Blob([r]),o):o(Ue[s]+(r||"")),mu=(s,r)=>{const n=new FileReader;return n.onload=function(){const o=n.result.split(",")[1];r("b"+(o||""))},n.readAsDataURL(s)};function _u(s){return s instanceof Uint8Array?s:s instanceof ArrayBuffer?new Uint8Array(s):new Uint8Array(s.buffer,s.byteOffset,s.byteLength)}let bs;function ny(s,r){if(Wu&&s.data instanceof Blob)return s.data.arrayBuffer().then(_u).then(r);if(Ku&&(s.data instanceof ArrayBuffer||Gu(s.data)))return r(_u(s.data));Bs(s,!1,n=>{bs||(bs=new TextEncoder),r(bs.encode(n))})}const wu="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",tr=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let s=0;s<wu.length;s++)tr[wu.charCodeAt(s)]=s;const ry=s=>{let r=s.length*.75,n=s.length,o,u=0,f,m,g,S;s[s.length-1]==="="&&(r--,s[s.length-2]==="="&&r--);const v=new ArrayBuffer(r),_=new Uint8Array(v);for(o=0;o<n;o+=4)f=tr[s.charCodeAt(o)],m=tr[s.charCodeAt(o+1)],g=tr[s.charCodeAt(o+2)],S=tr[s.charCodeAt(o+3)],_[u++]=f<<2|m>>4,_[u++]=(m&15)<<4|g>>2,_[u++]=(g&3)<<6|S&63;return v},iy=typeof ArrayBuffer=="function",Us=(s,r)=>{if(typeof s!="string")return{type:"message",data:Hu(s,r)};const n=s.charAt(0);return n==="b"?{type:"message",data:sy(s.substring(1),r)}:Vr[n]?s.length>1?{type:Vr[n],data:s.substring(1)}:{type:Vr[n]}:Es},sy=(s,r)=>{if(iy){const n=ry(s);return Hu(n,r)}else return{base64:!0,data:s}},Hu=(s,r)=>{switch(r){case"blob":return s instanceof Blob?s:new Blob([s]);case"arraybuffer":default:return s instanceof ArrayBuffer?s:s.buffer}},$u="",oy=(s,r)=>{const n=s.length,o=new Array(n);let u=0;s.forEach((f,m)=>{Bs(f,!1,g=>{o[m]=g,++u===n&&r(o.join($u))})})},ay=(s,r)=>{const n=s.split($u),o=[];for(let u=0;u<n.length;u++){const f=Us(n[u],r);if(o.push(f),f.type==="error")break}return o};function uy(){return new TransformStream({transform(s,r){ny(s,n=>{const o=n.length;let u;if(o<126)u=new Uint8Array(1),new DataView(u.buffer).setUint8(0,o);else if(o<65536){u=new Uint8Array(3);const f=new DataView(u.buffer);f.setUint8(0,126),f.setUint16(1,o)}else{u=new Uint8Array(9);const f=new DataView(u.buffer);f.setUint8(0,127),f.setBigUint64(1,BigInt(o))}s.data&&typeof s.data!="string"&&(u[0]|=128),r.enqueue(u),r.enqueue(n)})}})}let Ss;function Hr(s){return s.reduce((r,n)=>r+n.length,0)}function $r(s,r){if(s[0].length===r)return s.shift();const n=new Uint8Array(r);let o=0;for(let u=0;u<r;u++)n[u]=s[0][o++],o===s[0].length&&(s.shift(),o=0);return s.length&&o<s[0].length&&(s[0]=s[0].slice(o)),n}function cy(s,r){Ss||(Ss=new TextDecoder);const n=[];let o=0,u=-1,f=!1;return new TransformStream({transform(m,g){for(n.push(m);;){if(o===0){if(Hr(n)<1)break;const S=$r(n,1);f=(S[0]&128)===128,u=S[0]&127,u<126?o=3:u===126?o=1:o=2}else if(o===1){if(Hr(n)<2)break;const S=$r(n,2);u=new DataView(S.buffer,S.byteOffset,S.length).getUint16(0),o=3}else if(o===2){if(Hr(n)<8)break;const S=$r(n,8),v=new DataView(S.buffer,S.byteOffset,S.length),_=v.getUint32(0);if(_>Math.pow(2,21)-1){g.enqueue(Es);break}u=_*Math.pow(2,32)+v.getUint32(4),o=3}else{if(Hr(n)<u)break;const S=$r(n,u);g.enqueue(Us(f?S:Ss.decode(S),r)),o=0}if(u===0||u>s){g.enqueue(Es);break}}}})}const zu=4;function Dt(s){if(s)return fy(s)}function fy(s){for(var r in Dt.prototype)s[r]=Dt.prototype[r];return s}Dt.prototype.on=Dt.prototype.addEventListener=function(s,r){return this._callbacks=this._callbacks||{},(this._callbacks["$"+s]=this._callbacks["$"+s]||[]).push(r),this};Dt.prototype.once=function(s,r){function n(){this.off(s,n),r.apply(this,arguments)}return n.fn=r,this.on(s,n),this};Dt.prototype.off=Dt.prototype.removeListener=Dt.prototype.removeAllListeners=Dt.prototype.removeEventListener=function(s,r){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var n=this._callbacks["$"+s];if(!n)return this;if(arguments.length==1)return delete this._callbacks["$"+s],this;for(var o,u=0;u<n.length;u++)if(o=n[u],o===r||o.fn===r){n.splice(u,1);break}return n.length===0&&delete this._callbacks["$"+s],this};Dt.prototype.emit=function(s){this._callbacks=this._callbacks||{};for(var r=new Array(arguments.length-1),n=this._callbacks["$"+s],o=1;o<arguments.length;o++)r[o-1]=arguments[o];if(n){n=n.slice(0);for(var o=0,u=n.length;o<u;++o)n[o].apply(this,r)}return this};Dt.prototype.emitReserved=Dt.prototype.emit;Dt.prototype.listeners=function(s){return this._callbacks=this._callbacks||{},this._callbacks["$"+s]||[]};Dt.prototype.hasListeners=function(s){return!!this.listeners(s).length};const be=typeof self<"u"?self:typeof window<"u"?window:Function("return this")();function Xu(s,...r){return r.reduce((n,o)=>(s.hasOwnProperty(o)&&(n[o]=s[o]),n),{})}const hy=be.setTimeout,ly=be.clearTimeout;function Qr(s,r){r.useNativeTimers?(s.setTimeoutFn=hy.bind(be),s.clearTimeoutFn=ly.bind(be)):(s.setTimeoutFn=be.setTimeout.bind(be),s.clearTimeoutFn=be.clearTimeout.bind(be))}const py=1.33;function dy(s){return typeof s=="string"?gy(s):Math.ceil((s.byteLength||s.size)*py)}function gy(s){let r=0,n=0;for(let o=0,u=s.length;o<u;o++)r=s.charCodeAt(o),r<128?n+=1:r<2048?n+=2:r<55296||r>=57344?n+=3:(o++,n+=4);return n}function vy(s){let r="";for(let n in s)s.hasOwnProperty(n)&&(r.length&&(r+="&"),r+=encodeURIComponent(n)+"="+encodeURIComponent(s[n]));return r}function yy(s){let r={},n=s.split("&");for(let o=0,u=n.length;o<u;o++){let f=n[o].split("=");r[decodeURIComponent(f[0])]=decodeURIComponent(f[1])}return r}class my extends Error{constructor(r,n,o){super(r),this.description=n,this.context=o,this.type="TransportError"}}class Ds extends Dt{constructor(r){super(),this.writable=!1,Qr(this,r),this.opts=r,this.query=r.query,this.socket=r.socket}onError(r,n,o){return super.emitReserved("error",new my(r,n,o)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(r){this.readyState==="open"&&this.write(r)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(r){const n=Us(r,this.socket.binaryType);this.onPacket(n)}onPacket(r){super.emitReserved("packet",r)}onClose(r){this.readyState="closed",super.emitReserved("close",r)}pause(r){}createUri(r,n={}){return r+"://"+this._hostname()+this._port()+this.opts.path+this._query(n)}_hostname(){const r=this.opts.hostname;return r.indexOf(":")===-1?r:"["+r+"]"}_port(){return this.opts.port&&(this.opts.secure&&+(this.opts.port!==443)||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(r){const n=vy(r);return n.length?"?"+n:""}}const Ju="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),Ts=64,_y={};let bu=0,zr=0,Su;function Cu(s){let r="";do r=Ju[s%Ts]+r,s=Math.floor(s/Ts);while(s>0);return r}function Vu(){const s=Cu(+new Date);return s!==Su?(bu=0,Su=s):s+"."+Cu(bu++)}for(;zr<Ts;zr++)_y[Ju[zr]]=zr;let Yu=!1;try{Yu=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const wy=Yu;function ju(s){const r=s.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!r||wy))return new XMLHttpRequest}catch{}if(!r)try{return new be[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}function by(){}const Sy=function(){return new ju({xdomain:!1}).responseType!=null}();class Cy extends Ds{constructor(r){if(super(r),this.polling=!1,typeof location<"u"){const o=location.protocol==="https:";let u=location.port;u||(u=o?"443":"80"),this.xd=typeof location<"u"&&r.hostname!==location.hostname||u!==r.port}const n=r&&r.forceBase64;this.supportsBinary=Sy&&!n,this.opts.withCredentials&&(this.cookieJar=void 0)}get name(){return"polling"}doOpen(){this.poll()}pause(r){this.readyState="pausing";const n=()=>{this.readyState="paused",r()};if(this.polling||!this.writable){let o=0;this.polling&&(o++,this.once("pollComplete",function(){--o||n()})),this.writable||(o++,this.once("drain",function(){--o||n()}))}else n()}poll(){this.polling=!0,this.doPoll(),this.emitReserved("poll")}onData(r){const n=o=>{if(this.readyState==="opening"&&o.type==="open"&&this.onOpen(),o.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(o)};ay(r,this.socket.binaryType).forEach(n),this.readyState!=="closed"&&(this.polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this.poll())}doClose(){const r=()=>{this.write([{type:"close"}])};this.readyState==="open"?r():this.once("open",r)}write(r){this.writable=!1,oy(r,n=>{this.doWrite(n,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const r=this.opts.secure?"https":"http",n=this.query||{};return this.opts.timestampRequests!==!1&&(n[this.opts.timestampParam]=Vu()),!this.supportsBinary&&!n.sid&&(n.b64=1),this.createUri(r,n)}request(r={}){return Object.assign(r,{xd:this.xd,cookieJar:this.cookieJar},this.opts),new Be(this.uri(),r)}doWrite(r,n){const o=this.request({method:"POST",data:r});o.on("success",n),o.on("error",(u,f)=>{this.onError("xhr post error",u,f)})}doPoll(){const r=this.request();r.on("data",this.onData.bind(this)),r.on("error",(n,o)=>{this.onError("xhr poll error",n,o)}),this.pollXhr=r}}class Be extends Dt{constructor(r,n){super(),Qr(this,n),this.opts=n,this.method=n.method||"GET",this.uri=r,this.data=n.data!==void 0?n.data:null,this.create()}create(){var r;const n=Xu(this.opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");n.xdomain=!!this.opts.xd;const o=this.xhr=new ju(n);try{o.open(this.method,this.uri,!0);try{if(this.opts.extraHeaders){o.setDisableHeaderCheck&&o.setDisableHeaderCheck(!0);for(let u in this.opts.extraHeaders)this.opts.extraHeaders.hasOwnProperty(u)&&o.setRequestHeader(u,this.opts.extraHeaders[u])}}catch{}if(this.method==="POST")try{o.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{o.setRequestHeader("Accept","*/*")}catch{}(r=this.opts.cookieJar)===null||r===void 0||r.addCookies(o),"withCredentials"in o&&(o.withCredentials=this.opts.withCredentials),this.opts.requestTimeout&&(o.timeout=this.opts.requestTimeout),o.onreadystatechange=()=>{var u;o.readyState===3&&((u=this.opts.cookieJar)===null||u===void 0||u.parseCookies(o)),o.readyState===4&&(o.status===200||o.status===1223?this.onLoad():this.setTimeoutFn(()=>{this.onError(typeof o.status=="number"?o.status:0)},0))},o.send(this.data)}catch(u){this.setTimeoutFn(()=>{this.onError(u)},0);return}typeof document<"u"&&(this.index=Be.requestsCount++,Be.requests[this.index]=this)}onError(r){this.emitReserved("error",r,this.xhr),this.cleanup(!0)}cleanup(r){if(!(typeof this.xhr>"u"||this.xhr===null)){if(this.xhr.onreadystatechange=by,r)try{this.xhr.abort()}catch{}typeof document<"u"&&delete Be.requests[this.index],this.xhr=null}}onLoad(){const r=this.xhr.responseText;r!==null&&(this.emitReserved("data",r),this.emitReserved("success"),this.cleanup())}abort(){this.cleanup()}}Be.requestsCount=0;Be.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",ku);else if(typeof addEventListener=="function"){const s="onpagehide"in be?"pagehide":"unload";addEventListener(s,ku,!1)}}function ku(){for(let s in Be.requests)Be.requests.hasOwnProperty(s)&&Be.requests[s].abort()}const Ps=typeof Promise=="function"&&typeof Promise.resolve=="function"?s=>Promise.resolve().then(s):(s,r)=>r(s,0),Xr=be.WebSocket||be.MozWebSocket,Au=!0,ky="arraybuffer",Eu=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class Ay extends Ds{constructor(r){super(r),this.supportsBinary=!r.forceBase64}get name(){return"websocket"}doOpen(){if(!this.check())return;const r=this.uri(),n=this.opts.protocols,o=Eu?{}:Xu(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(o.headers=this.opts.extraHeaders);try{this.ws=Au&&!Eu?n?new Xr(r,n):new Xr(r):new Xr(r,n,o)}catch(u){return this.emitReserved("error",u)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=r=>this.onClose({description:"websocket connection closed",context:r}),this.ws.onmessage=r=>this.onData(r.data),this.ws.onerror=r=>this.onError("websocket error",r)}write(r){this.writable=!1;for(let n=0;n<r.length;n++){const o=r[n],u=n===r.length-1;Bs(o,this.supportsBinary,f=>{try{Au&&this.ws.send(f)}catch{}u&&Ps(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.close(),this.ws=null)}uri(){const r=this.opts.secure?"wss":"ws",n=this.query||{};return this.opts.timestampRequests&&(n[this.opts.timestampParam]=Vu()),this.supportsBinary||(n.b64=1),this.createUri(r,n)}check(){return!!Xr}}class Ey extends Ds{get name(){return"webtransport"}doOpen(){typeof WebTransport=="function"&&(this.transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name]),this.transport.closed.then(()=>{this.onClose()}).catch(r=>{this.onError("webtransport error",r)}),this.transport.ready.then(()=>{this.transport.createBidirectionalStream().then(r=>{const n=cy(Number.MAX_SAFE_INTEGER,this.socket.binaryType),o=r.readable.pipeThrough(n).getReader(),u=uy();u.readable.pipeTo(r.writable),this.writer=u.writable.getWriter();const f=()=>{o.read().then(({done:g,value:S})=>{g||(this.onPacket(S),f())}).catch(g=>{})};f();const m={type:"open"};this.query.sid&&(m.data=`{"sid":"${this.query.sid}"}`),this.writer.write(m).then(()=>this.onOpen())})}))}write(r){this.writable=!1;for(let n=0;n<r.length;n++){const o=r[n],u=n===r.length-1;this.writer.write(o).then(()=>{u&&Ps(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var r;(r=this.transport)===null||r===void 0||r.close()}}const Ty={websocket:Ay,webtransport:Ey,polling:Cy},xy=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,Ry=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function xs(s){if(s.length>2e3)throw"URI too long";const r=s,n=s.indexOf("["),o=s.indexOf("]");n!=-1&&o!=-1&&(s=s.substring(0,n)+s.substring(n,o).replace(/:/g,";")+s.substring(o,s.length));let u=xy.exec(s||""),f={},m=14;for(;m--;)f[Ry[m]]=u[m]||"";return n!=-1&&o!=-1&&(f.source=r,f.host=f.host.substring(1,f.host.length-1).replace(/;/g,":"),f.authority=f.authority.replace("[","").replace("]","").replace(/;/g,":"),f.ipv6uri=!0),f.pathNames=Oy(f,f.path),f.queryKey=Iy(f,f.query),f}function Oy(s,r){const n=/\/{2,9}/g,o=r.replace(n,"/").split("/");return(r.slice(0,1)=="/"||r.length===0)&&o.splice(0,1),r.slice(-1)=="/"&&o.splice(o.length-1,1),o}function Iy(s,r){const n={};return r.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(o,u,f){u&&(n[u]=f)}),n}let Zu=class On extends Dt{constructor(r,n={}){super(),this.binaryType=ky,this.writeBuffer=[],r&&typeof r=="object"&&(n=r,r=null),r?(r=xs(r),n.hostname=r.host,n.secure=r.protocol==="https"||r.protocol==="wss",n.port=r.port,r.query&&(n.query=r.query)):n.host&&(n.hostname=xs(n.host).host),Qr(this,n),this.secure=n.secure!=null?n.secure:typeof location<"u"&&location.protocol==="https:",n.hostname&&!n.port&&(n.port=this.secure?"443":"80"),this.hostname=n.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=n.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=n.transports||["polling","websocket","webtransport"],this.writeBuffer=[],this.prevBufferLen=0,this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},n),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=yy(this.opts.query)),this.id=null,this.upgrades=null,this.pingInterval=null,this.pingTimeout=null,this.pingTimeoutTimer=null,typeof addEventListener=="function"&&(this.opts.closeOnBeforeunload&&(this.beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this.beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this.offlineEventListener=()=>{this.onClose("transport close",{description:"network connection lost"})},addEventListener("offline",this.offlineEventListener,!1))),this.open()}createTransport(r){const n=Object.assign({},this.opts.query);n.EIO=zu,n.transport=r,this.id&&(n.sid=this.id);const o=Object.assign({},this.opts,{query:n,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[r]);return new Ty[r](o)}open(){let r;if(this.opts.rememberUpgrade&&On.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1)r="websocket";else if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}else r=this.transports[0];this.readyState="opening";try{r=this.createTransport(r)}catch{this.transports.shift(),this.open();return}r.open(),this.setTransport(r)}setTransport(r){this.transport&&this.transport.removeAllListeners(),this.transport=r,r.on("drain",this.onDrain.bind(this)).on("packet",this.onPacket.bind(this)).on("error",this.onError.bind(this)).on("close",n=>this.onClose("transport close",n))}probe(r){let n=this.createTransport(r),o=!1;On.priorWebsocketSuccess=!1;const u=()=>{o||(n.send([{type:"ping",data:"probe"}]),n.once("packet",y=>{if(!o)if(y.type==="pong"&&y.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;On.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{o||this.readyState!=="closed"&&(_(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{const l=new Error("probe error");l.transport=n.name,this.emitReserved("upgradeError",l)}}))};function f(){o||(o=!0,_(),n.close(),n=null)}const m=y=>{const l=new Error("probe error: "+y);l.transport=n.name,f(),this.emitReserved("upgradeError",l)};function g(){m("transport closed")}function S(){m("socket closed")}function v(y){n&&y.name!==n.name&&f()}const _=()=>{n.removeListener("open",u),n.removeListener("error",m),n.removeListener("close",g),this.off("close",S),this.off("upgrading",v)};n.once("open",u),n.once("error",m),n.once("close",g),this.once("close",S),this.once("upgrading",v),this.upgrades.indexOf("webtransport")!==-1&&r!=="webtransport"?this.setTimeoutFn(()=>{o||n.open()},200):n.open()}onOpen(){if(this.readyState="open",On.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush(),this.readyState==="open"&&this.opts.upgrade){let r=0;const n=this.upgrades.length;for(;r<n;r++)this.probe(this.upgrades[r])}}onPacket(r){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",r),this.emitReserved("heartbeat"),this.resetPingTimeout(),r.type){case"open":this.onHandshake(JSON.parse(r.data));break;case"ping":this.sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong");break;case"error":const n=new Error("server error");n.code=r.data,this.onError(n);break;case"message":this.emitReserved("data",r.data),this.emitReserved("message",r.data);break}}onHandshake(r){this.emitReserved("handshake",r),this.id=r.sid,this.transport.query.sid=r.sid,this.upgrades=this.filterUpgrades(r.upgrades),this.pingInterval=r.pingInterval,this.pingTimeout=r.pingTimeout,this.maxPayload=r.maxPayload,this.onOpen(),this.readyState!=="closed"&&this.resetPingTimeout()}resetPingTimeout(){this.clearTimeoutFn(this.pingTimeoutTimer),this.pingTimeoutTimer=this.setTimeoutFn(()=>{this.onClose("ping timeout")},this.pingInterval+this.pingTimeout),this.opts.autoUnref&&this.pingTimeoutTimer.unref()}onDrain(){this.writeBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const r=this.getWritablePackets();this.transport.send(r),this.prevBufferLen=r.length,this.emitReserved("flush")}}getWritablePackets(){if(!(this.maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let r=1;for(let n=0;n<this.writeBuffer.length;n++){const o=this.writeBuffer[n].data;if(o&&(r+=dy(o)),n>0&&r>this.maxPayload)return this.writeBuffer.slice(0,n);r+=2}return this.writeBuffer}write(r,n,o){return this.sendPacket("message",r,n,o),this}send(r,n,o){return this.sendPacket("message",r,n,o),this}sendPacket(r,n,o,u){if(typeof n=="function"&&(u=n,n=void 0),typeof o=="function"&&(u=o,o=null),this.readyState==="closing"||this.readyState==="closed")return;o=o||{},o.compress=o.compress!==!1;const f={type:r,data:n,options:o};this.emitReserved("packetCreate",f),this.writeBuffer.push(f),u&&this.once("flush",u),this.flush()}close(){const r=()=>{this.onClose("forced close"),this.transport.close()},n=()=>{this.off("upgrade",n),this.off("upgradeError",n),r()},o=()=>{this.once("upgrade",n),this.once("upgradeError",n)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?o():r()}):this.upgrading?o():r()),this}onError(r){On.priorWebsocketSuccess=!1,this.emitReserved("error",r),this.onClose("transport error",r)}onClose(r,n){(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")&&(this.clearTimeoutFn(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),typeof removeEventListener=="function"&&(removeEventListener("beforeunload",this.beforeunloadEventListener,!1),removeEventListener("offline",this.offlineEventListener,!1)),this.readyState="closed",this.id=null,this.emitReserved("close",r,n),this.writeBuffer=[],this.prevBufferLen=0)}filterUpgrades(r){const n=[];let o=0;const u=r.length;for(;o<u;o++)~this.transports.indexOf(r[o])&&n.push(r[o]);return n}};Zu.protocol=zu;function Ly(s,r="",n){let o=s;n=n||typeof location<"u"&&location,s==null&&(s=n.protocol+"//"+n.host),typeof s=="string"&&(s.charAt(0)==="/"&&(s.charAt(1)==="/"?s=n.protocol+s:s=n.host+s),/^(https?|wss?):\/\//.test(s)||(typeof n<"u"?s=n.protocol+"//"+s:s="https://"+s),o=xs(s)),o.port||(/^(http|ws)$/.test(o.protocol)?o.port="80":/^(http|ws)s$/.test(o.protocol)&&(o.port="443")),o.path=o.path||"/";const u=o.host.indexOf(":")!==-1?"["+o.host+"]":o.host;return o.id=o.protocol+"://"+u+":"+o.port+r,o.href=o.protocol+"://"+u+(n&&n.port===o.port?"":":"+o.port),o}const Ny=typeof ArrayBuffer=="function",By=s=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(s):s.buffer instanceof ArrayBuffer,Qu=Object.prototype.toString,Uy=typeof Blob=="function"||typeof Blob<"u"&&Qu.call(Blob)==="[object BlobConstructor]",Dy=typeof File=="function"||typeof File<"u"&&Qu.call(File)==="[object FileConstructor]";function Fs(s){return Ny&&(s instanceof ArrayBuffer||By(s))||Uy&&s instanceof Blob||Dy&&s instanceof File}function Yr(s,r){if(!s||typeof s!="object")return!1;if(Array.isArray(s)){for(let n=0,o=s.length;n<o;n++)if(Yr(s[n]))return!0;return!1}if(Fs(s))return!0;if(s.toJSON&&typeof s.toJSON=="function"&&arguments.length===1)return Yr(s.toJSON(),!0);for(const n in s)if(Object.prototype.hasOwnProperty.call(s,n)&&Yr(s[n]))return!0;return!1}function Py(s){const r=[],n=s.data,o=s;return o.data=Rs(n,r),o.attachments=r.length,{packet:o,buffers:r}}function Rs(s,r){if(!s)return s;if(Fs(s)){const n={_placeholder:!0,num:r.length};return r.push(s),n}else if(Array.isArray(s)){const n=new Array(s.length);for(let o=0;o<s.length;o++)n[o]=Rs(s[o],r);return n}else if(typeof s=="object"&&!(s instanceof Date)){const n={};for(const o in s)Object.prototype.hasOwnProperty.call(s,o)&&(n[o]=Rs(s[o],r));return n}return s}function Fy(s,r){return s.data=Os(s.data,r),delete s.attachments,s}function Os(s,r){if(!s)return s;if(s&&s._placeholder===!0){if(typeof s.num=="number"&&s.num>=0&&s.num<r.length)return r[s.num];throw new Error("illegal attachments")}else if(Array.isArray(s))for(let n=0;n<s.length;n++)s[n]=Os(s[n],r);else if(typeof s=="object")for(const n in s)Object.prototype.hasOwnProperty.call(s,n)&&(s[n]=Os(s[n],r));return s}const My=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],qy=5;var mt;(function(s){s[s.CONNECT=0]="CONNECT",s[s.DISCONNECT=1]="DISCONNECT",s[s.EVENT=2]="EVENT",s[s.ACK=3]="ACK",s[s.CONNECT_ERROR=4]="CONNECT_ERROR",s[s.BINARY_EVENT=5]="BINARY_EVENT",s[s.BINARY_ACK=6]="BINARY_ACK"})(mt||(mt={}));class Wy{constructor(r){this.replacer=r}encode(r){return(r.type===mt.EVENT||r.type===mt.ACK)&&Yr(r)?this.encodeAsBinary({type:r.type===mt.EVENT?mt.BINARY_EVENT:mt.BINARY_ACK,nsp:r.nsp,data:r.data,id:r.id}):[this.encodeAsString(r)]}encodeAsString(r){let n=""+r.type;return(r.type===mt.BINARY_EVENT||r.type===mt.BINARY_ACK)&&(n+=r.attachments+"-"),r.nsp&&r.nsp!=="/"&&(n+=r.nsp+","),r.id!=null&&(n+=r.id),r.data!=null&&(n+=JSON.stringify(r.data,this.replacer)),n}encodeAsBinary(r){const n=Py(r),o=this.encodeAsString(n.packet),u=n.buffers;return u.unshift(o),u}}function Tu(s){return Object.prototype.toString.call(s)==="[object Object]"}class Ms extends Dt{constructor(r){super(),this.reviver=r}add(r){let n;if(typeof r=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");n=this.decodeString(r);const o=n.type===mt.BINARY_EVENT;o||n.type===mt.BINARY_ACK?(n.type=o?mt.EVENT:mt.ACK,this.reconstructor=new Ky(n),n.attachments===0&&super.emitReserved("decoded",n)):super.emitReserved("decoded",n)}else if(Fs(r)||r.base64)if(this.reconstructor)n=this.reconstructor.takeBinaryData(r),n&&(this.reconstructor=null,super.emitReserved("decoded",n));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+r)}decodeString(r){let n=0;const o={type:Number(r.charAt(0))};if(mt[o.type]===void 0)throw new Error("unknown packet type "+o.type);if(o.type===mt.BINARY_EVENT||o.type===mt.BINARY_ACK){const f=n+1;for(;r.charAt(++n)!=="-"&&n!=r.length;);const m=r.substring(f,n);if(m!=Number(m)||r.charAt(n)!=="-")throw new Error("Illegal attachments");o.attachments=Number(m)}if(r.charAt(n+1)==="/"){const f=n+1;for(;++n&&!(r.charAt(n)===","||n===r.length););o.nsp=r.substring(f,n)}else o.nsp="/";const u=r.charAt(n+1);if(u!==""&&Number(u)==u){const f=n+1;for(;++n;){const m=r.charAt(n);if(m==null||Number(m)!=m){--n;break}if(n===r.length)break}o.id=Number(r.substring(f,n+1))}if(r.charAt(++n)){const f=this.tryParse(r.substr(n));if(Ms.isPayloadValid(o.type,f))o.data=f;else throw new Error("invalid payload")}return o}tryParse(r){try{return JSON.parse(r,this.reviver)}catch{return!1}}static isPayloadValid(r,n){switch(r){case mt.CONNECT:return Tu(n);case mt.DISCONNECT:return n===void 0;case mt.CONNECT_ERROR:return typeof n=="string"||Tu(n);case mt.EVENT:case mt.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&My.indexOf(n[0])===-1);case mt.ACK:case mt.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class Ky{constructor(r){this.packet=r,this.buffers=[],this.reconPack=r}takeBinaryData(r){if(this.buffers.push(r),this.buffers.length===this.reconPack.attachments){const n=Fy(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const Gy=Object.freeze(Object.defineProperty({__proto__:null,Decoder:Ms,Encoder:Wy,get PacketType(){return mt},protocol:qy},Symbol.toStringTag,{value:"Module"}));function Te(s,r,n){return s.on(r,n),function(){s.off(r,n)}}const Hy=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class tc extends Dt{constructor(r,n,o){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=r,this.nsp=n,o&&o.auth&&(this.auth=o.auth),this._opts=Object.assign({},o),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const r=this.io;this.subs=[Te(r,"open",this.onopen.bind(this)),Te(r,"packet",this.onpacket.bind(this)),Te(r,"error",this.onerror.bind(this)),Te(r,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...r){return r.unshift("message"),this.emit.apply(this,r),this}emit(r,...n){if(Hy.hasOwnProperty(r))throw new Error('"'+r.toString()+'" is a reserved event name');if(n.unshift(r),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(n),this;const o={type:mt.EVENT,data:n};if(o.options={},o.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){const f=this.ids++,m=n.pop();this._registerAckCallback(f,m),o.id=f}const u=this.io.engine&&this.io.engine.transport&&this.io.engine.transport.writable;return this.flags.volatile&&(!u||!this.connected)||(this.connected?(this.notifyOutgoingListeners(o),this.packet(o)):this.sendBuffer.push(o)),this.flags={},this}_registerAckCallback(r,n){var o;const u=(o=this.flags.timeout)!==null&&o!==void 0?o:this._opts.ackTimeout;if(u===void 0){this.acks[r]=n;return}const f=this.io.setTimeoutFn(()=>{delete this.acks[r];for(let m=0;m<this.sendBuffer.length;m++)this.sendBuffer[m].id===r&&this.sendBuffer.splice(m,1);n.call(this,new Error("operation has timed out"))},u);this.acks[r]=(...m)=>{this.io.clearTimeoutFn(f),n.apply(this,[null,...m])}}emitWithAck(r,...n){const o=this.flags.timeout!==void 0||this._opts.ackTimeout!==void 0;return new Promise((u,f)=>{n.push((m,g)=>o?m?f(m):u(g):u(m)),this.emit(r,...n)})}_addToQueue(r){let n;typeof r[r.length-1]=="function"&&(n=r.pop());const o={id:this._queueSeq++,tryCount:0,pending:!1,args:r,flags:Object.assign({fromQueue:!0},this.flags)};r.push((u,...f)=>o!==this._queue[0]?void 0:(u!==null?o.tryCount>this._opts.retries&&(this._queue.shift(),n&&n(u)):(this._queue.shift(),n&&n(null,...f)),o.pending=!1,this._drainQueue())),this._queue.push(o),this._drainQueue()}_drainQueue(r=!1){if(!this.connected||this._queue.length===0)return;const n=this._queue[0];n.pending&&!r||(n.pending=!0,n.tryCount++,this.flags=n.flags,this.emit.apply(this,n.args))}packet(r){r.nsp=this.nsp,this.io._packet(r)}onopen(){typeof this.auth=="function"?this.auth(r=>{this._sendConnectPacket(r)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(r){this.packet({type:mt.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},r):r})}onerror(r){this.connected||this.emitReserved("connect_error",r)}onclose(r,n){this.connected=!1,delete this.id,this.emitReserved("disconnect",r,n)}onpacket(r){if(r.nsp===this.nsp)switch(r.type){case mt.CONNECT:r.data&&r.data.sid?this.onconnect(r.data.sid,r.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case mt.EVENT:case mt.BINARY_EVENT:this.onevent(r);break;case mt.ACK:case mt.BINARY_ACK:this.onack(r);break;case mt.DISCONNECT:this.ondisconnect();break;case mt.CONNECT_ERROR:this.destroy();const n=new Error(r.data.message);n.data=r.data.data,this.emitReserved("connect_error",n);break}}onevent(r){const n=r.data||[];r.id!=null&&n.push(this.ack(r.id)),this.connected?this.emitEvent(n):this.receiveBuffer.push(Object.freeze(n))}emitEvent(r){if(this._anyListeners&&this._anyListeners.length){const n=this._anyListeners.slice();for(const o of n)o.apply(this,r)}super.emit.apply(this,r),this._pid&&r.length&&typeof r[r.length-1]=="string"&&(this._lastOffset=r[r.length-1])}ack(r){const n=this;let o=!1;return function(...u){o||(o=!0,n.packet({type:mt.ACK,id:r,data:u}))}}onack(r){const n=this.acks[r.id];typeof n=="function"&&(n.apply(this,r.data),delete this.acks[r.id])}onconnect(r,n){this.id=r,this.recovered=n&&this._pid===n,this._pid=n,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach(r=>this.emitEvent(r)),this.receiveBuffer=[],this.sendBuffer.forEach(r=>{this.notifyOutgoingListeners(r),this.packet(r)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(r=>r()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:mt.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(r){return this.flags.compress=r,this}get volatile(){return this.flags.volatile=!0,this}timeout(r){return this.flags.timeout=r,this}onAny(r){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(r),this}prependAny(r){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(r),this}offAny(r){if(!this._anyListeners)return this;if(r){const n=this._anyListeners;for(let o=0;o<n.length;o++)if(r===n[o])return n.splice(o,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(r){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(r),this}prependAnyOutgoing(r){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(r),this}offAnyOutgoing(r){if(!this._anyOutgoingListeners)return this;if(r){const n=this._anyOutgoingListeners;for(let o=0;o<n.length;o++)if(r===n[o])return n.splice(o,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(r){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const n=this._anyOutgoingListeners.slice();for(const o of n)o.apply(this,r.data)}}}function In(s){s=s||{},this.ms=s.min||100,this.max=s.max||1e4,this.factor=s.factor||2,this.jitter=s.jitter>0&&s.jitter<=1?s.jitter:0,this.attempts=0}In.prototype.duration=function(){var s=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var r=Math.random(),n=Math.floor(r*this.jitter*s);s=Math.floor(r*10)&1?s+n:s-n}return Math.min(s,this.max)|0};In.prototype.reset=function(){this.attempts=0};In.prototype.setMin=function(s){this.ms=s};In.prototype.setMax=function(s){this.max=s};In.prototype.setJitter=function(s){this.jitter=s};class Is extends Dt{constructor(r,n){var o;super(),this.nsps={},this.subs=[],r&&typeof r=="object"&&(n=r,r=void 0),n=n||{},n.path=n.path||"/socket.io",this.opts=n,Qr(this,n),this.reconnection(n.reconnection!==!1),this.reconnectionAttempts(n.reconnectionAttempts||1/0),this.reconnectionDelay(n.reconnectionDelay||1e3),this.reconnectionDelayMax(n.reconnectionDelayMax||5e3),this.randomizationFactor((o=n.randomizationFactor)!==null&&o!==void 0?o:.5),this.backoff=new In({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(n.timeout==null?2e4:n.timeout),this._readyState="closed",this.uri=r;const u=n.parser||Gy;this.encoder=new u.Encoder,this.decoder=new u.Decoder,this._autoConnect=n.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(r){return arguments.length?(this._reconnection=!!r,this):this._reconnection}reconnectionAttempts(r){return r===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=r,this)}reconnectionDelay(r){var n;return r===void 0?this._reconnectionDelay:(this._reconnectionDelay=r,(n=this.backoff)===null||n===void 0||n.setMin(r),this)}randomizationFactor(r){var n;return r===void 0?this._randomizationFactor:(this._randomizationFactor=r,(n=this.backoff)===null||n===void 0||n.setJitter(r),this)}reconnectionDelayMax(r){var n;return r===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=r,(n=this.backoff)===null||n===void 0||n.setMax(r),this)}timeout(r){return arguments.length?(this._timeout=r,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(r){if(~this._readyState.indexOf("open"))return this;this.engine=new Zu(this.uri,this.opts);const n=this.engine,o=this;this._readyState="opening",this.skipReconnect=!1;const u=Te(n,"open",function(){o.onopen(),r&&r()}),f=g=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",g),r?r(g):this.maybeReconnectOnOpen()},m=Te(n,"error",f);if(this._timeout!==!1){const g=this._timeout,S=this.setTimeoutFn(()=>{u(),f(new Error("timeout")),n.close()},g);this.opts.autoUnref&&S.unref(),this.subs.push(()=>{this.clearTimeoutFn(S)})}return this.subs.push(u),this.subs.push(m),this}connect(r){return this.open(r)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const r=this.engine;this.subs.push(Te(r,"ping",this.onping.bind(this)),Te(r,"data",this.ondata.bind(this)),Te(r,"error",this.onerror.bind(this)),Te(r,"close",this.onclose.bind(this)),Te(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(r){try{this.decoder.add(r)}catch(n){this.onclose("parse error",n)}}ondecoded(r){Ps(()=>{this.emitReserved("packet",r)},this.setTimeoutFn)}onerror(r){this.emitReserved("error",r)}socket(r,n){let o=this.nsps[r];return o?this._autoConnect&&!o.active&&o.connect():(o=new tc(this,r,n),this.nsps[r]=o),o}_destroy(r){const n=Object.keys(this.nsps);for(const o of n)if(this.nsps[o].active)return;this._close()}_packet(r){const n=this.encoder.encode(r);for(let o=0;o<n.length;o++)this.engine.write(n[o],r.options)}cleanup(){this.subs.forEach(r=>r()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close"),this.engine&&this.engine.close()}disconnect(){return this._close()}onclose(r,n){this.cleanup(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",r,n),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const r=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const n=this.backoff.duration();this._reconnecting=!0;const o=this.setTimeoutFn(()=>{r.skipReconnect||(this.emitReserved("reconnect_attempt",r.backoff.attempts),!r.skipReconnect&&r.open(u=>{u?(r._reconnecting=!1,r.reconnect(),this.emitReserved("reconnect_error",u)):r.onreconnect()}))},n);this.opts.autoUnref&&o.unref(),this.subs.push(()=>{this.clearTimeoutFn(o)})}}onreconnect(){const r=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",r)}}const Zn={};function jr(s,r){typeof s=="object"&&(r=s,s=void 0),r=r||{};const n=Ly(s,r.path||"/socket.io"),o=n.source,u=n.id,f=n.path,m=Zn[u]&&f in Zn[u].nsps,g=r.forceNew||r["force new connection"]||r.multiplex===!1||m;let S;return g?S=new Is(o,r):(Zn[u]||(Zn[u]=new Is(o,r)),S=Zn[u]),n.query&&!r.query&&(r.query=n.queryKey),S.socket(n.path,r)}Object.assign(jr,{Manager:Is,Socket:tc,io:jr,connect:jr});let Jr;const $y=new Uint8Array(16);function zy(){if(!Jr&&(Jr=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Jr))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Jr($y)}const Gt=[];for(let s=0;s<256;++s)Gt.push((s+256).toString(16).slice(1));function Xy(s,r=0){return Gt[s[r+0]]+Gt[s[r+1]]+Gt[s[r+2]]+Gt[s[r+3]]+"-"+Gt[s[r+4]]+Gt[s[r+5]]+"-"+Gt[s[r+6]]+Gt[s[r+7]]+"-"+Gt[s[r+8]]+Gt[s[r+9]]+"-"+Gt[s[r+10]]+Gt[s[r+11]]+Gt[s[r+12]]+Gt[s[r+13]]+Gt[s[r+14]]+Gt[s[r+15]]}const Jy=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),xu={randomUUID:Jy};function Vy(s,r,n){if(xu.randomUUID&&!r&&!s)return xu.randomUUID();s=s||{};const o=s.random||(s.rng||zy)();if(o[6]=o[6]&15|64,o[8]=o[8]&63|128,r){n=n||0;for(let u=0;u<16;++u)r[n+u]=o[u];return r}return Xy(o)}function Yy(s){return!!s&&(typeof s=="object"||typeof s=="function")&&typeof s.then=="function"}function jy(s,r){const n=r.map(u=>JSON.stringify(u)).join(" "),o=new Date().toISOString();return JSON.stringify({level:s,time:o,message:n})}function Zy(s){const r=String(s[0]),n=s.slice(1);return{level:r,logs:n}}function Qy(s,r){const n=JSON.parse(s);return r.forEach(o=>delete n[o]),n}const t0={reconnection:!0,reconnectionDelay:5e3,reconnectionAttempts:10,upgrade:!1,transports:["websocket"],debug:!1},Cs={logToConsole:!0,overloadGlobalConsole:!1,socketEmitInterval:6e4};let ie=console;class Ru{constructor(r){qt(this,"logToConsole"),qt(this,"overloadGlobalConsole"),qt(this,"namespace"),qt(this,"socketEmitInterval"),qt(this,"storageId"),qt(this,"emitInProgress"),qt(this,"queue"),qt(this,"processing"),qt(this,"interval"),qt(this,"logIndex"),qt(this,"socket"),qt(this,"getItem"),qt(this,"setItem"),qt(this,"parseLog"),qt(this,"_logMethod"),qt(this,"_warnMethod"),qt(this,"_errorMethod"),qt(this,"_debugMethod");const{loggerOptions:n}=r;if(!n.namespace)throw new Error("Config property 'namespace' should be provided!");this.setupStorageFunctions(n.getItem,n.setItem,n.parseLog),this.namespace=n.namespace,this.socketEmitInterval=n.socketEmitInterval||Cs.socketEmitInterval,this.logToConsole=n.logToConsole!==void 0?n.logToConsole:Cs.logToConsole,this.overloadGlobalConsole=n.overloadGlobalConsole!==void 0?n.overloadGlobalConsole:Cs.overloadGlobalConsole,this.storageId=this.getStorageName(),this.queue=[],this.processing=!1,this.emitInProgress=!1,this.logIndex=0,this.init(r)}setupStorageFunctions(r,n,o){this.getItem=r&&typeof r=="function"?this.promisifyStorageFunction(r):this.defaultGetItemFunction,this.setItem=n&&typeof n=="function"?this.promisifyStorageFunction(n):this.defaultSetItemFunction,this.parseLog=o&&typeof o=="function"?o:jy}promisifyStorageFunction(r){const n=r("");return Yy(n)?async(...o)=>new Promise((u,f)=>{try{const m=r(...o);u(m)}catch(m){f(m)}}):r}init(r){const{socket:n,url:o,socketOptions:u={}}=r;this._logMethod=ie.log.bind(ie),this._warnMethod=ie.warn.bind(ie),this._errorMethod=ie.error.bind(ie),this._debugMethod=ie.debug.bind(ie),this.initStorage().then(()=>{if(n)this.socket=n;else if(o)this.socket=this.createConnection(o,u);else throw new Error("Must provide either a 'socket' or a 'url' for socket connection");this.interval=setInterval(async()=>{await this.emitLogs()},this.socketEmitInterval),this.overloadGlobalConsole&&this._overloadConsole()})}createConnection(r,n={}){const o={...t0,...n};return jr(r,o)}async emitLogs(){if(!this.emitInProgress)try{const r=await this.getItem(this.storageId);if(!r)return;const n=[];this.emitInProgress=!0;const o=JSON.parse(r),u=Object.keys(o);if(!u.length)return;if(!this.socket||!this.socket.connected)throw new Error("Socket is disconnected");for(const g of u)this.socket.emit("Log",o[g]),n.push(g);const f=await this.getItem(this.storageId);if(!f)return;const m=Qy(f,n);await this.setItem(this.storageId,JSON.stringify(m))}catch(r){this._errorMethod(r)}finally{this.emitInProgress=!1}}disconnectSocket(){!this.socket||!this.interval||(this.socket.disconnect(),clearInterval(this.interval))}_overloadConsole(){ie=Object.assign(ie,{log:(...r)=>{this.log(...r)},warn:(...r)=>{this.warn(...r)},error:(...r)=>{this.error(...r)},debug:(...r)=>{this.debug(...r)}})}async initStorage(){const r=await this.getItem(this.storageId);(!r||typeof r!="string")&&await this.setItem(this.storageId,JSON.stringify({}))}async resetStorage(){await this.setItem(this.storageId,JSON.stringify({}))}getStorageName(){const r=Vy();return this.namespace.toString().toUpperCase()+r+Date.now()}async processLog(...r){try{if(r.length<2)return;const n=await this.getItem(this.storageId);if(!n)return;const{level:o,logs:u}=Zy(r),f=JSON.parse(n),m=this.formItemKey(o);f[m]=this.parseLog(o,u),await this.setItem(this.storageId,JSON.stringify(f))}catch(n){this._errorMethod(n)}}async processQueue(){if(this.processing||this.queue.length===0)return;const r=this.queue.shift();r&&(this.processing=!0,await this.processLog(...r).finally(()=>{this.processing=!1,this.processQueue()}))}log(...r){const n=["INFO",...r];this.queue.push(n),this.logToConsole&&this._logMethod.apply(ie,r),this.processQueue()}warn(...r){const n=["WARN",...r];this.queue.push(n),this.logToConsole&&this._warnMethod.apply(ie,r),this.processQueue()}error(...r){const n=["ERROR",...r];this.queue.push(n),this.logToConsole&&this._errorMethod.apply(ie,r),this.processQueue()}debug(...r){const n=["DEBUG",...r];this.queue.push(n),this.logToConsole&&this._debugMethod.apply(ie,r),this.processQueue()}async defaultGetItemFunction(r){return localStorage.getItem(r)}async defaultSetItemFunction(r,n){try{localStorage.setItem(r,n)}catch(o){this._errorMethod(o)}}formItemKey(r){const n=new Date().toISOString();return this.logIndex++,`${r}-${this.namespace}-${n}-${this.logIndex}`}}class e0{constructor(r){wt(this,"io");wt(this,"storageLogger");this.eventsSdkClass=r,this.eventsSdkClass=r}init(){this.eventsSdkClass.options.useLogger&&(this.eventsSdkClass.options.loggerSocketConnection?this.io=this.eventsSdkClass.options.loggerSocketConnection:this.eventsSdkClass.socketIoClass.ioFunction&&(this.io=this.eventsSdkClass.socketIoClass.ioFunction(this.eventsSdkClass.options.loggerServer,this.eventsSdkClass.options.loggerConnectOptions)),this.io?this.storageLogger=new Ru({socket:this.io,loggerOptions:this.eventsSdkClass.options.loggerConfig}):this.storageLogger=new Ru({url:this.eventsSdkClass.options.loggerServer,socketOptions:this.eventsSdkClass.options.loggerConnectOptions,loggerOptions:this.eventsSdkClass.options.loggerConfig}))}log(r,n,...o){const u=[n,...o];this.storageLogger?r===Jt.INFO?this.storageLogger.log(u):r===Jt.ERROR&&this.storageLogger.error(u):r===Jt.INFO?console.log(u):r===Jt.ERROR&&console.error(u)}}class n0{constructor(r){wt(this,"listeners",{[ht.ALL_EXTENSION_STATUS]:[],[ht.ALL_DIALER_STATUS]:[],[ht.ALL_USERS_STATUS]:[],[ht.QUEUE_EVENT]:[],[ht.EXTENSION_EVENT]:[],[ht.DIALER_EVENT]:[],[ht.LOGIN_SUCCESS]:[],[ht.LOGIN_STATUS]:[],[ht.KEEP_ALIVE_RESPONSE]:[],[ht.ONLINE_STATUS_EVENT]:[],[ht.EXTENSIONS_UPDATED]:[]});wt(this,"allListeners",[]);this.eventsSdkClass=r,this.eventsSdkClass=r}on(r,n){r==="*"?this.allListeners.push(n):this.listeners[r].push(n)}off(r,n){if(r==="*")this.allListeners=this.allListeners.filter(o=>o!==n);else{const u=this.listeners[r].filter(f=>f!==n);this.listeners={...this.listeners,[r]:u}}}emit(r,n){this.eventsSdkClass.socketIoClass.lastEventTimestamp=new Date().getTime(),this.listeners[r].forEach(u=>u({name:r,data:n}));const o={name:r,data:n};this.allListeners.forEach(u=>u(o))}}class r0{constructor(r){wt(this,"argumentOptions");wt(this,"options");wt(this,"servers",[]);wt(this,"URLList",[]);wt(this,"server");wt(this,"URL");wt(this,"socket");wt(this,"mainServer");wt(this,"alreadyAttemptedOtherServers",[]);wt(this,"authClass",new Gv(this));wt(this,"socketIoClass",new Qv(this));wt(this,"loggerClass",new e0(this));wt(this,"eventEmitterClass",new n0(this));wt(this,"reconnectOptions");wt(this,"retryConnection");this.options={...$v,...r},this.reconnectOptions={retryCount:1,maxReconnectAttempts:this.options.maxReconnectAttempts,reconnectionDelay:this.options.reconnectionDelay,minReconnectionDelay:this.options.reconnectionDelay,maxReconnectionDelay:6e4*5},this.server=this.options.fallbackServer,this.retryConnection=Hv.debounce(this.connect.bind(this),this.reconnectOptions.reconnectionDelay,{leading:!0,trailing:!1}),this.argumentOptions={...r}}on(r,n){this.eventEmitterClass.on(r,n)}emit(r,...n){this.socketIoClass.io&&this.socketIoClass.io.emit(r,...n)}connect(r){r===pn.MAIN&&this.findMainServer(),r===pn.NEXT&&this.findNextServer(),this.socketIoClass.doReconnect=!0,this.socketIoClass.initSocketConnection(),this.socketIoClass.initSocketEvents(),this.socketIoClass.initKeepAlive(),this.loggerClass.init()}disconnect(){this.socketIoClass.doReconnect=!1,this.socketIoClass.closeAllConnections()}clearKeepAliveInterval(){this.socketIoClass.clearKeepAliveInterval()}findMainServer(){this.servers.length?(this.mainServer=this.servers.reduce((r,n)=>n.Priority>r.Priority?n:r),this.server=this.mainServer):this.URLList.length&&(this.URL=this.URLList[0])}findNextServer(){if(this.servers.length)if(this.server.Priority===this.mainServer.Priority){let r=this.servers.filter(n=>n.Priority!==this.mainServer.Priority&&this.alreadyAttemptedOtherServers.indexOf(n.Priority)+1===0);r.length||(this.alreadyAttemptedOtherServers=[],r=this.servers.filter(n=>n.Priority!==this.mainServer.Priority&&this.alreadyAttemptedOtherServers.indexOf(n.Priority)+1===0)),r.length&&(this.server=r.reduce((n,o)=>o.Priority>n.Priority?o:n),this.alreadyAttemptedOtherServers.push(this.server.Priority))}else this.server=this.mainServer;else if(this.URLList.length)if(this.URL===this.URLList[0]){let r=this.URLList.filter(n=>n!==this.URLList[0]&&this.alreadyAttemptedOtherServers.indexOf(n)+1===0);r.length||(this.alreadyAttemptedOtherServers=[],r=this.URLList.filter(n=>n!==this.URLList[0]&&this.alreadyAttemptedOtherServers.indexOf(n)+1===0)),r.length&&(this.URL=r[0],this.alreadyAttemptedOtherServers.push(this.URL))}else this.URL=this.URLList[0]}async init(){return this.socket,await this.authClass.login(this.options),this.getServers(),!0}getServers(){this.options.serverFetchStrategy==="static"&&this.argumentOptions.servers&&Array.isArray(this.argumentOptions.servers)&&this.argumentOptions.servers.length>1&&(this.servers=this.argumentOptions.servers)}}exports.CallStatusEnum=Bu;exports.CallTypeEnum=Uu;exports.DialerTypeEnum=Du;exports.DirectionEnum=Pu;exports.DoNotCallMeStatusCodeEnum=Fu;exports.EventsEnum=ht;exports.ExtensionEventReasonEnum=Ls;exports.ExtensionHangupCauseEnum=Mu;exports.QueueEventReasonEnum=qu;exports.ServerListenerEventsEnum=Ns;exports.default=r0;
|
|
37
|
+
]`&&z(new Date(-864e13))=='"-271821-04-20T00:00:00.000Z"'&&z(new Date(864e13))=='"+275760-09-13T00:00:00.000Z"'&&z(new Date(-621987552e5))=='"-000001-01-01T00:00:00.000Z"'&&z(new Date(-1))=='"1969-12-31T23:59:59.999Z"'}catch{et=!1}}Q=et}if($=="json-parse"){var nt=w.parse;if(typeof nt=="function")try{if(nt("0")===0&&!nt(!1)){G=nt(rt);var Z=G.a.length==5&&G.a[0]===1;if(Z){try{Z=!nt('" "')}catch{}if(Z)try{Z=nt("01")!==1}catch{}if(Z)try{Z=nt("1.")!==1}catch{}}}}catch{Z=!1}Q=Z}}return c[$]=!!Q}var f,v,d,b={}.toString,p=typeof JSON=="object"&&JSON,w=typeof n=="object"&&n&&!n.nodeType&&n;w&&p?(w.stringify=p.stringify,w.parse=p.parse):w=s.JSON=p||{};var g=new Date(-0xc782b5b800cec);try{g=g.getUTCFullYear()==-109252&&g.getUTCMonth()===0&&g.getUTCDate()===1&&g.getUTCHours()==10&&g.getUTCMinutes()==37&&g.getUTCSeconds()==6&&g.getUTCMilliseconds()==708}catch{}if(!c("json")){var l="[object Function]",u="[object Date]",_="[object Number]",A="[object String]",k="[object Array]",B="[object Boolean]",Y=c("bug-string-char-index");if(!g)var j=Math.floor,N=[0,31,59,90,120,151,181,212,243,273,304,334],U=function($,Q){return N[Q]+365*($-1970)+j(($-1969+(Q=+(Q>1)))/4)-j(($-1901+Q)/100)+j(($-1601+Q)/400)};(f={}.hasOwnProperty)||(f=function($){var Q,G={};return(G.__proto__=null,G.__proto__={toString:1},G).toString!=b?f=function(rt){var z=this.__proto__,et=rt in(this.__proto__=null,this);return this.__proto__=z,et}:(Q=G.constructor,f=function(rt){var z=(this.constructor||Q).prototype;return rt in this&&!(rt in z&&this[rt]===z[rt])}),G=null,f.call(this,$)});var T={boolean:1,number:1,string:1,undefined:1},O=function($,Q){var G=typeof $[Q];return G=="object"?!!$[Q]:!T[G]};if(v=function($,Q){var G,rt,z,et=0;(G=function(){this.valueOf=0}).prototype.valueOf=0,rt=new G;for(z in rt)f.call(rt,z)&&et++;return G=rt=null,et?v=et==2?function(nt,Z){var at,St={},$t=b.call(nt)==l;for(at in nt)$t&&at=="prototype"||f.call(St,at)||!(St[at]=1)||!f.call(nt,at)||Z(at)}:function(nt,Z){var at,St,$t=b.call(nt)==l;for(at in nt)$t&&at=="prototype"||!f.call(nt,at)||(St=at==="constructor")||Z(at);(St||f.call(nt,at="constructor"))&&Z(at)}:(rt=["valueOf","toString","toLocaleString","propertyIsEnumerable","isPrototypeOf","hasOwnProperty","constructor"],v=function(nt,Z){var at,St,$t=b.call(nt)==l,Ot=!$t&&typeof nt.constructor!="function"&&O(nt,"hasOwnProperty")?nt.hasOwnProperty:f;for(at in nt)$t&&at=="prototype"||!Ot.call(nt,at)||Z(at);for(St=rt.length;at=rt[--St];Ot.call(nt,at)&&Z(at));}),v($,Q)},!c("json-stringify")){var P={92:"\\\\",34:'\\"',8:"\\b",12:"\\f",10:"\\n",13:"\\r",9:"\\t"},R="000000",L=function($,Q){return(R+(Q||0)).slice(-$)},H="\\u00",K=function($){var Q,G='"',rt=0,z=$.length,et=z>10&&Y;for(et&&(Q=$.split(""));z>rt;rt++){var nt=$.charCodeAt(rt);switch(nt){case 8:case 9:case 10:case 12:case 13:case 34:case 92:G+=P[nt];break;default:if(32>nt){G+=H+L(2,nt.toString(16));break}G+=et?Q[rt]:Y?$.charAt(rt):$[rt]}}return G+'"'},X=function($,Q,G,rt,z,et,nt){var Z,at,St,$t,Ot,ke,Gn,ce,bn,Xn,Vt,Zt,Oe,Ne,$n,Pe;try{Z=Q[$]}catch{}if(typeof Z=="object"&&Z)if(at=b.call(Z),at!=u||f.call(Z,"toJSON"))typeof Z.toJSON=="function"&&(at!=_&&at!=A&&at!=k||f.call(Z,"toJSON"))&&(Z=Z.toJSON($));else if(Z>-1/0&&1/0>Z){if(U){for(Ot=j(Z/864e5),St=j(Ot/365.2425)+1970-1;U(St+1,0)<=Ot;St++);for($t=j((Ot-U(St,0))/30.42);U(St,$t+1)<=Ot;$t++);Ot=1+Ot-U(St,$t),ke=(Z%864e5+864e5)%864e5,Gn=j(ke/36e5)%24,ce=j(ke/6e4)%60,bn=j(ke/1e3)%60,Xn=ke%1e3}else St=Z.getUTCFullYear(),$t=Z.getUTCMonth(),Ot=Z.getUTCDate(),Gn=Z.getUTCHours(),ce=Z.getUTCMinutes(),bn=Z.getUTCSeconds(),Xn=Z.getUTCMilliseconds();Z=(0>=St||St>=1e4?(0>St?"-":"+")+L(6,0>St?-St:St):L(4,St))+"-"+L(2,$t+1)+"-"+L(2,Ot)+"T"+L(2,Gn)+":"+L(2,ce)+":"+L(2,bn)+"."+L(3,Xn)+"Z"}else Z=null;if(G&&(Z=G.call(Q,$,Z)),Z===null)return"null";if(at=b.call(Z),at==B)return""+Z;if(at==_)return Z>-1/0&&1/0>Z?""+Z:"null";if(at==A)return K(""+Z);if(typeof Z=="object"){for(Ne=nt.length;Ne--;)if(nt[Ne]===Z)throw TypeError();if(nt.push(Z),Vt=[],$n=et,et+=z,at==k){for(Oe=0,Ne=Z.length;Ne>Oe;Oe++)Zt=X(Oe,Z,G,rt,z,et,nt),Vt.push(Zt===d?"null":Zt);Pe=Vt.length?z?`[
|
|
38
|
+
`+et+Vt.join(`,
|
|
39
|
+
`+et)+`
|
|
40
|
+
`+$n+"]":"["+Vt.join(",")+"]":"[]"}else v(rt||Z,function(jn){var Je=X(jn,Z,G,rt,z,et,nt);Je!==d&&Vt.push(K(jn)+":"+(z?" ":"")+Je)}),Pe=Vt.length?z?`{
|
|
41
|
+
`+et+Vt.join(`,
|
|
42
|
+
`+et)+`
|
|
43
|
+
`+$n+"}":"{"+Vt.join(",")+"}":"{}";return nt.pop(),Pe}};w.stringify=function($,Q,G){var rt,z,et,nt;if(typeof Q=="function"||typeof Q=="object"&&Q){if((nt=b.call(Q))==l)z=Q;else if(nt==k){et={};for(var Z,at=0,St=Q.length;St>at;Z=Q[at++],nt=b.call(Z),(nt==A||nt==_)&&(et[Z]=1));}}if(G)if((nt=b.call(G))==_){if((G-=G%1)>0)for(rt="",G>10&&(G=10);rt.length<G;rt+=" ");}else nt==A&&(rt=G.length<=10?G:G.slice(0,10));return X("",(Z={},Z[""]=$,Z),z,et,rt,"",[])}}if(!c("json-parse")){var F,lt,ct=String.fromCharCode,xt={92:"\\",34:'"',47:"/",98:"\b",116:" ",110:`
|
|
44
|
+
`,102:"\f",114:"\r"},ut=function(){throw F=lt=null,SyntaxError()},Xt=function(){for(var $,Q,G,rt,z,et=lt,nt=et.length;nt>F;)switch(z=et.charCodeAt(F)){case 9:case 10:case 13:case 32:F++;break;case 123:case 125:case 91:case 93:case 58:case 44:return $=Y?et.charAt(F):et[F],F++,$;case 34:for($="@",F++;nt>F;)if(z=et.charCodeAt(F),32>z)ut();else if(z==92)switch(z=et.charCodeAt(++F)){case 92:case 34:case 47:case 98:case 116:case 110:case 102:case 114:$+=xt[z],F++;break;case 117:for(Q=++F,G=F+4;G>F;F++)z=et.charCodeAt(F),z>=48&&57>=z||z>=97&&102>=z||z>=65&&70>=z||ut();$+=ct("0x"+et.slice(Q,F));break;default:ut()}else{if(z==34)break;for(z=et.charCodeAt(F),Q=F;z>=32&&z!=92&&z!=34;)z=et.charCodeAt(++F);$+=et.slice(Q,F)}if(et.charCodeAt(F)==34)return F++,$;ut();default:if(Q=F,z==45&&(rt=!0,z=et.charCodeAt(++F)),z>=48&&57>=z){for(z==48&&(z=et.charCodeAt(F+1),z>=48&&57>=z)&&ut(),rt=!1;nt>F&&(z=et.charCodeAt(F),z>=48&&57>=z);F++);if(et.charCodeAt(F)==46){for(G=++F;nt>G&&(z=et.charCodeAt(G),z>=48&&57>=z);G++);G==F&&ut(),F=G}if(z=et.charCodeAt(F),z==101||z==69){for(z=et.charCodeAt(++F),(z==43||z==45)&&F++,G=F;nt>G&&(z=et.charCodeAt(G),z>=48&&57>=z);G++);G==F&&ut(),F=G}return+et.slice(Q,F)}if(rt&&ut(),et.slice(F,F+4)=="true")return F+=4,!0;if(et.slice(F,F+5)=="false")return F+=5,!1;if(et.slice(F,F+4)=="null")return F+=4,null;ut()}return"$"},Ie=function($){var Q,G;if($=="$"&&ut(),typeof $=="string"){if((Y?$.charAt(0):$[0])=="@")return $.slice(1);if($=="["){for(Q=[];$=Xt(),$!="]";G||(G=!0))G&&($==","?($=Xt(),$=="]"&&ut()):ut()),$==","&&ut(),Q.push(Ie($));return Q}if($=="{"){for(Q={};$=Xt(),$!="}";G||(G=!0))G&&($==","?($=Xt(),$=="}"&&ut()):ut()),($==","||typeof $!="string"||(Y?$.charAt(0):$[0])!="@"||Xt()!=":")&&ut(),Q[$.slice(1)]=Ie(Xt());return Q}ut()}return $},ae=function($,Q,G){var rt=vr($,Q,G);rt===d?delete $[Q]:$[Q]=rt},vr=function($,Q,G){var rt,z=$[Q];if(typeof z=="object"&&z)if(b.call(z)==k)for(rt=z.length;rt--;)ae(z,rt,G);else v(z,function(et){ae(z,et,G)});return G.call($,Q,z)};w.parse=function($,Q){var G,rt;return F=0,lt=""+$,G=Ie(Xt()),Xt()!="$"&&ut(),F=lt=null,Q&&b.call(Q)==l?vr((rt={},rt[""]=G,rt),"",Q):G}}}})(this)},{}],48:[function(r,o){function n(s,c){var f=[];c=c||0;for(var v=c||0;v<s.length;v++)f[v-c]=s[v];return f}o.exports=n},{}]},{},[1])(1)}const Lv=Object.freeze(Object.defineProperty({__proto__:null,default:Nv},Symbol.toStringTag,{value:"Module"})),Bv=Object.assign({"./v1_3_7.js":Lv}),Uv=/v\d+_\d+_\d+/;function Dv(r){return typeof r=="function"}const jo=Object.entries(Bv).reduce((r,o)=>{var c;const n=o[1].default,s=(c=o[0].match(Uv))==null?void 0:c[0];return Dv(n)&&s&&(r[s]=n()),r},{}),uu=r=>{if(r in jo)return jo[r];throw new Error(`Socket version ${r} not found`)},Pv=(r,...o)=>uu(r)(...o),Fv={...jo,getSocketVersion:uu,makeSocketVersion:Pv};var fu=(r=>(r.RINGING="Ringing",r.TALKING="Talking",r.DIALING="Dialing",r.HOLD="Hold",r))(fu||{}),hu=(r=>(r.INCOMING="Incoming",r.OUTGOING="Outgoing",r))(hu||{}),lu=(r=>(r.AUTOMATIC="Automatic",r.IVR="IVR",r))(lu||{}),pu=(r=>(r.INCOMINC="Incoming",r.OUTGOING="Outgoing",r.SPY="Spy",r.CLICK2CALL="Click2Call",r))(pu||{}),du=(r=>(r.RESPONSE_FROM_API_VALID="RESPONSE_FROM_API_VALID",r.RESPONSE_FROM_API_INVALID="RESPONSE_FROM_API_INVALID",r))(du||{}),vt=(r=>(r.ALL_DIALER_STATUS="AllDialersStatus",r.ALL_EXTENSION_STATUS="AllExtensionsStatus",r.ALL_USERS_STATUS="AllUsersStatus",r.CONNECT="connect",r.DISCONNECT="disconnect",r.CONNECT_ERROR_EVENT="connect_error",r.EXTENSION_EVENT="ExtensionEvent",r.KEEP_ALIVE="keepalive",r.KEEP_ALIVE_RESPONSE="keepaliveResponse",r.LOGIN_STATUS="loginStatus",r.LOGIN_SUCCESS="loginSuccess",r.QUEUE_EVENT="QueueEvent",r.ONLINE_STATUS_EVENT="onlineStatusEvent",r.DIALER_EVENT="DialerEvent",r.EXTENSIONS_UPDATED="ExtensionsUpdated",r))(vt||{}),rs=(r=>(r.NEWCALL="NEWCALL",r.ANSWER="ANSWER",r.HOLD="HOLD",r.UNHOLD="UNHOLD",r.HANGUP="HANGUP",r.USER_STATUS_UPDATE="userStatusUpdate",r))(rs||{}),gu=(r=>(r.NORMAL_HANGUP="Normal hangup",r.USER_BUSY="User busy",r.CALL_REJECTED="Call Rejected",r.UNALLOCATED_NUMBER="Unallocated (unassigned) number",r.UNKNOWN="Unknown",r.NO_USER_RESPONDING="No user responding",r.USER_ALERTING="User alerting, no answer",r.ANSWERED_ELSEWHERE="Answered elsewhere",r))(gu||{}),yu=(r=>(r.ANSWER="ANSWER",r.ABANDONED="ABANDONED",r.EXIT="EXIT",r.JOIN="JOIN",r))(yu||{});class Wo{static mapExtensionEvent(o){var v,d;const n=o.reason;let s,c;o.data.currentCall&&(c=this.mapExtensionCall(o,o.data.currentCall));const f=this.mapExtensionData(o,o.data);return n===rs.HANGUP?s={...o,reason:n,data:{...f,currentCall:c?{...c,duration:Date.now()-((c==null?void 0:c.callAnswered_UTC_CLIENT)??0)}:void 0,calls:(v=o.data.calls)==null?void 0:v.map(b=>{const p=this.mapExtensionCall(o,b);return{...p,duration:Date.now()-(p.callAnswered_UTC_CLIENT??0)}})}}:s={...o,data:{...f,currentCall:c,calls:(d=o.data.calls)==null?void 0:d.map(b=>this.mapExtensionCall(o,b))},reason:n},s}static mapAllExtensionStatus(o){return{...o,extensions:o.extensions.map(n=>{var s;return{...this.mapExtensionData(o,n),currentCall:n.currentCall?this.mapExtensionCall(o,n.currentCall):void 0,calls:(s=n.calls)==null?void 0:s.map(c=>this.mapExtensionCall(o,c))}})}}static mapExtensionData(o,n){return this.configureUTCForObject(n,[{key:"lastAnsweredCallEventEpoch",format:"sec"},{key:"lastCallEventEpoch",format:"sec"},{key:"lastHangupCallEpoch",format:"sec"},{key:"representativeUpdated",format:"ms"}],o.servertime,o.servertimeoffset)}static mapExtensionCall(o,n){return this.configureUTCForObject(n,[{key:"callAnswered",format:"sec"},{key:"callStarted",format:"sec"}],o.servertime,o.servertimeoffset)}static mapQueueEvent(o){var n;return{...o,data:{...o.data,Calls:(n=o.data.Calls)==null?void 0:n.map(s=>this.configureUTCForObject(s,[{key:"JoinTimeStamp",format:"sec"}],o.servertime,o.servertimeoffset))}}}static assignProperty(o,n,s){o[n]=s}static configureUTCForObject(o,n,s,c){const f=(s-c*60)*1e3,v=Date.now()-f,d={};return n.forEach(b=>{const p=o[b.key],w=b.key;if(p!==0&&typeof p=="number"&&!isNaN(p)){let g=p;b.format==="ms"&&(g=Math.floor(g/1e3));const l=(g-c*60)*1e3;this.assignProperty(d,`${w}_UTC`,l),this.assignProperty(d,`${w}_UTC_CLIENT`,l+v)}else this.assignProperty(d,`${w}_UTC`,0),this.assignProperty(d,`${w}_UTC_CLIENT`,0)}),{...o,...d}}}var is=(r=>(r.UPDATE_MONITORED_EXTENSIONS="updateMonitoredExtensions",r.KEEP_ALIVE="keepAlive",r))(is||{});class Mv{constructor(o){At(this,"io");At(this,"ioFunction");At(this,"lastEventTimestamp",new Date().getTime());At(this,"doReconnect",!0);At(this,"keepAliveInterval");At(this,"keepReconnectInterval");At(this,"connected",!1);this.eventsSdkClass=o,this.eventsSdkClass=o}getSocketIoFunction(o){const n=o.split("v="),s="v".concat(n[n.length-1]).replaceAll(".","_");this.ioFunction=Fv.getSocketVersion(s)}initSocketConnection(){const o=this.eventsSdkClass.authClass.token,n=this.eventsSdkClass.options.protocol,s=this.eventsSdkClass.server;try{const c=s?s.Domain:this.eventsSdkClass.URL,f=s?`${n}://${c}`:this.eventsSdkClass.URL;this.eventsSdkClass.eventEmitterClass.emit(vt.ONLINE_STATUS_EVENT,{isSocketConnected:!1,attemptToConnect:f,doReconnect:this.doReconnect});const v={reconnection:!1,upgrade:!1,transports:["websocket"],forceNew:!0,query:{token:o},timeout:this.eventsSdkClass.options.timeout};if(o&&(v.query={token:o}),this.ioFunction&&f)this.io=this.ioFunction(f,v);else throw new Error("Socket server url no defined")}catch{}}clearKeepAliveInterval(){this.keepAliveInterval&&clearInterval(this.keepAliveInterval)}initKeepAlive(){this.clearKeepAliveInterval(),this.keepAliveInterval=setInterval(async()=>{if(new Date().getTime()>this.lastEventTimestamp+this.eventsSdkClass.options.keepAliveTimeout&&this.io&&this.eventsSdkClass.authClass.token){this.eventsSdkClass.emit(is.KEEP_ALIVE,this.eventsSdkClass.authClass.token);return}},this.eventsSdkClass.options.keepAliveTimeout)}closeAllConnections(){var o;this.io&&(this.io.close(),(o=this.io)==null||o.disconnect(),this.io=void 0),hr.clearSessionStorage()}initSocketEvents(){this.io&&this.io.on(vt.LOGIN_SUCCESS,o=>this.onLoginSuccessEvent(o)).on(vt.QUEUE_EVENT,o=>this.onQueueEvent(o)).on(vt.EXTENSION_EVENT,o=>this.onExtensionEvent(o)).on(vt.DIALER_EVENT,o=>this.onDialerEvent(o)).on(vt.LOGIN_STATUS,o=>this.onLoginStatusEvent(o)).on(vt.ALL_EXTENSION_STATUS,o=>this.onAllExtensionStatus(o)).on(vt.ALL_DIALER_STATUS,o=>this.onAllDialerStatus(o)).on(vt.KEEP_ALIVE_RESPONSE,o=>this.onKeepAliveResponse(o)).on(vt.EXTENSIONS_UPDATED,o=>this.onExtensionsUpdatedEvent(o)).on(vt.CONNECT,()=>this.onConnect()).on(vt.DISCONNECT,o=>this.onDisconnect(o)).on(vt.CONNECT_ERROR_EVENT,o=>this.onConnectError(o))}onLoginSuccessEvent(o){this.eventsSdkClass.eventEmitterClass.emit(vt.LOGIN_SUCCESS,o)}onQueueEvent(o){this.eventsSdkClass.eventEmitterClass.emit(vt.QUEUE_EVENT,Wo.mapQueueEvent(o))}onExtensionEvent(o){const n=Wo.mapExtensionEvent(o);n&&this.eventsSdkClass.eventEmitterClass.emit(vt.EXTENSION_EVENT,n)}onDialerEvent(o){this.eventsSdkClass.eventEmitterClass.emit(vt.DIALER_EVENT,o)}onLoginStatusEvent(o){this.eventsSdkClass.eventEmitterClass.emit(vt.LOGIN_STATUS,o)}onAllExtensionStatus(o){const n=Wo.mapAllExtensionStatus(o);this.eventsSdkClass.eventEmitterClass.emit(vt.ALL_EXTENSION_STATUS,n)}onAllDialerStatus(o){this.eventsSdkClass.eventEmitterClass.emit(vt.ALL_DIALER_STATUS,o)}onKeepAliveResponse(o){if(o.errorCode){this.initSocketConnection();return}this.connected?this.lastEventTimestamp=new Date().getTime():this.initSocketConnection()}onExtensionsUpdatedEvent(o){this.eventsSdkClass.eventEmitterClass.emit(vt.EXTENSIONS_UPDATED,o)}onConnect(){this.keepReconnectInterval&&clearInterval(this.keepReconnectInterval),this.connected=!0,this.eventsSdkClass.eventEmitterClass.emit(vt.ONLINE_STATUS_EVENT,{isSocketConnected:!0,doReconnect:this.doReconnect})}onDisconnect(o){this.connected=!1,this.closeAllConnections(),this.eventsSdkClass.eventEmitterClass.emit(vt.ONLINE_STATUS_EVENT,{isSocketConnected:!1,doReconnect:this.doReconnect}),this.doReconnect&&this.eventsSdkClass.connect(wn.NEXT)}onConnectError(o){this.eventsSdkClass.eventEmitterClass.emit(vt.ONLINE_STATUS_EVENT,{isSocketConnected:!1,doReconnect:this.doReconnect}),setTimeout(()=>{this.eventsSdkClass.connect(wn.NEXT)},this.eventsSdkClass.options.reconnectionDelay)}}var lr=(r=>(r.INFO="INFO",r.WARN="WARN",r.ERROR="ERROR",r))(lr||{}),qv=Object.defineProperty,Wv=(r,o,n)=>o in r?qv(r,o,{enumerable:!0,configurable:!0,writable:!0,value:n}):r[o]=n,Pt=(r,o,n)=>(Wv(r,typeof o!="symbol"?o+"":o,n),n);function Hv(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}function zv(r){if(r.__esModule)return r;var o=r.default;if(typeof o=="function"){var n=function s(){return this instanceof s?Reflect.construct(o,arguments,this.constructor):o.apply(this,arguments)};n.prototype=o.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(r).forEach(function(s){var c=Object.getOwnPropertyDescriptor(r,s);Object.defineProperty(n,s,c.get?c:{enumerable:!0,get:function(){return r[s]}})}),n}var Jo={exports:{}},Kv=/^(?:(?![^:@]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,Gv=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],vu=function(r){var o=r,n=r.indexOf("["),s=r.indexOf("]");n!=-1&&s!=-1&&(r=r.substring(0,n)+r.substring(n,s).replace(/:/g,";")+r.substring(s,r.length));for(var c=Kv.exec(r||""),f={},v=14;v--;)f[Gv[v]]=c[v]||"";return n!=-1&&s!=-1&&(f.source=o,f.host=f.host.substring(1,f.host.length-1).replace(/;/g,":"),f.authority=f.authority.replace("[","").replace("]","").replace(/;/g,":"),f.ipv6uri=!0),f.pathNames=Xv(f,f.path),f.queryKey=$v(f,f.query),f};function Xv(r,o){var n=/\/{2,9}/g,s=o.replace(n,"/").split("/");return(o.substr(0,1)=="/"||o.length===0)&&s.splice(0,1),o.substr(o.length-1,1)=="/"&&s.splice(s.length-1,1),s}function $v(r,o){var n={};return o.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(s,c,f){c&&(n[c]=f)}),n}var Yo={exports:{}},Vo={exports:{}},pr=1e3,dr=pr*60,gr=dr*60,yr=gr*24,jv=yr*365.25,Jv=function(r,o){o=o||{};var n=typeof r;if(n==="string"&&r.length>0)return Yv(r);if(n==="number"&&isNaN(r)===!1)return o.long?Zv(r):Vv(r);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(r))};function Yv(r){if(r=String(r),!(r.length>100)){var o=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(r);if(o){var n=parseFloat(o[1]),s=(o[2]||"ms").toLowerCase();switch(s){case"years":case"year":case"yrs":case"yr":case"y":return n*jv;case"days":case"day":case"d":return n*yr;case"hours":case"hour":case"hrs":case"hr":case"h":return n*gr;case"minutes":case"minute":case"mins":case"min":case"m":return n*dr;case"seconds":case"second":case"secs":case"sec":case"s":return n*pr;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return n;default:return}}}}function Vv(r){return r>=yr?Math.round(r/yr)+"d":r>=gr?Math.round(r/gr)+"h":r>=dr?Math.round(r/dr)+"m":r>=pr?Math.round(r/pr)+"s":r+"ms"}function Zv(r){return si(r,yr,"day")||si(r,gr,"hour")||si(r,dr,"minute")||si(r,pr,"second")||r+" ms"}function si(r,o,n){if(!(r<o))return r<o*1.5?Math.floor(r/o)+" "+n:Math.ceil(r/o)+" "+n+"s"}(function(r,o){o=r.exports=s.debug=s.default=s,o.coerce=b,o.disable=v,o.enable=f,o.enabled=d,o.humanize=Jv,o.instances=[],o.names=[],o.skips=[],o.formatters={};function n(p){var w=0,g;for(g in p)w=(w<<5)-w+p.charCodeAt(g),w|=0;return o.colors[Math.abs(w)%o.colors.length]}function s(p){var w;function g(){if(g.enabled){var l=g,u=+new Date,_=u-(w||u);l.diff=_,l.prev=w,l.curr=u,w=u;for(var A=new Array(arguments.length),k=0;k<A.length;k++)A[k]=arguments[k];A[0]=o.coerce(A[0]),typeof A[0]!="string"&&A.unshift("%O");var B=0;A[0]=A[0].replace(/%([a-zA-Z%])/g,function(j,N){if(j==="%%")return j;B++;var U=o.formatters[N];if(typeof U=="function"){var T=A[B];j=U.call(l,T),A.splice(B,1),B--}return j}),o.formatArgs.call(l,A);var Y=g.log||o.log||console.log.bind(console);Y.apply(l,A)}}return g.namespace=p,g.enabled=o.enabled(p),g.useColors=o.useColors(),g.color=n(p),g.destroy=c,typeof o.init=="function"&&o.init(g),o.instances.push(g),g}function c(){var p=o.instances.indexOf(this);return p!==-1?(o.instances.splice(p,1),!0):!1}function f(p){o.save(p),o.names=[],o.skips=[];var w,g=(typeof p=="string"?p:"").split(/[\s,]+/),l=g.length;for(w=0;w<l;w++)g[w]&&(p=g[w].replace(/\*/g,".*?"),p[0]==="-"?o.skips.push(new RegExp("^"+p.substr(1)+"$")):o.names.push(new RegExp("^"+p+"$")));for(w=0;w<o.instances.length;w++){var u=o.instances[w];u.enabled=o.enabled(u.namespace)}}function v(){o.enable("")}function d(p){if(p[p.length-1]==="*")return!0;var w,g;for(w=0,g=o.skips.length;w<g;w++)if(o.skips[w].test(p))return!1;for(w=0,g=o.names.length;w<g;w++)if(o.names[w].test(p))return!0;return!1}function b(p){return p instanceof Error?p.stack||p.message:p}})(Vo,Vo.exports);var Qv=Vo.exports;(function(r,o){o=r.exports=Qv,o.log=c,o.formatArgs=s,o.save=f,o.load=v,o.useColors=n,o.storage=typeof chrome<"u"&&typeof chrome.storage<"u"?chrome.storage.local:d(),o.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function n(){return typeof window<"u"&&window.process&&window.process.type==="renderer"?!0:typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)?!1:typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}o.formatters.j=function(b){try{return JSON.stringify(b)}catch(p){return"[UnexpectedJSONParseError]: "+p.message}};function s(b){var p=this.useColors;if(b[0]=(p?"%c":"")+this.namespace+(p?" %c":" ")+b[0]+(p?"%c ":" ")+"+"+o.humanize(this.diff),!!p){var w="color: "+this.color;b.splice(1,0,w,"color: inherit");var g=0,l=0;b[0].replace(/%[a-zA-Z%]/g,function(u){u!=="%%"&&(g++,u==="%c"&&(l=g))}),b.splice(l,0,w)}}function c(){return typeof console=="object"&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function f(b){try{b==null?o.storage.removeItem("debug"):o.storage.debug=b}catch{}}function v(){var b;try{b=o.storage.debug}catch{}return!b&&typeof process<"u"&&"env"in process&&(b=process.env.DEBUG),b}o.enable(v());function d(){try{return window.localStorage}catch{}}})(Yo,Yo.exports);var je=Yo.exports,t0=vu,Xc=je("socket.io-client:url"),e0=n0;function n0(r,o){var n=r;o=o||typeof location<"u"&&location,r==null&&(r=o.protocol+"//"+o.host),typeof r=="string"&&(r.charAt(0)==="/"&&(r.charAt(1)==="/"?r=o.protocol+r:r=o.host+r),/^(https?|wss?):\/\//.test(r)||(Xc("protocol-less url %s",r),typeof o<"u"?r=o.protocol+"//"+r:r="https://"+r),Xc("parse %s",r),n=t0(r)),n.port||(/^(http|ws)$/.test(n.protocol)?n.port="80":/^(http|ws)s$/.test(n.protocol)&&(n.port="443")),n.path=n.path||"/";var s=n.host.indexOf(":")!==-1,c=s?"["+n.host+"]":n.host;return n.id=n.protocol+"://"+c+":"+n.port,n.href=n.protocol+"://"+c+(o&&o.port===n.port?"":":"+n.port),n}var gi={},mu={exports:{}};(function(r){r.exports=o;function o(s){if(s)return n(s)}function n(s){for(var c in o.prototype)s[c]=o.prototype[c];return s}o.prototype.on=o.prototype.addEventListener=function(s,c){return this._callbacks=this._callbacks||{},(this._callbacks["$"+s]=this._callbacks["$"+s]||[]).push(c),this},o.prototype.once=function(s,c){function f(){this.off(s,f),c.apply(this,arguments)}return f.fn=c,this.on(s,f),this},o.prototype.off=o.prototype.removeListener=o.prototype.removeAllListeners=o.prototype.removeEventListener=function(s,c){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var f=this._callbacks["$"+s];if(!f)return this;if(arguments.length==1)return delete this._callbacks["$"+s],this;for(var v,d=0;d<f.length;d++)if(v=f[d],v===c||v.fn===c){f.splice(d,1);break}return f.length===0&&delete this._callbacks["$"+s],this},o.prototype.emit=function(s){this._callbacks=this._callbacks||{};for(var c=new Array(arguments.length-1),f=this._callbacks["$"+s],v=1;v<arguments.length;v++)c[v-1]=arguments[v];if(f){f=f.slice(0);for(var v=0,d=f.length;v<d;++v)f[v].apply(this,c)}return this},o.prototype.listeners=function(s){return this._callbacks=this._callbacks||{},this._callbacks["$"+s]||[]},o.prototype.hasListeners=function(s){return!!this.listeners(s).length}})(mu);var qn=mu.exports,yi={},r0={}.toString,os=Array.isArray||function(r){return r0.call(r)=="[object Array]"},wu=a0,i0=typeof Buffer=="function"&&typeof Buffer.isBuffer=="function",o0=typeof ArrayBuffer=="function",s0=function(r){return typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(r):r.buffer instanceof ArrayBuffer};function a0(r){return i0&&Buffer.isBuffer(r)||o0&&(r instanceof ArrayBuffer||s0(r))}var ss=os,_u=wu,bu=Object.prototype.toString,c0=typeof Blob=="function"||typeof Blob<"u"&&bu.call(Blob)==="[object BlobConstructor]",u0=typeof File=="function"||typeof File<"u"&&bu.call(File)==="[object FileConstructor]";yi.deconstructPacket=function(r){var o=[],n=r.data,s=r;return s.data=Zo(n,o),s.attachments=o.length,{packet:s,buffers:o}};function Zo(r,o){if(!r)return r;if(_u(r)){var n={_placeholder:!0,num:o.length};return o.push(r),n}else if(ss(r)){for(var s=new Array(r.length),c=0;c<r.length;c++)s[c]=Zo(r[c],o);return s}else if(typeof r=="object"&&!(r instanceof Date)){var s={};for(var f in r)s[f]=Zo(r[f],o);return s}return r}yi.reconstructPacket=function(r,o){return r.data=Qo(r.data,o),r.attachments=void 0,r};function Qo(r,o){if(!r)return r;if(r&&r._placeholder===!0){var n=typeof r.num=="number"&&r.num>=0&&r.num<o.length;if(n)return o[r.num];throw new Error("illegal attachments")}else if(ss(r))for(var s=0;s<r.length;s++)r[s]=Qo(r[s],o);else if(typeof r=="object")for(var c in r)r[c]=Qo(r[c],o);return r}yi.removeBlobs=function(r,o){function n(f,v,d){if(!f)return f;if(c0&&f instanceof Blob||u0&&f instanceof File){s++;var b=new FileReader;b.onload=function(){d?d[v]=this.result:c=this.result,--s||o(c)},b.readAsArrayBuffer(f)}else if(ss(f))for(var p=0;p<f.length;p++)n(f[p],p,f);else if(typeof f=="object"&&!_u(f))for(var w in f)n(f[w],w,f)}var s=0,c=r;n(c),s||o(c)};(function(r){var o=je("socket.io-parser"),n=qn,s=yi,c=os,f=wu;r.protocol=4,r.types=["CONNECT","DISCONNECT","EVENT","ACK","ERROR","BINARY_EVENT","BINARY_ACK"],r.CONNECT=0,r.DISCONNECT=1,r.EVENT=2,r.ACK=3,r.ERROR=4,r.BINARY_EVENT=5,r.BINARY_ACK=6,r.Encoder=v,r.Decoder=g;function v(){}var d=r.ERROR+'"encode error"';v.prototype.encode=function(k,B){if(o("encoding packet %j",k),r.BINARY_EVENT===k.type||r.BINARY_ACK===k.type)w(k,B);else{var Y=b(k);B([Y])}};function b(k){var B=""+k.type;if((r.BINARY_EVENT===k.type||r.BINARY_ACK===k.type)&&(B+=k.attachments+"-"),k.nsp&&k.nsp!=="/"&&(B+=k.nsp+","),k.id!=null&&(B+=k.id),k.data!=null){var Y=p(k.data);if(Y!==!1)B+=Y;else return d}return o("encoded %j as %s",k,B),B}function p(k){try{return JSON.stringify(k)}catch{return!1}}function w(k,B){function Y(j){var N=s.deconstructPacket(j),U=b(N.packet),T=N.buffers;T.unshift(U),B(T)}s.removeBlobs(k,Y)}function g(){this.reconstructor=null}n(g.prototype),g.prototype.add=function(k){var B;if(typeof k=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");B=l(k),r.BINARY_EVENT===B.type||r.BINARY_ACK===B.type?(this.reconstructor=new _(B),this.reconstructor.reconPack.attachments===0&&this.emit("decoded",B)):this.emit("decoded",B)}else if(f(k)||k.base64)if(this.reconstructor)B=this.reconstructor.takeBinaryData(k),B&&(this.reconstructor=null,this.emit("decoded",B));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+k)};function l(k){var B=0,Y={type:Number(k.charAt(0))};if(r.types[Y.type]==null)return A("unknown packet type "+Y.type);if(r.BINARY_EVENT===Y.type||r.BINARY_ACK===Y.type){for(var j=B+1;k.charAt(++B)!=="-"&&B!=k.length;);var N=k.substring(j,B);if(N!=Number(N)||k.charAt(B)!=="-")throw new Error("Illegal attachments");Y.attachments=Number(N)}if(k.charAt(B+1)==="/"){for(var j=B+1;++B;){var U=k.charAt(B);if(U===","||B===k.length)break}Y.nsp=k.substring(j,B)}else Y.nsp="/";var T=k.charAt(B+1);if(T!==""&&Number(T)==T){for(var j=B+1;++B;){var U=k.charAt(B);if(U==null||Number(U)!=U){--B;break}if(B===k.length)break}Y.id=Number(k.substring(j,B+1))}if(k.charAt(++B)){var O=u(k.substr(B)),P=O!==!1&&(Y.type===r.ERROR||c(O));if(P)Y.data=O;else return A("invalid payload")}return o("decoded %s as %j",k,Y),Y}function u(k){try{return JSON.parse(k)}catch{return!1}}g.prototype.destroy=function(){this.reconstructor&&this.reconstructor.finishedReconstruction()};function _(k){this.reconPack=k,this.buffers=[]}_.prototype.takeBinaryData=function(k){if(this.buffers.push(k),this.buffers.length===this.reconPack.attachments){var B=s.reconstructPacket(this.reconPack,this.buffers);return this.finishedReconstruction(),B}return null},_.prototype.finishedReconstruction=function(){this.reconPack=null,this.buffers=[]};function A(k){return{type:r.ERROR,data:"parser error: "+k}}})(gi);var as={exports:{}},vi={},ts={exports:{}};try{ts.exports=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{ts.exports=!1}var f0=ts.exports,cs=function(){return typeof self<"u"?self:typeof window<"u"?window:Function("return this")()}(),h0=f0,l0=cs,us=function(r){var o=r.xdomain,n=r.xscheme,s=r.enablesXDR;try{if(typeof XMLHttpRequest<"u"&&(!o||h0))return new XMLHttpRequest}catch{}try{if(typeof XDomainRequest<"u"&&!n&&s)return new XDomainRequest}catch{}if(!o)try{return new l0[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}},fs={exports:{}},_n={},p0=Object.keys||function(r){var o=[],n=Object.prototype.hasOwnProperty;for(var s in r)n.call(r,s)&&o.push(s);return o},d0=os,Cu=Object.prototype.toString,g0=typeof Blob=="function"||typeof Blob<"u"&&Cu.call(Blob)==="[object BlobConstructor]",y0=typeof File=="function"||typeof File<"u"&&Cu.call(File)==="[object FileConstructor]",Su=ui;function ui(r){if(!r||typeof r!="object")return!1;if(d0(r)){for(var o=0,n=r.length;o<n;o++)if(ui(r[o]))return!0;return!1}if(typeof Buffer=="function"&&Buffer.isBuffer&&Buffer.isBuffer(r)||typeof ArrayBuffer=="function"&&r instanceof ArrayBuffer||g0&&r instanceof Blob||y0&&r instanceof File)return!0;if(r.toJSON&&typeof r.toJSON=="function"&&arguments.length===1)return ui(r.toJSON(),!0);for(var s in r)if(Object.prototype.hasOwnProperty.call(r,s)&&ui(r[s]))return!0;return!1}var v0=function(r,o,n){var s=r.byteLength;if(o=o||0,n=n||s,r.slice)return r.slice(o,n);if(o<0&&(o+=s),n<0&&(n+=s),n>s&&(n=s),o>=s||o>=n||s===0)return new ArrayBuffer(0);for(var c=new Uint8Array(r),f=new Uint8Array(n-o),v=o,d=0;v<n;v++,d++)f[d]=c[v];return f.buffer},m0=w0;function w0(r,o,n){var s=!1;return n=n||_0,c.count=r,r===0?o():c;function c(f,v){if(c.count<=0)throw new Error("after called too many times");--c.count,f?(s=!0,o(f),o=n):c.count===0&&!s&&o(null,v)}}function _0(){}/*! https://mths.be/utf8js v2.1.2 by @mathias */var an=String.fromCharCode;function ku(r){for(var o=[],n=0,s=r.length,c,f;n<s;)c=r.charCodeAt(n++),c>=55296&&c<=56319&&n<s?(f=r.charCodeAt(n++),(f&64512)==56320?o.push(((c&1023)<<10)+(f&1023)+65536):(o.push(c),n--)):o.push(c);return o}function b0(r){for(var o=r.length,n=-1,s,c="";++n<o;)s=r[n],s>65535&&(s-=65536,c+=an(s>>>10&1023|55296),s=56320|s&1023),c+=an(s);return c}function Au(r,o){if(r>=55296&&r<=57343){if(o)throw Error("Lone surrogate U+"+r.toString(16).toUpperCase()+" is not a scalar value");return!1}return!0}function Ho(r,o){return an(r>>o&63|128)}function C0(r,o){if(!(r&4294967168))return an(r);var n="";return r&4294965248?r&4294901760?r&4292870144||(n=an(r>>18&7|240),n+=Ho(r,12),n+=Ho(r,6)):(Au(r,o)||(r=65533),n=an(r>>12&15|224),n+=Ho(r,6)):n=an(r>>6&31|192),n+=an(r&63|128),n}function S0(r,o){o=o||{};for(var n=o.strict!==!1,s=ku(r),c=s.length,f=-1,v,d="";++f<c;)v=s[f],d+=C0(v,n);return d}function Pn(){if(cn>=li)throw Error("Invalid byte index");var r=hi[cn]&255;if(cn++,(r&192)==128)return r&63;throw Error("Invalid continuation byte")}function k0(r){var o,n,s,c,f;if(cn>li)throw Error("Invalid byte index");if(cn==li)return!1;if(o=hi[cn]&255,cn++,!(o&128))return o;if((o&224)==192){if(n=Pn(),f=(o&31)<<6|n,f>=128)return f;throw Error("Invalid continuation byte")}if((o&240)==224){if(n=Pn(),s=Pn(),f=(o&15)<<12|n<<6|s,f>=2048)return Au(f,r)?f:65533;throw Error("Invalid continuation byte")}if((o&248)==240&&(n=Pn(),s=Pn(),c=Pn(),f=(o&7)<<18|n<<12|s<<6|c,f>=65536&&f<=1114111))return f;throw Error("Invalid UTF-8 detected")}var hi,li,cn;function A0(r,o){o=o||{};var n=o.strict!==!1;hi=ku(r),li=hi.length,cn=0;for(var s=[],c;(c=k0(n))!==!1;)s.push(c);return b0(s)}var x0={version:"2.1.2",encode:S0,decode:A0},zo={},$c;function E0(){return $c||($c=1,function(r){zo.encode=function(o){var n=new Uint8Array(o),s,c=n.length,f="";for(s=0;s<c;s+=3)f+=r[n[s]>>2],f+=r[(n[s]&3)<<4|n[s+1]>>4],f+=r[(n[s+1]&15)<<2|n[s+2]>>6],f+=r[n[s+2]&63];return c%3===2?f=f.substring(0,f.length-1)+"=":c%3===1&&(f=f.substring(0,f.length-2)+"=="),f},zo.decode=function(o){var n=o.length*.75,s=o.length,c,f=0,v,d,b,p;o[o.length-1]==="="&&(n--,o[o.length-2]==="="&&n--);var w=new ArrayBuffer(n),g=new Uint8Array(w);for(c=0;c<s;c+=4)v=r.indexOf(o[c]),d=r.indexOf(o[c+1]),b=r.indexOf(o[c+2]),p=r.indexOf(o[c+3]),g[f++]=v<<2|d>>4,g[f++]=(d&15)<<4|b>>2,g[f++]=(b&3)<<6|p&63;return w}}("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/")),zo}var Ko,jc;function T0(){if(jc)return Ko;jc=1;var r=typeof r<"u"?r:typeof WebKitBlobBuilder<"u"?WebKitBlobBuilder:typeof MSBlobBuilder<"u"?MSBlobBuilder:typeof MozBlobBuilder<"u"?MozBlobBuilder:!1,o=function(){try{var d=new Blob(["hi"]);return d.size===2}catch{return!1}}(),n=o&&function(){try{var d=new Blob([new Uint8Array([1,2])]);return d.size===2}catch{return!1}}(),s=r&&r.prototype.append&&r.prototype.getBlob;function c(d){return d.map(function(b){if(b.buffer instanceof ArrayBuffer){var p=b.buffer;if(b.byteLength!==p.byteLength){var w=new Uint8Array(b.byteLength);w.set(new Uint8Array(p,b.byteOffset,b.byteLength)),p=w.buffer}return p}return b})}function f(d,b){b=b||{};var p=new r;return c(d).forEach(function(w){p.append(w)}),b.type?p.getBlob(b.type):p.getBlob()}function v(d,b){return new Blob(c(d),b||{})}return typeof Blob<"u"&&(f.prototype=Blob.prototype,v.prototype=Blob.prototype),Ko=function(){return o?n?Blob:v:s?f:void 0}(),Ko}(function(r){var o=p0,n=Su,s=v0,c=m0,f=x0,v;typeof ArrayBuffer<"u"&&(v=E0());var d=typeof navigator<"u"&&/Android/i.test(navigator.userAgent),b=typeof navigator<"u"&&/PhantomJS/i.test(navigator.userAgent),p=d||b;r.protocol=3;var w=r.packets={open:0,close:1,ping:2,pong:3,message:4,upgrade:5,noop:6},g=o(w),l={type:"error",data:"parser error"},u=T0();r.encodePacket=function(N,U,T,O){typeof U=="function"&&(O=U,U=!1),typeof T=="function"&&(O=T,T=null);var P=N.data===void 0?void 0:N.data.buffer||N.data;if(typeof ArrayBuffer<"u"&&P instanceof ArrayBuffer)return A(N,U,O);if(typeof u<"u"&&P instanceof u)return B(N,U,O);if(P&&P.base64)return _(N,O);var R=w[N.type];return N.data!==void 0&&(R+=T?f.encode(String(N.data),{strict:!1}):String(N.data)),O(""+R)};function _(N,U){var T="b"+r.packets[N.type]+N.data.data;return U(T)}function A(N,U,T){if(!U)return r.encodeBase64Packet(N,T);var O=N.data,P=new Uint8Array(O),R=new Uint8Array(1+O.byteLength);R[0]=w[N.type];for(var L=0;L<P.length;L++)R[L+1]=P[L];return T(R.buffer)}function k(N,U,T){if(!U)return r.encodeBase64Packet(N,T);var O=new FileReader;return O.onload=function(){r.encodePacket({type:N.type,data:O.result},U,!0,T)},O.readAsArrayBuffer(N.data)}function B(N,U,T){if(!U)return r.encodeBase64Packet(N,T);if(p)return k(N,U,T);var O=new Uint8Array(1);O[0]=w[N.type];var P=new u([O.buffer,N.data]);return T(P)}r.encodeBase64Packet=function(N,U){var T="b"+r.packets[N.type];if(typeof u<"u"&&N.data instanceof u){var O=new FileReader;return O.onload=function(){var K=O.result.split(",")[1];U(T+K)},O.readAsDataURL(N.data)}var P;try{P=String.fromCharCode.apply(null,new Uint8Array(N.data))}catch{for(var R=new Uint8Array(N.data),L=new Array(R.length),H=0;H<R.length;H++)L[H]=R[H];P=String.fromCharCode.apply(null,L)}return T+=btoa(P),U(T)},r.decodePacket=function(N,U,T){if(N===void 0)return l;if(typeof N=="string"){if(N.charAt(0)==="b")return r.decodeBase64Packet(N.substr(1),U);if(T&&(N=Y(N),N===!1))return l;var P=N.charAt(0);return Number(P)!=P||!g[P]?l:N.length>1?{type:g[P],data:N.substring(1)}:{type:g[P]}}var O=new Uint8Array(N),P=O[0],R=s(N,1);return u&&U==="blob"&&(R=new u([R])),{type:g[P],data:R}};function Y(N){try{N=f.decode(N,{strict:!1})}catch{return!1}return N}r.decodeBase64Packet=function(N,U){var T=g[N.charAt(0)];if(!v)return{type:T,data:{base64:!0,data:N.substr(1)}};var O=v.decode(N.substr(1));return U==="blob"&&u&&(O=new u([O])),{type:T,data:O}},r.encodePayload=function(N,U,T){typeof U=="function"&&(T=U,U=null);var O=n(N);if(U&&O)return u&&!p?r.encodePayloadAsBlob(N,T):r.encodePayloadAsArrayBuffer(N,T);if(!N.length)return T("0:");function P(L){return L.length+":"+L}function R(L,H){r.encodePacket(L,O?U:!1,!1,function(K){H(null,P(K))})}j(N,R,function(L,H){return T(H.join(""))})};function j(N,U,T){for(var O=new Array(N.length),P=c(N.length,T),R=function(H,K,X){U(K,function(F,lt){O[H]=lt,X(F,O)})},L=0;L<N.length;L++)R(L,N[L],P)}r.decodePayload=function(N,U,T){if(typeof N!="string")return r.decodePayloadAsBinary(N,U,T);typeof U=="function"&&(T=U,U=null);var O;if(N==="")return T(l,0,1);for(var P="",R,L,H=0,K=N.length;H<K;H++){var X=N.charAt(H);if(X!==":"){P+=X;continue}if(P===""||P!=(R=Number(P))||(L=N.substr(H+1,R),P!=L.length))return T(l,0,1);if(L.length){if(O=r.decodePacket(L,U,!1),l.type===O.type&&l.data===O.data)return T(l,0,1);var F=T(O,H+R,K);if(F===!1)return}H+=R,P=""}if(P!=="")return T(l,0,1)},r.encodePayloadAsArrayBuffer=function(N,U){if(!N.length)return U(new ArrayBuffer(0));function T(O,P){r.encodePacket(O,!0,!0,function(R){return P(null,R)})}j(N,T,function(O,P){var R=P.reduce(function(K,X){var F;return typeof X=="string"?F=X.length:F=X.byteLength,K+F.toString().length+F+2},0),L=new Uint8Array(R),H=0;return P.forEach(function(K){var X=typeof K=="string",F=K;if(X){for(var lt=new Uint8Array(K.length),ct=0;ct<K.length;ct++)lt[ct]=K.charCodeAt(ct);F=lt.buffer}X?L[H++]=0:L[H++]=1;for(var xt=F.byteLength.toString(),ct=0;ct<xt.length;ct++)L[H++]=parseInt(xt[ct]);L[H++]=255;for(var lt=new Uint8Array(F),ct=0;ct<lt.length;ct++)L[H++]=lt[ct]}),U(L.buffer)})},r.encodePayloadAsBlob=function(N,U){function T(O,P){r.encodePacket(O,!0,!0,function(R){var L=new Uint8Array(1);if(L[0]=1,typeof R=="string"){for(var H=new Uint8Array(R.length),K=0;K<R.length;K++)H[K]=R.charCodeAt(K);R=H.buffer,L[0]=0}for(var X=R instanceof ArrayBuffer?R.byteLength:R.size,F=X.toString(),lt=new Uint8Array(F.length+1),K=0;K<F.length;K++)lt[K]=parseInt(F[K]);if(lt[F.length]=255,u){var ct=new u([L.buffer,lt.buffer,R]);P(null,ct)}})}j(N,T,function(O,P){return U(new u(P))})},r.decodePayloadAsBinary=function(N,U,T){typeof U=="function"&&(T=U,U=null);for(var O=N,P=[];O.byteLength>0;){for(var R=new Uint8Array(O),L=R[0]===0,H="",K=1;R[K]!==255;K++){if(H.length>310)return T(l,0,1);H+=R[K]}O=s(O,2+H.length),H=parseInt(H);var X=s(O,0,H);if(L)try{X=String.fromCharCode.apply(null,new Uint8Array(X))}catch{var F=new Uint8Array(X);X="";for(var K=0;K<F.length;K++)X+=String.fromCharCode(F[K])}P.push(X),O=s(O,H)}var lt=P.length;P.forEach(function(ct,xt){T(r.decodePacket(ct,U,!0),xt,lt)})}})(_n);var Go,Jc;function hs(){if(Jc)return Go;Jc=1;var r=_n,o=qn;Go=n;function n(s){this.path=s.path,this.hostname=s.hostname,this.port=s.port,this.secure=s.secure,this.query=s.query,this.timestampParam=s.timestampParam,this.timestampRequests=s.timestampRequests,this.readyState="",this.agent=s.agent||!1,this.socket=s.socket,this.enablesXDR=s.enablesXDR,this.withCredentials=s.withCredentials,this.pfx=s.pfx,this.key=s.key,this.passphrase=s.passphrase,this.cert=s.cert,this.ca=s.ca,this.ciphers=s.ciphers,this.rejectUnauthorized=s.rejectUnauthorized,this.forceNode=s.forceNode,this.isReactNative=s.isReactNative,this.extraHeaders=s.extraHeaders,this.localAddress=s.localAddress}return o(n.prototype),n.prototype.onError=function(s,c){var f=new Error(s);return f.type="TransportError",f.description=c,this.emit("error",f),this},n.prototype.open=function(){return(this.readyState==="closed"||this.readyState==="")&&(this.readyState="opening",this.doOpen()),this},n.prototype.close=function(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this},n.prototype.send=function(s){if(this.readyState==="open")this.write(s);else throw new Error("Transport not open")},n.prototype.onOpen=function(){this.readyState="open",this.writable=!0,this.emit("open")},n.prototype.onData=function(s){var c=r.decodePacket(s,this.socket.binaryType);this.onPacket(c)},n.prototype.onPacket=function(s){this.emit("packet",s)},n.prototype.onClose=function(){this.readyState="closed",this.emit("close")},Go}var Wn={};Wn.encode=function(r){var o="";for(var n in r)r.hasOwnProperty(n)&&(o.length&&(o+="&"),o+=encodeURIComponent(n)+"="+encodeURIComponent(r[n]));return o};Wn.decode=function(r){for(var o={},n=r.split("&"),s=0,c=n.length;s<c;s++){var f=n[s].split("=");o[decodeURIComponent(f[0])]=decodeURIComponent(f[1])}return o};var mi=function(r,o){var n=function(){};n.prototype=o.prototype,r.prototype=new n,r.prototype.constructor=r},xu="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),pi=64,Eu={},Yc=0,un=0,Vc;function es(r){var o="";do o=xu[r%pi]+o,r=Math.floor(r/pi);while(r>0);return o}function R0(r){var o=0;for(un=0;un<r.length;un++)o=o*pi+Eu[r.charAt(un)];return o}function ls(){var r=es(+new Date);return r!==Vc?(Yc=0,Vc=r):r+"."+es(Yc++)}for(;un<pi;un++)Eu[xu[un]]=un;ls.encode=es;ls.decode=R0;var Tu=ls,Ru=hs(),I0=Wn,Iu=_n,O0=mi,N0=Tu,Re=je("engine.io-client:polling"),Ou=De,L0=function(){var r=us,o=new r({xdomain:!1});return o.responseType!=null}();function De(r){var o=r&&r.forceBase64;(!L0||o)&&(this.supportsBinary=!1),Ru.call(this,r)}O0(De,Ru);De.prototype.name="polling";De.prototype.doOpen=function(){this.poll()};De.prototype.pause=function(r){var o=this;this.readyState="pausing";function n(){Re("paused"),o.readyState="paused",r()}if(this.polling||!this.writable){var s=0;this.polling&&(Re("we are currently polling - waiting to pause"),s++,this.once("pollComplete",function(){Re("pre-pause polling complete"),--s||n()})),this.writable||(Re("we are currently writing - waiting to pause"),s++,this.once("drain",function(){Re("pre-pause writing complete"),--s||n()}))}else n()};De.prototype.poll=function(){Re("polling"),this.polling=!0,this.doPoll(),this.emit("poll")};De.prototype.onData=function(r){var o=this;Re("polling got data %s",r);var n=function(s,c,f){if(o.readyState==="opening"&&s.type==="open"&&o.onOpen(),s.type==="close")return o.onClose(),!1;o.onPacket(s)};Iu.decodePayload(r,this.socket.binaryType,n),this.readyState!=="closed"&&(this.polling=!1,this.emit("pollComplete"),this.readyState==="open"?this.poll():Re('ignoring poll - transport state "%s"',this.readyState))};De.prototype.doClose=function(){var r=this;function o(){Re("writing close packet"),r.write([{type:"close"}])}this.readyState==="open"?(Re("transport open - closing"),o()):(Re("transport not open - deferring close"),this.once("open",o))};De.prototype.write=function(r){var o=this;this.writable=!1;var n=function(){o.writable=!0,o.emit("drain")};Iu.encodePayload(r,this.supportsBinary,function(s){o.doWrite(s,n)})};De.prototype.uri=function(){var r=this.query||{},o=this.secure?"https":"http",n="";this.timestampRequests!==!1&&(r[this.timestampParam]=N0()),!this.supportsBinary&&!r.sid&&(r.b64=1),r=I0.encode(r),this.port&&(o==="https"&&Number(this.port)!==443||o==="http"&&Number(this.port)!==80)&&(n=":"+this.port),r.length&&(r="?"+r);var s=this.hostname.indexOf(":")!==-1;return o+"://"+(s?"["+this.hostname+"]":this.hostname)+n+this.path+r};var B0=us,Nu=Ou,U0=qn,D0=mi,ns=je("engine.io-client:polling-xhr"),P0=cs;fs.exports=Hn;fs.exports.Request=Wt;function Zc(){}function Hn(r){if(Nu.call(this,r),this.requestTimeout=r.requestTimeout,this.extraHeaders=r.extraHeaders,typeof location<"u"){var o=location.protocol==="https:",n=location.port;n||(n=o?443:80),this.xd=typeof location<"u"&&r.hostname!==location.hostname||n!==r.port,this.xs=r.secure!==o}}D0(Hn,Nu);Hn.prototype.supportsBinary=!0;Hn.prototype.request=function(r){return r=r||{},r.uri=this.uri(),r.xd=this.xd,r.xs=this.xs,r.agent=this.agent||!1,r.supportsBinary=this.supportsBinary,r.enablesXDR=this.enablesXDR,r.withCredentials=this.withCredentials,r.pfx=this.pfx,r.key=this.key,r.passphrase=this.passphrase,r.cert=this.cert,r.ca=this.ca,r.ciphers=this.ciphers,r.rejectUnauthorized=this.rejectUnauthorized,r.requestTimeout=this.requestTimeout,r.extraHeaders=this.extraHeaders,new Wt(r)};Hn.prototype.doWrite=function(r,o){var n=typeof r!="string"&&r!==void 0,s=this.request({method:"POST",data:r,isBinary:n}),c=this;s.on("success",o),s.on("error",function(f){c.onError("xhr post error",f)}),this.sendXhr=s};Hn.prototype.doPoll=function(){ns("xhr poll");var r=this.request(),o=this;r.on("data",function(n){o.onData(n)}),r.on("error",function(n){o.onError("xhr poll error",n)}),this.pollXhr=r};function Wt(r){this.method=r.method||"GET",this.uri=r.uri,this.xd=!!r.xd,this.xs=!!r.xs,this.async=r.async!==!1,this.data=r.data!==void 0?r.data:null,this.agent=r.agent,this.isBinary=r.isBinary,this.supportsBinary=r.supportsBinary,this.enablesXDR=r.enablesXDR,this.withCredentials=r.withCredentials,this.requestTimeout=r.requestTimeout,this.pfx=r.pfx,this.key=r.key,this.passphrase=r.passphrase,this.cert=r.cert,this.ca=r.ca,this.ciphers=r.ciphers,this.rejectUnauthorized=r.rejectUnauthorized,this.extraHeaders=r.extraHeaders,this.create()}U0(Wt.prototype);Wt.prototype.create=function(){var r={agent:this.agent,xdomain:this.xd,xscheme:this.xs,enablesXDR:this.enablesXDR};r.pfx=this.pfx,r.key=this.key,r.passphrase=this.passphrase,r.cert=this.cert,r.ca=this.ca,r.ciphers=this.ciphers,r.rejectUnauthorized=this.rejectUnauthorized;var o=this.xhr=new B0(r),n=this;try{ns("xhr open %s: %s",this.method,this.uri),o.open(this.method,this.uri,this.async);try{if(this.extraHeaders){o.setDisableHeaderCheck&&o.setDisableHeaderCheck(!0);for(var s in this.extraHeaders)this.extraHeaders.hasOwnProperty(s)&&o.setRequestHeader(s,this.extraHeaders[s])}}catch{}if(this.method==="POST")try{this.isBinary?o.setRequestHeader("Content-type","application/octet-stream"):o.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{o.setRequestHeader("Accept","*/*")}catch{}"withCredentials"in o&&(o.withCredentials=this.withCredentials),this.requestTimeout&&(o.timeout=this.requestTimeout),this.hasXDR()?(o.onload=function(){n.onLoad()},o.onerror=function(){n.onError(o.responseText)}):o.onreadystatechange=function(){if(o.readyState===2)try{var c=o.getResponseHeader("Content-Type");(n.supportsBinary&&c==="application/octet-stream"||c==="application/octet-stream; charset=UTF-8")&&(o.responseType="arraybuffer")}catch{}o.readyState===4&&(o.status===200||o.status===1223?n.onLoad():setTimeout(function(){n.onError(typeof o.status=="number"?o.status:0)},0))},ns("xhr data %s",this.data),o.send(this.data)}catch(c){setTimeout(function(){n.onError(c)},0);return}typeof document<"u"&&(this.index=Wt.requestsCount++,Wt.requests[this.index]=this)};Wt.prototype.onSuccess=function(){this.emit("success"),this.cleanup()};Wt.prototype.onData=function(r){this.emit("data",r),this.onSuccess()};Wt.prototype.onError=function(r){this.emit("error",r),this.cleanup(!0)};Wt.prototype.cleanup=function(r){if(!(typeof this.xhr>"u"||this.xhr===null)){if(this.hasXDR()?this.xhr.onload=this.xhr.onerror=Zc:this.xhr.onreadystatechange=Zc,r)try{this.xhr.abort()}catch{}typeof document<"u"&&delete Wt.requests[this.index],this.xhr=null}};Wt.prototype.onLoad=function(){var r;try{var o;try{o=this.xhr.getResponseHeader("Content-Type")}catch{}o==="application/octet-stream"||o==="application/octet-stream; charset=UTF-8"?r=this.xhr.response||this.xhr.responseText:r=this.xhr.responseText}catch(n){this.onError(n)}r!=null&&this.onData(r)};Wt.prototype.hasXDR=function(){return typeof XDomainRequest<"u"&&!this.xs&&this.enablesXDR};Wt.prototype.abort=function(){this.cleanup()};Wt.requestsCount=0;Wt.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",Qc);else if(typeof addEventListener=="function"){var F0="onpagehide"in P0?"pagehide":"unload";addEventListener(F0,Qc,!1)}}function Qc(){for(var r in Wt.requests)Wt.requests.hasOwnProperty(r)&&Wt.requests[r].abort()}var M0=fs.exports,ps=Ou,q0=mi,tu=cs,W0=zn,H0=/\n/g,z0=/\\n/g,ai;function K0(){}function zn(r){ps.call(this,r),this.query=this.query||{},ai||(ai=tu.___eio=tu.___eio||[]),this.index=ai.length;var o=this;ai.push(function(n){o.onData(n)}),this.query.j=this.index,typeof addEventListener=="function"&&addEventListener("beforeunload",function(){o.script&&(o.script.onerror=K0)},!1)}q0(zn,ps);zn.prototype.supportsBinary=!1;zn.prototype.doClose=function(){this.script&&(this.script.parentNode.removeChild(this.script),this.script=null),this.form&&(this.form.parentNode.removeChild(this.form),this.form=null,this.iframe=null),ps.prototype.doClose.call(this)};zn.prototype.doPoll=function(){var r=this,o=document.createElement("script");this.script&&(this.script.parentNode.removeChild(this.script),this.script=null),o.async=!0,o.src=this.uri(),o.onerror=function(c){r.onError("jsonp poll error",c)};var n=document.getElementsByTagName("script")[0];n?n.parentNode.insertBefore(o,n):(document.head||document.body).appendChild(o),this.script=o;var s=typeof navigator<"u"&&/gecko/i.test(navigator.userAgent);s&&setTimeout(function(){var c=document.createElement("iframe");document.body.appendChild(c),document.body.removeChild(c)},100)};zn.prototype.doWrite=function(r,o){var n=this;if(!this.form){var s=document.createElement("form"),c=document.createElement("textarea"),f=this.iframeId="eio_iframe_"+this.index,v;s.className="socketio",s.style.position="absolute",s.style.top="-1000px",s.style.left="-1000px",s.target=f,s.method="POST",s.setAttribute("accept-charset","utf-8"),c.name="d",s.appendChild(c),document.body.appendChild(s),this.form=s,this.area=c}this.form.action=this.uri();function d(){b(),o()}function b(){if(n.iframe)try{n.form.removeChild(n.iframe)}catch(w){n.onError("jsonp polling iframe removal error",w)}try{var p='<iframe src="javascript:0" name="'+n.iframeId+'">';v=document.createElement(p)}catch{v=document.createElement("iframe"),v.name=n.iframeId,v.src="javascript:0"}v.id=n.iframeId,n.form.appendChild(v),n.iframe=v}b(),r=r.replace(z0,`\\
|
|
45
|
+
`),this.area.value=r.replace(H0,"\\n");try{this.form.submit()}catch{}this.iframe.attachEvent?this.iframe.onreadystatechange=function(){n.iframe.readyState==="complete"&&d()}:this.iframe.onload=d};const G0={},X0=Object.freeze(Object.defineProperty({__proto__:null,default:G0},Symbol.toStringTag,{value:"Module"})),$0=zv(X0);var ds=hs(),j0=_n,J0=Wn,Y0=mi,V0=Tu,Z0=je("engine.io-client:websocket"),di,gs;typeof WebSocket<"u"?di=WebSocket:typeof self<"u"&&(di=self.WebSocket||self.MozWebSocket);if(typeof window>"u")try{gs=$0}catch{}var Mn=di||gs,Q0=Se;function Se(r){var o=r&&r.forceBase64;o&&(this.supportsBinary=!1),this.perMessageDeflate=r.perMessageDeflate,this.usingBrowserWebSocket=di&&!r.forceNode,this.protocols=r.protocols,this.usingBrowserWebSocket||(Mn=gs),ds.call(this,r)}Y0(Se,ds);Se.prototype.name="websocket";Se.prototype.supportsBinary=!0;Se.prototype.doOpen=function(){if(this.check()){var r=this.uri(),o=this.protocols,n={};this.isReactNative||(n.agent=this.agent,n.perMessageDeflate=this.perMessageDeflate,n.pfx=this.pfx,n.key=this.key,n.passphrase=this.passphrase,n.cert=this.cert,n.ca=this.ca,n.ciphers=this.ciphers,n.rejectUnauthorized=this.rejectUnauthorized),this.extraHeaders&&(n.headers=this.extraHeaders),this.localAddress&&(n.localAddress=this.localAddress);try{this.ws=this.usingBrowserWebSocket&&!this.isReactNative?o?new Mn(r,o):new Mn(r):new Mn(r,o,n)}catch(s){return this.emit("error",s)}this.ws.binaryType===void 0&&(this.supportsBinary=!1),this.ws.supports&&this.ws.supports.binary?(this.supportsBinary=!0,this.ws.binaryType="nodebuffer"):this.ws.binaryType="arraybuffer",this.addEventListeners()}};Se.prototype.addEventListeners=function(){var r=this;this.ws.onopen=function(){r.onOpen()},this.ws.onclose=function(){r.onClose()},this.ws.onmessage=function(o){r.onData(o.data)},this.ws.onerror=function(o){r.onError("websocket error",o)}};Se.prototype.write=function(r){var o=this;this.writable=!1;for(var n=r.length,s=0,c=n;s<c;s++)(function(v){j0.encodePacket(v,o.supportsBinary,function(d){if(!o.usingBrowserWebSocket){var b={};if(v.options&&(b.compress=v.options.compress),o.perMessageDeflate){var p=typeof d=="string"?Buffer.byteLength(d):d.length;p<o.perMessageDeflate.threshold&&(b.compress=!1)}}try{o.usingBrowserWebSocket?o.ws.send(d):o.ws.send(d,b)}catch{Z0("websocket closed before onclose event")}--n||f()})})(r[s]);function f(){o.emit("flush"),setTimeout(function(){o.writable=!0,o.emit("drain")},0)}};Se.prototype.onClose=function(){ds.prototype.onClose.call(this)};Se.prototype.doClose=function(){typeof this.ws<"u"&&this.ws.close()};Se.prototype.uri=function(){var r=this.query||{},o=this.secure?"wss":"ws",n="";this.port&&(o==="wss"&&Number(this.port)!==443||o==="ws"&&Number(this.port)!==80)&&(n=":"+this.port),this.timestampRequests&&(r[this.timestampParam]=V0()),this.supportsBinary||(r.b64=1),r=J0.encode(r),r.length&&(r="?"+r);var s=this.hostname.indexOf(":")!==-1;return o+"://"+(s?"["+this.hostname+"]":this.hostname)+n+this.path+r};Se.prototype.check=function(){return!!Mn&&!("__initialize"in Mn&&this.name===Se.prototype.name)};var tm=us,em=M0,nm=W0,rm=Q0;vi.polling=im;vi.websocket=rm;function im(r){var o,n=!1,s=!1,c=r.jsonp!==!1;if(typeof location<"u"){var f=location.protocol==="https:",v=location.port;v||(v=f?443:80),n=r.hostname!==location.hostname||v!==r.port,s=r.secure!==f}if(r.xdomain=n,r.xscheme=s,o=new tm(r),"open"in o&&!r.forceJSONP)return new em(r);if(!c)throw new Error("JSONP disabled");return new nm(r)}var om=[].indexOf,Lu=function(r,o){if(om)return r.indexOf(o);for(var n=0;n<r.length;++n)if(r[n]===o)return n;return-1},sm=vi,am=qn,Ft=je("engine.io-client:socket"),cm=Lu,Bu=_n,eu=vu,um=Wn,fm=_t;function _t(r,o){if(!(this instanceof _t))return new _t(r,o);o=o||{},r&&typeof r=="object"&&(o=r,r=null),r?(r=eu(r),o.hostname=r.host,o.secure=r.protocol==="https"||r.protocol==="wss",o.port=r.port,r.query&&(o.query=r.query)):o.host&&(o.hostname=eu(o.host).host),this.secure=o.secure!=null?o.secure:typeof location<"u"&&location.protocol==="https:",o.hostname&&!o.port&&(o.port=this.secure?"443":"80"),this.agent=o.agent||!1,this.hostname=o.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=o.port||(typeof location<"u"&&location.port?location.port:this.secure?443:80),this.query=o.query||{},typeof this.query=="string"&&(this.query=um.decode(this.query)),this.upgrade=o.upgrade!==!1,this.path=(o.path||"/engine.io").replace(/\/$/,"")+"/",this.forceJSONP=!!o.forceJSONP,this.jsonp=o.jsonp!==!1,this.forceBase64=!!o.forceBase64,this.enablesXDR=!!o.enablesXDR,this.withCredentials=o.withCredentials!==!1,this.timestampParam=o.timestampParam||"t",this.timestampRequests=o.timestampRequests,this.transports=o.transports||["polling","websocket"],this.transportOptions=o.transportOptions||{},this.readyState="",this.writeBuffer=[],this.prevBufferLen=0,this.policyPort=o.policyPort||843,this.rememberUpgrade=o.rememberUpgrade||!1,this.binaryType=null,this.onlyBinaryUpgrades=o.onlyBinaryUpgrades,this.perMessageDeflate=o.perMessageDeflate!==!1?o.perMessageDeflate||{}:!1,this.perMessageDeflate===!0&&(this.perMessageDeflate={}),this.perMessageDeflate&&this.perMessageDeflate.threshold==null&&(this.perMessageDeflate.threshold=1024),this.pfx=o.pfx||void 0,this.key=o.key||void 0,this.passphrase=o.passphrase||void 0,this.cert=o.cert||void 0,this.ca=o.ca||void 0,this.ciphers=o.ciphers||void 0,this.rejectUnauthorized=o.rejectUnauthorized===void 0?!0:o.rejectUnauthorized,this.forceNode=!!o.forceNode,this.isReactNative=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative",(typeof self>"u"||this.isReactNative)&&(o.extraHeaders&&Object.keys(o.extraHeaders).length>0&&(this.extraHeaders=o.extraHeaders),o.localAddress&&(this.localAddress=o.localAddress)),this.id=null,this.upgrades=null,this.pingInterval=null,this.pingTimeout=null,this.pingIntervalTimer=null,this.pingTimeoutTimer=null,this.open()}_t.priorWebsocketSuccess=!1;am(_t.prototype);_t.protocol=Bu.protocol;_t.Socket=_t;_t.Transport=hs();_t.transports=vi;_t.parser=_n;_t.prototype.createTransport=function(r){Ft('creating transport "%s"',r);var o=hm(this.query);o.EIO=Bu.protocol,o.transport=r;var n=this.transportOptions[r]||{};this.id&&(o.sid=this.id);var s=new sm[r]({query:o,socket:this,agent:n.agent||this.agent,hostname:n.hostname||this.hostname,port:n.port||this.port,secure:n.secure||this.secure,path:n.path||this.path,forceJSONP:n.forceJSONP||this.forceJSONP,jsonp:n.jsonp||this.jsonp,forceBase64:n.forceBase64||this.forceBase64,enablesXDR:n.enablesXDR||this.enablesXDR,withCredentials:n.withCredentials||this.withCredentials,timestampRequests:n.timestampRequests||this.timestampRequests,timestampParam:n.timestampParam||this.timestampParam,policyPort:n.policyPort||this.policyPort,pfx:n.pfx||this.pfx,key:n.key||this.key,passphrase:n.passphrase||this.passphrase,cert:n.cert||this.cert,ca:n.ca||this.ca,ciphers:n.ciphers||this.ciphers,rejectUnauthorized:n.rejectUnauthorized||this.rejectUnauthorized,perMessageDeflate:n.perMessageDeflate||this.perMessageDeflate,extraHeaders:n.extraHeaders||this.extraHeaders,forceNode:n.forceNode||this.forceNode,localAddress:n.localAddress||this.localAddress,requestTimeout:n.requestTimeout||this.requestTimeout,protocols:n.protocols||void 0,isReactNative:this.isReactNative});return s};function hm(r){var o={};for(var n in r)r.hasOwnProperty(n)&&(o[n]=r[n]);return o}_t.prototype.open=function(){var r;if(this.rememberUpgrade&&_t.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1)r="websocket";else if(this.transports.length===0){var o=this;setTimeout(function(){o.emit("error","No transports available")},0);return}else r=this.transports[0];this.readyState="opening";try{r=this.createTransport(r)}catch{this.transports.shift(),this.open();return}r.open(),this.setTransport(r)};_t.prototype.setTransport=function(r){Ft("setting transport %s",r.name);var o=this;this.transport&&(Ft("clearing existing transport %s",this.transport.name),this.transport.removeAllListeners()),this.transport=r,r.on("drain",function(){o.onDrain()}).on("packet",function(n){o.onPacket(n)}).on("error",function(n){o.onError(n)}).on("close",function(){o.onClose("transport close")})};_t.prototype.probe=function(r){Ft('probing transport "%s"',r);var o=this.createTransport(r,{probe:1}),n=!1,s=this;_t.priorWebsocketSuccess=!1;function c(){if(s.onlyBinaryUpgrades){var g=!this.supportsBinary&&s.transport.supportsBinary;n=n||g}n||(Ft('probe transport "%s" opened',r),o.send([{type:"ping",data:"probe"}]),o.once("packet",function(l){if(!n)if(l.type==="pong"&&l.data==="probe"){if(Ft('probe transport "%s" pong',r),s.upgrading=!0,s.emit("upgrading",o),!o)return;_t.priorWebsocketSuccess=o.name==="websocket",Ft('pausing current transport "%s"',s.transport.name),s.transport.pause(function(){n||s.readyState!=="closed"&&(Ft("changing transport and sending upgrade packet"),w(),s.setTransport(o),o.send([{type:"upgrade"}]),s.emit("upgrade",o),o=null,s.upgrading=!1,s.flush())})}else{Ft('probe transport "%s" failed',r);var u=new Error("probe error");u.transport=o.name,s.emit("upgradeError",u)}}))}function f(){n||(n=!0,w(),o.close(),o=null)}function v(g){var l=new Error("probe error: "+g);l.transport=o.name,f(),Ft('probe transport "%s" failed because of error: %s',r,g),s.emit("upgradeError",l)}function d(){v("transport closed")}function b(){v("socket closed")}function p(g){o&&g.name!==o.name&&(Ft('"%s" works - aborting "%s"',g.name,o.name),f())}function w(){o.removeListener("open",c),o.removeListener("error",v),o.removeListener("close",d),s.removeListener("close",b),s.removeListener("upgrading",p)}o.once("open",c),o.once("error",v),o.once("close",d),this.once("close",b),this.once("upgrading",p),o.open()};_t.prototype.onOpen=function(){if(Ft("socket open"),this.readyState="open",_t.priorWebsocketSuccess=this.transport.name==="websocket",this.emit("open"),this.flush(),this.readyState==="open"&&this.upgrade&&this.transport.pause){Ft("starting upgrade probes");for(var r=0,o=this.upgrades.length;r<o;r++)this.probe(this.upgrades[r])}};_t.prototype.onPacket=function(r){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(Ft('socket receive: type "%s", data "%s"',r.type,r.data),this.emit("packet",r),this.emit("heartbeat"),r.type){case"open":this.onHandshake(JSON.parse(r.data));break;case"pong":this.setPing(),this.emit("pong");break;case"error":var o=new Error("server error");o.code=r.data,this.onError(o);break;case"message":this.emit("data",r.data),this.emit("message",r.data);break}else Ft('packet received with socket readyState "%s"',this.readyState)};_t.prototype.onHandshake=function(r){this.emit("handshake",r),this.id=r.sid,this.transport.query.sid=r.sid,this.upgrades=this.filterUpgrades(r.upgrades),this.pingInterval=r.pingInterval,this.pingTimeout=r.pingTimeout,this.onOpen(),this.readyState!=="closed"&&(this.setPing(),this.removeListener("heartbeat",this.onHeartbeat),this.on("heartbeat",this.onHeartbeat))};_t.prototype.onHeartbeat=function(r){clearTimeout(this.pingTimeoutTimer);var o=this;o.pingTimeoutTimer=setTimeout(function(){o.readyState!=="closed"&&o.onClose("ping timeout")},r||o.pingInterval+o.pingTimeout)};_t.prototype.setPing=function(){var r=this;clearTimeout(r.pingIntervalTimer),r.pingIntervalTimer=setTimeout(function(){Ft("writing ping packet - expecting pong within %sms",r.pingTimeout),r.ping(),r.onHeartbeat(r.pingTimeout)},r.pingInterval)};_t.prototype.ping=function(){var r=this;this.sendPacket("ping",function(){r.emit("ping")})};_t.prototype.onDrain=function(){this.writeBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,this.writeBuffer.length===0?this.emit("drain"):this.flush()};_t.prototype.flush=function(){this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length&&(Ft("flushing %d packets in socket",this.writeBuffer.length),this.transport.send(this.writeBuffer),this.prevBufferLen=this.writeBuffer.length,this.emit("flush"))};_t.prototype.write=_t.prototype.send=function(r,o,n){return this.sendPacket("message",r,o,n),this};_t.prototype.sendPacket=function(r,o,n,s){if(typeof o=="function"&&(s=o,o=void 0),typeof n=="function"&&(s=n,n=null),!(this.readyState==="closing"||this.readyState==="closed")){n=n||{},n.compress=n.compress!==!1;var c={type:r,data:o,options:n};this.emit("packetCreate",c),this.writeBuffer.push(c),s&&this.once("flush",s),this.flush()}};_t.prototype.close=function(){if(this.readyState==="opening"||this.readyState==="open"){this.readyState="closing";var r=this;this.writeBuffer.length?this.once("drain",function(){this.upgrading?s():o()}):this.upgrading?s():o()}function o(){r.onClose("forced close"),Ft("socket closing - telling transport to close"),r.transport.close()}function n(){r.removeListener("upgrade",n),r.removeListener("upgradeError",n),o()}function s(){r.once("upgrade",n),r.once("upgradeError",n)}return this};_t.prototype.onError=function(r){Ft("socket error %j",r),_t.priorWebsocketSuccess=!1,this.emit("error",r),this.onClose("transport error",r)};_t.prototype.onClose=function(r,o){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){Ft('socket close with reason: "%s"',r);var n=this;clearTimeout(this.pingIntervalTimer),clearTimeout(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),this.readyState="closed",this.id=null,this.emit("close",r,o),n.writeBuffer=[],n.prevBufferLen=0}};_t.prototype.filterUpgrades=function(r){for(var o=[],n=0,s=r.length;n<s;n++)~cm(this.transports,r[n])&&o.push(r[n]);return o};as.exports=fm;as.exports.parser=_n;var lm=as.exports,Uu={exports:{}},pm=dm;function dm(r,o){var n=[];o=o||0;for(var s=o||0;s<r.length;s++)n[s-o]=r[s];return n}var Du=gm;function gm(r,o,n){return r.on(o,n),{destroy:function(){r.removeListener(o,n)}}}var nu=[].slice,Pu=function(r,o){if(typeof o=="string"&&(o=r[o]),typeof o!="function")throw new Error("bind() requires a function");var n=nu.call(arguments,2);return function(){return o.apply(r,n.concat(nu.call(arguments)))}};(function(r,o){var n=gi,s=qn,c=pm,f=Du,v=Pu,d=je("socket.io-client:socket"),b=Wn,p=Su;r.exports=l;var w={connect:1,connect_error:1,connect_timeout:1,connecting:1,disconnect:1,error:1,reconnect:1,reconnect_attempt:1,reconnect_failed:1,reconnect_error:1,reconnecting:1,ping:1,pong:1},g=s.prototype.emit;function l(u,_,A){this.io=u,this.nsp=_,this.json=this,this.ids=0,this.acks={},this.receiveBuffer=[],this.sendBuffer=[],this.connected=!1,this.disconnected=!0,this.flags={},A&&A.query&&(this.query=A.query),this.io.autoConnect&&this.open()}s(l.prototype),l.prototype.subEvents=function(){if(!this.subs){var u=this.io;this.subs=[f(u,"open",v(this,"onopen")),f(u,"packet",v(this,"onpacket")),f(u,"close",v(this,"onclose"))]}},l.prototype.open=l.prototype.connect=function(){return this.connected?this:(this.subEvents(),this.io.reconnecting||this.io.open(),this.io.readyState==="open"&&this.onopen(),this.emit("connecting"),this)},l.prototype.send=function(){var u=c(arguments);return u.unshift("message"),this.emit.apply(this,u),this},l.prototype.emit=function(u){if(w.hasOwnProperty(u))return g.apply(this,arguments),this;var _=c(arguments),A={type:(this.flags.binary!==void 0?this.flags.binary:p(_))?n.BINARY_EVENT:n.EVENT,data:_};return A.options={},A.options.compress=!this.flags||this.flags.compress!==!1,typeof _[_.length-1]=="function"&&(d("emitting packet with ack id %d",this.ids),this.acks[this.ids]=_.pop(),A.id=this.ids++),this.connected?this.packet(A):this.sendBuffer.push(A),this.flags={},this},l.prototype.packet=function(u){u.nsp=this.nsp,this.io.packet(u)},l.prototype.onopen=function(){if(d("transport is open - connecting"),this.nsp!=="/")if(this.query){var u=typeof this.query=="object"?b.encode(this.query):this.query;d("sending connect packet with query %s",u),this.packet({type:n.CONNECT,query:u})}else this.packet({type:n.CONNECT})},l.prototype.onclose=function(u){d("close (%s)",u),this.connected=!1,this.disconnected=!0,delete this.id,this.emit("disconnect",u)},l.prototype.onpacket=function(u){var _=u.nsp===this.nsp,A=u.type===n.ERROR&&u.nsp==="/";if(!(!_&&!A))switch(u.type){case n.CONNECT:this.onconnect();break;case n.EVENT:this.onevent(u);break;case n.BINARY_EVENT:this.onevent(u);break;case n.ACK:this.onack(u);break;case n.BINARY_ACK:this.onack(u);break;case n.DISCONNECT:this.ondisconnect();break;case n.ERROR:this.emit("error",u.data);break}},l.prototype.onevent=function(u){var _=u.data||[];d("emitting event %j",_),u.id!=null&&(d("attaching ack callback to event"),_.push(this.ack(u.id))),this.connected?g.apply(this,_):this.receiveBuffer.push(_)},l.prototype.ack=function(u){var _=this,A=!1;return function(){if(!A){A=!0;var k=c(arguments);d("sending ack %j",k),_.packet({type:p(k)?n.BINARY_ACK:n.ACK,id:u,data:k})}}},l.prototype.onack=function(u){var _=this.acks[u.id];typeof _=="function"?(d("calling ack %s with %j",u.id,u.data),_.apply(this,u.data),delete this.acks[u.id]):d("bad ack %s",u.id)},l.prototype.onconnect=function(){this.connected=!0,this.disconnected=!1,this.emitBuffered(),this.emit("connect")},l.prototype.emitBuffered=function(){var u;for(u=0;u<this.receiveBuffer.length;u++)g.apply(this,this.receiveBuffer[u]);for(this.receiveBuffer=[],u=0;u<this.sendBuffer.length;u++)this.packet(this.sendBuffer[u]);this.sendBuffer=[]},l.prototype.ondisconnect=function(){d("server disconnect (%s)",this.nsp),this.destroy(),this.onclose("io server disconnect")},l.prototype.destroy=function(){if(this.subs){for(var u=0;u<this.subs.length;u++)this.subs[u].destroy();this.subs=null}this.io.destroy(this)},l.prototype.close=l.prototype.disconnect=function(){return this.connected&&(d("performing disconnect (%s)",this.nsp),this.packet({type:n.DISCONNECT})),this.destroy(),this.connected&&this.onclose("io client disconnect"),this},l.prototype.compress=function(u){return this.flags.compress=u,this},l.prototype.binary=function(u){return this.flags.binary=u,this}})(Uu);var Fu=Uu.exports,ym=Kn;function Kn(r){r=r||{},this.ms=r.min||100,this.max=r.max||1e4,this.factor=r.factor||2,this.jitter=r.jitter>0&&r.jitter<=1?r.jitter:0,this.attempts=0}Kn.prototype.duration=function(){var r=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var o=Math.random(),n=Math.floor(o*this.jitter*r);r=Math.floor(o*10)&1?r+n:r-n}return Math.min(r,this.max)|0};Kn.prototype.reset=function(){this.attempts=0};Kn.prototype.setMin=function(r){this.ms=r};Kn.prototype.setMax=function(r){this.max=r};Kn.prototype.setJitter=function(r){this.jitter=r};var vm=lm,mm=Fu,wm=qn,_m=gi,sn=Du,Fn=Pu,Yt=je("socket.io-client:manager"),Mu=Lu,bm=ym,qu=Object.prototype.hasOwnProperty,ru=bt;function bt(r,o){if(!(this instanceof bt))return new bt(r,o);r&&typeof r=="object"&&(o=r,r=void 0),o=o||{},o.path=o.path||"/socket.io",this.nsps={},this.subs=[],this.opts=o,this.reconnection(o.reconnection!==!1),this.reconnectionAttempts(o.reconnectionAttempts||1/0),this.reconnectionDelay(o.reconnectionDelay||1e3),this.reconnectionDelayMax(o.reconnectionDelayMax||5e3),this.randomizationFactor(o.randomizationFactor||.5),this.backoff=new bm({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(o.timeout==null?2e4:o.timeout),this.readyState="closed",this.uri=r,this.connecting=[],this.lastPing=null,this.encoding=!1,this.packetBuffer=[];var n=o.parser||_m;this.encoder=new n.Encoder,this.decoder=new n.Decoder,this.autoConnect=o.autoConnect!==!1,this.autoConnect&&this.open()}bt.prototype.emitAll=function(){this.emit.apply(this,arguments);for(var r in this.nsps)qu.call(this.nsps,r)&&this.nsps[r].emit.apply(this.nsps[r],arguments)};bt.prototype.updateSocketIds=function(){for(var r in this.nsps)qu.call(this.nsps,r)&&(this.nsps[r].id=this.generateId(r))};bt.prototype.generateId=function(r){return(r==="/"?"":r+"#")+this.engine.id};wm(bt.prototype);bt.prototype.reconnection=function(r){return arguments.length?(this._reconnection=!!r,this):this._reconnection};bt.prototype.reconnectionAttempts=function(r){return arguments.length?(this._reconnectionAttempts=r,this):this._reconnectionAttempts};bt.prototype.reconnectionDelay=function(r){return arguments.length?(this._reconnectionDelay=r,this.backoff&&this.backoff.setMin(r),this):this._reconnectionDelay};bt.prototype.randomizationFactor=function(r){return arguments.length?(this._randomizationFactor=r,this.backoff&&this.backoff.setJitter(r),this):this._randomizationFactor};bt.prototype.reconnectionDelayMax=function(r){return arguments.length?(this._reconnectionDelayMax=r,this.backoff&&this.backoff.setMax(r),this):this._reconnectionDelayMax};bt.prototype.timeout=function(r){return arguments.length?(this._timeout=r,this):this._timeout};bt.prototype.maybeReconnectOnOpen=function(){!this.reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()};bt.prototype.open=bt.prototype.connect=function(r,o){if(Yt("readyState %s",this.readyState),~this.readyState.indexOf("open"))return this;Yt("opening %s",this.uri),this.engine=vm(this.uri,this.opts);var n=this.engine,s=this;this.readyState="opening",this.skipReconnect=!1;var c=sn(n,"open",function(){s.onopen(),r&&r()}),f=sn(n,"error",function(b){if(Yt("connect_error"),s.cleanup(),s.readyState="closed",s.emitAll("connect_error",b),r){var p=new Error("Connection error");p.data=b,r(p)}else s.maybeReconnectOnOpen()});if(this._timeout!==!1){var v=this._timeout;Yt("connect attempt will timeout after %d",v),v===0&&c.destroy();var d=setTimeout(function(){Yt("connect attempt timed out after %d",v),c.destroy(),n.close(),n.emit("error","timeout"),s.emitAll("connect_timeout",v)},v);this.subs.push({destroy:function(){clearTimeout(d)}})}return this.subs.push(c),this.subs.push(f),this};bt.prototype.onopen=function(){Yt("open"),this.cleanup(),this.readyState="open",this.emit("open");var r=this.engine;this.subs.push(sn(r,"data",Fn(this,"ondata"))),this.subs.push(sn(r,"ping",Fn(this,"onping"))),this.subs.push(sn(r,"pong",Fn(this,"onpong"))),this.subs.push(sn(r,"error",Fn(this,"onerror"))),this.subs.push(sn(r,"close",Fn(this,"onclose"))),this.subs.push(sn(this.decoder,"decoded",Fn(this,"ondecoded")))};bt.prototype.onping=function(){this.lastPing=new Date,this.emitAll("ping")};bt.prototype.onpong=function(){this.emitAll("pong",new Date-this.lastPing)};bt.prototype.ondata=function(r){this.decoder.add(r)};bt.prototype.ondecoded=function(r){this.emit("packet",r)};bt.prototype.onerror=function(r){Yt("error",r),this.emitAll("error",r)};bt.prototype.socket=function(r,o){var n=this.nsps[r];if(!n){n=new mm(this,r,o),this.nsps[r]=n;var s=this;n.on("connecting",c),n.on("connect",function(){n.id=s.generateId(r)}),this.autoConnect&&c()}function c(){~Mu(s.connecting,n)||s.connecting.push(n)}return n};bt.prototype.destroy=function(r){var o=Mu(this.connecting,r);~o&&this.connecting.splice(o,1),!this.connecting.length&&this.close()};bt.prototype.packet=function(r){Yt("writing packet %j",r);var o=this;r.query&&r.type===0&&(r.nsp+="?"+r.query),o.encoding?o.packetBuffer.push(r):(o.encoding=!0,this.encoder.encode(r,function(n){for(var s=0;s<n.length;s++)o.engine.write(n[s],r.options);o.encoding=!1,o.processPacketQueue()}))};bt.prototype.processPacketQueue=function(){if(this.packetBuffer.length>0&&!this.encoding){var r=this.packetBuffer.shift();this.packet(r)}};bt.prototype.cleanup=function(){Yt("cleanup");for(var r=this.subs.length,o=0;o<r;o++){var n=this.subs.shift();n.destroy()}this.packetBuffer=[],this.encoding=!1,this.lastPing=null,this.decoder.destroy()};bt.prototype.close=bt.prototype.disconnect=function(){Yt("disconnect"),this.skipReconnect=!0,this.reconnecting=!1,this.readyState==="opening"&&this.cleanup(),this.backoff.reset(),this.readyState="closed",this.engine&&this.engine.close()};bt.prototype.onclose=function(r){Yt("onclose"),this.cleanup(),this.backoff.reset(),this.readyState="closed",this.emit("close",r),this._reconnection&&!this.skipReconnect&&this.reconnect()};bt.prototype.reconnect=function(){if(this.reconnecting||this.skipReconnect)return this;var r=this;if(this.backoff.attempts>=this._reconnectionAttempts)Yt("reconnect failed"),this.backoff.reset(),this.emitAll("reconnect_failed"),this.reconnecting=!1;else{var o=this.backoff.duration();Yt("will wait %dms before reconnect attempt",o),this.reconnecting=!0;var n=setTimeout(function(){r.skipReconnect||(Yt("attempting reconnect"),r.emitAll("reconnect_attempt",r.backoff.attempts),r.emitAll("reconnecting",r.backoff.attempts),!r.skipReconnect&&r.open(function(s){s?(Yt("reconnect attempt error"),r.reconnecting=!1,r.reconnect(),r.emitAll("reconnect_error",s.data)):(Yt("reconnect success"),r.onreconnect())}))},o);this.subs.push({destroy:function(){clearTimeout(n)}})}};bt.prototype.onreconnect=function(){var r=this.backoff.attempts;this.reconnecting=!1,this.backoff.reset(),this.updateSocketIds(),this.emitAll("reconnect",r)};(function(r,o){var n=e0,s=gi,c=ru,f=je("socket.io-client");r.exports=o=d;var v=o.managers={};function d(b,p){typeof b=="object"&&(p=b,b=void 0),p=p||{};var w=n(b),g=w.source,l=w.id,u=w.path,_=v[l]&&u in v[l].nsps,A=p.forceNew||p["force new connection"]||p.multiplex===!1||_,k;return A?(f("ignoring socket cache for %s",g),k=c(g,p)):(v[l]||(f("new io instance for %s",g),v[l]=c(g,p)),k=v[l]),w.query&&!p.query&&(p.query=w.query),k.socket(w.path,p)}o.protocol=s.protocol,o.connect=d,o.Manager=ru,o.Socket=Fu})(Jo,Jo.exports);var Cm=Jo.exports;const Sm=Hv(Cm);let ci;const km=new Uint8Array(16);function Am(){if(!ci&&(ci=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!ci))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return ci(km)}const Gt=[];for(let r=0;r<256;++r)Gt.push((r+256).toString(16).slice(1));function xm(r,o=0){return Gt[r[o+0]]+Gt[r[o+1]]+Gt[r[o+2]]+Gt[r[o+3]]+"-"+Gt[r[o+4]]+Gt[r[o+5]]+"-"+Gt[r[o+6]]+Gt[r[o+7]]+"-"+Gt[r[o+8]]+Gt[r[o+9]]+"-"+Gt[r[o+10]]+Gt[r[o+11]]+Gt[r[o+12]]+Gt[r[o+13]]+Gt[r[o+14]]+Gt[r[o+15]]}const Em=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),iu={randomUUID:Em};function Tm(r,o,n){if(iu.randomUUID&&!o&&!r)return iu.randomUUID();r=r||{};const s=r.random||(r.rng||Am)();if(s[6]=s[6]&15|64,s[8]=s[8]&63|128,o){n=n||0;for(let c=0;c<16;++c)o[n+c]=s[c];return o}return xm(s)}function Rm(r,o){const n=o.map(c=>JSON.stringify(c)).join(" "),s=new Date().toISOString();return JSON.stringify({level:r,time:s,message:n})}function Im(r){const o=String(r[0]),n=r.slice(1);return{level:o,logs:n}}function Om(r,o){const n=JSON.parse(r);return o.forEach(s=>delete n[s]),n}function Nm(r){if(typeof r=="object"&&r!==null)return r;try{return JSON.parse(r)}catch{return{extraData:r}}}function Lm(r){const o=/\(([^)]+)\)/,n=r.match(o);if(n&&n[1]){const s=n[1].split(";");for(let c of s)if(c=c.trim(),c.startsWith("Windows")||c.startsWith("Macintosh")||c.startsWith("Linux"))return c}return"Unknown"}function ou(r){return(...o)=>new Promise((n,s)=>{try{const c=r(...o);n(c)}catch(c){s(c)}})}const Bm={reconnection:!0,reconnectionDelay:5e3,reconnectionAttempts:10,upgrade:!1,transports:["websocket"],debug:!1},Xo={logToConsole:!0,overloadGlobalConsole:!1,socketEmitInterval:6e4};let se=console;class Um{constructor(o){Pt(this,"logToConsole"),Pt(this,"overloadGlobalConsole"),Pt(this,"system"),Pt(this,"socketEmitInterval"),Pt(this,"storageId"),Pt(this,"emitInProgress"),Pt(this,"queue"),Pt(this,"processing"),Pt(this,"interval"),Pt(this,"logIndex"),Pt(this,"socket"),Pt(this,"staticObject",{}),Pt(this,"isGetItemAsync"),Pt(this,"isSetItemAsync"),Pt(this,"getItem"),Pt(this,"setItem"),Pt(this,"parseLog"),Pt(this,"_logMethod"),Pt(this,"_warnMethod"),Pt(this,"_errorMethod"),Pt(this,"_debugMethod");const{loggerOptions:n}=o;if(!n.system)throw new Error("Config property 'system' should be provided!");this.isGetItemAsync=n.isGetItemAsync||!1,this.isSetItemAsync=n.isSetItemAsync||!1,this.setupStorageFunctions(n.getItem,n.setItem,n.parseLog),this.system=n.system,this.socketEmitInterval=n.socketEmitInterval||Xo.socketEmitInterval,this.logToConsole=n.logToConsole!==void 0?n.logToConsole:Xo.logToConsole,this.overloadGlobalConsole=n.overloadGlobalConsole!==void 0?n.overloadGlobalConsole:Xo.overloadGlobalConsole,this.storageId=this.getStorageName(),this.queue=[],this.processing=!1,this.emitInProgress=!1,this.logIndex=0,this.init(o)}setupStorageFunctions(o,n,s){this.getItem=o&&typeof o=="function"?this.isGetItemAsync?o:ou(o):this.defaultGetItemFunction,this.setItem=n&&typeof n=="function"?this.isSetItemAsync?n:ou(n):this.defaultSetItemFunction,this.parseLog=s&&typeof s=="function"?s:Rm}init(o){const{socket:n,url:s,socketOptions:c={}}=o;this._logMethod=se.log.bind(se),this._warnMethod=se.warn.bind(se),this._errorMethod=se.error.bind(se),this._debugMethod=se.debug.bind(se),this.initStorage().then(()=>{if(n)this.socket=n;else if(s)this.socket=this.createConnection(s,c);else throw new Error("Must provide either a 'socket' or a 'url' for socket connection");this.interval=setInterval(async()=>{await this.emitLogs()},this.socketEmitInterval),this.overloadGlobalConsole&&this._overloadConsole()})}createConnection(o,n={}){const s={...Bm,...n};return Sm(o,s)}async emitLogs(){if(!this.emitInProgress)try{const o=await this.getItem(this.storageId);if(!o)return;const n=[];this.emitInProgress=!0;const s=JSON.parse(o),c=Object.keys(s);if(!c.length)return;if(!this.socket||!this.socket.connected)throw new Error("Socket is disconnected");for(const d of c){const b=Nm(s[d]),p={...this.populateMetaData(),...this.staticObject,...b};await this.socket.emit("Log",JSON.stringify(p)),n.push(d)}const f=await this.getItem(this.storageId);if(!f)return;const v=Om(f,n);await this.setItem(this.storageId,JSON.stringify(v))}catch(o){this._errorMethod(o)}finally{this.emitInProgress=!1}}setupStaticFields(o){this.staticObject={...o}}populateMetaData(){const o=new Date;let n;typeof window<"u"&&typeof window.document<"u"?n=window==null?void 0:window.navigator.userAgent:typeof self<"u"&&self.navigator&&(n=self.navigator.userAgent);let s;return n&&(s=Lm(n)),{System:this.system,DateTime:o,UserAgent:n,OSVersion:s}}disconnectSocket(){!this.socket||!this.interval||(this.socket.disconnect(),clearInterval(this.interval))}_overloadConsole(){se=Object.assign(se,{log:o=>{this.log(o)},warn:o=>{this.warn(o)},error:o=>{this.error(o)},debug:o=>{this.debug(o)}})}async initStorage(){const o=await this.getItem(this.storageId);(!o||typeof o!="string")&&await this.setItem(this.storageId,JSON.stringify({}))}async resetStorage(){await this.setItem(this.storageId,JSON.stringify({}))}getStorageName(){const o=Tm();return this.system.toString().toUpperCase()+o+Date.now()}async processLog(...o){try{if(o.length<2)return;const n=await this.getItem(this.storageId);if(!n)return;const{level:s,logs:c}=Im(o),f=JSON.parse(n),v=this.formItemKey(s);f[v]=this.parseLog(s,c),await this.setItem(this.storageId,JSON.stringify(f))}catch(n){this._errorMethod(n)}}async processQueue(){if(this.processing||this.queue.length===0)return;const o=this.queue.shift();o&&(this.processing=!0,await this.processLog(...o).finally(()=>{this.processing=!1,this.processQueue()}))}log(o){const n=["INFO",o];this.queue.push(n),this.logToConsole&&this._logMethod.apply(se,[o]),this.processQueue()}warn(o){const n=["WARN",o];this.queue.push(n),this.logToConsole&&this._warnMethod.apply(se,[o]),this.processQueue()}error(o){const n=["ERROR",o];this.queue.push(n),this.logToConsole&&this._errorMethod.apply(se,[o]),this.processQueue()}debug(o){const n=["DEBUG",o];this.queue.push(n),this.logToConsole&&this._debugMethod.apply(se,[o]),this.processQueue()}async defaultGetItemFunction(o){return localStorage.getItem(o)}async defaultSetItemFunction(o,n){try{localStorage.setItem(o,n)}catch(s){this._errorMethod(s)}}formItemKey(o){const n=new Date().toISOString();return this.logIndex++,`${o}-${this.system}-${n}-${this.logIndex}`}}class Dm{constructor(o){At(this,"storageLogger");this.eventsSdkClass=o,this.eventsSdkClass=o}init(){if(!this.eventsSdkClass.options.useLogger)return;if(this.eventsSdkClass.options.storageLoggerInstance){this.storageLogger=this.eventsSdkClass.options.storageLoggerInstance;return}let o;this.eventsSdkClass.options.loggerSocketConnection&&(o=this.eventsSdkClass.options.loggerSocketConnection),this.eventsSdkClass.socketIoClass.ioFunction&&!o&&(o=this.eventsSdkClass.socketIoClass.ioFunction(this.eventsSdkClass.options.loggerServer,this.eventsSdkClass.options.loggerConnectOptions)),o&&(this.storageLogger=new Um({socket:o,loggerOptions:this.eventsSdkClass.options.loggerConfig}))}log(o){this.storageLogger?o.Level===lr.INFO?this.storageLogger.log(o):o.Level===lr.ERROR&&this.storageLogger.error(o):o.Level===lr.INFO?console.log(o):o.Level===lr.ERROR&&console.error(o)}}class Pm{constructor(o){At(this,"listeners",{[vt.ALL_EXTENSION_STATUS]:[],[vt.ALL_DIALER_STATUS]:[],[vt.ALL_USERS_STATUS]:[],[vt.QUEUE_EVENT]:[],[vt.EXTENSION_EVENT]:[],[vt.DIALER_EVENT]:[],[vt.LOGIN_SUCCESS]:[],[vt.LOGIN_STATUS]:[],[vt.KEEP_ALIVE_RESPONSE]:[],[vt.ONLINE_STATUS_EVENT]:[],[vt.EXTENSIONS_UPDATED]:[]});At(this,"allListeners",[]);this.eventsSdkClass=o,this.eventsSdkClass=o}on(o,n){o==="*"?this.allListeners.push(n):this.listeners[o].push(n)}off(o,n){if(o==="*")this.allListeners=this.allListeners.filter(s=>s!==n);else{const c=this.listeners[o].filter(f=>f!==n);this.listeners={...this.listeners,[o]:c}}}emit(o,n){this.eventsSdkClass.socketIoClass.lastEventTimestamp=new Date().getTime(),this.listeners[o].forEach(c=>c({name:o,data:n}));const s={name:o,data:n};this.allListeners.forEach(c=>c(s))}}class Fm{constructor(o){At(this,"argumentOptions");At(this,"options");At(this,"servers",[]);At(this,"URLList",[]);At(this,"server");At(this,"URL");At(this,"socket");At(this,"mainServer");At(this,"alreadyAttemptedOtherServers",[]);At(this,"authClass",new Rv(this));At(this,"socketIoClass",new Mv(this));At(this,"loggerClass",new Dm(this));At(this,"eventEmitterClass",new Pm(this));At(this,"reconnectOptions");At(this,"retryConnection");this.options={...Ov,...o},this.reconnectOptions={retryCount:1,maxReconnectAttempts:this.options.maxReconnectAttempts,reconnectionDelay:this.options.reconnectionDelay,minReconnectionDelay:this.options.reconnectionDelay,maxReconnectionDelay:6e4*5},this.server=this.options.fallbackServer,this.retryConnection=Iv.debounce(this.connect.bind(this),this.reconnectOptions.reconnectionDelay,{leading:!0,trailing:!1}),this.argumentOptions={...o}}on(o,n){this.eventEmitterClass.on(o,n)}emit(o,...n){this.socketIoClass.io&&this.socketIoClass.io.emit(o,...n)}connect(o){o===wn.MAIN&&this.findMainServer(),o===wn.NEXT&&this.findNextServer(),this.socketIoClass.doReconnect=!0,this.socketIoClass.initSocketConnection(),this.socketIoClass.initSocketEvents(),this.socketIoClass.initKeepAlive(),this.loggerClass.init()}disconnect(){this.socketIoClass.doReconnect=!1,this.socketIoClass.closeAllConnections()}clearKeepAliveInterval(){this.socketIoClass.clearKeepAliveInterval()}findMainServer(){this.servers.length?(this.mainServer=this.servers.reduce((o,n)=>n.Priority>o.Priority?n:o),this.server=this.mainServer):this.URLList.length&&(this.URL=this.URLList[0])}findNextServer(){if(this.servers.length)if(this.server.Priority===this.mainServer.Priority){let o=this.servers.filter(n=>n.Priority!==this.mainServer.Priority&&this.alreadyAttemptedOtherServers.indexOf(n.Priority)+1===0);o.length||(this.alreadyAttemptedOtherServers=[],o=this.servers.filter(n=>n.Priority!==this.mainServer.Priority&&this.alreadyAttemptedOtherServers.indexOf(n.Priority)+1===0)),o.length&&(this.server=o.reduce((n,s)=>s.Priority>n.Priority?s:n),this.alreadyAttemptedOtherServers.push(this.server.Priority))}else this.server=this.mainServer;else if(this.URLList.length)if(this.URL===this.URLList[0]){let o=this.URLList.filter(n=>n!==this.URLList[0]&&this.alreadyAttemptedOtherServers.indexOf(n)+1===0);o.length||(this.alreadyAttemptedOtherServers=[],o=this.URLList.filter(n=>n!==this.URLList[0]&&this.alreadyAttemptedOtherServers.indexOf(n)+1===0)),o.length&&(this.URL=o[0],this.alreadyAttemptedOtherServers.push(this.URL))}else this.URL=this.URLList[0]}async init(){return this.socket,await this.authClass.login(this.options),this.getServers(),!0}getServers(){this.options.serverFetchStrategy==="static"&&this.argumentOptions.servers&&Array.isArray(this.argumentOptions.servers)&&this.argumentOptions.servers.length>1&&(this.servers=this.argumentOptions.servers)}}exports.CallStatusEnum=fu;exports.CallTypeEnum=hu;exports.DialerTypeEnum=lu;exports.DirectionEnum=pu;exports.DoNotCallMeStatusCodeEnum=du;exports.EventsEnum=vt;exports.ExtensionEventReasonEnum=rs;exports.ExtensionHangupCauseEnum=gu;exports.QueueEventReasonEnum=yu;exports.ServerListenerEventsEnum=is;exports.default=Fm;
|
|
45
46
|
//# sourceMappingURL=voicenter-events-sdk.cjs.js.map
|