@voicenter-team/events-sdk 0.0.44 → 0.0.46
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 +11 -11
- package/dist/voicenter-events-sdk.cjs.js.map +1 -1
- package/dist/voicenter-events-sdk.d.ts +63 -125
- package/dist/voicenter-events-sdk.es.js +319 -308
- package/dist/voicenter-events-sdk.es.js.map +1 -1
- package/dist/voicenter-events-sdk.iife.js +10 -10
- package/dist/voicenter-events-sdk.iife.js.map +1 -1
- package/dist/voicenter-events-sdk.umd.js +10 -10
- package/dist/voicenter-events-sdk.umd.js.map +1 -1
- package/package.json +3 -3
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(ee,Wt){typeof exports=="object"&&typeof module<"u"?Wt(exports):typeof define=="function"&&define.amd?define(["exports"],Wt):(ee=typeof globalThis<"u"?globalThis:ee||self,Wt(ee.VoicenterEventsSDK={}))})(this,function(ee){"use strict";var Jy=Object.defineProperty;var Vy=(ee,Wt,on)=>Wt in ee?Jy(ee,Wt,{enumerable:!0,configurable:!0,writable:!0,value:on}):ee[Wt]=on;var wt=(ee,Wt,on)=>(Vy(ee,typeof Wt!="symbol"?Wt+"":Wt,on),on);var Wt=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function on(a){return a&&a.__esModule&&Object.prototype.hasOwnProperty.call(a,"default")?a.default:a}var Ws={exports:{}},Ks={exports:{}};(function(){var a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",i={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 i.rotl(n,8)&16711935|i.rotl(n,24)&4278255360;for(var s=0;s<n.length;s++)n[s]=i.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=[],u=0,h=0;u<n.length;u++,h+=8)s[h>>>5]|=n[u]<<24-h%32;return s},wordsToBytes:function(n){for(var s=[],u=0;u<n.length*32;u+=8)s.push(n[u>>>5]>>>24-u%32&255);return s},bytesToHex:function(n){for(var s=[],u=0;u<n.length;u++)s.push((n[u]>>>4).toString(16)),s.push((n[u]&15).toString(16));return s.join("")},hexToBytes:function(n){for(var s=[],u=0;u<n.length;u+=2)s.push(parseInt(n.substr(u,2),16));return s},bytesToBase64:function(n){for(var s=[],u=0;u<n.length;u+=3)for(var h=n[u]<<16|n[u+1]<<8|n[u+2],m=0;m<4;m++)u*8+m*6<=n.length*8?s.push(a.charAt(h>>>6*(3-m)&63)):s.push("=");return s.join("")},base64ToBytes:function(n){n=n.replace(/[^A-Z0-9+\/]/ig,"");for(var s=[],u=0,h=0;u<n.length;h=++u%4)h!=0&&s.push((a.indexOf(n.charAt(u-1))&Math.pow(2,-2*h+8)-1)<<h*2|a.indexOf(n.charAt(u))>>>6-h*2);return s}};Ks.exports=i})();var Yu=Ks.exports,ni={utf8:{stringToBytes:function(a){return ni.bin.stringToBytes(unescape(encodeURIComponent(a)))},bytesToString:function(a){return decodeURIComponent(escape(ni.bin.bytesToString(a)))}},bin:{stringToBytes:function(a){for(var i=[],n=0;n<a.length;n++)i.push(a.charCodeAt(n)&255);return i},bytesToString:function(a){for(var i=[],n=0;n<a.length;n++)i.push(String.fromCharCode(a[n]));return i.join("")}}},Hs=ni;/*!
|
|
2
2
|
* Determine if an object is a Buffer
|
|
3
3
|
*
|
|
4
4
|
* @author Feross Aboukhadijeh <https://feross.org>
|
|
@@ -10,16 +10,16 @@
|
|
|
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
|
-
*/rr.exports,function(a,i){(function(){var n,s="4.17.21",u=200,h="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,f=4,b=1,E=2,x=1,W=2,st=4,V=8,ot=16,$=32,D=64,M=128,H=256,L=512,U=30,X="...",Q=800,j=16,B=1,kt=2,At=3,Ot=1/0,ut=9007199254740991,zt=17976931348623157e292,Le=NaN,ae=4294967295,pr=ae-1,q=ae>>>1,J=[["ary",M],["bind",x],["bindKey",W],["curry",V],["curryRight",ot],["flip",L],["partial",$],["partialRight",D],["rearg",H]],F="[object Arguments]",et="[object Array]",P="[object AsyncFunction]",Z="[object Boolean]",tt="[object Date]",z="[object DOMException]",at="[object Error]",bt="[object Function]",Xt="[object GeneratorFunction]",Rt="[object Map]",Ae="[object Number]",Fn="[object Null]",ue="[object Object]",mn="[object Promise]",Mn="[object Proxy]",Yt="[object RegExp]",jt="[object Set]",Ne="[object String]",Be="[object Symbol]",qn="[object Undefined]",Me="[object WeakMap]",Wn="[object WeakSet]",Ve="[object ArrayBuffer]",_n="[object DataView]",wi="[object Float32Array]",bi="[object Float64Array]",Si="[object Int8Array]",Ci="[object Int16Array]",ki="[object Int32Array]",Ai="[object Uint8Array]",Ei="[object Uint8ClampedArray]",Ti="[object Uint16Array]",xi="[object Uint32Array]",gf=/\b__p \+= '';/g,vf=/\b(__p \+=) '' \+/g,yf=/(__e\(.*?\)|\b__t\)) \+\n'';/g,bo=/&(?:amp|lt|gt|quot|#39);/g,So=/[&<>"']/g,mf=RegExp(bo.source),_f=RegExp(So.source),wf=/<%-([\s\S]+?)%>/g,bf=/<%([\s\S]+?)%>/g,Co=/<%=([\s\S]+?)%>/g,Sf=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Cf=/^\w*$/,kf=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Oi=/[\\^$.*+?()[\]{}|]/g,Af=RegExp(Oi.source),Ri=/^\s+/,Ef=/\s/,Tf=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,xf=/\{\n\/\* \[wrapped with (.+)\] \*/,Of=/,? & /,Rf=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,If=/[()=,{}\[\]\/\s]/,Lf=/\\(\\)?/g,Nf=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,ko=/\w*$/,Bf=/^[-+]0x[0-9a-f]+$/i,Uf=/^0b[01]+$/i,Df=/^\[object .+?Constructor\]$/,Pf=/^0o[0-7]+$/i,Ff=/^(?:0|[1-9]\d*)$/,Mf=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,dr=/($^)/,qf=/['\n\r\u2028\u2029\\]/g,gr="\\ud800-\\udfff",Wf="\\u0300-\\u036f",Kf="\\ufe20-\\ufe2f",Hf="\\u20d0-\\u20ff",Ao=Wf+Kf+Hf,Eo="\\u2700-\\u27bf",To="a-z\\xdf-\\xf6\\xf8-\\xff",$f="\\xac\\xb1\\xd7\\xf7",Gf="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",zf="\\u2000-\\u206f",Xf=" \\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",xo="A-Z\\xc0-\\xd6\\xd8-\\xde",Oo="\\ufe0e\\ufe0f",Ro=$f+Gf+zf+Xf,Ii="['’]",Jf="["+gr+"]",Io="["+Ro+"]",vr="["+Ao+"]",Lo="\\d+",Vf="["+Eo+"]",No="["+To+"]",Bo="[^"+gr+Ro+Lo+Eo+To+xo+"]",Li="\\ud83c[\\udffb-\\udfff]",Yf="(?:"+vr+"|"+Li+")",Uo="[^"+gr+"]",Ni="(?:\\ud83c[\\udde6-\\uddff]){2}",Bi="[\\ud800-\\udbff][\\udc00-\\udfff]",wn="["+xo+"]",Do="\\u200d",Po="(?:"+No+"|"+Bo+")",jf="(?:"+wn+"|"+Bo+")",Fo="(?:"+Ii+"(?:d|ll|m|re|s|t|ve))?",Mo="(?:"+Ii+"(?:D|LL|M|RE|S|T|VE))?",qo=Yf+"?",Wo="["+Oo+"]?",Zf="(?:"+Do+"(?:"+[Uo,Ni,Bi].join("|")+")"+Wo+qo+")*",Qf="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",th="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Ko=Wo+qo+Zf,eh="(?:"+[Vf,Ni,Bi].join("|")+")"+Ko,nh="(?:"+[Uo+vr+"?",vr,Ni,Bi,Jf].join("|")+")",rh=RegExp(Ii,"g"),ih=RegExp(vr,"g"),Ui=RegExp(Li+"(?="+Li+")|"+nh+Ko,"g"),sh=RegExp([wn+"?"+No+"+"+Fo+"(?="+[Io,wn,"$"].join("|")+")",jf+"+"+Mo+"(?="+[Io,wn+Po,"$"].join("|")+")",wn+"?"+Po+"+"+Fo,wn+"+"+Mo,th,Qf,Lo,eh].join("|"),"g"),oh=RegExp("["+Do+gr+Ao+Oo+"]"),ah=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,uh=["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"],ch=-1,xt={};xt[wi]=xt[bi]=xt[Si]=xt[Ci]=xt[ki]=xt[Ai]=xt[Ei]=xt[Ti]=xt[xi]=!0,xt[F]=xt[et]=xt[Ve]=xt[Z]=xt[_n]=xt[tt]=xt[at]=xt[bt]=xt[Rt]=xt[Ae]=xt[ue]=xt[Yt]=xt[jt]=xt[Ne]=xt[Me]=!1;var Tt={};Tt[F]=Tt[et]=Tt[Ve]=Tt[_n]=Tt[Z]=Tt[tt]=Tt[wi]=Tt[bi]=Tt[Si]=Tt[Ci]=Tt[ki]=Tt[Rt]=Tt[Ae]=Tt[ue]=Tt[Yt]=Tt[jt]=Tt[Ne]=Tt[Be]=Tt[Ai]=Tt[Ei]=Tt[Ti]=Tt[xi]=!0,Tt[at]=Tt[bt]=Tt[Me]=!1;var fh={À:"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"},hh={"&":"&","<":"<",">":">",'"':""","'":"'"},lh={"&":"&","<":"<",">":">",""":'"',"'":"'"},ph={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},dh=parseFloat,gh=parseInt,Ho=typeof Wt=="object"&&Wt&&Wt.Object===Object&&Wt,vh=typeof self=="object"&&self&&self.Object===Object&&self,Ht=Ho||vh||Function("return this")(),Di=i&&!i.nodeType&&i,un=Di&&!0&&a&&!a.nodeType&&a,$o=un&&un.exports===Di,Pi=$o&&Ho.process,ve=function(){try{var k=un&&un.require&&un.require("util").types;return k||Pi&&Pi.binding&&Pi.binding("util")}catch{}}(),Go=ve&&ve.isArrayBuffer,zo=ve&&ve.isDate,Xo=ve&&ve.isMap,Jo=ve&&ve.isRegExp,Vo=ve&&ve.isSet,Yo=ve&&ve.isTypedArray;function ce(k,O,T){switch(T.length){case 0:return k.call(O);case 1:return k.call(O,T[0]);case 2:return k.call(O,T[0],T[1]);case 3:return k.call(O,T[0],T[1],T[2])}return k.apply(O,T)}function yh(k,O,T,G){for(var ct=-1,_t=k==null?0:k.length;++ct<_t;){var Pt=k[ct];O(G,Pt,T(Pt),k)}return G}function ye(k,O){for(var T=-1,G=k==null?0:k.length;++T<G&&O(k[T],T,k)!==!1;);return k}function mh(k,O){for(var T=k==null?0:k.length;T--&&O(k[T],T,k)!==!1;);return k}function jo(k,O){for(var T=-1,G=k==null?0:k.length;++T<G;)if(!O(k[T],T,k))return!1;return!0}function Ye(k,O){for(var T=-1,G=k==null?0:k.length,ct=0,_t=[];++T<G;){var Pt=k[T];O(Pt,T,k)&&(_t[ct++]=Pt)}return _t}function yr(k,O){var T=k==null?0:k.length;return!!T&&bn(k,O,0)>-1}function Fi(k,O,T){for(var G=-1,ct=k==null?0:k.length;++G<ct;)if(T(O,k[G]))return!0;return!1}function It(k,O){for(var T=-1,G=k==null?0:k.length,ct=Array(G);++T<G;)ct[T]=O(k[T],T,k);return ct}function je(k,O){for(var T=-1,G=O.length,ct=k.length;++T<G;)k[ct+T]=O[T];return k}function Mi(k,O,T,G){var ct=-1,_t=k==null?0:k.length;for(G&&_t&&(T=k[++ct]);++ct<_t;)T=O(T,k[ct],ct,k);return T}function _h(k,O,T,G){var ct=k==null?0:k.length;for(G&&ct&&(T=k[--ct]);ct--;)T=O(T,k[ct],ct,k);return T}function qi(k,O){for(var T=-1,G=k==null?0:k.length;++T<G;)if(O(k[T],T,k))return!0;return!1}var wh=Wi("length");function bh(k){return k.split("")}function Sh(k){return k.match(Rf)||[]}function Zo(k,O,T){var G;return T(k,function(ct,_t,Pt){if(O(ct,_t,Pt))return G=_t,!1}),G}function mr(k,O,T,G){for(var ct=k.length,_t=T+(G?1:-1);G?_t--:++_t<ct;)if(O(k[_t],_t,k))return _t;return-1}function bn(k,O,T){return O===O?Bh(k,O,T):mr(k,Qo,T)}function Ch(k,O,T,G){for(var ct=T-1,_t=k.length;++ct<_t;)if(G(k[ct],O))return ct;return-1}function Qo(k){return k!==k}function ta(k,O){var T=k==null?0:k.length;return T?Hi(k,O)/T:Le}function Wi(k){return function(O){return O==null?n:O[k]}}function Ki(k){return function(O){return k==null?n:k[O]}}function ea(k,O,T,G,ct){return ct(k,function(_t,Pt,Et){T=G?(G=!1,_t):O(T,_t,Pt,Et)}),T}function kh(k,O){var T=k.length;for(k.sort(O);T--;)k[T]=k[T].value;return k}function Hi(k,O){for(var T,G=-1,ct=k.length;++G<ct;){var _t=O(k[G]);_t!==n&&(T=T===n?_t:T+_t)}return T}function $i(k,O){for(var T=-1,G=Array(k);++T<k;)G[T]=O(T);return G}function Ah(k,O){return It(O,function(T){return[T,k[T]]})}function na(k){return k&&k.slice(0,oa(k)+1).replace(Ri,"")}function fe(k){return function(O){return k(O)}}function Gi(k,O){return It(O,function(T){return k[T]})}function Kn(k,O){return k.has(O)}function ra(k,O){for(var T=-1,G=k.length;++T<G&&bn(O,k[T],0)>-1;);return T}function ia(k,O){for(var T=k.length;T--&&bn(O,k[T],0)>-1;);return T}function Eh(k,O){for(var T=k.length,G=0;T--;)k[T]===O&&++G;return G}var Th=Ki(fh),xh=Ki(hh);function Oh(k){return"\\"+ph[k]}function Rh(k,O){return k==null?n:k[O]}function Sn(k){return oh.test(k)}function Ih(k){return ah.test(k)}function Lh(k){for(var O,T=[];!(O=k.next()).done;)T.push(O.value);return T}function zi(k){var O=-1,T=Array(k.size);return k.forEach(function(G,ct){T[++O]=[ct,G]}),T}function sa(k,O){return function(T){return k(O(T))}}function Ze(k,O){for(var T=-1,G=k.length,ct=0,_t=[];++T<G;){var Pt=k[T];(Pt===O||Pt===_)&&(k[T]=_,_t[ct++]=T)}return _t}function _r(k){var O=-1,T=Array(k.size);return k.forEach(function(G){T[++O]=G}),T}function Nh(k){var O=-1,T=Array(k.size);return k.forEach(function(G){T[++O]=[G,G]}),T}function Bh(k,O,T){for(var G=T-1,ct=k.length;++G<ct;)if(k[G]===O)return G;return-1}function Uh(k,O,T){for(var G=T+1;G--;)if(k[G]===O)return G;return G}function Cn(k){return Sn(k)?Ph(k):wh(k)}function Ee(k){return Sn(k)?Fh(k):bh(k)}function oa(k){for(var O=k.length;O--&&Ef.test(k.charAt(O)););return O}var Dh=Ki(lh);function Ph(k){for(var O=Ui.lastIndex=0;Ui.test(k);)++O;return O}function Fh(k){return k.match(Ui)||[]}function Mh(k){return k.match(sh)||[]}var qh=function k(O){O=O==null?Ht:kn.defaults(Ht.Object(),O,kn.pick(Ht,uh));var T=O.Array,G=O.Date,ct=O.Error,_t=O.Function,Pt=O.Math,Et=O.Object,Xi=O.RegExp,Wh=O.String,me=O.TypeError,wr=T.prototype,Kh=_t.prototype,An=Et.prototype,br=O["__core-js_shared__"],Sr=Kh.toString,Ct=An.hasOwnProperty,Hh=0,aa=function(){var t=/[^.]+$/.exec(br&&br.keys&&br.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}(),Cr=An.toString,$h=Sr.call(Et),Gh=Ht._,zh=Xi("^"+Sr.call(Ct).replace(Oi,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),kr=$o?O.Buffer:n,Qe=O.Symbol,Ar=O.Uint8Array,ua=kr?kr.allocUnsafe:n,Er=sa(Et.getPrototypeOf,Et),ca=Et.create,fa=An.propertyIsEnumerable,Tr=wr.splice,ha=Qe?Qe.isConcatSpreadable:n,Hn=Qe?Qe.iterator:n,cn=Qe?Qe.toStringTag:n,xr=function(){try{var t=dn(Et,"defineProperty");return t({},"",{}),t}catch{}}(),Xh=O.clearTimeout!==Ht.clearTimeout&&O.clearTimeout,Jh=G&&G.now!==Ht.Date.now&&G.now,Vh=O.setTimeout!==Ht.setTimeout&&O.setTimeout,Or=Pt.ceil,Rr=Pt.floor,Ji=Et.getOwnPropertySymbols,Yh=kr?kr.isBuffer:n,la=O.isFinite,jh=wr.join,Zh=sa(Et.keys,Et),Ft=Pt.max,Jt=Pt.min,Qh=G.now,tl=O.parseInt,pa=Pt.random,el=wr.reverse,Vi=dn(O,"DataView"),$n=dn(O,"Map"),Yi=dn(O,"Promise"),En=dn(O,"Set"),Gn=dn(O,"WeakMap"),zn=dn(Et,"create"),Ir=Gn&&new Gn,Tn={},nl=gn(Vi),rl=gn($n),il=gn(Yi),sl=gn(En),ol=gn(Gn),Lr=Qe?Qe.prototype:n,Xn=Lr?Lr.valueOf:n,da=Lr?Lr.toString:n;function p(t){if(Nt(t)&&!ft(t)&&!(t instanceof vt)){if(t instanceof _e)return t;if(Ct.call(t,"__wrapped__"))return gu(t)}return new _e(t)}var xn=function(){function t(){}return function(e){if(!Lt(e))return{};if(ca)return ca(e);t.prototype=e;var r=new t;return t.prototype=n,r}}();function Nr(){}function _e(t,e){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!e,this.__index__=0,this.__values__=n}p.templateSettings={escape:wf,evaluate:bf,interpolate:Co,variable:"",imports:{_:p}},p.prototype=Nr.prototype,p.prototype.constructor=p,_e.prototype=xn(Nr.prototype),_e.prototype.constructor=_e;function vt(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=ae,this.__views__=[]}function al(){var t=new vt(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 ul(){if(this.__filtered__){var t=new vt(this);t.__dir__=-1,t.__filtered__=!0}else t=this.clone(),t.__dir__*=-1;return t}function cl(){var t=this.__wrapped__.value(),e=this.__dir__,r=ft(t),o=e<0,c=r?t.length:0,d=bp(0,c,this.__views__),w=d.start,C=d.end,A=C-w,R=o?C:w-1,I=this.__iteratees__,N=I.length,K=0,Y=Jt(A,this.__takeCount__);if(!r||!o&&c==A&&Y==A)return Fa(t,this.__actions__);var rt=[];t:for(;A--&&K<Y;){R+=e;for(var pt=-1,it=t[R];++pt<N;){var gt=I[pt],mt=gt.iteratee,pe=gt.type,te=mt(it);if(pe==kt)it=te;else if(!te){if(pe==B)continue t;break t}}rt[K++]=it}return rt}vt.prototype=xn(Nr.prototype),vt.prototype.constructor=vt;function fn(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var o=t[e];this.set(o[0],o[1])}}function fl(){this.__data__=zn?zn(null):{},this.size=0}function hl(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}function ll(t){var e=this.__data__;if(zn){var r=e[t];return r===S?n:r}return Ct.call(e,t)?e[t]:n}function pl(t){var e=this.__data__;return zn?e[t]!==n:Ct.call(e,t)}function dl(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=zn&&e===n?S:e,this}fn.prototype.clear=fl,fn.prototype.delete=hl,fn.prototype.get=ll,fn.prototype.has=pl,fn.prototype.set=dl;function qe(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var o=t[e];this.set(o[0],o[1])}}function gl(){this.__data__=[],this.size=0}function vl(t){var e=this.__data__,r=Br(e,t);if(r<0)return!1;var o=e.length-1;return r==o?e.pop():Tr.call(e,r,1),--this.size,!0}function yl(t){var e=this.__data__,r=Br(e,t);return r<0?n:e[r][1]}function ml(t){return Br(this.__data__,t)>-1}function _l(t,e){var r=this.__data__,o=Br(r,t);return o<0?(++this.size,r.push([t,e])):r[o][1]=e,this}qe.prototype.clear=gl,qe.prototype.delete=vl,qe.prototype.get=yl,qe.prototype.has=ml,qe.prototype.set=_l;function We(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var o=t[e];this.set(o[0],o[1])}}function wl(){this.size=0,this.__data__={hash:new fn,map:new($n||qe),string:new fn}}function bl(t){var e=zr(this,t).delete(t);return this.size-=e?1:0,e}function Sl(t){return zr(this,t).get(t)}function Cl(t){return zr(this,t).has(t)}function kl(t,e){var r=zr(this,t),o=r.size;return r.set(t,e),this.size+=r.size==o?0:1,this}We.prototype.clear=wl,We.prototype.delete=bl,We.prototype.get=Sl,We.prototype.has=Cl,We.prototype.set=kl;function hn(t){var e=-1,r=t==null?0:t.length;for(this.__data__=new We;++e<r;)this.add(t[e])}function Al(t){return this.__data__.set(t,S),this}function El(t){return this.__data__.has(t)}hn.prototype.add=hn.prototype.push=Al,hn.prototype.has=El;function Te(t){var e=this.__data__=new qe(t);this.size=e.size}function Tl(){this.__data__=new qe,this.size=0}function xl(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r}function Ol(t){return this.__data__.get(t)}function Rl(t){return this.__data__.has(t)}function Il(t,e){var r=this.__data__;if(r instanceof qe){var o=r.__data__;if(!$n||o.length<u-1)return o.push([t,e]),this.size=++r.size,this;r=this.__data__=new We(o)}return r.set(t,e),this.size=r.size,this}Te.prototype.clear=Tl,Te.prototype.delete=xl,Te.prototype.get=Ol,Te.prototype.has=Rl,Te.prototype.set=Il;function ga(t,e){var r=ft(t),o=!r&&vn(t),c=!r&&!o&&sn(t),d=!r&&!o&&!c&&Ln(t),w=r||o||c||d,C=w?$i(t.length,Wh):[],A=C.length;for(var R in t)(e||Ct.call(t,R))&&!(w&&(R=="length"||c&&(R=="offset"||R=="parent")||d&&(R=="buffer"||R=="byteLength"||R=="byteOffset")||Ge(R,A)))&&C.push(R);return C}function va(t){var e=t.length;return e?t[as(0,e-1)]:n}function Ll(t,e){return Xr(ne(t),ln(e,0,t.length))}function Nl(t){return Xr(ne(t))}function ji(t,e,r){(r!==n&&!xe(t[e],r)||r===n&&!(e in t))&&Ke(t,e,r)}function Jn(t,e,r){var o=t[e];(!(Ct.call(t,e)&&xe(o,r))||r===n&&!(e in t))&&Ke(t,e,r)}function Br(t,e){for(var r=t.length;r--;)if(xe(t[r][0],e))return r;return-1}function Bl(t,e,r,o){return tn(t,function(c,d,w){e(o,c,r(c),w)}),o}function ya(t,e){return t&&De(e,qt(e),t)}function Ul(t,e){return t&&De(e,ie(e),t)}function Ke(t,e,r){e=="__proto__"&&xr?xr(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r}function Zi(t,e){for(var r=-1,o=e.length,c=T(o),d=t==null;++r<o;)c[r]=d?n:Ls(t,e[r]);return c}function ln(t,e,r){return t===t&&(r!==n&&(t=t<=r?t:r),e!==n&&(t=t>=e?t:e)),t}function we(t,e,r,o,c,d){var w,C=e&y,A=e&l,R=e&f;if(r&&(w=c?r(t,o,c,d):r(t)),w!==n)return w;if(!Lt(t))return t;var I=ft(t);if(I){if(w=Cp(t),!C)return ne(t,w)}else{var N=Vt(t),K=N==bt||N==Xt;if(sn(t))return Wa(t,C);if(N==ue||N==F||K&&!c){if(w=A||K?{}:ou(t),!C)return A?lp(t,Ul(w,t)):hp(t,ya(w,t))}else{if(!Tt[N])return c?t:{};w=kp(t,N,C)}}d||(d=new Te);var Y=d.get(t);if(Y)return Y;d.set(t,w),Uu(t)?t.forEach(function(it){w.add(we(it,e,r,it,t,d))}):Nu(t)&&t.forEach(function(it,gt){w.set(gt,we(it,e,r,gt,t,d))});var rt=R?A?ms:ys:A?ie:qt,pt=I?n:rt(t);return ye(pt||t,function(it,gt){pt&&(gt=it,it=t[gt]),Jn(w,gt,we(it,e,r,gt,t,d))}),w}function Dl(t){var e=qt(t);return function(r){return ma(r,t,e)}}function ma(t,e,r){var o=r.length;if(t==null)return!o;for(t=Et(t);o--;){var c=r[o],d=e[c],w=t[c];if(w===n&&!(c in t)||!d(w))return!1}return!0}function _a(t,e,r){if(typeof t!="function")throw new me(m);return er(function(){t.apply(n,r)},e)}function Vn(t,e,r,o){var c=-1,d=yr,w=!0,C=t.length,A=[],R=e.length;if(!C)return A;r&&(e=It(e,fe(r))),o?(d=Fi,w=!1):e.length>=u&&(d=Kn,w=!1,e=new hn(e));t:for(;++c<C;){var I=t[c],N=r==null?I:r(I);if(I=o||I!==0?I:0,w&&N===N){for(var K=R;K--;)if(e[K]===N)continue t;A.push(I)}else d(e,N,o)||A.push(I)}return A}var tn=za(Ue),wa=za(ts,!0);function Pl(t,e){var r=!0;return tn(t,function(o,c,d){return r=!!e(o,c,d),r}),r}function Ur(t,e,r){for(var o=-1,c=t.length;++o<c;){var d=t[o],w=e(d);if(w!=null&&(C===n?w===w&&!le(w):r(w,C)))var C=w,A=d}return A}function Fl(t,e,r,o){var c=t.length;for(r=lt(r),r<0&&(r=-r>c?0:c+r),o=o===n||o>c?c:lt(o),o<0&&(o+=c),o=r>o?0:Pu(o);r<o;)t[r++]=e;return t}function ba(t,e){var r=[];return tn(t,function(o,c,d){e(o,c,d)&&r.push(o)}),r}function $t(t,e,r,o,c){var d=-1,w=t.length;for(r||(r=Ep),c||(c=[]);++d<w;){var C=t[d];e>0&&r(C)?e>1?$t(C,e-1,r,o,c):je(c,C):o||(c[c.length]=C)}return c}var Qi=Xa(),Sa=Xa(!0);function Ue(t,e){return t&&Qi(t,e,qt)}function ts(t,e){return t&&Sa(t,e,qt)}function Dr(t,e){return Ye(e,function(r){return ze(t[r])})}function pn(t,e){e=nn(e,t);for(var r=0,o=e.length;t!=null&&r<o;)t=t[Pe(e[r++])];return r&&r==o?t:n}function Ca(t,e,r){var o=e(t);return ft(t)?o:je(o,r(t))}function Zt(t){return t==null?t===n?qn:Fn:cn&&cn in Et(t)?wp(t):Np(t)}function es(t,e){return t>e}function Ml(t,e){return t!=null&&Ct.call(t,e)}function ql(t,e){return t!=null&&e in Et(t)}function Wl(t,e,r){return t>=Jt(e,r)&&t<Ft(e,r)}function ns(t,e,r){for(var o=r?Fi:yr,c=t[0].length,d=t.length,w=d,C=T(d),A=1/0,R=[];w--;){var I=t[w];w&&e&&(I=It(I,fe(e))),A=Jt(I.length,A),C[w]=!r&&(e||c>=120&&I.length>=120)?new hn(w&&I):n}I=t[0];var N=-1,K=C[0];t:for(;++N<c&&R.length<A;){var Y=I[N],rt=e?e(Y):Y;if(Y=r||Y!==0?Y:0,!(K?Kn(K,rt):o(R,rt,r))){for(w=d;--w;){var pt=C[w];if(!(pt?Kn(pt,rt):o(t[w],rt,r)))continue t}K&&K.push(rt),R.push(Y)}}return R}function Kl(t,e,r,o){return Ue(t,function(c,d,w){e(o,r(c),d,w)}),o}function Yn(t,e,r){e=nn(e,t),t=fu(t,e);var o=t==null?t:t[Pe(Se(e))];return o==null?n:ce(o,t,r)}function ka(t){return Nt(t)&&Zt(t)==F}function Hl(t){return Nt(t)&&Zt(t)==Ve}function $l(t){return Nt(t)&&Zt(t)==tt}function jn(t,e,r,o,c){return t===e?!0:t==null||e==null||!Nt(t)&&!Nt(e)?t!==t&&e!==e:Gl(t,e,r,o,jn,c)}function Gl(t,e,r,o,c,d){var w=ft(t),C=ft(e),A=w?et:Vt(t),R=C?et:Vt(e);A=A==F?ue:A,R=R==F?ue:R;var I=A==ue,N=R==ue,K=A==R;if(K&&sn(t)){if(!sn(e))return!1;w=!0,I=!1}if(K&&!I)return d||(d=new Te),w||Ln(t)?ru(t,e,r,o,c,d):mp(t,e,A,r,o,c,d);if(!(r&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 Te),c(pt,it,r,o,d)}}return K?(d||(d=new Te),_p(t,e,r,o,c,d)):!1}function zl(t){return Nt(t)&&Vt(t)==Rt}function rs(t,e,r,o){var c=r.length,d=c,w=!o;if(t==null)return!d;for(t=Et(t);c--;){var C=r[c];if(w&&C[2]?C[1]!==t[C[0]]:!(C[0]in t))return!1}for(;++c<d;){C=r[c];var A=C[0],R=t[A],I=C[1];if(w&&C[2]){if(R===n&&!(A in t))return!1}else{var N=new Te;if(o)var K=o(R,I,A,t,e,N);if(!(K===n?jn(I,R,b|E,o,N):K))return!1}}return!0}function Aa(t){if(!Lt(t)||xp(t))return!1;var e=ze(t)?zh:Df;return e.test(gn(t))}function Xl(t){return Nt(t)&&Zt(t)==Yt}function Jl(t){return Nt(t)&&Vt(t)==jt}function Vl(t){return Nt(t)&&Qr(t.length)&&!!xt[Zt(t)]}function Ea(t){return typeof t=="function"?t:t==null?se:typeof t=="object"?ft(t)?Oa(t[0],t[1]):xa(t):Ju(t)}function is(t){if(!tr(t))return Zh(t);var e=[];for(var r in Et(t))Ct.call(t,r)&&r!="constructor"&&e.push(r);return e}function Yl(t){if(!Lt(t))return Lp(t);var e=tr(t),r=[];for(var o in t)o=="constructor"&&(e||!Ct.call(t,o))||r.push(o);return r}function ss(t,e){return t<e}function Ta(t,e){var r=-1,o=re(t)?T(t.length):[];return tn(t,function(c,d,w){o[++r]=e(c,d,w)}),o}function xa(t){var e=ws(t);return e.length==1&&e[0][2]?uu(e[0][0],e[0][1]):function(r){return r===t||rs(r,t,e)}}function Oa(t,e){return Ss(t)&&au(e)?uu(Pe(t),e):function(r){var o=Ls(r,t);return o===n&&o===e?Ns(r,t):jn(e,o,b|E)}}function Pr(t,e,r,o,c){t!==e&&Qi(e,function(d,w){if(c||(c=new Te),Lt(d))jl(t,e,w,r,Pr,o,c);else{var C=o?o(ks(t,w),d,w+"",t,e,c):n;C===n&&(C=d),ji(t,w,C)}},ie)}function jl(t,e,r,o,c,d,w){var C=ks(t,r),A=ks(e,r),R=w.get(A);if(R){ji(t,r,R);return}var I=d?d(C,A,r+"",t,e,w):n,N=I===n;if(N){var K=ft(A),Y=!K&&sn(A),rt=!K&&!Y&&Ln(A);I=A,K||Y||rt?ft(C)?I=C:Bt(C)?I=ne(C):Y?(N=!1,I=Wa(A,!0)):rt?(N=!1,I=Ka(A,!0)):I=[]:nr(A)||vn(A)?(I=C,vn(C)?I=Fu(C):(!Lt(C)||ze(C))&&(I=ou(A))):N=!1}N&&(w.set(A,I),c(I,A,o,d,w),w.delete(A)),ji(t,r,I)}function Ra(t,e){var r=t.length;if(r)return e+=e<0?r:0,Ge(e,r)?t[e]:n}function Ia(t,e,r){e.length?e=It(e,function(d){return ft(d)?function(w){return pn(w,d.length===1?d[0]:d)}:d}):e=[se];var o=-1;e=It(e,fe(nt()));var c=Ta(t,function(d,w,C){var A=It(e,function(R){return R(d)});return{criteria:A,index:++o,value:d}});return kh(c,function(d,w){return fp(d,w,r)})}function Zl(t,e){return La(t,e,function(r,o){return Ns(t,o)})}function La(t,e,r){for(var o=-1,c=e.length,d={};++o<c;){var w=e[o],C=pn(t,w);r(C,w)&&Zn(d,nn(w,t),C)}return d}function Ql(t){return function(e){return pn(e,t)}}function os(t,e,r,o){var c=o?Ch:bn,d=-1,w=e.length,C=t;for(t===e&&(e=ne(e)),r&&(C=It(t,fe(r)));++d<w;)for(var A=0,R=e[d],I=r?r(R):R;(A=c(C,I,A,o))>-1;)C!==t&&Tr.call(C,A,1),Tr.call(t,A,1);return t}function Na(t,e){for(var r=t?e.length:0,o=r-1;r--;){var c=e[r];if(r==o||c!==d){var d=c;Ge(c)?Tr.call(t,c,1):fs(t,c)}}return t}function as(t,e){return t+Rr(pa()*(e-t+1))}function tp(t,e,r,o){for(var c=-1,d=Ft(Or((e-t)/(r||1)),0),w=T(d);d--;)w[o?d:++c]=t,t+=r;return w}function us(t,e){var r="";if(!t||e<1||e>ut)return r;do e%2&&(r+=t),e=Rr(e/2),e&&(t+=t);while(e);return r}function dt(t,e){return As(cu(t,e,se),t+"")}function ep(t){return va(Nn(t))}function np(t,e){var r=Nn(t);return Xr(r,ln(e,0,r.length))}function Zn(t,e,r,o){if(!Lt(t))return t;e=nn(e,t);for(var c=-1,d=e.length,w=d-1,C=t;C!=null&&++c<d;){var A=Pe(e[c]),R=r;if(A==="__proto__"||A==="constructor"||A==="prototype")return t;if(c!=w){var I=C[A];R=o?o(I,A,C):n,R===n&&(R=Lt(I)?I:Ge(e[c+1])?[]:{})}Jn(C,A,R),C=C[A]}return t}var Ba=Ir?function(t,e){return Ir.set(t,e),t}:se,rp=xr?function(t,e){return xr(t,"toString",{configurable:!0,enumerable:!1,value:Us(e),writable:!0})}:se;function ip(t){return Xr(Nn(t))}function be(t,e,r){var o=-1,c=t.length;e<0&&(e=-e>c?0:c+e),r=r>c?c:r,r<0&&(r+=c),c=e>r?0:r-e>>>0,e>>>=0;for(var d=T(c);++o<c;)d[o]=t[o+e];return d}function sp(t,e){var r;return tn(t,function(o,c,d){return r=e(o,c,d),!r}),!!r}function Fr(t,e,r){var o=0,c=t==null?o:t.length;if(typeof e=="number"&&e===e&&c<=q){for(;o<c;){var d=o+c>>>1,w=t[d];w!==null&&!le(w)&&(r?w<=e:w<e)?o=d+1:c=d}return c}return cs(t,e,se,r)}function cs(t,e,r,o){var c=0,d=t==null?0:t.length;if(d===0)return 0;e=r(e);for(var w=e!==e,C=e===null,A=le(e),R=e===n;c<d;){var I=Rr((c+d)/2),N=r(t[I]),K=N!==n,Y=N===null,rt=N===N,pt=le(N);if(w)var it=o||rt;else R?it=rt&&(o||K):C?it=rt&&K&&(o||!Y):A?it=rt&&K&&!Y&&(o||!pt):Y||pt?it=!1:it=o?N<=e:N<e;it?c=I+1:d=I}return Jt(d,pr)}function Ua(t,e){for(var r=-1,o=t.length,c=0,d=[];++r<o;){var w=t[r],C=e?e(w):w;if(!r||!xe(C,A)){var A=C;d[c++]=w===0?0:w}}return d}function Da(t){return typeof t=="number"?t:le(t)?Le:+t}function he(t){if(typeof t=="string")return t;if(ft(t))return It(t,he)+"";if(le(t))return da?da.call(t):"";var e=t+"";return e=="0"&&1/t==-Ot?"-0":e}function en(t,e,r){var o=-1,c=yr,d=t.length,w=!0,C=[],A=C;if(r)w=!1,c=Fi;else if(d>=u){var R=e?null:vp(t);if(R)return _r(R);w=!1,c=Kn,A=new hn}else A=e?[]:C;t:for(;++o<d;){var I=t[o],N=e?e(I):I;if(I=r||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,r)||(A!==C&&A.push(N),C.push(I))}return C}function fs(t,e){return e=nn(e,t),t=fu(t,e),t==null||delete t[Pe(Se(e))]}function Pa(t,e,r,o){return Zn(t,e,r(pn(t,e)),o)}function Mr(t,e,r,o){for(var c=t.length,d=o?c:-1;(o?d--:++d<c)&&e(t[d],d,t););return r?be(t,o?0:d,o?d+1:c):be(t,o?d+1:0,o?c:d)}function Fa(t,e){var r=t;return r instanceof vt&&(r=r.value()),Mi(e,function(o,c){return c.func.apply(c.thisArg,je([o],c.args))},r)}function hs(t,e,r){var o=t.length;if(o<2)return o?en(t[0]):[];for(var c=-1,d=T(o);++c<o;)for(var w=t[c],C=-1;++C<o;)C!=c&&(d[c]=Vn(d[c]||w,t[C],e,r));return en($t(d,1),e,r)}function Ma(t,e,r){for(var o=-1,c=t.length,d=e.length,w={};++o<c;){var C=o<d?e[o]:n;r(w,t[o],C)}return w}function ls(t){return Bt(t)?t:[]}function ps(t){return typeof t=="function"?t:se}function nn(t,e){return ft(t)?t:Ss(t,e)?[t]:du(St(t))}var op=dt;function rn(t,e,r){var o=t.length;return r=r===n?o:r,!e&&r>=o?t:be(t,e,r)}var qa=Xh||function(t){return Ht.clearTimeout(t)};function Wa(t,e){if(e)return t.slice();var r=t.length,o=ua?ua(r):new t.constructor(r);return t.copy(o),o}function ds(t){var e=new t.constructor(t.byteLength);return new Ar(e).set(new Ar(t)),e}function ap(t,e){var r=e?ds(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.byteLength)}function up(t){var e=new t.constructor(t.source,ko.exec(t));return e.lastIndex=t.lastIndex,e}function cp(t){return Xn?Et(Xn.call(t)):{}}function Ka(t,e){var r=e?ds(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)}function Ha(t,e){if(t!==e){var r=t!==n,o=t===null,c=t===t,d=le(t),w=e!==n,C=e===null,A=e===e,R=le(e);if(!C&&!R&&!d&&t>e||d&&w&&A&&!C&&!R||o&&w&&A||!r&&A||!c)return 1;if(!o&&!d&&!R&&t<e||R&&r&&c&&!o&&!d||C&&r&&c||!w&&c||!A)return-1}return 0}function fp(t,e,r){for(var o=-1,c=t.criteria,d=e.criteria,w=c.length,C=r.length;++o<w;){var A=Ha(c[o],d[o]);if(A){if(o>=C)return A;var R=r[o];return A*(R=="desc"?-1:1)}}return t.index-e.index}function $a(t,e,r,o){for(var c=-1,d=t.length,w=r.length,C=-1,A=e.length,R=Ft(d-w,0),I=T(A+R),N=!o;++C<A;)I[C]=e[C];for(;++c<w;)(N||c<d)&&(I[r[c]]=t[c]);for(;R--;)I[C++]=t[c++];return I}function Ga(t,e,r,o){for(var c=-1,d=t.length,w=-1,C=r.length,A=-1,R=e.length,I=Ft(d-C,0),N=T(I+R),K=!o;++c<I;)N[c]=t[c];for(var Y=c;++A<R;)N[Y+A]=e[A];for(;++w<C;)(K||c<d)&&(N[Y+r[w]]=t[c++]);return N}function ne(t,e){var r=-1,o=t.length;for(e||(e=T(o));++r<o;)e[r]=t[r];return e}function De(t,e,r,o){var c=!r;r||(r={});for(var d=-1,w=e.length;++d<w;){var C=e[d],A=o?o(r[C],t[C],C,r,t):n;A===n&&(A=t[C]),c?Ke(r,C,A):Jn(r,C,A)}return r}function hp(t,e){return De(t,bs(t),e)}function lp(t,e){return De(t,iu(t),e)}function qr(t,e){return function(r,o){var c=ft(r)?yh:Bl,d=e?e():{};return c(r,t,nt(o,2),d)}}function On(t){return dt(function(e,r){var o=-1,c=r.length,d=c>1?r[c-1]:n,w=c>2?r[2]:n;for(d=t.length>3&&typeof d=="function"?(c--,d):n,w&&Qt(r[0],r[1],w)&&(d=c<3?n:d,c=1),e=Et(e);++o<c;){var C=r[o];C&&t(e,C,o,d)}return e})}function za(t,e){return function(r,o){if(r==null)return r;if(!re(r))return t(r,o);for(var c=r.length,d=e?c:-1,w=Et(r);(e?d--:++d<c)&&o(w[d],d,w)!==!1;);return r}}function Xa(t){return function(e,r,o){for(var c=-1,d=Et(e),w=o(e),C=w.length;C--;){var A=w[t?C:++c];if(r(d[A],A,d)===!1)break}return e}}function pp(t,e,r){var o=e&x,c=Qn(t);function d(){var w=this&&this!==Ht&&this instanceof d?c:t;return w.apply(o?r:this,arguments)}return d}function Ja(t){return function(e){e=St(e);var r=Sn(e)?Ee(e):n,o=r?r[0]:e.charAt(0),c=r?rn(r,1).join(""):e.slice(1);return o[t]()+c}}function Rn(t){return function(e){return Mi(zu(Gu(e).replace(rh,"")),t,"")}}function Qn(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 r=xn(t.prototype),o=t.apply(r,e);return Lt(o)?o:r}}function dp(t,e,r){var o=Qn(t);function c(){for(var d=arguments.length,w=T(d),C=d,A=In(c);C--;)w[C]=arguments[C];var R=d<3&&w[0]!==A&&w[d-1]!==A?[]:Ze(w,A);if(d-=R.length,d<r)return Qa(t,e,Wr,c.placeholder,n,w,R,n,n,r-d);var I=this&&this!==Ht&&this instanceof c?o:t;return ce(I,this,w)}return c}function Va(t){return function(e,r,o){var c=Et(e);if(!re(e)){var d=nt(r,3);e=qt(e),r=function(C){return d(c[C],C,c)}}var w=t(e,r,o);return w>-1?c[d?e[w]:w]:n}}function Ya(t){return $e(function(e){var r=e.length,o=r,c=_e.prototype.thru;for(t&&e.reverse();o--;){var d=e[o];if(typeof d!="function")throw new me(m);if(c&&!w&&Gr(d)=="wrapper")var w=new _e([],!0)}for(o=w?o:r;++o<r;){d=e[o];var C=Gr(d),A=C=="wrapper"?_s(d):n;A&&Cs(A[0])&&A[1]==(M|V|$|H)&&!A[4].length&&A[9]==1?w=w[Gr(A[0])].apply(w,A[3]):w=d.length==1&&Cs(d)?w[C]():w.thru(d)}return function(){var R=arguments,I=R[0];if(w&&R.length==1&&ft(I))return w.plant(I).value();for(var N=0,K=r?e[N].apply(this,R):I;++N<r;)K=e[N].call(this,K);return K}})}function Wr(t,e,r,o,c,d,w,C,A,R){var I=e&M,N=e&x,K=e&W,Y=e&(V|ot),rt=e&L,pt=K?n:Qn(t);function it(){for(var gt=arguments.length,mt=T(gt),pe=gt;pe--;)mt[pe]=arguments[pe];if(Y)var te=In(it),de=Eh(mt,te);if(o&&(mt=$a(mt,o,c,Y)),d&&(mt=Ga(mt,d,w,Y)),gt-=de,Y&><R){var Ut=Ze(mt,te);return Qa(t,e,Wr,it.placeholder,r,mt,Ut,C,A,R-gt)}var Oe=N?r:this,Je=K?Oe[t]:t;return gt=mt.length,C?mt=Bp(mt,C):rt&>>1&&mt.reverse(),I&&A<gt&&(mt.length=A),this&&this!==Ht&&this instanceof it&&(Je=pt||Qn(Je)),Je.apply(Oe,mt)}return it}function ja(t,e){return function(r,o){return Kl(r,t,e(o),{})}}function Kr(t,e){return function(r,o){var c;if(r===n&&o===n)return e;if(r!==n&&(c=r),o!==n){if(c===n)return o;typeof r=="string"||typeof o=="string"?(r=he(r),o=he(o)):(r=Da(r),o=Da(o)),c=t(r,o)}return c}}function gs(t){return $e(function(e){return e=It(e,fe(nt())),dt(function(r){var o=this;return t(e,function(c){return ce(c,o,r)})})})}function Hr(t,e){e=e===n?" ":he(e);var r=e.length;if(r<2)return r?us(e,t):e;var o=us(e,Or(t/Cn(e)));return Sn(e)?rn(Ee(o),0,t).join(""):o.slice(0,t)}function gp(t,e,r,o){var c=e&x,d=Qn(t);function w(){for(var C=-1,A=arguments.length,R=-1,I=o.length,N=T(I+A),K=this&&this!==Ht&&this instanceof w?d:t;++R<I;)N[R]=o[R];for(;A--;)N[R++]=arguments[++C];return ce(K,c?r:this,N)}return w}function Za(t){return function(e,r,o){return o&&typeof o!="number"&&Qt(e,r,o)&&(r=o=n),e=Xe(e),r===n?(r=e,e=0):r=Xe(r),o=o===n?e<r?1:-1:Xe(o),tp(e,r,o,t)}}function $r(t){return function(e,r){return typeof e=="string"&&typeof r=="string"||(e=Ce(e),r=Ce(r)),t(e,r)}}function Qa(t,e,r,o,c,d,w,C,A,R){var I=e&V,N=I?w:n,K=I?n:w,Y=I?d:n,rt=I?n:d;e|=I?$:D,e&=~(I?D:$),e&st||(e&=~(x|W));var pt=[t,e,c,Y,N,rt,K,C,A,R],it=r.apply(n,pt);return Cs(t)&&hu(it,pt),it.placeholder=o,lu(it,t,e)}function vs(t){var e=Pt[t];return function(r,o){if(r=Ce(r),o=o==null?0:Jt(lt(o),292),o&&la(r)){var c=(St(r)+"e").split("e"),d=e(c[0]+"e"+(+c[1]+o));return c=(St(d)+"e").split("e"),+(c[0]+"e"+(+c[1]-o))}return e(r)}}var vp=En&&1/_r(new En([,-0]))[1]==Ot?function(t){return new En(t)}:Fs;function tu(t){return function(e){var r=Vt(e);return r==Rt?zi(e):r==jt?Nh(e):Ah(e,t(e))}}function He(t,e,r,o,c,d,w,C){var A=e&W;if(!A&&typeof t!="function")throw new me(m);var R=o?o.length:0;if(R||(e&=~($|D),o=c=n),w=w===n?w:Ft(lt(w),0),C=C===n?C:lt(C),R-=c?c.length:0,e&D){var I=o,N=c;o=c=n}var K=A?n:_s(t),Y=[t,e,r,o,c,I,N,d,w,C];if(K&&Ip(Y,K),t=Y[0],e=Y[1],r=Y[2],o=Y[3],c=Y[4],C=Y[9]=Y[9]===n?A?0:t.length:Ft(Y[9]-R,0),!C&&e&(V|ot)&&(e&=~(V|ot)),!e||e==x)var rt=pp(t,e,r);else e==V||e==ot?rt=dp(t,e,C):(e==$||e==(x|$))&&!c.length?rt=gp(t,e,r,o):rt=Wr.apply(n,Y);var pt=K?Ba:hu;return lu(pt(rt,Y),t,e)}function eu(t,e,r,o){return t===n||xe(t,An[r])&&!Ct.call(o,r)?e:t}function nu(t,e,r,o,c,d){return Lt(t)&&Lt(e)&&(d.set(e,t),Pr(t,e,n,nu,d),d.delete(e)),t}function yp(t){return nr(t)?n:t}function ru(t,e,r,o,c,d){var w=r&b,C=t.length,A=e.length;if(C!=A&&!(w&&A>C))return!1;var R=d.get(t),I=d.get(e);if(R&&I)return R==e&&I==t;var N=-1,K=!0,Y=r&E?new hn:n;for(d.set(t,e),d.set(e,t);++N<C;){var rt=t[N],pt=e[N];if(o)var it=w?o(pt,rt,N,e,t,d):o(rt,pt,N,t,e,d);if(it!==n){if(it)continue;K=!1;break}if(Y){if(!qi(e,function(gt,mt){if(!Kn(Y,mt)&&(rt===gt||c(rt,gt,r,o,d)))return Y.push(mt)})){K=!1;break}}else if(!(rt===pt||c(rt,pt,r,o,d))){K=!1;break}}return d.delete(t),d.delete(e),K}function mp(t,e,r,o,c,d,w){switch(r){case _n:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case Ve:return!(t.byteLength!=e.byteLength||!d(new Ar(t),new Ar(e)));case Z:case tt:case Ae:return xe(+t,+e);case at:return t.name==e.name&&t.message==e.message;case Yt:case Ne:return t==e+"";case Rt:var C=zi;case jt:var A=o&b;if(C||(C=_r),t.size!=e.size&&!A)return!1;var R=w.get(t);if(R)return R==e;o|=E,w.set(t,e);var I=ru(C(t),C(e),o,c,d,w);return w.delete(t),I;case Be:if(Xn)return Xn.call(t)==Xn.call(e)}return!1}function _p(t,e,r,o,c,d){var w=r&b,C=ys(t),A=C.length,R=ys(e),I=R.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],mt=e[K];if(o)var pe=w?o(mt,gt,K,e,t,d):o(gt,mt,K,t,e,d);if(!(pe===n?gt===mt||c(gt,mt,r,o,d):pe)){pt=!1;break}it||(it=K=="constructor")}if(pt&&!it){var te=t.constructor,de=e.constructor;te!=de&&"constructor"in t&&"constructor"in e&&!(typeof te=="function"&&te instanceof te&&typeof de=="function"&&de instanceof de)&&(pt=!1)}return d.delete(t),d.delete(e),pt}function $e(t){return As(cu(t,n,mu),t+"")}function ys(t){return Ca(t,qt,bs)}function ms(t){return Ca(t,ie,iu)}var _s=Ir?function(t){return Ir.get(t)}:Fs;function Gr(t){for(var e=t.name+"",r=Tn[e],o=Ct.call(Tn,e)?r.length:0;o--;){var c=r[o],d=c.func;if(d==null||d==t)return c.name}return e}function In(t){var e=Ct.call(p,"placeholder")?p:t;return e.placeholder}function nt(){var t=p.iteratee||Ds;return t=t===Ds?Ea:t,arguments.length?t(arguments[0],arguments[1]):t}function zr(t,e){var r=t.__data__;return Tp(e)?r[typeof e=="string"?"string":"hash"]:r.map}function ws(t){for(var e=qt(t),r=e.length;r--;){var o=e[r],c=t[o];e[r]=[o,c,au(c)]}return e}function dn(t,e){var r=Rh(t,e);return Aa(r)?r:n}function wp(t){var e=Ct.call(t,cn),r=t[cn];try{t[cn]=n;var o=!0}catch{}var c=Cr.call(t);return o&&(e?t[cn]=r:delete t[cn]),c}var bs=Ji?function(t){return t==null?[]:(t=Et(t),Ye(Ji(t),function(e){return fa.call(t,e)}))}:Ms,iu=Ji?function(t){for(var e=[];t;)je(e,bs(t)),t=Er(t);return e}:Ms,Vt=Zt;(Vi&&Vt(new Vi(new ArrayBuffer(1)))!=_n||$n&&Vt(new $n)!=Rt||Yi&&Vt(Yi.resolve())!=mn||En&&Vt(new En)!=jt||Gn&&Vt(new Gn)!=Me)&&(Vt=function(t){var e=Zt(t),r=e==ue?t.constructor:n,o=r?gn(r):"";if(o)switch(o){case nl:return _n;case rl:return Rt;case il:return mn;case sl:return jt;case ol:return Me}return e});function bp(t,e,r){for(var o=-1,c=r.length;++o<c;){var d=r[o],w=d.size;switch(d.type){case"drop":t+=w;break;case"dropRight":e-=w;break;case"take":e=Jt(e,t+w);break;case"takeRight":t=Ft(t,e-w);break}}return{start:t,end:e}}function Sp(t){var e=t.match(xf);return e?e[1].split(Of):[]}function su(t,e,r){e=nn(e,t);for(var o=-1,c=e.length,d=!1;++o<c;){var w=Pe(e[o]);if(!(d=t!=null&&r(t,w)))break;t=t[w]}return d||++o!=c?d:(c=t==null?0:t.length,!!c&&Qr(c)&&Ge(w,c)&&(ft(t)||vn(t)))}function Cp(t){var e=t.length,r=new t.constructor(e);return e&&typeof t[0]=="string"&&Ct.call(t,"index")&&(r.index=t.index,r.input=t.input),r}function ou(t){return typeof t.constructor=="function"&&!tr(t)?xn(Er(t)):{}}function kp(t,e,r){var o=t.constructor;switch(e){case Ve:return ds(t);case Z:case tt:return new o(+t);case _n:return ap(t,r);case wi:case bi:case Si:case Ci:case ki:case Ai:case Ei:case Ti:case xi:return Ka(t,r);case Rt:return new o;case Ae:case Ne:return new o(t);case Yt:return up(t);case jt:return new o;case Be:return cp(t)}}function Ap(t,e){var r=e.length;if(!r)return t;var o=r-1;return e[o]=(r>1?"& ":"")+e[o],e=e.join(r>2?", ":" "),t.replace(Tf,`{
|
|
13
|
+
*/rr.exports,function(a,i){(function(){var n,s="4.17.21",u=200,h="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,f=4,b=1,E=2,x=1,W=2,st=4,V=8,ot=16,$=32,D=64,M=128,H=256,L=512,U=30,X="...",Q=800,j=16,B=1,kt=2,At=3,Rt=1/0,ut=9007199254740991,zt=17976931348623157e292,Le=NaN,ae=4294967295,pr=ae-1,q=ae>>>1,J=[["ary",M],["bind",x],["bindKey",W],["curry",V],["curryRight",ot],["flip",L],["partial",$],["partialRight",D],["rearg",H]],F="[object Arguments]",et="[object Array]",P="[object AsyncFunction]",Z="[object Boolean]",tt="[object Date]",z="[object DOMException]",at="[object Error]",bt="[object Function]",Xt="[object GeneratorFunction]",Ot="[object Map]",Ae="[object Number]",Fn="[object Null]",ue="[object Object]",mn="[object Promise]",Mn="[object Proxy]",Yt="[object RegExp]",jt="[object Set]",Ne="[object String]",Be="[object Symbol]",qn="[object Undefined]",Me="[object WeakMap]",Wn="[object WeakSet]",Ve="[object ArrayBuffer]",_n="[object DataView]",wi="[object Float32Array]",bi="[object Float64Array]",Si="[object Int8Array]",Ci="[object Int16Array]",ki="[object Int32Array]",Ai="[object Uint8Array]",Ei="[object Uint8ClampedArray]",Ti="[object Uint16Array]",xi="[object Uint32Array]",gf=/\b__p \+= '';/g,vf=/\b(__p \+=) '' \+/g,yf=/(__e\(.*?\)|\b__t\)) \+\n'';/g,bo=/&(?:amp|lt|gt|quot|#39);/g,So=/[&<>"']/g,mf=RegExp(bo.source),_f=RegExp(So.source),wf=/<%-([\s\S]+?)%>/g,bf=/<%([\s\S]+?)%>/g,Co=/<%=([\s\S]+?)%>/g,Sf=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Cf=/^\w*$/,kf=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Ri=/[\\^$.*+?()[\]{}|]/g,Af=RegExp(Ri.source),Oi=/^\s+/,Ef=/\s/,Tf=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,xf=/\{\n\/\* \[wrapped with (.+)\] \*/,Rf=/,? & /,Of=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,If=/[()=,{}\[\]\/\s]/,Lf=/\\(\\)?/g,Nf=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,ko=/\w*$/,Bf=/^[-+]0x[0-9a-f]+$/i,Uf=/^0b[01]+$/i,Df=/^\[object .+?Constructor\]$/,Pf=/^0o[0-7]+$/i,Ff=/^(?:0|[1-9]\d*)$/,Mf=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,dr=/($^)/,qf=/['\n\r\u2028\u2029\\]/g,gr="\\ud800-\\udfff",Wf="\\u0300-\\u036f",Kf="\\ufe20-\\ufe2f",Hf="\\u20d0-\\u20ff",Ao=Wf+Kf+Hf,Eo="\\u2700-\\u27bf",To="a-z\\xdf-\\xf6\\xf8-\\xff",$f="\\xac\\xb1\\xd7\\xf7",Gf="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",zf="\\u2000-\\u206f",Xf=" \\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",xo="A-Z\\xc0-\\xd6\\xd8-\\xde",Ro="\\ufe0e\\ufe0f",Oo=$f+Gf+zf+Xf,Ii="['’]",Jf="["+gr+"]",Io="["+Oo+"]",vr="["+Ao+"]",Lo="\\d+",Vf="["+Eo+"]",No="["+To+"]",Bo="[^"+gr+Oo+Lo+Eo+To+xo+"]",Li="\\ud83c[\\udffb-\\udfff]",Yf="(?:"+vr+"|"+Li+")",Uo="[^"+gr+"]",Ni="(?:\\ud83c[\\udde6-\\uddff]){2}",Bi="[\\ud800-\\udbff][\\udc00-\\udfff]",wn="["+xo+"]",Do="\\u200d",Po="(?:"+No+"|"+Bo+")",jf="(?:"+wn+"|"+Bo+")",Fo="(?:"+Ii+"(?:d|ll|m|re|s|t|ve))?",Mo="(?:"+Ii+"(?:D|LL|M|RE|S|T|VE))?",qo=Yf+"?",Wo="["+Ro+"]?",Zf="(?:"+Do+"(?:"+[Uo,Ni,Bi].join("|")+")"+Wo+qo+")*",Qf="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",th="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Ko=Wo+qo+Zf,eh="(?:"+[Vf,Ni,Bi].join("|")+")"+Ko,nh="(?:"+[Uo+vr+"?",vr,Ni,Bi,Jf].join("|")+")",rh=RegExp(Ii,"g"),ih=RegExp(vr,"g"),Ui=RegExp(Li+"(?="+Li+")|"+nh+Ko,"g"),sh=RegExp([wn+"?"+No+"+"+Fo+"(?="+[Io,wn,"$"].join("|")+")",jf+"+"+Mo+"(?="+[Io,wn+Po,"$"].join("|")+")",wn+"?"+Po+"+"+Fo,wn+"+"+Mo,th,Qf,Lo,eh].join("|"),"g"),oh=RegExp("["+Do+gr+Ao+Ro+"]"),ah=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,uh=["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"],ch=-1,xt={};xt[wi]=xt[bi]=xt[Si]=xt[Ci]=xt[ki]=xt[Ai]=xt[Ei]=xt[Ti]=xt[xi]=!0,xt[F]=xt[et]=xt[Ve]=xt[Z]=xt[_n]=xt[tt]=xt[at]=xt[bt]=xt[Ot]=xt[Ae]=xt[ue]=xt[Yt]=xt[jt]=xt[Ne]=xt[Me]=!1;var Tt={};Tt[F]=Tt[et]=Tt[Ve]=Tt[_n]=Tt[Z]=Tt[tt]=Tt[wi]=Tt[bi]=Tt[Si]=Tt[Ci]=Tt[ki]=Tt[Ot]=Tt[Ae]=Tt[ue]=Tt[Yt]=Tt[jt]=Tt[Ne]=Tt[Be]=Tt[Ai]=Tt[Ei]=Tt[Ti]=Tt[xi]=!0,Tt[at]=Tt[bt]=Tt[Me]=!1;var fh={À:"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"},hh={"&":"&","<":"<",">":">",'"':""","'":"'"},lh={"&":"&","<":"<",">":">",""":'"',"'":"'"},ph={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},dh=parseFloat,gh=parseInt,Ho=typeof Wt=="object"&&Wt&&Wt.Object===Object&&Wt,vh=typeof self=="object"&&self&&self.Object===Object&&self,Ht=Ho||vh||Function("return this")(),Di=i&&!i.nodeType&&i,un=Di&&!0&&a&&!a.nodeType&&a,$o=un&&un.exports===Di,Pi=$o&&Ho.process,ve=function(){try{var k=un&&un.require&&un.require("util").types;return k||Pi&&Pi.binding&&Pi.binding("util")}catch{}}(),Go=ve&&ve.isArrayBuffer,zo=ve&&ve.isDate,Xo=ve&&ve.isMap,Jo=ve&&ve.isRegExp,Vo=ve&&ve.isSet,Yo=ve&&ve.isTypedArray;function ce(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 yh(k,R,T,G){for(var ct=-1,_t=k==null?0:k.length;++ct<_t;){var Pt=k[ct];R(G,Pt,T(Pt),k)}return G}function ye(k,R){for(var T=-1,G=k==null?0:k.length;++T<G&&R(k[T],T,k)!==!1;);return k}function mh(k,R){for(var T=k==null?0:k.length;T--&&R(k[T],T,k)!==!1;);return k}function jo(k,R){for(var T=-1,G=k==null?0:k.length;++T<G;)if(!R(k[T],T,k))return!1;return!0}function Ye(k,R){for(var T=-1,G=k==null?0:k.length,ct=0,_t=[];++T<G;){var Pt=k[T];R(Pt,T,k)&&(_t[ct++]=Pt)}return _t}function yr(k,R){var T=k==null?0:k.length;return!!T&&bn(k,R,0)>-1}function Fi(k,R,T){for(var G=-1,ct=k==null?0:k.length;++G<ct;)if(T(R,k[G]))return!0;return!1}function It(k,R){for(var T=-1,G=k==null?0:k.length,ct=Array(G);++T<G;)ct[T]=R(k[T],T,k);return ct}function je(k,R){for(var T=-1,G=R.length,ct=k.length;++T<G;)k[ct+T]=R[T];return k}function Mi(k,R,T,G){var ct=-1,_t=k==null?0:k.length;for(G&&_t&&(T=k[++ct]);++ct<_t;)T=R(T,k[ct],ct,k);return T}function _h(k,R,T,G){var ct=k==null?0:k.length;for(G&&ct&&(T=k[--ct]);ct--;)T=R(T,k[ct],ct,k);return T}function qi(k,R){for(var T=-1,G=k==null?0:k.length;++T<G;)if(R(k[T],T,k))return!0;return!1}var wh=Wi("length");function bh(k){return k.split("")}function Sh(k){return k.match(Of)||[]}function Zo(k,R,T){var G;return T(k,function(ct,_t,Pt){if(R(ct,_t,Pt))return G=_t,!1}),G}function mr(k,R,T,G){for(var ct=k.length,_t=T+(G?1:-1);G?_t--:++_t<ct;)if(R(k[_t],_t,k))return _t;return-1}function bn(k,R,T){return R===R?Bh(k,R,T):mr(k,Qo,T)}function Ch(k,R,T,G){for(var ct=T-1,_t=k.length;++ct<_t;)if(G(k[ct],R))return ct;return-1}function Qo(k){return k!==k}function ta(k,R){var T=k==null?0:k.length;return T?Hi(k,R)/T:Le}function Wi(k){return function(R){return R==null?n:R[k]}}function Ki(k){return function(R){return k==null?n:k[R]}}function ea(k,R,T,G,ct){return ct(k,function(_t,Pt,Et){T=G?(G=!1,_t):R(T,_t,Pt,Et)}),T}function kh(k,R){var T=k.length;for(k.sort(R);T--;)k[T]=k[T].value;return k}function Hi(k,R){for(var T,G=-1,ct=k.length;++G<ct;){var _t=R(k[G]);_t!==n&&(T=T===n?_t:T+_t)}return T}function $i(k,R){for(var T=-1,G=Array(k);++T<k;)G[T]=R(T);return G}function Ah(k,R){return It(R,function(T){return[T,k[T]]})}function na(k){return k&&k.slice(0,oa(k)+1).replace(Oi,"")}function fe(k){return function(R){return k(R)}}function Gi(k,R){return It(R,function(T){return k[T]})}function Kn(k,R){return k.has(R)}function ra(k,R){for(var T=-1,G=k.length;++T<G&&bn(R,k[T],0)>-1;);return T}function ia(k,R){for(var T=k.length;T--&&bn(R,k[T],0)>-1;);return T}function Eh(k,R){for(var T=k.length,G=0;T--;)k[T]===R&&++G;return G}var Th=Ki(fh),xh=Ki(hh);function Rh(k){return"\\"+ph[k]}function Oh(k,R){return k==null?n:k[R]}function Sn(k){return oh.test(k)}function Ih(k){return ah.test(k)}function Lh(k){for(var R,T=[];!(R=k.next()).done;)T.push(R.value);return T}function zi(k){var R=-1,T=Array(k.size);return k.forEach(function(G,ct){T[++R]=[ct,G]}),T}function sa(k,R){return function(T){return k(R(T))}}function Ze(k,R){for(var T=-1,G=k.length,ct=0,_t=[];++T<G;){var Pt=k[T];(Pt===R||Pt===_)&&(k[T]=_,_t[ct++]=T)}return _t}function _r(k){var R=-1,T=Array(k.size);return k.forEach(function(G){T[++R]=G}),T}function Nh(k){var R=-1,T=Array(k.size);return k.forEach(function(G){T[++R]=[G,G]}),T}function Bh(k,R,T){for(var G=T-1,ct=k.length;++G<ct;)if(k[G]===R)return G;return-1}function Uh(k,R,T){for(var G=T+1;G--;)if(k[G]===R)return G;return G}function Cn(k){return Sn(k)?Ph(k):wh(k)}function Ee(k){return Sn(k)?Fh(k):bh(k)}function oa(k){for(var R=k.length;R--&&Ef.test(k.charAt(R)););return R}var Dh=Ki(lh);function Ph(k){for(var R=Ui.lastIndex=0;Ui.test(k);)++R;return R}function Fh(k){return k.match(Ui)||[]}function Mh(k){return k.match(sh)||[]}var qh=function k(R){R=R==null?Ht:kn.defaults(Ht.Object(),R,kn.pick(Ht,uh));var T=R.Array,G=R.Date,ct=R.Error,_t=R.Function,Pt=R.Math,Et=R.Object,Xi=R.RegExp,Wh=R.String,me=R.TypeError,wr=T.prototype,Kh=_t.prototype,An=Et.prototype,br=R["__core-js_shared__"],Sr=Kh.toString,Ct=An.hasOwnProperty,Hh=0,aa=function(){var t=/[^.]+$/.exec(br&&br.keys&&br.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}(),Cr=An.toString,$h=Sr.call(Et),Gh=Ht._,zh=Xi("^"+Sr.call(Ct).replace(Ri,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),kr=$o?R.Buffer:n,Qe=R.Symbol,Ar=R.Uint8Array,ua=kr?kr.allocUnsafe:n,Er=sa(Et.getPrototypeOf,Et),ca=Et.create,fa=An.propertyIsEnumerable,Tr=wr.splice,ha=Qe?Qe.isConcatSpreadable:n,Hn=Qe?Qe.iterator:n,cn=Qe?Qe.toStringTag:n,xr=function(){try{var t=dn(Et,"defineProperty");return t({},"",{}),t}catch{}}(),Xh=R.clearTimeout!==Ht.clearTimeout&&R.clearTimeout,Jh=G&&G.now!==Ht.Date.now&&G.now,Vh=R.setTimeout!==Ht.setTimeout&&R.setTimeout,Rr=Pt.ceil,Or=Pt.floor,Ji=Et.getOwnPropertySymbols,Yh=kr?kr.isBuffer:n,la=R.isFinite,jh=wr.join,Zh=sa(Et.keys,Et),Ft=Pt.max,Jt=Pt.min,Qh=G.now,tl=R.parseInt,pa=Pt.random,el=wr.reverse,Vi=dn(R,"DataView"),$n=dn(R,"Map"),Yi=dn(R,"Promise"),En=dn(R,"Set"),Gn=dn(R,"WeakMap"),zn=dn(Et,"create"),Ir=Gn&&new Gn,Tn={},nl=gn(Vi),rl=gn($n),il=gn(Yi),sl=gn(En),ol=gn(Gn),Lr=Qe?Qe.prototype:n,Xn=Lr?Lr.valueOf:n,da=Lr?Lr.toString:n;function p(t){if(Nt(t)&&!ft(t)&&!(t instanceof vt)){if(t instanceof _e)return t;if(Ct.call(t,"__wrapped__"))return gu(t)}return new _e(t)}var xn=function(){function t(){}return function(e){if(!Lt(e))return{};if(ca)return ca(e);t.prototype=e;var r=new t;return t.prototype=n,r}}();function Nr(){}function _e(t,e){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!e,this.__index__=0,this.__values__=n}p.templateSettings={escape:wf,evaluate:bf,interpolate:Co,variable:"",imports:{_:p}},p.prototype=Nr.prototype,p.prototype.constructor=p,_e.prototype=xn(Nr.prototype),_e.prototype.constructor=_e;function vt(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=ae,this.__views__=[]}function al(){var t=new vt(this.__wrapped__);return t.__actions__=re(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=re(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=re(this.__views__),t}function ul(){if(this.__filtered__){var t=new vt(this);t.__dir__=-1,t.__filtered__=!0}else t=this.clone(),t.__dir__*=-1;return t}function cl(){var t=this.__wrapped__.value(),e=this.__dir__,r=ft(t),o=e<0,c=r?t.length:0,d=bp(0,c,this.__views__),w=d.start,C=d.end,A=C-w,O=o?C:w-1,I=this.__iteratees__,N=I.length,K=0,Y=Jt(A,this.__takeCount__);if(!r||!o&&c==A&&Y==A)return Fa(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],mt=gt.iteratee,pe=gt.type,te=mt(it);if(pe==kt)it=te;else if(!te){if(pe==B)continue t;break t}}rt[K++]=it}return rt}vt.prototype=xn(Nr.prototype),vt.prototype.constructor=vt;function fn(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var o=t[e];this.set(o[0],o[1])}}function fl(){this.__data__=zn?zn(null):{},this.size=0}function hl(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}function ll(t){var e=this.__data__;if(zn){var r=e[t];return r===S?n:r}return Ct.call(e,t)?e[t]:n}function pl(t){var e=this.__data__;return zn?e[t]!==n:Ct.call(e,t)}function dl(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=zn&&e===n?S:e,this}fn.prototype.clear=fl,fn.prototype.delete=hl,fn.prototype.get=ll,fn.prototype.has=pl,fn.prototype.set=dl;function qe(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var o=t[e];this.set(o[0],o[1])}}function gl(){this.__data__=[],this.size=0}function vl(t){var e=this.__data__,r=Br(e,t);if(r<0)return!1;var o=e.length-1;return r==o?e.pop():Tr.call(e,r,1),--this.size,!0}function yl(t){var e=this.__data__,r=Br(e,t);return r<0?n:e[r][1]}function ml(t){return Br(this.__data__,t)>-1}function _l(t,e){var r=this.__data__,o=Br(r,t);return o<0?(++this.size,r.push([t,e])):r[o][1]=e,this}qe.prototype.clear=gl,qe.prototype.delete=vl,qe.prototype.get=yl,qe.prototype.has=ml,qe.prototype.set=_l;function We(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var o=t[e];this.set(o[0],o[1])}}function wl(){this.size=0,this.__data__={hash:new fn,map:new($n||qe),string:new fn}}function bl(t){var e=zr(this,t).delete(t);return this.size-=e?1:0,e}function Sl(t){return zr(this,t).get(t)}function Cl(t){return zr(this,t).has(t)}function kl(t,e){var r=zr(this,t),o=r.size;return r.set(t,e),this.size+=r.size==o?0:1,this}We.prototype.clear=wl,We.prototype.delete=bl,We.prototype.get=Sl,We.prototype.has=Cl,We.prototype.set=kl;function hn(t){var e=-1,r=t==null?0:t.length;for(this.__data__=new We;++e<r;)this.add(t[e])}function Al(t){return this.__data__.set(t,S),this}function El(t){return this.__data__.has(t)}hn.prototype.add=hn.prototype.push=Al,hn.prototype.has=El;function Te(t){var e=this.__data__=new qe(t);this.size=e.size}function Tl(){this.__data__=new qe,this.size=0}function xl(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r}function Rl(t){return this.__data__.get(t)}function Ol(t){return this.__data__.has(t)}function Il(t,e){var r=this.__data__;if(r instanceof qe){var o=r.__data__;if(!$n||o.length<u-1)return o.push([t,e]),this.size=++r.size,this;r=this.__data__=new We(o)}return r.set(t,e),this.size=r.size,this}Te.prototype.clear=Tl,Te.prototype.delete=xl,Te.prototype.get=Rl,Te.prototype.has=Ol,Te.prototype.set=Il;function ga(t,e){var r=ft(t),o=!r&&vn(t),c=!r&&!o&&sn(t),d=!r&&!o&&!c&&Ln(t),w=r||o||c||d,C=w?$i(t.length,Wh):[],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")||Ge(O,A)))&&C.push(O);return C}function va(t){var e=t.length;return e?t[as(0,e-1)]:n}function Ll(t,e){return Xr(re(t),ln(e,0,t.length))}function Nl(t){return Xr(re(t))}function ji(t,e,r){(r!==n&&!xe(t[e],r)||r===n&&!(e in t))&&Ke(t,e,r)}function Jn(t,e,r){var o=t[e];(!(Ct.call(t,e)&&xe(o,r))||r===n&&!(e in t))&&Ke(t,e,r)}function Br(t,e){for(var r=t.length;r--;)if(xe(t[r][0],e))return r;return-1}function Bl(t,e,r,o){return tn(t,function(c,d,w){e(o,c,r(c),w)}),o}function ya(t,e){return t&&De(e,qt(e),t)}function Ul(t,e){return t&&De(e,se(e),t)}function Ke(t,e,r){e=="__proto__"&&xr?xr(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r}function Zi(t,e){for(var r=-1,o=e.length,c=T(o),d=t==null;++r<o;)c[r]=d?n:Ls(t,e[r]);return c}function ln(t,e,r){return t===t&&(r!==n&&(t=t<=r?t:r),e!==n&&(t=t>=e?t:e)),t}function we(t,e,r,o,c,d){var w,C=e&y,A=e&l,O=e&f;if(r&&(w=c?r(t,o,c,d):r(t)),w!==n)return w;if(!Lt(t))return t;var I=ft(t);if(I){if(w=Cp(t),!C)return re(t,w)}else{var N=Vt(t),K=N==bt||N==Xt;if(sn(t))return Wa(t,C);if(N==ue||N==F||K&&!c){if(w=A||K?{}:ou(t),!C)return A?lp(t,Ul(w,t)):hp(t,ya(w,t))}else{if(!Tt[N])return c?t:{};w=kp(t,N,C)}}d||(d=new Te);var Y=d.get(t);if(Y)return Y;d.set(t,w),Uu(t)?t.forEach(function(it){w.add(we(it,e,r,it,t,d))}):Nu(t)&&t.forEach(function(it,gt){w.set(gt,we(it,e,r,gt,t,d))});var rt=O?A?ms:ys:A?se:qt,pt=I?n:rt(t);return ye(pt||t,function(it,gt){pt&&(gt=it,it=t[gt]),Jn(w,gt,we(it,e,r,gt,t,d))}),w}function Dl(t){var e=qt(t);return function(r){return ma(r,t,e)}}function ma(t,e,r){var o=r.length;if(t==null)return!o;for(t=Et(t);o--;){var c=r[o],d=e[c],w=t[c];if(w===n&&!(c in t)||!d(w))return!1}return!0}function _a(t,e,r){if(typeof t!="function")throw new me(m);return er(function(){t.apply(n,r)},e)}function Vn(t,e,r,o){var c=-1,d=yr,w=!0,C=t.length,A=[],O=e.length;if(!C)return A;r&&(e=It(e,fe(r))),o?(d=Fi,w=!1):e.length>=u&&(d=Kn,w=!1,e=new hn(e));t:for(;++c<C;){var I=t[c],N=r==null?I:r(I);if(I=o||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,o)||A.push(I)}return A}var tn=za(Ue),wa=za(ts,!0);function Pl(t,e){var r=!0;return tn(t,function(o,c,d){return r=!!e(o,c,d),r}),r}function Ur(t,e,r){for(var o=-1,c=t.length;++o<c;){var d=t[o],w=e(d);if(w!=null&&(C===n?w===w&&!le(w):r(w,C)))var C=w,A=d}return A}function Fl(t,e,r,o){var c=t.length;for(r=lt(r),r<0&&(r=-r>c?0:c+r),o=o===n||o>c?c:lt(o),o<0&&(o+=c),o=r>o?0:Pu(o);r<o;)t[r++]=e;return t}function ba(t,e){var r=[];return tn(t,function(o,c,d){e(o,c,d)&&r.push(o)}),r}function $t(t,e,r,o,c){var d=-1,w=t.length;for(r||(r=Ep),c||(c=[]);++d<w;){var C=t[d];e>0&&r(C)?e>1?$t(C,e-1,r,o,c):je(c,C):o||(c[c.length]=C)}return c}var Qi=Xa(),Sa=Xa(!0);function Ue(t,e){return t&&Qi(t,e,qt)}function ts(t,e){return t&&Sa(t,e,qt)}function Dr(t,e){return Ye(e,function(r){return ze(t[r])})}function pn(t,e){e=nn(e,t);for(var r=0,o=e.length;t!=null&&r<o;)t=t[Pe(e[r++])];return r&&r==o?t:n}function Ca(t,e,r){var o=e(t);return ft(t)?o:je(o,r(t))}function Zt(t){return t==null?t===n?qn:Fn:cn&&cn in Et(t)?wp(t):Np(t)}function es(t,e){return t>e}function Ml(t,e){return t!=null&&Ct.call(t,e)}function ql(t,e){return t!=null&&e in Et(t)}function Wl(t,e,r){return t>=Jt(e,r)&&t<Ft(e,r)}function ns(t,e,r){for(var o=r?Fi:yr,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,fe(e))),A=Jt(I.length,A),C[w]=!r&&(e||c>=120&&I.length>=120)?new hn(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=r||Y!==0?Y:0,!(K?Kn(K,rt):o(O,rt,r))){for(w=d;--w;){var pt=C[w];if(!(pt?Kn(pt,rt):o(t[w],rt,r)))continue t}K&&K.push(rt),O.push(Y)}}return O}function Kl(t,e,r,o){return Ue(t,function(c,d,w){e(o,r(c),d,w)}),o}function Yn(t,e,r){e=nn(e,t),t=fu(t,e);var o=t==null?t:t[Pe(Se(e))];return o==null?n:ce(o,t,r)}function ka(t){return Nt(t)&&Zt(t)==F}function Hl(t){return Nt(t)&&Zt(t)==Ve}function $l(t){return Nt(t)&&Zt(t)==tt}function jn(t,e,r,o,c){return t===e?!0:t==null||e==null||!Nt(t)&&!Nt(e)?t!==t&&e!==e:Gl(t,e,r,o,jn,c)}function Gl(t,e,r,o,c,d){var w=ft(t),C=ft(e),A=w?et:Vt(t),O=C?et:Vt(e);A=A==F?ue:A,O=O==F?ue:O;var I=A==ue,N=O==ue,K=A==O;if(K&&sn(t)){if(!sn(e))return!1;w=!0,I=!1}if(K&&!I)return d||(d=new Te),w||Ln(t)?ru(t,e,r,o,c,d):mp(t,e,A,r,o,c,d);if(!(r&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 Te),c(pt,it,r,o,d)}}return K?(d||(d=new Te),_p(t,e,r,o,c,d)):!1}function zl(t){return Nt(t)&&Vt(t)==Ot}function rs(t,e,r,o){var c=r.length,d=c,w=!o;if(t==null)return!d;for(t=Et(t);c--;){var C=r[c];if(w&&C[2]?C[1]!==t[C[0]]:!(C[0]in t))return!1}for(;++c<d;){C=r[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 Te;if(o)var K=o(O,I,A,t,e,N);if(!(K===n?jn(I,O,b|E,o,N):K))return!1}}return!0}function Aa(t){if(!Lt(t)||xp(t))return!1;var e=ze(t)?zh:Df;return e.test(gn(t))}function Xl(t){return Nt(t)&&Zt(t)==Yt}function Jl(t){return Nt(t)&&Vt(t)==jt}function Vl(t){return Nt(t)&&Qr(t.length)&&!!xt[Zt(t)]}function Ea(t){return typeof t=="function"?t:t==null?oe:typeof t=="object"?ft(t)?Ra(t[0],t[1]):xa(t):Ju(t)}function is(t){if(!tr(t))return Zh(t);var e=[];for(var r in Et(t))Ct.call(t,r)&&r!="constructor"&&e.push(r);return e}function Yl(t){if(!Lt(t))return Lp(t);var e=tr(t),r=[];for(var o in t)o=="constructor"&&(e||!Ct.call(t,o))||r.push(o);return r}function ss(t,e){return t<e}function Ta(t,e){var r=-1,o=ie(t)?T(t.length):[];return tn(t,function(c,d,w){o[++r]=e(c,d,w)}),o}function xa(t){var e=ws(t);return e.length==1&&e[0][2]?uu(e[0][0],e[0][1]):function(r){return r===t||rs(r,t,e)}}function Ra(t,e){return Ss(t)&&au(e)?uu(Pe(t),e):function(r){var o=Ls(r,t);return o===n&&o===e?Ns(r,t):jn(e,o,b|E)}}function Pr(t,e,r,o,c){t!==e&&Qi(e,function(d,w){if(c||(c=new Te),Lt(d))jl(t,e,w,r,Pr,o,c);else{var C=o?o(ks(t,w),d,w+"",t,e,c):n;C===n&&(C=d),ji(t,w,C)}},se)}function jl(t,e,r,o,c,d,w){var C=ks(t,r),A=ks(e,r),O=w.get(A);if(O){ji(t,r,O);return}var I=d?d(C,A,r+"",t,e,w):n,N=I===n;if(N){var K=ft(A),Y=!K&&sn(A),rt=!K&&!Y&&Ln(A);I=A,K||Y||rt?ft(C)?I=C:Bt(C)?I=re(C):Y?(N=!1,I=Wa(A,!0)):rt?(N=!1,I=Ka(A,!0)):I=[]:nr(A)||vn(A)?(I=C,vn(C)?I=Fu(C):(!Lt(C)||ze(C))&&(I=ou(A))):N=!1}N&&(w.set(A,I),c(I,A,o,d,w),w.delete(A)),ji(t,r,I)}function Oa(t,e){var r=t.length;if(r)return e+=e<0?r:0,Ge(e,r)?t[e]:n}function Ia(t,e,r){e.length?e=It(e,function(d){return ft(d)?function(w){return pn(w,d.length===1?d[0]:d)}:d}):e=[oe];var o=-1;e=It(e,fe(nt()));var c=Ta(t,function(d,w,C){var A=It(e,function(O){return O(d)});return{criteria:A,index:++o,value:d}});return kh(c,function(d,w){return fp(d,w,r)})}function Zl(t,e){return La(t,e,function(r,o){return Ns(t,o)})}function La(t,e,r){for(var o=-1,c=e.length,d={};++o<c;){var w=e[o],C=pn(t,w);r(C,w)&&Zn(d,nn(w,t),C)}return d}function Ql(t){return function(e){return pn(e,t)}}function os(t,e,r,o){var c=o?Ch:bn,d=-1,w=e.length,C=t;for(t===e&&(e=re(e)),r&&(C=It(t,fe(r)));++d<w;)for(var A=0,O=e[d],I=r?r(O):O;(A=c(C,I,A,o))>-1;)C!==t&&Tr.call(C,A,1),Tr.call(t,A,1);return t}function Na(t,e){for(var r=t?e.length:0,o=r-1;r--;){var c=e[r];if(r==o||c!==d){var d=c;Ge(c)?Tr.call(t,c,1):fs(t,c)}}return t}function as(t,e){return t+Or(pa()*(e-t+1))}function tp(t,e,r,o){for(var c=-1,d=Ft(Rr((e-t)/(r||1)),0),w=T(d);d--;)w[o?d:++c]=t,t+=r;return w}function us(t,e){var r="";if(!t||e<1||e>ut)return r;do e%2&&(r+=t),e=Or(e/2),e&&(t+=t);while(e);return r}function dt(t,e){return As(cu(t,e,oe),t+"")}function ep(t){return va(Nn(t))}function np(t,e){var r=Nn(t);return Xr(r,ln(e,0,r.length))}function Zn(t,e,r,o){if(!Lt(t))return t;e=nn(e,t);for(var c=-1,d=e.length,w=d-1,C=t;C!=null&&++c<d;){var A=Pe(e[c]),O=r;if(A==="__proto__"||A==="constructor"||A==="prototype")return t;if(c!=w){var I=C[A];O=o?o(I,A,C):n,O===n&&(O=Lt(I)?I:Ge(e[c+1])?[]:{})}Jn(C,A,O),C=C[A]}return t}var Ba=Ir?function(t,e){return Ir.set(t,e),t}:oe,rp=xr?function(t,e){return xr(t,"toString",{configurable:!0,enumerable:!1,value:Us(e),writable:!0})}:oe;function ip(t){return Xr(Nn(t))}function be(t,e,r){var o=-1,c=t.length;e<0&&(e=-e>c?0:c+e),r=r>c?c:r,r<0&&(r+=c),c=e>r?0:r-e>>>0,e>>>=0;for(var d=T(c);++o<c;)d[o]=t[o+e];return d}function sp(t,e){var r;return tn(t,function(o,c,d){return r=e(o,c,d),!r}),!!r}function Fr(t,e,r){var o=0,c=t==null?o:t.length;if(typeof e=="number"&&e===e&&c<=q){for(;o<c;){var d=o+c>>>1,w=t[d];w!==null&&!le(w)&&(r?w<=e:w<e)?o=d+1:c=d}return c}return cs(t,e,oe,r)}function cs(t,e,r,o){var c=0,d=t==null?0:t.length;if(d===0)return 0;e=r(e);for(var w=e!==e,C=e===null,A=le(e),O=e===n;c<d;){var I=Or((c+d)/2),N=r(t[I]),K=N!==n,Y=N===null,rt=N===N,pt=le(N);if(w)var it=o||rt;else O?it=rt&&(o||K):C?it=rt&&K&&(o||!Y):A?it=rt&&K&&!Y&&(o||!pt):Y||pt?it=!1:it=o?N<=e:N<e;it?c=I+1:d=I}return Jt(d,pr)}function Ua(t,e){for(var r=-1,o=t.length,c=0,d=[];++r<o;){var w=t[r],C=e?e(w):w;if(!r||!xe(C,A)){var A=C;d[c++]=w===0?0:w}}return d}function Da(t){return typeof t=="number"?t:le(t)?Le:+t}function he(t){if(typeof t=="string")return t;if(ft(t))return It(t,he)+"";if(le(t))return da?da.call(t):"";var e=t+"";return e=="0"&&1/t==-Rt?"-0":e}function en(t,e,r){var o=-1,c=yr,d=t.length,w=!0,C=[],A=C;if(r)w=!1,c=Fi;else if(d>=u){var O=e?null:vp(t);if(O)return _r(O);w=!1,c=Kn,A=new hn}else A=e?[]:C;t:for(;++o<d;){var I=t[o],N=e?e(I):I;if(I=r||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,r)||(A!==C&&A.push(N),C.push(I))}return C}function fs(t,e){return e=nn(e,t),t=fu(t,e),t==null||delete t[Pe(Se(e))]}function Pa(t,e,r,o){return Zn(t,e,r(pn(t,e)),o)}function Mr(t,e,r,o){for(var c=t.length,d=o?c:-1;(o?d--:++d<c)&&e(t[d],d,t););return r?be(t,o?0:d,o?d+1:c):be(t,o?d+1:0,o?c:d)}function Fa(t,e){var r=t;return r instanceof vt&&(r=r.value()),Mi(e,function(o,c){return c.func.apply(c.thisArg,je([o],c.args))},r)}function hs(t,e,r){var o=t.length;if(o<2)return o?en(t[0]):[];for(var c=-1,d=T(o);++c<o;)for(var w=t[c],C=-1;++C<o;)C!=c&&(d[c]=Vn(d[c]||w,t[C],e,r));return en($t(d,1),e,r)}function Ma(t,e,r){for(var o=-1,c=t.length,d=e.length,w={};++o<c;){var C=o<d?e[o]:n;r(w,t[o],C)}return w}function ls(t){return Bt(t)?t:[]}function ps(t){return typeof t=="function"?t:oe}function nn(t,e){return ft(t)?t:Ss(t,e)?[t]:du(St(t))}var op=dt;function rn(t,e,r){var o=t.length;return r=r===n?o:r,!e&&r>=o?t:be(t,e,r)}var qa=Xh||function(t){return Ht.clearTimeout(t)};function Wa(t,e){if(e)return t.slice();var r=t.length,o=ua?ua(r):new t.constructor(r);return t.copy(o),o}function ds(t){var e=new t.constructor(t.byteLength);return new Ar(e).set(new Ar(t)),e}function ap(t,e){var r=e?ds(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.byteLength)}function up(t){var e=new t.constructor(t.source,ko.exec(t));return e.lastIndex=t.lastIndex,e}function cp(t){return Xn?Et(Xn.call(t)):{}}function Ka(t,e){var r=e?ds(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)}function Ha(t,e){if(t!==e){var r=t!==n,o=t===null,c=t===t,d=le(t),w=e!==n,C=e===null,A=e===e,O=le(e);if(!C&&!O&&!d&&t>e||d&&w&&A&&!C&&!O||o&&w&&A||!r&&A||!c)return 1;if(!o&&!d&&!O&&t<e||O&&r&&c&&!o&&!d||C&&r&&c||!w&&c||!A)return-1}return 0}function fp(t,e,r){for(var o=-1,c=t.criteria,d=e.criteria,w=c.length,C=r.length;++o<w;){var A=Ha(c[o],d[o]);if(A){if(o>=C)return A;var O=r[o];return A*(O=="desc"?-1:1)}}return t.index-e.index}function $a(t,e,r,o){for(var c=-1,d=t.length,w=r.length,C=-1,A=e.length,O=Ft(d-w,0),I=T(A+O),N=!o;++C<A;)I[C]=e[C];for(;++c<w;)(N||c<d)&&(I[r[c]]=t[c]);for(;O--;)I[C++]=t[c++];return I}function Ga(t,e,r,o){for(var c=-1,d=t.length,w=-1,C=r.length,A=-1,O=e.length,I=Ft(d-C,0),N=T(I+O),K=!o;++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+r[w]]=t[c++]);return N}function re(t,e){var r=-1,o=t.length;for(e||(e=T(o));++r<o;)e[r]=t[r];return e}function De(t,e,r,o){var c=!r;r||(r={});for(var d=-1,w=e.length;++d<w;){var C=e[d],A=o?o(r[C],t[C],C,r,t):n;A===n&&(A=t[C]),c?Ke(r,C,A):Jn(r,C,A)}return r}function hp(t,e){return De(t,bs(t),e)}function lp(t,e){return De(t,iu(t),e)}function qr(t,e){return function(r,o){var c=ft(r)?yh:Bl,d=e?e():{};return c(r,t,nt(o,2),d)}}function Rn(t){return dt(function(e,r){var o=-1,c=r.length,d=c>1?r[c-1]:n,w=c>2?r[2]:n;for(d=t.length>3&&typeof d=="function"?(c--,d):n,w&&Qt(r[0],r[1],w)&&(d=c<3?n:d,c=1),e=Et(e);++o<c;){var C=r[o];C&&t(e,C,o,d)}return e})}function za(t,e){return function(r,o){if(r==null)return r;if(!ie(r))return t(r,o);for(var c=r.length,d=e?c:-1,w=Et(r);(e?d--:++d<c)&&o(w[d],d,w)!==!1;);return r}}function Xa(t){return function(e,r,o){for(var c=-1,d=Et(e),w=o(e),C=w.length;C--;){var A=w[t?C:++c];if(r(d[A],A,d)===!1)break}return e}}function pp(t,e,r){var o=e&x,c=Qn(t);function d(){var w=this&&this!==Ht&&this instanceof d?c:t;return w.apply(o?r:this,arguments)}return d}function Ja(t){return function(e){e=St(e);var r=Sn(e)?Ee(e):n,o=r?r[0]:e.charAt(0),c=r?rn(r,1).join(""):e.slice(1);return o[t]()+c}}function On(t){return function(e){return Mi(zu(Gu(e).replace(rh,"")),t,"")}}function Qn(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 r=xn(t.prototype),o=t.apply(r,e);return Lt(o)?o:r}}function dp(t,e,r){var o=Qn(t);function c(){for(var d=arguments.length,w=T(d),C=d,A=In(c);C--;)w[C]=arguments[C];var O=d<3&&w[0]!==A&&w[d-1]!==A?[]:Ze(w,A);if(d-=O.length,d<r)return Qa(t,e,Wr,c.placeholder,n,w,O,n,n,r-d);var I=this&&this!==Ht&&this instanceof c?o:t;return ce(I,this,w)}return c}function Va(t){return function(e,r,o){var c=Et(e);if(!ie(e)){var d=nt(r,3);e=qt(e),r=function(C){return d(c[C],C,c)}}var w=t(e,r,o);return w>-1?c[d?e[w]:w]:n}}function Ya(t){return $e(function(e){var r=e.length,o=r,c=_e.prototype.thru;for(t&&e.reverse();o--;){var d=e[o];if(typeof d!="function")throw new me(m);if(c&&!w&&Gr(d)=="wrapper")var w=new _e([],!0)}for(o=w?o:r;++o<r;){d=e[o];var C=Gr(d),A=C=="wrapper"?_s(d):n;A&&Cs(A[0])&&A[1]==(M|V|$|H)&&!A[4].length&&A[9]==1?w=w[Gr(A[0])].apply(w,A[3]):w=d.length==1&&Cs(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=r?e[N].apply(this,O):I;++N<r;)K=e[N].call(this,K);return K}})}function Wr(t,e,r,o,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:Qn(t);function it(){for(var gt=arguments.length,mt=T(gt),pe=gt;pe--;)mt[pe]=arguments[pe];if(Y)var te=In(it),de=Eh(mt,te);if(o&&(mt=$a(mt,o,c,Y)),d&&(mt=Ga(mt,d,w,Y)),gt-=de,Y&><O){var Ut=Ze(mt,te);return Qa(t,e,Wr,it.placeholder,r,mt,Ut,C,A,O-gt)}var Re=N?r:this,Je=K?Re[t]:t;return gt=mt.length,C?mt=Bp(mt,C):rt&>>1&&mt.reverse(),I&&A<gt&&(mt.length=A),this&&this!==Ht&&this instanceof it&&(Je=pt||Qn(Je)),Je.apply(Re,mt)}return it}function ja(t,e){return function(r,o){return Kl(r,t,e(o),{})}}function Kr(t,e){return function(r,o){var c;if(r===n&&o===n)return e;if(r!==n&&(c=r),o!==n){if(c===n)return o;typeof r=="string"||typeof o=="string"?(r=he(r),o=he(o)):(r=Da(r),o=Da(o)),c=t(r,o)}return c}}function gs(t){return $e(function(e){return e=It(e,fe(nt())),dt(function(r){var o=this;return t(e,function(c){return ce(c,o,r)})})})}function Hr(t,e){e=e===n?" ":he(e);var r=e.length;if(r<2)return r?us(e,t):e;var o=us(e,Rr(t/Cn(e)));return Sn(e)?rn(Ee(o),0,t).join(""):o.slice(0,t)}function gp(t,e,r,o){var c=e&x,d=Qn(t);function w(){for(var C=-1,A=arguments.length,O=-1,I=o.length,N=T(I+A),K=this&&this!==Ht&&this instanceof w?d:t;++O<I;)N[O]=o[O];for(;A--;)N[O++]=arguments[++C];return ce(K,c?r:this,N)}return w}function Za(t){return function(e,r,o){return o&&typeof o!="number"&&Qt(e,r,o)&&(r=o=n),e=Xe(e),r===n?(r=e,e=0):r=Xe(r),o=o===n?e<r?1:-1:Xe(o),tp(e,r,o,t)}}function $r(t){return function(e,r){return typeof e=="string"&&typeof r=="string"||(e=Ce(e),r=Ce(r)),t(e,r)}}function Qa(t,e,r,o,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?$:D,e&=~(I?D:$),e&st||(e&=~(x|W));var pt=[t,e,c,Y,N,rt,K,C,A,O],it=r.apply(n,pt);return Cs(t)&&hu(it,pt),it.placeholder=o,lu(it,t,e)}function vs(t){var e=Pt[t];return function(r,o){if(r=Ce(r),o=o==null?0:Jt(lt(o),292),o&&la(r)){var c=(St(r)+"e").split("e"),d=e(c[0]+"e"+(+c[1]+o));return c=(St(d)+"e").split("e"),+(c[0]+"e"+(+c[1]-o))}return e(r)}}var vp=En&&1/_r(new En([,-0]))[1]==Rt?function(t){return new En(t)}:Fs;function tu(t){return function(e){var r=Vt(e);return r==Ot?zi(e):r==jt?Nh(e):Ah(e,t(e))}}function He(t,e,r,o,c,d,w,C){var A=e&W;if(!A&&typeof t!="function")throw new me(m);var O=o?o.length:0;if(O||(e&=~($|D),o=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=o,N=c;o=c=n}var K=A?n:_s(t),Y=[t,e,r,o,c,I,N,d,w,C];if(K&&Ip(Y,K),t=Y[0],e=Y[1],r=Y[2],o=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=pp(t,e,r);else e==V||e==ot?rt=dp(t,e,C):(e==$||e==(x|$))&&!c.length?rt=gp(t,e,r,o):rt=Wr.apply(n,Y);var pt=K?Ba:hu;return lu(pt(rt,Y),t,e)}function eu(t,e,r,o){return t===n||xe(t,An[r])&&!Ct.call(o,r)?e:t}function nu(t,e,r,o,c,d){return Lt(t)&&Lt(e)&&(d.set(e,t),Pr(t,e,n,nu,d),d.delete(e)),t}function yp(t){return nr(t)?n:t}function ru(t,e,r,o,c,d){var w=r&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=r&E?new hn:n;for(d.set(t,e),d.set(e,t);++N<C;){var rt=t[N],pt=e[N];if(o)var it=w?o(pt,rt,N,e,t,d):o(rt,pt,N,t,e,d);if(it!==n){if(it)continue;K=!1;break}if(Y){if(!qi(e,function(gt,mt){if(!Kn(Y,mt)&&(rt===gt||c(rt,gt,r,o,d)))return Y.push(mt)})){K=!1;break}}else if(!(rt===pt||c(rt,pt,r,o,d))){K=!1;break}}return d.delete(t),d.delete(e),K}function mp(t,e,r,o,c,d,w){switch(r){case _n:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case Ve:return!(t.byteLength!=e.byteLength||!d(new Ar(t),new Ar(e)));case Z:case tt:case Ae:return xe(+t,+e);case at:return t.name==e.name&&t.message==e.message;case Yt:case Ne:return t==e+"";case Ot:var C=zi;case jt:var A=o&b;if(C||(C=_r),t.size!=e.size&&!A)return!1;var O=w.get(t);if(O)return O==e;o|=E,w.set(t,e);var I=ru(C(t),C(e),o,c,d,w);return w.delete(t),I;case Be:if(Xn)return Xn.call(t)==Xn.call(e)}return!1}function _p(t,e,r,o,c,d){var w=r&b,C=ys(t),A=C.length,O=ys(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],mt=e[K];if(o)var pe=w?o(mt,gt,K,e,t,d):o(gt,mt,K,t,e,d);if(!(pe===n?gt===mt||c(gt,mt,r,o,d):pe)){pt=!1;break}it||(it=K=="constructor")}if(pt&&!it){var te=t.constructor,de=e.constructor;te!=de&&"constructor"in t&&"constructor"in e&&!(typeof te=="function"&&te instanceof te&&typeof de=="function"&&de instanceof de)&&(pt=!1)}return d.delete(t),d.delete(e),pt}function $e(t){return As(cu(t,n,mu),t+"")}function ys(t){return Ca(t,qt,bs)}function ms(t){return Ca(t,se,iu)}var _s=Ir?function(t){return Ir.get(t)}:Fs;function Gr(t){for(var e=t.name+"",r=Tn[e],o=Ct.call(Tn,e)?r.length:0;o--;){var c=r[o],d=c.func;if(d==null||d==t)return c.name}return e}function In(t){var e=Ct.call(p,"placeholder")?p:t;return e.placeholder}function nt(){var t=p.iteratee||Ds;return t=t===Ds?Ea:t,arguments.length?t(arguments[0],arguments[1]):t}function zr(t,e){var r=t.__data__;return Tp(e)?r[typeof e=="string"?"string":"hash"]:r.map}function ws(t){for(var e=qt(t),r=e.length;r--;){var o=e[r],c=t[o];e[r]=[o,c,au(c)]}return e}function dn(t,e){var r=Oh(t,e);return Aa(r)?r:n}function wp(t){var e=Ct.call(t,cn),r=t[cn];try{t[cn]=n;var o=!0}catch{}var c=Cr.call(t);return o&&(e?t[cn]=r:delete t[cn]),c}var bs=Ji?function(t){return t==null?[]:(t=Et(t),Ye(Ji(t),function(e){return fa.call(t,e)}))}:Ms,iu=Ji?function(t){for(var e=[];t;)je(e,bs(t)),t=Er(t);return e}:Ms,Vt=Zt;(Vi&&Vt(new Vi(new ArrayBuffer(1)))!=_n||$n&&Vt(new $n)!=Ot||Yi&&Vt(Yi.resolve())!=mn||En&&Vt(new En)!=jt||Gn&&Vt(new Gn)!=Me)&&(Vt=function(t){var e=Zt(t),r=e==ue?t.constructor:n,o=r?gn(r):"";if(o)switch(o){case nl:return _n;case rl:return Ot;case il:return mn;case sl:return jt;case ol:return Me}return e});function bp(t,e,r){for(var o=-1,c=r.length;++o<c;){var d=r[o],w=d.size;switch(d.type){case"drop":t+=w;break;case"dropRight":e-=w;break;case"take":e=Jt(e,t+w);break;case"takeRight":t=Ft(t,e-w);break}}return{start:t,end:e}}function Sp(t){var e=t.match(xf);return e?e[1].split(Rf):[]}function su(t,e,r){e=nn(e,t);for(var o=-1,c=e.length,d=!1;++o<c;){var w=Pe(e[o]);if(!(d=t!=null&&r(t,w)))break;t=t[w]}return d||++o!=c?d:(c=t==null?0:t.length,!!c&&Qr(c)&&Ge(w,c)&&(ft(t)||vn(t)))}function Cp(t){var e=t.length,r=new t.constructor(e);return e&&typeof t[0]=="string"&&Ct.call(t,"index")&&(r.index=t.index,r.input=t.input),r}function ou(t){return typeof t.constructor=="function"&&!tr(t)?xn(Er(t)):{}}function kp(t,e,r){var o=t.constructor;switch(e){case Ve:return ds(t);case Z:case tt:return new o(+t);case _n:return ap(t,r);case wi:case bi:case Si:case Ci:case ki:case Ai:case Ei:case Ti:case xi:return Ka(t,r);case Ot:return new o;case Ae:case Ne:return new o(t);case Yt:return up(t);case jt:return new o;case Be:return cp(t)}}function Ap(t,e){var r=e.length;if(!r)return t;var o=r-1;return e[o]=(r>1?"& ":"")+e[o],e=e.join(r>2?", ":" "),t.replace(Tf,`{
|
|
14
14
|
/* [wrapped with `+e+`] */
|
|
15
|
-
`)}function Ep(t){return ft(t)||vn(t)||!!(ha&&t&&t[ha])}function Ge(t,e){var r=typeof t;return e=e??ut,!!e&&(r=="number"||r!="symbol"&&Ff.test(t))&&t>-1&&t%1==0&&t<e}function Qt(t,e,r){if(!Lt(r))return!1;var o=typeof e;return(o=="number"?re(r)&&Ge(e,r.length):o=="string"&&e in r)?xe(r[e],t):!1}function Ss(t,e){if(ft(t))return!1;var r=typeof t;return r=="number"||r=="symbol"||r=="boolean"||t==null||le(t)?!0:Cf.test(t)||!Sf.test(t)||e!=null&&t in Et(e)}function Tp(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}function Cs(t){var e=Gr(t),r=p[e];if(typeof r!="function"||!(e in vt.prototype))return!1;if(t===r)return!0;var o=_s(r);return!!o&&t===o[0]}function xp(t){return!!aa&&aa in t}var Op=br?ze:qs;function tr(t){var e=t&&t.constructor,r=typeof e=="function"&&e.prototype||An;return t===r}function au(t){return t===t&&!Lt(t)}function uu(t,e){return function(r){return r==null?!1:r[t]===e&&(e!==n||t in Et(r))}}function Rp(t){var e=jr(t,function(o){return r.size===v&&r.clear(),o}),r=e.cache;return e}function Ip(t,e){var r=t[1],o=e[1],c=r|o,d=c<(x|W|M),w=o==M&&r==V||o==M&&r==H&&t[7].length<=e[8]||o==(M|H)&&e[7].length<=e[8]&&r==V;if(!(d||w))return t;o&x&&(t[2]=e[2],c|=r&x?0:st);var C=e[3];if(C){var A=t[3];t[3]=A?$a(A,C,e[4]):C,t[4]=A?Ze(t[3],_):e[4]}return C=e[5],C&&(A=t[5],t[5]=A?Ga(A,C,e[6]):C,t[6]=A?Ze(t[5],_):e[6]),C=e[7],C&&(t[7]=C),o&M&&(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]=c,t}function Lp(t){var e=[];if(t!=null)for(var r in Et(t))e.push(r);return e}function Np(t){return Cr.call(t)}function cu(t,e,r){return e=Ft(e===n?t.length-1:e,0),function(){for(var o=arguments,c=-1,d=Ft(o.length-e,0),w=T(d);++c<d;)w[c]=o[e+c];c=-1;for(var C=T(e+1);++c<e;)C[c]=o[c];return C[e]=r(w),ce(t,this,C)}}function fu(t,e){return e.length<2?t:pn(t,be(e,0,-1))}function Bp(t,e){for(var r=t.length,o=Jt(e.length,r),c=ne(t);o--;){var d=e[o];t[o]=Ge(d,r)?c[d]:n}return t}function ks(t,e){if(!(e==="constructor"&&typeof t[e]=="function")&&e!="__proto__")return t[e]}var hu=pu(Ba),er=Vh||function(t,e){return Ht.setTimeout(t,e)},As=pu(rp);function lu(t,e,r){var o=e+"";return As(t,Ap(o,Up(Sp(o),r)))}function pu(t){var e=0,r=0;return function(){var o=Qh(),c=j-(o-r);if(r=o,c>0){if(++e>=Q)return arguments[0]}else e=0;return t.apply(n,arguments)}}function Xr(t,e){var r=-1,o=t.length,c=o-1;for(e=e===n?o:e;++r<e;){var d=as(r,c),w=t[d];t[d]=t[r],t[r]=w}return t.length=e,t}var du=Rp(function(t){var e=[];return t.charCodeAt(0)===46&&e.push(""),t.replace(kf,function(r,o,c,d){e.push(c?d.replace(Lf,"$1"):o||r)}),e});function Pe(t){if(typeof t=="string"||le(t))return t;var e=t+"";return e=="0"&&1/t==-Ot?"-0":e}function gn(t){if(t!=null){try{return Sr.call(t)}catch{}try{return t+""}catch{}}return""}function Up(t,e){return ye(J,function(r){var o="_."+r[0];e&r[1]&&!yr(t,o)&&t.push(o)}),t.sort()}function gu(t){if(t instanceof vt)return t.clone();var e=new _e(t.__wrapped__,t.__chain__);return e.__actions__=ne(t.__actions__),e.__index__=t.__index__,e.__values__=t.__values__,e}function Dp(t,e,r){(r?Qt(t,e,r):e===n)?e=1:e=Ft(lt(e),0);var o=t==null?0:t.length;if(!o||e<1)return[];for(var c=0,d=0,w=T(Or(o/e));c<o;)w[d++]=be(t,c,c+=e);return w}function Pp(t){for(var e=-1,r=t==null?0:t.length,o=0,c=[];++e<r;){var d=t[e];d&&(c[o++]=d)}return c}function Fp(){var t=arguments.length;if(!t)return[];for(var e=T(t-1),r=arguments[0],o=t;o--;)e[o-1]=arguments[o];return je(ft(r)?ne(r):[r],$t(e,1))}var Mp=dt(function(t,e){return Bt(t)?Vn(t,$t(e,1,Bt,!0)):[]}),qp=dt(function(t,e){var r=Se(e);return Bt(r)&&(r=n),Bt(t)?Vn(t,$t(e,1,Bt,!0),nt(r,2)):[]}),Wp=dt(function(t,e){var r=Se(e);return Bt(r)&&(r=n),Bt(t)?Vn(t,$t(e,1,Bt,!0),n,r):[]});function Kp(t,e,r){var o=t==null?0:t.length;return o?(e=r||e===n?1:lt(e),be(t,e<0?0:e,o)):[]}function Hp(t,e,r){var o=t==null?0:t.length;return o?(e=r||e===n?1:lt(e),e=o-e,be(t,0,e<0?0:e)):[]}function $p(t,e){return t&&t.length?Mr(t,nt(e,3),!0,!0):[]}function Gp(t,e){return t&&t.length?Mr(t,nt(e,3),!0):[]}function zp(t,e,r,o){var c=t==null?0:t.length;return c?(r&&typeof r!="number"&&Qt(t,e,r)&&(r=0,o=c),Fl(t,e,r,o)):[]}function vu(t,e,r){var o=t==null?0:t.length;if(!o)return-1;var c=r==null?0:lt(r);return c<0&&(c=Ft(o+c,0)),mr(t,nt(e,3),c)}function yu(t,e,r){var o=t==null?0:t.length;if(!o)return-1;var c=o-1;return r!==n&&(c=lt(r),c=r<0?Ft(o+c,0):Jt(c,o-1)),mr(t,nt(e,3),c,!0)}function mu(t){var e=t==null?0:t.length;return e?$t(t,1):[]}function Xp(t){var e=t==null?0:t.length;return e?$t(t,Ot):[]}function Jp(t,e){var r=t==null?0:t.length;return r?(e=e===n?1:lt(e),$t(t,e)):[]}function Vp(t){for(var e=-1,r=t==null?0:t.length,o={};++e<r;){var c=t[e];o[c[0]]=c[1]}return o}function _u(t){return t&&t.length?t[0]:n}function Yp(t,e,r){var o=t==null?0:t.length;if(!o)return-1;var c=r==null?0:lt(r);return c<0&&(c=Ft(o+c,0)),bn(t,e,c)}function jp(t){var e=t==null?0:t.length;return e?be(t,0,-1):[]}var Zp=dt(function(t){var e=It(t,ls);return e.length&&e[0]===t[0]?ns(e):[]}),Qp=dt(function(t){var e=Se(t),r=It(t,ls);return e===Se(r)?e=n:r.pop(),r.length&&r[0]===t[0]?ns(r,nt(e,2)):[]}),td=dt(function(t){var e=Se(t),r=It(t,ls);return e=typeof e=="function"?e:n,e&&r.pop(),r.length&&r[0]===t[0]?ns(r,n,e):[]});function ed(t,e){return t==null?"":jh.call(t,e)}function Se(t){var e=t==null?0:t.length;return e?t[e-1]:n}function nd(t,e,r){var o=t==null?0:t.length;if(!o)return-1;var c=o;return r!==n&&(c=lt(r),c=c<0?Ft(o+c,0):Jt(c,o-1)),e===e?Uh(t,e,c):mr(t,Qo,c,!0)}function rd(t,e){return t&&t.length?Ra(t,lt(e)):n}var id=dt(wu);function wu(t,e){return t&&t.length&&e&&e.length?os(t,e):t}function sd(t,e,r){return t&&t.length&&e&&e.length?os(t,e,nt(r,2)):t}function od(t,e,r){return t&&t.length&&e&&e.length?os(t,e,n,r):t}var ad=$e(function(t,e){var r=t==null?0:t.length,o=Zi(t,e);return Na(t,It(e,function(c){return Ge(c,r)?+c:c}).sort(Ha)),o});function ud(t,e){var r=[];if(!(t&&t.length))return r;var o=-1,c=[],d=t.length;for(e=nt(e,3);++o<d;){var w=t[o];e(w,o,t)&&(r.push(w),c.push(o))}return Na(t,c),r}function Es(t){return t==null?t:el.call(t)}function cd(t,e,r){var o=t==null?0:t.length;return o?(r&&typeof r!="number"&&Qt(t,e,r)?(e=0,r=o):(e=e==null?0:lt(e),r=r===n?o:lt(r)),be(t,e,r)):[]}function fd(t,e){return Fr(t,e)}function hd(t,e,r){return cs(t,e,nt(r,2))}function ld(t,e){var r=t==null?0:t.length;if(r){var o=Fr(t,e);if(o<r&&xe(t[o],e))return o}return-1}function pd(t,e){return Fr(t,e,!0)}function dd(t,e,r){return cs(t,e,nt(r,2),!0)}function gd(t,e){var r=t==null?0:t.length;if(r){var o=Fr(t,e,!0)-1;if(xe(t[o],e))return o}return-1}function vd(t){return t&&t.length?Ua(t):[]}function yd(t,e){return t&&t.length?Ua(t,nt(e,2)):[]}function md(t){var e=t==null?0:t.length;return e?be(t,1,e):[]}function _d(t,e,r){return t&&t.length?(e=r||e===n?1:lt(e),be(t,0,e<0?0:e)):[]}function wd(t,e,r){var o=t==null?0:t.length;return o?(e=r||e===n?1:lt(e),e=o-e,be(t,e<0?0:e,o)):[]}function bd(t,e){return t&&t.length?Mr(t,nt(e,3),!1,!0):[]}function Sd(t,e){return t&&t.length?Mr(t,nt(e,3)):[]}var Cd=dt(function(t){return en($t(t,1,Bt,!0))}),kd=dt(function(t){var e=Se(t);return Bt(e)&&(e=n),en($t(t,1,Bt,!0),nt(e,2))}),Ad=dt(function(t){var e=Se(t);return e=typeof e=="function"?e:n,en($t(t,1,Bt,!0),n,e)});function Ed(t){return t&&t.length?en(t):[]}function Td(t,e){return t&&t.length?en(t,nt(e,2)):[]}function xd(t,e){return e=typeof e=="function"?e:n,t&&t.length?en(t,n,e):[]}function Ts(t){if(!(t&&t.length))return[];var e=0;return t=Ye(t,function(r){if(Bt(r))return e=Ft(r.length,e),!0}),$i(e,function(r){return It(t,Wi(r))})}function bu(t,e){if(!(t&&t.length))return[];var r=Ts(t);return e==null?r:It(r,function(o){return ce(e,n,o)})}var Od=dt(function(t,e){return Bt(t)?Vn(t,e):[]}),Rd=dt(function(t){return hs(Ye(t,Bt))}),Id=dt(function(t){var e=Se(t);return Bt(e)&&(e=n),hs(Ye(t,Bt),nt(e,2))}),Ld=dt(function(t){var e=Se(t);return e=typeof e=="function"?e:n,hs(Ye(t,Bt),n,e)}),Nd=dt(Ts);function Bd(t,e){return Ma(t||[],e||[],Jn)}function Ud(t,e){return Ma(t||[],e||[],Zn)}var Dd=dt(function(t){var e=t.length,r=e>1?t[e-1]:n;return r=typeof r=="function"?(t.pop(),r):n,bu(t,r)});function Su(t){var e=p(t);return e.__chain__=!0,e}function Pd(t,e){return e(t),t}function Jr(t,e){return e(t)}var Fd=$e(function(t){var e=t.length,r=e?t[0]:0,o=this.__wrapped__,c=function(d){return Zi(d,t)};return e>1||this.__actions__.length||!(o instanceof vt)||!Ge(r)?this.thru(c):(o=o.slice(r,+r+(e?1:0)),o.__actions__.push({func:Jr,args:[c],thisArg:n}),new _e(o,this.__chain__).thru(function(d){return e&&!d.length&&d.push(n),d}))});function Md(){return Su(this)}function qd(){return new _e(this.value(),this.__chain__)}function Wd(){this.__values__===n&&(this.__values__=Du(this.value()));var t=this.__index__>=this.__values__.length,e=t?n:this.__values__[this.__index__++];return{done:t,value:e}}function Kd(){return this}function Hd(t){for(var e,r=this;r instanceof Nr;){var o=gu(r);o.__index__=0,o.__values__=n,e?c.__wrapped__=o:e=o;var c=o;r=r.__wrapped__}return c.__wrapped__=t,e}function $d(){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:Jr,args:[Es],thisArg:n}),new _e(e,this.__chain__)}return this.thru(Es)}function Gd(){return Fa(this.__wrapped__,this.__actions__)}var zd=qr(function(t,e,r){Ct.call(t,r)?++t[r]:Ke(t,r,1)});function Xd(t,e,r){var o=ft(t)?jo:Pl;return r&&Qt(t,e,r)&&(e=n),o(t,nt(e,3))}function Jd(t,e){var r=ft(t)?Ye:ba;return r(t,nt(e,3))}var Vd=Va(vu),Yd=Va(yu);function jd(t,e){return $t(Vr(t,e),1)}function Zd(t,e){return $t(Vr(t,e),Ot)}function Qd(t,e,r){return r=r===n?1:lt(r),$t(Vr(t,e),r)}function Cu(t,e){var r=ft(t)?ye:tn;return r(t,nt(e,3))}function ku(t,e){var r=ft(t)?mh:wa;return r(t,nt(e,3))}var tg=qr(function(t,e,r){Ct.call(t,r)?t[r].push(e):Ke(t,r,[e])});function eg(t,e,r,o){t=re(t)?t:Nn(t),r=r&&!o?lt(r):0;var c=t.length;return r<0&&(r=Ft(c+r,0)),ti(t)?r<=c&&t.indexOf(e,r)>-1:!!c&&bn(t,e,r)>-1}var ng=dt(function(t,e,r){var o=-1,c=typeof e=="function",d=re(t)?T(t.length):[];return tn(t,function(w){d[++o]=c?ce(e,w,r):Yn(w,e,r)}),d}),rg=qr(function(t,e,r){Ke(t,r,e)});function Vr(t,e){var r=ft(t)?It:Ta;return r(t,nt(e,3))}function ig(t,e,r,o){return t==null?[]:(ft(e)||(e=e==null?[]:[e]),r=o?n:r,ft(r)||(r=r==null?[]:[r]),Ia(t,e,r))}var sg=qr(function(t,e,r){t[r?0:1].push(e)},function(){return[[],[]]});function og(t,e,r){var o=ft(t)?Mi:ea,c=arguments.length<3;return o(t,nt(e,4),r,c,tn)}function ag(t,e,r){var o=ft(t)?_h:ea,c=arguments.length<3;return o(t,nt(e,4),r,c,wa)}function ug(t,e){var r=ft(t)?Ye:ba;return r(t,Zr(nt(e,3)))}function cg(t){var e=ft(t)?va:ep;return e(t)}function fg(t,e,r){(r?Qt(t,e,r):e===n)?e=1:e=lt(e);var o=ft(t)?Ll:np;return o(t,e)}function hg(t){var e=ft(t)?Nl:ip;return e(t)}function lg(t){if(t==null)return 0;if(re(t))return ti(t)?Cn(t):t.length;var e=Vt(t);return e==Rt||e==jt?t.size:is(t).length}function pg(t,e,r){var o=ft(t)?qi:sp;return r&&Qt(t,e,r)&&(e=n),o(t,nt(e,3))}var dg=dt(function(t,e){if(t==null)return[];var r=e.length;return r>1&&Qt(t,e[0],e[1])?e=[]:r>2&&Qt(e[0],e[1],e[2])&&(e=[e[0]]),Ia(t,$t(e,1),[])}),Yr=Jh||function(){return Ht.Date.now()};function gg(t,e){if(typeof e!="function")throw new me(m);return t=lt(t),function(){if(--t<1)return e.apply(this,arguments)}}function Au(t,e,r){return e=r?n:e,e=t&&e==null?t.length:e,He(t,M,n,n,n,n,e)}function Eu(t,e){var r;if(typeof e!="function")throw new me(m);return t=lt(t),function(){return--t>0&&(r=e.apply(this,arguments)),t<=1&&(e=n),r}}var xs=dt(function(t,e,r){var o=x;if(r.length){var c=Ze(r,In(xs));o|=$}return He(t,o,e,r,c)}),Tu=dt(function(t,e,r){var o=x|W;if(r.length){var c=Ze(r,In(Tu));o|=$}return He(e,o,t,r,c)});function xu(t,e,r){e=r?n:e;var o=He(t,V,n,n,n,n,n,e);return o.placeholder=xu.placeholder,o}function Ou(t,e,r){e=r?n:e;var o=He(t,ot,n,n,n,n,n,e);return o.placeholder=Ou.placeholder,o}function Ru(t,e,r){var o,c,d,w,C,A,R=0,I=!1,N=!1,K=!0;if(typeof t!="function")throw new me(m);e=Ce(e)||0,Lt(r)&&(I=!!r.leading,N="maxWait"in r,d=N?Ft(Ce(r.maxWait)||0,e):d,K="trailing"in r?!!r.trailing:K);function Y(Ut){var Oe=o,Je=c;return o=c=n,R=Ut,w=t.apply(Je,Oe),w}function rt(Ut){return R=Ut,C=er(gt,e),I?Y(Ut):w}function pt(Ut){var Oe=Ut-A,Je=Ut-R,Vu=e-Oe;return N?Jt(Vu,d-Je):Vu}function it(Ut){var Oe=Ut-A,Je=Ut-R;return A===n||Oe>=e||Oe<0||N&&Je>=d}function gt(){var Ut=Yr();if(it(Ut))return mt(Ut);C=er(gt,pt(Ut))}function mt(Ut){return C=n,K&&o?Y(Ut):(o=c=n,w)}function pe(){C!==n&&qa(C),R=0,o=A=c=C=n}function te(){return C===n?w:mt(Yr())}function de(){var Ut=Yr(),Oe=it(Ut);if(o=arguments,c=this,A=Ut,Oe){if(C===n)return rt(A);if(N)return qa(C),C=er(gt,e),Y(A)}return C===n&&(C=er(gt,e)),w}return de.cancel=pe,de.flush=te,de}var vg=dt(function(t,e){return _a(t,1,e)}),yg=dt(function(t,e,r){return _a(t,Ce(e)||0,r)});function mg(t){return He(t,L)}function jr(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new me(m);var r=function(){var o=arguments,c=e?e.apply(this,o):o[0],d=r.cache;if(d.has(c))return d.get(c);var w=t.apply(this,o);return r.cache=d.set(c,w)||d,w};return r.cache=new(jr.Cache||We),r}jr.Cache=We;function Zr(t){if(typeof t!="function")throw new me(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 _g(t){return Eu(2,t)}var wg=op(function(t,e){e=e.length==1&&ft(e[0])?It(e[0],fe(nt())):It($t(e,1),fe(nt()));var r=e.length;return dt(function(o){for(var c=-1,d=Jt(o.length,r);++c<d;)o[c]=e[c].call(this,o[c]);return ce(t,this,o)})}),Os=dt(function(t,e){var r=Ze(e,In(Os));return He(t,$,n,e,r)}),Iu=dt(function(t,e){var r=Ze(e,In(Iu));return He(t,D,n,e,r)}),bg=$e(function(t,e){return He(t,H,n,n,n,e)});function Sg(t,e){if(typeof t!="function")throw new me(m);return e=e===n?e:lt(e),dt(t,e)}function Cg(t,e){if(typeof t!="function")throw new me(m);return e=e==null?0:Ft(lt(e),0),dt(function(r){var o=r[e],c=rn(r,0,e);return o&&je(c,o),ce(t,this,c)})}function kg(t,e,r){var o=!0,c=!0;if(typeof t!="function")throw new me(m);return Lt(r)&&(o="leading"in r?!!r.leading:o,c="trailing"in r?!!r.trailing:c),Ru(t,e,{leading:o,maxWait:e,trailing:c})}function Ag(t){return Au(t,1)}function Eg(t,e){return Os(ps(e),t)}function Tg(){if(!arguments.length)return[];var t=arguments[0];return ft(t)?t:[t]}function xg(t){return we(t,f)}function Og(t,e){return e=typeof e=="function"?e:n,we(t,f,e)}function Rg(t){return we(t,y|f)}function Ig(t,e){return e=typeof e=="function"?e:n,we(t,y|f,e)}function Lg(t,e){return e==null||ma(t,e,qt(e))}function xe(t,e){return t===e||t!==t&&e!==e}var Ng=$r(es),Bg=$r(function(t,e){return t>=e}),vn=ka(function(){return arguments}())?ka:function(t){return Nt(t)&&Ct.call(t,"callee")&&!fa.call(t,"callee")},ft=T.isArray,Ug=Go?fe(Go):Hl;function re(t){return t!=null&&Qr(t.length)&&!ze(t)}function Bt(t){return Nt(t)&&re(t)}function Dg(t){return t===!0||t===!1||Nt(t)&&Zt(t)==Z}var sn=Yh||qs,Pg=zo?fe(zo):$l;function Fg(t){return Nt(t)&&t.nodeType===1&&!nr(t)}function Mg(t){if(t==null)return!0;if(re(t)&&(ft(t)||typeof t=="string"||typeof t.splice=="function"||sn(t)||Ln(t)||vn(t)))return!t.length;var e=Vt(t);if(e==Rt||e==jt)return!t.size;if(tr(t))return!is(t).length;for(var r in t)if(Ct.call(t,r))return!1;return!0}function qg(t,e){return jn(t,e)}function Wg(t,e,r){r=typeof r=="function"?r:n;var o=r?r(t,e):n;return o===n?jn(t,e,n,r):!!o}function Rs(t){if(!Nt(t))return!1;var e=Zt(t);return e==at||e==z||typeof t.message=="string"&&typeof t.name=="string"&&!nr(t)}function Kg(t){return typeof t=="number"&&la(t)}function ze(t){if(!Lt(t))return!1;var e=Zt(t);return e==bt||e==Xt||e==P||e==Mn}function Lu(t){return typeof t=="number"&&t==lt(t)}function Qr(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 Nu=Xo?fe(Xo):zl;function Hg(t,e){return t===e||rs(t,e,ws(e))}function $g(t,e,r){return r=typeof r=="function"?r:n,rs(t,e,ws(e),r)}function Gg(t){return Bu(t)&&t!=+t}function zg(t){if(Op(t))throw new ct(h);return Aa(t)}function Xg(t){return t===null}function Jg(t){return t==null}function Bu(t){return typeof t=="number"||Nt(t)&&Zt(t)==Ae}function nr(t){if(!Nt(t)||Zt(t)!=ue)return!1;var e=Er(t);if(e===null)return!0;var r=Ct.call(e,"constructor")&&e.constructor;return typeof r=="function"&&r instanceof r&&Sr.call(r)==$h}var Is=Jo?fe(Jo):Xl;function Vg(t){return Lu(t)&&t>=-ut&&t<=ut}var Uu=Vo?fe(Vo):Jl;function ti(t){return typeof t=="string"||!ft(t)&&Nt(t)&&Zt(t)==Ne}function le(t){return typeof t=="symbol"||Nt(t)&&Zt(t)==Be}var Ln=Yo?fe(Yo):Vl;function Yg(t){return t===n}function jg(t){return Nt(t)&&Vt(t)==Me}function Zg(t){return Nt(t)&&Zt(t)==Wn}var Qg=$r(ss),tv=$r(function(t,e){return t<=e});function Du(t){if(!t)return[];if(re(t))return ti(t)?Ee(t):ne(t);if(Hn&&t[Hn])return Lh(t[Hn]());var e=Vt(t),r=e==Rt?zi:e==jt?_r:Nn;return r(t)}function Xe(t){if(!t)return t===0?t:0;if(t=Ce(t),t===Ot||t===-Ot){var e=t<0?-1:1;return e*zt}return t===t?t:0}function lt(t){var e=Xe(t),r=e%1;return e===e?r?e-r:e:0}function Pu(t){return t?ln(lt(t),0,ae):0}function Ce(t){if(typeof t=="number")return t;if(le(t))return Le;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=na(t);var r=Uf.test(t);return r||Pf.test(t)?gh(t.slice(2),r?2:8):Bf.test(t)?Le:+t}function Fu(t){return De(t,ie(t))}function ev(t){return t?ln(lt(t),-ut,ut):t===0?t:0}function St(t){return t==null?"":he(t)}var nv=On(function(t,e){if(tr(e)||re(e)){De(e,qt(e),t);return}for(var r in e)Ct.call(e,r)&&Jn(t,r,e[r])}),Mu=On(function(t,e){De(e,ie(e),t)}),ei=On(function(t,e,r,o){De(e,ie(e),t,o)}),rv=On(function(t,e,r,o){De(e,qt(e),t,o)}),iv=$e(Zi);function sv(t,e){var r=xn(t);return e==null?r:ya(r,e)}var ov=dt(function(t,e){t=Et(t);var r=-1,o=e.length,c=o>2?e[2]:n;for(c&&Qt(e[0],e[1],c)&&(o=1);++r<o;)for(var d=e[r],w=ie(d),C=-1,A=w.length;++C<A;){var R=w[C],I=t[R];(I===n||xe(I,An[R])&&!Ct.call(t,R))&&(t[R]=d[R])}return t}),av=dt(function(t){return t.push(n,nu),ce(qu,n,t)});function uv(t,e){return Zo(t,nt(e,3),Ue)}function cv(t,e){return Zo(t,nt(e,3),ts)}function fv(t,e){return t==null?t:Qi(t,nt(e,3),ie)}function hv(t,e){return t==null?t:Sa(t,nt(e,3),ie)}function lv(t,e){return t&&Ue(t,nt(e,3))}function pv(t,e){return t&&ts(t,nt(e,3))}function dv(t){return t==null?[]:Dr(t,qt(t))}function gv(t){return t==null?[]:Dr(t,ie(t))}function Ls(t,e,r){var o=t==null?n:pn(t,e);return o===n?r:o}function vv(t,e){return t!=null&&su(t,e,Ml)}function Ns(t,e){return t!=null&&su(t,e,ql)}var yv=ja(function(t,e,r){e!=null&&typeof e.toString!="function"&&(e=Cr.call(e)),t[e]=r},Us(se)),mv=ja(function(t,e,r){e!=null&&typeof e.toString!="function"&&(e=Cr.call(e)),Ct.call(t,e)?t[e].push(r):t[e]=[r]},nt),_v=dt(Yn);function qt(t){return re(t)?ga(t):is(t)}function ie(t){return re(t)?ga(t,!0):Yl(t)}function wv(t,e){var r={};return e=nt(e,3),Ue(t,function(o,c,d){Ke(r,e(o,c,d),o)}),r}function bv(t,e){var r={};return e=nt(e,3),Ue(t,function(o,c,d){Ke(r,c,e(o,c,d))}),r}var Sv=On(function(t,e,r){Pr(t,e,r)}),qu=On(function(t,e,r,o){Pr(t,e,r,o)}),Cv=$e(function(t,e){var r={};if(t==null)return r;var o=!1;e=It(e,function(d){return d=nn(d,t),o||(o=d.length>1),d}),De(t,ms(t),r),o&&(r=we(r,y|l|f,yp));for(var c=e.length;c--;)fs(r,e[c]);return r});function kv(t,e){return Wu(t,Zr(nt(e)))}var Av=$e(function(t,e){return t==null?{}:Zl(t,e)});function Wu(t,e){if(t==null)return{};var r=It(ms(t),function(o){return[o]});return e=nt(e),La(t,r,function(o,c){return e(o,c[0])})}function Ev(t,e,r){e=nn(e,t);var o=-1,c=e.length;for(c||(c=1,t=n);++o<c;){var d=t==null?n:t[Pe(e[o])];d===n&&(o=c,d=r),t=ze(d)?d.call(t):d}return t}function Tv(t,e,r){return t==null?t:Zn(t,e,r)}function xv(t,e,r,o){return o=typeof o=="function"?o:n,t==null?t:Zn(t,e,r,o)}var Ku=tu(qt),Hu=tu(ie);function Ov(t,e,r){var o=ft(t),c=o||sn(t)||Ln(t);if(e=nt(e,4),r==null){var d=t&&t.constructor;c?r=o?new d:[]:Lt(t)?r=ze(d)?xn(Er(t)):{}:r={}}return(c?ye:Ue)(t,function(w,C,A){return e(r,w,C,A)}),r}function Rv(t,e){return t==null?!0:fs(t,e)}function Iv(t,e,r){return t==null?t:Pa(t,e,ps(r))}function Lv(t,e,r,o){return o=typeof o=="function"?o:n,t==null?t:Pa(t,e,ps(r),o)}function Nn(t){return t==null?[]:Gi(t,qt(t))}function Nv(t){return t==null?[]:Gi(t,ie(t))}function Bv(t,e,r){return r===n&&(r=e,e=n),r!==n&&(r=Ce(r),r=r===r?r:0),e!==n&&(e=Ce(e),e=e===e?e:0),ln(Ce(t),e,r)}function Uv(t,e,r){return e=Xe(e),r===n?(r=e,e=0):r=Xe(r),t=Ce(t),Wl(t,e,r)}function Dv(t,e,r){if(r&&typeof r!="boolean"&&Qt(t,e,r)&&(e=r=n),r===n&&(typeof e=="boolean"?(r=e,e=n):typeof t=="boolean"&&(r=t,t=n)),t===n&&e===n?(t=0,e=1):(t=Xe(t),e===n?(e=t,t=0):e=Xe(e)),t>e){var o=t;t=e,e=o}if(r||t%1||e%1){var c=pa();return Jt(t+c*(e-t+dh("1e-"+((c+"").length-1))),e)}return as(t,e)}var Pv=Rn(function(t,e,r){return e=e.toLowerCase(),t+(r?$u(e):e)});function $u(t){return Bs(St(t).toLowerCase())}function Gu(t){return t=St(t),t&&t.replace(Mf,Th).replace(ih,"")}function Fv(t,e,r){t=St(t),e=he(e);var o=t.length;r=r===n?o:ln(lt(r),0,o);var c=r;return r-=e.length,r>=0&&t.slice(r,c)==e}function Mv(t){return t=St(t),t&&_f.test(t)?t.replace(So,xh):t}function qv(t){return t=St(t),t&&Af.test(t)?t.replace(Oi,"\\$&"):t}var Wv=Rn(function(t,e,r){return t+(r?"-":"")+e.toLowerCase()}),Kv=Rn(function(t,e,r){return t+(r?" ":"")+e.toLowerCase()}),Hv=Ja("toLowerCase");function $v(t,e,r){t=St(t),e=lt(e);var o=e?Cn(t):0;if(!e||o>=e)return t;var c=(e-o)/2;return Hr(Rr(c),r)+t+Hr(Or(c),r)}function Gv(t,e,r){t=St(t),e=lt(e);var o=e?Cn(t):0;return e&&o<e?t+Hr(e-o,r):t}function zv(t,e,r){t=St(t),e=lt(e);var o=e?Cn(t):0;return e&&o<e?Hr(e-o,r)+t:t}function Xv(t,e,r){return r||e==null?e=0:e&&(e=+e),tl(St(t).replace(Ri,""),e||0)}function Jv(t,e,r){return(r?Qt(t,e,r):e===n)?e=1:e=lt(e),us(St(t),e)}function Vv(){var t=arguments,e=St(t[0]);return t.length<3?e:e.replace(t[1],t[2])}var Yv=Rn(function(t,e,r){return t+(r?"_":"")+e.toLowerCase()});function jv(t,e,r){return r&&typeof r!="number"&&Qt(t,e,r)&&(e=r=n),r=r===n?ae:r>>>0,r?(t=St(t),t&&(typeof e=="string"||e!=null&&!Is(e))&&(e=he(e),!e&&Sn(t))?rn(Ee(t),0,r):t.split(e,r)):[]}var Zv=Rn(function(t,e,r){return t+(r?" ":"")+Bs(e)});function Qv(t,e,r){return t=St(t),r=r==null?0:ln(lt(r),0,t.length),e=he(e),t.slice(r,r+e.length)==e}function ty(t,e,r){var o=p.templateSettings;r&&Qt(t,e,r)&&(e=n),t=St(t),e=ei({},e,o,eu);var c=ei({},e.imports,o.imports,eu),d=qt(c),w=Gi(c,d),C,A,R=0,I=e.interpolate||dr,N="__p += '",K=Xi((e.escape||dr).source+"|"+I.source+"|"+(I===Co?Nf:dr).source+"|"+(e.evaluate||dr).source+"|$","g"),Y="//# sourceURL="+(Ct.call(e,"sourceURL")?(e.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++ch+"]")+`
|
|
16
|
-
`;t.replace(K,function(it,gt,mt,pe,te,de){return mt||(mt=pe),N+=t.slice(
|
|
15
|
+
`)}function Ep(t){return ft(t)||vn(t)||!!(ha&&t&&t[ha])}function Ge(t,e){var r=typeof t;return e=e??ut,!!e&&(r=="number"||r!="symbol"&&Ff.test(t))&&t>-1&&t%1==0&&t<e}function Qt(t,e,r){if(!Lt(r))return!1;var o=typeof e;return(o=="number"?ie(r)&&Ge(e,r.length):o=="string"&&e in r)?xe(r[e],t):!1}function Ss(t,e){if(ft(t))return!1;var r=typeof t;return r=="number"||r=="symbol"||r=="boolean"||t==null||le(t)?!0:Cf.test(t)||!Sf.test(t)||e!=null&&t in Et(e)}function Tp(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}function Cs(t){var e=Gr(t),r=p[e];if(typeof r!="function"||!(e in vt.prototype))return!1;if(t===r)return!0;var o=_s(r);return!!o&&t===o[0]}function xp(t){return!!aa&&aa in t}var Rp=br?ze:qs;function tr(t){var e=t&&t.constructor,r=typeof e=="function"&&e.prototype||An;return t===r}function au(t){return t===t&&!Lt(t)}function uu(t,e){return function(r){return r==null?!1:r[t]===e&&(e!==n||t in Et(r))}}function Op(t){var e=jr(t,function(o){return r.size===v&&r.clear(),o}),r=e.cache;return e}function Ip(t,e){var r=t[1],o=e[1],c=r|o,d=c<(x|W|M),w=o==M&&r==V||o==M&&r==H&&t[7].length<=e[8]||o==(M|H)&&e[7].length<=e[8]&&r==V;if(!(d||w))return t;o&x&&(t[2]=e[2],c|=r&x?0:st);var C=e[3];if(C){var A=t[3];t[3]=A?$a(A,C,e[4]):C,t[4]=A?Ze(t[3],_):e[4]}return C=e[5],C&&(A=t[5],t[5]=A?Ga(A,C,e[6]):C,t[6]=A?Ze(t[5],_):e[6]),C=e[7],C&&(t[7]=C),o&M&&(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]=c,t}function Lp(t){var e=[];if(t!=null)for(var r in Et(t))e.push(r);return e}function Np(t){return Cr.call(t)}function cu(t,e,r){return e=Ft(e===n?t.length-1:e,0),function(){for(var o=arguments,c=-1,d=Ft(o.length-e,0),w=T(d);++c<d;)w[c]=o[e+c];c=-1;for(var C=T(e+1);++c<e;)C[c]=o[c];return C[e]=r(w),ce(t,this,C)}}function fu(t,e){return e.length<2?t:pn(t,be(e,0,-1))}function Bp(t,e){for(var r=t.length,o=Jt(e.length,r),c=re(t);o--;){var d=e[o];t[o]=Ge(d,r)?c[d]:n}return t}function ks(t,e){if(!(e==="constructor"&&typeof t[e]=="function")&&e!="__proto__")return t[e]}var hu=pu(Ba),er=Vh||function(t,e){return Ht.setTimeout(t,e)},As=pu(rp);function lu(t,e,r){var o=e+"";return As(t,Ap(o,Up(Sp(o),r)))}function pu(t){var e=0,r=0;return function(){var o=Qh(),c=j-(o-r);if(r=o,c>0){if(++e>=Q)return arguments[0]}else e=0;return t.apply(n,arguments)}}function Xr(t,e){var r=-1,o=t.length,c=o-1;for(e=e===n?o:e;++r<e;){var d=as(r,c),w=t[d];t[d]=t[r],t[r]=w}return t.length=e,t}var du=Op(function(t){var e=[];return t.charCodeAt(0)===46&&e.push(""),t.replace(kf,function(r,o,c,d){e.push(c?d.replace(Lf,"$1"):o||r)}),e});function Pe(t){if(typeof t=="string"||le(t))return t;var e=t+"";return e=="0"&&1/t==-Rt?"-0":e}function gn(t){if(t!=null){try{return Sr.call(t)}catch{}try{return t+""}catch{}}return""}function Up(t,e){return ye(J,function(r){var o="_."+r[0];e&r[1]&&!yr(t,o)&&t.push(o)}),t.sort()}function gu(t){if(t instanceof vt)return t.clone();var e=new _e(t.__wrapped__,t.__chain__);return e.__actions__=re(t.__actions__),e.__index__=t.__index__,e.__values__=t.__values__,e}function Dp(t,e,r){(r?Qt(t,e,r):e===n)?e=1:e=Ft(lt(e),0);var o=t==null?0:t.length;if(!o||e<1)return[];for(var c=0,d=0,w=T(Rr(o/e));c<o;)w[d++]=be(t,c,c+=e);return w}function Pp(t){for(var e=-1,r=t==null?0:t.length,o=0,c=[];++e<r;){var d=t[e];d&&(c[o++]=d)}return c}function Fp(){var t=arguments.length;if(!t)return[];for(var e=T(t-1),r=arguments[0],o=t;o--;)e[o-1]=arguments[o];return je(ft(r)?re(r):[r],$t(e,1))}var Mp=dt(function(t,e){return Bt(t)?Vn(t,$t(e,1,Bt,!0)):[]}),qp=dt(function(t,e){var r=Se(e);return Bt(r)&&(r=n),Bt(t)?Vn(t,$t(e,1,Bt,!0),nt(r,2)):[]}),Wp=dt(function(t,e){var r=Se(e);return Bt(r)&&(r=n),Bt(t)?Vn(t,$t(e,1,Bt,!0),n,r):[]});function Kp(t,e,r){var o=t==null?0:t.length;return o?(e=r||e===n?1:lt(e),be(t,e<0?0:e,o)):[]}function Hp(t,e,r){var o=t==null?0:t.length;return o?(e=r||e===n?1:lt(e),e=o-e,be(t,0,e<0?0:e)):[]}function $p(t,e){return t&&t.length?Mr(t,nt(e,3),!0,!0):[]}function Gp(t,e){return t&&t.length?Mr(t,nt(e,3),!0):[]}function zp(t,e,r,o){var c=t==null?0:t.length;return c?(r&&typeof r!="number"&&Qt(t,e,r)&&(r=0,o=c),Fl(t,e,r,o)):[]}function vu(t,e,r){var o=t==null?0:t.length;if(!o)return-1;var c=r==null?0:lt(r);return c<0&&(c=Ft(o+c,0)),mr(t,nt(e,3),c)}function yu(t,e,r){var o=t==null?0:t.length;if(!o)return-1;var c=o-1;return r!==n&&(c=lt(r),c=r<0?Ft(o+c,0):Jt(c,o-1)),mr(t,nt(e,3),c,!0)}function mu(t){var e=t==null?0:t.length;return e?$t(t,1):[]}function Xp(t){var e=t==null?0:t.length;return e?$t(t,Rt):[]}function Jp(t,e){var r=t==null?0:t.length;return r?(e=e===n?1:lt(e),$t(t,e)):[]}function Vp(t){for(var e=-1,r=t==null?0:t.length,o={};++e<r;){var c=t[e];o[c[0]]=c[1]}return o}function _u(t){return t&&t.length?t[0]:n}function Yp(t,e,r){var o=t==null?0:t.length;if(!o)return-1;var c=r==null?0:lt(r);return c<0&&(c=Ft(o+c,0)),bn(t,e,c)}function jp(t){var e=t==null?0:t.length;return e?be(t,0,-1):[]}var Zp=dt(function(t){var e=It(t,ls);return e.length&&e[0]===t[0]?ns(e):[]}),Qp=dt(function(t){var e=Se(t),r=It(t,ls);return e===Se(r)?e=n:r.pop(),r.length&&r[0]===t[0]?ns(r,nt(e,2)):[]}),td=dt(function(t){var e=Se(t),r=It(t,ls);return e=typeof e=="function"?e:n,e&&r.pop(),r.length&&r[0]===t[0]?ns(r,n,e):[]});function ed(t,e){return t==null?"":jh.call(t,e)}function Se(t){var e=t==null?0:t.length;return e?t[e-1]:n}function nd(t,e,r){var o=t==null?0:t.length;if(!o)return-1;var c=o;return r!==n&&(c=lt(r),c=c<0?Ft(o+c,0):Jt(c,o-1)),e===e?Uh(t,e,c):mr(t,Qo,c,!0)}function rd(t,e){return t&&t.length?Oa(t,lt(e)):n}var id=dt(wu);function wu(t,e){return t&&t.length&&e&&e.length?os(t,e):t}function sd(t,e,r){return t&&t.length&&e&&e.length?os(t,e,nt(r,2)):t}function od(t,e,r){return t&&t.length&&e&&e.length?os(t,e,n,r):t}var ad=$e(function(t,e){var r=t==null?0:t.length,o=Zi(t,e);return Na(t,It(e,function(c){return Ge(c,r)?+c:c}).sort(Ha)),o});function ud(t,e){var r=[];if(!(t&&t.length))return r;var o=-1,c=[],d=t.length;for(e=nt(e,3);++o<d;){var w=t[o];e(w,o,t)&&(r.push(w),c.push(o))}return Na(t,c),r}function Es(t){return t==null?t:el.call(t)}function cd(t,e,r){var o=t==null?0:t.length;return o?(r&&typeof r!="number"&&Qt(t,e,r)?(e=0,r=o):(e=e==null?0:lt(e),r=r===n?o:lt(r)),be(t,e,r)):[]}function fd(t,e){return Fr(t,e)}function hd(t,e,r){return cs(t,e,nt(r,2))}function ld(t,e){var r=t==null?0:t.length;if(r){var o=Fr(t,e);if(o<r&&xe(t[o],e))return o}return-1}function pd(t,e){return Fr(t,e,!0)}function dd(t,e,r){return cs(t,e,nt(r,2),!0)}function gd(t,e){var r=t==null?0:t.length;if(r){var o=Fr(t,e,!0)-1;if(xe(t[o],e))return o}return-1}function vd(t){return t&&t.length?Ua(t):[]}function yd(t,e){return t&&t.length?Ua(t,nt(e,2)):[]}function md(t){var e=t==null?0:t.length;return e?be(t,1,e):[]}function _d(t,e,r){return t&&t.length?(e=r||e===n?1:lt(e),be(t,0,e<0?0:e)):[]}function wd(t,e,r){var o=t==null?0:t.length;return o?(e=r||e===n?1:lt(e),e=o-e,be(t,e<0?0:e,o)):[]}function bd(t,e){return t&&t.length?Mr(t,nt(e,3),!1,!0):[]}function Sd(t,e){return t&&t.length?Mr(t,nt(e,3)):[]}var Cd=dt(function(t){return en($t(t,1,Bt,!0))}),kd=dt(function(t){var e=Se(t);return Bt(e)&&(e=n),en($t(t,1,Bt,!0),nt(e,2))}),Ad=dt(function(t){var e=Se(t);return e=typeof e=="function"?e:n,en($t(t,1,Bt,!0),n,e)});function Ed(t){return t&&t.length?en(t):[]}function Td(t,e){return t&&t.length?en(t,nt(e,2)):[]}function xd(t,e){return e=typeof e=="function"?e:n,t&&t.length?en(t,n,e):[]}function Ts(t){if(!(t&&t.length))return[];var e=0;return t=Ye(t,function(r){if(Bt(r))return e=Ft(r.length,e),!0}),$i(e,function(r){return It(t,Wi(r))})}function bu(t,e){if(!(t&&t.length))return[];var r=Ts(t);return e==null?r:It(r,function(o){return ce(e,n,o)})}var Rd=dt(function(t,e){return Bt(t)?Vn(t,e):[]}),Od=dt(function(t){return hs(Ye(t,Bt))}),Id=dt(function(t){var e=Se(t);return Bt(e)&&(e=n),hs(Ye(t,Bt),nt(e,2))}),Ld=dt(function(t){var e=Se(t);return e=typeof e=="function"?e:n,hs(Ye(t,Bt),n,e)}),Nd=dt(Ts);function Bd(t,e){return Ma(t||[],e||[],Jn)}function Ud(t,e){return Ma(t||[],e||[],Zn)}var Dd=dt(function(t){var e=t.length,r=e>1?t[e-1]:n;return r=typeof r=="function"?(t.pop(),r):n,bu(t,r)});function Su(t){var e=p(t);return e.__chain__=!0,e}function Pd(t,e){return e(t),t}function Jr(t,e){return e(t)}var Fd=$e(function(t){var e=t.length,r=e?t[0]:0,o=this.__wrapped__,c=function(d){return Zi(d,t)};return e>1||this.__actions__.length||!(o instanceof vt)||!Ge(r)?this.thru(c):(o=o.slice(r,+r+(e?1:0)),o.__actions__.push({func:Jr,args:[c],thisArg:n}),new _e(o,this.__chain__).thru(function(d){return e&&!d.length&&d.push(n),d}))});function Md(){return Su(this)}function qd(){return new _e(this.value(),this.__chain__)}function Wd(){this.__values__===n&&(this.__values__=Du(this.value()));var t=this.__index__>=this.__values__.length,e=t?n:this.__values__[this.__index__++];return{done:t,value:e}}function Kd(){return this}function Hd(t){for(var e,r=this;r instanceof Nr;){var o=gu(r);o.__index__=0,o.__values__=n,e?c.__wrapped__=o:e=o;var c=o;r=r.__wrapped__}return c.__wrapped__=t,e}function $d(){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:Jr,args:[Es],thisArg:n}),new _e(e,this.__chain__)}return this.thru(Es)}function Gd(){return Fa(this.__wrapped__,this.__actions__)}var zd=qr(function(t,e,r){Ct.call(t,r)?++t[r]:Ke(t,r,1)});function Xd(t,e,r){var o=ft(t)?jo:Pl;return r&&Qt(t,e,r)&&(e=n),o(t,nt(e,3))}function Jd(t,e){var r=ft(t)?Ye:ba;return r(t,nt(e,3))}var Vd=Va(vu),Yd=Va(yu);function jd(t,e){return $t(Vr(t,e),1)}function Zd(t,e){return $t(Vr(t,e),Rt)}function Qd(t,e,r){return r=r===n?1:lt(r),$t(Vr(t,e),r)}function Cu(t,e){var r=ft(t)?ye:tn;return r(t,nt(e,3))}function ku(t,e){var r=ft(t)?mh:wa;return r(t,nt(e,3))}var tg=qr(function(t,e,r){Ct.call(t,r)?t[r].push(e):Ke(t,r,[e])});function eg(t,e,r,o){t=ie(t)?t:Nn(t),r=r&&!o?lt(r):0;var c=t.length;return r<0&&(r=Ft(c+r,0)),ti(t)?r<=c&&t.indexOf(e,r)>-1:!!c&&bn(t,e,r)>-1}var ng=dt(function(t,e,r){var o=-1,c=typeof e=="function",d=ie(t)?T(t.length):[];return tn(t,function(w){d[++o]=c?ce(e,w,r):Yn(w,e,r)}),d}),rg=qr(function(t,e,r){Ke(t,r,e)});function Vr(t,e){var r=ft(t)?It:Ta;return r(t,nt(e,3))}function ig(t,e,r,o){return t==null?[]:(ft(e)||(e=e==null?[]:[e]),r=o?n:r,ft(r)||(r=r==null?[]:[r]),Ia(t,e,r))}var sg=qr(function(t,e,r){t[r?0:1].push(e)},function(){return[[],[]]});function og(t,e,r){var o=ft(t)?Mi:ea,c=arguments.length<3;return o(t,nt(e,4),r,c,tn)}function ag(t,e,r){var o=ft(t)?_h:ea,c=arguments.length<3;return o(t,nt(e,4),r,c,wa)}function ug(t,e){var r=ft(t)?Ye:ba;return r(t,Zr(nt(e,3)))}function cg(t){var e=ft(t)?va:ep;return e(t)}function fg(t,e,r){(r?Qt(t,e,r):e===n)?e=1:e=lt(e);var o=ft(t)?Ll:np;return o(t,e)}function hg(t){var e=ft(t)?Nl:ip;return e(t)}function lg(t){if(t==null)return 0;if(ie(t))return ti(t)?Cn(t):t.length;var e=Vt(t);return e==Ot||e==jt?t.size:is(t).length}function pg(t,e,r){var o=ft(t)?qi:sp;return r&&Qt(t,e,r)&&(e=n),o(t,nt(e,3))}var dg=dt(function(t,e){if(t==null)return[];var r=e.length;return r>1&&Qt(t,e[0],e[1])?e=[]:r>2&&Qt(e[0],e[1],e[2])&&(e=[e[0]]),Ia(t,$t(e,1),[])}),Yr=Jh||function(){return Ht.Date.now()};function gg(t,e){if(typeof e!="function")throw new me(m);return t=lt(t),function(){if(--t<1)return e.apply(this,arguments)}}function Au(t,e,r){return e=r?n:e,e=t&&e==null?t.length:e,He(t,M,n,n,n,n,e)}function Eu(t,e){var r;if(typeof e!="function")throw new me(m);return t=lt(t),function(){return--t>0&&(r=e.apply(this,arguments)),t<=1&&(e=n),r}}var xs=dt(function(t,e,r){var o=x;if(r.length){var c=Ze(r,In(xs));o|=$}return He(t,o,e,r,c)}),Tu=dt(function(t,e,r){var o=x|W;if(r.length){var c=Ze(r,In(Tu));o|=$}return He(e,o,t,r,c)});function xu(t,e,r){e=r?n:e;var o=He(t,V,n,n,n,n,n,e);return o.placeholder=xu.placeholder,o}function Ru(t,e,r){e=r?n:e;var o=He(t,ot,n,n,n,n,n,e);return o.placeholder=Ru.placeholder,o}function Ou(t,e,r){var o,c,d,w,C,A,O=0,I=!1,N=!1,K=!0;if(typeof t!="function")throw new me(m);e=Ce(e)||0,Lt(r)&&(I=!!r.leading,N="maxWait"in r,d=N?Ft(Ce(r.maxWait)||0,e):d,K="trailing"in r?!!r.trailing:K);function Y(Ut){var Re=o,Je=c;return o=c=n,O=Ut,w=t.apply(Je,Re),w}function rt(Ut){return O=Ut,C=er(gt,e),I?Y(Ut):w}function pt(Ut){var Re=Ut-A,Je=Ut-O,Vu=e-Re;return N?Jt(Vu,d-Je):Vu}function it(Ut){var Re=Ut-A,Je=Ut-O;return A===n||Re>=e||Re<0||N&&Je>=d}function gt(){var Ut=Yr();if(it(Ut))return mt(Ut);C=er(gt,pt(Ut))}function mt(Ut){return C=n,K&&o?Y(Ut):(o=c=n,w)}function pe(){C!==n&&qa(C),O=0,o=A=c=C=n}function te(){return C===n?w:mt(Yr())}function de(){var Ut=Yr(),Re=it(Ut);if(o=arguments,c=this,A=Ut,Re){if(C===n)return rt(A);if(N)return qa(C),C=er(gt,e),Y(A)}return C===n&&(C=er(gt,e)),w}return de.cancel=pe,de.flush=te,de}var vg=dt(function(t,e){return _a(t,1,e)}),yg=dt(function(t,e,r){return _a(t,Ce(e)||0,r)});function mg(t){return He(t,L)}function jr(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new me(m);var r=function(){var o=arguments,c=e?e.apply(this,o):o[0],d=r.cache;if(d.has(c))return d.get(c);var w=t.apply(this,o);return r.cache=d.set(c,w)||d,w};return r.cache=new(jr.Cache||We),r}jr.Cache=We;function Zr(t){if(typeof t!="function")throw new me(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 _g(t){return Eu(2,t)}var wg=op(function(t,e){e=e.length==1&&ft(e[0])?It(e[0],fe(nt())):It($t(e,1),fe(nt()));var r=e.length;return dt(function(o){for(var c=-1,d=Jt(o.length,r);++c<d;)o[c]=e[c].call(this,o[c]);return ce(t,this,o)})}),Rs=dt(function(t,e){var r=Ze(e,In(Rs));return He(t,$,n,e,r)}),Iu=dt(function(t,e){var r=Ze(e,In(Iu));return He(t,D,n,e,r)}),bg=$e(function(t,e){return He(t,H,n,n,n,e)});function Sg(t,e){if(typeof t!="function")throw new me(m);return e=e===n?e:lt(e),dt(t,e)}function Cg(t,e){if(typeof t!="function")throw new me(m);return e=e==null?0:Ft(lt(e),0),dt(function(r){var o=r[e],c=rn(r,0,e);return o&&je(c,o),ce(t,this,c)})}function kg(t,e,r){var o=!0,c=!0;if(typeof t!="function")throw new me(m);return Lt(r)&&(o="leading"in r?!!r.leading:o,c="trailing"in r?!!r.trailing:c),Ou(t,e,{leading:o,maxWait:e,trailing:c})}function Ag(t){return Au(t,1)}function Eg(t,e){return Rs(ps(e),t)}function Tg(){if(!arguments.length)return[];var t=arguments[0];return ft(t)?t:[t]}function xg(t){return we(t,f)}function Rg(t,e){return e=typeof e=="function"?e:n,we(t,f,e)}function Og(t){return we(t,y|f)}function Ig(t,e){return e=typeof e=="function"?e:n,we(t,y|f,e)}function Lg(t,e){return e==null||ma(t,e,qt(e))}function xe(t,e){return t===e||t!==t&&e!==e}var Ng=$r(es),Bg=$r(function(t,e){return t>=e}),vn=ka(function(){return arguments}())?ka:function(t){return Nt(t)&&Ct.call(t,"callee")&&!fa.call(t,"callee")},ft=T.isArray,Ug=Go?fe(Go):Hl;function ie(t){return t!=null&&Qr(t.length)&&!ze(t)}function Bt(t){return Nt(t)&&ie(t)}function Dg(t){return t===!0||t===!1||Nt(t)&&Zt(t)==Z}var sn=Yh||qs,Pg=zo?fe(zo):$l;function Fg(t){return Nt(t)&&t.nodeType===1&&!nr(t)}function Mg(t){if(t==null)return!0;if(ie(t)&&(ft(t)||typeof t=="string"||typeof t.splice=="function"||sn(t)||Ln(t)||vn(t)))return!t.length;var e=Vt(t);if(e==Ot||e==jt)return!t.size;if(tr(t))return!is(t).length;for(var r in t)if(Ct.call(t,r))return!1;return!0}function qg(t,e){return jn(t,e)}function Wg(t,e,r){r=typeof r=="function"?r:n;var o=r?r(t,e):n;return o===n?jn(t,e,n,r):!!o}function Os(t){if(!Nt(t))return!1;var e=Zt(t);return e==at||e==z||typeof t.message=="string"&&typeof t.name=="string"&&!nr(t)}function Kg(t){return typeof t=="number"&&la(t)}function ze(t){if(!Lt(t))return!1;var e=Zt(t);return e==bt||e==Xt||e==P||e==Mn}function Lu(t){return typeof t=="number"&&t==lt(t)}function Qr(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 Nu=Xo?fe(Xo):zl;function Hg(t,e){return t===e||rs(t,e,ws(e))}function $g(t,e,r){return r=typeof r=="function"?r:n,rs(t,e,ws(e),r)}function Gg(t){return Bu(t)&&t!=+t}function zg(t){if(Rp(t))throw new ct(h);return Aa(t)}function Xg(t){return t===null}function Jg(t){return t==null}function Bu(t){return typeof t=="number"||Nt(t)&&Zt(t)==Ae}function nr(t){if(!Nt(t)||Zt(t)!=ue)return!1;var e=Er(t);if(e===null)return!0;var r=Ct.call(e,"constructor")&&e.constructor;return typeof r=="function"&&r instanceof r&&Sr.call(r)==$h}var Is=Jo?fe(Jo):Xl;function Vg(t){return Lu(t)&&t>=-ut&&t<=ut}var Uu=Vo?fe(Vo):Jl;function ti(t){return typeof t=="string"||!ft(t)&&Nt(t)&&Zt(t)==Ne}function le(t){return typeof t=="symbol"||Nt(t)&&Zt(t)==Be}var Ln=Yo?fe(Yo):Vl;function Yg(t){return t===n}function jg(t){return Nt(t)&&Vt(t)==Me}function Zg(t){return Nt(t)&&Zt(t)==Wn}var Qg=$r(ss),tv=$r(function(t,e){return t<=e});function Du(t){if(!t)return[];if(ie(t))return ti(t)?Ee(t):re(t);if(Hn&&t[Hn])return Lh(t[Hn]());var e=Vt(t),r=e==Ot?zi:e==jt?_r:Nn;return r(t)}function Xe(t){if(!t)return t===0?t:0;if(t=Ce(t),t===Rt||t===-Rt){var e=t<0?-1:1;return e*zt}return t===t?t:0}function lt(t){var e=Xe(t),r=e%1;return e===e?r?e-r:e:0}function Pu(t){return t?ln(lt(t),0,ae):0}function Ce(t){if(typeof t=="number")return t;if(le(t))return Le;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=na(t);var r=Uf.test(t);return r||Pf.test(t)?gh(t.slice(2),r?2:8):Bf.test(t)?Le:+t}function Fu(t){return De(t,se(t))}function ev(t){return t?ln(lt(t),-ut,ut):t===0?t:0}function St(t){return t==null?"":he(t)}var nv=Rn(function(t,e){if(tr(e)||ie(e)){De(e,qt(e),t);return}for(var r in e)Ct.call(e,r)&&Jn(t,r,e[r])}),Mu=Rn(function(t,e){De(e,se(e),t)}),ei=Rn(function(t,e,r,o){De(e,se(e),t,o)}),rv=Rn(function(t,e,r,o){De(e,qt(e),t,o)}),iv=$e(Zi);function sv(t,e){var r=xn(t);return e==null?r:ya(r,e)}var ov=dt(function(t,e){t=Et(t);var r=-1,o=e.length,c=o>2?e[2]:n;for(c&&Qt(e[0],e[1],c)&&(o=1);++r<o;)for(var d=e[r],w=se(d),C=-1,A=w.length;++C<A;){var O=w[C],I=t[O];(I===n||xe(I,An[O])&&!Ct.call(t,O))&&(t[O]=d[O])}return t}),av=dt(function(t){return t.push(n,nu),ce(qu,n,t)});function uv(t,e){return Zo(t,nt(e,3),Ue)}function cv(t,e){return Zo(t,nt(e,3),ts)}function fv(t,e){return t==null?t:Qi(t,nt(e,3),se)}function hv(t,e){return t==null?t:Sa(t,nt(e,3),se)}function lv(t,e){return t&&Ue(t,nt(e,3))}function pv(t,e){return t&&ts(t,nt(e,3))}function dv(t){return t==null?[]:Dr(t,qt(t))}function gv(t){return t==null?[]:Dr(t,se(t))}function Ls(t,e,r){var o=t==null?n:pn(t,e);return o===n?r:o}function vv(t,e){return t!=null&&su(t,e,Ml)}function Ns(t,e){return t!=null&&su(t,e,ql)}var yv=ja(function(t,e,r){e!=null&&typeof e.toString!="function"&&(e=Cr.call(e)),t[e]=r},Us(oe)),mv=ja(function(t,e,r){e!=null&&typeof e.toString!="function"&&(e=Cr.call(e)),Ct.call(t,e)?t[e].push(r):t[e]=[r]},nt),_v=dt(Yn);function qt(t){return ie(t)?ga(t):is(t)}function se(t){return ie(t)?ga(t,!0):Yl(t)}function wv(t,e){var r={};return e=nt(e,3),Ue(t,function(o,c,d){Ke(r,e(o,c,d),o)}),r}function bv(t,e){var r={};return e=nt(e,3),Ue(t,function(o,c,d){Ke(r,c,e(o,c,d))}),r}var Sv=Rn(function(t,e,r){Pr(t,e,r)}),qu=Rn(function(t,e,r,o){Pr(t,e,r,o)}),Cv=$e(function(t,e){var r={};if(t==null)return r;var o=!1;e=It(e,function(d){return d=nn(d,t),o||(o=d.length>1),d}),De(t,ms(t),r),o&&(r=we(r,y|l|f,yp));for(var c=e.length;c--;)fs(r,e[c]);return r});function kv(t,e){return Wu(t,Zr(nt(e)))}var Av=$e(function(t,e){return t==null?{}:Zl(t,e)});function Wu(t,e){if(t==null)return{};var r=It(ms(t),function(o){return[o]});return e=nt(e),La(t,r,function(o,c){return e(o,c[0])})}function Ev(t,e,r){e=nn(e,t);var o=-1,c=e.length;for(c||(c=1,t=n);++o<c;){var d=t==null?n:t[Pe(e[o])];d===n&&(o=c,d=r),t=ze(d)?d.call(t):d}return t}function Tv(t,e,r){return t==null?t:Zn(t,e,r)}function xv(t,e,r,o){return o=typeof o=="function"?o:n,t==null?t:Zn(t,e,r,o)}var Ku=tu(qt),Hu=tu(se);function Rv(t,e,r){var o=ft(t),c=o||sn(t)||Ln(t);if(e=nt(e,4),r==null){var d=t&&t.constructor;c?r=o?new d:[]:Lt(t)?r=ze(d)?xn(Er(t)):{}:r={}}return(c?ye:Ue)(t,function(w,C,A){return e(r,w,C,A)}),r}function Ov(t,e){return t==null?!0:fs(t,e)}function Iv(t,e,r){return t==null?t:Pa(t,e,ps(r))}function Lv(t,e,r,o){return o=typeof o=="function"?o:n,t==null?t:Pa(t,e,ps(r),o)}function Nn(t){return t==null?[]:Gi(t,qt(t))}function Nv(t){return t==null?[]:Gi(t,se(t))}function Bv(t,e,r){return r===n&&(r=e,e=n),r!==n&&(r=Ce(r),r=r===r?r:0),e!==n&&(e=Ce(e),e=e===e?e:0),ln(Ce(t),e,r)}function Uv(t,e,r){return e=Xe(e),r===n?(r=e,e=0):r=Xe(r),t=Ce(t),Wl(t,e,r)}function Dv(t,e,r){if(r&&typeof r!="boolean"&&Qt(t,e,r)&&(e=r=n),r===n&&(typeof e=="boolean"?(r=e,e=n):typeof t=="boolean"&&(r=t,t=n)),t===n&&e===n?(t=0,e=1):(t=Xe(t),e===n?(e=t,t=0):e=Xe(e)),t>e){var o=t;t=e,e=o}if(r||t%1||e%1){var c=pa();return Jt(t+c*(e-t+dh("1e-"+((c+"").length-1))),e)}return as(t,e)}var Pv=On(function(t,e,r){return e=e.toLowerCase(),t+(r?$u(e):e)});function $u(t){return Bs(St(t).toLowerCase())}function Gu(t){return t=St(t),t&&t.replace(Mf,Th).replace(ih,"")}function Fv(t,e,r){t=St(t),e=he(e);var o=t.length;r=r===n?o:ln(lt(r),0,o);var c=r;return r-=e.length,r>=0&&t.slice(r,c)==e}function Mv(t){return t=St(t),t&&_f.test(t)?t.replace(So,xh):t}function qv(t){return t=St(t),t&&Af.test(t)?t.replace(Ri,"\\$&"):t}var Wv=On(function(t,e,r){return t+(r?"-":"")+e.toLowerCase()}),Kv=On(function(t,e,r){return t+(r?" ":"")+e.toLowerCase()}),Hv=Ja("toLowerCase");function $v(t,e,r){t=St(t),e=lt(e);var o=e?Cn(t):0;if(!e||o>=e)return t;var c=(e-o)/2;return Hr(Or(c),r)+t+Hr(Rr(c),r)}function Gv(t,e,r){t=St(t),e=lt(e);var o=e?Cn(t):0;return e&&o<e?t+Hr(e-o,r):t}function zv(t,e,r){t=St(t),e=lt(e);var o=e?Cn(t):0;return e&&o<e?Hr(e-o,r)+t:t}function Xv(t,e,r){return r||e==null?e=0:e&&(e=+e),tl(St(t).replace(Oi,""),e||0)}function Jv(t,e,r){return(r?Qt(t,e,r):e===n)?e=1:e=lt(e),us(St(t),e)}function Vv(){var t=arguments,e=St(t[0]);return t.length<3?e:e.replace(t[1],t[2])}var Yv=On(function(t,e,r){return t+(r?"_":"")+e.toLowerCase()});function jv(t,e,r){return r&&typeof r!="number"&&Qt(t,e,r)&&(e=r=n),r=r===n?ae:r>>>0,r?(t=St(t),t&&(typeof e=="string"||e!=null&&!Is(e))&&(e=he(e),!e&&Sn(t))?rn(Ee(t),0,r):t.split(e,r)):[]}var Zv=On(function(t,e,r){return t+(r?" ":"")+Bs(e)});function Qv(t,e,r){return t=St(t),r=r==null?0:ln(lt(r),0,t.length),e=he(e),t.slice(r,r+e.length)==e}function ty(t,e,r){var o=p.templateSettings;r&&Qt(t,e,r)&&(e=n),t=St(t),e=ei({},e,o,eu);var c=ei({},e.imports,o.imports,eu),d=qt(c),w=Gi(c,d),C,A,O=0,I=e.interpolate||dr,N="__p += '",K=Xi((e.escape||dr).source+"|"+I.source+"|"+(I===Co?Nf:dr).source+"|"+(e.evaluate||dr).source+"|$","g"),Y="//# sourceURL="+(Ct.call(e,"sourceURL")?(e.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++ch+"]")+`
|
|
16
|
+
`;t.replace(K,function(it,gt,mt,pe,te,de){return mt||(mt=pe),N+=t.slice(O,de).replace(qf,Rh),gt&&(C=!0,N+=`' +
|
|
17
17
|
__e(`+gt+`) +
|
|
18
18
|
'`),te&&(A=!0,N+=`';
|
|
19
19
|
`+te+`;
|
|
20
20
|
__p += '`),mt&&(N+=`' +
|
|
21
21
|
((__t = (`+mt+`)) == null ? '' : __t) +
|
|
22
|
-
'`),
|
|
22
|
+
'`),O=de+it.length,it}),N+=`';
|
|
23
23
|
`;var rt=Ct.call(e,"variable")&&e.variable;if(!rt)N=`with (obj) {
|
|
24
24
|
`+N+`
|
|
25
25
|
}
|
|
@@ -29,17 +29,17 @@ __p += '`),mt&&(N+=`' +
|
|
|
29
29
|
function print() { __p += __j.call(arguments, '') }
|
|
30
30
|
`:`;
|
|
31
31
|
`)+N+`return __p
|
|
32
|
-
}`;var pt=Xu(function(){return _t(d,Y+"return "+N).apply(n,w)});if(pt.source=N,Rs(pt))throw pt;return pt}function ey(t){return St(t).toLowerCase()}function ny(t){return St(t).toUpperCase()}function ry(t,e,r){if(t=St(t),t&&(r||e===n))return na(t);if(!t||!(e=he(e)))return t;var o=Ee(t),c=Ee(e),d=ra(o,c),w=ia(o,c)+1;return rn(o,d,w).join("")}function iy(t,e,r){if(t=St(t),t&&(r||e===n))return t.slice(0,oa(t)+1);if(!t||!(e=he(e)))return t;var o=Ee(t),c=ia(o,Ee(e))+1;return rn(o,0,c).join("")}function sy(t,e,r){if(t=St(t),t&&(r||e===n))return t.replace(Ri,"");if(!t||!(e=he(e)))return t;var o=Ee(t),c=ra(o,Ee(e));return rn(o,c).join("")}function oy(t,e){var r=U,o=X;if(Lt(e)){var c="separator"in e?e.separator:c;r="length"in e?lt(e.length):r,o="omission"in e?he(e.omission):o}t=St(t);var d=t.length;if(Sn(t)){var w=Ee(t);d=w.length}if(r>=d)return t;var C=r-Cn(o);if(C<1)return o;var A=w?rn(w,0,C).join(""):t.slice(0,C);if(c===n)return A+o;if(w&&(C+=A.length-C),Is(c)){if(t.slice(C).search(c)){var R,I=A;for(c.global||(c=Xi(c.source,St(ko.exec(c))+"g")),c.lastIndex=0;R=c.exec(I);)var N=R.index;A=A.slice(0,N===n?C:N)}}else if(t.indexOf(he(c),C)!=C){var K=A.lastIndexOf(c);K>-1&&(A=A.slice(0,K))}return A+o}function ay(t){return t=St(t),t&&mf.test(t)?t.replace(bo,Dh):t}var uy=Rn(function(t,e,r){return t+(r?" ":"")+e.toUpperCase()}),Bs=Ja("toUpperCase");function zu(t,e,r){return t=St(t),e=r?n:e,e===n?Ih(t)?Mh(t):Sh(t):t.match(e)||[]}var Xu=dt(function(t,e){try{return ce(t,n,e)}catch(r){return Rs(r)?r:new ct(r)}}),cy=$e(function(t,e){return ye(e,function(r){r=Pe(r),Ke(t,r,xs(t[r],t))}),t});function fy(t){var e=t==null?0:t.length,r=nt();return t=e?It(t,function(o){if(typeof o[1]!="function")throw new me(m);return[r(o[0]),o[1]]}):[],dt(function(o){for(var c=-1;++c<e;){var d=t[c];if(ce(d[0],this,o))return ce(d[1],this,o)}})}function hy(t){return Dl(we(t,y))}function Us(t){return function(){return t}}function ly(t,e){return t==null||t!==t?e:t}var py=Ya(),dy=Ya(!0);function se(t){return t}function Ds(t){return Ea(typeof t=="function"?t:we(t,y))}function gy(t){return xa(we(t,y))}function vy(t,e){return Oa(t,we(e,y))}var yy=dt(function(t,e){return function(r){return Yn(r,t,e)}}),my=dt(function(t,e){return function(r){return Yn(t,r,e)}});function Ps(t,e,r){var o=qt(e),c=Dr(e,o);r==null&&!(Lt(e)&&(c.length||!o.length))&&(r=e,e=t,t=this,c=Dr(e,qt(e)));var d=!(Lt(r)&&"chain"in r)||!!r.chain,w=ze(t);return ye(c,function(C){var A=e[C];t[C]=A,w&&(t.prototype[C]=function(){var R=this.__chain__;if(d||R){var I=t(this.__wrapped__),N=I.__actions__=ne(this.__actions__);return N.push({func:A,args:arguments,thisArg:t}),I.__chain__=R,I}return A.apply(t,je([this.value()],arguments))})}),t}function _y(){return Ht._===this&&(Ht._=Gh),this}function Fs(){}function wy(t){return t=lt(t),dt(function(e){return Ra(e,t)})}var by=gs(It),Sy=gs(jo),Cy=gs(qi);function Ju(t){return Ss(t)?Wi(Pe(t)):Ql(t)}function ky(t){return function(e){return t==null?n:pn(t,e)}}var Ay=Za(),Ey=Za(!0);function Ms(){return[]}function qs(){return!1}function Ty(){return{}}function xy(){return""}function Oy(){return!0}function Ry(t,e){if(t=lt(t),t<1||t>ut)return[];var r=ae,o=Jt(t,ae);e=nt(e),t-=ae;for(var c=$i(o,e);++r<t;)e(r);return c}function Iy(t){return ft(t)?It(t,Pe):le(t)?[t]:ne(du(St(t)))}function Ly(t){var e=++Hh;return St(t)+e}var Ny=Kr(function(t,e){return t+e},0),By=vs("ceil"),Uy=Kr(function(t,e){return t/e},1),Dy=vs("floor");function Py(t){return t&&t.length?Ur(t,se,es):n}function Fy(t,e){return t&&t.length?Ur(t,nt(e,2),es):n}function My(t){return ta(t,se)}function qy(t,e){return ta(t,nt(e,2))}function Wy(t){return t&&t.length?Ur(t,se,ss):n}function Ky(t,e){return t&&t.length?Ur(t,nt(e,2),ss):n}var Hy=Kr(function(t,e){return t*e},1),$y=vs("round"),Gy=Kr(function(t,e){return t-e},0);function zy(t){return t&&t.length?Hi(t,se):0}function Xy(t,e){return t&&t.length?Hi(t,nt(e,2)):0}return p.after=gg,p.ary=Au,p.assign=nv,p.assignIn=Mu,p.assignInWith=ei,p.assignWith=rv,p.at=iv,p.before=Eu,p.bind=xs,p.bindAll=cy,p.bindKey=Tu,p.castArray=Tg,p.chain=Su,p.chunk=Dp,p.compact=Pp,p.concat=Fp,p.cond=fy,p.conforms=hy,p.constant=Us,p.countBy=zd,p.create=sv,p.curry=xu,p.curryRight=Ou,p.debounce=Ru,p.defaults=ov,p.defaultsDeep=av,p.defer=vg,p.delay=yg,p.difference=Mp,p.differenceBy=qp,p.differenceWith=Wp,p.drop=Kp,p.dropRight=Hp,p.dropRightWhile=$p,p.dropWhile=Gp,p.fill=zp,p.filter=Jd,p.flatMap=jd,p.flatMapDeep=Zd,p.flatMapDepth=Qd,p.flatten=mu,p.flattenDeep=Xp,p.flattenDepth=Jp,p.flip=mg,p.flow=py,p.flowRight=dy,p.fromPairs=Vp,p.functions=dv,p.functionsIn=gv,p.groupBy=tg,p.initial=jp,p.intersection=Zp,p.intersectionBy=Qp,p.intersectionWith=td,p.invert=yv,p.invertBy=mv,p.invokeMap=ng,p.iteratee=Ds,p.keyBy=rg,p.keys=qt,p.keysIn=ie,p.map=Vr,p.mapKeys=wv,p.mapValues=bv,p.matches=gy,p.matchesProperty=vy,p.memoize=jr,p.merge=Sv,p.mergeWith=qu,p.method=yy,p.methodOf=my,p.mixin=Ps,p.negate=Zr,p.nthArg=wy,p.omit=Cv,p.omitBy=kv,p.once=_g,p.orderBy=ig,p.over=by,p.overArgs=wg,p.overEvery=Sy,p.overSome=Cy,p.partial=Os,p.partialRight=Iu,p.partition=sg,p.pick=Av,p.pickBy=Wu,p.property=Ju,p.propertyOf=ky,p.pull=id,p.pullAll=wu,p.pullAllBy=sd,p.pullAllWith=od,p.pullAt=ad,p.range=Ay,p.rangeRight=Ey,p.rearg=bg,p.reject=ug,p.remove=ud,p.rest=Sg,p.reverse=Es,p.sampleSize=fg,p.set=Tv,p.setWith=xv,p.shuffle=hg,p.slice=cd,p.sortBy=dg,p.sortedUniq=vd,p.sortedUniqBy=yd,p.split=jv,p.spread=Cg,p.tail=md,p.take=_d,p.takeRight=wd,p.takeRightWhile=bd,p.takeWhile=Sd,p.tap=Pd,p.throttle=kg,p.thru=Jr,p.toArray=Du,p.toPairs=Ku,p.toPairsIn=Hu,p.toPath=Iy,p.toPlainObject=Fu,p.transform=Ov,p.unary=Ag,p.union=Cd,p.unionBy=kd,p.unionWith=Ad,p.uniq=Ed,p.uniqBy=Td,p.uniqWith=xd,p.unset=Rv,p.unzip=Ts,p.unzipWith=bu,p.update=Iv,p.updateWith=Lv,p.values=Nn,p.valuesIn=Nv,p.without=Od,p.words=zu,p.wrap=Eg,p.xor=Rd,p.xorBy=Id,p.xorWith=Ld,p.zip=Nd,p.zipObject=Bd,p.zipObjectDeep=Ud,p.zipWith=Dd,p.entries=Ku,p.entriesIn=Hu,p.extend=Mu,p.extendWith=ei,Ps(p,p),p.add=Ny,p.attempt=Xu,p.camelCase=Pv,p.capitalize=$u,p.ceil=By,p.clamp=Bv,p.clone=xg,p.cloneDeep=Rg,p.cloneDeepWith=Ig,p.cloneWith=Og,p.conformsTo=Lg,p.deburr=Gu,p.defaultTo=ly,p.divide=Uy,p.endsWith=Fv,p.eq=xe,p.escape=Mv,p.escapeRegExp=qv,p.every=Xd,p.find=Vd,p.findIndex=vu,p.findKey=uv,p.findLast=Yd,p.findLastIndex=yu,p.findLastKey=cv,p.floor=Dy,p.forEach=Cu,p.forEachRight=ku,p.forIn=fv,p.forInRight=hv,p.forOwn=lv,p.forOwnRight=pv,p.get=Ls,p.gt=Ng,p.gte=Bg,p.has=vv,p.hasIn=Ns,p.head=_u,p.identity=se,p.includes=eg,p.indexOf=Yp,p.inRange=Uv,p.invoke=_v,p.isArguments=vn,p.isArray=ft,p.isArrayBuffer=Ug,p.isArrayLike=re,p.isArrayLikeObject=Bt,p.isBoolean=Dg,p.isBuffer=sn,p.isDate=Pg,p.isElement=Fg,p.isEmpty=Mg,p.isEqual=qg,p.isEqualWith=Wg,p.isError=Rs,p.isFinite=Kg,p.isFunction=ze,p.isInteger=Lu,p.isLength=Qr,p.isMap=Nu,p.isMatch=Hg,p.isMatchWith=$g,p.isNaN=Gg,p.isNative=zg,p.isNil=Jg,p.isNull=Xg,p.isNumber=Bu,p.isObject=Lt,p.isObjectLike=Nt,p.isPlainObject=nr,p.isRegExp=Is,p.isSafeInteger=Vg,p.isSet=Uu,p.isString=ti,p.isSymbol=le,p.isTypedArray=Ln,p.isUndefined=Yg,p.isWeakMap=jg,p.isWeakSet=Zg,p.join=ed,p.kebabCase=Wv,p.last=Se,p.lastIndexOf=nd,p.lowerCase=Kv,p.lowerFirst=Hv,p.lt=Qg,p.lte=tv,p.max=Py,p.maxBy=Fy,p.mean=My,p.meanBy=qy,p.min=Wy,p.minBy=Ky,p.stubArray=Ms,p.stubFalse=qs,p.stubObject=Ty,p.stubString=xy,p.stubTrue=Oy,p.multiply=Hy,p.nth=rd,p.noConflict=_y,p.noop=Fs,p.now=Yr,p.pad=$v,p.padEnd=Gv,p.padStart=zv,p.parseInt=Xv,p.random=Dv,p.reduce=og,p.reduceRight=ag,p.repeat=Jv,p.replace=Vv,p.result=Ev,p.round=$y,p.runInContext=k,p.sample=cg,p.size=lg,p.snakeCase=Yv,p.some=pg,p.sortedIndex=fd,p.sortedIndexBy=hd,p.sortedIndexOf=ld,p.sortedLastIndex=pd,p.sortedLastIndexBy=dd,p.sortedLastIndexOf=gd,p.startCase=Zv,p.startsWith=Qv,p.subtract=Gy,p.sum=zy,p.sumBy=Xy,p.template=ty,p.times=Ry,p.toFinite=Xe,p.toInteger=lt,p.toLength=Pu,p.toLower=ey,p.toNumber=Ce,p.toSafeInteger=ev,p.toString=St,p.toUpper=ny,p.trim=ry,p.trimEnd=iy,p.trimStart=sy,p.truncate=oy,p.unescape=ay,p.uniqueId=Ly,p.upperCase=uy,p.upperFirst=Bs,p.each=Cu,p.eachRight=ku,p.first=_u,Ps(p,function(){var t={};return Ue(p,function(e,r){Ct.call(p.prototype,r)||(t[r]=e)}),t}(),{chain:!1}),p.VERSION=s,ye(["bind","bindKey","curry","curryRight","partial","partialRight"],function(t){p[t].placeholder=p}),ye(["drop","take"],function(t,e){vt.prototype[t]=function(r){r=r===n?1:Ft(lt(r),0);var o=this.__filtered__&&!e?new vt(this):this.clone();return o.__filtered__?o.__takeCount__=Jt(r,o.__takeCount__):o.__views__.push({size:Jt(r,ae),type:t+(o.__dir__<0?"Right":"")}),o},vt.prototype[t+"Right"]=function(r){return this.reverse()[t](r).reverse()}}),ye(["filter","map","takeWhile"],function(t,e){var r=e+1,o=r==B||r==At;vt.prototype[t]=function(c){var d=this.clone();return d.__iteratees__.push({iteratee:nt(c,3),type:r}),d.__filtered__=d.__filtered__||o,d}}),ye(["head","last"],function(t,e){var r="take"+(e?"Right":"");vt.prototype[t]=function(){return this[r](1).value()[0]}}),ye(["initial","tail"],function(t,e){var r="drop"+(e?"":"Right");vt.prototype[t]=function(){return this.__filtered__?new vt(this):this[r](1)}}),vt.prototype.compact=function(){return this.filter(se)},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(r){return Yn(r,t,e)})}),vt.prototype.reject=function(t){return this.filter(Zr(nt(t)))},vt.prototype.slice=function(t,e){t=lt(t);var r=this;return r.__filtered__&&(t>0||e<0)?new vt(r):(t<0?r=r.takeRight(-t):t&&(r=r.drop(t)),e!==n&&(e=lt(e),r=e<0?r.dropRight(-e):r.take(e-t)),r)},vt.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},vt.prototype.toArray=function(){return this.take(ae)},Ue(vt.prototype,function(t,e){var r=/^(?:filter|find|map|reject)|While$/.test(e),o=/^(?:head|last)$/.test(e),c=p[o?"take"+(e=="last"?"Right":""):e],d=o||/^find/.test(e);c&&(p.prototype[e]=function(){var w=this.__wrapped__,C=o?[1]:arguments,A=w instanceof vt,R=C[0],I=A||ft(w),N=function(gt){var mt=c.apply(p,je([gt],C));return o&&K?mt[0]:mt};I&&r&&typeof R=="function"&&R.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:Jr,args:[N],thisArg:n}),new _e(it,K)}return rt&&pt?t.apply(this,C):(it=this.thru(N),rt?o?it.value()[0]:it.value():it)})}),ye(["pop","push","shift","sort","splice","unshift"],function(t){var e=wr[t],r=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",o=/^(?:pop|shift)$/.test(t);p.prototype[t]=function(){var c=arguments;if(o&&!this.__chain__){var d=this.value();return e.apply(ft(d)?d:[],c)}return this[r](function(w){return e.apply(ft(w)?w:[],c)})}}),Ue(vt.prototype,function(t,e){var r=p[e];if(r){var o=r.name+"";Ct.call(Tn,o)||(Tn[o]=[]),Tn[o].push({name:e,func:r})}}),Tn[Wr(n,W).name]=[{name:"wrapper",func:n}],vt.prototype.clone=al,vt.prototype.reverse=ul,vt.prototype.value=cl,p.prototype.at=Fd,p.prototype.chain=Md,p.prototype.commit=qd,p.prototype.next=Wd,p.prototype.plant=Hd,p.prototype.reverse=$d,p.prototype.toJSON=p.prototype.valueOf=p.prototype.value=Gd,p.prototype.first=p.prototype.head,Hn&&(p.prototype[Hn]=Kd),p},kn=qh();un?((un.exports=kn)._=kn,Di._=kn):Ht._=kn}).call(Wt)}(rr,rr.exports);var nc=rr.exports;const rc={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 ic(){return function a(i,n,s){function u(g,S){if(!n[g]){if(!i[g]){var v=typeof require=="function"&&require;if(!S&&v)return v(g,!0);if(h)return h(g,!0);throw new Error("Cannot find module '"+g+"'")}var _=n[g]={exports:{}};i[g][0].call(_.exports,function(y){var l=i[g][1][y];return u(l||y)},_,_.exports,a,i,n,s)}return n[g].exports}for(var h=typeof require=="function"&&require,m=0;m<s.length;m++)u(s[m]);return u}({1:[function(a,i){i.exports=a("./lib/")},{"./lib/":2}],2:[function(a,i,n){function s(v,_){typeof v=="object"&&(_=v,v=void 0),_=_||{};var y,l=u(v),f=l.source,b=l.id;return _.forceNew||_["force new connection"]||_.multiplex===!1?(g("ignoring socket cache for %s",f),y=m(f,_)):(S[b]||(g("new io instance for %s",f),S[b]=m(f,_)),y=S[b]),y.socket(l.path)}var u=a("./url"),h=a("socket.io-parser"),m=a("./manager"),g=a("debug")("socket.io-client");i.exports=n=s;var S=n.managers={};n.protocol=h.protocol,n.connect=s,n.Manager=a("./manager"),n.Socket=a("./socket")},{"./manager":3,"./socket":5,"./url":6,debug:10,"socket.io-parser":44}],3:[function(a,i){function n(l,f){return this instanceof n?(l&&typeof l=="object"&&(f=l,l=void 0),f=f||{},f.path=f.path||"/socket.io",this.nsps={},this.subs=[],this.opts=f,this.reconnection(f.reconnection!==!1),this.reconnectionAttempts(f.reconnectionAttempts||1/0),this.reconnectionDelay(f.reconnectionDelay||1e3),this.reconnectionDelayMax(f.reconnectionDelayMax||5e3),this.randomizationFactor(f.randomizationFactor||.5),this.backoff=new y({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(f.timeout==null?2e4:f.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=f.autoConnect!==!1,void(this.autoConnect&&this.open())):new n(l,f)}var s=(a("./url"),a("engine.io-client")),u=a("./socket"),h=a("component-emitter"),m=a("socket.io-parser"),g=a("./on"),S=a("component-bind"),v=(a("object-component"),a("debug")("socket.io-client:manager")),_=a("indexof"),y=a("backo2");i.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},h(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=s(this.uri,this.opts);var f=this.engine,b=this;this.readyState="opening",this.skipReconnect=!1;var E=g(f,"open",function(){b.onopen(),l&&l()}),x=g(f,"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(),f.close(),f.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 f=this.nsps[l];if(!f){f=new u(this,l),this.nsps[l]=f;var b=this;f.on("connect",function(){f.id=b.engine.id,~_(b.connected,f)||b.connected.push(f)})}return f},n.prototype.destroy=function(l){var f=_(this.connected,l);~f&&this.connected.splice(f,1),this.connected.length||this.close()},n.prototype.packet=function(l){v("writing packet %j",l);var f=this;f.encoding?f.packetBuffer.push(l):(f.encoding=!0,this.encoder.encode(l,function(b){for(var E=0;E<b.length;E++)f.engine.write(b[E]);f.encoding=!1,f.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 f=this.backoff.duration();v("will wait %dms before reconnect attempt",f),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())}))},f);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(a,i){function n(s,u,h){return s.on(u,h),{destroy:function(){s.removeListener(u,h)}}}i.exports=n},{}],5:[function(a,i,n){function s(f,b){this.io=f,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=a("socket.io-parser"),h=a("component-emitter"),m=a("to-array"),g=a("./on"),S=a("component-bind"),v=a("debug")("socket.io-client:socket"),_=a("has-binary");i.exports=s;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=h.prototype.emit;h(s.prototype),s.prototype.subEvents=function(){if(!this.subs){var f=this.io;this.subs=[g(f,"open",S(this,"onopen")),g(f,"packet",S(this,"onpacket")),g(f,"close",S(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 f=m(arguments);return f.unshift("message"),this.emit.apply(this,f),this},s.prototype.emit=function(f){if(y.hasOwnProperty(f))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},s.prototype.packet=function(f){f.nsp=this.nsp,this.io.packet(f)},s.prototype.onopen=function(){v("transport is open - connecting"),this.nsp!="/"&&this.packet({type:u.CONNECT})},s.prototype.onclose=function(f){v("close (%s)",f),this.connected=!1,this.disconnected=!0,delete this.id,this.emit("disconnect",f)},s.prototype.onpacket=function(f){if(f.nsp==this.nsp)switch(f.type){case u.CONNECT:this.onconnect();break;case u.EVENT:this.onevent(f);break;case u.BINARY_EVENT:this.onevent(f);break;case u.ACK:this.onack(f);break;case u.BINARY_ACK:this.onack(f);break;case u.DISCONNECT:this.ondisconnect();break;case u.ERROR:this.emit("error",f.data)}},s.prototype.onevent=function(f){var b=f.data||[];v("emitting event %j",b),f.id!=null&&(v("attaching ack callback to event"),b.push(this.ack(f.id))),this.connected?l.apply(this,b):this.receiveBuffer.push(b)},s.prototype.ack=function(f){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:f,data:x})}}},s.prototype.onack=function(f){v("calling ack %s with %j",f.id,f.data);var b=this.acks[f.id];b.apply(this,f.data),delete this.acks[f.id]},s.prototype.onconnect=function(){this.connected=!0,this.disconnected=!1,this.emit("connect"),this.emitBuffered()},s.prototype.emitBuffered=function(){var f;for(f=0;f<this.receiveBuffer.length;f++)l.apply(this,this.receiveBuffer[f]);for(this.receiveBuffer=[],f=0;f<this.sendBuffer.length;f++)this.packet(this.sendBuffer[f]);this.sendBuffer=[]},s.prototype.ondisconnect=function(){v("server disconnect (%s)",this.nsp),this.destroy(),this.onclose("io server disconnect")},s.prototype.destroy=function(){if(this.subs){for(var f=0;f<this.subs.length;f++)this.subs[f].destroy();this.subs=null}this.io.destroy(this)},s.prototype.close=s.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(a,i){(function(n){function s(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)||(h("protocol-less url %s",m),m=typeof v<"u"?v.protocol+"//"+m:"https://"+m),h("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=a("parseuri"),h=a("debug")("socket.io-client:url");i.exports=s}).call(this,typeof self<"u"?self:typeof window<"u"?window:{})},{debug:10,parseuri:42}],7:[function(a,i){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}i.exports=n,n.prototype.duration=function(){var s=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var u=Math.random(),h=Math.floor(u*this.jitter*s);s=1&Math.floor(10*u)?s+h:s-h}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(a,i){var n=[].slice;i.exports=function(s,u){if(typeof u=="string"&&(u=s[u]),typeof u!="function")throw new Error("bind() requires a function");var h=n.call(arguments,2);return function(){return u.apply(s,h.concat(n.call(arguments)))}}},{}],9:[function(a,i){function n(u){return u?s(u):void 0}function s(u){for(var h in n.prototype)u[h]=n.prototype[h];return u}i.exports=n,n.prototype.on=n.prototype.addEventListener=function(u,h){return this._callbacks=this._callbacks||{},(this._callbacks[u]=this._callbacks[u]||[]).push(h),this},n.prototype.once=function(u,h){function m(){g.off(u,m),h.apply(this,arguments)}var g=this;return this._callbacks=this._callbacks||{},m.fn=h,this.on(u,m),this},n.prototype.off=n.prototype.removeListener=n.prototype.removeAllListeners=n.prototype.removeEventListener=function(u,h){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===h||g.fn===h){m.splice(S,1);break}return this},n.prototype.emit=function(u){this._callbacks=this._callbacks||{};var h=[].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,h)}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(a,i){function n(u){return n.enabled(u)?function(h){h=s(h);var m=new Date,g=m-(n[u]||m);n[u]=m,h=u+" "+h+" +"+n.humanize(g),window.console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}:function(){}}function s(u){return u instanceof Error?u.stack||u.message:u}i.exports=n,n.names=[],n.skips=[],n.enable=function(u){try{localStorage.debug=u}catch{}for(var h=(u||"").split(/[\s,]+/),m=h.length,g=0;m>g;g++)u=h[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 h=1e3,m=6e4,g=60*m;return u>=g?(u/g).toFixed(1)+"h":u>=m?(u/m).toFixed(1)+"m":u>=h?(u/h|0)+"s":u+"ms"},n.enabled=function(u){for(var h=0,m=n.skips.length;m>h;h++)if(n.skips[h].test(u))return!1;for(var h=0,m=n.names.length;m>h;h++)if(n.names[h].test(u))return!0;return!1};try{window.localStorage&&n.enable(localStorage.debug)}catch{}},{}],11:[function(a,i){i.exports=a("./lib/")},{"./lib/":12}],12:[function(a,i){i.exports=a("./socket"),i.exports.parser=a("engine.io-parser")},{"./socket":13,"engine.io-parser":25}],13:[function(a,i){(function(n){function s(f,b){if(!(this instanceof s))return new s(f,b);if(b=b||{},f&&typeof f=="object"&&(b=f,f=null),f&&(f=_(f),b.host=f.host,b.secure=f.protocol=="https"||f.protocol=="wss",b.port=f.port,f.query&&(b.query=f.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(f){var b={};for(var E in f)f.hasOwnProperty(E)&&(b[E]=f[E]);return b}var h=a("./transports"),m=a("component-emitter"),g=a("debug")("engine.io-client:socket"),S=a("indexof"),v=a("engine.io-parser"),_=a("parseuri"),y=a("parsejson"),l=a("parseqs");i.exports=s,s.priorWebsocketSuccess=!1,m(s.prototype),s.protocol=v.protocol,s.Socket=s,s.Transport=a("./transport"),s.transports=a("./transports"),s.parser=a("engine.io-parser"),s.prototype.createTransport=function(f){g('creating transport "%s"',f);var b=u(this.query);b.EIO=v.protocol,b.transport=f,this.id&&(b.sid=this.id);var E=new h[f]({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},s.prototype.open=function(){var b;if(this.rememberUpgrade&&s.priorWebsocketSuccess&&this.transports.indexOf("websocket")!=-1)b="websocket";else{if(this.transports.length==0){var f=this;return void setTimeout(function(){f.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)},s.prototype.setTransport=function(f){g("setting transport %s",f.name);var b=this;this.transport&&(g("clearing existing transport %s",this.transport.name),this.transport.removeAllListeners()),this.transport=f,f.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")})},s.prototype.probe=function(f){function b(){if(M.onlyBinaryUpgrades){var H=!this.supportsBinary&&M.transport.supportsBinary;D=D||H}D||(g('probe transport "%s" opened',f),$.send([{type:"ping",data:"probe"}]),$.once("packet",function(L){if(!D)if(L.type=="pong"&&L.data=="probe"){if(g('probe transport "%s" pong',f),M.upgrading=!0,M.emit("upgrading",$),!$)return;s.priorWebsocketSuccess=$.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($),$.send([{type:"upgrade"}]),M.emit("upgrade",$),$=null,M.upgrading=!1,M.flush())})}else{g('probe transport "%s" failed',f);var U=new Error("probe error");U.transport=$.name,M.emit("upgradeError",U)}}))}function E(){D||(D=!0,ot(),$.close(),$=null)}function x(H){var L=new Error("probe error: "+H);L.transport=$.name,E(),g('probe transport "%s" failed because of error: %s',f,H),M.emit("upgradeError",L)}function W(){x("transport closed")}function st(){x("socket closed")}function V(H){$&&H.name!=$.name&&(g('"%s" works - aborting "%s"',H.name,$.name),E())}function ot(){$.removeListener("open",b),$.removeListener("error",x),$.removeListener("close",W),M.removeListener("close",st),M.removeListener("upgrading",V)}g('probing transport "%s"',f);var $=this.createTransport(f,{probe:1}),D=!1,M=this;s.priorWebsocketSuccess=!1,$.once("open",b),$.once("error",x),$.once("close",W),this.once("close",st),this.once("upgrading",V),$.open()},s.prototype.onOpen=function(){if(g("socket open"),this.readyState="open",s.priorWebsocketSuccess=this.transport.name=="websocket",this.emit("open"),this.flush(),this.readyState=="open"&&this.upgrade&&this.transport.pause){g("starting upgrade probes");for(var f=0,b=this.upgrades.length;b>f;f++)this.probe(this.upgrades[f])}},s.prototype.onPacket=function(f){if(this.readyState=="opening"||this.readyState=="open")switch(g('socket receive: type "%s", data "%s"',f.type,f.data),this.emit("packet",f),this.emit("heartbeat"),f.type){case"open":this.onHandshake(y(f.data));break;case"pong":this.setPing();break;case"error":var b=new Error("server error");b.code=f.data,this.emit("error",b);break;case"message":this.emit("data",f.data),this.emit("message",f.data)}else g('packet received with socket readyState "%s"',this.readyState)},s.prototype.onHandshake=function(f){this.emit("handshake",f),this.id=f.sid,this.transport.query.sid=f.sid,this.upgrades=this.filterUpgrades(f.upgrades),this.pingInterval=f.pingInterval,this.pingTimeout=f.pingTimeout,this.onOpen(),this.readyState!="closed"&&(this.setPing(),this.removeListener("heartbeat",this.onHeartbeat),this.on("heartbeat",this.onHeartbeat))},s.prototype.onHeartbeat=function(f){clearTimeout(this.pingTimeoutTimer);var b=this;b.pingTimeoutTimer=setTimeout(function(){b.readyState!="closed"&&b.onClose("ping timeout")},f||b.pingInterval+b.pingTimeout)},s.prototype.setPing=function(){var f=this;clearTimeout(f.pingIntervalTimer),f.pingIntervalTimer=setTimeout(function(){g("writing ping packet - expecting pong within %sms",f.pingTimeout),f.ping(),f.onHeartbeat(f.pingTimeout)},f.pingInterval)},s.prototype.ping=function(){this.sendPacket("ping")},s.prototype.onDrain=function(){for(var f=0;f<this.prevBufferLen;f++)this.callbackBuffer[f]&&this.callbackBuffer[f]();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&&(g("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(f,b){return this.sendPacket("message",f,b),this},s.prototype.sendPacket=function(f,b,E){if(this.readyState!="closing"&&this.readyState!="closed"){var x={type:f,data:b};this.emit("packetCreate",x),this.writeBuffer.push(x),this.callbackBuffer.push(E),this.flush()}},s.prototype.close=function(){function f(){x.onClose("forced close"),g("socket closing - telling transport to close"),x.transport.close()}function b(){x.removeListener("upgrade",b),x.removeListener("upgradeError",b),f()}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():f()}):this.upgrading?E():f()}return this},s.prototype.onError=function(f){g("socket error %j",f),s.priorWebsocketSuccess=!1,this.emit("error",f),this.onClose("transport error",f)},s.prototype.onClose=function(f,b){if(this.readyState=="opening"||this.readyState=="open"||this.readyState=="closing"){g('socket close with reason: "%s"',f);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",f,b)}},s.prototype.filterUpgrades=function(f){for(var b=[],E=0,x=f.length;x>E;E++)~S(this.transports,f[E])&&b.push(f[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(a,i){function n(h){this.path=h.path,this.hostname=h.hostname,this.port=h.port,this.secure=h.secure,this.query=h.query,this.timestampParam=h.timestampParam,this.timestampRequests=h.timestampRequests,this.readyState="",this.agent=h.agent||!1,this.socket=h.socket,this.enablesXDR=h.enablesXDR,this.pfx=h.pfx,this.key=h.key,this.passphrase=h.passphrase,this.cert=h.cert,this.ca=h.ca,this.ciphers=h.ciphers,this.rejectUnauthorized=h.rejectUnauthorized}var s=a("engine.io-parser"),u=a("component-emitter");i.exports=n,u(n.prototype),n.timestamps=0,n.prototype.onError=function(h,m){var g=new Error(h);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(h){if(this.readyState!="open")throw new Error("Transport not open");this.write(h)},n.prototype.onOpen=function(){this.readyState="open",this.writable=!0,this.emit("open")},n.prototype.onData=function(h){var m=s.decodePacket(h,this.socket.binaryType);this.onPacket(m)},n.prototype.onPacket=function(h){this.emit("packet",h)},n.prototype.onClose=function(){this.readyState="closed",this.emit("close")}},{"component-emitter":9,"engine.io-parser":25}],15:[function(a,i,n){(function(s){function u(v){var _,y=!1,l=!1,f=v.jsonp!==!1;if(s.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 h(v),"open"in _&&!v.forceJSONP)return new m(v);if(!f)throw new Error("JSONP disabled");return new g(v)}var h=a("xmlhttprequest"),m=a("./polling-xhr"),g=a("./polling-jsonp"),S=a("./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(a,i){(function(n){function s(){}function u(_){h.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=s)},!1)}var h=a("./polling"),m=a("component-inherit");i.exports=u;var g,S=/\n/g,v=/\\n/g;m(u,h),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),h.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 f=typeof navigator<"u"&&/gecko/i.test(navigator.userAgent);f&&setTimeout(function(){var b=document.createElement("iframe");document.body.appendChild(b),document.body.removeChild(b)},100)},u.prototype.doWrite=function(_,y){function l(){f(),y()}function f(){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(),f(),_=_.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(a,i){(function(n){function s(){}function u(l){if(S.call(this,l),n.location){var f=location.protocol=="https:",b=location.port;b||(b=f?443:80),this.xd=l.hostname!=n.location.hostname||b!=l.port,this.xs=l.secure!=f}}function h(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 h.requests)h.requests.hasOwnProperty(l)&&h.requests[l].abort()}var g=a("xmlhttprequest"),S=a("./polling"),v=a("component-emitter"),_=a("component-inherit"),y=a("debug")("engine.io-client:polling-xhr");i.exports=u,i.exports.Request=h,_(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 h(l)},u.prototype.doWrite=function(l,f){var b=typeof l!="string"&&l!==void 0,E=this.request({method:"POST",data:l,isBinary:b}),x=this;E.on("success",f),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(),f=this;l.on("data",function(b){f.onData(b)}),l.on("error",function(b){f.onError("xhr poll error",b)}),this.pollXhr=l},v(h.prototype),h.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 f=this.xhr=new g(l),b=this;try{if(y("xhr open %s: %s",this.method,this.uri),f.open(this.method,this.uri,this.async),this.supportsBinary&&(f.responseType="arraybuffer"),this.method=="POST")try{this.isBinary?f.setRequestHeader("Content-type","application/octet-stream"):f.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}"withCredentials"in f&&(f.withCredentials=!0),this.hasXDR()?(f.onload=function(){b.onLoad()},f.onerror=function(){b.onError(f.responseText)}):f.onreadystatechange=function(){f.readyState==4&&(f.status==200||f.status==1223?b.onLoad():setTimeout(function(){b.onError(f.status)},0))},y("xhr data %s",this.data),f.send(this.data)}catch(E){return void setTimeout(function(){b.onError(E)},0)}n.document&&(this.index=h.requestsCount++,h.requests[this.index]=this)},h.prototype.onSuccess=function(){this.emit("success"),this.cleanup()},h.prototype.onData=function(l){this.emit("data",l),this.onSuccess()},h.prototype.onError=function(l){this.emit("error",l),this.cleanup(!0)},h.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 h.requests[this.index],this.xhr=null}},h.prototype.onLoad=function(){var l;try{var f;try{f=this.xhr.getResponseHeader("Content-Type").split(";")[0]}catch{}l=f==="application/octet-stream"?this.xhr.response:this.supportsBinary?"ok":this.xhr.responseText}catch(b){this.onError(b)}l!=null&&this.onData(l)},h.prototype.hasXDR=function(){return typeof n.XDomainRequest<"u"&&!this.xs&&this.enablesXDR},h.prototype.abort=function(){this.cleanup()},n.document&&(h.requestsCount=0,h.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(a,i){function n(v){var _=v&&v.forceBase64;(!S||_)&&(this.supportsBinary=!1),s.call(this,v)}var s=a("../transport"),u=a("parseqs"),h=a("engine.io-parser"),m=a("component-inherit"),g=a("debug")("engine.io-client:polling");i.exports=n;var S=function(){var v=a("xmlhttprequest"),_=new v({xdomain:!1});return _.responseType!=null}();m(n,s),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)};h.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;h.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+"-"+s.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(a,i){function n(v){var _=v&&v.forceBase64;_&&(this.supportsBinary=!1),s.call(this,v)}var s=a("../transport"),u=a("engine.io-parser"),h=a("parseqs"),m=a("component-inherit"),g=a("debug")("engine.io-client:websocket"),S=a("ws");i.exports=n,m(n,s),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(){s.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,f=v.length;f>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(){s.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=h.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(a,i){var n=a("has-cors");i.exports=function(s){var u=s.xdomain,h=s.xscheme,m=s.enablesXDR;try{if(typeof XMLHttpRequest<"u"&&(!u||n))return new XMLHttpRequest}catch{}try{if(typeof XDomainRequest<"u"&&!h&&m)return new XDomainRequest}catch{}if(!u)try{return new ActiveXObject("Microsoft.XMLHTTP")}catch{}}},{"has-cors":38}],21:[function(a,i){i.exports=function(n,s){var u=function(){};u.prototype=s.prototype,n.prototype=new u,n.prototype.constructor=n}},{}],22:[function(a,i,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 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(f){f!=="%%"&&(y++,f==="%c"&&(l=y))}),S.splice(l,0,_),S}function h(){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=i.exports=a("./debug"),n.log=h,n.formatArgs=u,n.save=m,n.load=g,n.useColors=s,n.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"],n.formatters.j=function(S){return JSON.stringify(S)},n.enable(g())},{"./debug":23}],23:[function(a,i,n){function s(){return n.colors[_++%n.colors.length]}function u(y){function l(){}function f(){var E=f,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=s());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($,D){if($==="%%")return $;V++;var M=n.formatters[D];if(typeof M=="function"){var H=st[V];$=M.call(E,H),st.splice(V,1),V--}return $}),typeof n.formatArgs=="function"&&(st=n.formatArgs.apply(E,st));var ot=f.log||n.log||console.log.bind(console);ot.apply(E,st)}l.enabled=!1,f.enabled=!0;var b=n.enabled(y)?f:l;return b.namespace=y,b}function h(y){n.save(y);for(var l=(y||"").split(/[\s,]+/),f=l.length,b=0;f>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,f;for(l=0,f=n.skips.length;f>l;l++)if(n.skips[l].test(y))return!1;for(l=0,f=n.names.length;f>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=i.exports=u,n.coerce=S,n.disable=m,n.enable=h,n.enabled=g,n.humanize=a("ms"),n.names=[],n.skips=[],n.formatters={};var v,_=0},{ms:24}],24:[function(a,i){function n(y){var l=/^((?:\d+)?\.?\d+) *(ms|seconds?|s|minutes?|m|hours?|h|days?|d|years?|y)?$/i.exec(y);if(l){var f=parseFloat(l[1]),b=(l[2]||"ms").toLowerCase();switch(b){case"years":case"year":case"y":return f*_;case"days":case"day":case"d":return f*v;case"hours":case"hour":case"h":return f*S;case"minutes":case"minute":case"m":return f*g;case"seconds":case"second":case"s":return f*m;case"ms":return f}}}function s(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 h(y,v,"day")||h(y,S,"hour")||h(y,g,"minute")||h(y,m,"second")||y+" ms"}function h(y,l,f){return l>y?void 0:1.5*l>y?Math.floor(y/l)+" "+f:Math.ceil(y/l)+" "+f+"s"}var m=1e3,g=60*m,S=60*g,v=24*S,_=365.25*v;i.exports=function(y,l){return l=l||{},typeof y=="string"?n(y):l.long?u(y):s(y)}},{}],25:[function(a,i,n){(function(s){function u(D,M){var H="b"+n.packets[D.type]+D.data.data;return M(H)}function h(D,M,H){if(!M)return n.encodeBase64Packet(D,H);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 H(X.buffer)}function m(D,M,H){if(!M)return n.encodeBase64Packet(D,H);var L=new FileReader;return L.onload=function(){D.data=L.result,n.encodePacket(D,M,!0,H)},L.readAsArrayBuffer(D.data)}function g(D,M,H){if(!M)return n.encodeBase64Packet(D,H);if(W)return m(D,M,H);var L=new Uint8Array(1);L[0]=st[D.type];var U=new $([L.buffer,D.data]);return H(U)}function S(D,M,H){for(var L=new Array(D.length),U=f(D.length,H),X=function(j,B,kt){M(B,function(At,Ot){L[j]=Ot,kt(At,L)})},Q=0;Q<D.length;Q++)X(Q,D[Q],U)}var v=a("./keys"),_=a("has-binary"),y=a("arraybuffer.slice"),l=a("base64-arraybuffer"),f=a("after"),b=a("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"},$=a("blob");n.encodePacket=function(D,M,H,L){typeof M=="function"&&(L=M,M=!1),typeof H=="function"&&(L=H,H=null);var U=D.data===void 0?void 0:D.data.buffer||D.data;if(s.ArrayBuffer&&U instanceof ArrayBuffer)return h(D,M,L);if($&&U instanceof s.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+=H?b.encode(String(D.data)):String(D.data)),L(""+X)},n.encodeBase64Packet=function(D,M){var H="b"+n.packets[D.type];if($&&D.data instanceof $){var L=new FileReader;return L.onload=function(){var B=L.result.split(",")[1];M(H+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 H+=s.btoa(U),M(H)},n.decodePacket=function(D,M,H){if(typeof D=="string"||D===void 0){if(D.charAt(0)=="b")return n.decodeBase64Packet(D.substr(1),M);if(H)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 $&&M==="blob"&&(X=new $([X])),{type:V[U],data:X}},n.decodeBase64Packet=function(D,M){var H=V[D.charAt(0)];if(!s.ArrayBuffer)return{type:H,data:{base64:!0,data:D.substr(1)}};var L=l.decode(D.substr(1));return M==="blob"&&$&&(L=new $([L])),{type:H,data:L}},n.encodePayload=function(D,M,H){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"&&(H=M,M=null);var X=_(D);return M&&X?$&&!W?n.encodePayloadAsBlob(D,H):n.encodePayloadAsArrayBuffer(D,H):D.length?void S(D,U,function(Q,j){return H(j.join(""))}):H("0:")},n.decodePayload=function(D,M,H){if(typeof D!="string")return n.decodePayloadAsBinary(D,M,H);typeof M=="function"&&(H=M,M=null);var L;if(D=="")return H(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 H(ot,0,1);if(X.length){if(L=n.decodePacket(X,M,!0),ot.type==L.type&&ot.data==L.data)return H(ot,0,1);var At=H(L,j+U,B);if(At===!1)return}j+=U,Q=""}}return Q!=""?H(ot,0,1):void 0},n.encodePayloadAsArrayBuffer=function(D,M){function H(L,U){n.encodePacket(L,!0,!0,function(X){return U(null,X)})}return D.length?void S(D,H,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 Ot=new Uint8Array(B.length),ut=0;ut<B.length;ut++)Ot[ut]=B.charCodeAt(ut);At=Ot.buffer}Q[j++]=kt?0:1;for(var zt=At.byteLength.toString(),ut=0;ut<zt.length;ut++)Q[j++]=parseInt(zt[ut]);Q[j++]=255;for(var Ot=new Uint8Array(At),ut=0;ut<Ot.length;ut++)Q[j++]=Ot[ut]}),M(Q.buffer)}):M(new ArrayBuffer(0))},n.encodePayloadAsBlob=function(D,M){function H(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(),Ot=new Uint8Array(At.length+1),B=0;B<At.length;B++)Ot[B]=parseInt(At[B]);if(Ot[At.length]=255,$){var ut=new $([Q.buffer,Ot.buffer,X]);U(null,ut)}})}S(D,H,function(L,U){return M(new $(U))})},n.decodePayloadAsBinary=function(D,M,H){typeof M=="function"&&(H=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 H(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 Ot=new Uint8Array(At);At="";for(var kt=0;kt<Ot.length;kt++)At+=String.fromCharCode(Ot[kt])}U.push(At),L=y(L,B)}var ut=U.length;U.forEach(function(zt,Le){H(n.decodePacket(zt,M,!0),Le,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(a,i){i.exports=Object.keys||function(n){var s=[],u=Object.prototype.hasOwnProperty;for(var h in n)u.call(n,h)&&s.push(h);return s}},{}],27:[function(a,i){function n(u,h,m){function g(v,_){if(g.count<=0)throw new Error("after called too many times");--g.count,v?(S=!0,h(v),h=m):g.count!==0||S||h(null,_)}var S=!1;return m=m||s,g.count=u,u===0?h():g}function s(){}i.exports=n},{}],28:[function(a,i){i.exports=function(n,s,u){var h=n.byteLength;if(s=s||0,u=u||h,n.slice)return n.slice(s,u);if(0>s&&(s+=h),0>u&&(u+=h),u>h&&(u=h),s>=h||s>=u||h===0)return new ArrayBuffer(0);for(var m=new Uint8Array(n),g=new Uint8Array(u-s),S=s,v=0;u>S;S++,v++)g[v]=m[S];return g.buffer}},{}],29:[function(a,i,n){(function(s){n.encode=function(u){var h,m=new Uint8Array(u),g=m.length,S="";for(h=0;g>h;h+=3)S+=s[m[h]>>2],S+=s[(3&m[h])<<4|m[h+1]>>4],S+=s[(15&m[h+1])<<2|m[h+2]>>6],S+=s[63&m[h+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 h,m,g,S,v,_=.75*u.length,y=u.length,l=0;u[u.length-1]==="="&&(_--,u[u.length-2]==="="&&_--);var f=new ArrayBuffer(_),b=new Uint8Array(f);for(h=0;y>h;h+=4)m=s.indexOf(u[h]),g=s.indexOf(u[h+1]),S=s.indexOf(u[h+2]),v=s.indexOf(u[h+3]),b[l++]=m<<2|g>>4,b[l++]=(15&g)<<4|S>>2,b[l++]=(3&S)<<6|63&v;return f}})("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/")},{}],30:[function(a,i){(function(n){function s(_){for(var y=0;y<_.length;y++){var l=_[y];if(l.buffer instanceof ArrayBuffer){var f=l.buffer;if(l.byteLength!==f.byteLength){var b=new Uint8Array(l.byteLength);b.set(new Uint8Array(f,l.byteOffset,l.byteLength)),f=b.buffer}_[y]=f}}}function u(_,y){y=y||{};var l=new m;s(_);for(var f=0;f<_.length;f++)l.append(_[f]);return y.type?l.getBlob(y.type):l.getBlob()}function h(_,y){return s(_),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;i.exports=function(){return g?S?n.Blob:h:v?u:void 0}()}).call(this,typeof self<"u"?self:typeof window<"u"?window:{})},{}],31:[function(a,i,n){(function(s){(function(u){function h(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=h(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 f(L){W=h(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 i=="object"&&i&&i.exports==b&&i,x=typeof s=="object"&&s;(x.global===x||x.window===x)&&(u=x);var W,st,V,ot=String.fromCharCode,$={version:"2.0.0",encode:_,decode:f};if(b&&!b.nodeType)if(E)E.exports=$;else{var D={},M=D.hasOwnProperty;for(var H in $)M.call($,H)&&(b[H]=$[H])}else u.utf8=$})(this)}).call(this,typeof self<"u"?self:typeof window<"u"?window:{})},{}],32:[function(a,i){(function(n){var s=/^[\],:{}\s]*$/,u=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,h=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,m=/(?:^|:|,)(?:\s*\[)+/g,g=/^\s+/,S=/\s+$/;i.exports=function(v){return typeof v=="string"&&v?(v=v.replace(g,"").replace(S,""),n.JSON&&JSON.parse?JSON.parse(v):s.test(v.replace(u,"@").replace(h,"]").replace(m,""))?new Function("return "+v)():void 0):null}}).call(this,typeof self<"u"?self:typeof window<"u"?window:{})},{}],33:[function(a,i,n){n.encode=function(s){var u="";for(var h in s)s.hasOwnProperty(h)&&(u.length&&(u+="&"),u+=encodeURIComponent(h)+"="+encodeURIComponent(s[h]));return u},n.decode=function(s){for(var u={},h=s.split("&"),m=0,g=h.length;g>m;m++){var S=h[m].split("=");u[decodeURIComponent(S[0])]=decodeURIComponent(S[1])}return u}},{}],34:[function(a,i){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"];i.exports=function(u){var h=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[s[_]]=S[_]||"";return m!=-1&&g!=-1&&(v.source=h,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(a,i){function n(h,m){return m?new u(h,m):new u(h)}var s=function(){return self}(),u=s.WebSocket||s.MozWebSocket;i.exports=u?n:null,u&&(n.prototype=u.prototype)},{}],36:[function(a,i){(function(n){function s(h){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(h)}var u=a("isarray");i.exports=s}).call(this,typeof self<"u"?self:typeof window<"u"?window:{})},{isarray:37}],37:[function(a,i){i.exports=Array.isArray||function(n){return Object.prototype.toString.call(n)=="[object Array]"}},{}],38:[function(a,i){var n=a("global");try{i.exports="XMLHttpRequest"in n&&"withCredentials"in new n.XMLHttpRequest}catch{i.exports=!1}},{global:39}],39:[function(a,i){i.exports=function(){return this}()},{}],40:[function(a,i){var n=[].indexOf;i.exports=function(s,u){if(n)return s.indexOf(u);for(var h=0;h<s.length;++h)if(s[h]===u)return h;return-1}},{}],41:[function(a,i,n){var s=Object.prototype.hasOwnProperty;n.keys=Object.keys||function(u){var h=[];for(var m in u)s.call(u,m)&&h.push(m);return h},n.values=function(u){var h=[];for(var m in u)s.call(u,m)&&h.push(u[m]);return h},n.merge=function(u,h){for(var m in h)s.call(h,m)&&(u[m]=h[m]);return u},n.length=function(u){return n.keys(u).length},n.isEmpty=function(u){return n.length(u)==0}},{}],42:[function(a,i){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"];i.exports=function(u){for(var h=n.exec(u||""),m={},g=14;g--;)m[s[g]]=h[g]||"";return m}},{}],43:[function(a,i,n){(function(s){var u=a("isarray"),h=a("./is-buffer");n.deconstructPacket=function(m){function g(y){if(!y)return y;if(h(y)){var l={_placeholder:!0,num:S.length};return S.push(y),l}if(u(y)){for(var f=new Array(y.length),b=0;b<y.length;b++)f[b]=g(y[b]);return f}if(typeof y=="object"&&!(y instanceof Date)){var f={};for(var E in y)f[E]=g(y[E]);return f}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,f){if(!y)return y;if(s.Blob&&y instanceof Blob||s.File&&y instanceof File){v++;var b=new FileReader;b.onload=function(){f?f[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"&&!h(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(a,i,n){function s(){}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 h(E,x){function W(st){var V=f.deconstructPacket(st),ot=u(V.packet),$=V.buffers;$.unshift(ot),x($)}f.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 _=a("debug")("socket.io-parser"),y=a("json3"),l=(a("isarray"),a("component-emitter")),f=a("./binary"),b=a("./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=m,s.prototype.encode=function(E,x){if(_("encoding packet %j",E),n.BINARY_EVENT==E.type||n.BINARY_ACK==E.type)h(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=f.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(a,i){(function(n){function s(u){return n.Buffer&&n.Buffer.isBuffer(u)||n.ArrayBuffer&&u instanceof ArrayBuffer}i.exports=s}).call(this,typeof self<"u"?self:typeof window<"u"?window:{})},{}],46:[function(a,i){i.exports=a(37)},{}],47:[function(a,i,n){(function(s){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
|
|
32
|
+
}`;var pt=Xu(function(){return _t(d,Y+"return "+N).apply(n,w)});if(pt.source=N,Os(pt))throw pt;return pt}function ey(t){return St(t).toLowerCase()}function ny(t){return St(t).toUpperCase()}function ry(t,e,r){if(t=St(t),t&&(r||e===n))return na(t);if(!t||!(e=he(e)))return t;var o=Ee(t),c=Ee(e),d=ra(o,c),w=ia(o,c)+1;return rn(o,d,w).join("")}function iy(t,e,r){if(t=St(t),t&&(r||e===n))return t.slice(0,oa(t)+1);if(!t||!(e=he(e)))return t;var o=Ee(t),c=ia(o,Ee(e))+1;return rn(o,0,c).join("")}function sy(t,e,r){if(t=St(t),t&&(r||e===n))return t.replace(Oi,"");if(!t||!(e=he(e)))return t;var o=Ee(t),c=ra(o,Ee(e));return rn(o,c).join("")}function oy(t,e){var r=U,o=X;if(Lt(e)){var c="separator"in e?e.separator:c;r="length"in e?lt(e.length):r,o="omission"in e?he(e.omission):o}t=St(t);var d=t.length;if(Sn(t)){var w=Ee(t);d=w.length}if(r>=d)return t;var C=r-Cn(o);if(C<1)return o;var A=w?rn(w,0,C).join(""):t.slice(0,C);if(c===n)return A+o;if(w&&(C+=A.length-C),Is(c)){if(t.slice(C).search(c)){var O,I=A;for(c.global||(c=Xi(c.source,St(ko.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(he(c),C)!=C){var K=A.lastIndexOf(c);K>-1&&(A=A.slice(0,K))}return A+o}function ay(t){return t=St(t),t&&mf.test(t)?t.replace(bo,Dh):t}var uy=On(function(t,e,r){return t+(r?" ":"")+e.toUpperCase()}),Bs=Ja("toUpperCase");function zu(t,e,r){return t=St(t),e=r?n:e,e===n?Ih(t)?Mh(t):Sh(t):t.match(e)||[]}var Xu=dt(function(t,e){try{return ce(t,n,e)}catch(r){return Os(r)?r:new ct(r)}}),cy=$e(function(t,e){return ye(e,function(r){r=Pe(r),Ke(t,r,xs(t[r],t))}),t});function fy(t){var e=t==null?0:t.length,r=nt();return t=e?It(t,function(o){if(typeof o[1]!="function")throw new me(m);return[r(o[0]),o[1]]}):[],dt(function(o){for(var c=-1;++c<e;){var d=t[c];if(ce(d[0],this,o))return ce(d[1],this,o)}})}function hy(t){return Dl(we(t,y))}function Us(t){return function(){return t}}function ly(t,e){return t==null||t!==t?e:t}var py=Ya(),dy=Ya(!0);function oe(t){return t}function Ds(t){return Ea(typeof t=="function"?t:we(t,y))}function gy(t){return xa(we(t,y))}function vy(t,e){return Ra(t,we(e,y))}var yy=dt(function(t,e){return function(r){return Yn(r,t,e)}}),my=dt(function(t,e){return function(r){return Yn(t,r,e)}});function Ps(t,e,r){var o=qt(e),c=Dr(e,o);r==null&&!(Lt(e)&&(c.length||!o.length))&&(r=e,e=t,t=this,c=Dr(e,qt(e)));var d=!(Lt(r)&&"chain"in r)||!!r.chain,w=ze(t);return ye(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__=re(this.__actions__);return N.push({func:A,args:arguments,thisArg:t}),I.__chain__=O,I}return A.apply(t,je([this.value()],arguments))})}),t}function _y(){return Ht._===this&&(Ht._=Gh),this}function Fs(){}function wy(t){return t=lt(t),dt(function(e){return Oa(e,t)})}var by=gs(It),Sy=gs(jo),Cy=gs(qi);function Ju(t){return Ss(t)?Wi(Pe(t)):Ql(t)}function ky(t){return function(e){return t==null?n:pn(t,e)}}var Ay=Za(),Ey=Za(!0);function Ms(){return[]}function qs(){return!1}function Ty(){return{}}function xy(){return""}function Ry(){return!0}function Oy(t,e){if(t=lt(t),t<1||t>ut)return[];var r=ae,o=Jt(t,ae);e=nt(e),t-=ae;for(var c=$i(o,e);++r<t;)e(r);return c}function Iy(t){return ft(t)?It(t,Pe):le(t)?[t]:re(du(St(t)))}function Ly(t){var e=++Hh;return St(t)+e}var Ny=Kr(function(t,e){return t+e},0),By=vs("ceil"),Uy=Kr(function(t,e){return t/e},1),Dy=vs("floor");function Py(t){return t&&t.length?Ur(t,oe,es):n}function Fy(t,e){return t&&t.length?Ur(t,nt(e,2),es):n}function My(t){return ta(t,oe)}function qy(t,e){return ta(t,nt(e,2))}function Wy(t){return t&&t.length?Ur(t,oe,ss):n}function Ky(t,e){return t&&t.length?Ur(t,nt(e,2),ss):n}var Hy=Kr(function(t,e){return t*e},1),$y=vs("round"),Gy=Kr(function(t,e){return t-e},0);function zy(t){return t&&t.length?Hi(t,oe):0}function Xy(t,e){return t&&t.length?Hi(t,nt(e,2)):0}return p.after=gg,p.ary=Au,p.assign=nv,p.assignIn=Mu,p.assignInWith=ei,p.assignWith=rv,p.at=iv,p.before=Eu,p.bind=xs,p.bindAll=cy,p.bindKey=Tu,p.castArray=Tg,p.chain=Su,p.chunk=Dp,p.compact=Pp,p.concat=Fp,p.cond=fy,p.conforms=hy,p.constant=Us,p.countBy=zd,p.create=sv,p.curry=xu,p.curryRight=Ru,p.debounce=Ou,p.defaults=ov,p.defaultsDeep=av,p.defer=vg,p.delay=yg,p.difference=Mp,p.differenceBy=qp,p.differenceWith=Wp,p.drop=Kp,p.dropRight=Hp,p.dropRightWhile=$p,p.dropWhile=Gp,p.fill=zp,p.filter=Jd,p.flatMap=jd,p.flatMapDeep=Zd,p.flatMapDepth=Qd,p.flatten=mu,p.flattenDeep=Xp,p.flattenDepth=Jp,p.flip=mg,p.flow=py,p.flowRight=dy,p.fromPairs=Vp,p.functions=dv,p.functionsIn=gv,p.groupBy=tg,p.initial=jp,p.intersection=Zp,p.intersectionBy=Qp,p.intersectionWith=td,p.invert=yv,p.invertBy=mv,p.invokeMap=ng,p.iteratee=Ds,p.keyBy=rg,p.keys=qt,p.keysIn=se,p.map=Vr,p.mapKeys=wv,p.mapValues=bv,p.matches=gy,p.matchesProperty=vy,p.memoize=jr,p.merge=Sv,p.mergeWith=qu,p.method=yy,p.methodOf=my,p.mixin=Ps,p.negate=Zr,p.nthArg=wy,p.omit=Cv,p.omitBy=kv,p.once=_g,p.orderBy=ig,p.over=by,p.overArgs=wg,p.overEvery=Sy,p.overSome=Cy,p.partial=Rs,p.partialRight=Iu,p.partition=sg,p.pick=Av,p.pickBy=Wu,p.property=Ju,p.propertyOf=ky,p.pull=id,p.pullAll=wu,p.pullAllBy=sd,p.pullAllWith=od,p.pullAt=ad,p.range=Ay,p.rangeRight=Ey,p.rearg=bg,p.reject=ug,p.remove=ud,p.rest=Sg,p.reverse=Es,p.sampleSize=fg,p.set=Tv,p.setWith=xv,p.shuffle=hg,p.slice=cd,p.sortBy=dg,p.sortedUniq=vd,p.sortedUniqBy=yd,p.split=jv,p.spread=Cg,p.tail=md,p.take=_d,p.takeRight=wd,p.takeRightWhile=bd,p.takeWhile=Sd,p.tap=Pd,p.throttle=kg,p.thru=Jr,p.toArray=Du,p.toPairs=Ku,p.toPairsIn=Hu,p.toPath=Iy,p.toPlainObject=Fu,p.transform=Rv,p.unary=Ag,p.union=Cd,p.unionBy=kd,p.unionWith=Ad,p.uniq=Ed,p.uniqBy=Td,p.uniqWith=xd,p.unset=Ov,p.unzip=Ts,p.unzipWith=bu,p.update=Iv,p.updateWith=Lv,p.values=Nn,p.valuesIn=Nv,p.without=Rd,p.words=zu,p.wrap=Eg,p.xor=Od,p.xorBy=Id,p.xorWith=Ld,p.zip=Nd,p.zipObject=Bd,p.zipObjectDeep=Ud,p.zipWith=Dd,p.entries=Ku,p.entriesIn=Hu,p.extend=Mu,p.extendWith=ei,Ps(p,p),p.add=Ny,p.attempt=Xu,p.camelCase=Pv,p.capitalize=$u,p.ceil=By,p.clamp=Bv,p.clone=xg,p.cloneDeep=Og,p.cloneDeepWith=Ig,p.cloneWith=Rg,p.conformsTo=Lg,p.deburr=Gu,p.defaultTo=ly,p.divide=Uy,p.endsWith=Fv,p.eq=xe,p.escape=Mv,p.escapeRegExp=qv,p.every=Xd,p.find=Vd,p.findIndex=vu,p.findKey=uv,p.findLast=Yd,p.findLastIndex=yu,p.findLastKey=cv,p.floor=Dy,p.forEach=Cu,p.forEachRight=ku,p.forIn=fv,p.forInRight=hv,p.forOwn=lv,p.forOwnRight=pv,p.get=Ls,p.gt=Ng,p.gte=Bg,p.has=vv,p.hasIn=Ns,p.head=_u,p.identity=oe,p.includes=eg,p.indexOf=Yp,p.inRange=Uv,p.invoke=_v,p.isArguments=vn,p.isArray=ft,p.isArrayBuffer=Ug,p.isArrayLike=ie,p.isArrayLikeObject=Bt,p.isBoolean=Dg,p.isBuffer=sn,p.isDate=Pg,p.isElement=Fg,p.isEmpty=Mg,p.isEqual=qg,p.isEqualWith=Wg,p.isError=Os,p.isFinite=Kg,p.isFunction=ze,p.isInteger=Lu,p.isLength=Qr,p.isMap=Nu,p.isMatch=Hg,p.isMatchWith=$g,p.isNaN=Gg,p.isNative=zg,p.isNil=Jg,p.isNull=Xg,p.isNumber=Bu,p.isObject=Lt,p.isObjectLike=Nt,p.isPlainObject=nr,p.isRegExp=Is,p.isSafeInteger=Vg,p.isSet=Uu,p.isString=ti,p.isSymbol=le,p.isTypedArray=Ln,p.isUndefined=Yg,p.isWeakMap=jg,p.isWeakSet=Zg,p.join=ed,p.kebabCase=Wv,p.last=Se,p.lastIndexOf=nd,p.lowerCase=Kv,p.lowerFirst=Hv,p.lt=Qg,p.lte=tv,p.max=Py,p.maxBy=Fy,p.mean=My,p.meanBy=qy,p.min=Wy,p.minBy=Ky,p.stubArray=Ms,p.stubFalse=qs,p.stubObject=Ty,p.stubString=xy,p.stubTrue=Ry,p.multiply=Hy,p.nth=rd,p.noConflict=_y,p.noop=Fs,p.now=Yr,p.pad=$v,p.padEnd=Gv,p.padStart=zv,p.parseInt=Xv,p.random=Dv,p.reduce=og,p.reduceRight=ag,p.repeat=Jv,p.replace=Vv,p.result=Ev,p.round=$y,p.runInContext=k,p.sample=cg,p.size=lg,p.snakeCase=Yv,p.some=pg,p.sortedIndex=fd,p.sortedIndexBy=hd,p.sortedIndexOf=ld,p.sortedLastIndex=pd,p.sortedLastIndexBy=dd,p.sortedLastIndexOf=gd,p.startCase=Zv,p.startsWith=Qv,p.subtract=Gy,p.sum=zy,p.sumBy=Xy,p.template=ty,p.times=Oy,p.toFinite=Xe,p.toInteger=lt,p.toLength=Pu,p.toLower=ey,p.toNumber=Ce,p.toSafeInteger=ev,p.toString=St,p.toUpper=ny,p.trim=ry,p.trimEnd=iy,p.trimStart=sy,p.truncate=oy,p.unescape=ay,p.uniqueId=Ly,p.upperCase=uy,p.upperFirst=Bs,p.each=Cu,p.eachRight=ku,p.first=_u,Ps(p,function(){var t={};return Ue(p,function(e,r){Ct.call(p.prototype,r)||(t[r]=e)}),t}(),{chain:!1}),p.VERSION=s,ye(["bind","bindKey","curry","curryRight","partial","partialRight"],function(t){p[t].placeholder=p}),ye(["drop","take"],function(t,e){vt.prototype[t]=function(r){r=r===n?1:Ft(lt(r),0);var o=this.__filtered__&&!e?new vt(this):this.clone();return o.__filtered__?o.__takeCount__=Jt(r,o.__takeCount__):o.__views__.push({size:Jt(r,ae),type:t+(o.__dir__<0?"Right":"")}),o},vt.prototype[t+"Right"]=function(r){return this.reverse()[t](r).reverse()}}),ye(["filter","map","takeWhile"],function(t,e){var r=e+1,o=r==B||r==At;vt.prototype[t]=function(c){var d=this.clone();return d.__iteratees__.push({iteratee:nt(c,3),type:r}),d.__filtered__=d.__filtered__||o,d}}),ye(["head","last"],function(t,e){var r="take"+(e?"Right":"");vt.prototype[t]=function(){return this[r](1).value()[0]}}),ye(["initial","tail"],function(t,e){var r="drop"+(e?"":"Right");vt.prototype[t]=function(){return this.__filtered__?new vt(this):this[r](1)}}),vt.prototype.compact=function(){return this.filter(oe)},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(r){return Yn(r,t,e)})}),vt.prototype.reject=function(t){return this.filter(Zr(nt(t)))},vt.prototype.slice=function(t,e){t=lt(t);var r=this;return r.__filtered__&&(t>0||e<0)?new vt(r):(t<0?r=r.takeRight(-t):t&&(r=r.drop(t)),e!==n&&(e=lt(e),r=e<0?r.dropRight(-e):r.take(e-t)),r)},vt.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},vt.prototype.toArray=function(){return this.take(ae)},Ue(vt.prototype,function(t,e){var r=/^(?:filter|find|map|reject)|While$/.test(e),o=/^(?:head|last)$/.test(e),c=p[o?"take"+(e=="last"?"Right":""):e],d=o||/^find/.test(e);c&&(p.prototype[e]=function(){var w=this.__wrapped__,C=o?[1]:arguments,A=w instanceof vt,O=C[0],I=A||ft(w),N=function(gt){var mt=c.apply(p,je([gt],C));return o&&K?mt[0]:mt};I&&r&&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:Jr,args:[N],thisArg:n}),new _e(it,K)}return rt&&pt?t.apply(this,C):(it=this.thru(N),rt?o?it.value()[0]:it.value():it)})}),ye(["pop","push","shift","sort","splice","unshift"],function(t){var e=wr[t],r=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",o=/^(?:pop|shift)$/.test(t);p.prototype[t]=function(){var c=arguments;if(o&&!this.__chain__){var d=this.value();return e.apply(ft(d)?d:[],c)}return this[r](function(w){return e.apply(ft(w)?w:[],c)})}}),Ue(vt.prototype,function(t,e){var r=p[e];if(r){var o=r.name+"";Ct.call(Tn,o)||(Tn[o]=[]),Tn[o].push({name:e,func:r})}}),Tn[Wr(n,W).name]=[{name:"wrapper",func:n}],vt.prototype.clone=al,vt.prototype.reverse=ul,vt.prototype.value=cl,p.prototype.at=Fd,p.prototype.chain=Md,p.prototype.commit=qd,p.prototype.next=Wd,p.prototype.plant=Hd,p.prototype.reverse=$d,p.prototype.toJSON=p.prototype.valueOf=p.prototype.value=Gd,p.prototype.first=p.prototype.head,Hn&&(p.prototype[Hn]=Kd),p},kn=qh();un?((un.exports=kn)._=kn,Di._=kn):Ht._=kn}).call(Wt)}(rr,rr.exports);var nc=rr.exports;const rc={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 ic(){return function a(i,n,s){function u(g,S){if(!n[g]){if(!i[g]){var v=typeof require=="function"&&require;if(!S&&v)return v(g,!0);if(h)return h(g,!0);throw new Error("Cannot find module '"+g+"'")}var _=n[g]={exports:{}};i[g][0].call(_.exports,function(y){var l=i[g][1][y];return u(l||y)},_,_.exports,a,i,n,s)}return n[g].exports}for(var h=typeof require=="function"&&require,m=0;m<s.length;m++)u(s[m]);return u}({1:[function(a,i){i.exports=a("./lib/")},{"./lib/":2}],2:[function(a,i,n){function s(v,_){typeof v=="object"&&(_=v,v=void 0),_=_||{};var y,l=u(v),f=l.source,b=l.id;return _.forceNew||_["force new connection"]||_.multiplex===!1?(g("ignoring socket cache for %s",f),y=m(f,_)):(S[b]||(g("new io instance for %s",f),S[b]=m(f,_)),y=S[b]),y.socket(l.path)}var u=a("./url"),h=a("socket.io-parser"),m=a("./manager"),g=a("debug")("socket.io-client");i.exports=n=s;var S=n.managers={};n.protocol=h.protocol,n.connect=s,n.Manager=a("./manager"),n.Socket=a("./socket")},{"./manager":3,"./socket":5,"./url":6,debug:10,"socket.io-parser":44}],3:[function(a,i){function n(l,f){return this instanceof n?(l&&typeof l=="object"&&(f=l,l=void 0),f=f||{},f.path=f.path||"/socket.io",this.nsps={},this.subs=[],this.opts=f,this.reconnection(f.reconnection!==!1),this.reconnectionAttempts(f.reconnectionAttempts||1/0),this.reconnectionDelay(f.reconnectionDelay||1e3),this.reconnectionDelayMax(f.reconnectionDelayMax||5e3),this.randomizationFactor(f.randomizationFactor||.5),this.backoff=new y({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(f.timeout==null?2e4:f.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=f.autoConnect!==!1,void(this.autoConnect&&this.open())):new n(l,f)}var s=(a("./url"),a("engine.io-client")),u=a("./socket"),h=a("component-emitter"),m=a("socket.io-parser"),g=a("./on"),S=a("component-bind"),v=(a("object-component"),a("debug")("socket.io-client:manager")),_=a("indexof"),y=a("backo2");i.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},h(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=s(this.uri,this.opts);var f=this.engine,b=this;this.readyState="opening",this.skipReconnect=!1;var E=g(f,"open",function(){b.onopen(),l&&l()}),x=g(f,"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(),f.close(),f.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 f=this.nsps[l];if(!f){f=new u(this,l),this.nsps[l]=f;var b=this;f.on("connect",function(){f.id=b.engine.id,~_(b.connected,f)||b.connected.push(f)})}return f},n.prototype.destroy=function(l){var f=_(this.connected,l);~f&&this.connected.splice(f,1),this.connected.length||this.close()},n.prototype.packet=function(l){v("writing packet %j",l);var f=this;f.encoding?f.packetBuffer.push(l):(f.encoding=!0,this.encoder.encode(l,function(b){for(var E=0;E<b.length;E++)f.engine.write(b[E]);f.encoding=!1,f.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 f=this.backoff.duration();v("will wait %dms before reconnect attempt",f),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())}))},f);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(a,i){function n(s,u,h){return s.on(u,h),{destroy:function(){s.removeListener(u,h)}}}i.exports=n},{}],5:[function(a,i,n){function s(f,b){this.io=f,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=a("socket.io-parser"),h=a("component-emitter"),m=a("to-array"),g=a("./on"),S=a("component-bind"),v=a("debug")("socket.io-client:socket"),_=a("has-binary");i.exports=s;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=h.prototype.emit;h(s.prototype),s.prototype.subEvents=function(){if(!this.subs){var f=this.io;this.subs=[g(f,"open",S(this,"onopen")),g(f,"packet",S(this,"onpacket")),g(f,"close",S(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 f=m(arguments);return f.unshift("message"),this.emit.apply(this,f),this},s.prototype.emit=function(f){if(y.hasOwnProperty(f))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},s.prototype.packet=function(f){f.nsp=this.nsp,this.io.packet(f)},s.prototype.onopen=function(){v("transport is open - connecting"),this.nsp!="/"&&this.packet({type:u.CONNECT})},s.prototype.onclose=function(f){v("close (%s)",f),this.connected=!1,this.disconnected=!0,delete this.id,this.emit("disconnect",f)},s.prototype.onpacket=function(f){if(f.nsp==this.nsp)switch(f.type){case u.CONNECT:this.onconnect();break;case u.EVENT:this.onevent(f);break;case u.BINARY_EVENT:this.onevent(f);break;case u.ACK:this.onack(f);break;case u.BINARY_ACK:this.onack(f);break;case u.DISCONNECT:this.ondisconnect();break;case u.ERROR:this.emit("error",f.data)}},s.prototype.onevent=function(f){var b=f.data||[];v("emitting event %j",b),f.id!=null&&(v("attaching ack callback to event"),b.push(this.ack(f.id))),this.connected?l.apply(this,b):this.receiveBuffer.push(b)},s.prototype.ack=function(f){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:f,data:x})}}},s.prototype.onack=function(f){v("calling ack %s with %j",f.id,f.data);var b=this.acks[f.id];b.apply(this,f.data),delete this.acks[f.id]},s.prototype.onconnect=function(){this.connected=!0,this.disconnected=!1,this.emit("connect"),this.emitBuffered()},s.prototype.emitBuffered=function(){var f;for(f=0;f<this.receiveBuffer.length;f++)l.apply(this,this.receiveBuffer[f]);for(this.receiveBuffer=[],f=0;f<this.sendBuffer.length;f++)this.packet(this.sendBuffer[f]);this.sendBuffer=[]},s.prototype.ondisconnect=function(){v("server disconnect (%s)",this.nsp),this.destroy(),this.onclose("io server disconnect")},s.prototype.destroy=function(){if(this.subs){for(var f=0;f<this.subs.length;f++)this.subs[f].destroy();this.subs=null}this.io.destroy(this)},s.prototype.close=s.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(a,i){(function(n){function s(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)||(h("protocol-less url %s",m),m=typeof v<"u"?v.protocol+"//"+m:"https://"+m),h("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=a("parseuri"),h=a("debug")("socket.io-client:url");i.exports=s}).call(this,typeof self<"u"?self:typeof window<"u"?window:{})},{debug:10,parseuri:42}],7:[function(a,i){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}i.exports=n,n.prototype.duration=function(){var s=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var u=Math.random(),h=Math.floor(u*this.jitter*s);s=1&Math.floor(10*u)?s+h:s-h}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(a,i){var n=[].slice;i.exports=function(s,u){if(typeof u=="string"&&(u=s[u]),typeof u!="function")throw new Error("bind() requires a function");var h=n.call(arguments,2);return function(){return u.apply(s,h.concat(n.call(arguments)))}}},{}],9:[function(a,i){function n(u){return u?s(u):void 0}function s(u){for(var h in n.prototype)u[h]=n.prototype[h];return u}i.exports=n,n.prototype.on=n.prototype.addEventListener=function(u,h){return this._callbacks=this._callbacks||{},(this._callbacks[u]=this._callbacks[u]||[]).push(h),this},n.prototype.once=function(u,h){function m(){g.off(u,m),h.apply(this,arguments)}var g=this;return this._callbacks=this._callbacks||{},m.fn=h,this.on(u,m),this},n.prototype.off=n.prototype.removeListener=n.prototype.removeAllListeners=n.prototype.removeEventListener=function(u,h){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===h||g.fn===h){m.splice(S,1);break}return this},n.prototype.emit=function(u){this._callbacks=this._callbacks||{};var h=[].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,h)}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(a,i){function n(u){return n.enabled(u)?function(h){h=s(h);var m=new Date,g=m-(n[u]||m);n[u]=m,h=u+" "+h+" +"+n.humanize(g),window.console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}:function(){}}function s(u){return u instanceof Error?u.stack||u.message:u}i.exports=n,n.names=[],n.skips=[],n.enable=function(u){try{localStorage.debug=u}catch{}for(var h=(u||"").split(/[\s,]+/),m=h.length,g=0;m>g;g++)u=h[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 h=1e3,m=6e4,g=60*m;return u>=g?(u/g).toFixed(1)+"h":u>=m?(u/m).toFixed(1)+"m":u>=h?(u/h|0)+"s":u+"ms"},n.enabled=function(u){for(var h=0,m=n.skips.length;m>h;h++)if(n.skips[h].test(u))return!1;for(var h=0,m=n.names.length;m>h;h++)if(n.names[h].test(u))return!0;return!1};try{window.localStorage&&n.enable(localStorage.debug)}catch{}},{}],11:[function(a,i){i.exports=a("./lib/")},{"./lib/":12}],12:[function(a,i){i.exports=a("./socket"),i.exports.parser=a("engine.io-parser")},{"./socket":13,"engine.io-parser":25}],13:[function(a,i){(function(n){function s(f,b){if(!(this instanceof s))return new s(f,b);if(b=b||{},f&&typeof f=="object"&&(b=f,f=null),f&&(f=_(f),b.host=f.host,b.secure=f.protocol=="https"||f.protocol=="wss",b.port=f.port,f.query&&(b.query=f.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(f){var b={};for(var E in f)f.hasOwnProperty(E)&&(b[E]=f[E]);return b}var h=a("./transports"),m=a("component-emitter"),g=a("debug")("engine.io-client:socket"),S=a("indexof"),v=a("engine.io-parser"),_=a("parseuri"),y=a("parsejson"),l=a("parseqs");i.exports=s,s.priorWebsocketSuccess=!1,m(s.prototype),s.protocol=v.protocol,s.Socket=s,s.Transport=a("./transport"),s.transports=a("./transports"),s.parser=a("engine.io-parser"),s.prototype.createTransport=function(f){g('creating transport "%s"',f);var b=u(this.query);b.EIO=v.protocol,b.transport=f,this.id&&(b.sid=this.id);var E=new h[f]({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},s.prototype.open=function(){var b;if(this.rememberUpgrade&&s.priorWebsocketSuccess&&this.transports.indexOf("websocket")!=-1)b="websocket";else{if(this.transports.length==0){var f=this;return void setTimeout(function(){f.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)},s.prototype.setTransport=function(f){g("setting transport %s",f.name);var b=this;this.transport&&(g("clearing existing transport %s",this.transport.name),this.transport.removeAllListeners()),this.transport=f,f.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")})},s.prototype.probe=function(f){function b(){if(M.onlyBinaryUpgrades){var H=!this.supportsBinary&&M.transport.supportsBinary;D=D||H}D||(g('probe transport "%s" opened',f),$.send([{type:"ping",data:"probe"}]),$.once("packet",function(L){if(!D)if(L.type=="pong"&&L.data=="probe"){if(g('probe transport "%s" pong',f),M.upgrading=!0,M.emit("upgrading",$),!$)return;s.priorWebsocketSuccess=$.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($),$.send([{type:"upgrade"}]),M.emit("upgrade",$),$=null,M.upgrading=!1,M.flush())})}else{g('probe transport "%s" failed',f);var U=new Error("probe error");U.transport=$.name,M.emit("upgradeError",U)}}))}function E(){D||(D=!0,ot(),$.close(),$=null)}function x(H){var L=new Error("probe error: "+H);L.transport=$.name,E(),g('probe transport "%s" failed because of error: %s',f,H),M.emit("upgradeError",L)}function W(){x("transport closed")}function st(){x("socket closed")}function V(H){$&&H.name!=$.name&&(g('"%s" works - aborting "%s"',H.name,$.name),E())}function ot(){$.removeListener("open",b),$.removeListener("error",x),$.removeListener("close",W),M.removeListener("close",st),M.removeListener("upgrading",V)}g('probing transport "%s"',f);var $=this.createTransport(f,{probe:1}),D=!1,M=this;s.priorWebsocketSuccess=!1,$.once("open",b),$.once("error",x),$.once("close",W),this.once("close",st),this.once("upgrading",V),$.open()},s.prototype.onOpen=function(){if(g("socket open"),this.readyState="open",s.priorWebsocketSuccess=this.transport.name=="websocket",this.emit("open"),this.flush(),this.readyState=="open"&&this.upgrade&&this.transport.pause){g("starting upgrade probes");for(var f=0,b=this.upgrades.length;b>f;f++)this.probe(this.upgrades[f])}},s.prototype.onPacket=function(f){if(this.readyState=="opening"||this.readyState=="open")switch(g('socket receive: type "%s", data "%s"',f.type,f.data),this.emit("packet",f),this.emit("heartbeat"),f.type){case"open":this.onHandshake(y(f.data));break;case"pong":this.setPing();break;case"error":var b=new Error("server error");b.code=f.data,this.emit("error",b);break;case"message":this.emit("data",f.data),this.emit("message",f.data)}else g('packet received with socket readyState "%s"',this.readyState)},s.prototype.onHandshake=function(f){this.emit("handshake",f),this.id=f.sid,this.transport.query.sid=f.sid,this.upgrades=this.filterUpgrades(f.upgrades),this.pingInterval=f.pingInterval,this.pingTimeout=f.pingTimeout,this.onOpen(),this.readyState!="closed"&&(this.setPing(),this.removeListener("heartbeat",this.onHeartbeat),this.on("heartbeat",this.onHeartbeat))},s.prototype.onHeartbeat=function(f){clearTimeout(this.pingTimeoutTimer);var b=this;b.pingTimeoutTimer=setTimeout(function(){b.readyState!="closed"&&b.onClose("ping timeout")},f||b.pingInterval+b.pingTimeout)},s.prototype.setPing=function(){var f=this;clearTimeout(f.pingIntervalTimer),f.pingIntervalTimer=setTimeout(function(){g("writing ping packet - expecting pong within %sms",f.pingTimeout),f.ping(),f.onHeartbeat(f.pingTimeout)},f.pingInterval)},s.prototype.ping=function(){this.sendPacket("ping")},s.prototype.onDrain=function(){for(var f=0;f<this.prevBufferLen;f++)this.callbackBuffer[f]&&this.callbackBuffer[f]();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&&(g("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(f,b){return this.sendPacket("message",f,b),this},s.prototype.sendPacket=function(f,b,E){if(this.readyState!="closing"&&this.readyState!="closed"){var x={type:f,data:b};this.emit("packetCreate",x),this.writeBuffer.push(x),this.callbackBuffer.push(E),this.flush()}},s.prototype.close=function(){function f(){x.onClose("forced close"),g("socket closing - telling transport to close"),x.transport.close()}function b(){x.removeListener("upgrade",b),x.removeListener("upgradeError",b),f()}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():f()}):this.upgrading?E():f()}return this},s.prototype.onError=function(f){g("socket error %j",f),s.priorWebsocketSuccess=!1,this.emit("error",f),this.onClose("transport error",f)},s.prototype.onClose=function(f,b){if(this.readyState=="opening"||this.readyState=="open"||this.readyState=="closing"){g('socket close with reason: "%s"',f);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",f,b)}},s.prototype.filterUpgrades=function(f){for(var b=[],E=0,x=f.length;x>E;E++)~S(this.transports,f[E])&&b.push(f[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(a,i){function n(h){this.path=h.path,this.hostname=h.hostname,this.port=h.port,this.secure=h.secure,this.query=h.query,this.timestampParam=h.timestampParam,this.timestampRequests=h.timestampRequests,this.readyState="",this.agent=h.agent||!1,this.socket=h.socket,this.enablesXDR=h.enablesXDR,this.pfx=h.pfx,this.key=h.key,this.passphrase=h.passphrase,this.cert=h.cert,this.ca=h.ca,this.ciphers=h.ciphers,this.rejectUnauthorized=h.rejectUnauthorized}var s=a("engine.io-parser"),u=a("component-emitter");i.exports=n,u(n.prototype),n.timestamps=0,n.prototype.onError=function(h,m){var g=new Error(h);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(h){if(this.readyState!="open")throw new Error("Transport not open");this.write(h)},n.prototype.onOpen=function(){this.readyState="open",this.writable=!0,this.emit("open")},n.prototype.onData=function(h){var m=s.decodePacket(h,this.socket.binaryType);this.onPacket(m)},n.prototype.onPacket=function(h){this.emit("packet",h)},n.prototype.onClose=function(){this.readyState="closed",this.emit("close")}},{"component-emitter":9,"engine.io-parser":25}],15:[function(a,i,n){(function(s){function u(v){var _,y=!1,l=!1,f=v.jsonp!==!1;if(s.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 h(v),"open"in _&&!v.forceJSONP)return new m(v);if(!f)throw new Error("JSONP disabled");return new g(v)}var h=a("xmlhttprequest"),m=a("./polling-xhr"),g=a("./polling-jsonp"),S=a("./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(a,i){(function(n){function s(){}function u(_){h.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=s)},!1)}var h=a("./polling"),m=a("component-inherit");i.exports=u;var g,S=/\n/g,v=/\\n/g;m(u,h),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),h.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 f=typeof navigator<"u"&&/gecko/i.test(navigator.userAgent);f&&setTimeout(function(){var b=document.createElement("iframe");document.body.appendChild(b),document.body.removeChild(b)},100)},u.prototype.doWrite=function(_,y){function l(){f(),y()}function f(){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(),f(),_=_.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(a,i){(function(n){function s(){}function u(l){if(S.call(this,l),n.location){var f=location.protocol=="https:",b=location.port;b||(b=f?443:80),this.xd=l.hostname!=n.location.hostname||b!=l.port,this.xs=l.secure!=f}}function h(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 h.requests)h.requests.hasOwnProperty(l)&&h.requests[l].abort()}var g=a("xmlhttprequest"),S=a("./polling"),v=a("component-emitter"),_=a("component-inherit"),y=a("debug")("engine.io-client:polling-xhr");i.exports=u,i.exports.Request=h,_(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 h(l)},u.prototype.doWrite=function(l,f){var b=typeof l!="string"&&l!==void 0,E=this.request({method:"POST",data:l,isBinary:b}),x=this;E.on("success",f),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(),f=this;l.on("data",function(b){f.onData(b)}),l.on("error",function(b){f.onError("xhr poll error",b)}),this.pollXhr=l},v(h.prototype),h.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 f=this.xhr=new g(l),b=this;try{if(y("xhr open %s: %s",this.method,this.uri),f.open(this.method,this.uri,this.async),this.supportsBinary&&(f.responseType="arraybuffer"),this.method=="POST")try{this.isBinary?f.setRequestHeader("Content-type","application/octet-stream"):f.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}"withCredentials"in f&&(f.withCredentials=!0),this.hasXDR()?(f.onload=function(){b.onLoad()},f.onerror=function(){b.onError(f.responseText)}):f.onreadystatechange=function(){f.readyState==4&&(f.status==200||f.status==1223?b.onLoad():setTimeout(function(){b.onError(f.status)},0))},y("xhr data %s",this.data),f.send(this.data)}catch(E){return void setTimeout(function(){b.onError(E)},0)}n.document&&(this.index=h.requestsCount++,h.requests[this.index]=this)},h.prototype.onSuccess=function(){this.emit("success"),this.cleanup()},h.prototype.onData=function(l){this.emit("data",l),this.onSuccess()},h.prototype.onError=function(l){this.emit("error",l),this.cleanup(!0)},h.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 h.requests[this.index],this.xhr=null}},h.prototype.onLoad=function(){var l;try{var f;try{f=this.xhr.getResponseHeader("Content-Type").split(";")[0]}catch{}l=f==="application/octet-stream"?this.xhr.response:this.supportsBinary?"ok":this.xhr.responseText}catch(b){this.onError(b)}l!=null&&this.onData(l)},h.prototype.hasXDR=function(){return typeof n.XDomainRequest<"u"&&!this.xs&&this.enablesXDR},h.prototype.abort=function(){this.cleanup()},n.document&&(h.requestsCount=0,h.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(a,i){function n(v){var _=v&&v.forceBase64;(!S||_)&&(this.supportsBinary=!1),s.call(this,v)}var s=a("../transport"),u=a("parseqs"),h=a("engine.io-parser"),m=a("component-inherit"),g=a("debug")("engine.io-client:polling");i.exports=n;var S=function(){var v=a("xmlhttprequest"),_=new v({xdomain:!1});return _.responseType!=null}();m(n,s),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)};h.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;h.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+"-"+s.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(a,i){function n(v){var _=v&&v.forceBase64;_&&(this.supportsBinary=!1),s.call(this,v)}var s=a("../transport"),u=a("engine.io-parser"),h=a("parseqs"),m=a("component-inherit"),g=a("debug")("engine.io-client:websocket"),S=a("ws");i.exports=n,m(n,s),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(){s.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,f=v.length;f>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(){s.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=h.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(a,i){var n=a("has-cors");i.exports=function(s){var u=s.xdomain,h=s.xscheme,m=s.enablesXDR;try{if(typeof XMLHttpRequest<"u"&&(!u||n))return new XMLHttpRequest}catch{}try{if(typeof XDomainRequest<"u"&&!h&&m)return new XDomainRequest}catch{}if(!u)try{return new ActiveXObject("Microsoft.XMLHTTP")}catch{}}},{"has-cors":38}],21:[function(a,i){i.exports=function(n,s){var u=function(){};u.prototype=s.prototype,n.prototype=new u,n.prototype.constructor=n}},{}],22:[function(a,i,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 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(f){f!=="%%"&&(y++,f==="%c"&&(l=y))}),S.splice(l,0,_),S}function h(){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=i.exports=a("./debug"),n.log=h,n.formatArgs=u,n.save=m,n.load=g,n.useColors=s,n.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"],n.formatters.j=function(S){return JSON.stringify(S)},n.enable(g())},{"./debug":23}],23:[function(a,i,n){function s(){return n.colors[_++%n.colors.length]}function u(y){function l(){}function f(){var E=f,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=s());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($,D){if($==="%%")return $;V++;var M=n.formatters[D];if(typeof M=="function"){var H=st[V];$=M.call(E,H),st.splice(V,1),V--}return $}),typeof n.formatArgs=="function"&&(st=n.formatArgs.apply(E,st));var ot=f.log||n.log||console.log.bind(console);ot.apply(E,st)}l.enabled=!1,f.enabled=!0;var b=n.enabled(y)?f:l;return b.namespace=y,b}function h(y){n.save(y);for(var l=(y||"").split(/[\s,]+/),f=l.length,b=0;f>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,f;for(l=0,f=n.skips.length;f>l;l++)if(n.skips[l].test(y))return!1;for(l=0,f=n.names.length;f>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=i.exports=u,n.coerce=S,n.disable=m,n.enable=h,n.enabled=g,n.humanize=a("ms"),n.names=[],n.skips=[],n.formatters={};var v,_=0},{ms:24}],24:[function(a,i){function n(y){var l=/^((?:\d+)?\.?\d+) *(ms|seconds?|s|minutes?|m|hours?|h|days?|d|years?|y)?$/i.exec(y);if(l){var f=parseFloat(l[1]),b=(l[2]||"ms").toLowerCase();switch(b){case"years":case"year":case"y":return f*_;case"days":case"day":case"d":return f*v;case"hours":case"hour":case"h":return f*S;case"minutes":case"minute":case"m":return f*g;case"seconds":case"second":case"s":return f*m;case"ms":return f}}}function s(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 h(y,v,"day")||h(y,S,"hour")||h(y,g,"minute")||h(y,m,"second")||y+" ms"}function h(y,l,f){return l>y?void 0:1.5*l>y?Math.floor(y/l)+" "+f:Math.ceil(y/l)+" "+f+"s"}var m=1e3,g=60*m,S=60*g,v=24*S,_=365.25*v;i.exports=function(y,l){return l=l||{},typeof y=="string"?n(y):l.long?u(y):s(y)}},{}],25:[function(a,i,n){(function(s){function u(D,M){var H="b"+n.packets[D.type]+D.data.data;return M(H)}function h(D,M,H){if(!M)return n.encodeBase64Packet(D,H);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 H(X.buffer)}function m(D,M,H){if(!M)return n.encodeBase64Packet(D,H);var L=new FileReader;return L.onload=function(){D.data=L.result,n.encodePacket(D,M,!0,H)},L.readAsArrayBuffer(D.data)}function g(D,M,H){if(!M)return n.encodeBase64Packet(D,H);if(W)return m(D,M,H);var L=new Uint8Array(1);L[0]=st[D.type];var U=new $([L.buffer,D.data]);return H(U)}function S(D,M,H){for(var L=new Array(D.length),U=f(D.length,H),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=a("./keys"),_=a("has-binary"),y=a("arraybuffer.slice"),l=a("base64-arraybuffer"),f=a("after"),b=a("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"},$=a("blob");n.encodePacket=function(D,M,H,L){typeof M=="function"&&(L=M,M=!1),typeof H=="function"&&(L=H,H=null);var U=D.data===void 0?void 0:D.data.buffer||D.data;if(s.ArrayBuffer&&U instanceof ArrayBuffer)return h(D,M,L);if($&&U instanceof s.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+=H?b.encode(String(D.data)):String(D.data)),L(""+X)},n.encodeBase64Packet=function(D,M){var H="b"+n.packets[D.type];if($&&D.data instanceof $){var L=new FileReader;return L.onload=function(){var B=L.result.split(",")[1];M(H+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 H+=s.btoa(U),M(H)},n.decodePacket=function(D,M,H){if(typeof D=="string"||D===void 0){if(D.charAt(0)=="b")return n.decodeBase64Packet(D.substr(1),M);if(H)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 $&&M==="blob"&&(X=new $([X])),{type:V[U],data:X}},n.decodeBase64Packet=function(D,M){var H=V[D.charAt(0)];if(!s.ArrayBuffer)return{type:H,data:{base64:!0,data:D.substr(1)}};var L=l.decode(D.substr(1));return M==="blob"&&$&&(L=new $([L])),{type:H,data:L}},n.encodePayload=function(D,M,H){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"&&(H=M,M=null);var X=_(D);return M&&X?$&&!W?n.encodePayloadAsBlob(D,H):n.encodePayloadAsArrayBuffer(D,H):D.length?void S(D,U,function(Q,j){return H(j.join(""))}):H("0:")},n.decodePayload=function(D,M,H){if(typeof D!="string")return n.decodePayloadAsBinary(D,M,H);typeof M=="function"&&(H=M,M=null);var L;if(D=="")return H(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 H(ot,0,1);if(X.length){if(L=n.decodePacket(X,M,!0),ot.type==L.type&&ot.data==L.data)return H(ot,0,1);var At=H(L,j+U,B);if(At===!1)return}j+=U,Q=""}}return Q!=""?H(ot,0,1):void 0},n.encodePayloadAsArrayBuffer=function(D,M){function H(L,U){n.encodePacket(L,!0,!0,function(X){return U(null,X)})}return D.length?void S(D,H,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 zt=At.byteLength.toString(),ut=0;ut<zt.length;ut++)Q[j++]=parseInt(zt[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 H(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,$){var ut=new $([Q.buffer,Rt.buffer,X]);U(null,ut)}})}S(D,H,function(L,U){return M(new $(U))})},n.decodePayloadAsBinary=function(D,M,H){typeof M=="function"&&(H=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 H(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(zt,Le){H(n.decodePacket(zt,M,!0),Le,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(a,i){i.exports=Object.keys||function(n){var s=[],u=Object.prototype.hasOwnProperty;for(var h in n)u.call(n,h)&&s.push(h);return s}},{}],27:[function(a,i){function n(u,h,m){function g(v,_){if(g.count<=0)throw new Error("after called too many times");--g.count,v?(S=!0,h(v),h=m):g.count!==0||S||h(null,_)}var S=!1;return m=m||s,g.count=u,u===0?h():g}function s(){}i.exports=n},{}],28:[function(a,i){i.exports=function(n,s,u){var h=n.byteLength;if(s=s||0,u=u||h,n.slice)return n.slice(s,u);if(0>s&&(s+=h),0>u&&(u+=h),u>h&&(u=h),s>=h||s>=u||h===0)return new ArrayBuffer(0);for(var m=new Uint8Array(n),g=new Uint8Array(u-s),S=s,v=0;u>S;S++,v++)g[v]=m[S];return g.buffer}},{}],29:[function(a,i,n){(function(s){n.encode=function(u){var h,m=new Uint8Array(u),g=m.length,S="";for(h=0;g>h;h+=3)S+=s[m[h]>>2],S+=s[(3&m[h])<<4|m[h+1]>>4],S+=s[(15&m[h+1])<<2|m[h+2]>>6],S+=s[63&m[h+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 h,m,g,S,v,_=.75*u.length,y=u.length,l=0;u[u.length-1]==="="&&(_--,u[u.length-2]==="="&&_--);var f=new ArrayBuffer(_),b=new Uint8Array(f);for(h=0;y>h;h+=4)m=s.indexOf(u[h]),g=s.indexOf(u[h+1]),S=s.indexOf(u[h+2]),v=s.indexOf(u[h+3]),b[l++]=m<<2|g>>4,b[l++]=(15&g)<<4|S>>2,b[l++]=(3&S)<<6|63&v;return f}})("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/")},{}],30:[function(a,i){(function(n){function s(_){for(var y=0;y<_.length;y++){var l=_[y];if(l.buffer instanceof ArrayBuffer){var f=l.buffer;if(l.byteLength!==f.byteLength){var b=new Uint8Array(l.byteLength);b.set(new Uint8Array(f,l.byteOffset,l.byteLength)),f=b.buffer}_[y]=f}}}function u(_,y){y=y||{};var l=new m;s(_);for(var f=0;f<_.length;f++)l.append(_[f]);return y.type?l.getBlob(y.type):l.getBlob()}function h(_,y){return s(_),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;i.exports=function(){return g?S?n.Blob:h:v?u:void 0}()}).call(this,typeof self<"u"?self:typeof window<"u"?window:{})},{}],31:[function(a,i,n){(function(s){(function(u){function h(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=h(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 f(L){W=h(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 i=="object"&&i&&i.exports==b&&i,x=typeof s=="object"&&s;(x.global===x||x.window===x)&&(u=x);var W,st,V,ot=String.fromCharCode,$={version:"2.0.0",encode:_,decode:f};if(b&&!b.nodeType)if(E)E.exports=$;else{var D={},M=D.hasOwnProperty;for(var H in $)M.call($,H)&&(b[H]=$[H])}else u.utf8=$})(this)}).call(this,typeof self<"u"?self:typeof window<"u"?window:{})},{}],32:[function(a,i){(function(n){var s=/^[\],:{}\s]*$/,u=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,h=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,m=/(?:^|:|,)(?:\s*\[)+/g,g=/^\s+/,S=/\s+$/;i.exports=function(v){return typeof v=="string"&&v?(v=v.replace(g,"").replace(S,""),n.JSON&&JSON.parse?JSON.parse(v):s.test(v.replace(u,"@").replace(h,"]").replace(m,""))?new Function("return "+v)():void 0):null}}).call(this,typeof self<"u"?self:typeof window<"u"?window:{})},{}],33:[function(a,i,n){n.encode=function(s){var u="";for(var h in s)s.hasOwnProperty(h)&&(u.length&&(u+="&"),u+=encodeURIComponent(h)+"="+encodeURIComponent(s[h]));return u},n.decode=function(s){for(var u={},h=s.split("&"),m=0,g=h.length;g>m;m++){var S=h[m].split("=");u[decodeURIComponent(S[0])]=decodeURIComponent(S[1])}return u}},{}],34:[function(a,i){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"];i.exports=function(u){var h=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[s[_]]=S[_]||"";return m!=-1&&g!=-1&&(v.source=h,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(a,i){function n(h,m){return m?new u(h,m):new u(h)}var s=function(){return self}(),u=s.WebSocket||s.MozWebSocket;i.exports=u?n:null,u&&(n.prototype=u.prototype)},{}],36:[function(a,i){(function(n){function s(h){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(h)}var u=a("isarray");i.exports=s}).call(this,typeof self<"u"?self:typeof window<"u"?window:{})},{isarray:37}],37:[function(a,i){i.exports=Array.isArray||function(n){return Object.prototype.toString.call(n)=="[object Array]"}},{}],38:[function(a,i){var n=a("global");try{i.exports="XMLHttpRequest"in n&&"withCredentials"in new n.XMLHttpRequest}catch{i.exports=!1}},{global:39}],39:[function(a,i){i.exports=function(){return this}()},{}],40:[function(a,i){var n=[].indexOf;i.exports=function(s,u){if(n)return s.indexOf(u);for(var h=0;h<s.length;++h)if(s[h]===u)return h;return-1}},{}],41:[function(a,i,n){var s=Object.prototype.hasOwnProperty;n.keys=Object.keys||function(u){var h=[];for(var m in u)s.call(u,m)&&h.push(m);return h},n.values=function(u){var h=[];for(var m in u)s.call(u,m)&&h.push(u[m]);return h},n.merge=function(u,h){for(var m in h)s.call(h,m)&&(u[m]=h[m]);return u},n.length=function(u){return n.keys(u).length},n.isEmpty=function(u){return n.length(u)==0}},{}],42:[function(a,i){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"];i.exports=function(u){for(var h=n.exec(u||""),m={},g=14;g--;)m[s[g]]=h[g]||"";return m}},{}],43:[function(a,i,n){(function(s){var u=a("isarray"),h=a("./is-buffer");n.deconstructPacket=function(m){function g(y){if(!y)return y;if(h(y)){var l={_placeholder:!0,num:S.length};return S.push(y),l}if(u(y)){for(var f=new Array(y.length),b=0;b<y.length;b++)f[b]=g(y[b]);return f}if(typeof y=="object"&&!(y instanceof Date)){var f={};for(var E in y)f[E]=g(y[E]);return f}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,f){if(!y)return y;if(s.Blob&&y instanceof Blob||s.File&&y instanceof File){v++;var b=new FileReader;b.onload=function(){f?f[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"&&!h(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(a,i,n){function s(){}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 h(E,x){function W(st){var V=f.deconstructPacket(st),ot=u(V.packet),$=V.buffers;$.unshift(ot),x($)}f.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 _=a("debug")("socket.io-parser"),y=a("json3"),l=(a("isarray"),a("component-emitter")),f=a("./binary"),b=a("./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=m,s.prototype.encode=function(E,x){if(_("encoding packet %j",E),n.BINARY_EVENT==E.type||n.BINARY_ACK==E.type)h(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=f.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(a,i){(function(n){function s(u){return n.Buffer&&n.Buffer.isBuffer(u)||n.ArrayBuffer&&u instanceof ArrayBuffer}i.exports=s}).call(this,typeof self<"u"?self:typeof window<"u"?window:{})},{}],46:[function(a,i){i.exports=a(37)},{}],47:[function(a,i,n){(function(s){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
34
|
\f\r `]})==et&&P(null,F)==="1"&&P([1,2],null,1)==`[
|
|
35
35
|
1,
|
|
36
36
|
2
|
|
37
|
-
]`&&P(new Date(-864e13))=='"-271821-04-20T00:00:00.000Z"'&&P(new Date(864e13))=='"+275760-09-13T00:00:00.000Z"'&&P(new Date(-621987552e5))=='"-000001-01-01T00:00:00.000Z"'&&P(new Date(-1))=='"1969-12-31T23:59:59.999Z"'}catch{Z=!1}}J=Z}if(q=="json-parse"){var tt=_.parse;if(typeof tt=="function")try{if(tt("0")===0&&!tt(!1)){F=tt(et);var z=F.a.length==5&&F.a[0]===1;if(z){try{z=!tt('" "')}catch{}if(z)try{z=tt("01")!==1}catch{}if(z)try{z=tt("1.")!==1}catch{}}}}catch{z=!1}J=z}}return u[q]=!!J}var h,m,g,S={}.toString,v=typeof JSON=="object"&&JSON,_=typeof n=="object"&&n&&!n.nodeType&&n;_&&v?(_.stringify=v.stringify,_.parse=v.parse):_=s.JSON=v||{};var y=new Date(-0xc782b5b800cec);try{y=y.getUTCFullYear()==-109252&&y.getUTCMonth()===0&&y.getUTCDate()===1&&y.getUTCHours()==10&&y.getUTCMinutes()==37&&y.getUTCSeconds()==6&&y.getUTCMilliseconds()==708}catch{}if(!u("json")){var l="[object Function]",f="[object Date]",b="[object Number]",E="[object String]",x="[object Array]",W="[object Boolean]",st=u("bug-string-char-index");if(!y)var V=Math.floor,ot=[0,31,59,90,120,151,181,212,243,273,304,334],$=function(q,J){return ot[J]+365*(q-1970)+V((q-1969+(J=+(J>1)))/4)-V((q-1901+J)/100)+V((q-1601+J)/400)};(h={}.hasOwnProperty)||(h=function(q){var J,F={};return(F.__proto__=null,F.__proto__={toString:1},F).toString!=S?h=function(et){var P=this.__proto__,Z=et in(this.__proto__=null,this);return this.__proto__=P,Z}:(J=F.constructor,h=function(et){var P=(this.constructor||J).prototype;return et in this&&!(et in P&&this[et]===P[et])}),F=null,h.call(this,q)});var D={boolean:1,number:1,string:1,undefined:1},M=function(q,J){var F=typeof q[J];return F=="object"?!!q[J]:!D[F]};if(m=function(q,J){var F,et,P,Z=0;(F=function(){this.valueOf=0}).prototype.valueOf=0,et=new F;for(P in et)h.call(et,P)&&Z++;return F=et=null,Z?m=Z==2?function(tt,z){var at,bt={},Xt=S.call(tt)==l;for(at in tt)Xt&&at=="prototype"||h.call(bt,at)||!(bt[at]=1)||!h.call(tt,at)||z(at)}:function(tt,z){var at,bt,Xt=S.call(tt)==l;for(at in tt)Xt&&at=="prototype"||!h.call(tt,at)||(bt=at==="constructor")||z(at);(bt||h.call(tt,at="constructor"))&&z(at)}:(et=["valueOf","toString","toLocaleString","propertyIsEnumerable","isPrototypeOf","hasOwnProperty","constructor"],m=function(tt,z){var at,bt,Xt=S.call(tt)==l,
|
|
37
|
+
]`&&P(new Date(-864e13))=='"-271821-04-20T00:00:00.000Z"'&&P(new Date(864e13))=='"+275760-09-13T00:00:00.000Z"'&&P(new Date(-621987552e5))=='"-000001-01-01T00:00:00.000Z"'&&P(new Date(-1))=='"1969-12-31T23:59:59.999Z"'}catch{Z=!1}}J=Z}if(q=="json-parse"){var tt=_.parse;if(typeof tt=="function")try{if(tt("0")===0&&!tt(!1)){F=tt(et);var z=F.a.length==5&&F.a[0]===1;if(z){try{z=!tt('" "')}catch{}if(z)try{z=tt("01")!==1}catch{}if(z)try{z=tt("1.")!==1}catch{}}}}catch{z=!1}J=z}}return u[q]=!!J}var h,m,g,S={}.toString,v=typeof JSON=="object"&&JSON,_=typeof n=="object"&&n&&!n.nodeType&&n;_&&v?(_.stringify=v.stringify,_.parse=v.parse):_=s.JSON=v||{};var y=new Date(-0xc782b5b800cec);try{y=y.getUTCFullYear()==-109252&&y.getUTCMonth()===0&&y.getUTCDate()===1&&y.getUTCHours()==10&&y.getUTCMinutes()==37&&y.getUTCSeconds()==6&&y.getUTCMilliseconds()==708}catch{}if(!u("json")){var l="[object Function]",f="[object Date]",b="[object Number]",E="[object String]",x="[object Array]",W="[object Boolean]",st=u("bug-string-char-index");if(!y)var V=Math.floor,ot=[0,31,59,90,120,151,181,212,243,273,304,334],$=function(q,J){return ot[J]+365*(q-1970)+V((q-1969+(J=+(J>1)))/4)-V((q-1901+J)/100)+V((q-1601+J)/400)};(h={}.hasOwnProperty)||(h=function(q){var J,F={};return(F.__proto__=null,F.__proto__={toString:1},F).toString!=S?h=function(et){var P=this.__proto__,Z=et in(this.__proto__=null,this);return this.__proto__=P,Z}:(J=F.constructor,h=function(et){var P=(this.constructor||J).prototype;return et in this&&!(et in P&&this[et]===P[et])}),F=null,h.call(this,q)});var D={boolean:1,number:1,string:1,undefined:1},M=function(q,J){var F=typeof q[J];return F=="object"?!!q[J]:!D[F]};if(m=function(q,J){var F,et,P,Z=0;(F=function(){this.valueOf=0}).prototype.valueOf=0,et=new F;for(P in et)h.call(et,P)&&Z++;return F=et=null,Z?m=Z==2?function(tt,z){var at,bt={},Xt=S.call(tt)==l;for(at in tt)Xt&&at=="prototype"||h.call(bt,at)||!(bt[at]=1)||!h.call(tt,at)||z(at)}:function(tt,z){var at,bt,Xt=S.call(tt)==l;for(at in tt)Xt&&at=="prototype"||!h.call(tt,at)||(bt=at==="constructor")||z(at);(bt||h.call(tt,at="constructor"))&&z(at)}:(et=["valueOf","toString","toLocaleString","propertyIsEnumerable","isPrototypeOf","hasOwnProperty","constructor"],m=function(tt,z){var at,bt,Xt=S.call(tt)==l,Ot=!Xt&&typeof tt.constructor!="function"&&M(tt,"hasOwnProperty")?tt.hasOwnProperty:h;for(at in tt)Xt&&at=="prototype"||!Ot.call(tt,at)||z(at);for(bt=et.length;at=et[--bt];Ot.call(tt,at)&&z(at));}),m(q,J)},!u("json-stringify")){var H={92:"\\\\",34:'\\"',8:"\\b",12:"\\f",10:"\\n",13:"\\r",9:"\\t"},L="000000",U=function(q,J){return(L+(J||0)).slice(-q)},X="\\u00",Q=function(q){var J,F='"',et=0,P=q.length,Z=P>10&&st;for(Z&&(J=q.split(""));P>et;et++){var tt=q.charCodeAt(et);switch(tt){case 8:case 9:case 10:case 12:case 13:case 34:case 92:F+=H[tt];break;default:if(32>tt){F+=X+U(2,tt.toString(16));break}F+=Z?J[et]:st?q.charAt(et):q[et]}}return F+'"'},j=function(q,J,F,et,P,Z,tt){var z,at,bt,Xt,Ot,Ae,Fn,ue,mn,Mn,Yt,jt,Ne,Be,qn,Me;try{z=J[q]}catch{}if(typeof z=="object"&&z)if(at=S.call(z),at!=f||h.call(z,"toJSON"))typeof z.toJSON=="function"&&(at!=b&&at!=E&&at!=x||h.call(z,"toJSON"))&&(z=z.toJSON(q));else if(z>-1/0&&1/0>z){if($){for(Ot=V(z/864e5),bt=V(Ot/365.2425)+1970-1;$(bt+1,0)<=Ot;bt++);for(Xt=V((Ot-$(bt,0))/30.42);$(bt,Xt+1)<=Ot;Xt++);Ot=1+Ot-$(bt,Xt),Ae=(z%864e5+864e5)%864e5,Fn=V(Ae/36e5)%24,ue=V(Ae/6e4)%60,mn=V(Ae/1e3)%60,Mn=Ae%1e3}else bt=z.getUTCFullYear(),Xt=z.getUTCMonth(),Ot=z.getUTCDate(),Fn=z.getUTCHours(),ue=z.getUTCMinutes(),mn=z.getUTCSeconds(),Mn=z.getUTCMilliseconds();z=(0>=bt||bt>=1e4?(0>bt?"-":"+")+U(6,0>bt?-bt:bt):U(4,bt))+"-"+U(2,Xt+1)+"-"+U(2,Ot)+"T"+U(2,Fn)+":"+U(2,ue)+":"+U(2,mn)+"."+U(3,Mn)+"Z"}else z=null;if(F&&(z=F.call(J,q,z)),z===null)return"null";if(at=S.call(z),at==W)return""+z;if(at==b)return z>-1/0&&1/0>z?""+z:"null";if(at==E)return Q(""+z);if(typeof z=="object"){for(Be=tt.length;Be--;)if(tt[Be]===z)throw TypeError();if(tt.push(z),Yt=[],qn=Z,Z+=P,at==x){for(Ne=0,Be=z.length;Be>Ne;Ne++)jt=j(Ne,z,F,et,P,Z,tt),Yt.push(jt===g?"null":jt);Me=Yt.length?P?`[
|
|
38
38
|
`+Z+Yt.join(`,
|
|
39
39
|
`+Z)+`
|
|
40
40
|
`+qn+"]":"["+Yt.join(",")+"]":"[]"}else m(et||z,function(Wn){var Ve=j(Wn,z,F,et,P,Z,tt);Ve!==g&&Yt.push(Q(Wn)+":"+(P?" ":"")+Ve)}),Me=Yt.length?P?`{
|
|
41
41
|
`+Z+Yt.join(`,
|
|
42
42
|
`+Z)+`
|
|
43
|
-
`+qn+"}":"{"+Yt.join(",")+"}":"{}";return tt.pop(),Me}};_.stringify=function(q,J,F){var et,P,Z,tt;if(typeof J=="function"||typeof J=="object"&&J){if((tt=S.call(J))==l)P=J;else if(tt==x){Z={};for(var z,at=0,bt=J.length;bt>at;z=J[at++],tt=S.call(z),(tt==E||tt==b)&&(Z[z]=1));}}if(F)if((tt=S.call(F))==b){if((F-=F%1)>0)for(et="",F>10&&(F=10);et.length<F;et+=" ");}else tt==E&&(et=F.length<=10?F:F.slice(0,10));return j("",(z={},z[""]=q,z),P,Z,et,"",[])}}if(!u("json-parse")){var B,kt,At=String.fromCharCode,
|
|
44
|
-
`,102:"\f",114:"\r"},ut=function(){throw B=kt=null,SyntaxError()},zt=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+=Ot[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"$"},Le=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=zt(),q!="]";F||(F=!0))F&&(q==","?(q=zt(),q=="]"&&ut()):ut()),q==","&&ut(),J.push(Le(q));return J}if(q=="{"){for(J={};q=zt(),q!="}";F||(F=!0))F&&(q==","?(q=zt(),q=="}"&&ut()):ut()),(q==","||typeof q!="string"||(st?q.charAt(0):q[0])!="@"||zt()!=":")&&ut(),J[q.slice(1)]=Le(zt());return J}ut()}return q},ae=function(q,J,F){var et=pr(q,J,F);et===g?delete q[J]:q[J]=et},pr=function(q,J,F){var et,P=q[J];if(typeof P=="object"&&P)if(S.call(P)==x)for(et=P.length;et--;)ae(P,et,F);else m(P,function(Z){ae(P,Z,F)});return F.call(q,J,P)};_.parse=function(q,J){var F,et;return B=0,kt=""+q,F=Le(zt()),zt()!="$"&&ut(),B=kt=null,J&&S.call(J)==l?pr((et={},et[""]=F,et),"",J):F}}}})(this)},{}],48:[function(a,i){function n(s,u){var h=[];u=u||0;for(var m=u||0;m<s.length;m++)h[m-u]=s[m];return h}i.exports=n},{}]},{},[1])(1)}const sc=Object.assign({"./v1_3_7.js":Object.freeze(Object.defineProperty({__proto__:null,default:ic},Symbol.toStringTag,{value:"Module"}))}),oc=/v\d+_\d+_\d+/;function ac(a){return typeof a=="function"}const ri=Object.entries(sc).reduce((a,i)=>{var u;const n=i[1].default,s=(u=i[0].match(oc))==null?void 0:u[0];return ac(n)&&s&&(a[s]=n()),a},{}),Gs=a=>{if(a in ri)return ri[a];throw new Error(`Socket version ${a} not found`)},uc={...ri,getSocketVersion:Gs,makeSocketVersion:(a,...i)=>Gs(a)(...i)};var ht=(a=>(a.ALL_DIALER_STATUS="AllDialersStatus",a.ALL_EXTENSION_STATUS="AllExtensionsStatus",a.ALL_USERS_STATUS="AllUsersStatus",a.CONNECT="connect",a.DISCONNECT="disconnect",a.CONNECT_ERROR_EVENT="connect_error",a.EXTENSION_EVENT="ExtensionEvent",a.KEEP_ALIVE="keepalive",a.KEEP_ALIVE_RESPONSE="keepaliveResponse",a.LOGIN_STATUS="loginStatus",a.LOGIN_SUCCESS="loginSuccess",a.QUEUE_EVENT="QueueEvent",a.ONLINE_STATUS_EVENT="onlineStatusEvent",a.DIALER_EVENT="DialerEvent",a.EXTENSIONS_UPDATED="ExtensionsUpdated",a))(ht||{}),zs=(a=>(a.NEWCALL="NEWCALL",a.ANSWER="ANSWER",a.HOLD="HOLD",a.UNHOLD="UNHOLD",a.HANGUP="HANGUP",a.USER_STATUS_UPDATE="userStatusUpdate",a))(zs||{});class Xs{static mapExtensionEvent(i){const n=i.reason;let s,u;return i.data.currentCall&&(u=this.configureUTCForObject(i.data.currentCall,["callAnswered","callStarted"],i.servertime,i.servertimeoffset)),n===zs.HANGUP?s={...i,reason:n,data:{...i.data,currentCall:u?{...u,duration:Date.now()-((u==null?void 0:u.callAnswered_UTC_CLIENT)??0)}:void 0}}:s={...i,data:{...i.data,currentCall:u},reason:n},s}static mapAllExtensionStatus(i){return{...i,extensions:i.extensions.map(n=>({...n,currentCall:n.currentCall?this.configureUTCForObject(n.currentCall,["callAnswered","callStarted"],i.servertime,i.servertimeoffset):void 0}))}}static assignProperty(i,n,s){i[n]=s}static configureUTCForObject(i,n,s,u){const h=(s-u*60)*1e3,m=Date.now()-h,g={};return n.forEach(S=>{const v=i[S];if(console.log("####################"),console.log("property",S),console.log("value",v),console.log("####################"),v===0)this.assignProperty(g,`${S}_UTC`,0),this.assignProperty(g,`${S}_UTC_CLIENT`,0);else{const _=(v-u*60)*1e3;this.assignProperty(g,`${S}_UTC`,_),this.assignProperty(g,`${S}_UTC_CLIENT`,_+m)}}),{...i,...g}}}var ii=(a=>(a.UPDATE_MONITORED_EXTENSIONS="updateMonitoredExtensions",a.KEEP_ALIVE="keepAlive",a))(ii||{});class cc{constructor(i){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=i,this.eventsSdkClass=i}getSocketIoFunction(i){const n=i.split("v="),s="v".concat(n[n.length-1]).replaceAll(".","_");this.ioFunction=uc.getSocketVersion(s)}initSocketConnection(){const i=this.eventsSdkClass.authClass.token,n=this.eventsSdkClass.options.protocol,s=this.eventsSdkClass.server;try{const u=s?s.Domain:this.eventsSdkClass.URL,h=s?`${n}://${u}`:this.eventsSdkClass.URL;this.eventsSdkClass.loggerClass.log(Gt.INFO,"Connecting to..",h),this.eventsSdkClass.eventEmitterClass.emit(ht.ONLINE_STATUS_EVENT,{isSocketConnected:!1,attemptToConnect:h});const m={reconnection:!1,upgrade:!1,transports:["websocket"],forceNew:!0,query:{token:i},timeout:this.eventsSdkClass.options.timeout};if(i&&(m.query={token:i}),this.ioFunction&&h)this.io=this.ioFunction(h,m);else throw new Error("Socket server url no defined")}catch(u){this.eventsSdkClass.loggerClass.log(Gt.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(ii.KEEP_ALIVE,this.eventsSdkClass.authClass.token),this.eventsSdkClass.loggerClass.log(Gt.INFO,`EMIT -> ${ht.KEEP_ALIVE}`,this.eventsSdkClass.authClass.token);return}},this.eventsSdkClass.options.keepAliveTimeout)}closeAllConnections(){var i;this.io&&(this.io.close(),(i=this.io)==null||i.disconnect(),this.io=void 0),Un.clearSessionStorage()}initSocketEvents(){this.io&&this.io.on(ht.LOGIN_SUCCESS,i=>this.onLoginSuccessEvent(i)).on(ht.QUEUE_EVENT,i=>this.onQueueEvent(i)).on(ht.EXTENSION_EVENT,i=>this.onExtensionEvent(i)).on(ht.DIALER_EVENT,i=>this.onDialerEvent(i)).on(ht.LOGIN_STATUS,i=>this.onLoginStatusEvent(i)).on(ht.ALL_EXTENSION_STATUS,i=>this.onAllExtensionStatus(i)).on(ht.ALL_DIALER_STATUS,i=>this.onAllDialerStatus(i)).on(ht.KEEP_ALIVE_RESPONSE,i=>this.onKeepAliveResponse(i)).on(ht.EXTENSIONS_UPDATED,i=>this.onExtensionsUpdatedEvent(i)).on(ht.CONNECT,()=>this.onConnect()).on(ht.DISCONNECT,i=>this.onDisconnect(i)).on(ht.CONNECT_ERROR_EVENT,i=>this.onConnectError(i))}onLoginSuccessEvent(i){this.eventsSdkClass.eventEmitterClass.emit(ht.LOGIN_SUCCESS,i)}onQueueEvent(i){this.eventsSdkClass.eventEmitterClass.emit(ht.QUEUE_EVENT,i)}onExtensionEvent(i){const n=Xs.mapExtensionEvent(i);n&&this.eventsSdkClass.eventEmitterClass.emit(ht.EXTENSION_EVENT,n)}onDialerEvent(i){this.eventsSdkClass.eventEmitterClass.emit(ht.DIALER_EVENT,i)}onLoginStatusEvent(i){this.eventsSdkClass.eventEmitterClass.emit(ht.LOGIN_STATUS,i)}onAllExtensionStatus(i){const n=Xs.mapAllExtensionStatus(i);this.eventsSdkClass.eventEmitterClass.emit(ht.ALL_EXTENSION_STATUS,n)}onAllDialerStatus(i){this.eventsSdkClass.eventEmitterClass.emit(ht.ALL_DIALER_STATUS,i)}onKeepAliveResponse(i){if(this.eventsSdkClass.loggerClass.log(Gt.INFO,ht.KEEP_ALIVE_RESPONSE),i.errorCode){this.initSocketConnection();return}this.connected?this.lastEventTimestamp=new Date().getTime():this.initSocketConnection()}onExtensionsUpdatedEvent(i){this.eventsSdkClass.eventEmitterClass.emit(ht.EXTENSIONS_UPDATED,i)}onConnect(){this.keepReconnectInterval&&clearInterval(this.keepReconnectInterval),this.connected=!0,this.eventsSdkClass.loggerClass.log(Gt.INFO,ht.CONNECT,this.eventsSdkClass.reconnectOptions),this.eventsSdkClass.eventEmitterClass.emit(ht.ONLINE_STATUS_EVENT,{isSocketConnected:!0})}onDisconnect(i){this.connected=!1,this.eventsSdkClass.loggerClass.log(Gt.INFO,ht.DISCONNECT,i),this.closeAllConnections(),this.eventsSdkClass.eventEmitterClass.emit(ht.ONLINE_STATUS_EVENT,{isSocketConnected:!1}),this.doReconnect&&(console.log("attempt to connect..."),this.eventsSdkClass.connect(an.NEXT))}onConnectError(i){this.eventsSdkClass.eventEmitterClass.emit(ht.ONLINE_STATUS_EVENT,{isSocketConnected:!1}),this.eventsSdkClass.loggerClass.log(Gt.ERROR,ht.CONNECT_ERROR_EVENT,i),setTimeout(()=>{this.eventsSdkClass.connect(an.NEXT)},this.eventsSdkClass.options.reconnectionDelay)}}var fc=Object.defineProperty,hc=(a,i,n)=>i in a?fc(a,i,{enumerable:!0,configurable:!0,writable:!0,value:n}):a[i]=n,Mt=(a,i,n)=>(hc(a,typeof i!="symbol"?i+"":i,n),n);const Re=Object.create(null);Re.open="0",Re.close="1",Re.ping="2",Re.pong="3",Re.message="4",Re.upgrade="5",Re.noop="6";const ir=Object.create(null);Object.keys(Re).forEach(a=>{ir[Re[a]]=a});const si={type:"error",data:"parser error"},Js=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",Vs=typeof ArrayBuffer=="function",Ys=a=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(a):a&&a.buffer instanceof ArrayBuffer,oi=({type:a,data:i},n,s)=>Js&&i instanceof Blob?n?s(i):js(i,s):Vs&&(i instanceof ArrayBuffer||Ys(i))?n?s(i):js(new Blob([i]),s):s(Re[a]+(i||"")),js=(a,i)=>{const n=new FileReader;return n.onload=function(){const s=n.result.split(",")[1];i("b"+(s||""))},n.readAsDataURL(a)};function Zs(a){return a instanceof Uint8Array?a:a instanceof ArrayBuffer?new Uint8Array(a):new Uint8Array(a.buffer,a.byteOffset,a.byteLength)}let ai;function lc(a,i){if(Js&&a.data instanceof Blob)return a.data.arrayBuffer().then(Zs).then(i);if(Vs&&(a.data instanceof ArrayBuffer||Ys(a.data)))return i(Zs(a.data));oi(a,!1,n=>{ai||(ai=new TextEncoder),i(ai.encode(n))})}const Qs="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Dn=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let a=0;a<Qs.length;a++)Dn[Qs.charCodeAt(a)]=a;const pc=a=>{let i=a.length*.75,n=a.length,s,u=0,h,m,g,S;a[a.length-1]==="="&&(i--,a[a.length-2]==="="&&i--);const v=new ArrayBuffer(i),_=new Uint8Array(v);for(s=0;s<n;s+=4)h=Dn[a.charCodeAt(s)],m=Dn[a.charCodeAt(s+1)],g=Dn[a.charCodeAt(s+2)],S=Dn[a.charCodeAt(s+3)],_[u++]=h<<2|m>>4,_[u++]=(m&15)<<4|g>>2,_[u++]=(g&3)<<6|S&63;return v},dc=typeof ArrayBuffer=="function",ui=(a,i)=>{if(typeof a!="string")return{type:"message",data:to(a,i)};const n=a.charAt(0);return n==="b"?{type:"message",data:gc(a.substring(1),i)}:ir[n]?a.length>1?{type:ir[n],data:a.substring(1)}:{type:ir[n]}:si},gc=(a,i)=>{if(dc){const n=pc(a);return to(n,i)}else return{base64:!0,data:a}},to=(a,i)=>{switch(i){case"blob":return a instanceof Blob?a:new Blob([a]);case"arraybuffer":default:return a instanceof ArrayBuffer?a:a.buffer}},eo="",vc=(a,i)=>{const n=a.length,s=new Array(n);let u=0;a.forEach((h,m)=>{oi(h,!1,g=>{s[m]=g,++u===n&&i(s.join(eo))})})},yc=(a,i)=>{const n=a.split(eo),s=[];for(let u=0;u<n.length;u++){const h=ui(n[u],i);if(s.push(h),h.type==="error")break}return s};function mc(){return new TransformStream({transform(a,i){lc(a,n=>{const s=n.length;let u;if(s<126)u=new Uint8Array(1),new DataView(u.buffer).setUint8(0,s);else if(s<65536){u=new Uint8Array(3);const h=new DataView(u.buffer);h.setUint8(0,126),h.setUint16(1,s)}else{u=new Uint8Array(9);const h=new DataView(u.buffer);h.setUint8(0,127),h.setBigUint64(1,BigInt(s))}a.data&&typeof a.data!="string"&&(u[0]|=128),i.enqueue(u),i.enqueue(n)})}})}let ci;function sr(a){return a.reduce((i,n)=>i+n.length,0)}function or(a,i){if(a[0].length===i)return a.shift();const n=new Uint8Array(i);let s=0;for(let u=0;u<i;u++)n[u]=a[0][s++],s===a[0].length&&(a.shift(),s=0);return a.length&&s<a[0].length&&(a[0]=a[0].slice(s)),n}function _c(a,i){ci||(ci=new TextDecoder);const n=[];let s=0,u=-1,h=!1;return new TransformStream({transform(m,g){for(n.push(m);;){if(s===0){if(sr(n)<1)break;const S=or(n,1);h=(S[0]&128)===128,u=S[0]&127,u<126?s=3:u===126?s=1:s=2}else if(s===1){if(sr(n)<2)break;const S=or(n,2);u=new DataView(S.buffer,S.byteOffset,S.length).getUint16(0),s=3}else if(s===2){if(sr(n)<8)break;const S=or(n,8),v=new DataView(S.buffer,S.byteOffset,S.length),_=v.getUint32(0);if(_>Math.pow(2,21)-1){g.enqueue(si);break}u=_*Math.pow(2,32)+v.getUint32(4),s=3}else{if(sr(n)<u)break;const S=or(n,u);g.enqueue(ui(h?S:ci.decode(S),i)),s=0}if(u===0||u>a){g.enqueue(si);break}}}})}const no=4;function Dt(a){if(a)return wc(a)}function wc(a){for(var i in Dt.prototype)a[i]=Dt.prototype[i];return a}Dt.prototype.on=Dt.prototype.addEventListener=function(a,i){return this._callbacks=this._callbacks||{},(this._callbacks["$"+a]=this._callbacks["$"+a]||[]).push(i),this},Dt.prototype.once=function(a,i){function n(){this.off(a,n),i.apply(this,arguments)}return n.fn=i,this.on(a,n),this},Dt.prototype.off=Dt.prototype.removeListener=Dt.prototype.removeAllListeners=Dt.prototype.removeEventListener=function(a,i){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var n=this._callbacks["$"+a];if(!n)return this;if(arguments.length==1)return delete this._callbacks["$"+a],this;for(var s,u=0;u<n.length;u++)if(s=n[u],s===i||s.fn===i){n.splice(u,1);break}return n.length===0&&delete this._callbacks["$"+a],this},Dt.prototype.emit=function(a){this._callbacks=this._callbacks||{};for(var i=new Array(arguments.length-1),n=this._callbacks["$"+a],s=1;s<arguments.length;s++)i[s-1]=arguments[s];if(n){n=n.slice(0);for(var s=0,u=n.length;s<u;++s)n[s].apply(this,i)}return this},Dt.prototype.emitReserved=Dt.prototype.emit,Dt.prototype.listeners=function(a){return this._callbacks=this._callbacks||{},this._callbacks["$"+a]||[]},Dt.prototype.hasListeners=function(a){return!!this.listeners(a).length};const ge=typeof self<"u"?self:typeof window<"u"?window:Function("return this")();function ro(a,...i){return i.reduce((n,s)=>(a.hasOwnProperty(s)&&(n[s]=a[s]),n),{})}const bc=ge.setTimeout,Sc=ge.clearTimeout;function ar(a,i){i.useNativeTimers?(a.setTimeoutFn=bc.bind(ge),a.clearTimeoutFn=Sc.bind(ge)):(a.setTimeoutFn=ge.setTimeout.bind(ge),a.clearTimeoutFn=ge.clearTimeout.bind(ge))}const Cc=1.33;function kc(a){return typeof a=="string"?Ac(a):Math.ceil((a.byteLength||a.size)*Cc)}function Ac(a){let i=0,n=0;for(let s=0,u=a.length;s<u;s++)i=a.charCodeAt(s),i<128?n+=1:i<2048?n+=2:i<55296||i>=57344?n+=3:(s++,n+=4);return n}function Ec(a){let i="";for(let n in a)a.hasOwnProperty(n)&&(i.length&&(i+="&"),i+=encodeURIComponent(n)+"="+encodeURIComponent(a[n]));return i}function Tc(a){let i={},n=a.split("&");for(let s=0,u=n.length;s<u;s++){let h=n[s].split("=");i[decodeURIComponent(h[0])]=decodeURIComponent(h[1])}return i}class xc extends Error{constructor(i,n,s){super(i),this.description=n,this.context=s,this.type="TransportError"}}class fi extends Dt{constructor(i){super(),this.writable=!1,ar(this,i),this.opts=i,this.query=i.query,this.socket=i.socket}onError(i,n,s){return super.emitReserved("error",new xc(i,n,s)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(i){this.readyState==="open"&&this.write(i)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(i){const n=ui(i,this.socket.binaryType);this.onPacket(n)}onPacket(i){super.emitReserved("packet",i)}onClose(i){this.readyState="closed",super.emitReserved("close",i)}pause(i){}createUri(i,n={}){return i+"://"+this._hostname()+this._port()+this.opts.path+this._query(n)}_hostname(){const i=this.opts.hostname;return i.indexOf(":")===-1?i:"["+i+"]"}_port(){return this.opts.port&&(this.opts.secure&&+(this.opts.port!==443)||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(i){const n=Ec(i);return n.length?"?"+n:""}}const io="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),hi=64,Oc={};let so=0,ur=0,oo;function ao(a){let i="";do i=io[a%hi]+i,a=Math.floor(a/hi);while(a>0);return i}function uo(){const a=ao(+new Date);return a!==oo?(so=0,oo=a):a+"."+ao(so++)}for(;ur<hi;ur++)Oc[io[ur]]=ur;let co=!1;try{co=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const Rc=co;function fo(a){const i=a.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!i||Rc))return new XMLHttpRequest}catch{}if(!i)try{return new ge[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}function Ic(){}const Lc=function(){return new fo({xdomain:!1}).responseType!=null}();class Nc extends fi{constructor(i){if(super(i),this.polling=!1,typeof location<"u"){const s=location.protocol==="https:";let u=location.port;u||(u=s?"443":"80"),this.xd=typeof location<"u"&&i.hostname!==location.hostname||u!==i.port}const n=i&&i.forceBase64;this.supportsBinary=Lc&&!n,this.opts.withCredentials&&(this.cookieJar=void 0)}get name(){return"polling"}doOpen(){this.poll()}pause(i){this.readyState="pausing";const n=()=>{this.readyState="paused",i()};if(this.polling||!this.writable){let s=0;this.polling&&(s++,this.once("pollComplete",function(){--s||n()})),this.writable||(s++,this.once("drain",function(){--s||n()}))}else n()}poll(){this.polling=!0,this.doPoll(),this.emitReserved("poll")}onData(i){const n=s=>{if(this.readyState==="opening"&&s.type==="open"&&this.onOpen(),s.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(s)};yc(i,this.socket.binaryType).forEach(n),this.readyState!=="closed"&&(this.polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this.poll())}doClose(){const i=()=>{this.write([{type:"close"}])};this.readyState==="open"?i():this.once("open",i)}write(i){this.writable=!1,vc(i,n=>{this.doWrite(n,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const i=this.opts.secure?"https":"http",n=this.query||{};return this.opts.timestampRequests!==!1&&(n[this.opts.timestampParam]=uo()),!this.supportsBinary&&!n.sid&&(n.b64=1),this.createUri(i,n)}request(i={}){return Object.assign(i,{xd:this.xd,cookieJar:this.cookieJar},this.opts),new Ie(this.uri(),i)}doWrite(i,n){const s=this.request({method:"POST",data:i});s.on("success",n),s.on("error",(u,h)=>{this.onError("xhr post error",u,h)})}doPoll(){const i=this.request();i.on("data",this.onData.bind(this)),i.on("error",(n,s)=>{this.onError("xhr poll error",n,s)}),this.pollXhr=i}}class Ie extends Dt{constructor(i,n){super(),ar(this,n),this.opts=n,this.method=n.method||"GET",this.uri=i,this.data=n.data!==void 0?n.data:null,this.create()}create(){var i;const n=ro(this.opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");n.xdomain=!!this.opts.xd;const s=this.xhr=new fo(n);try{s.open(this.method,this.uri,!0);try{if(this.opts.extraHeaders){s.setDisableHeaderCheck&&s.setDisableHeaderCheck(!0);for(let u in this.opts.extraHeaders)this.opts.extraHeaders.hasOwnProperty(u)&&s.setRequestHeader(u,this.opts.extraHeaders[u])}}catch{}if(this.method==="POST")try{s.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{s.setRequestHeader("Accept","*/*")}catch{}(i=this.opts.cookieJar)===null||i===void 0||i.addCookies(s),"withCredentials"in s&&(s.withCredentials=this.opts.withCredentials),this.opts.requestTimeout&&(s.timeout=this.opts.requestTimeout),s.onreadystatechange=()=>{var u;s.readyState===3&&((u=this.opts.cookieJar)===null||u===void 0||u.parseCookies(s)),s.readyState===4&&(s.status===200||s.status===1223?this.onLoad():this.setTimeoutFn(()=>{this.onError(typeof s.status=="number"?s.status:0)},0))},s.send(this.data)}catch(u){this.setTimeoutFn(()=>{this.onError(u)},0);return}typeof document<"u"&&(this.index=Ie.requestsCount++,Ie.requests[this.index]=this)}onError(i){this.emitReserved("error",i,this.xhr),this.cleanup(!0)}cleanup(i){if(!(typeof this.xhr>"u"||this.xhr===null)){if(this.xhr.onreadystatechange=Ic,i)try{this.xhr.abort()}catch{}typeof document<"u"&&delete Ie.requests[this.index],this.xhr=null}}onLoad(){const i=this.xhr.responseText;i!==null&&(this.emitReserved("data",i),this.emitReserved("success"),this.cleanup())}abort(){this.cleanup()}}if(Ie.requestsCount=0,Ie.requests={},typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",ho);else if(typeof addEventListener=="function"){const a="onpagehide"in ge?"pagehide":"unload";addEventListener(a,ho,!1)}}function ho(){for(let a in Ie.requests)Ie.requests.hasOwnProperty(a)&&Ie.requests[a].abort()}const li=typeof Promise=="function"&&typeof Promise.resolve=="function"?a=>Promise.resolve().then(a):(a,i)=>i(a,0),cr=ge.WebSocket||ge.MozWebSocket,lo=!0,Bc="arraybuffer",po=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class Uc extends fi{constructor(i){super(i),this.supportsBinary=!i.forceBase64}get name(){return"websocket"}doOpen(){if(!this.check())return;const i=this.uri(),n=this.opts.protocols,s=po?{}:ro(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(s.headers=this.opts.extraHeaders);try{this.ws=lo&&!po?n?new cr(i,n):new cr(i):new cr(i,n,s)}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=i=>this.onClose({description:"websocket connection closed",context:i}),this.ws.onmessage=i=>this.onData(i.data),this.ws.onerror=i=>this.onError("websocket error",i)}write(i){this.writable=!1;for(let n=0;n<i.length;n++){const s=i[n],u=n===i.length-1;oi(s,this.supportsBinary,h=>{try{lo&&this.ws.send(h)}catch{}u&&li(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.close(),this.ws=null)}uri(){const i=this.opts.secure?"wss":"ws",n=this.query||{};return this.opts.timestampRequests&&(n[this.opts.timestampParam]=uo()),this.supportsBinary||(n.b64=1),this.createUri(i,n)}check(){return!!cr}}class Dc extends fi{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(i=>{this.onError("webtransport error",i)}),this.transport.ready.then(()=>{this.transport.createBidirectionalStream().then(i=>{const n=_c(Number.MAX_SAFE_INTEGER,this.socket.binaryType),s=i.readable.pipeThrough(n).getReader(),u=mc();u.readable.pipeTo(i.writable),this.writer=u.writable.getWriter();const h=()=>{s.read().then(({done:g,value:S})=>{g||(this.onPacket(S),h())}).catch(g=>{})};h();const m={type:"open"};this.query.sid&&(m.data=`{"sid":"${this.query.sid}"}`),this.writer.write(m).then(()=>this.onOpen())})}))}write(i){this.writable=!1;for(let n=0;n<i.length;n++){const s=i[n],u=n===i.length-1;this.writer.write(s).then(()=>{u&&li(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var i;(i=this.transport)===null||i===void 0||i.close()}}const Pc={websocket:Uc,webtransport:Dc,polling:Nc},Fc=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,Mc=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function pi(a){if(a.length>2e3)throw"URI too long";const i=a,n=a.indexOf("["),s=a.indexOf("]");n!=-1&&s!=-1&&(a=a.substring(0,n)+a.substring(n,s).replace(/:/g,";")+a.substring(s,a.length));let u=Fc.exec(a||""),h={},m=14;for(;m--;)h[Mc[m]]=u[m]||"";return n!=-1&&s!=-1&&(h.source=i,h.host=h.host.substring(1,h.host.length-1).replace(/;/g,":"),h.authority=h.authority.replace("[","").replace("]","").replace(/;/g,":"),h.ipv6uri=!0),h.pathNames=qc(h,h.path),h.queryKey=Wc(h,h.query),h}function qc(a,i){const n=/\/{2,9}/g,s=i.replace(n,"/").split("/");return(i.slice(0,1)=="/"||i.length===0)&&s.splice(0,1),i.slice(-1)=="/"&&s.splice(s.length-1,1),s}function Wc(a,i){const n={};return i.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(s,u,h){u&&(n[u]=h)}),n}let go=class Bn extends Dt{constructor(i,n={}){super(),this.binaryType=Bc,this.writeBuffer=[],i&&typeof i=="object"&&(n=i,i=null),i?(i=pi(i),n.hostname=i.host,n.secure=i.protocol==="https"||i.protocol==="wss",n.port=i.port,i.query&&(n.query=i.query)):n.host&&(n.hostname=pi(n.host).host),ar(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=Tc(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(i){const n=Object.assign({},this.opts.query);n.EIO=no,n.transport=i,this.id&&(n.sid=this.id);const s=Object.assign({},this.opts,{query:n,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[i]);return new Pc[i](s)}open(){let i;if(this.opts.rememberUpgrade&&Bn.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1)i="websocket";else if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}else i=this.transports[0];this.readyState="opening";try{i=this.createTransport(i)}catch{this.transports.shift(),this.open();return}i.open(),this.setTransport(i)}setTransport(i){this.transport&&this.transport.removeAllListeners(),this.transport=i,i.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(i){let n=this.createTransport(i),s=!1;Bn.priorWebsocketSuccess=!1;const u=()=>{s||(n.send([{type:"ping",data:"probe"}]),n.once("packet",y=>{if(!s)if(y.type==="pong"&&y.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;Bn.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{s||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 h(){s||(s=!0,_(),n.close(),n=null)}const m=y=>{const l=new Error("probe error: "+y);l.transport=n.name,h(),this.emitReserved("upgradeError",l)};function g(){m("transport closed")}function S(){m("socket closed")}function v(y){n&&y.name!==n.name&&h()}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&&i!=="webtransport"?this.setTimeoutFn(()=>{s||n.open()},200):n.open()}onOpen(){if(this.readyState="open",Bn.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush(),this.readyState==="open"&&this.opts.upgrade){let i=0;const n=this.upgrades.length;for(;i<n;i++)this.probe(this.upgrades[i])}}onPacket(i){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",i),this.emitReserved("heartbeat"),this.resetPingTimeout(),i.type){case"open":this.onHandshake(JSON.parse(i.data));break;case"ping":this.sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong");break;case"error":const n=new Error("server error");n.code=i.data,this.onError(n);break;case"message":this.emitReserved("data",i.data),this.emitReserved("message",i.data);break}}onHandshake(i){this.emitReserved("handshake",i),this.id=i.sid,this.transport.query.sid=i.sid,this.upgrades=this.filterUpgrades(i.upgrades),this.pingInterval=i.pingInterval,this.pingTimeout=i.pingTimeout,this.maxPayload=i.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 i=this.getWritablePackets();this.transport.send(i),this.prevBufferLen=i.length,this.emitReserved("flush")}}getWritablePackets(){if(!(this.maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let i=1;for(let n=0;n<this.writeBuffer.length;n++){const s=this.writeBuffer[n].data;if(s&&(i+=kc(s)),n>0&&i>this.maxPayload)return this.writeBuffer.slice(0,n);i+=2}return this.writeBuffer}write(i,n,s){return this.sendPacket("message",i,n,s),this}send(i,n,s){return this.sendPacket("message",i,n,s),this}sendPacket(i,n,s,u){if(typeof n=="function"&&(u=n,n=void 0),typeof s=="function"&&(u=s,s=null),this.readyState==="closing"||this.readyState==="closed")return;s=s||{},s.compress=s.compress!==!1;const h={type:i,data:n,options:s};this.emitReserved("packetCreate",h),this.writeBuffer.push(h),u&&this.once("flush",u),this.flush()}close(){const i=()=>{this.onClose("forced close"),this.transport.close()},n=()=>{this.off("upgrade",n),this.off("upgradeError",n),i()},s=()=>{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?s():i()}):this.upgrading?s():i()),this}onError(i){Bn.priorWebsocketSuccess=!1,this.emitReserved("error",i),this.onClose("transport error",i)}onClose(i,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",i,n),this.writeBuffer=[],this.prevBufferLen=0)}filterUpgrades(i){const n=[];let s=0;const u=i.length;for(;s<u;s++)~this.transports.indexOf(i[s])&&n.push(i[s]);return n}};go.protocol=no;function Kc(a,i="",n){let s=a;n=n||typeof location<"u"&&location,a==null&&(a=n.protocol+"//"+n.host),typeof a=="string"&&(a.charAt(0)==="/"&&(a.charAt(1)==="/"?a=n.protocol+a:a=n.host+a),/^(https?|wss?):\/\//.test(a)||(typeof n<"u"?a=n.protocol+"//"+a:a="https://"+a),s=pi(a)),s.port||(/^(http|ws)$/.test(s.protocol)?s.port="80":/^(http|ws)s$/.test(s.protocol)&&(s.port="443")),s.path=s.path||"/";const u=s.host.indexOf(":")!==-1?"["+s.host+"]":s.host;return s.id=s.protocol+"://"+u+":"+s.port+i,s.href=s.protocol+"://"+u+(n&&n.port===s.port?"":":"+s.port),s}const Hc=typeof ArrayBuffer=="function",$c=a=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(a):a.buffer instanceof ArrayBuffer,vo=Object.prototype.toString,Gc=typeof Blob=="function"||typeof Blob<"u"&&vo.call(Blob)==="[object BlobConstructor]",zc=typeof File=="function"||typeof File<"u"&&vo.call(File)==="[object FileConstructor]";function di(a){return Hc&&(a instanceof ArrayBuffer||$c(a))||Gc&&a instanceof Blob||zc&&a instanceof File}function fr(a,i){if(!a||typeof a!="object")return!1;if(Array.isArray(a)){for(let n=0,s=a.length;n<s;n++)if(fr(a[n]))return!0;return!1}if(di(a))return!0;if(a.toJSON&&typeof a.toJSON=="function"&&arguments.length===1)return fr(a.toJSON(),!0);for(const n in a)if(Object.prototype.hasOwnProperty.call(a,n)&&fr(a[n]))return!0;return!1}function Xc(a){const i=[],n=a.data,s=a;return s.data=gi(n,i),s.attachments=i.length,{packet:s,buffers:i}}function gi(a,i){if(!a)return a;if(di(a)){const n={_placeholder:!0,num:i.length};return i.push(a),n}else if(Array.isArray(a)){const n=new Array(a.length);for(let s=0;s<a.length;s++)n[s]=gi(a[s],i);return n}else if(typeof a=="object"&&!(a instanceof Date)){const n={};for(const s in a)Object.prototype.hasOwnProperty.call(a,s)&&(n[s]=gi(a[s],i));return n}return a}function Jc(a,i){return a.data=vi(a.data,i),delete a.attachments,a}function vi(a,i){if(!a)return a;if(a&&a._placeholder===!0){if(typeof a.num=="number"&&a.num>=0&&a.num<i.length)return i[a.num];throw new Error("illegal attachments")}else if(Array.isArray(a))for(let n=0;n<a.length;n++)a[n]=vi(a[n],i);else if(typeof a=="object")for(const n in a)Object.prototype.hasOwnProperty.call(a,n)&&(a[n]=vi(a[n],i));return a}const Vc=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],Yc=5;var yt;(function(a){a[a.CONNECT=0]="CONNECT",a[a.DISCONNECT=1]="DISCONNECT",a[a.EVENT=2]="EVENT",a[a.ACK=3]="ACK",a[a.CONNECT_ERROR=4]="CONNECT_ERROR",a[a.BINARY_EVENT=5]="BINARY_EVENT",a[a.BINARY_ACK=6]="BINARY_ACK"})(yt||(yt={}));class jc{constructor(i){this.replacer=i}encode(i){return(i.type===yt.EVENT||i.type===yt.ACK)&&fr(i)?this.encodeAsBinary({type:i.type===yt.EVENT?yt.BINARY_EVENT:yt.BINARY_ACK,nsp:i.nsp,data:i.data,id:i.id}):[this.encodeAsString(i)]}encodeAsString(i){let n=""+i.type;return(i.type===yt.BINARY_EVENT||i.type===yt.BINARY_ACK)&&(n+=i.attachments+"-"),i.nsp&&i.nsp!=="/"&&(n+=i.nsp+","),i.id!=null&&(n+=i.id),i.data!=null&&(n+=JSON.stringify(i.data,this.replacer)),n}encodeAsBinary(i){const n=Xc(i),s=this.encodeAsString(n.packet),u=n.buffers;return u.unshift(s),u}}function yo(a){return Object.prototype.toString.call(a)==="[object Object]"}class yi extends Dt{constructor(i){super(),this.reviver=i}add(i){let n;if(typeof i=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");n=this.decodeString(i);const s=n.type===yt.BINARY_EVENT;s||n.type===yt.BINARY_ACK?(n.type=s?yt.EVENT:yt.ACK,this.reconstructor=new Zc(n),n.attachments===0&&super.emitReserved("decoded",n)):super.emitReserved("decoded",n)}else if(di(i)||i.base64)if(this.reconstructor)n=this.reconstructor.takeBinaryData(i),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: "+i)}decodeString(i){let n=0;const s={type:Number(i.charAt(0))};if(yt[s.type]===void 0)throw new Error("unknown packet type "+s.type);if(s.type===yt.BINARY_EVENT||s.type===yt.BINARY_ACK){const h=n+1;for(;i.charAt(++n)!=="-"&&n!=i.length;);const m=i.substring(h,n);if(m!=Number(m)||i.charAt(n)!=="-")throw new Error("Illegal attachments");s.attachments=Number(m)}if(i.charAt(n+1)==="/"){const h=n+1;for(;++n&&!(i.charAt(n)===","||n===i.length););s.nsp=i.substring(h,n)}else s.nsp="/";const u=i.charAt(n+1);if(u!==""&&Number(u)==u){const h=n+1;for(;++n;){const m=i.charAt(n);if(m==null||Number(m)!=m){--n;break}if(n===i.length)break}s.id=Number(i.substring(h,n+1))}if(i.charAt(++n)){const h=this.tryParse(i.substr(n));if(yi.isPayloadValid(s.type,h))s.data=h;else throw new Error("invalid payload")}return s}tryParse(i){try{return JSON.parse(i,this.reviver)}catch{return!1}}static isPayloadValid(i,n){switch(i){case yt.CONNECT:return yo(n);case yt.DISCONNECT:return n===void 0;case yt.CONNECT_ERROR:return typeof n=="string"||yo(n);case yt.EVENT:case yt.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&Vc.indexOf(n[0])===-1);case yt.ACK:case yt.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class Zc{constructor(i){this.packet=i,this.buffers=[],this.reconPack=i}takeBinaryData(i){if(this.buffers.push(i),this.buffers.length===this.reconPack.attachments){const n=Jc(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const Qc=Object.freeze(Object.defineProperty({__proto__:null,Decoder:yi,Encoder:jc,get PacketType(){return yt},protocol:Yc},Symbol.toStringTag,{value:"Module"}));function ke(a,i,n){return a.on(i,n),function(){a.off(i,n)}}const tf=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class mo extends Dt{constructor(i,n,s){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=i,this.nsp=n,s&&s.auth&&(this.auth=s.auth),this._opts=Object.assign({},s),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const i=this.io;this.subs=[ke(i,"open",this.onopen.bind(this)),ke(i,"packet",this.onpacket.bind(this)),ke(i,"error",this.onerror.bind(this)),ke(i,"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(...i){return i.unshift("message"),this.emit.apply(this,i),this}emit(i,...n){if(tf.hasOwnProperty(i))throw new Error('"'+i.toString()+'" is a reserved event name');if(n.unshift(i),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(n),this;const s={type:yt.EVENT,data:n};if(s.options={},s.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){const h=this.ids++,m=n.pop();this._registerAckCallback(h,m),s.id=h}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(s),this.packet(s)):this.sendBuffer.push(s)),this.flags={},this}_registerAckCallback(i,n){var s;const u=(s=this.flags.timeout)!==null&&s!==void 0?s:this._opts.ackTimeout;if(u===void 0){this.acks[i]=n;return}const h=this.io.setTimeoutFn(()=>{delete this.acks[i];for(let m=0;m<this.sendBuffer.length;m++)this.sendBuffer[m].id===i&&this.sendBuffer.splice(m,1);n.call(this,new Error("operation has timed out"))},u);this.acks[i]=(...m)=>{this.io.clearTimeoutFn(h),n.apply(this,[null,...m])}}emitWithAck(i,...n){const s=this.flags.timeout!==void 0||this._opts.ackTimeout!==void 0;return new Promise((u,h)=>{n.push((m,g)=>s?m?h(m):u(g):u(m)),this.emit(i,...n)})}_addToQueue(i){let n;typeof i[i.length-1]=="function"&&(n=i.pop());const s={id:this._queueSeq++,tryCount:0,pending:!1,args:i,flags:Object.assign({fromQueue:!0},this.flags)};i.push((u,...h)=>s!==this._queue[0]?void 0:(u!==null?s.tryCount>this._opts.retries&&(this._queue.shift(),n&&n(u)):(this._queue.shift(),n&&n(null,...h)),s.pending=!1,this._drainQueue())),this._queue.push(s),this._drainQueue()}_drainQueue(i=!1){if(!this.connected||this._queue.length===0)return;const n=this._queue[0];n.pending&&!i||(n.pending=!0,n.tryCount++,this.flags=n.flags,this.emit.apply(this,n.args))}packet(i){i.nsp=this.nsp,this.io._packet(i)}onopen(){typeof this.auth=="function"?this.auth(i=>{this._sendConnectPacket(i)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(i){this.packet({type:yt.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},i):i})}onerror(i){this.connected||this.emitReserved("connect_error",i)}onclose(i,n){this.connected=!1,delete this.id,this.emitReserved("disconnect",i,n)}onpacket(i){if(i.nsp===this.nsp)switch(i.type){case yt.CONNECT:i.data&&i.data.sid?this.onconnect(i.data.sid,i.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 yt.EVENT:case yt.BINARY_EVENT:this.onevent(i);break;case yt.ACK:case yt.BINARY_ACK:this.onack(i);break;case yt.DISCONNECT:this.ondisconnect();break;case yt.CONNECT_ERROR:this.destroy();const n=new Error(i.data.message);n.data=i.data.data,this.emitReserved("connect_error",n);break}}onevent(i){const n=i.data||[];i.id!=null&&n.push(this.ack(i.id)),this.connected?this.emitEvent(n):this.receiveBuffer.push(Object.freeze(n))}emitEvent(i){if(this._anyListeners&&this._anyListeners.length){const n=this._anyListeners.slice();for(const s of n)s.apply(this,i)}super.emit.apply(this,i),this._pid&&i.length&&typeof i[i.length-1]=="string"&&(this._lastOffset=i[i.length-1])}ack(i){const n=this;let s=!1;return function(...u){s||(s=!0,n.packet({type:yt.ACK,id:i,data:u}))}}onack(i){const n=this.acks[i.id];typeof n=="function"&&(n.apply(this,i.data),delete this.acks[i.id])}onconnect(i,n){this.id=i,this.recovered=n&&this._pid===n,this._pid=n,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach(i=>this.emitEvent(i)),this.receiveBuffer=[],this.sendBuffer.forEach(i=>{this.notifyOutgoingListeners(i),this.packet(i)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(i=>i()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:yt.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(i){return this.flags.compress=i,this}get volatile(){return this.flags.volatile=!0,this}timeout(i){return this.flags.timeout=i,this}onAny(i){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(i),this}prependAny(i){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(i),this}offAny(i){if(!this._anyListeners)return this;if(i){const n=this._anyListeners;for(let s=0;s<n.length;s++)if(i===n[s])return n.splice(s,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(i){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(i),this}prependAnyOutgoing(i){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(i),this}offAnyOutgoing(i){if(!this._anyOutgoingListeners)return this;if(i){const n=this._anyOutgoingListeners;for(let s=0;s<n.length;s++)if(i===n[s])return n.splice(s,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(i){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const n=this._anyOutgoingListeners.slice();for(const s of n)s.apply(this,i.data)}}}function yn(a){a=a||{},this.ms=a.min||100,this.max=a.max||1e4,this.factor=a.factor||2,this.jitter=a.jitter>0&&a.jitter<=1?a.jitter:0,this.attempts=0}yn.prototype.duration=function(){var a=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var i=Math.random(),n=Math.floor(i*this.jitter*a);a=Math.floor(i*10)&1?a+n:a-n}return Math.min(a,this.max)|0},yn.prototype.reset=function(){this.attempts=0},yn.prototype.setMin=function(a){this.ms=a},yn.prototype.setMax=function(a){this.max=a},yn.prototype.setJitter=function(a){this.jitter=a};class mi extends Dt{constructor(i,n){var s;super(),this.nsps={},this.subs=[],i&&typeof i=="object"&&(n=i,i=void 0),n=n||{},n.path=n.path||"/socket.io",this.opts=n,ar(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((s=n.randomizationFactor)!==null&&s!==void 0?s:.5),this.backoff=new yn({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(n.timeout==null?2e4:n.timeout),this._readyState="closed",this.uri=i;const u=n.parser||Qc;this.encoder=new u.Encoder,this.decoder=new u.Decoder,this._autoConnect=n.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(i){return arguments.length?(this._reconnection=!!i,this):this._reconnection}reconnectionAttempts(i){return i===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=i,this)}reconnectionDelay(i){var n;return i===void 0?this._reconnectionDelay:(this._reconnectionDelay=i,(n=this.backoff)===null||n===void 0||n.setMin(i),this)}randomizationFactor(i){var n;return i===void 0?this._randomizationFactor:(this._randomizationFactor=i,(n=this.backoff)===null||n===void 0||n.setJitter(i),this)}reconnectionDelayMax(i){var n;return i===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=i,(n=this.backoff)===null||n===void 0||n.setMax(i),this)}timeout(i){return arguments.length?(this._timeout=i,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(i){if(~this._readyState.indexOf("open"))return this;this.engine=new go(this.uri,this.opts);const n=this.engine,s=this;this._readyState="opening",this.skipReconnect=!1;const u=ke(n,"open",function(){s.onopen(),i&&i()}),h=g=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",g),i?i(g):this.maybeReconnectOnOpen()},m=ke(n,"error",h);if(this._timeout!==!1){const g=this._timeout,S=this.setTimeoutFn(()=>{u(),h(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(i){return this.open(i)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const i=this.engine;this.subs.push(ke(i,"ping",this.onping.bind(this)),ke(i,"data",this.ondata.bind(this)),ke(i,"error",this.onerror.bind(this)),ke(i,"close",this.onclose.bind(this)),ke(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(i){try{this.decoder.add(i)}catch(n){this.onclose("parse error",n)}}ondecoded(i){li(()=>{this.emitReserved("packet",i)},this.setTimeoutFn)}onerror(i){this.emitReserved("error",i)}socket(i,n){let s=this.nsps[i];return s?this._autoConnect&&!s.active&&s.connect():(s=new mo(this,i,n),this.nsps[i]=s),s}_destroy(i){const n=Object.keys(this.nsps);for(const s of n)if(this.nsps[s].active)return;this._close()}_packet(i){const n=this.encoder.encode(i);for(let s=0;s<n.length;s++)this.engine.write(n[s],i.options)}cleanup(){this.subs.forEach(i=>i()),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(i,n){this.cleanup(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",i,n),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const i=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 s=this.setTimeoutFn(()=>{i.skipReconnect||(this.emitReserved("reconnect_attempt",i.backoff.attempts),!i.skipReconnect&&i.open(u=>{u?(i._reconnecting=!1,i.reconnect(),this.emitReserved("reconnect_error",u)):i.onreconnect()}))},n);this.opts.autoUnref&&s.unref(),this.subs.push(()=>{this.clearTimeoutFn(s)})}}onreconnect(){const i=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",i)}}const Pn={};function hr(a,i){typeof a=="object"&&(i=a,a=void 0),i=i||{};const n=Kc(a,i.path||"/socket.io"),s=n.source,u=n.id,h=n.path,m=Pn[u]&&h in Pn[u].nsps,g=i.forceNew||i["force new connection"]||i.multiplex===!1||m;let S;return g?S=new mi(s,i):(Pn[u]||(Pn[u]=new mi(s,i)),S=Pn[u]),n.query&&!i.query&&(i.query=n.queryKey),S.socket(n.path,i)}Object.assign(hr,{Manager:mi,Socket:mo,io:hr,connect:hr});let lr;const ef=new Uint8Array(16);function nf(){if(!lr&&(lr=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!lr))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return lr(ef)}const Kt=[];for(let a=0;a<256;++a)Kt.push((a+256).toString(16).slice(1));function rf(a,i=0){return Kt[a[i+0]]+Kt[a[i+1]]+Kt[a[i+2]]+Kt[a[i+3]]+"-"+Kt[a[i+4]]+Kt[a[i+5]]+"-"+Kt[a[i+6]]+Kt[a[i+7]]+"-"+Kt[a[i+8]]+Kt[a[i+9]]+"-"+Kt[a[i+10]]+Kt[a[i+11]]+Kt[a[i+12]]+Kt[a[i+13]]+Kt[a[i+14]]+Kt[a[i+15]]}const sf=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),_o={randomUUID:sf};function of(a,i,n){if(_o.randomUUID&&!i&&!a)return _o.randomUUID();a=a||{};const s=a.random||(a.rng||nf)();if(s[6]=s[6]&15|64,s[8]=s[8]&63|128,i){n=n||0;for(let u=0;u<16;++u)i[n+u]=s[u];return i}return rf(s)}function af(a){return!!a&&(typeof a=="object"||typeof a=="function")&&typeof a.then=="function"}function uf(a,i){const n=i.map(u=>JSON.stringify(u)).join(" "),s=new Date().toISOString();return JSON.stringify({level:a,time:s,message:n})}function cf(a){const i=String(a[0]),n=a.slice(1);return{level:i,logs:n}}function ff(a,i){const n=JSON.parse(a);return i.forEach(s=>delete n[s]),n}const hf={reconnection:!0,reconnectionDelay:5e3,reconnectionAttempts:10,upgrade:!1,transports:["websocket"],debug:!1},_i={logToConsole:!0,overloadGlobalConsole:!1,socketEmitInterval:6e4};let ee=console;class wo{constructor(i){Mt(this,"logToConsole"),Mt(this,"overloadGlobalConsole"),Mt(this,"namespace"),Mt(this,"socketEmitInterval"),Mt(this,"storageId"),Mt(this,"emitInProgress"),Mt(this,"queue"),Mt(this,"processing"),Mt(this,"interval"),Mt(this,"logIndex"),Mt(this,"socket"),Mt(this,"getItem"),Mt(this,"setItem"),Mt(this,"parseLog"),Mt(this,"_logMethod"),Mt(this,"_warnMethod"),Mt(this,"_errorMethod"),Mt(this,"_debugMethod");const{loggerOptions:n}=i;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||_i.socketEmitInterval,this.logToConsole=n.logToConsole!==void 0?n.logToConsole:_i.logToConsole,this.overloadGlobalConsole=n.overloadGlobalConsole!==void 0?n.overloadGlobalConsole:_i.overloadGlobalConsole,this.storageId=this.getStorageName(),this.queue=[],this.processing=!1,this.emitInProgress=!1,this.logIndex=0,this.init(i)}setupStorageFunctions(i,n,s){this.getItem=i&&typeof i=="function"?this.promisifyStorageFunction(i):this.defaultGetItemFunction,this.setItem=n&&typeof n=="function"?this.promisifyStorageFunction(n):this.defaultSetItemFunction,this.parseLog=s&&typeof s=="function"?s:uf}promisifyStorageFunction(i){const n=i("");return af(n)?async(...s)=>new Promise((u,h)=>{try{const m=i(...s);u(m)}catch(m){h(m)}}):i}init(i){const{socket:n,url:s,socketOptions:u={}}=i;this._logMethod=ee.log.bind(ee),this._warnMethod=ee.warn.bind(ee),this._errorMethod=ee.error.bind(ee),this._debugMethod=ee.debug.bind(ee),this.initStorage().then(()=>{if(n)this.socket=n;else if(s)this.socket=this.createConnection(s,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(i,n={}){const s={...hf,...n};return hr(i,s)}async emitLogs(){if(!this.emitInProgress)try{const i=await this.getItem(this.storageId);if(!i)return;const n=[];this.emitInProgress=!0;const s=JSON.parse(i),u=Object.keys(s);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",s[g]),n.push(g);const h=await this.getItem(this.storageId);if(!h)return;const m=ff(h,n);await this.setItem(this.storageId,JSON.stringify(m))}catch(i){this._errorMethod(i)}finally{this.emitInProgress=!1}}disconnectSocket(){!this.socket||!this.interval||(this.socket.disconnect(),clearInterval(this.interval))}_overloadConsole(){ee=Object.assign(ee,{log:(...i)=>{this.log(...i)},warn:(...i)=>{this.warn(...i)},error:(...i)=>{this.error(...i)},debug:(...i)=>{this.debug(...i)}})}async initStorage(){const i=await this.getItem(this.storageId);(!i||typeof i!="string")&&await this.setItem(this.storageId,JSON.stringify({}))}async resetStorage(){await this.setItem(this.storageId,JSON.stringify({}))}getStorageName(){const i=of();return this.namespace.toString().toUpperCase()+i+Date.now()}async processLog(...i){try{if(i.length<2)return;const n=await this.getItem(this.storageId);if(!n)return;const{level:s,logs:u}=cf(i),h=JSON.parse(n),m=this.formItemKey(s);h[m]=this.parseLog(s,u),await this.setItem(this.storageId,JSON.stringify(h))}catch(n){this._errorMethod(n)}}async processQueue(){if(this.processing||this.queue.length===0)return;const i=this.queue.shift();i&&(this.processing=!0,await this.processLog(...i).finally(()=>{this.processing=!1,this.processQueue()}))}log(...i){const n=["INFO",...i];this.queue.push(n),this.logToConsole&&this._logMethod.apply(ee,i),this.processQueue()}warn(...i){const n=["WARN",...i];this.queue.push(n),this.logToConsole&&this._warnMethod.apply(ee,i),this.processQueue()}error(...i){const n=["ERROR",...i];this.queue.push(n),this.logToConsole&&this._errorMethod.apply(ee,i),this.processQueue()}debug(...i){const n=["DEBUG",...i];this.queue.push(n),this.logToConsole&&this._debugMethod.apply(ee,i),this.processQueue()}async defaultGetItemFunction(i){return localStorage.getItem(i)}async defaultSetItemFunction(i,n){try{localStorage.setItem(i,n)}catch(s){this._errorMethod(s)}}formItemKey(i){const n=new Date().toISOString();return this.logIndex++,`${i}-${this.namespace}-${n}-${this.logIndex}`}}class lf{constructor(i){wt(this,"io");wt(this,"storageLogger");this.eventsSdkClass=i,this.eventsSdkClass=i}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 wo({socket:this.io,loggerOptions:this.eventsSdkClass.options.loggerConfig}):this.storageLogger=new wo({url:this.eventsSdkClass.options.loggerServer,socketOptions:this.eventsSdkClass.options.loggerConnectOptions,loggerOptions:this.eventsSdkClass.options.loggerConfig}))}log(i,n,...s){const u=[n,...s];this.storageLogger?i===Gt.INFO?this.storageLogger.log(u):i===Gt.ERROR&&this.storageLogger.error(u):i===Gt.INFO?console.log(u):i===Gt.ERROR&&console.error(u)}}class pf{constructor(i){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=i,this.eventsSdkClass=i}on(i,n){i==="*"?this.allListeners.push(n):this.listeners[i].push(n)}off(i,n){if(i==="*")this.allListeners=this.allListeners.filter(s=>s!==n);else{const u=this.listeners[i].filter(h=>h!==n);this.listeners={...this.listeners,[i]:u}}}emit(i,n){this.eventsSdkClass.socketIoClass.lastEventTimestamp=new Date().getTime(),this.listeners[i].forEach(u=>u({name:i,data:n}));const s={name:i,data:n};this.allListeners.forEach(u=>u(s))}}class df{constructor(i){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 ec(this));wt(this,"socketIoClass",new cc(this));wt(this,"loggerClass",new lf(this));wt(this,"eventEmitterClass",new pf(this));wt(this,"reconnectOptions");wt(this,"retryConnection");this.options={...rc,...i},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=nc.debounce(this.connect.bind(this),this.reconnectOptions.reconnectionDelay,{leading:!0,trailing:!1}),this.argumentOptions={...i}}on(i,n){this.eventEmitterClass.on(i,n)}emit(i,...n){this.socketIoClass.io&&this.socketIoClass.io.emit(i,...n)}connect(i){i===an.MAIN&&this.findMainServer(),i===an.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((i,n)=>n.Priority>i.Priority?n:i),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 i=this.servers.filter(n=>n.Priority!==this.mainServer.Priority&&this.alreadyAttemptedOtherServers.indexOf(n.Priority)+1===0);i.length||(this.alreadyAttemptedOtherServers=[],i=this.servers.filter(n=>n.Priority!==this.mainServer.Priority&&this.alreadyAttemptedOtherServers.indexOf(n.Priority)+1===0)),i.length&&(this.server=i.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 i=this.URLList.filter(n=>n!==this.URLList[0]&&this.alreadyAttemptedOtherServers.indexOf(n)+1===0);i.length||(this.alreadyAttemptedOtherServers=[],i=this.URLList.filter(n=>n!==this.URLList[0]&&this.alreadyAttemptedOtherServers.indexOf(n)+1===0)),i.length&&(this.URL=i[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)}}oe.ServerListenerEventsEnum=ii,oe.default=df,Object.defineProperties(oe,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
43
|
+
`+qn+"}":"{"+Yt.join(",")+"}":"{}";return tt.pop(),Me}};_.stringify=function(q,J,F){var et,P,Z,tt;if(typeof J=="function"||typeof J=="object"&&J){if((tt=S.call(J))==l)P=J;else if(tt==x){Z={};for(var z,at=0,bt=J.length;bt>at;z=J[at++],tt=S.call(z),(tt==E||tt==b)&&(Z[z]=1));}}if(F)if((tt=S.call(F))==b){if((F-=F%1)>0)for(et="",F>10&&(F=10);et.length<F;et+=" ");}else tt==E&&(et=F.length<=10?F:F.slice(0,10));return j("",(z={},z[""]=q,z),P,Z,et,"",[])}}if(!u("json-parse")){var B,kt,At=String.fromCharCode,Rt={92:"\\",34:'"',47:"/",98:"\b",116:" ",110:`
|
|
44
|
+
`,102:"\f",114:"\r"},ut=function(){throw B=kt=null,SyntaxError()},zt=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"$"},Le=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=zt(),q!="]";F||(F=!0))F&&(q==","?(q=zt(),q=="]"&&ut()):ut()),q==","&&ut(),J.push(Le(q));return J}if(q=="{"){for(J={};q=zt(),q!="}";F||(F=!0))F&&(q==","?(q=zt(),q=="}"&&ut()):ut()),(q==","||typeof q!="string"||(st?q.charAt(0):q[0])!="@"||zt()!=":")&&ut(),J[q.slice(1)]=Le(zt());return J}ut()}return q},ae=function(q,J,F){var et=pr(q,J,F);et===g?delete q[J]:q[J]=et},pr=function(q,J,F){var et,P=q[J];if(typeof P=="object"&&P)if(S.call(P)==x)for(et=P.length;et--;)ae(P,et,F);else m(P,function(Z){ae(P,Z,F)});return F.call(q,J,P)};_.parse=function(q,J){var F,et;return B=0,kt=""+q,F=Le(zt()),zt()!="$"&&ut(),B=kt=null,J&&S.call(J)==l?pr((et={},et[""]=F,et),"",J):F}}}})(this)},{}],48:[function(a,i){function n(s,u){var h=[];u=u||0;for(var m=u||0;m<s.length;m++)h[m-u]=s[m];return h}i.exports=n},{}]},{},[1])(1)}const sc=Object.assign({"./v1_3_7.js":Object.freeze(Object.defineProperty({__proto__:null,default:ic},Symbol.toStringTag,{value:"Module"}))}),oc=/v\d+_\d+_\d+/;function ac(a){return typeof a=="function"}const ri=Object.entries(sc).reduce((a,i)=>{var u;const n=i[1].default,s=(u=i[0].match(oc))==null?void 0:u[0];return ac(n)&&s&&(a[s]=n()),a},{}),Gs=a=>{if(a in ri)return ri[a];throw new Error(`Socket version ${a} not found`)},uc={...ri,getSocketVersion:Gs,makeSocketVersion:(a,...i)=>Gs(a)(...i)};var ht=(a=>(a.ALL_DIALER_STATUS="AllDialersStatus",a.ALL_EXTENSION_STATUS="AllExtensionsStatus",a.ALL_USERS_STATUS="AllUsersStatus",a.CONNECT="connect",a.DISCONNECT="disconnect",a.CONNECT_ERROR_EVENT="connect_error",a.EXTENSION_EVENT="ExtensionEvent",a.KEEP_ALIVE="keepalive",a.KEEP_ALIVE_RESPONSE="keepaliveResponse",a.LOGIN_STATUS="loginStatus",a.LOGIN_SUCCESS="loginSuccess",a.QUEUE_EVENT="QueueEvent",a.ONLINE_STATUS_EVENT="onlineStatusEvent",a.DIALER_EVENT="DialerEvent",a.EXTENSIONS_UPDATED="ExtensionsUpdated",a))(ht||{}),zs=(a=>(a.NEWCALL="NEWCALL",a.ANSWER="ANSWER",a.HOLD="HOLD",a.UNHOLD="UNHOLD",a.HANGUP="HANGUP",a.USER_STATUS_UPDATE="userStatusUpdate",a))(zs||{});class Xs{static mapExtensionEvent(i){const n=i.reason;let s,u;return i.data.currentCall&&(u=this.configureUTCForObject(i.data.currentCall,["callAnswered","callStarted"],i.servertime,i.servertimeoffset)),n===zs.HANGUP?s={...i,reason:n,data:{...i.data,currentCall:u?{...u,duration:Date.now()-((u==null?void 0:u.callAnswered_UTC_CLIENT)??0)}:void 0}}:s={...i,data:{...i.data,currentCall:u},reason:n},s}static mapAllExtensionStatus(i){return{...i,extensions:i.extensions.map(n=>({...n,currentCall:n.currentCall?this.configureUTCForObject(n.currentCall,["callAnswered","callStarted"],i.servertime,i.servertimeoffset):void 0}))}}static assignProperty(i,n,s){i[n]=s}static configureUTCForObject(i,n,s,u){const h=(s-u*60)*1e3,m=Date.now()-h,g={};return n.forEach(S=>{const v=i[S];if(console.log("####################"),console.log("property",S),console.log("value",v),console.log("####################"),v===0)this.assignProperty(g,`${S}_UTC`,0),this.assignProperty(g,`${S}_UTC_CLIENT`,0);else{const _=(v-u*60)*1e3;this.assignProperty(g,`${S}_UTC`,_),this.assignProperty(g,`${S}_UTC_CLIENT`,_+m)}}),{...i,...g}}}var ii=(a=>(a.UPDATE_MONITORED_EXTENSIONS="updateMonitoredExtensions",a.KEEP_ALIVE="keepAlive",a))(ii||{});class cc{constructor(i){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=i,this.eventsSdkClass=i}getSocketIoFunction(i){const n=i.split("v="),s="v".concat(n[n.length-1]).replaceAll(".","_");this.ioFunction=uc.getSocketVersion(s)}initSocketConnection(){const i=this.eventsSdkClass.authClass.token,n=this.eventsSdkClass.options.protocol,s=this.eventsSdkClass.server;try{const u=s?s.Domain:this.eventsSdkClass.URL,h=s?`${n}://${u}`:this.eventsSdkClass.URL;this.eventsSdkClass.loggerClass.log(Gt.INFO,"Connecting to..",h),this.eventsSdkClass.eventEmitterClass.emit(ht.ONLINE_STATUS_EVENT,{isSocketConnected:!1,attemptToConnect:h,doReconnect:this.doReconnect});const m={reconnection:!1,upgrade:!1,transports:["websocket"],forceNew:!0,query:{token:i},timeout:this.eventsSdkClass.options.timeout};if(i&&(m.query={token:i}),this.ioFunction&&h)this.io=this.ioFunction(h,m);else throw new Error("Socket server url no defined")}catch(u){this.eventsSdkClass.loggerClass.log(Gt.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(ii.KEEP_ALIVE,this.eventsSdkClass.authClass.token),this.eventsSdkClass.loggerClass.log(Gt.INFO,`EMIT -> ${ht.KEEP_ALIVE}`,this.eventsSdkClass.authClass.token);return}},this.eventsSdkClass.options.keepAliveTimeout)}closeAllConnections(){var i;this.io&&(this.io.close(),(i=this.io)==null||i.disconnect(),this.io=void 0),Un.clearSessionStorage()}initSocketEvents(){this.io&&this.io.on(ht.LOGIN_SUCCESS,i=>this.onLoginSuccessEvent(i)).on(ht.QUEUE_EVENT,i=>this.onQueueEvent(i)).on(ht.EXTENSION_EVENT,i=>this.onExtensionEvent(i)).on(ht.DIALER_EVENT,i=>this.onDialerEvent(i)).on(ht.LOGIN_STATUS,i=>this.onLoginStatusEvent(i)).on(ht.ALL_EXTENSION_STATUS,i=>this.onAllExtensionStatus(i)).on(ht.ALL_DIALER_STATUS,i=>this.onAllDialerStatus(i)).on(ht.KEEP_ALIVE_RESPONSE,i=>this.onKeepAliveResponse(i)).on(ht.EXTENSIONS_UPDATED,i=>this.onExtensionsUpdatedEvent(i)).on(ht.CONNECT,()=>this.onConnect()).on(ht.DISCONNECT,i=>this.onDisconnect(i)).on(ht.CONNECT_ERROR_EVENT,i=>this.onConnectError(i))}onLoginSuccessEvent(i){this.eventsSdkClass.eventEmitterClass.emit(ht.LOGIN_SUCCESS,i)}onQueueEvent(i){this.eventsSdkClass.eventEmitterClass.emit(ht.QUEUE_EVENT,i)}onExtensionEvent(i){const n=Xs.mapExtensionEvent(i);n&&this.eventsSdkClass.eventEmitterClass.emit(ht.EXTENSION_EVENT,n)}onDialerEvent(i){this.eventsSdkClass.eventEmitterClass.emit(ht.DIALER_EVENT,i)}onLoginStatusEvent(i){this.eventsSdkClass.eventEmitterClass.emit(ht.LOGIN_STATUS,i)}onAllExtensionStatus(i){const n=Xs.mapAllExtensionStatus(i);this.eventsSdkClass.eventEmitterClass.emit(ht.ALL_EXTENSION_STATUS,n)}onAllDialerStatus(i){this.eventsSdkClass.eventEmitterClass.emit(ht.ALL_DIALER_STATUS,i)}onKeepAliveResponse(i){if(this.eventsSdkClass.loggerClass.log(Gt.INFO,ht.KEEP_ALIVE_RESPONSE),i.errorCode){this.initSocketConnection();return}this.connected?this.lastEventTimestamp=new Date().getTime():this.initSocketConnection()}onExtensionsUpdatedEvent(i){this.eventsSdkClass.eventEmitterClass.emit(ht.EXTENSIONS_UPDATED,i)}onConnect(){this.keepReconnectInterval&&clearInterval(this.keepReconnectInterval),this.connected=!0,this.eventsSdkClass.loggerClass.log(Gt.INFO,ht.CONNECT,this.eventsSdkClass.reconnectOptions),this.eventsSdkClass.eventEmitterClass.emit(ht.ONLINE_STATUS_EVENT,{isSocketConnected:!0,doReconnect:this.doReconnect})}onDisconnect(i){this.connected=!1,this.eventsSdkClass.loggerClass.log(Gt.INFO,ht.DISCONNECT,i),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(an.NEXT))}onConnectError(i){this.eventsSdkClass.eventEmitterClass.emit(ht.ONLINE_STATUS_EVENT,{isSocketConnected:!1,doReconnect:this.doReconnect}),this.eventsSdkClass.loggerClass.log(Gt.ERROR,ht.CONNECT_ERROR_EVENT,i),setTimeout(()=>{this.eventsSdkClass.connect(an.NEXT)},this.eventsSdkClass.options.reconnectionDelay)}}var fc=Object.defineProperty,hc=(a,i,n)=>i in a?fc(a,i,{enumerable:!0,configurable:!0,writable:!0,value:n}):a[i]=n,Mt=(a,i,n)=>(hc(a,typeof i!="symbol"?i+"":i,n),n);const Oe=Object.create(null);Oe.open="0",Oe.close="1",Oe.ping="2",Oe.pong="3",Oe.message="4",Oe.upgrade="5",Oe.noop="6";const ir=Object.create(null);Object.keys(Oe).forEach(a=>{ir[Oe[a]]=a});const si={type:"error",data:"parser error"},Js=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",Vs=typeof ArrayBuffer=="function",Ys=a=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(a):a&&a.buffer instanceof ArrayBuffer,oi=({type:a,data:i},n,s)=>Js&&i instanceof Blob?n?s(i):js(i,s):Vs&&(i instanceof ArrayBuffer||Ys(i))?n?s(i):js(new Blob([i]),s):s(Oe[a]+(i||"")),js=(a,i)=>{const n=new FileReader;return n.onload=function(){const s=n.result.split(",")[1];i("b"+(s||""))},n.readAsDataURL(a)};function Zs(a){return a instanceof Uint8Array?a:a instanceof ArrayBuffer?new Uint8Array(a):new Uint8Array(a.buffer,a.byteOffset,a.byteLength)}let ai;function lc(a,i){if(Js&&a.data instanceof Blob)return a.data.arrayBuffer().then(Zs).then(i);if(Vs&&(a.data instanceof ArrayBuffer||Ys(a.data)))return i(Zs(a.data));oi(a,!1,n=>{ai||(ai=new TextEncoder),i(ai.encode(n))})}const Qs="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Dn=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let a=0;a<Qs.length;a++)Dn[Qs.charCodeAt(a)]=a;const pc=a=>{let i=a.length*.75,n=a.length,s,u=0,h,m,g,S;a[a.length-1]==="="&&(i--,a[a.length-2]==="="&&i--);const v=new ArrayBuffer(i),_=new Uint8Array(v);for(s=0;s<n;s+=4)h=Dn[a.charCodeAt(s)],m=Dn[a.charCodeAt(s+1)],g=Dn[a.charCodeAt(s+2)],S=Dn[a.charCodeAt(s+3)],_[u++]=h<<2|m>>4,_[u++]=(m&15)<<4|g>>2,_[u++]=(g&3)<<6|S&63;return v},dc=typeof ArrayBuffer=="function",ui=(a,i)=>{if(typeof a!="string")return{type:"message",data:to(a,i)};const n=a.charAt(0);return n==="b"?{type:"message",data:gc(a.substring(1),i)}:ir[n]?a.length>1?{type:ir[n],data:a.substring(1)}:{type:ir[n]}:si},gc=(a,i)=>{if(dc){const n=pc(a);return to(n,i)}else return{base64:!0,data:a}},to=(a,i)=>{switch(i){case"blob":return a instanceof Blob?a:new Blob([a]);case"arraybuffer":default:return a instanceof ArrayBuffer?a:a.buffer}},eo="",vc=(a,i)=>{const n=a.length,s=new Array(n);let u=0;a.forEach((h,m)=>{oi(h,!1,g=>{s[m]=g,++u===n&&i(s.join(eo))})})},yc=(a,i)=>{const n=a.split(eo),s=[];for(let u=0;u<n.length;u++){const h=ui(n[u],i);if(s.push(h),h.type==="error")break}return s};function mc(){return new TransformStream({transform(a,i){lc(a,n=>{const s=n.length;let u;if(s<126)u=new Uint8Array(1),new DataView(u.buffer).setUint8(0,s);else if(s<65536){u=new Uint8Array(3);const h=new DataView(u.buffer);h.setUint8(0,126),h.setUint16(1,s)}else{u=new Uint8Array(9);const h=new DataView(u.buffer);h.setUint8(0,127),h.setBigUint64(1,BigInt(s))}a.data&&typeof a.data!="string"&&(u[0]|=128),i.enqueue(u),i.enqueue(n)})}})}let ci;function sr(a){return a.reduce((i,n)=>i+n.length,0)}function or(a,i){if(a[0].length===i)return a.shift();const n=new Uint8Array(i);let s=0;for(let u=0;u<i;u++)n[u]=a[0][s++],s===a[0].length&&(a.shift(),s=0);return a.length&&s<a[0].length&&(a[0]=a[0].slice(s)),n}function _c(a,i){ci||(ci=new TextDecoder);const n=[];let s=0,u=-1,h=!1;return new TransformStream({transform(m,g){for(n.push(m);;){if(s===0){if(sr(n)<1)break;const S=or(n,1);h=(S[0]&128)===128,u=S[0]&127,u<126?s=3:u===126?s=1:s=2}else if(s===1){if(sr(n)<2)break;const S=or(n,2);u=new DataView(S.buffer,S.byteOffset,S.length).getUint16(0),s=3}else if(s===2){if(sr(n)<8)break;const S=or(n,8),v=new DataView(S.buffer,S.byteOffset,S.length),_=v.getUint32(0);if(_>Math.pow(2,21)-1){g.enqueue(si);break}u=_*Math.pow(2,32)+v.getUint32(4),s=3}else{if(sr(n)<u)break;const S=or(n,u);g.enqueue(ui(h?S:ci.decode(S),i)),s=0}if(u===0||u>a){g.enqueue(si);break}}}})}const no=4;function Dt(a){if(a)return wc(a)}function wc(a){for(var i in Dt.prototype)a[i]=Dt.prototype[i];return a}Dt.prototype.on=Dt.prototype.addEventListener=function(a,i){return this._callbacks=this._callbacks||{},(this._callbacks["$"+a]=this._callbacks["$"+a]||[]).push(i),this},Dt.prototype.once=function(a,i){function n(){this.off(a,n),i.apply(this,arguments)}return n.fn=i,this.on(a,n),this},Dt.prototype.off=Dt.prototype.removeListener=Dt.prototype.removeAllListeners=Dt.prototype.removeEventListener=function(a,i){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var n=this._callbacks["$"+a];if(!n)return this;if(arguments.length==1)return delete this._callbacks["$"+a],this;for(var s,u=0;u<n.length;u++)if(s=n[u],s===i||s.fn===i){n.splice(u,1);break}return n.length===0&&delete this._callbacks["$"+a],this},Dt.prototype.emit=function(a){this._callbacks=this._callbacks||{};for(var i=new Array(arguments.length-1),n=this._callbacks["$"+a],s=1;s<arguments.length;s++)i[s-1]=arguments[s];if(n){n=n.slice(0);for(var s=0,u=n.length;s<u;++s)n[s].apply(this,i)}return this},Dt.prototype.emitReserved=Dt.prototype.emit,Dt.prototype.listeners=function(a){return this._callbacks=this._callbacks||{},this._callbacks["$"+a]||[]},Dt.prototype.hasListeners=function(a){return!!this.listeners(a).length};const ge=typeof self<"u"?self:typeof window<"u"?window:Function("return this")();function ro(a,...i){return i.reduce((n,s)=>(a.hasOwnProperty(s)&&(n[s]=a[s]),n),{})}const bc=ge.setTimeout,Sc=ge.clearTimeout;function ar(a,i){i.useNativeTimers?(a.setTimeoutFn=bc.bind(ge),a.clearTimeoutFn=Sc.bind(ge)):(a.setTimeoutFn=ge.setTimeout.bind(ge),a.clearTimeoutFn=ge.clearTimeout.bind(ge))}const Cc=1.33;function kc(a){return typeof a=="string"?Ac(a):Math.ceil((a.byteLength||a.size)*Cc)}function Ac(a){let i=0,n=0;for(let s=0,u=a.length;s<u;s++)i=a.charCodeAt(s),i<128?n+=1:i<2048?n+=2:i<55296||i>=57344?n+=3:(s++,n+=4);return n}function Ec(a){let i="";for(let n in a)a.hasOwnProperty(n)&&(i.length&&(i+="&"),i+=encodeURIComponent(n)+"="+encodeURIComponent(a[n]));return i}function Tc(a){let i={},n=a.split("&");for(let s=0,u=n.length;s<u;s++){let h=n[s].split("=");i[decodeURIComponent(h[0])]=decodeURIComponent(h[1])}return i}class xc extends Error{constructor(i,n,s){super(i),this.description=n,this.context=s,this.type="TransportError"}}class fi extends Dt{constructor(i){super(),this.writable=!1,ar(this,i),this.opts=i,this.query=i.query,this.socket=i.socket}onError(i,n,s){return super.emitReserved("error",new xc(i,n,s)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(i){this.readyState==="open"&&this.write(i)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(i){const n=ui(i,this.socket.binaryType);this.onPacket(n)}onPacket(i){super.emitReserved("packet",i)}onClose(i){this.readyState="closed",super.emitReserved("close",i)}pause(i){}createUri(i,n={}){return i+"://"+this._hostname()+this._port()+this.opts.path+this._query(n)}_hostname(){const i=this.opts.hostname;return i.indexOf(":")===-1?i:"["+i+"]"}_port(){return this.opts.port&&(this.opts.secure&&+(this.opts.port!==443)||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(i){const n=Ec(i);return n.length?"?"+n:""}}const io="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),hi=64,Rc={};let so=0,ur=0,oo;function ao(a){let i="";do i=io[a%hi]+i,a=Math.floor(a/hi);while(a>0);return i}function uo(){const a=ao(+new Date);return a!==oo?(so=0,oo=a):a+"."+ao(so++)}for(;ur<hi;ur++)Rc[io[ur]]=ur;let co=!1;try{co=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const Oc=co;function fo(a){const i=a.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!i||Oc))return new XMLHttpRequest}catch{}if(!i)try{return new ge[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}function Ic(){}const Lc=function(){return new fo({xdomain:!1}).responseType!=null}();class Nc extends fi{constructor(i){if(super(i),this.polling=!1,typeof location<"u"){const s=location.protocol==="https:";let u=location.port;u||(u=s?"443":"80"),this.xd=typeof location<"u"&&i.hostname!==location.hostname||u!==i.port}const n=i&&i.forceBase64;this.supportsBinary=Lc&&!n,this.opts.withCredentials&&(this.cookieJar=void 0)}get name(){return"polling"}doOpen(){this.poll()}pause(i){this.readyState="pausing";const n=()=>{this.readyState="paused",i()};if(this.polling||!this.writable){let s=0;this.polling&&(s++,this.once("pollComplete",function(){--s||n()})),this.writable||(s++,this.once("drain",function(){--s||n()}))}else n()}poll(){this.polling=!0,this.doPoll(),this.emitReserved("poll")}onData(i){const n=s=>{if(this.readyState==="opening"&&s.type==="open"&&this.onOpen(),s.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(s)};yc(i,this.socket.binaryType).forEach(n),this.readyState!=="closed"&&(this.polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this.poll())}doClose(){const i=()=>{this.write([{type:"close"}])};this.readyState==="open"?i():this.once("open",i)}write(i){this.writable=!1,vc(i,n=>{this.doWrite(n,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const i=this.opts.secure?"https":"http",n=this.query||{};return this.opts.timestampRequests!==!1&&(n[this.opts.timestampParam]=uo()),!this.supportsBinary&&!n.sid&&(n.b64=1),this.createUri(i,n)}request(i={}){return Object.assign(i,{xd:this.xd,cookieJar:this.cookieJar},this.opts),new Ie(this.uri(),i)}doWrite(i,n){const s=this.request({method:"POST",data:i});s.on("success",n),s.on("error",(u,h)=>{this.onError("xhr post error",u,h)})}doPoll(){const i=this.request();i.on("data",this.onData.bind(this)),i.on("error",(n,s)=>{this.onError("xhr poll error",n,s)}),this.pollXhr=i}}class Ie extends Dt{constructor(i,n){super(),ar(this,n),this.opts=n,this.method=n.method||"GET",this.uri=i,this.data=n.data!==void 0?n.data:null,this.create()}create(){var i;const n=ro(this.opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");n.xdomain=!!this.opts.xd;const s=this.xhr=new fo(n);try{s.open(this.method,this.uri,!0);try{if(this.opts.extraHeaders){s.setDisableHeaderCheck&&s.setDisableHeaderCheck(!0);for(let u in this.opts.extraHeaders)this.opts.extraHeaders.hasOwnProperty(u)&&s.setRequestHeader(u,this.opts.extraHeaders[u])}}catch{}if(this.method==="POST")try{s.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{s.setRequestHeader("Accept","*/*")}catch{}(i=this.opts.cookieJar)===null||i===void 0||i.addCookies(s),"withCredentials"in s&&(s.withCredentials=this.opts.withCredentials),this.opts.requestTimeout&&(s.timeout=this.opts.requestTimeout),s.onreadystatechange=()=>{var u;s.readyState===3&&((u=this.opts.cookieJar)===null||u===void 0||u.parseCookies(s)),s.readyState===4&&(s.status===200||s.status===1223?this.onLoad():this.setTimeoutFn(()=>{this.onError(typeof s.status=="number"?s.status:0)},0))},s.send(this.data)}catch(u){this.setTimeoutFn(()=>{this.onError(u)},0);return}typeof document<"u"&&(this.index=Ie.requestsCount++,Ie.requests[this.index]=this)}onError(i){this.emitReserved("error",i,this.xhr),this.cleanup(!0)}cleanup(i){if(!(typeof this.xhr>"u"||this.xhr===null)){if(this.xhr.onreadystatechange=Ic,i)try{this.xhr.abort()}catch{}typeof document<"u"&&delete Ie.requests[this.index],this.xhr=null}}onLoad(){const i=this.xhr.responseText;i!==null&&(this.emitReserved("data",i),this.emitReserved("success"),this.cleanup())}abort(){this.cleanup()}}if(Ie.requestsCount=0,Ie.requests={},typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",ho);else if(typeof addEventListener=="function"){const a="onpagehide"in ge?"pagehide":"unload";addEventListener(a,ho,!1)}}function ho(){for(let a in Ie.requests)Ie.requests.hasOwnProperty(a)&&Ie.requests[a].abort()}const li=typeof Promise=="function"&&typeof Promise.resolve=="function"?a=>Promise.resolve().then(a):(a,i)=>i(a,0),cr=ge.WebSocket||ge.MozWebSocket,lo=!0,Bc="arraybuffer",po=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class Uc extends fi{constructor(i){super(i),this.supportsBinary=!i.forceBase64}get name(){return"websocket"}doOpen(){if(!this.check())return;const i=this.uri(),n=this.opts.protocols,s=po?{}:ro(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(s.headers=this.opts.extraHeaders);try{this.ws=lo&&!po?n?new cr(i,n):new cr(i):new cr(i,n,s)}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=i=>this.onClose({description:"websocket connection closed",context:i}),this.ws.onmessage=i=>this.onData(i.data),this.ws.onerror=i=>this.onError("websocket error",i)}write(i){this.writable=!1;for(let n=0;n<i.length;n++){const s=i[n],u=n===i.length-1;oi(s,this.supportsBinary,h=>{try{lo&&this.ws.send(h)}catch{}u&&li(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.close(),this.ws=null)}uri(){const i=this.opts.secure?"wss":"ws",n=this.query||{};return this.opts.timestampRequests&&(n[this.opts.timestampParam]=uo()),this.supportsBinary||(n.b64=1),this.createUri(i,n)}check(){return!!cr}}class Dc extends fi{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(i=>{this.onError("webtransport error",i)}),this.transport.ready.then(()=>{this.transport.createBidirectionalStream().then(i=>{const n=_c(Number.MAX_SAFE_INTEGER,this.socket.binaryType),s=i.readable.pipeThrough(n).getReader(),u=mc();u.readable.pipeTo(i.writable),this.writer=u.writable.getWriter();const h=()=>{s.read().then(({done:g,value:S})=>{g||(this.onPacket(S),h())}).catch(g=>{})};h();const m={type:"open"};this.query.sid&&(m.data=`{"sid":"${this.query.sid}"}`),this.writer.write(m).then(()=>this.onOpen())})}))}write(i){this.writable=!1;for(let n=0;n<i.length;n++){const s=i[n],u=n===i.length-1;this.writer.write(s).then(()=>{u&&li(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var i;(i=this.transport)===null||i===void 0||i.close()}}const Pc={websocket:Uc,webtransport:Dc,polling:Nc},Fc=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,Mc=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function pi(a){if(a.length>2e3)throw"URI too long";const i=a,n=a.indexOf("["),s=a.indexOf("]");n!=-1&&s!=-1&&(a=a.substring(0,n)+a.substring(n,s).replace(/:/g,";")+a.substring(s,a.length));let u=Fc.exec(a||""),h={},m=14;for(;m--;)h[Mc[m]]=u[m]||"";return n!=-1&&s!=-1&&(h.source=i,h.host=h.host.substring(1,h.host.length-1).replace(/;/g,":"),h.authority=h.authority.replace("[","").replace("]","").replace(/;/g,":"),h.ipv6uri=!0),h.pathNames=qc(h,h.path),h.queryKey=Wc(h,h.query),h}function qc(a,i){const n=/\/{2,9}/g,s=i.replace(n,"/").split("/");return(i.slice(0,1)=="/"||i.length===0)&&s.splice(0,1),i.slice(-1)=="/"&&s.splice(s.length-1,1),s}function Wc(a,i){const n={};return i.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(s,u,h){u&&(n[u]=h)}),n}let go=class Bn extends Dt{constructor(i,n={}){super(),this.binaryType=Bc,this.writeBuffer=[],i&&typeof i=="object"&&(n=i,i=null),i?(i=pi(i),n.hostname=i.host,n.secure=i.protocol==="https"||i.protocol==="wss",n.port=i.port,i.query&&(n.query=i.query)):n.host&&(n.hostname=pi(n.host).host),ar(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=Tc(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(i){const n=Object.assign({},this.opts.query);n.EIO=no,n.transport=i,this.id&&(n.sid=this.id);const s=Object.assign({},this.opts,{query:n,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[i]);return new Pc[i](s)}open(){let i;if(this.opts.rememberUpgrade&&Bn.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1)i="websocket";else if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}else i=this.transports[0];this.readyState="opening";try{i=this.createTransport(i)}catch{this.transports.shift(),this.open();return}i.open(),this.setTransport(i)}setTransport(i){this.transport&&this.transport.removeAllListeners(),this.transport=i,i.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(i){let n=this.createTransport(i),s=!1;Bn.priorWebsocketSuccess=!1;const u=()=>{s||(n.send([{type:"ping",data:"probe"}]),n.once("packet",y=>{if(!s)if(y.type==="pong"&&y.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;Bn.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{s||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 h(){s||(s=!0,_(),n.close(),n=null)}const m=y=>{const l=new Error("probe error: "+y);l.transport=n.name,h(),this.emitReserved("upgradeError",l)};function g(){m("transport closed")}function S(){m("socket closed")}function v(y){n&&y.name!==n.name&&h()}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&&i!=="webtransport"?this.setTimeoutFn(()=>{s||n.open()},200):n.open()}onOpen(){if(this.readyState="open",Bn.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush(),this.readyState==="open"&&this.opts.upgrade){let i=0;const n=this.upgrades.length;for(;i<n;i++)this.probe(this.upgrades[i])}}onPacket(i){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",i),this.emitReserved("heartbeat"),this.resetPingTimeout(),i.type){case"open":this.onHandshake(JSON.parse(i.data));break;case"ping":this.sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong");break;case"error":const n=new Error("server error");n.code=i.data,this.onError(n);break;case"message":this.emitReserved("data",i.data),this.emitReserved("message",i.data);break}}onHandshake(i){this.emitReserved("handshake",i),this.id=i.sid,this.transport.query.sid=i.sid,this.upgrades=this.filterUpgrades(i.upgrades),this.pingInterval=i.pingInterval,this.pingTimeout=i.pingTimeout,this.maxPayload=i.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 i=this.getWritablePackets();this.transport.send(i),this.prevBufferLen=i.length,this.emitReserved("flush")}}getWritablePackets(){if(!(this.maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let i=1;for(let n=0;n<this.writeBuffer.length;n++){const s=this.writeBuffer[n].data;if(s&&(i+=kc(s)),n>0&&i>this.maxPayload)return this.writeBuffer.slice(0,n);i+=2}return this.writeBuffer}write(i,n,s){return this.sendPacket("message",i,n,s),this}send(i,n,s){return this.sendPacket("message",i,n,s),this}sendPacket(i,n,s,u){if(typeof n=="function"&&(u=n,n=void 0),typeof s=="function"&&(u=s,s=null),this.readyState==="closing"||this.readyState==="closed")return;s=s||{},s.compress=s.compress!==!1;const h={type:i,data:n,options:s};this.emitReserved("packetCreate",h),this.writeBuffer.push(h),u&&this.once("flush",u),this.flush()}close(){const i=()=>{this.onClose("forced close"),this.transport.close()},n=()=>{this.off("upgrade",n),this.off("upgradeError",n),i()},s=()=>{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?s():i()}):this.upgrading?s():i()),this}onError(i){Bn.priorWebsocketSuccess=!1,this.emitReserved("error",i),this.onClose("transport error",i)}onClose(i,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",i,n),this.writeBuffer=[],this.prevBufferLen=0)}filterUpgrades(i){const n=[];let s=0;const u=i.length;for(;s<u;s++)~this.transports.indexOf(i[s])&&n.push(i[s]);return n}};go.protocol=no;function Kc(a,i="",n){let s=a;n=n||typeof location<"u"&&location,a==null&&(a=n.protocol+"//"+n.host),typeof a=="string"&&(a.charAt(0)==="/"&&(a.charAt(1)==="/"?a=n.protocol+a:a=n.host+a),/^(https?|wss?):\/\//.test(a)||(typeof n<"u"?a=n.protocol+"//"+a:a="https://"+a),s=pi(a)),s.port||(/^(http|ws)$/.test(s.protocol)?s.port="80":/^(http|ws)s$/.test(s.protocol)&&(s.port="443")),s.path=s.path||"/";const u=s.host.indexOf(":")!==-1?"["+s.host+"]":s.host;return s.id=s.protocol+"://"+u+":"+s.port+i,s.href=s.protocol+"://"+u+(n&&n.port===s.port?"":":"+s.port),s}const Hc=typeof ArrayBuffer=="function",$c=a=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(a):a.buffer instanceof ArrayBuffer,vo=Object.prototype.toString,Gc=typeof Blob=="function"||typeof Blob<"u"&&vo.call(Blob)==="[object BlobConstructor]",zc=typeof File=="function"||typeof File<"u"&&vo.call(File)==="[object FileConstructor]";function di(a){return Hc&&(a instanceof ArrayBuffer||$c(a))||Gc&&a instanceof Blob||zc&&a instanceof File}function fr(a,i){if(!a||typeof a!="object")return!1;if(Array.isArray(a)){for(let n=0,s=a.length;n<s;n++)if(fr(a[n]))return!0;return!1}if(di(a))return!0;if(a.toJSON&&typeof a.toJSON=="function"&&arguments.length===1)return fr(a.toJSON(),!0);for(const n in a)if(Object.prototype.hasOwnProperty.call(a,n)&&fr(a[n]))return!0;return!1}function Xc(a){const i=[],n=a.data,s=a;return s.data=gi(n,i),s.attachments=i.length,{packet:s,buffers:i}}function gi(a,i){if(!a)return a;if(di(a)){const n={_placeholder:!0,num:i.length};return i.push(a),n}else if(Array.isArray(a)){const n=new Array(a.length);for(let s=0;s<a.length;s++)n[s]=gi(a[s],i);return n}else if(typeof a=="object"&&!(a instanceof Date)){const n={};for(const s in a)Object.prototype.hasOwnProperty.call(a,s)&&(n[s]=gi(a[s],i));return n}return a}function Jc(a,i){return a.data=vi(a.data,i),delete a.attachments,a}function vi(a,i){if(!a)return a;if(a&&a._placeholder===!0){if(typeof a.num=="number"&&a.num>=0&&a.num<i.length)return i[a.num];throw new Error("illegal attachments")}else if(Array.isArray(a))for(let n=0;n<a.length;n++)a[n]=vi(a[n],i);else if(typeof a=="object")for(const n in a)Object.prototype.hasOwnProperty.call(a,n)&&(a[n]=vi(a[n],i));return a}const Vc=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],Yc=5;var yt;(function(a){a[a.CONNECT=0]="CONNECT",a[a.DISCONNECT=1]="DISCONNECT",a[a.EVENT=2]="EVENT",a[a.ACK=3]="ACK",a[a.CONNECT_ERROR=4]="CONNECT_ERROR",a[a.BINARY_EVENT=5]="BINARY_EVENT",a[a.BINARY_ACK=6]="BINARY_ACK"})(yt||(yt={}));class jc{constructor(i){this.replacer=i}encode(i){return(i.type===yt.EVENT||i.type===yt.ACK)&&fr(i)?this.encodeAsBinary({type:i.type===yt.EVENT?yt.BINARY_EVENT:yt.BINARY_ACK,nsp:i.nsp,data:i.data,id:i.id}):[this.encodeAsString(i)]}encodeAsString(i){let n=""+i.type;return(i.type===yt.BINARY_EVENT||i.type===yt.BINARY_ACK)&&(n+=i.attachments+"-"),i.nsp&&i.nsp!=="/"&&(n+=i.nsp+","),i.id!=null&&(n+=i.id),i.data!=null&&(n+=JSON.stringify(i.data,this.replacer)),n}encodeAsBinary(i){const n=Xc(i),s=this.encodeAsString(n.packet),u=n.buffers;return u.unshift(s),u}}function yo(a){return Object.prototype.toString.call(a)==="[object Object]"}class yi extends Dt{constructor(i){super(),this.reviver=i}add(i){let n;if(typeof i=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");n=this.decodeString(i);const s=n.type===yt.BINARY_EVENT;s||n.type===yt.BINARY_ACK?(n.type=s?yt.EVENT:yt.ACK,this.reconstructor=new Zc(n),n.attachments===0&&super.emitReserved("decoded",n)):super.emitReserved("decoded",n)}else if(di(i)||i.base64)if(this.reconstructor)n=this.reconstructor.takeBinaryData(i),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: "+i)}decodeString(i){let n=0;const s={type:Number(i.charAt(0))};if(yt[s.type]===void 0)throw new Error("unknown packet type "+s.type);if(s.type===yt.BINARY_EVENT||s.type===yt.BINARY_ACK){const h=n+1;for(;i.charAt(++n)!=="-"&&n!=i.length;);const m=i.substring(h,n);if(m!=Number(m)||i.charAt(n)!=="-")throw new Error("Illegal attachments");s.attachments=Number(m)}if(i.charAt(n+1)==="/"){const h=n+1;for(;++n&&!(i.charAt(n)===","||n===i.length););s.nsp=i.substring(h,n)}else s.nsp="/";const u=i.charAt(n+1);if(u!==""&&Number(u)==u){const h=n+1;for(;++n;){const m=i.charAt(n);if(m==null||Number(m)!=m){--n;break}if(n===i.length)break}s.id=Number(i.substring(h,n+1))}if(i.charAt(++n)){const h=this.tryParse(i.substr(n));if(yi.isPayloadValid(s.type,h))s.data=h;else throw new Error("invalid payload")}return s}tryParse(i){try{return JSON.parse(i,this.reviver)}catch{return!1}}static isPayloadValid(i,n){switch(i){case yt.CONNECT:return yo(n);case yt.DISCONNECT:return n===void 0;case yt.CONNECT_ERROR:return typeof n=="string"||yo(n);case yt.EVENT:case yt.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&Vc.indexOf(n[0])===-1);case yt.ACK:case yt.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class Zc{constructor(i){this.packet=i,this.buffers=[],this.reconPack=i}takeBinaryData(i){if(this.buffers.push(i),this.buffers.length===this.reconPack.attachments){const n=Jc(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const Qc=Object.freeze(Object.defineProperty({__proto__:null,Decoder:yi,Encoder:jc,get PacketType(){return yt},protocol:Yc},Symbol.toStringTag,{value:"Module"}));function ke(a,i,n){return a.on(i,n),function(){a.off(i,n)}}const tf=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class mo extends Dt{constructor(i,n,s){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=i,this.nsp=n,s&&s.auth&&(this.auth=s.auth),this._opts=Object.assign({},s),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const i=this.io;this.subs=[ke(i,"open",this.onopen.bind(this)),ke(i,"packet",this.onpacket.bind(this)),ke(i,"error",this.onerror.bind(this)),ke(i,"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(...i){return i.unshift("message"),this.emit.apply(this,i),this}emit(i,...n){if(tf.hasOwnProperty(i))throw new Error('"'+i.toString()+'" is a reserved event name');if(n.unshift(i),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(n),this;const s={type:yt.EVENT,data:n};if(s.options={},s.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){const h=this.ids++,m=n.pop();this._registerAckCallback(h,m),s.id=h}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(s),this.packet(s)):this.sendBuffer.push(s)),this.flags={},this}_registerAckCallback(i,n){var s;const u=(s=this.flags.timeout)!==null&&s!==void 0?s:this._opts.ackTimeout;if(u===void 0){this.acks[i]=n;return}const h=this.io.setTimeoutFn(()=>{delete this.acks[i];for(let m=0;m<this.sendBuffer.length;m++)this.sendBuffer[m].id===i&&this.sendBuffer.splice(m,1);n.call(this,new Error("operation has timed out"))},u);this.acks[i]=(...m)=>{this.io.clearTimeoutFn(h),n.apply(this,[null,...m])}}emitWithAck(i,...n){const s=this.flags.timeout!==void 0||this._opts.ackTimeout!==void 0;return new Promise((u,h)=>{n.push((m,g)=>s?m?h(m):u(g):u(m)),this.emit(i,...n)})}_addToQueue(i){let n;typeof i[i.length-1]=="function"&&(n=i.pop());const s={id:this._queueSeq++,tryCount:0,pending:!1,args:i,flags:Object.assign({fromQueue:!0},this.flags)};i.push((u,...h)=>s!==this._queue[0]?void 0:(u!==null?s.tryCount>this._opts.retries&&(this._queue.shift(),n&&n(u)):(this._queue.shift(),n&&n(null,...h)),s.pending=!1,this._drainQueue())),this._queue.push(s),this._drainQueue()}_drainQueue(i=!1){if(!this.connected||this._queue.length===0)return;const n=this._queue[0];n.pending&&!i||(n.pending=!0,n.tryCount++,this.flags=n.flags,this.emit.apply(this,n.args))}packet(i){i.nsp=this.nsp,this.io._packet(i)}onopen(){typeof this.auth=="function"?this.auth(i=>{this._sendConnectPacket(i)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(i){this.packet({type:yt.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},i):i})}onerror(i){this.connected||this.emitReserved("connect_error",i)}onclose(i,n){this.connected=!1,delete this.id,this.emitReserved("disconnect",i,n)}onpacket(i){if(i.nsp===this.nsp)switch(i.type){case yt.CONNECT:i.data&&i.data.sid?this.onconnect(i.data.sid,i.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 yt.EVENT:case yt.BINARY_EVENT:this.onevent(i);break;case yt.ACK:case yt.BINARY_ACK:this.onack(i);break;case yt.DISCONNECT:this.ondisconnect();break;case yt.CONNECT_ERROR:this.destroy();const n=new Error(i.data.message);n.data=i.data.data,this.emitReserved("connect_error",n);break}}onevent(i){const n=i.data||[];i.id!=null&&n.push(this.ack(i.id)),this.connected?this.emitEvent(n):this.receiveBuffer.push(Object.freeze(n))}emitEvent(i){if(this._anyListeners&&this._anyListeners.length){const n=this._anyListeners.slice();for(const s of n)s.apply(this,i)}super.emit.apply(this,i),this._pid&&i.length&&typeof i[i.length-1]=="string"&&(this._lastOffset=i[i.length-1])}ack(i){const n=this;let s=!1;return function(...u){s||(s=!0,n.packet({type:yt.ACK,id:i,data:u}))}}onack(i){const n=this.acks[i.id];typeof n=="function"&&(n.apply(this,i.data),delete this.acks[i.id])}onconnect(i,n){this.id=i,this.recovered=n&&this._pid===n,this._pid=n,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach(i=>this.emitEvent(i)),this.receiveBuffer=[],this.sendBuffer.forEach(i=>{this.notifyOutgoingListeners(i),this.packet(i)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(i=>i()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:yt.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(i){return this.flags.compress=i,this}get volatile(){return this.flags.volatile=!0,this}timeout(i){return this.flags.timeout=i,this}onAny(i){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(i),this}prependAny(i){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(i),this}offAny(i){if(!this._anyListeners)return this;if(i){const n=this._anyListeners;for(let s=0;s<n.length;s++)if(i===n[s])return n.splice(s,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(i){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(i),this}prependAnyOutgoing(i){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(i),this}offAnyOutgoing(i){if(!this._anyOutgoingListeners)return this;if(i){const n=this._anyOutgoingListeners;for(let s=0;s<n.length;s++)if(i===n[s])return n.splice(s,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(i){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const n=this._anyOutgoingListeners.slice();for(const s of n)s.apply(this,i.data)}}}function yn(a){a=a||{},this.ms=a.min||100,this.max=a.max||1e4,this.factor=a.factor||2,this.jitter=a.jitter>0&&a.jitter<=1?a.jitter:0,this.attempts=0}yn.prototype.duration=function(){var a=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var i=Math.random(),n=Math.floor(i*this.jitter*a);a=Math.floor(i*10)&1?a+n:a-n}return Math.min(a,this.max)|0},yn.prototype.reset=function(){this.attempts=0},yn.prototype.setMin=function(a){this.ms=a},yn.prototype.setMax=function(a){this.max=a},yn.prototype.setJitter=function(a){this.jitter=a};class mi extends Dt{constructor(i,n){var s;super(),this.nsps={},this.subs=[],i&&typeof i=="object"&&(n=i,i=void 0),n=n||{},n.path=n.path||"/socket.io",this.opts=n,ar(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((s=n.randomizationFactor)!==null&&s!==void 0?s:.5),this.backoff=new yn({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(n.timeout==null?2e4:n.timeout),this._readyState="closed",this.uri=i;const u=n.parser||Qc;this.encoder=new u.Encoder,this.decoder=new u.Decoder,this._autoConnect=n.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(i){return arguments.length?(this._reconnection=!!i,this):this._reconnection}reconnectionAttempts(i){return i===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=i,this)}reconnectionDelay(i){var n;return i===void 0?this._reconnectionDelay:(this._reconnectionDelay=i,(n=this.backoff)===null||n===void 0||n.setMin(i),this)}randomizationFactor(i){var n;return i===void 0?this._randomizationFactor:(this._randomizationFactor=i,(n=this.backoff)===null||n===void 0||n.setJitter(i),this)}reconnectionDelayMax(i){var n;return i===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=i,(n=this.backoff)===null||n===void 0||n.setMax(i),this)}timeout(i){return arguments.length?(this._timeout=i,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(i){if(~this._readyState.indexOf("open"))return this;this.engine=new go(this.uri,this.opts);const n=this.engine,s=this;this._readyState="opening",this.skipReconnect=!1;const u=ke(n,"open",function(){s.onopen(),i&&i()}),h=g=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",g),i?i(g):this.maybeReconnectOnOpen()},m=ke(n,"error",h);if(this._timeout!==!1){const g=this._timeout,S=this.setTimeoutFn(()=>{u(),h(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(i){return this.open(i)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const i=this.engine;this.subs.push(ke(i,"ping",this.onping.bind(this)),ke(i,"data",this.ondata.bind(this)),ke(i,"error",this.onerror.bind(this)),ke(i,"close",this.onclose.bind(this)),ke(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(i){try{this.decoder.add(i)}catch(n){this.onclose("parse error",n)}}ondecoded(i){li(()=>{this.emitReserved("packet",i)},this.setTimeoutFn)}onerror(i){this.emitReserved("error",i)}socket(i,n){let s=this.nsps[i];return s?this._autoConnect&&!s.active&&s.connect():(s=new mo(this,i,n),this.nsps[i]=s),s}_destroy(i){const n=Object.keys(this.nsps);for(const s of n)if(this.nsps[s].active)return;this._close()}_packet(i){const n=this.encoder.encode(i);for(let s=0;s<n.length;s++)this.engine.write(n[s],i.options)}cleanup(){this.subs.forEach(i=>i()),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(i,n){this.cleanup(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",i,n),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const i=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 s=this.setTimeoutFn(()=>{i.skipReconnect||(this.emitReserved("reconnect_attempt",i.backoff.attempts),!i.skipReconnect&&i.open(u=>{u?(i._reconnecting=!1,i.reconnect(),this.emitReserved("reconnect_error",u)):i.onreconnect()}))},n);this.opts.autoUnref&&s.unref(),this.subs.push(()=>{this.clearTimeoutFn(s)})}}onreconnect(){const i=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",i)}}const Pn={};function hr(a,i){typeof a=="object"&&(i=a,a=void 0),i=i||{};const n=Kc(a,i.path||"/socket.io"),s=n.source,u=n.id,h=n.path,m=Pn[u]&&h in Pn[u].nsps,g=i.forceNew||i["force new connection"]||i.multiplex===!1||m;let S;return g?S=new mi(s,i):(Pn[u]||(Pn[u]=new mi(s,i)),S=Pn[u]),n.query&&!i.query&&(i.query=n.queryKey),S.socket(n.path,i)}Object.assign(hr,{Manager:mi,Socket:mo,io:hr,connect:hr});let lr;const ef=new Uint8Array(16);function nf(){if(!lr&&(lr=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!lr))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return lr(ef)}const Kt=[];for(let a=0;a<256;++a)Kt.push((a+256).toString(16).slice(1));function rf(a,i=0){return Kt[a[i+0]]+Kt[a[i+1]]+Kt[a[i+2]]+Kt[a[i+3]]+"-"+Kt[a[i+4]]+Kt[a[i+5]]+"-"+Kt[a[i+6]]+Kt[a[i+7]]+"-"+Kt[a[i+8]]+Kt[a[i+9]]+"-"+Kt[a[i+10]]+Kt[a[i+11]]+Kt[a[i+12]]+Kt[a[i+13]]+Kt[a[i+14]]+Kt[a[i+15]]}const sf=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),_o={randomUUID:sf};function of(a,i,n){if(_o.randomUUID&&!i&&!a)return _o.randomUUID();a=a||{};const s=a.random||(a.rng||nf)();if(s[6]=s[6]&15|64,s[8]=s[8]&63|128,i){n=n||0;for(let u=0;u<16;++u)i[n+u]=s[u];return i}return rf(s)}function af(a){return!!a&&(typeof a=="object"||typeof a=="function")&&typeof a.then=="function"}function uf(a,i){const n=i.map(u=>JSON.stringify(u)).join(" "),s=new Date().toISOString();return JSON.stringify({level:a,time:s,message:n})}function cf(a){const i=String(a[0]),n=a.slice(1);return{level:i,logs:n}}function ff(a,i){const n=JSON.parse(a);return i.forEach(s=>delete n[s]),n}const hf={reconnection:!0,reconnectionDelay:5e3,reconnectionAttempts:10,upgrade:!1,transports:["websocket"],debug:!1},_i={logToConsole:!0,overloadGlobalConsole:!1,socketEmitInterval:6e4};let ne=console;class wo{constructor(i){Mt(this,"logToConsole"),Mt(this,"overloadGlobalConsole"),Mt(this,"namespace"),Mt(this,"socketEmitInterval"),Mt(this,"storageId"),Mt(this,"emitInProgress"),Mt(this,"queue"),Mt(this,"processing"),Mt(this,"interval"),Mt(this,"logIndex"),Mt(this,"socket"),Mt(this,"getItem"),Mt(this,"setItem"),Mt(this,"parseLog"),Mt(this,"_logMethod"),Mt(this,"_warnMethod"),Mt(this,"_errorMethod"),Mt(this,"_debugMethod");const{loggerOptions:n}=i;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||_i.socketEmitInterval,this.logToConsole=n.logToConsole!==void 0?n.logToConsole:_i.logToConsole,this.overloadGlobalConsole=n.overloadGlobalConsole!==void 0?n.overloadGlobalConsole:_i.overloadGlobalConsole,this.storageId=this.getStorageName(),this.queue=[],this.processing=!1,this.emitInProgress=!1,this.logIndex=0,this.init(i)}setupStorageFunctions(i,n,s){this.getItem=i&&typeof i=="function"?this.promisifyStorageFunction(i):this.defaultGetItemFunction,this.setItem=n&&typeof n=="function"?this.promisifyStorageFunction(n):this.defaultSetItemFunction,this.parseLog=s&&typeof s=="function"?s:uf}promisifyStorageFunction(i){const n=i("");return af(n)?async(...s)=>new Promise((u,h)=>{try{const m=i(...s);u(m)}catch(m){h(m)}}):i}init(i){const{socket:n,url:s,socketOptions:u={}}=i;this._logMethod=ne.log.bind(ne),this._warnMethod=ne.warn.bind(ne),this._errorMethod=ne.error.bind(ne),this._debugMethod=ne.debug.bind(ne),this.initStorage().then(()=>{if(n)this.socket=n;else if(s)this.socket=this.createConnection(s,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(i,n={}){const s={...hf,...n};return hr(i,s)}async emitLogs(){if(!this.emitInProgress)try{const i=await this.getItem(this.storageId);if(!i)return;const n=[];this.emitInProgress=!0;const s=JSON.parse(i),u=Object.keys(s);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",s[g]),n.push(g);const h=await this.getItem(this.storageId);if(!h)return;const m=ff(h,n);await this.setItem(this.storageId,JSON.stringify(m))}catch(i){this._errorMethod(i)}finally{this.emitInProgress=!1}}disconnectSocket(){!this.socket||!this.interval||(this.socket.disconnect(),clearInterval(this.interval))}_overloadConsole(){ne=Object.assign(ne,{log:(...i)=>{this.log(...i)},warn:(...i)=>{this.warn(...i)},error:(...i)=>{this.error(...i)},debug:(...i)=>{this.debug(...i)}})}async initStorage(){const i=await this.getItem(this.storageId);(!i||typeof i!="string")&&await this.setItem(this.storageId,JSON.stringify({}))}async resetStorage(){await this.setItem(this.storageId,JSON.stringify({}))}getStorageName(){const i=of();return this.namespace.toString().toUpperCase()+i+Date.now()}async processLog(...i){try{if(i.length<2)return;const n=await this.getItem(this.storageId);if(!n)return;const{level:s,logs:u}=cf(i),h=JSON.parse(n),m=this.formItemKey(s);h[m]=this.parseLog(s,u),await this.setItem(this.storageId,JSON.stringify(h))}catch(n){this._errorMethod(n)}}async processQueue(){if(this.processing||this.queue.length===0)return;const i=this.queue.shift();i&&(this.processing=!0,await this.processLog(...i).finally(()=>{this.processing=!1,this.processQueue()}))}log(...i){const n=["INFO",...i];this.queue.push(n),this.logToConsole&&this._logMethod.apply(ne,i),this.processQueue()}warn(...i){const n=["WARN",...i];this.queue.push(n),this.logToConsole&&this._warnMethod.apply(ne,i),this.processQueue()}error(...i){const n=["ERROR",...i];this.queue.push(n),this.logToConsole&&this._errorMethod.apply(ne,i),this.processQueue()}debug(...i){const n=["DEBUG",...i];this.queue.push(n),this.logToConsole&&this._debugMethod.apply(ne,i),this.processQueue()}async defaultGetItemFunction(i){return localStorage.getItem(i)}async defaultSetItemFunction(i,n){try{localStorage.setItem(i,n)}catch(s){this._errorMethod(s)}}formItemKey(i){const n=new Date().toISOString();return this.logIndex++,`${i}-${this.namespace}-${n}-${this.logIndex}`}}class lf{constructor(i){wt(this,"io");wt(this,"storageLogger");this.eventsSdkClass=i,this.eventsSdkClass=i}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 wo({socket:this.io,loggerOptions:this.eventsSdkClass.options.loggerConfig}):this.storageLogger=new wo({url:this.eventsSdkClass.options.loggerServer,socketOptions:this.eventsSdkClass.options.loggerConnectOptions,loggerOptions:this.eventsSdkClass.options.loggerConfig}))}log(i,n,...s){const u=[n,...s];this.storageLogger?i===Gt.INFO?this.storageLogger.log(u):i===Gt.ERROR&&this.storageLogger.error(u):i===Gt.INFO?console.log(u):i===Gt.ERROR&&console.error(u)}}class pf{constructor(i){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=i,this.eventsSdkClass=i}on(i,n){i==="*"?this.allListeners.push(n):this.listeners[i].push(n)}off(i,n){if(i==="*")this.allListeners=this.allListeners.filter(s=>s!==n);else{const u=this.listeners[i].filter(h=>h!==n);this.listeners={...this.listeners,[i]:u}}}emit(i,n){this.eventsSdkClass.socketIoClass.lastEventTimestamp=new Date().getTime(),this.listeners[i].forEach(u=>u({name:i,data:n}));const s={name:i,data:n};this.allListeners.forEach(u=>u(s))}}class df{constructor(i){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 ec(this));wt(this,"socketIoClass",new cc(this));wt(this,"loggerClass",new lf(this));wt(this,"eventEmitterClass",new pf(this));wt(this,"reconnectOptions");wt(this,"retryConnection");this.options={...rc,...i},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=nc.debounce(this.connect.bind(this),this.reconnectOptions.reconnectionDelay,{leading:!0,trailing:!1}),this.argumentOptions={...i}}on(i,n){this.eventEmitterClass.on(i,n)}emit(i,...n){this.socketIoClass.io&&this.socketIoClass.io.emit(i,...n)}connect(i){i===an.MAIN&&this.findMainServer(),i===an.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((i,n)=>n.Priority>i.Priority?n:i),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 i=this.servers.filter(n=>n.Priority!==this.mainServer.Priority&&this.alreadyAttemptedOtherServers.indexOf(n.Priority)+1===0);i.length||(this.alreadyAttemptedOtherServers=[],i=this.servers.filter(n=>n.Priority!==this.mainServer.Priority&&this.alreadyAttemptedOtherServers.indexOf(n.Priority)+1===0)),i.length&&(this.server=i.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 i=this.URLList.filter(n=>n!==this.URLList[0]&&this.alreadyAttemptedOtherServers.indexOf(n)+1===0);i.length||(this.alreadyAttemptedOtherServers=[],i=this.URLList.filter(n=>n!==this.URLList[0]&&this.alreadyAttemptedOtherServers.indexOf(n)+1===0)),i.length&&(this.URL=i[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)}}ee.EventsEnum=ht,ee.ServerListenerEventsEnum=ii,ee.default=df,Object.defineProperties(ee,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
45
45
|
//# sourceMappingURL=voicenter-events-sdk.umd.js.map
|