From cecab786b949e1bf2c1c2db07b07d8083a83f82f Mon Sep 17 00:00:00 2001 From: xangelo Date: Thu, 13 Jul 2023 06:15:51 -0400 Subject: [PATCH 1/7] fix: prod build process + migration Since we pre-build webpack, we're just running the typescript migration and copying `public/` into `dist/`. We also tweak the migration script so that it runs ALL migrations since releases are more spread out now. --- package.json | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index d059682..b420ea0 100644 --- a/package.json +++ b/package.json @@ -5,9 +5,10 @@ "scripts": { "up": "npx prisma migrate dev --name \"init\"", "start": "pm2 start dist/server/api.js", - "build": "npx webpack && npx tsc", + "build:prod": "npx tsc", + "postbuild:prod": "cp -R public dist/", "migrate": "npx ts-node ./node_modules/knex/bin/cli.js migrate:latest", - "migrate:prod": "NODE_ENV=production npx ts-node ./node_modules/knex/bin/cli.js migrate:up", + "migrate:prod": "NODE_ENV=production npx ts-node ./node_modules/knex/bin/cli.js migrate:latest", "seed": "npx ts-node ./node_modules/knex/bin/cli.js seed:run", "seed:prod": "NODE_ENV=production npm run seed", "dev:client": "npx webpack -w", -- 2.25.1 From 4d7a5560447631a4d5497d75d5ef1bb5d62bb1d4 Mon Sep 17 00:00:00 2001 From: xangelo Date: Thu, 13 Jul 2023 06:21:42 -0400 Subject: [PATCH 2/7] fix: check players hp before allowing them to start a battle We display an error on the client side to stop them from starting a battle. We return a 400 on the server if the player doesn't have enough HP fixes: #2 --- public/assets/bundle.js | 2 +- src/client/index.ts | 26 ++++++++++++++++++++++---- src/server/api.ts | 5 +++++ 3 files changed, 28 insertions(+), 5 deletions(-) diff --git a/public/assets/bundle.js b/public/assets/bundle.js index 8590f22..5468852 100644 --- a/public/assets/bundle.js +++ b/public/assets/bundle.js @@ -1,2 +1,2 @@ /*! For license information please see bundle.js.LICENSE.txt */ -(()=>{var e={4802:(e,t,n)=>{t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const n="color: "+this.color;t.splice(1,0,n,"color: inherit");let r=0,i=0;t[0].replace(/%[a-zA-Z%]/g,(e=>{"%%"!==e&&(r++,"%c"===e&&(i=r))})),t.splice(i,0,n)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}},t.load=function(){let e;try{e=t.storage.getItem("debug")}catch(e){}return!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG),e},t.useColors=function(){return!("undefined"==typeof window||!window.process||"renderer"!==window.process.type&&!window.process.__nwjs)||("undefined"==typeof navigator||!navigator.userAgent||!navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))&&("undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))},t.storage=function(){try{return localStorage}catch(e){}}(),t.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.log=console.debug||console.log||(()=>{}),e.exports=n(804)(t);const{formatters:r}=e.exports;r.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}},804:(e,t,n)=>{e.exports=function(e){function t(e){let n,i,o,s=null;function a(...e){if(!a.enabled)return;const r=a,i=Number(new Date),o=i-(n||i);r.diff=o,r.prev=n,r.curr=i,n=i,e[0]=t.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let s=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,((n,i)=>{if("%%"===n)return"%";s++;const o=t.formatters[i];if("function"==typeof o){const t=e[s];n=o.call(r,t),e.splice(s,1),s--}return n})),t.formatArgs.call(r,e),(r.log||t.log).apply(r,e)}return a.namespace=e,a.useColors=t.useColors(),a.color=t.selectColor(e),a.extend=r,a.destroy=t.destroy,Object.defineProperty(a,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==s?s:(i!==t.namespaces&&(i=t.namespaces,o=t.enabled(e)),o),set:e=>{s=e}}),"function"==typeof t.init&&t.init(a),a}function r(e,n){const r=t(this.namespace+(void 0===n?":":n)+e);return r.log=this.log,r}function i(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return t.debug=t,t.default=t,t.coerce=function(e){return e instanceof Error?e.stack||e.message:e},t.disable=function(){const e=[...t.names.map(i),...t.skips.map(i).map((e=>"-"+e))].join(",");return t.enable(""),e},t.enable=function(e){let n;t.save(e),t.namespaces=e,t.names=[],t.skips=[];const r=("string"==typeof e?e:"").split(/[\s,]+/),i=r.length;for(n=0;n{t[n]=e[n]})),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){let n=0;for(let t=0;t{var t=1e3,n=60*t,r=60*n,i=24*r;function o(e,t,n,r){var i=t>=1.5*n;return Math.round(e/n)+" "+r+(i?"s":"")}e.exports=function(e,s){s=s||{};var a,u,c=typeof e;if("string"===c&&e.length>0)return function(e){if(!((e=String(e)).length>100)){var o=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(o){var s=parseFloat(o[1]);switch((o[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*s;case"weeks":case"week":case"w":return 6048e5*s;case"days":case"day":case"d":return s*i;case"hours":case"hour":case"hrs":case"hr":case"h":return s*r;case"minutes":case"minute":case"mins":case"min":case"m":return s*n;case"seconds":case"second":case"secs":case"sec":case"s":return s*t;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return s;default:return}}}}(e);if("number"===c&&isFinite(e))return s.long?(a=e,(u=Math.abs(a))>=i?o(a,u,i,"day"):u>=r?o(a,u,r,"hour"):u>=n?o(a,u,n,"minute"):u>=t?o(a,u,t,"second"):a+" ms"):function(e){var o=Math.abs(e);return o>=i?Math.round(e/i)+"d":o>=r?Math.round(e/r)+"h":o>=n?Math.round(e/n)+"m":o>=t?Math.round(e/t)+"s":e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},9755:function(e,t){var n;!function(t,n){"use strict";"object"==typeof e.exports?e.exports=t.document?n(t,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return n(e)}:n(t)}("undefined"!=typeof window?window:this,(function(r,i){"use strict";var o=[],s=Object.getPrototypeOf,a=o.slice,u=o.flat?function(e){return o.flat.call(e)}:function(e){return o.concat.apply([],e)},c=o.push,l=o.indexOf,f={},d=f.toString,p=f.hasOwnProperty,h=p.toString,g=h.call(Object),v={},y=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType&&"function"!=typeof e.item},m=function(e){return null!=e&&e===e.window},b=r.document,_={type:!0,src:!0,nonce:!0,noModule:!0};function w(e,t,n){var r,i,o=(n=n||b).createElement("script");if(o.text=e,t)for(r in _)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function C(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?f[d.call(e)]||"object":typeof e}var x="3.7.0",k=/HTML$/i,E=function(e,t){return new E.fn.init(e,t)};function T(e){var t=!!e&&"length"in e&&e.length,n=C(e);return!y(e)&&!m(e)&&("array"===n||0===t||"number"==typeof t&&t>0&&t-1 in e)}function S(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}E.fn=E.prototype={jquery:x,constructor:E,length:0,toArray:function(){return a.call(this)},get:function(e){return null==e?a.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=E.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return E.each(this,e)},map:function(e){return this.pushStack(E.map(this,(function(t,n){return e.call(t,n,t)})))},slice:function(){return this.pushStack(a.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},even:function(){return this.pushStack(E.grep(this,(function(e,t){return(t+1)%2})))},odd:function(){return this.pushStack(E.grep(this,(function(e,t){return t%2})))},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(n>=0&&n+~]|"+F+")"+F+"*"),B=new RegExp(F+"|>"),H=new RegExp(N),W=new RegExp("^"+R+"$"),U={ID:new RegExp("^#("+R+")"),CLASS:new RegExp("^\\.("+R+")"),TAG:new RegExp("^("+R+"|[*])"),ATTR:new RegExp("^"+D),PSEUDO:new RegExp("^"+N),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+F+"*(even|odd|(([+-]|)(\\d*)n|)"+F+"*(?:([+-]|)"+F+"*(\\d+)|))"+F+"*\\)|)","i"),bool:new RegExp("^(?:"+T+")$","i"),needsContext:new RegExp("^"+F+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+F+"*((?:-\\d)?\\d*)"+F+"*\\)|)(?=[^-]|$)","i")},z=/^(?:input|select|textarea|button)$/i,V=/^h\d$/i,X=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,Y=/[+~]/,K=new RegExp("\\\\[\\da-fA-F]{1,6}"+F+"?|\\\\([^\\r\\n\\f])","g"),G=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},J=function(){ue()},Z=de((function(e){return!0===e.disabled&&S(e,"fieldset")}),{dir:"parentNode",next:"legend"});try{g.apply(o=a.call(M.childNodes),M.childNodes),o[M.childNodes.length].nodeType}catch(e){g={apply:function(e,t){L.apply(e,a.call(t))},call:function(e){L.apply(e,a.call(arguments,1))}}}function Q(e,t,n,r){var i,o,s,a,c,l,p,h=t&&t.ownerDocument,m=t?t.nodeType:9;if(n=n||[],"string"!=typeof e||!e||1!==m&&9!==m&&11!==m)return n;if(!r&&(ue(t),t=t||u,f)){if(11!==m&&(c=X.exec(e)))if(i=c[1]){if(9===m){if(!(s=t.getElementById(i)))return n;if(s.id===i)return g.call(n,s),n}else if(h&&(s=h.getElementById(i))&&Q.contains(t,s)&&s.id===i)return g.call(n,s),n}else{if(c[2])return g.apply(n,t.getElementsByTagName(e)),n;if((i=c[3])&&t.getElementsByClassName)return g.apply(n,t.getElementsByClassName(i)),n}if(!(x[e+" "]||d&&d.test(e))){if(p=e,h=t,1===m&&(B.test(e)||I.test(e))){for((h=Y.test(e)&&ae(t.parentNode)||t)==t&&v.scope||((a=t.getAttribute("id"))?a=E.escapeSelector(a):t.setAttribute("id",a=y)),o=(l=le(e)).length;o--;)l[o]=(a?"#"+a:":scope")+" "+fe(l[o]);p=l.join(",")}try{return g.apply(n,h.querySelectorAll(p)),n}catch(t){x(e,!0)}finally{a===y&&t.removeAttribute("id")}}}return me(e.replace(P,"$1"),t,n,r)}function ee(){var e=[];return function n(r,i){return e.push(r+" ")>t.cacheLength&&delete n[e.shift()],n[r+" "]=i}}function te(e){return e[y]=!0,e}function ne(e){var t=u.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function re(e){return function(t){return S(t,"input")&&t.type===e}}function ie(e){return function(t){return(S(t,"input")||S(t,"button"))&&t.type===e}}function oe(e){return function(t){return"form"in t?t.parentNode&&!1===t.disabled?"label"in t?"label"in t.parentNode?t.parentNode.disabled===e:t.disabled===e:t.isDisabled===e||t.isDisabled!==!e&&Z(t)===e:t.disabled===e:"label"in t&&t.disabled===e}}function se(e){return te((function(t){return t=+t,te((function(n,r){for(var i,o=e([],n.length,t),s=o.length;s--;)n[i=o[s]]&&(n[i]=!(r[i]=n[i]))}))}))}function ae(e){return e&&void 0!==e.getElementsByTagName&&e}function ue(e){var n,r=e?e.ownerDocument||e:M;return r!=u&&9===r.nodeType&&r.documentElement?(c=(u=r).documentElement,f=!E.isXMLDoc(u),h=c.matches||c.webkitMatchesSelector||c.msMatchesSelector,M!=u&&(n=u.defaultView)&&n.top!==n&&n.addEventListener("unload",J),v.getById=ne((function(e){return c.appendChild(e).id=E.expando,!u.getElementsByName||!u.getElementsByName(E.expando).length})),v.disconnectedMatch=ne((function(e){return h.call(e,"*")})),v.scope=ne((function(){return u.querySelectorAll(":scope")})),v.cssHas=ne((function(){try{return u.querySelector(":has(*,:jqfake)"),!1}catch(e){return!0}})),v.getById?(t.filter.ID=function(e){var t=e.replace(K,G);return function(e){return e.getAttribute("id")===t}},t.find.ID=function(e,t){if(void 0!==t.getElementById&&f){var n=t.getElementById(e);return n?[n]:[]}}):(t.filter.ID=function(e){var t=e.replace(K,G);return function(e){var n=void 0!==e.getAttributeNode&&e.getAttributeNode("id");return n&&n.value===t}},t.find.ID=function(e,t){if(void 0!==t.getElementById&&f){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];for(i=t.getElementsByName(e),r=0;o=i[r++];)if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),t.find.TAG=function(e,t){return void 0!==t.getElementsByTagName?t.getElementsByTagName(e):t.querySelectorAll(e)},t.find.CLASS=function(e,t){if(void 0!==t.getElementsByClassName&&f)return t.getElementsByClassName(e)},d=[],ne((function(e){var t;c.appendChild(e).innerHTML="",e.querySelectorAll("[selected]").length||d.push("\\["+F+"*(?:value|"+T+")"),e.querySelectorAll("[id~="+y+"-]").length||d.push("~="),e.querySelectorAll("a#"+y+"+*").length||d.push(".#.+[+~]"),e.querySelectorAll(":checked").length||d.push(":checked"),(t=u.createElement("input")).setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),c.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&d.push(":enabled",":disabled"),(t=u.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||d.push("\\["+F+"*name"+F+"*="+F+"*(?:''|\"\")")})),v.cssHas||d.push(":has"),d=d.length&&new RegExp(d.join("|")),k=function(e,t){if(e===t)return s=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!v.sortDetached&&t.compareDocumentPosition(e)===n?e===u||e.ownerDocument==M&&Q.contains(M,e)?-1:t===u||t.ownerDocument==M&&Q.contains(M,t)?1:i?l.call(i,e)-l.call(i,t):0:4&n?-1:1)},u):u}for(e in Q.matches=function(e,t){return Q(e,null,null,t)},Q.matchesSelector=function(e,t){if(ue(e),f&&!x[t+" "]&&(!d||!d.test(t)))try{var n=h.call(e,t);if(n||v.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){x(t,!0)}return Q(t,u,null,[e]).length>0},Q.contains=function(e,t){return(e.ownerDocument||e)!=u&&ue(e),E.contains(e,t)},Q.attr=function(e,n){(e.ownerDocument||e)!=u&&ue(e);var r=t.attrHandle[n.toLowerCase()],i=r&&p.call(t.attrHandle,n.toLowerCase())?r(e,n,!f):void 0;return void 0!==i?i:e.getAttribute(n)},Q.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},E.uniqueSort=function(e){var t,n=[],r=0,o=0;if(s=!v.sortStable,i=!v.sortStable&&a.call(e,0),j.call(e,k),s){for(;t=e[o++];)t===e[o]&&(r=n.push(o));for(;r--;)O.call(e,n[r],1)}return i=null,e},E.fn.uniqueSort=function(){return this.pushStack(E.uniqueSort(a.apply(this)))},t=E.expr={cacheLength:50,createPseudo:te,match:U,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(K,G),e[3]=(e[3]||e[4]||e[5]||"").replace(K,G),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||Q.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&Q.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return U.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&H.test(n)&&(t=le(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(K,G).toLowerCase();return"*"===e?function(){return!0}:function(e){return S(e,t)}},CLASS:function(e){var t=_[e+" "];return t||(t=new RegExp("(^|"+F+")"+e+"("+F+"|$)"))&&_(e,(function(e){return t.test("string"==typeof e.className&&e.className||void 0!==e.getAttribute&&e.getAttribute("class")||"")}))},ATTR:function(e,t,n){return function(r){var i=Q.attr(r,e);return null==i?"!="===t:!t||(i+="","="===t?i===n:"!="===t?i!==n:"^="===t?n&&0===i.indexOf(n):"*="===t?n&&i.indexOf(n)>-1:"$="===t?n&&i.slice(-n.length)===n:"~="===t?(" "+i.replace($," ")+" ").indexOf(n)>-1:"|="===t&&(i===n||i.slice(0,n.length+1)===n+"-"))}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),s="last"!==e.slice(-4),a="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,u){var c,l,f,d,p,h=o!==s?"nextSibling":"previousSibling",g=t.parentNode,v=a&&t.nodeName.toLowerCase(),b=!u&&!a,_=!1;if(g){if(o){for(;h;){for(f=t;f=f[h];)if(a?S(f,v):1===f.nodeType)return!1;p=h="only"===e&&!p&&"nextSibling"}return!0}if(p=[s?g.firstChild:g.lastChild],s&&b){for(_=(d=(c=(l=g[y]||(g[y]={}))[e]||[])[0]===m&&c[1])&&c[2],f=d&&g.childNodes[d];f=++d&&f&&f[h]||(_=d=0)||p.pop();)if(1===f.nodeType&&++_&&f===t){l[e]=[m,d,_];break}}else if(b&&(_=d=(c=(l=t[y]||(t[y]={}))[e]||[])[0]===m&&c[1]),!1===_)for(;(f=++d&&f&&f[h]||(_=d=0)||p.pop())&&(!(a?S(f,v):1===f.nodeType)||!++_||(b&&((l=f[y]||(f[y]={}))[e]=[m,_]),f!==t)););return(_-=i)===r||_%r==0&&_/r>=0}}},PSEUDO:function(e,n){var r,i=t.pseudos[e]||t.setFilters[e.toLowerCase()]||Q.error("unsupported pseudo: "+e);return i[y]?i(n):i.length>1?(r=[e,e,"",n],t.setFilters.hasOwnProperty(e.toLowerCase())?te((function(e,t){for(var r,o=i(e,n),s=o.length;s--;)e[r=l.call(e,o[s])]=!(t[r]=o[s])})):function(e){return i(e,0,r)}):i}},pseudos:{not:te((function(e){var t=[],n=[],r=ye(e.replace(P,"$1"));return r[y]?te((function(e,t,n,i){for(var o,s=r(e,null,i,[]),a=e.length;a--;)(o=s[a])&&(e[a]=!(t[a]=o))})):function(e,i,o){return t[0]=e,r(t,null,o,n),t[0]=null,!n.pop()}})),has:te((function(e){return function(t){return Q(e,t).length>0}})),contains:te((function(e){return e=e.replace(K,G),function(t){return(t.textContent||E.text(t)).indexOf(e)>-1}})),lang:te((function(e){return W.test(e||"")||Q.error("unsupported lang: "+e),e=e.replace(K,G).toLowerCase(),function(t){var n;do{if(n=f?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return(n=n.toLowerCase())===e||0===n.indexOf(e+"-")}while((t=t.parentNode)&&1===t.nodeType);return!1}})),target:function(e){var t=r.location&&r.location.hash;return t&&t.slice(1)===e.id},root:function(e){return e===c},focus:function(e){return e===function(){try{return u.activeElement}catch(e){}}()&&u.hasFocus()&&!!(e.type||e.href||~e.tabIndex)},enabled:oe(!1),disabled:oe(!0),checked:function(e){return S(e,"input")&&!!e.checked||S(e,"option")&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!t.pseudos.empty(e)},header:function(e){return V.test(e.nodeName)},input:function(e){return z.test(e.nodeName)},button:function(e){return S(e,"input")&&"button"===e.type||S(e,"button")},text:function(e){var t;return S(e,"input")&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:se((function(){return[0]})),last:se((function(e,t){return[t-1]})),eq:se((function(e,t,n){return[n<0?n+t:n]})),even:se((function(e,t){for(var n=0;nt?t:n;--r>=0;)e.push(r);return e})),gt:se((function(e,t,n){for(var r=n<0?n+t:n;++r1?function(t,n,r){for(var i=e.length;i--;)if(!e[i](t,n,r))return!1;return!0}:e[0]}function he(e,t,n,r,i){for(var o,s=[],a=0,u=e.length,c=null!=t;a-1&&(o[c]=!(s[c]=d))}}else p=he(p===s?p.splice(y,p.length):p),i?i(null,s,p,u):g.apply(s,p)}))}function ve(e){for(var r,i,o,s=e.length,a=t.relative[e[0].type],u=a||t.relative[" "],c=a?1:0,f=de((function(e){return e===r}),u,!0),d=de((function(e){return l.call(r,e)>-1}),u,!0),p=[function(e,t,i){var o=!a&&(i||t!=n)||((r=t).nodeType?f(e,t,i):d(e,t,i));return r=null,o}];c1&&pe(p),c>1&&fe(e.slice(0,c-1).concat({value:" "===e[c-2].type?"*":""})).replace(P,"$1"),i,c0,o=e.length>0,s=function(s,a,c,l,d){var p,h,v,y=0,b="0",_=s&&[],w=[],C=n,x=s||o&&t.find.TAG("*",d),k=m+=null==C?1:Math.random()||.1,T=x.length;for(d&&(n=a==u||a||d);b!==T&&null!=(p=x[b]);b++){if(o&&p){for(h=0,a||p.ownerDocument==u||(ue(p),c=!f);v=e[h++];)if(v(p,a||u,c)){g.call(l,p);break}d&&(m=k)}i&&((p=!v&&p)&&y--,s&&_.push(p))}if(y+=b,i&&b!==y){for(h=0;v=r[h++];)v(_,w,a,c);if(s){if(y>0)for(;b--;)_[b]||w[b]||(w[b]=A.call(l));w=he(w)}g.apply(l,w),d&&!s&&w.length>0&&y+r.length>1&&E.uniqueSort(l)}return d&&(m=k,n=C),_};return i?te(s):s}(s,o)),a.selector=e}return a}function me(e,n,r,i){var o,s,a,u,c,l="function"==typeof e&&e,d=!i&&le(e=l.selector||e);if(r=r||[],1===d.length){if((s=d[0]=d[0].slice(0)).length>2&&"ID"===(a=s[0]).type&&9===n.nodeType&&f&&t.relative[s[1].type]){if(!(n=(t.find.ID(a.matches[0].replace(K,G),n)||[])[0]))return r;l&&(n=n.parentNode),e=e.slice(s.shift().value.length)}for(o=U.needsContext.test(e)?0:s.length;o--&&(a=s[o],!t.relative[u=a.type]);)if((c=t.find[u])&&(i=c(a.matches[0].replace(K,G),Y.test(s[0].type)&&ae(n.parentNode)||n))){if(s.splice(o,1),!(e=i.length&&fe(s)))return g.apply(r,i),r;break}}return(l||ye(e,d))(i,n,!f,r,!n||Y.test(e)&&ae(n.parentNode)||n),r}ce.prototype=t.filters=t.pseudos,t.setFilters=new ce,v.sortStable=y.split("").sort(k).join("")===y,ue(),v.sortDetached=ne((function(e){return 1&e.compareDocumentPosition(u.createElement("fieldset"))})),E.find=Q,E.expr[":"]=E.expr.pseudos,E.unique=E.uniqueSort,Q.compile=ye,Q.select=me,Q.setDocument=ue,Q.escape=E.escapeSelector,Q.getText=E.text,Q.isXML=E.isXMLDoc,Q.selectors=E.expr,Q.support=E.support,Q.uniqueSort=E.uniqueSort}();var N=function(e,t,n){for(var r=[],i=void 0!==n;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(i&&E(e).is(n))break;r.push(e)}return r},$=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},q=E.expr.match.needsContext,I=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function B(e,t,n){return y(t)?E.grep(e,(function(e,r){return!!t.call(e,r,e)!==n})):t.nodeType?E.grep(e,(function(e){return e===t!==n})):"string"!=typeof t?E.grep(e,(function(e){return l.call(t,e)>-1!==n})):E.filter(t,e,n)}E.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?E.find.matchesSelector(r,e)?[r]:[]:E.find.matches(e,E.grep(t,(function(e){return 1===e.nodeType})))},E.fn.extend({find:function(e){var t,n,r=this.length,i=this;if("string"!=typeof e)return this.pushStack(E(e).filter((function(){for(t=0;t1?E.uniqueSort(n):n},filter:function(e){return this.pushStack(B(this,e||[],!1))},not:function(e){return this.pushStack(B(this,e||[],!0))},is:function(e){return!!B(this,"string"==typeof e&&q.test(e)?E(e):e||[],!1).length}});var H,W=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(E.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||H,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&e.length>=3?[null,e,null]:W.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof E?t[0]:t,E.merge(this,E.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:b,!0)),I.test(r[1])&&E.isPlainObject(t))for(r in t)y(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=b.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):y(e)?void 0!==n.ready?n.ready(e):e(E):E.makeArray(e,this)}).prototype=E.fn,H=E(b);var U=/^(?:parents|prev(?:Until|All))/,z={children:!0,contents:!0,next:!0,prev:!0};function V(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}E.fn.extend({has:function(e){var t=E(e,this),n=t.length;return this.filter((function(){for(var e=0;e-1:1===n.nodeType&&E.find.matchesSelector(n,e))){o.push(n);break}return this.pushStack(o.length>1?E.uniqueSort(o):o)},index:function(e){return e?"string"==typeof e?l.call(E(e),this[0]):l.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(E.uniqueSort(E.merge(this.get(),E(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),E.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return N(e,"parentNode")},parentsUntil:function(e,t,n){return N(e,"parentNode",n)},next:function(e){return V(e,"nextSibling")},prev:function(e){return V(e,"previousSibling")},nextAll:function(e){return N(e,"nextSibling")},prevAll:function(e){return N(e,"previousSibling")},nextUntil:function(e,t,n){return N(e,"nextSibling",n)},prevUntil:function(e,t,n){return N(e,"previousSibling",n)},siblings:function(e){return $((e.parentNode||{}).firstChild,e)},children:function(e){return $(e.firstChild)},contents:function(e){return null!=e.contentDocument&&s(e.contentDocument)?e.contentDocument:(S(e,"template")&&(e=e.content||e),E.merge([],e.childNodes))}},(function(e,t){E.fn[e]=function(n,r){var i=E.map(this,t,n);return"Until"!==e.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=E.filter(r,i)),this.length>1&&(z[e]||E.uniqueSort(i),U.test(e)&&i.reverse()),this.pushStack(i)}}));var X=/[^\x20\t\r\n\f]+/g;function Y(e){return e}function K(e){throw e}function G(e,t,n,r){var i;try{e&&y(i=e.promise)?i.call(e).done(t).fail(n):e&&y(i=e.then)?i.call(e,t,n):t.apply(void 0,[e].slice(r))}catch(e){n.apply(void 0,[e])}}E.Callbacks=function(e){e="string"==typeof e?function(e){var t={};return E.each(e.match(X)||[],(function(e,n){t[n]=!0})),t}(e):E.extend({},e);var t,n,r,i,o=[],s=[],a=-1,u=function(){for(i=i||e.once,r=t=!0;s.length;a=-1)for(n=s.shift();++a-1;)o.splice(n,1),n<=a&&a--})),this},has:function(e){return e?E.inArray(e,o)>-1:o.length>0},empty:function(){return o&&(o=[]),this},disable:function(){return i=s=[],o=n="",this},disabled:function(){return!o},lock:function(){return i=s=[],n||t||(o=n=""),this},locked:function(){return!!i},fireWith:function(e,n){return i||(n=[e,(n=n||[]).slice?n.slice():n],s.push(n),t||u()),this},fire:function(){return c.fireWith(this,arguments),this},fired:function(){return!!r}};return c},E.extend({Deferred:function(e){var t=[["notify","progress",E.Callbacks("memory"),E.Callbacks("memory"),2],["resolve","done",E.Callbacks("once memory"),E.Callbacks("once memory"),0,"resolved"],["reject","fail",E.Callbacks("once memory"),E.Callbacks("once memory"),1,"rejected"]],n="pending",i={state:function(){return n},always:function(){return o.done(arguments).fail(arguments),this},catch:function(e){return i.then(null,e)},pipe:function(){var e=arguments;return E.Deferred((function(n){E.each(t,(function(t,r){var i=y(e[r[4]])&&e[r[4]];o[r[1]]((function(){var e=i&&i.apply(this,arguments);e&&y(e.promise)?e.promise().progress(n.notify).done(n.resolve).fail(n.reject):n[r[0]+"With"](this,i?[e]:arguments)}))})),e=null})).promise()},then:function(e,n,i){var o=0;function s(e,t,n,i){return function(){var a=this,u=arguments,c=function(){var r,c;if(!(e=o&&(n!==K&&(a=void 0,u=[r]),t.rejectWith(a,u))}};e?l():(E.Deferred.getErrorHook?l.error=E.Deferred.getErrorHook():E.Deferred.getStackHook&&(l.error=E.Deferred.getStackHook()),r.setTimeout(l))}}return E.Deferred((function(r){t[0][3].add(s(0,r,y(i)?i:Y,r.notifyWith)),t[1][3].add(s(0,r,y(e)?e:Y)),t[2][3].add(s(0,r,y(n)?n:K))})).promise()},promise:function(e){return null!=e?E.extend(e,i):i}},o={};return E.each(t,(function(e,r){var s=r[2],a=r[5];i[r[1]]=s.add,a&&s.add((function(){n=a}),t[3-e][2].disable,t[3-e][3].disable,t[0][2].lock,t[0][3].lock),s.add(r[3].fire),o[r[0]]=function(){return o[r[0]+"With"](this===o?void 0:this,arguments),this},o[r[0]+"With"]=s.fireWith})),i.promise(o),e&&e.call(o,o),o},when:function(e){var t=arguments.length,n=t,r=Array(n),i=a.call(arguments),o=E.Deferred(),s=function(e){return function(n){r[e]=this,i[e]=arguments.length>1?a.call(arguments):n,--t||o.resolveWith(r,i)}};if(t<=1&&(G(e,o.done(s(n)).resolve,o.reject,!t),"pending"===o.state()||y(i[n]&&i[n].then)))return o.then();for(;n--;)G(i[n],s(n),o.reject);return o.promise()}});var J=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;E.Deferred.exceptionHook=function(e,t){r.console&&r.console.warn&&e&&J.test(e.name)&&r.console.warn("jQuery.Deferred exception: "+e.message,e.stack,t)},E.readyException=function(e){r.setTimeout((function(){throw e}))};var Z=E.Deferred();function Q(){b.removeEventListener("DOMContentLoaded",Q),r.removeEventListener("load",Q),E.ready()}E.fn.ready=function(e){return Z.then(e).catch((function(e){E.readyException(e)})),this},E.extend({isReady:!1,readyWait:1,ready:function(e){(!0===e?--E.readyWait:E.isReady)||(E.isReady=!0,!0!==e&&--E.readyWait>0||Z.resolveWith(b,[E]))}}),E.ready.then=Z.then,"complete"===b.readyState||"loading"!==b.readyState&&!b.documentElement.doScroll?r.setTimeout(E.ready):(b.addEventListener("DOMContentLoaded",Q),r.addEventListener("load",Q));var ee=function(e,t,n,r,i,o,s){var a=0,u=e.length,c=null==n;if("object"===C(n))for(a in i=!0,n)ee(e,t,a,n[a],!0,o,s);else if(void 0!==r&&(i=!0,y(r)||(s=!0),c&&(s?(t.call(e,r),t=null):(c=t,t=function(e,t,n){return c.call(E(e),n)})),t))for(;a1,null,!0)},removeData:function(e){return this.each((function(){ue.remove(this,e)}))}}),E.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=ae.get(e,t),n&&(!r||Array.isArray(n)?r=ae.access(e,t,E.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=E.queue(e,t),r=n.length,i=n.shift(),o=E._queueHooks(e,t);"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,(function(){E.dequeue(e,t)}),o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return ae.get(e,n)||ae.access(e,n,{empty:E.Callbacks("once memory").add((function(){ae.remove(e,[t+"queue",n])}))})}}),E.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),arguments.length\x20\t\r\n\f]*)/i,Se=/^$|^module$|\/(?:java|ecma)script/i;xe=b.createDocumentFragment().appendChild(b.createElement("div")),(ke=b.createElement("input")).setAttribute("type","radio"),ke.setAttribute("checked","checked"),ke.setAttribute("name","t"),xe.appendChild(ke),v.checkClone=xe.cloneNode(!0).cloneNode(!0).lastChild.checked,xe.innerHTML="",v.noCloneChecked=!!xe.cloneNode(!0).lastChild.defaultValue,xe.innerHTML="",v.option=!!xe.lastChild;var Ae={thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};function je(e,t){var n;return n=void 0!==e.getElementsByTagName?e.getElementsByTagName(t||"*"):void 0!==e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&S(e,t)?E.merge([e],n):n}function Oe(e,t){for(var n=0,r=e.length;n",""]);var Fe=/<|&#?\w+;/;function Pe(e,t,n,r,i){for(var o,s,a,u,c,l,f=t.createDocumentFragment(),d=[],p=0,h=e.length;p-1)i&&i.push(o);else if(c=ve(o),s=je(f.appendChild(o),"script"),c&&Oe(s),n)for(l=0;o=s[l++];)Se.test(o.type||"")&&n.push(o);return f}var Re=/^([^.]*)(?:\.(.+)|)/;function De(){return!0}function Me(){return!1}function Le(e,t,n,r,i,o){var s,a;if("object"==typeof t){for(a in"string"!=typeof n&&(r=r||n,n=void 0),t)Le(e,a,n,r,t[a],o);return e}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&("string"==typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),!1===i)i=Me;else if(!i)return e;return 1===o&&(s=i,i=function(e){return E().off(e),s.apply(this,arguments)},i.guid=s.guid||(s.guid=E.guid++)),e.each((function(){E.event.add(this,t,i,r,n)}))}function Ne(e,t,n){n?(ae.set(e,t,!1),E.event.add(e,t,{namespace:!1,handler:function(e){var n,r=ae.get(this,t);if(1&e.isTrigger&&this[t]){if(r)(E.event.special[t]||{}).delegateType&&e.stopPropagation();else if(r=a.call(arguments),ae.set(this,t,r),this[t](),n=ae.get(this,t),ae.set(this,t,!1),r!==n)return e.stopImmediatePropagation(),e.preventDefault(),n}else r&&(ae.set(this,t,E.event.trigger(r[0],r.slice(1),this)),e.stopPropagation(),e.isImmediatePropagationStopped=De)}})):void 0===ae.get(e,t)&&E.event.add(e,t,De)}E.event={global:{},add:function(e,t,n,r,i){var o,s,a,u,c,l,f,d,p,h,g,v=ae.get(e);if(oe(e))for(n.handler&&(n=(o=n).handler,i=o.selector),i&&E.find.matchesSelector(ge,i),n.guid||(n.guid=E.guid++),(u=v.events)||(u=v.events=Object.create(null)),(s=v.handle)||(s=v.handle=function(t){return void 0!==E&&E.event.triggered!==t.type?E.event.dispatch.apply(e,arguments):void 0}),c=(t=(t||"").match(X)||[""]).length;c--;)p=g=(a=Re.exec(t[c])||[])[1],h=(a[2]||"").split(".").sort(),p&&(f=E.event.special[p]||{},p=(i?f.delegateType:f.bindType)||p,f=E.event.special[p]||{},l=E.extend({type:p,origType:g,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&E.expr.match.needsContext.test(i),namespace:h.join(".")},o),(d=u[p])||((d=u[p]=[]).delegateCount=0,f.setup&&!1!==f.setup.call(e,r,h,s)||e.addEventListener&&e.addEventListener(p,s)),f.add&&(f.add.call(e,l),l.handler.guid||(l.handler.guid=n.guid)),i?d.splice(d.delegateCount++,0,l):d.push(l),E.event.global[p]=!0)},remove:function(e,t,n,r,i){var o,s,a,u,c,l,f,d,p,h,g,v=ae.hasData(e)&&ae.get(e);if(v&&(u=v.events)){for(c=(t=(t||"").match(X)||[""]).length;c--;)if(p=g=(a=Re.exec(t[c])||[])[1],h=(a[2]||"").split(".").sort(),p){for(f=E.event.special[p]||{},d=u[p=(r?f.delegateType:f.bindType)||p]||[],a=a[2]&&new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),s=o=d.length;o--;)l=d[o],!i&&g!==l.origType||n&&n.guid!==l.guid||a&&!a.test(l.namespace)||r&&r!==l.selector&&("**"!==r||!l.selector)||(d.splice(o,1),l.selector&&d.delegateCount--,f.remove&&f.remove.call(e,l));s&&!d.length&&(f.teardown&&!1!==f.teardown.call(e,h,v.handle)||E.removeEvent(e,p,v.handle),delete u[p])}else for(p in u)E.event.remove(e,p+t[c],n,r,!0);E.isEmptyObject(u)&&ae.remove(e,"handle events")}},dispatch:function(e){var t,n,r,i,o,s,a=new Array(arguments.length),u=E.event.fix(e),c=(ae.get(this,"events")||Object.create(null))[u.type]||[],l=E.event.special[u.type]||{};for(a[0]=u,t=1;t=1))for(;c!==this;c=c.parentNode||this)if(1===c.nodeType&&("click"!==e.type||!0!==c.disabled)){for(o=[],s={},n=0;n-1:E.find(i,this,null,[c]).length),s[i]&&o.push(r);o.length&&a.push({elem:c,handlers:o})}return c=this,u\s*$/g;function Be(e,t){return S(e,"table")&&S(11!==t.nodeType?t:t.firstChild,"tr")&&E(e).children("tbody")[0]||e}function He(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function We(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Ue(e,t){var n,r,i,o,s,a;if(1===t.nodeType){if(ae.hasData(e)&&(a=ae.get(e).events))for(i in ae.remove(t,"handle events"),a)for(n=0,r=a[i].length;n1&&"string"==typeof h&&!v.checkClone&&qe.test(h))return e.each((function(i){var o=e.eq(i);g&&(t[0]=h.call(this,i,o.html())),Ve(o,t,n,r)}));if(d&&(o=(i=Pe(t,e[0].ownerDocument,!1,e,r)).firstChild,1===i.childNodes.length&&(i=o),o||r)){for(a=(s=E.map(je(i,"script"),He)).length;f0&&Oe(s,!u&&je(e,"script")),a},cleanData:function(e){for(var t,n,r,i=E.event.special,o=0;void 0!==(n=e[o]);o++)if(oe(n)){if(t=n[ae.expando]){if(t.events)for(r in t.events)i[r]?E.event.remove(n,r):E.removeEvent(n,r,t.handle);n[ae.expando]=void 0}n[ue.expando]&&(n[ue.expando]=void 0)}}}),E.fn.extend({detach:function(e){return Xe(this,e,!0)},remove:function(e){return Xe(this,e)},text:function(e){return ee(this,(function(e){return void 0===e?E.text(this):this.empty().each((function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=e)}))}),null,e,arguments.length)},append:function(){return Ve(this,arguments,(function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||Be(this,e).appendChild(e)}))},prepend:function(){return Ve(this,arguments,(function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=Be(this,e);t.insertBefore(e,t.firstChild)}}))},before:function(){return Ve(this,arguments,(function(e){this.parentNode&&this.parentNode.insertBefore(e,this)}))},after:function(){return Ve(this,arguments,(function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)}))},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(E.cleanData(je(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map((function(){return E.clone(this,e,t)}))},html:function(e){return ee(this,(function(e){var t=this[0]||{},n=0,r=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!$e.test(e)&&!Ae[(Te.exec(e)||["",""])[1].toLowerCase()]){e=E.htmlPrefilter(e);try{for(;n=0&&(u+=Math.max(0,Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-o-u-a-.5))||0),u+c}function lt(e,t,n){var r=Ge(e),i=(!v.boxSizingReliable()||n)&&"border-box"===E.css(e,"boxSizing",!1,r),o=i,s=Qe(e,t,r),a="offset"+t[0].toUpperCase()+t.slice(1);if(Ye.test(s)){if(!n)return s;s="auto"}return(!v.boxSizingReliable()&&i||!v.reliableTrDimensions()&&S(e,"tr")||"auto"===s||!parseFloat(s)&&"inline"===E.css(e,"display",!1,r))&&e.getClientRects().length&&(i="border-box"===E.css(e,"boxSizing",!1,r),(o=a in e)&&(s=e[a])),(s=parseFloat(s)||0)+ct(e,t,n||(i?"border":"content"),o,r,s)+"px"}function ft(e,t,n,r,i){return new ft.prototype.init(e,t,n,r,i)}E.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Qe(e,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,aspectRatio:!0,borderImageSlice:!0,columnCount:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,scale:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeMiterlimit:!0,strokeOpacity:!0},cssProps:{},style:function(e,t,n,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var i,o,s,a=ie(t),u=Ke.test(t),c=e.style;if(u||(t=it(a)),s=E.cssHooks[t]||E.cssHooks[a],void 0===n)return s&&"get"in s&&void 0!==(i=s.get(e,!1,r))?i:c[t];"string"==(o=typeof n)&&(i=pe.exec(n))&&i[1]&&(n=be(e,t,i),o="number"),null!=n&&n==n&&("number"!==o||u||(n+=i&&i[3]||(E.cssNumber[a]?"":"px")),v.clearCloneStyle||""!==n||0!==t.indexOf("background")||(c[t]="inherit"),s&&"set"in s&&void 0===(n=s.set(e,n,r))||(u?c.setProperty(t,n):c[t]=n))}},css:function(e,t,n,r){var i,o,s,a=ie(t);return Ke.test(t)||(t=it(a)),(s=E.cssHooks[t]||E.cssHooks[a])&&"get"in s&&(i=s.get(e,!0,n)),void 0===i&&(i=Qe(e,t,r)),"normal"===i&&t in at&&(i=at[t]),""===n||n?(o=parseFloat(i),!0===n||isFinite(o)?o||0:i):i}}),E.each(["height","width"],(function(e,t){E.cssHooks[t]={get:function(e,n,r){if(n)return!ot.test(E.css(e,"display"))||e.getClientRects().length&&e.getBoundingClientRect().width?lt(e,t,r):Je(e,st,(function(){return lt(e,t,r)}))},set:function(e,n,r){var i,o=Ge(e),s=!v.scrollboxSize()&&"absolute"===o.position,a=(s||r)&&"border-box"===E.css(e,"boxSizing",!1,o),u=r?ct(e,t,r,a,o):0;return a&&s&&(u-=Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-parseFloat(o[t])-ct(e,t,"border",!1,o)-.5)),u&&(i=pe.exec(n))&&"px"!==(i[3]||"px")&&(e.style[t]=n,n=E.css(e,t)),ut(0,n,u)}}})),E.cssHooks.marginLeft=et(v.reliableMarginLeft,(function(e,t){if(t)return(parseFloat(Qe(e,"marginLeft"))||e.getBoundingClientRect().left-Je(e,{marginLeft:0},(function(){return e.getBoundingClientRect().left})))+"px"})),E.each({margin:"",padding:"",border:"Width"},(function(e,t){E.cssHooks[e+t]={expand:function(n){for(var r=0,i={},o="string"==typeof n?n.split(" "):[n];r<4;r++)i[e+he[r]+t]=o[r]||o[r-2]||o[0];return i}},"margin"!==e&&(E.cssHooks[e+t].set=ut)})),E.fn.extend({css:function(e,t){return ee(this,(function(e,t,n){var r,i,o={},s=0;if(Array.isArray(t)){for(r=Ge(e),i=t.length;s1)}}),E.Tween=ft,ft.prototype={constructor:ft,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||E.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(E.cssNumber[n]?"":"px")},cur:function(){var e=ft.propHooks[this.prop];return e&&e.get?e.get(this):ft.propHooks._default.get(this)},run:function(e){var t,n=ft.propHooks[this.prop];return this.options.duration?this.pos=t=E.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):ft.propHooks._default.set(this),this}},ft.prototype.init.prototype=ft.prototype,ft.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=E.css(e.elem,e.prop,""))&&"auto"!==t?t:0},set:function(e){E.fx.step[e.prop]?E.fx.step[e.prop](e):1!==e.elem.nodeType||!E.cssHooks[e.prop]&&null==e.elem.style[it(e.prop)]?e.elem[e.prop]=e.now:E.style(e.elem,e.prop,e.now+e.unit)}}},ft.propHooks.scrollTop=ft.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},E.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},E.fx=ft.prototype.init,E.fx.step={};var dt,pt,ht=/^(?:toggle|show|hide)$/,gt=/queueHooks$/;function vt(){pt&&(!1===b.hidden&&r.requestAnimationFrame?r.requestAnimationFrame(vt):r.setTimeout(vt,E.fx.interval),E.fx.tick())}function yt(){return r.setTimeout((function(){dt=void 0})),dt=Date.now()}function mt(e,t){var n,r=0,i={height:e};for(t=t?1:0;r<4;r+=2-t)i["margin"+(n=he[r])]=i["padding"+n]=e;return t&&(i.opacity=i.width=e),i}function bt(e,t,n){for(var r,i=(_t.tweeners[t]||[]).concat(_t.tweeners["*"]),o=0,s=i.length;o1)},removeAttr:function(e){return this.each((function(){E.removeAttr(this,e)}))}}),E.extend({attr:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return void 0===e.getAttribute?E.prop(e,t,n):(1===o&&E.isXMLDoc(e)||(i=E.attrHooks[t.toLowerCase()]||(E.expr.match.bool.test(t)?wt:void 0)),void 0!==n?null===n?void E.removeAttr(e,t):i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:(e.setAttribute(t,n+""),n):i&&"get"in i&&null!==(r=i.get(e,t))?r:null==(r=E.find.attr(e,t))?void 0:r)},attrHooks:{type:{set:function(e,t){if(!v.radioValue&&"radio"===t&&S(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,r=0,i=t&&t.match(X);if(i&&1===e.nodeType)for(;n=i[r++];)e.removeAttribute(n)}}),wt={set:function(e,t,n){return!1===t?E.removeAttr(e,n):e.setAttribute(n,n),n}},E.each(E.expr.match.bool.source.match(/\w+/g),(function(e,t){var n=Ct[t]||E.find.attr;Ct[t]=function(e,t,r){var i,o,s=t.toLowerCase();return r||(o=Ct[s],Ct[s]=i,i=null!=n(e,t,r)?s:null,Ct[s]=o),i}}));var xt=/^(?:input|select|textarea|button)$/i,kt=/^(?:a|area)$/i;function Et(e){return(e.match(X)||[]).join(" ")}function Tt(e){return e.getAttribute&&e.getAttribute("class")||""}function St(e){return Array.isArray(e)?e:"string"==typeof e&&e.match(X)||[]}E.fn.extend({prop:function(e,t){return ee(this,E.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each((function(){delete this[E.propFix[e]||e]}))}}),E.extend({prop:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&E.isXMLDoc(e)||(t=E.propFix[t]||t,i=E.propHooks[t]),void 0!==n?i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:e[t]=n:i&&"get"in i&&null!==(r=i.get(e,t))?r:e[t]},propHooks:{tabIndex:{get:function(e){var t=E.find.attr(e,"tabindex");return t?parseInt(t,10):xt.test(e.nodeName)||kt.test(e.nodeName)&&e.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),v.optSelected||(E.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),E.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],(function(){E.propFix[this.toLowerCase()]=this})),E.fn.extend({addClass:function(e){var t,n,r,i,o,s;return y(e)?this.each((function(t){E(this).addClass(e.call(this,t,Tt(this)))})):(t=St(e)).length?this.each((function(){if(r=Tt(this),n=1===this.nodeType&&" "+Et(r)+" "){for(o=0;o-1;)n=n.replace(" "+i+" "," ");s=Et(n),r!==s&&this.setAttribute("class",s)}})):this:this.attr("class","")},toggleClass:function(e,t){var n,r,i,o,s=typeof e,a="string"===s||Array.isArray(e);return y(e)?this.each((function(n){E(this).toggleClass(e.call(this,n,Tt(this),t),t)})):"boolean"==typeof t&&a?t?this.addClass(e):this.removeClass(e):(n=St(e),this.each((function(){if(a)for(o=E(this),i=0;i-1)return!0;return!1}});var At=/\r/g;E.fn.extend({val:function(e){var t,n,r,i=this[0];return arguments.length?(r=y(e),this.each((function(n){var i;1===this.nodeType&&(null==(i=r?e.call(this,n,E(this).val()):e)?i="":"number"==typeof i?i+="":Array.isArray(i)&&(i=E.map(i,(function(e){return null==e?"":e+""}))),(t=E.valHooks[this.type]||E.valHooks[this.nodeName.toLowerCase()])&&"set"in t&&void 0!==t.set(this,i,"value")||(this.value=i))}))):i?(t=E.valHooks[i.type]||E.valHooks[i.nodeName.toLowerCase()])&&"get"in t&&void 0!==(n=t.get(i,"value"))?n:"string"==typeof(n=i.value)?n.replace(At,""):null==n?"":n:void 0}}),E.extend({valHooks:{option:{get:function(e){var t=E.find.attr(e,"value");return null!=t?t:Et(E.text(e))}},select:{get:function(e){var t,n,r,i=e.options,o=e.selectedIndex,s="select-one"===e.type,a=s?null:[],u=s?o+1:i.length;for(r=o<0?u:s?o:0;r-1)&&(n=!0);return n||(e.selectedIndex=-1),o}}}}),E.each(["radio","checkbox"],(function(){E.valHooks[this]={set:function(e,t){if(Array.isArray(t))return e.checked=E.inArray(E(e).val(),t)>-1}},v.checkOn||(E.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})}));var jt=r.location,Ot={guid:Date.now()},Ft=/\?/;E.parseXML=function(e){var t,n;if(!e||"string"!=typeof e)return null;try{t=(new r.DOMParser).parseFromString(e,"text/xml")}catch(e){}return n=t&&t.getElementsByTagName("parsererror")[0],t&&!n||E.error("Invalid XML: "+(n?E.map(n.childNodes,(function(e){return e.textContent})).join("\n"):e)),t};var Pt=/^(?:focusinfocus|focusoutblur)$/,Rt=function(e){e.stopPropagation()};E.extend(E.event,{trigger:function(e,t,n,i){var o,s,a,u,c,l,f,d,h=[n||b],g=p.call(e,"type")?e.type:e,v=p.call(e,"namespace")?e.namespace.split("."):[];if(s=d=a=n=n||b,3!==n.nodeType&&8!==n.nodeType&&!Pt.test(g+E.event.triggered)&&(g.indexOf(".")>-1&&(v=g.split("."),g=v.shift(),v.sort()),c=g.indexOf(":")<0&&"on"+g,(e=e[E.expando]?e:new E.Event(g,"object"==typeof e&&e)).isTrigger=i?2:3,e.namespace=v.join("."),e.rnamespace=e.namespace?new RegExp("(^|\\.)"+v.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=void 0,e.target||(e.target=n),t=null==t?[e]:E.makeArray(t,[e]),f=E.event.special[g]||{},i||!f.trigger||!1!==f.trigger.apply(n,t))){if(!i&&!f.noBubble&&!m(n)){for(u=f.delegateType||g,Pt.test(u+g)||(s=s.parentNode);s;s=s.parentNode)h.push(s),a=s;a===(n.ownerDocument||b)&&h.push(a.defaultView||a.parentWindow||r)}for(o=0;(s=h[o++])&&!e.isPropagationStopped();)d=s,e.type=o>1?u:f.bindType||g,(l=(ae.get(s,"events")||Object.create(null))[e.type]&&ae.get(s,"handle"))&&l.apply(s,t),(l=c&&s[c])&&l.apply&&oe(s)&&(e.result=l.apply(s,t),!1===e.result&&e.preventDefault());return e.type=g,i||e.isDefaultPrevented()||f._default&&!1!==f._default.apply(h.pop(),t)||!oe(n)||c&&y(n[g])&&!m(n)&&((a=n[c])&&(n[c]=null),E.event.triggered=g,e.isPropagationStopped()&&d.addEventListener(g,Rt),n[g](),e.isPropagationStopped()&&d.removeEventListener(g,Rt),E.event.triggered=void 0,a&&(n[c]=a)),e.result}},simulate:function(e,t,n){var r=E.extend(new E.Event,n,{type:e,isSimulated:!0});E.event.trigger(r,null,t)}}),E.fn.extend({trigger:function(e,t){return this.each((function(){E.event.trigger(e,t,this)}))},triggerHandler:function(e,t){var n=this[0];if(n)return E.event.trigger(e,t,n,!0)}});var Dt=/\[\]$/,Mt=/\r?\n/g,Lt=/^(?:submit|button|image|reset|file)$/i,Nt=/^(?:input|select|textarea|keygen)/i;function $t(e,t,n,r){var i;if(Array.isArray(t))E.each(t,(function(t,i){n||Dt.test(e)?r(e,i):$t(e+"["+("object"==typeof i&&null!=i?t:"")+"]",i,n,r)}));else if(n||"object"!==C(t))r(e,t);else for(i in t)$t(e+"["+i+"]",t[i],n,r)}E.param=function(e,t){var n,r=[],i=function(e,t){var n=y(t)?t():t;r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==n?"":n)};if(null==e)return"";if(Array.isArray(e)||e.jquery&&!E.isPlainObject(e))E.each(e,(function(){i(this.name,this.value)}));else for(n in e)$t(n,e[n],t,i);return r.join("&")},E.fn.extend({serialize:function(){return E.param(this.serializeArray())},serializeArray:function(){return this.map((function(){var e=E.prop(this,"elements");return e?E.makeArray(e):this})).filter((function(){var e=this.type;return this.name&&!E(this).is(":disabled")&&Nt.test(this.nodeName)&&!Lt.test(e)&&(this.checked||!Ee.test(e))})).map((function(e,t){var n=E(this).val();return null==n?null:Array.isArray(n)?E.map(n,(function(e){return{name:t.name,value:e.replace(Mt,"\r\n")}})):{name:t.name,value:n.replace(Mt,"\r\n")}})).get()}});var qt=/%20/g,It=/#.*$/,Bt=/([?&])_=[^&]*/,Ht=/^(.*?):[ \t]*([^\r\n]*)$/gm,Wt=/^(?:GET|HEAD)$/,Ut=/^\/\//,zt={},Vt={},Xt="*/".concat("*"),Yt=b.createElement("a");function Kt(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var r,i=0,o=t.toLowerCase().match(X)||[];if(y(n))for(;r=o[i++];)"+"===r[0]?(r=r.slice(1)||"*",(e[r]=e[r]||[]).unshift(n)):(e[r]=e[r]||[]).push(n)}}function Gt(e,t,n,r){var i={},o=e===Vt;function s(a){var u;return i[a]=!0,E.each(e[a]||[],(function(e,a){var c=a(t,n,r);return"string"!=typeof c||o||i[c]?o?!(u=c):void 0:(t.dataTypes.unshift(c),s(c),!1)})),u}return s(t.dataTypes[0])||!i["*"]&&s("*")}function Jt(e,t){var n,r,i=E.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((i[n]?e:r||(r={}))[n]=t[n]);return r&&E.extend(!0,e,r),e}Yt.href=jt.href,E.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:jt.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(jt.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Xt,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":E.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?Jt(Jt(e,E.ajaxSettings),t):Jt(E.ajaxSettings,e)},ajaxPrefilter:Kt(zt),ajaxTransport:Kt(Vt),ajax:function(e,t){"object"==typeof e&&(t=e,e=void 0),t=t||{};var n,i,o,s,a,u,c,l,f,d,p=E.ajaxSetup({},t),h=p.context||p,g=p.context&&(h.nodeType||h.jquery)?E(h):E.event,v=E.Deferred(),y=E.Callbacks("once memory"),m=p.statusCode||{},_={},w={},C="canceled",x={readyState:0,getResponseHeader:function(e){var t;if(c){if(!s)for(s={};t=Ht.exec(o);)s[t[1].toLowerCase()+" "]=(s[t[1].toLowerCase()+" "]||[]).concat(t[2]);t=s[e.toLowerCase()+" "]}return null==t?null:t.join(", ")},getAllResponseHeaders:function(){return c?o:null},setRequestHeader:function(e,t){return null==c&&(e=w[e.toLowerCase()]=w[e.toLowerCase()]||e,_[e]=t),this},overrideMimeType:function(e){return null==c&&(p.mimeType=e),this},statusCode:function(e){var t;if(e)if(c)x.always(e[x.status]);else for(t in e)m[t]=[m[t],e[t]];return this},abort:function(e){var t=e||C;return n&&n.abort(t),k(0,t),this}};if(v.promise(x),p.url=((e||p.url||jt.href)+"").replace(Ut,jt.protocol+"//"),p.type=t.method||t.type||p.method||p.type,p.dataTypes=(p.dataType||"*").toLowerCase().match(X)||[""],null==p.crossDomain){u=b.createElement("a");try{u.href=p.url,u.href=u.href,p.crossDomain=Yt.protocol+"//"+Yt.host!=u.protocol+"//"+u.host}catch(e){p.crossDomain=!0}}if(p.data&&p.processData&&"string"!=typeof p.data&&(p.data=E.param(p.data,p.traditional)),Gt(zt,p,t,x),c)return x;for(f in(l=E.event&&p.global)&&0==E.active++&&E.event.trigger("ajaxStart"),p.type=p.type.toUpperCase(),p.hasContent=!Wt.test(p.type),i=p.url.replace(It,""),p.hasContent?p.data&&p.processData&&0===(p.contentType||"").indexOf("application/x-www-form-urlencoded")&&(p.data=p.data.replace(qt,"+")):(d=p.url.slice(i.length),p.data&&(p.processData||"string"==typeof p.data)&&(i+=(Ft.test(i)?"&":"?")+p.data,delete p.data),!1===p.cache&&(i=i.replace(Bt,"$1"),d=(Ft.test(i)?"&":"?")+"_="+Ot.guid+++d),p.url=i+d),p.ifModified&&(E.lastModified[i]&&x.setRequestHeader("If-Modified-Since",E.lastModified[i]),E.etag[i]&&x.setRequestHeader("If-None-Match",E.etag[i])),(p.data&&p.hasContent&&!1!==p.contentType||t.contentType)&&x.setRequestHeader("Content-Type",p.contentType),x.setRequestHeader("Accept",p.dataTypes[0]&&p.accepts[p.dataTypes[0]]?p.accepts[p.dataTypes[0]]+("*"!==p.dataTypes[0]?", "+Xt+"; q=0.01":""):p.accepts["*"]),p.headers)x.setRequestHeader(f,p.headers[f]);if(p.beforeSend&&(!1===p.beforeSend.call(h,x,p)||c))return x.abort();if(C="abort",y.add(p.complete),x.done(p.success),x.fail(p.error),n=Gt(Vt,p,t,x)){if(x.readyState=1,l&&g.trigger("ajaxSend",[x,p]),c)return x;p.async&&p.timeout>0&&(a=r.setTimeout((function(){x.abort("timeout")}),p.timeout));try{c=!1,n.send(_,k)}catch(e){if(c)throw e;k(-1,e)}}else k(-1,"No Transport");function k(e,t,s,u){var f,d,b,_,w,C=t;c||(c=!0,a&&r.clearTimeout(a),n=void 0,o=u||"",x.readyState=e>0?4:0,f=e>=200&&e<300||304===e,s&&(_=function(e,t,n){for(var r,i,o,s,a=e.contents,u=e.dataTypes;"*"===u[0];)u.shift(),void 0===r&&(r=e.mimeType||t.getResponseHeader("Content-Type"));if(r)for(i in a)if(a[i]&&a[i].test(r)){u.unshift(i);break}if(u[0]in n)o=u[0];else{for(i in n){if(!u[0]||e.converters[i+" "+u[0]]){o=i;break}s||(s=i)}o=o||s}if(o)return o!==u[0]&&u.unshift(o),n[o]}(p,x,s)),!f&&E.inArray("script",p.dataTypes)>-1&&E.inArray("json",p.dataTypes)<0&&(p.converters["text script"]=function(){}),_=function(e,t,n,r){var i,o,s,a,u,c={},l=e.dataTypes.slice();if(l[1])for(s in e.converters)c[s.toLowerCase()]=e.converters[s];for(o=l.shift();o;)if(e.responseFields[o]&&(n[e.responseFields[o]]=t),!u&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),u=o,o=l.shift())if("*"===o)o=u;else if("*"!==u&&u!==o){if(!(s=c[u+" "+o]||c["* "+o]))for(i in c)if((a=i.split(" "))[1]===o&&(s=c[u+" "+a[0]]||c["* "+a[0]])){!0===s?s=c[i]:!0!==c[i]&&(o=a[0],l.unshift(a[1]));break}if(!0!==s)if(s&&e.throws)t=s(t);else try{t=s(t)}catch(e){return{state:"parsererror",error:s?e:"No conversion from "+u+" to "+o}}}return{state:"success",data:t}}(p,_,x,f),f?(p.ifModified&&((w=x.getResponseHeader("Last-Modified"))&&(E.lastModified[i]=w),(w=x.getResponseHeader("etag"))&&(E.etag[i]=w)),204===e||"HEAD"===p.type?C="nocontent":304===e?C="notmodified":(C=_.state,d=_.data,f=!(b=_.error))):(b=C,!e&&C||(C="error",e<0&&(e=0))),x.status=e,x.statusText=(t||C)+"",f?v.resolveWith(h,[d,C,x]):v.rejectWith(h,[x,C,b]),x.statusCode(m),m=void 0,l&&g.trigger(f?"ajaxSuccess":"ajaxError",[x,p,f?d:b]),y.fireWith(h,[x,C]),l&&(g.trigger("ajaxComplete",[x,p]),--E.active||E.event.trigger("ajaxStop")))}return x},getJSON:function(e,t,n){return E.get(e,t,n,"json")},getScript:function(e,t){return E.get(e,void 0,t,"script")}}),E.each(["get","post"],(function(e,t){E[t]=function(e,n,r,i){return y(n)&&(i=i||r,r=n,n=void 0),E.ajax(E.extend({url:e,type:t,dataType:i,data:n,success:r},E.isPlainObject(e)&&e))}})),E.ajaxPrefilter((function(e){var t;for(t in e.headers)"content-type"===t.toLowerCase()&&(e.contentType=e.headers[t]||"")})),E._evalUrl=function(e,t,n){return E.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(e){E.globalEval(e,t,n)}})},E.fn.extend({wrapAll:function(e){var t;return this[0]&&(y(e)&&(e=e.call(this[0])),t=E(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map((function(){for(var e=this;e.firstElementChild;)e=e.firstElementChild;return e})).append(this)),this},wrapInner:function(e){return y(e)?this.each((function(t){E(this).wrapInner(e.call(this,t))})):this.each((function(){var t=E(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)}))},wrap:function(e){var t=y(e);return this.each((function(n){E(this).wrapAll(t?e.call(this,n):e)}))},unwrap:function(e){return this.parent(e).not("body").each((function(){E(this).replaceWith(this.childNodes)})),this}}),E.expr.pseudos.hidden=function(e){return!E.expr.pseudos.visible(e)},E.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},E.ajaxSettings.xhr=function(){try{return new r.XMLHttpRequest}catch(e){}};var Zt={0:200,1223:204},Qt=E.ajaxSettings.xhr();v.cors=!!Qt&&"withCredentials"in Qt,v.ajax=Qt=!!Qt,E.ajaxTransport((function(e){var t,n;if(v.cors||Qt&&!e.crossDomain)return{send:function(i,o){var s,a=e.xhr();if(a.open(e.type,e.url,e.async,e.username,e.password),e.xhrFields)for(s in e.xhrFields)a[s]=e.xhrFields[s];for(s in e.mimeType&&a.overrideMimeType&&a.overrideMimeType(e.mimeType),e.crossDomain||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest"),i)a.setRequestHeader(s,i[s]);t=function(e){return function(){t&&(t=n=a.onload=a.onerror=a.onabort=a.ontimeout=a.onreadystatechange=null,"abort"===e?a.abort():"error"===e?"number"!=typeof a.status?o(0,"error"):o(a.status,a.statusText):o(Zt[a.status]||a.status,a.statusText,"text"!==(a.responseType||"text")||"string"!=typeof a.responseText?{binary:a.response}:{text:a.responseText},a.getAllResponseHeaders()))}},a.onload=t(),n=a.onerror=a.ontimeout=t("error"),void 0!==a.onabort?a.onabort=n:a.onreadystatechange=function(){4===a.readyState&&r.setTimeout((function(){t&&n()}))},t=t("abort");try{a.send(e.hasContent&&e.data||null)}catch(e){if(t)throw e}},abort:function(){t&&t()}}})),E.ajaxPrefilter((function(e){e.crossDomain&&(e.contents.script=!1)})),E.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return E.globalEval(e),e}}}),E.ajaxPrefilter("script",(function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")})),E.ajaxTransport("script",(function(e){var t,n;if(e.crossDomain||e.scriptAttrs)return{send:function(r,i){t=E(" diff --git a/webpack.config.js b/webpack.config.js index 28932de..df9ddbd 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -18,6 +18,9 @@ module.exports = { } ] }, + externals: { + "jquery": "$" + }, output: { path: path.resolve(__dirname, './public', 'assets'), filename: "bundle.js" // <--- Will be compiled to this single file -- 2.25.1 From 22d96bcff1fc434e1dcd69ad451f80f44b0d70b0 Mon Sep 17 00:00:00 2001 From: xangelo Date: Thu, 13 Jul 2023 07:32:51 -0400 Subject: [PATCH 4/7] feat: allow users to log out There's a settings page that lets users log out. It displays additional warnings/prompts if they haven't signed in to this user with a username/email address yet. --- public/assets/bundle.js | 2 +- public/assets/css/game.css | 14 ++++++++++++-- public/index.html | 16 +++++++++++++++- src/client/index.ts | 35 +++++++++++++++++++++++++++++++++-- src/server/api.ts | 5 +++++ 5 files changed, 66 insertions(+), 6 deletions(-) diff --git a/public/assets/bundle.js b/public/assets/bundle.js index b7d2358..b2a5847 100644 --- a/public/assets/bundle.js +++ b/public/assets/bundle.js @@ -1,2 +1,2 @@ /*! For license information please see bundle.js.LICENSE.txt */ -(()=>{var t={4802:(t,e,n)=>{e.formatArgs=function(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+t.exports.humanize(this.diff),!this.useColors)return;const n="color: "+this.color;e.splice(1,0,n,"color: inherit");let r=0,i=0;e[0].replace(/%[a-zA-Z%]/g,(t=>{"%%"!==t&&(r++,"%c"===t&&(i=r))})),e.splice(i,0,n)},e.save=function(t){try{t?e.storage.setItem("debug",t):e.storage.removeItem("debug")}catch(t){}},e.load=function(){let t;try{t=e.storage.getItem("debug")}catch(t){}return!t&&"undefined"!=typeof process&&"env"in process&&(t=process.env.DEBUG),t},e.useColors=function(){return!("undefined"==typeof window||!window.process||"renderer"!==window.process.type&&!window.process.__nwjs)||("undefined"==typeof navigator||!navigator.userAgent||!navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))&&("undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))},e.storage=function(){try{return localStorage}catch(t){}}(),e.destroy=(()=>{let t=!1;return()=>{t||(t=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),e.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],e.log=console.debug||console.log||(()=>{}),t.exports=n(804)(e);const{formatters:r}=t.exports;r.j=function(t){try{return JSON.stringify(t)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}},804:(t,e,n)=>{t.exports=function(t){function e(t){let n,i,o,s=null;function a(...t){if(!a.enabled)return;const r=a,i=Number(new Date),o=i-(n||i);r.diff=o,r.prev=n,r.curr=i,n=i,t[0]=e.coerce(t[0]),"string"!=typeof t[0]&&t.unshift("%O");let s=0;t[0]=t[0].replace(/%([a-zA-Z%])/g,((n,i)=>{if("%%"===n)return"%";s++;const o=e.formatters[i];if("function"==typeof o){const e=t[s];n=o.call(r,e),t.splice(s,1),s--}return n})),e.formatArgs.call(r,t),(r.log||e.log).apply(r,t)}return a.namespace=t,a.useColors=e.useColors(),a.color=e.selectColor(t),a.extend=r,a.destroy=e.destroy,Object.defineProperty(a,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==s?s:(i!==e.namespaces&&(i=e.namespaces,o=e.enabled(t)),o),set:t=>{s=t}}),"function"==typeof e.init&&e.init(a),a}function r(t,n){const r=e(this.namespace+(void 0===n?":":n)+t);return r.log=this.log,r}function i(t){return t.toString().substring(2,t.toString().length-2).replace(/\.\*\?$/,"*")}return e.debug=e,e.default=e,e.coerce=function(t){return t instanceof Error?t.stack||t.message:t},e.disable=function(){const t=[...e.names.map(i),...e.skips.map(i).map((t=>"-"+t))].join(",");return e.enable(""),t},e.enable=function(t){let n;e.save(t),e.namespaces=t,e.names=[],e.skips=[];const r=("string"==typeof t?t:"").split(/[\s,]+/),i=r.length;for(n=0;n{e[n]=t[n]})),e.names=[],e.skips=[],e.formatters={},e.selectColor=function(t){let n=0;for(let e=0;e{var e=1e3,n=60*e,r=60*n,i=24*r;function o(t,e,n,r){var i=e>=1.5*n;return Math.round(t/n)+" "+r+(i?"s":"")}t.exports=function(t,s){s=s||{};var a,u,c=typeof t;if("string"===c&&t.length>0)return function(t){if(!((t=String(t)).length>100)){var o=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(t);if(o){var s=parseFloat(o[1]);switch((o[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*s;case"weeks":case"week":case"w":return 6048e5*s;case"days":case"day":case"d":return s*i;case"hours":case"hour":case"hrs":case"hr":case"h":return s*r;case"minutes":case"minute":case"mins":case"min":case"m":return s*n;case"seconds":case"second":case"secs":case"sec":case"s":return s*e;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return s;default:return}}}}(t);if("number"===c&&isFinite(t))return s.long?(a=t,(u=Math.abs(a))>=i?o(a,u,i,"day"):u>=r?o(a,u,r,"hour"):u>=n?o(a,u,n,"minute"):u>=e?o(a,u,e,"second"):a+" ms"):function(t){var o=Math.abs(t);return o>=i?Math.round(t/i)+"d":o>=r?Math.round(t/r)+"h":o>=n?Math.round(t/n)+"m":o>=e?Math.round(t/e)+"s":t+"ms"}(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))}},6486:function(t,e,n){var r;t=n.nmd(t),function(){var i,o="Expected a function",s="__lodash_hash_undefined__",a="__lodash_placeholder__",u=32,c=128,l=1/0,f=9007199254740991,h=NaN,d=4294967295,p=[["ary",c],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",u],["partialRight",64],["rearg",256]],g="[object Arguments]",v="[object Array]",y="[object Boolean]",m="[object Date]",_="[object Error]",b="[object Function]",C="[object GeneratorFunction]",w="[object Map]",k="[object Number]",E="[object Object]",A="[object Promise]",S="[object RegExp]",x="[object Set]",O="[object String]",F="[object Symbol]",T="[object WeakMap]",j="[object ArrayBuffer]",P="[object DataView]",R="[object Float32Array]",$="[object Float64Array]",M="[object Int8Array]",L="[object Int16Array]",N="[object Int32Array]",D="[object Uint8Array]",I="[object Uint8ClampedArray]",B="[object Uint16Array]",q="[object Uint32Array]",U=/\b__p \+= '';/g,H=/\b(__p \+=) '' \+/g,W=/(__e\(.*?\)|\b__t\)) \+\n'';/g,z=/&(?:amp|lt|gt|quot|#39);/g,V=/[&<>"']/g,K=RegExp(z.source),Y=RegExp(V.source),G=/<%-([\s\S]+?)%>/g,J=/<%([\s\S]+?)%>/g,X=/<%=([\s\S]+?)%>/g,Z=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Q=/^\w*$/,tt=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,et=/[\\^$.*+?()[\]{}|]/g,nt=RegExp(et.source),rt=/^\s+/,it=/\s/,ot=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,st=/\{\n\/\* \[wrapped with (.+)\] \*/,at=/,? & /,ut=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,ct=/[()=,{}\[\]\/\s]/,lt=/\\(\\)?/g,ft=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,ht=/\w*$/,dt=/^[-+]0x[0-9a-f]+$/i,pt=/^0b[01]+$/i,gt=/^\[object .+?Constructor\]$/,vt=/^0o[0-7]+$/i,yt=/^(?:0|[1-9]\d*)$/,mt=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,_t=/($^)/,bt=/['\n\r\u2028\u2029\\]/g,Ct="\\ud800-\\udfff",wt="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",kt="\\u2700-\\u27bf",Et="a-z\\xdf-\\xf6\\xf8-\\xff",At="A-Z\\xc0-\\xd6\\xd8-\\xde",St="\\ufe0e\\ufe0f",xt="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\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",Ot="["+Ct+"]",Ft="["+xt+"]",Tt="["+wt+"]",jt="\\d+",Pt="["+kt+"]",Rt="["+Et+"]",$t="[^"+Ct+xt+jt+kt+Et+At+"]",Mt="\\ud83c[\\udffb-\\udfff]",Lt="[^"+Ct+"]",Nt="(?:\\ud83c[\\udde6-\\uddff]){2}",Dt="[\\ud800-\\udbff][\\udc00-\\udfff]",It="["+At+"]",Bt="\\u200d",qt="(?:"+Rt+"|"+$t+")",Ut="(?:"+It+"|"+$t+")",Ht="(?:['’](?:d|ll|m|re|s|t|ve))?",Wt="(?:['’](?:D|LL|M|RE|S|T|VE))?",zt="(?:"+Tt+"|"+Mt+")?",Vt="["+St+"]?",Kt=Vt+zt+"(?:"+Bt+"(?:"+[Lt,Nt,Dt].join("|")+")"+Vt+zt+")*",Yt="(?:"+[Pt,Nt,Dt].join("|")+")"+Kt,Gt="(?:"+[Lt+Tt+"?",Tt,Nt,Dt,Ot].join("|")+")",Jt=RegExp("['’]","g"),Xt=RegExp(Tt,"g"),Zt=RegExp(Mt+"(?="+Mt+")|"+Gt+Kt,"g"),Qt=RegExp([It+"?"+Rt+"+"+Ht+"(?="+[Ft,It,"$"].join("|")+")",Ut+"+"+Wt+"(?="+[Ft,It+qt,"$"].join("|")+")",It+"?"+qt+"+"+Ht,It+"+"+Wt,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",jt,Yt].join("|"),"g"),te=RegExp("["+Bt+Ct+wt+St+"]"),ee=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,ne=["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"],re=-1,ie={};ie[R]=ie[$]=ie[M]=ie[L]=ie[N]=ie[D]=ie[I]=ie[B]=ie[q]=!0,ie[g]=ie[v]=ie[j]=ie[y]=ie[P]=ie[m]=ie[_]=ie[b]=ie[w]=ie[k]=ie[E]=ie[S]=ie[x]=ie[O]=ie[T]=!1;var oe={};oe[g]=oe[v]=oe[j]=oe[P]=oe[y]=oe[m]=oe[R]=oe[$]=oe[M]=oe[L]=oe[N]=oe[w]=oe[k]=oe[E]=oe[S]=oe[x]=oe[O]=oe[F]=oe[D]=oe[I]=oe[B]=oe[q]=!0,oe[_]=oe[b]=oe[T]=!1;var se={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},ae=parseFloat,ue=parseInt,ce="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,le="object"==typeof self&&self&&self.Object===Object&&self,fe=ce||le||Function("return this")(),he=e&&!e.nodeType&&e,de=he&&t&&!t.nodeType&&t,pe=de&&de.exports===he,ge=pe&&ce.process,ve=function(){try{return de&&de.require&&de.require("util").types||ge&&ge.binding&&ge.binding("util")}catch(t){}}(),ye=ve&&ve.isArrayBuffer,me=ve&&ve.isDate,_e=ve&&ve.isMap,be=ve&&ve.isRegExp,Ce=ve&&ve.isSet,we=ve&&ve.isTypedArray;function ke(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}function Ee(t,e,n,r){for(var i=-1,o=null==t?0:t.length;++i-1}function Te(t,e,n){for(var r=-1,i=null==t?0:t.length;++r-1;);return n}function Qe(t,e){for(var n=t.length;n--&&Ie(e,t[n],0)>-1;);return n}var tn=We({À:"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"}),en=We({"&":"&","<":"<",">":">",'"':""","'":"'"});function nn(t){return"\\"+se[t]}function rn(t){return te.test(t)}function on(t){var e=-1,n=Array(t.size);return t.forEach((function(t,r){n[++e]=[r,t]})),n}function sn(t,e){return function(n){return t(e(n))}}function an(t,e){for(var n=-1,r=t.length,i=0,o=[];++n",""":'"',"'":"'"}),pn=function t(e){var n,r=(e=null==e?fe:pn.defaults(fe.Object(),e,pn.pick(fe,ne))).Array,it=e.Date,Ct=e.Error,wt=e.Function,kt=e.Math,Et=e.Object,At=e.RegExp,St=e.String,xt=e.TypeError,Ot=r.prototype,Ft=wt.prototype,Tt=Et.prototype,jt=e["__core-js_shared__"],Pt=Ft.toString,Rt=Tt.hasOwnProperty,$t=0,Mt=(n=/[^.]+$/.exec(jt&&jt.keys&&jt.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"",Lt=Tt.toString,Nt=Pt.call(Et),Dt=fe._,It=At("^"+Pt.call(Rt).replace(et,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Bt=pe?e.Buffer:i,qt=e.Symbol,Ut=e.Uint8Array,Ht=Bt?Bt.allocUnsafe:i,Wt=sn(Et.getPrototypeOf,Et),zt=Et.create,Vt=Tt.propertyIsEnumerable,Kt=Ot.splice,Yt=qt?qt.isConcatSpreadable:i,Gt=qt?qt.iterator:i,Zt=qt?qt.toStringTag:i,te=function(){try{var t=uo(Et,"defineProperty");return t({},"",{}),t}catch(t){}}(),se=e.clearTimeout!==fe.clearTimeout&&e.clearTimeout,ce=it&&it.now!==fe.Date.now&&it.now,le=e.setTimeout!==fe.setTimeout&&e.setTimeout,he=kt.ceil,de=kt.floor,ge=Et.getOwnPropertySymbols,ve=Bt?Bt.isBuffer:i,Le=e.isFinite,We=Ot.join,gn=sn(Et.keys,Et),vn=kt.max,yn=kt.min,mn=it.now,_n=e.parseInt,bn=kt.random,Cn=Ot.reverse,wn=uo(e,"DataView"),kn=uo(e,"Map"),En=uo(e,"Promise"),An=uo(e,"Set"),Sn=uo(e,"WeakMap"),xn=uo(Et,"create"),On=Sn&&new Sn,Fn={},Tn=No(wn),jn=No(kn),Pn=No(En),Rn=No(An),$n=No(Sn),Mn=qt?qt.prototype:i,Ln=Mn?Mn.valueOf:i,Nn=Mn?Mn.toString:i;function Dn(t){if(ta(t)&&!Hs(t)&&!(t instanceof Un)){if(t instanceof qn)return t;if(Rt.call(t,"__wrapped__"))return Do(t)}return new qn(t)}var In=function(){function t(){}return function(e){if(!Qs(e))return{};if(zt)return zt(e);t.prototype=e;var n=new t;return t.prototype=i,n}}();function Bn(){}function qn(t,e){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!e,this.__index__=0,this.__values__=i}function Un(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=d,this.__views__=[]}function Hn(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e=e?t:e)),t}function sr(t,e,n,r,o,s){var a,u=1&e,c=2&e,l=4&e;if(n&&(a=o?n(t,r,o,s):n(t)),a!==i)return a;if(!Qs(t))return t;var f=Hs(t);if(f){if(a=function(t){var e=t.length,n=new t.constructor(e);return e&&"string"==typeof t[0]&&Rt.call(t,"index")&&(n.index=t.index,n.input=t.input),n}(t),!u)return Si(t,a)}else{var h=fo(t),d=h==b||h==C;if(Ks(t))return bi(t,u);if(h==E||h==g||d&&!o){if(a=c||d?{}:po(t),!u)return c?function(t,e){return xi(t,lo(t),e)}(t,function(t,e){return t&&xi(e,ja(e),t)}(a,t)):function(t,e){return xi(t,co(t),e)}(t,nr(a,t))}else{if(!oe[h])return o?t:{};a=function(t,e,n){var r,i=t.constructor;switch(e){case j:return Ci(t);case y:case m:return new i(+t);case P:return function(t,e){var n=e?Ci(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}(t,n);case R:case $:case M:case L:case N:case D:case I:case B:case q:return wi(t,n);case w:return new i;case k:case O:return new i(t);case S:return function(t){var e=new t.constructor(t.source,ht.exec(t));return e.lastIndex=t.lastIndex,e}(t);case x:return new i;case F:return r=t,Ln?Et(Ln.call(r)):{}}}(t,h,u)}}s||(s=new Kn);var p=s.get(t);if(p)return p;s.set(t,a),oa(t)?t.forEach((function(r){a.add(sr(r,e,n,r,t,s))})):ea(t)&&t.forEach((function(r,i){a.set(i,sr(r,e,n,i,t,s))}));var v=f?i:(l?c?eo:to:c?ja:Ta)(t);return Ae(v||t,(function(r,i){v&&(r=t[i=r]),Qn(a,i,sr(r,e,n,i,t,s))})),a}function ar(t,e,n){var r=n.length;if(null==t)return!r;for(t=Et(t);r--;){var o=n[r],s=e[o],a=t[o];if(a===i&&!(o in t)||!s(a))return!1}return!0}function ur(t,e,n){if("function"!=typeof t)throw new xt(o);return Oo((function(){t.apply(i,n)}),e)}function cr(t,e,n,r){var i=-1,o=Fe,s=!0,a=t.length,u=[],c=e.length;if(!a)return u;n&&(e=je(e,Ge(n))),r?(o=Te,s=!1):e.length>=200&&(o=Xe,s=!1,e=new Vn(e));t:for(;++i-1},Wn.prototype.set=function(t,e){var n=this.__data__,r=tr(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this},zn.prototype.clear=function(){this.size=0,this.__data__={hash:new Hn,map:new(kn||Wn),string:new Hn}},zn.prototype.delete=function(t){var e=so(this,t).delete(t);return this.size-=e?1:0,e},zn.prototype.get=function(t){return so(this,t).get(t)},zn.prototype.has=function(t){return so(this,t).has(t)},zn.prototype.set=function(t,e){var n=so(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this},Vn.prototype.add=Vn.prototype.push=function(t){return this.__data__.set(t,s),this},Vn.prototype.has=function(t){return this.__data__.has(t)},Kn.prototype.clear=function(){this.__data__=new Wn,this.size=0},Kn.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},Kn.prototype.get=function(t){return this.__data__.get(t)},Kn.prototype.has=function(t){return this.__data__.has(t)},Kn.prototype.set=function(t,e){var n=this.__data__;if(n instanceof Wn){var r=n.__data__;if(!kn||r.length<199)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new zn(r)}return n.set(t,e),this.size=n.size,this};var lr=Ti(mr),fr=Ti(_r,!0);function hr(t,e){var n=!0;return lr(t,(function(t,r,i){return n=!!e(t,r,i)})),n}function dr(t,e,n){for(var r=-1,o=t.length;++r0&&n(a)?e>1?gr(a,e-1,n,r,i):Pe(i,a):r||(i[i.length]=a)}return i}var vr=ji(),yr=ji(!0);function mr(t,e){return t&&vr(t,e,Ta)}function _r(t,e){return t&&yr(t,e,Ta)}function br(t,e){return Oe(e,(function(e){return Js(t[e])}))}function Cr(t,e){for(var n=0,r=(e=vi(e,t)).length;null!=t&&ne}function Ar(t,e){return null!=t&&Rt.call(t,e)}function Sr(t,e){return null!=t&&e in Et(t)}function xr(t,e,n){for(var o=n?Te:Fe,s=t[0].length,a=t.length,u=a,c=r(a),l=1/0,f=[];u--;){var h=t[u];u&&e&&(h=je(h,Ge(e))),l=yn(h.length,l),c[u]=!n&&(e||s>=120&&h.length>=120)?new Vn(u&&h):i}h=t[0];var d=-1,p=c[0];t:for(;++d=a?u:u*("desc"==n[r]?-1:1)}return t.index-e.index}(t,e,n)}));r--;)t[r]=t[r].value;return t}(i)}function Ur(t,e,n){for(var r=-1,i=e.length,o={};++r-1;)a!==t&&Kt.call(a,u,1),Kt.call(t,u,1);return t}function Wr(t,e){for(var n=t?e.length:0,r=n-1;n--;){var i=e[n];if(n==r||i!==o){var o=i;vo(i)?Kt.call(t,i,1):ui(t,i)}}return t}function zr(t,e){return t+de(bn()*(e-t+1))}function Vr(t,e){var n="";if(!t||e<1||e>f)return n;do{e%2&&(n+=t),(e=de(e/2))&&(t+=t)}while(e);return n}function Kr(t,e){return Fo(Eo(t,e,nu),t+"")}function Yr(t){return Gn(Ia(t))}function Gr(t,e){var n=Ia(t);return Po(n,or(e,0,n.length))}function Jr(t,e,n,r){if(!Qs(t))return t;for(var o=-1,s=(e=vi(e,t)).length,a=s-1,u=t;null!=u&&++oo?0:o+e),(n=n>o?o:n)<0&&(n+=o),o=e>n?0:n-e>>>0,e>>>=0;for(var s=r(o);++i>>1,s=t[o];null!==s&&!aa(s)&&(n?s<=e:s=200){var c=e?null:Vi(t);if(c)return un(c);s=!1,i=Xe,u=new Vn}else u=e?[]:a;t:for(;++r=r?t:ti(t,e,n)}var _i=se||function(t){return fe.clearTimeout(t)};function bi(t,e){if(e)return t.slice();var n=t.length,r=Ht?Ht(n):new t.constructor(n);return t.copy(r),r}function Ci(t){var e=new t.constructor(t.byteLength);return new Ut(e).set(new Ut(t)),e}function wi(t,e){var n=e?Ci(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}function ki(t,e){if(t!==e){var n=t!==i,r=null===t,o=t==t,s=aa(t),a=e!==i,u=null===e,c=e==e,l=aa(e);if(!u&&!l&&!s&&t>e||s&&a&&c&&!u&&!l||r&&a&&c||!n&&c||!o)return 1;if(!r&&!s&&!l&&t1?n[o-1]:i,a=o>2?n[2]:i;for(s=t.length>3&&"function"==typeof s?(o--,s):i,a&&yo(n[0],n[1],a)&&(s=o<3?i:s,o=1),e=Et(e);++r-1?o[s?e[a]:a]:i}}function Li(t){return Qi((function(e){var n=e.length,r=n,s=qn.prototype.thru;for(t&&e.reverse();r--;){var a=e[r];if("function"!=typeof a)throw new xt(o);if(s&&!u&&"wrapper"==ro(a))var u=new qn([],!0)}for(r=u?r:n;++r1&&b.reverse(),d&&f<_&&(b.length=f),this&&this!==fe&&this instanceof c&&(S=m||$i(S)),S.apply(A,b)}}function Di(t,e){return function(n,r){return function(t,e,n,r){return mr(t,(function(t,i,o){e(r,n(t),i,o)})),r}(n,t,e(r),{})}}function Ii(t,e){return function(n,r){var o;if(n===i&&r===i)return e;if(n!==i&&(o=n),r!==i){if(o===i)return r;"string"==typeof n||"string"==typeof r?(n=si(n),r=si(r)):(n=oi(n),r=oi(r)),o=t(n,r)}return o}}function Bi(t){return Qi((function(e){return e=je(e,Ge(oo())),Kr((function(n){var r=this;return t(e,(function(t){return ke(t,r,n)}))}))}))}function qi(t,e){var n=(e=e===i?" ":si(e)).length;if(n<2)return n?Vr(e,t):e;var r=Vr(e,he(t/ln(e)));return rn(e)?mi(fn(r),0,t).join(""):r.slice(0,t)}function Ui(t){return function(e,n,o){return o&&"number"!=typeof o&&yo(e,n,o)&&(n=o=i),e=ha(e),n===i?(n=e,e=0):n=ha(n),function(t,e,n,i){for(var o=-1,s=vn(he((e-t)/(n||1)),0),a=r(s);s--;)a[i?s:++o]=t,t+=n;return a}(e,n,o=o===i?eu))return!1;var l=s.get(t),f=s.get(e);if(l&&f)return l==e&&f==t;var h=-1,d=!0,p=2&n?new Vn:i;for(s.set(t,e),s.set(e,t);++h-1&&t%1==0&&t1?"& ":"")+e[r],e=e.join(n>2?", ":" "),t.replace(ot,"{\n/* [wrapped with "+e+"] */\n")}(r,function(t,e){return Ae(p,(function(n){var r="_."+n[0];e&n[1]&&!Fe(t,r)&&t.push(r)})),t.sort()}(function(t){var e=t.match(st);return e?e[1].split(at):[]}(r),n)))}function jo(t){var e=0,n=0;return function(){var r=mn(),o=16-(r-n);if(n=r,o>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(i,arguments)}}function Po(t,e){var n=-1,r=t.length,o=r-1;for(e=e===i?r:e;++n1?t[e-1]:i;return n="function"==typeof n?(t.pop(),n):i,is(t,n)}));function fs(t){var e=Dn(t);return e.__chain__=!0,e}function hs(t,e){return e(t)}var ds=Qi((function(t){var e=t.length,n=e?t[0]:0,r=this.__wrapped__,o=function(e){return ir(e,t)};return!(e>1||this.__actions__.length)&&r instanceof Un&&vo(n)?((r=r.slice(n,+n+(e?1:0))).__actions__.push({func:hs,args:[o],thisArg:i}),new qn(r,this.__chain__).thru((function(t){return e&&!t.length&&t.push(i),t}))):this.thru(o)})),ps=Oi((function(t,e,n){Rt.call(t,n)?++t[n]:rr(t,n,1)})),gs=Mi(Uo),vs=Mi(Ho);function ys(t,e){return(Hs(t)?Ae:lr)(t,oo(e,3))}function ms(t,e){return(Hs(t)?Se:fr)(t,oo(e,3))}var _s=Oi((function(t,e,n){Rt.call(t,n)?t[n].push(e):rr(t,n,[e])})),bs=Kr((function(t,e,n){var i=-1,o="function"==typeof e,s=zs(t)?r(t.length):[];return lr(t,(function(t){s[++i]=o?ke(e,t,n):Or(t,e,n)})),s})),Cs=Oi((function(t,e,n){rr(t,n,e)}));function ws(t,e){return(Hs(t)?je:Lr)(t,oo(e,3))}var ks=Oi((function(t,e,n){t[n?0:1].push(e)}),(function(){return[[],[]]})),Es=Kr((function(t,e){if(null==t)return[];var n=e.length;return n>1&&yo(t,e[0],e[1])?e=[]:n>2&&yo(e[0],e[1],e[2])&&(e=[e[0]]),qr(t,gr(e,1),[])})),As=ce||function(){return fe.Date.now()};function Ss(t,e,n){return e=n?i:e,e=t&&null==e?t.length:e,Yi(t,c,i,i,i,i,e)}function xs(t,e){var n;if("function"!=typeof e)throw new xt(o);return t=da(t),function(){return--t>0&&(n=e.apply(this,arguments)),t<=1&&(e=i),n}}var Os=Kr((function(t,e,n){var r=1;if(n.length){var i=an(n,io(Os));r|=u}return Yi(t,r,e,n,i)})),Fs=Kr((function(t,e,n){var r=3;if(n.length){var i=an(n,io(Fs));r|=u}return Yi(e,r,t,n,i)}));function Ts(t,e,n){var r,s,a,u,c,l,f=0,h=!1,d=!1,p=!0;if("function"!=typeof t)throw new xt(o);function g(e){var n=r,o=s;return r=s=i,f=e,u=t.apply(o,n)}function v(t){var n=t-l;return l===i||n>=e||n<0||d&&t-f>=a}function y(){var t=As();if(v(t))return m(t);c=Oo(y,function(t){var n=e-(t-l);return d?yn(n,a-(t-f)):n}(t))}function m(t){return c=i,p&&r?g(t):(r=s=i,u)}function _(){var t=As(),n=v(t);if(r=arguments,s=this,l=t,n){if(c===i)return function(t){return f=t,c=Oo(y,e),h?g(t):u}(l);if(d)return _i(c),c=Oo(y,e),g(l)}return c===i&&(c=Oo(y,e)),u}return e=ga(e)||0,Qs(n)&&(h=!!n.leading,a=(d="maxWait"in n)?vn(ga(n.maxWait)||0,e):a,p="trailing"in n?!!n.trailing:p),_.cancel=function(){c!==i&&_i(c),f=0,r=l=s=c=i},_.flush=function(){return c===i?u:m(As())},_}var js=Kr((function(t,e){return ur(t,1,e)})),Ps=Kr((function(t,e,n){return ur(t,ga(e)||0,n)}));function Rs(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new xt(o);var n=function(){var r=arguments,i=e?e.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var s=t.apply(this,r);return n.cache=o.set(i,s)||o,s};return n.cache=new(Rs.Cache||zn),n}function $s(t){if("function"!=typeof t)throw new xt(o);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)}}Rs.Cache=zn;var Ms=yi((function(t,e){var n=(e=1==e.length&&Hs(e[0])?je(e[0],Ge(oo())):je(gr(e,1),Ge(oo()))).length;return Kr((function(r){for(var i=-1,o=yn(r.length,n);++i=e})),Us=Fr(function(){return arguments}())?Fr:function(t){return ta(t)&&Rt.call(t,"callee")&&!Vt.call(t,"callee")},Hs=r.isArray,Ws=ye?Ge(ye):function(t){return ta(t)&&kr(t)==j};function zs(t){return null!=t&&Zs(t.length)&&!Js(t)}function Vs(t){return ta(t)&&zs(t)}var Ks=ve||gu,Ys=me?Ge(me):function(t){return ta(t)&&kr(t)==m};function Gs(t){if(!ta(t))return!1;var e=kr(t);return e==_||"[object DOMException]"==e||"string"==typeof t.message&&"string"==typeof t.name&&!ra(t)}function Js(t){if(!Qs(t))return!1;var e=kr(t);return e==b||e==C||"[object AsyncFunction]"==e||"[object Proxy]"==e}function Xs(t){return"number"==typeof t&&t==da(t)}function Zs(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=f}function Qs(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function ta(t){return null!=t&&"object"==typeof t}var ea=_e?Ge(_e):function(t){return ta(t)&&fo(t)==w};function na(t){return"number"==typeof t||ta(t)&&kr(t)==k}function ra(t){if(!ta(t)||kr(t)!=E)return!1;var e=Wt(t);if(null===e)return!0;var n=Rt.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&Pt.call(n)==Nt}var ia=be?Ge(be):function(t){return ta(t)&&kr(t)==S},oa=Ce?Ge(Ce):function(t){return ta(t)&&fo(t)==x};function sa(t){return"string"==typeof t||!Hs(t)&&ta(t)&&kr(t)==O}function aa(t){return"symbol"==typeof t||ta(t)&&kr(t)==F}var ua=we?Ge(we):function(t){return ta(t)&&Zs(t.length)&&!!ie[kr(t)]},ca=Hi(Mr),la=Hi((function(t,e){return t<=e}));function fa(t){if(!t)return[];if(zs(t))return sa(t)?fn(t):Si(t);if(Gt&&t[Gt])return function(t){for(var e,n=[];!(e=t.next()).done;)n.push(e.value);return n}(t[Gt]());var e=fo(t);return(e==w?on:e==x?un:Ia)(t)}function ha(t){return t?(t=ga(t))===l||t===-1/0?17976931348623157e292*(t<0?-1:1):t==t?t:0:0===t?t:0}function da(t){var e=ha(t),n=e%1;return e==e?n?e-n:e:0}function pa(t){return t?or(da(t),0,d):0}function ga(t){if("number"==typeof t)return t;if(aa(t))return h;if(Qs(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=Qs(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=Ye(t);var n=pt.test(t);return n||vt.test(t)?ue(t.slice(2),n?2:8):dt.test(t)?h:+t}function va(t){return xi(t,ja(t))}function ya(t){return null==t?"":si(t)}var ma=Fi((function(t,e){if(Co(e)||zs(e))xi(e,Ta(e),t);else for(var n in e)Rt.call(e,n)&&Qn(t,n,e[n])})),_a=Fi((function(t,e){xi(e,ja(e),t)})),ba=Fi((function(t,e,n,r){xi(e,ja(e),t,r)})),Ca=Fi((function(t,e,n,r){xi(e,Ta(e),t,r)})),wa=Qi(ir),ka=Kr((function(t,e){t=Et(t);var n=-1,r=e.length,o=r>2?e[2]:i;for(o&&yo(e[0],e[1],o)&&(r=1);++n1),e})),xi(t,eo(t),n),r&&(n=sr(n,7,Xi));for(var i=e.length;i--;)ui(n,e[i]);return n})),Ma=Qi((function(t,e){return null==t?{}:function(t,e){return Ur(t,e,(function(e,n){return Sa(t,n)}))}(t,e)}));function La(t,e){if(null==t)return{};var n=je(eo(t),(function(t){return[t]}));return e=oo(e),Ur(t,n,(function(t,n){return e(t,n[0])}))}var Na=Ki(Ta),Da=Ki(ja);function Ia(t){return null==t?[]:Je(t,Ta(t))}var Ba=Ri((function(t,e,n){return e=e.toLowerCase(),t+(n?qa(e):e)}));function qa(t){return Ga(ya(t).toLowerCase())}function Ua(t){return(t=ya(t))&&t.replace(mt,tn).replace(Xt,"")}var Ha=Ri((function(t,e,n){return t+(n?"-":"")+e.toLowerCase()})),Wa=Ri((function(t,e,n){return t+(n?" ":"")+e.toLowerCase()})),za=Pi("toLowerCase"),Va=Ri((function(t,e,n){return t+(n?"_":"")+e.toLowerCase()})),Ka=Ri((function(t,e,n){return t+(n?" ":"")+Ga(e)})),Ya=Ri((function(t,e,n){return t+(n?" ":"")+e.toUpperCase()})),Ga=Pi("toUpperCase");function Ja(t,e,n){return t=ya(t),(e=n?i:e)===i?function(t){return ee.test(t)}(t)?function(t){return t.match(Qt)||[]}(t):function(t){return t.match(ut)||[]}(t):t.match(e)||[]}var Xa=Kr((function(t,e){try{return ke(t,i,e)}catch(t){return Gs(t)?t:new Ct(t)}})),Za=Qi((function(t,e){return Ae(e,(function(e){e=Lo(e),rr(t,e,Os(t[e],t))})),t}));function Qa(t){return function(){return t}}var tu=Li(),eu=Li(!0);function nu(t){return t}function ru(t){return Rr("function"==typeof t?t:sr(t,1))}var iu=Kr((function(t,e){return function(n){return Or(n,t,e)}})),ou=Kr((function(t,e){return function(n){return Or(t,n,e)}}));function su(t,e,n){var r=Ta(e),i=br(e,r);null!=n||Qs(e)&&(i.length||!r.length)||(n=e,e=t,t=this,i=br(e,Ta(e)));var o=!(Qs(n)&&"chain"in n&&!n.chain),s=Js(t);return Ae(i,(function(n){var r=e[n];t[n]=r,s&&(t.prototype[n]=function(){var e=this.__chain__;if(o||e){var n=t(this.__wrapped__);return(n.__actions__=Si(this.__actions__)).push({func:r,args:arguments,thisArg:t}),n.__chain__=e,n}return r.apply(t,Pe([this.value()],arguments))})})),t}function au(){}var uu=Bi(je),cu=Bi(xe),lu=Bi(Me);function fu(t){return mo(t)?He(Lo(t)):function(t){return function(e){return Cr(e,t)}}(t)}var hu=Ui(),du=Ui(!0);function pu(){return[]}function gu(){return!1}var vu,yu=Ii((function(t,e){return t+e}),0),mu=zi("ceil"),_u=Ii((function(t,e){return t/e}),1),bu=zi("floor"),Cu=Ii((function(t,e){return t*e}),1),wu=zi("round"),ku=Ii((function(t,e){return t-e}),0);return Dn.after=function(t,e){if("function"!=typeof e)throw new xt(o);return t=da(t),function(){if(--t<1)return e.apply(this,arguments)}},Dn.ary=Ss,Dn.assign=ma,Dn.assignIn=_a,Dn.assignInWith=ba,Dn.assignWith=Ca,Dn.at=wa,Dn.before=xs,Dn.bind=Os,Dn.bindAll=Za,Dn.bindKey=Fs,Dn.castArray=function(){if(!arguments.length)return[];var t=arguments[0];return Hs(t)?t:[t]},Dn.chain=fs,Dn.chunk=function(t,e,n){e=(n?yo(t,e,n):e===i)?1:vn(da(e),0);var o=null==t?0:t.length;if(!o||e<1)return[];for(var s=0,a=0,u=r(he(o/e));so?0:o+n),(r=r===i||r>o?o:da(r))<0&&(r+=o),r=n>r?0:pa(r);n>>0)?(t=ya(t))&&("string"==typeof e||null!=e&&!ia(e))&&!(e=si(e))&&rn(t)?mi(fn(t),0,n):t.split(e,n):[]},Dn.spread=function(t,e){if("function"!=typeof t)throw new xt(o);return e=null==e?0:vn(da(e),0),Kr((function(n){var r=n[e],i=mi(n,0,e);return r&&Pe(i,r),ke(t,this,i)}))},Dn.tail=function(t){var e=null==t?0:t.length;return e?ti(t,1,e):[]},Dn.take=function(t,e,n){return t&&t.length?ti(t,0,(e=n||e===i?1:da(e))<0?0:e):[]},Dn.takeRight=function(t,e,n){var r=null==t?0:t.length;return r?ti(t,(e=r-(e=n||e===i?1:da(e)))<0?0:e,r):[]},Dn.takeRightWhile=function(t,e){return t&&t.length?li(t,oo(e,3),!1,!0):[]},Dn.takeWhile=function(t,e){return t&&t.length?li(t,oo(e,3)):[]},Dn.tap=function(t,e){return e(t),t},Dn.throttle=function(t,e,n){var r=!0,i=!0;if("function"!=typeof t)throw new xt(o);return Qs(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),Ts(t,e,{leading:r,maxWait:e,trailing:i})},Dn.thru=hs,Dn.toArray=fa,Dn.toPairs=Na,Dn.toPairsIn=Da,Dn.toPath=function(t){return Hs(t)?je(t,Lo):aa(t)?[t]:Si(Mo(ya(t)))},Dn.toPlainObject=va,Dn.transform=function(t,e,n){var r=Hs(t),i=r||Ks(t)||ua(t);if(e=oo(e,4),null==n){var o=t&&t.constructor;n=i?r?new o:[]:Qs(t)&&Js(o)?In(Wt(t)):{}}return(i?Ae:mr)(t,(function(t,r,i){return e(n,t,r,i)})),n},Dn.unary=function(t){return Ss(t,1)},Dn.union=ts,Dn.unionBy=es,Dn.unionWith=ns,Dn.uniq=function(t){return t&&t.length?ai(t):[]},Dn.uniqBy=function(t,e){return t&&t.length?ai(t,oo(e,2)):[]},Dn.uniqWith=function(t,e){return e="function"==typeof e?e:i,t&&t.length?ai(t,i,e):[]},Dn.unset=function(t,e){return null==t||ui(t,e)},Dn.unzip=rs,Dn.unzipWith=is,Dn.update=function(t,e,n){return null==t?t:ci(t,e,gi(n))},Dn.updateWith=function(t,e,n,r){return r="function"==typeof r?r:i,null==t?t:ci(t,e,gi(n),r)},Dn.values=Ia,Dn.valuesIn=function(t){return null==t?[]:Je(t,ja(t))},Dn.without=os,Dn.words=Ja,Dn.wrap=function(t,e){return Ls(gi(e),t)},Dn.xor=ss,Dn.xorBy=as,Dn.xorWith=us,Dn.zip=cs,Dn.zipObject=function(t,e){return di(t||[],e||[],Qn)},Dn.zipObjectDeep=function(t,e){return di(t||[],e||[],Jr)},Dn.zipWith=ls,Dn.entries=Na,Dn.entriesIn=Da,Dn.extend=_a,Dn.extendWith=ba,su(Dn,Dn),Dn.add=yu,Dn.attempt=Xa,Dn.camelCase=Ba,Dn.capitalize=qa,Dn.ceil=mu,Dn.clamp=function(t,e,n){return n===i&&(n=e,e=i),n!==i&&(n=(n=ga(n))==n?n:0),e!==i&&(e=(e=ga(e))==e?e:0),or(ga(t),e,n)},Dn.clone=function(t){return sr(t,4)},Dn.cloneDeep=function(t){return sr(t,5)},Dn.cloneDeepWith=function(t,e){return sr(t,5,e="function"==typeof e?e:i)},Dn.cloneWith=function(t,e){return sr(t,4,e="function"==typeof e?e:i)},Dn.conformsTo=function(t,e){return null==e||ar(t,e,Ta(e))},Dn.deburr=Ua,Dn.defaultTo=function(t,e){return null==t||t!=t?e:t},Dn.divide=_u,Dn.endsWith=function(t,e,n){t=ya(t),e=si(e);var r=t.length,o=n=n===i?r:or(da(n),0,r);return(n-=e.length)>=0&&t.slice(n,o)==e},Dn.eq=Is,Dn.escape=function(t){return(t=ya(t))&&Y.test(t)?t.replace(V,en):t},Dn.escapeRegExp=function(t){return(t=ya(t))&&nt.test(t)?t.replace(et,"\\$&"):t},Dn.every=function(t,e,n){var r=Hs(t)?xe:hr;return n&&yo(t,e,n)&&(e=i),r(t,oo(e,3))},Dn.find=gs,Dn.findIndex=Uo,Dn.findKey=function(t,e){return Ne(t,oo(e,3),mr)},Dn.findLast=vs,Dn.findLastIndex=Ho,Dn.findLastKey=function(t,e){return Ne(t,oo(e,3),_r)},Dn.floor=bu,Dn.forEach=ys,Dn.forEachRight=ms,Dn.forIn=function(t,e){return null==t?t:vr(t,oo(e,3),ja)},Dn.forInRight=function(t,e){return null==t?t:yr(t,oo(e,3),ja)},Dn.forOwn=function(t,e){return t&&mr(t,oo(e,3))},Dn.forOwnRight=function(t,e){return t&&_r(t,oo(e,3))},Dn.get=Aa,Dn.gt=Bs,Dn.gte=qs,Dn.has=function(t,e){return null!=t&&ho(t,e,Ar)},Dn.hasIn=Sa,Dn.head=zo,Dn.identity=nu,Dn.includes=function(t,e,n,r){t=zs(t)?t:Ia(t),n=n&&!r?da(n):0;var i=t.length;return n<0&&(n=vn(i+n,0)),sa(t)?n<=i&&t.indexOf(e,n)>-1:!!i&&Ie(t,e,n)>-1},Dn.indexOf=function(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=null==n?0:da(n);return i<0&&(i=vn(r+i,0)),Ie(t,e,i)},Dn.inRange=function(t,e,n){return e=ha(e),n===i?(n=e,e=0):n=ha(n),function(t,e,n){return t>=yn(e,n)&&t=-9007199254740991&&t<=f},Dn.isSet=oa,Dn.isString=sa,Dn.isSymbol=aa,Dn.isTypedArray=ua,Dn.isUndefined=function(t){return t===i},Dn.isWeakMap=function(t){return ta(t)&&fo(t)==T},Dn.isWeakSet=function(t){return ta(t)&&"[object WeakSet]"==kr(t)},Dn.join=function(t,e){return null==t?"":We.call(t,e)},Dn.kebabCase=Ha,Dn.last=Go,Dn.lastIndexOf=function(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var o=r;return n!==i&&(o=(o=da(n))<0?vn(r+o,0):yn(o,r-1)),e==e?function(t,e,n){for(var r=n+1;r--;)if(t[r]===e)return r;return r}(t,e,o):De(t,qe,o,!0)},Dn.lowerCase=Wa,Dn.lowerFirst=za,Dn.lt=ca,Dn.lte=la,Dn.max=function(t){return t&&t.length?dr(t,nu,Er):i},Dn.maxBy=function(t,e){return t&&t.length?dr(t,oo(e,2),Er):i},Dn.mean=function(t){return Ue(t,nu)},Dn.meanBy=function(t,e){return Ue(t,oo(e,2))},Dn.min=function(t){return t&&t.length?dr(t,nu,Mr):i},Dn.minBy=function(t,e){return t&&t.length?dr(t,oo(e,2),Mr):i},Dn.stubArray=pu,Dn.stubFalse=gu,Dn.stubObject=function(){return{}},Dn.stubString=function(){return""},Dn.stubTrue=function(){return!0},Dn.multiply=Cu,Dn.nth=function(t,e){return t&&t.length?Br(t,da(e)):i},Dn.noConflict=function(){return fe._===this&&(fe._=Dt),this},Dn.noop=au,Dn.now=As,Dn.pad=function(t,e,n){t=ya(t);var r=(e=da(e))?ln(t):0;if(!e||r>=e)return t;var i=(e-r)/2;return qi(de(i),n)+t+qi(he(i),n)},Dn.padEnd=function(t,e,n){t=ya(t);var r=(e=da(e))?ln(t):0;return e&&re){var r=t;t=e,e=r}if(n||t%1||e%1){var o=bn();return yn(t+o*(e-t+ae("1e-"+((o+"").length-1))),e)}return zr(t,e)},Dn.reduce=function(t,e,n){var r=Hs(t)?Re:ze,i=arguments.length<3;return r(t,oo(e,4),n,i,lr)},Dn.reduceRight=function(t,e,n){var r=Hs(t)?$e:ze,i=arguments.length<3;return r(t,oo(e,4),n,i,fr)},Dn.repeat=function(t,e,n){return e=(n?yo(t,e,n):e===i)?1:da(e),Vr(ya(t),e)},Dn.replace=function(){var t=arguments,e=ya(t[0]);return t.length<3?e:e.replace(t[1],t[2])},Dn.result=function(t,e,n){var r=-1,o=(e=vi(e,t)).length;for(o||(o=1,t=i);++rf)return[];var n=d,r=yn(t,d);e=oo(e),t-=d;for(var i=Ke(r,e);++n=s)return t;var u=n-ln(r);if(u<1)return r;var c=a?mi(a,0,u).join(""):t.slice(0,u);if(o===i)return c+r;if(a&&(u+=c.length-u),ia(o)){if(t.slice(u).search(o)){var l,f=c;for(o.global||(o=At(o.source,ya(ht.exec(o))+"g")),o.lastIndex=0;l=o.exec(f);)var h=l.index;c=c.slice(0,h===i?u:h)}}else if(t.indexOf(si(o),u)!=u){var d=c.lastIndexOf(o);d>-1&&(c=c.slice(0,d))}return c+r},Dn.unescape=function(t){return(t=ya(t))&&K.test(t)?t.replace(z,dn):t},Dn.uniqueId=function(t){var e=++$t;return ya(t)+e},Dn.upperCase=Ya,Dn.upperFirst=Ga,Dn.each=ys,Dn.eachRight=ms,Dn.first=zo,su(Dn,(vu={},mr(Dn,(function(t,e){Rt.call(Dn.prototype,e)||(vu[e]=t)})),vu),{chain:!1}),Dn.VERSION="4.17.21",Ae(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(t){Dn[t].placeholder=Dn})),Ae(["drop","take"],(function(t,e){Un.prototype[t]=function(n){n=n===i?1:vn(da(n),0);var r=this.__filtered__&&!e?new Un(this):this.clone();return r.__filtered__?r.__takeCount__=yn(n,r.__takeCount__):r.__views__.push({size:yn(n,d),type:t+(r.__dir__<0?"Right":"")}),r},Un.prototype[t+"Right"]=function(e){return this.reverse()[t](e).reverse()}})),Ae(["filter","map","takeWhile"],(function(t,e){var n=e+1,r=1==n||3==n;Un.prototype[t]=function(t){var e=this.clone();return e.__iteratees__.push({iteratee:oo(t,3),type:n}),e.__filtered__=e.__filtered__||r,e}})),Ae(["head","last"],(function(t,e){var n="take"+(e?"Right":"");Un.prototype[t]=function(){return this[n](1).value()[0]}})),Ae(["initial","tail"],(function(t,e){var n="drop"+(e?"":"Right");Un.prototype[t]=function(){return this.__filtered__?new Un(this):this[n](1)}})),Un.prototype.compact=function(){return this.filter(nu)},Un.prototype.find=function(t){return this.filter(t).head()},Un.prototype.findLast=function(t){return this.reverse().find(t)},Un.prototype.invokeMap=Kr((function(t,e){return"function"==typeof t?new Un(this):this.map((function(n){return Or(n,t,e)}))})),Un.prototype.reject=function(t){return this.filter($s(oo(t)))},Un.prototype.slice=function(t,e){t=da(t);var n=this;return n.__filtered__&&(t>0||e<0)?new Un(n):(t<0?n=n.takeRight(-t):t&&(n=n.drop(t)),e!==i&&(n=(e=da(e))<0?n.dropRight(-e):n.take(e-t)),n)},Un.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},Un.prototype.toArray=function(){return this.take(d)},mr(Un.prototype,(function(t,e){var n=/^(?:filter|find|map|reject)|While$/.test(e),r=/^(?:head|last)$/.test(e),o=Dn[r?"take"+("last"==e?"Right":""):e],s=r||/^find/.test(e);o&&(Dn.prototype[e]=function(){var e=this.__wrapped__,a=r?[1]:arguments,u=e instanceof Un,c=a[0],l=u||Hs(e),f=function(t){var e=o.apply(Dn,Pe([t],a));return r&&h?e[0]:e};l&&n&&"function"==typeof c&&1!=c.length&&(u=l=!1);var h=this.__chain__,d=!!this.__actions__.length,p=s&&!h,g=u&&!d;if(!s&&l){e=g?e:new Un(this);var v=t.apply(e,a);return v.__actions__.push({func:hs,args:[f],thisArg:i}),new qn(v,h)}return p&&g?t.apply(this,a):(v=this.thru(f),p?r?v.value()[0]:v.value():v)})})),Ae(["pop","push","shift","sort","splice","unshift"],(function(t){var e=Ot[t],n=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",r=/^(?:pop|shift)$/.test(t);Dn.prototype[t]=function(){var t=arguments;if(r&&!this.__chain__){var i=this.value();return e.apply(Hs(i)?i:[],t)}return this[n]((function(n){return e.apply(Hs(n)?n:[],t)}))}})),mr(Un.prototype,(function(t,e){var n=Dn[e];if(n){var r=n.name+"";Rt.call(Fn,r)||(Fn[r]=[]),Fn[r].push({name:e,func:n})}})),Fn[Ni(i,2).name]=[{name:"wrapper",func:i}],Un.prototype.clone=function(){var t=new Un(this.__wrapped__);return t.__actions__=Si(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=Si(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=Si(this.__views__),t},Un.prototype.reverse=function(){if(this.__filtered__){var t=new Un(this);t.__dir__=-1,t.__filtered__=!0}else(t=this.clone()).__dir__*=-1;return t},Un.prototype.value=function(){var t=this.__wrapped__.value(),e=this.__dir__,n=Hs(t),r=e<0,i=n?t.length:0,o=function(t,e,n){for(var r=-1,i=n.length;++r=this.__values__.length;return{done:t,value:t?i:this.__values__[this.__index__++]}},Dn.prototype.plant=function(t){for(var e,n=this;n instanceof Bn;){var r=Do(n);r.__index__=0,r.__values__=i,e?o.__wrapped__=r:e=r;var o=r;n=n.__wrapped__}return o.__wrapped__=t,e},Dn.prototype.reverse=function(){var t=this.__wrapped__;if(t instanceof Un){var e=t;return this.__actions__.length&&(e=new Un(this)),(e=e.reverse()).__actions__.push({func:hs,args:[Qo],thisArg:i}),new qn(e,this.__chain__)}return this.thru(Qo)},Dn.prototype.toJSON=Dn.prototype.valueOf=Dn.prototype.value=function(){return fi(this.__wrapped__,this.__actions__)},Dn.prototype.first=Dn.prototype.head,Gt&&(Dn.prototype[Gt]=function(){return this}),Dn}();fe._=pn,(r=function(){return pn}.call(e,n,e,t))===i||(t.exports=r)}.call(this)},3669:(t,e,n)=>{e.formatArgs=function(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+t.exports.humanize(this.diff),!this.useColors)return;const n="color: "+this.color;e.splice(1,0,n,"color: inherit");let r=0,i=0;e[0].replace(/%[a-zA-Z%]/g,(t=>{"%%"!==t&&(r++,"%c"===t&&(i=r))})),e.splice(i,0,n)},e.save=function(t){try{t?e.storage.setItem("debug",t):e.storage.removeItem("debug")}catch(t){}},e.load=function(){let t;try{t=e.storage.getItem("debug")}catch(t){}return!t&&"undefined"!=typeof process&&"env"in process&&(t=process.env.DEBUG),t},e.useColors=function(){return!("undefined"==typeof window||!window.process||"renderer"!==window.process.type&&!window.process.__nwjs)||("undefined"==typeof navigator||!navigator.userAgent||!navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))&&("undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))},e.storage=function(){try{return localStorage}catch(t){}}(),e.destroy=(()=>{let t=!1;return()=>{t||(t=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),e.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],e.log=console.debug||console.log||(()=>{}),t.exports=n(9231)(e);const{formatters:r}=t.exports;r.j=function(t){try{return JSON.stringify(t)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}},9231:(t,e,n)=>{t.exports=function(t){function e(t){let n,i,o,s=null;function a(...t){if(!a.enabled)return;const r=a,i=Number(new Date),o=i-(n||i);r.diff=o,r.prev=n,r.curr=i,n=i,t[0]=e.coerce(t[0]),"string"!=typeof t[0]&&t.unshift("%O");let s=0;t[0]=t[0].replace(/%([a-zA-Z%])/g,((n,i)=>{if("%%"===n)return"%";s++;const o=e.formatters[i];if("function"==typeof o){const e=t[s];n=o.call(r,e),t.splice(s,1),s--}return n})),e.formatArgs.call(r,t),(r.log||e.log).apply(r,t)}return a.namespace=t,a.useColors=e.useColors(),a.color=e.selectColor(t),a.extend=r,a.destroy=e.destroy,Object.defineProperty(a,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==s?s:(i!==e.namespaces&&(i=e.namespaces,o=e.enabled(t)),o),set:t=>{s=t}}),"function"==typeof e.init&&e.init(a),a}function r(t,n){const r=e(this.namespace+(void 0===n?":":n)+t);return r.log=this.log,r}function i(t){return t.toString().substring(2,t.toString().length-2).replace(/\.\*\?$/,"*")}return e.debug=e,e.default=e,e.coerce=function(t){return t instanceof Error?t.stack||t.message:t},e.disable=function(){const t=[...e.names.map(i),...e.skips.map(i).map((t=>"-"+t))].join(",");return e.enable(""),t},e.enable=function(t){let n;e.save(t),e.namespaces=t,e.names=[],e.skips=[];const r=("string"==typeof t?t:"").split(/[\s,]+/),i=r.length;for(n=0;n{e[n]=t[n]})),e.names=[],e.skips=[],e.formatters={},e.selectColor=function(t){let n=0;for(let e=0;e{var e=1e3,n=60*e,r=60*n,i=24*r;function o(t,e,n,r){var i=e>=1.5*n;return Math.round(t/n)+" "+r+(i?"s":"")}t.exports=function(t,s){s=s||{};var a,u,c=typeof t;if("string"===c&&t.length>0)return function(t){if(!((t=String(t)).length>100)){var o=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(t);if(o){var s=parseFloat(o[1]);switch((o[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*s;case"weeks":case"week":case"w":return 6048e5*s;case"days":case"day":case"d":return s*i;case"hours":case"hour":case"hrs":case"hr":case"h":return s*r;case"minutes":case"minute":case"mins":case"min":case"m":return s*n;case"seconds":case"second":case"secs":case"sec":case"s":return s*e;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return s;default:return}}}}(t);if("number"===c&&isFinite(t))return s.long?(a=t,(u=Math.abs(a))>=i?o(a,u,i,"day"):u>=r?o(a,u,r,"hour"):u>=n?o(a,u,n,"minute"):u>=e?o(a,u,e,"second"):a+" ms"):function(t){var o=Math.abs(t);return o>=i?Math.round(t/i)+"d":o>=r?Math.round(t/r)+"h":o>=n?Math.round(t/n)+"m":o>=e?Math.round(t/e)+"s":t+"ms"}(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))}},1618:(t,e,n)=>{e.formatArgs=function(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+t.exports.humanize(this.diff),!this.useColors)return;const n="color: "+this.color;e.splice(1,0,n,"color: inherit");let r=0,i=0;e[0].replace(/%[a-zA-Z%]/g,(t=>{"%%"!==t&&(r++,"%c"===t&&(i=r))})),e.splice(i,0,n)},e.save=function(t){try{t?e.storage.setItem("debug",t):e.storage.removeItem("debug")}catch(t){}},e.load=function(){let t;try{t=e.storage.getItem("debug")}catch(t){}return!t&&"undefined"!=typeof process&&"env"in process&&(t=process.env.DEBUG),t},e.useColors=function(){return!("undefined"==typeof window||!window.process||"renderer"!==window.process.type&&!window.process.__nwjs)||("undefined"==typeof navigator||!navigator.userAgent||!navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))&&("undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))},e.storage=function(){try{return localStorage}catch(t){}}(),e.destroy=(()=>{let t=!1;return()=>{t||(t=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),e.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],e.log=console.debug||console.log||(()=>{}),t.exports=n(5224)(e);const{formatters:r}=t.exports;r.j=function(t){try{return JSON.stringify(t)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}},5224:(t,e,n)=>{t.exports=function(t){function e(t){let n,i,o,s=null;function a(...t){if(!a.enabled)return;const r=a,i=Number(new Date),o=i-(n||i);r.diff=o,r.prev=n,r.curr=i,n=i,t[0]=e.coerce(t[0]),"string"!=typeof t[0]&&t.unshift("%O");let s=0;t[0]=t[0].replace(/%([a-zA-Z%])/g,((n,i)=>{if("%%"===n)return"%";s++;const o=e.formatters[i];if("function"==typeof o){const e=t[s];n=o.call(r,e),t.splice(s,1),s--}return n})),e.formatArgs.call(r,t),(r.log||e.log).apply(r,t)}return a.namespace=t,a.useColors=e.useColors(),a.color=e.selectColor(t),a.extend=r,a.destroy=e.destroy,Object.defineProperty(a,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==s?s:(i!==e.namespaces&&(i=e.namespaces,o=e.enabled(t)),o),set:t=>{s=t}}),"function"==typeof e.init&&e.init(a),a}function r(t,n){const r=e(this.namespace+(void 0===n?":":n)+t);return r.log=this.log,r}function i(t){return t.toString().substring(2,t.toString().length-2).replace(/\.\*\?$/,"*")}return e.debug=e,e.default=e,e.coerce=function(t){return t instanceof Error?t.stack||t.message:t},e.disable=function(){const t=[...e.names.map(i),...e.skips.map(i).map((t=>"-"+t))].join(",");return e.enable(""),t},e.enable=function(t){let n;e.save(t),e.namespaces=t,e.names=[],e.skips=[];const r=("string"==typeof t?t:"").split(/[\s,]+/),i=r.length;for(n=0;n{e[n]=t[n]})),e.names=[],e.skips=[],e.formatters={},e.selectColor=function(t){let n=0;for(let e=0;e{var e=1e3,n=60*e,r=60*n,i=24*r;function o(t,e,n,r){var i=e>=1.5*n;return Math.round(t/n)+" "+r+(i?"s":"")}t.exports=function(t,s){s=s||{};var a,u,c=typeof t;if("string"===c&&t.length>0)return function(t){if(!((t=String(t)).length>100)){var o=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(t);if(o){var s=parseFloat(o[1]);switch((o[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*s;case"weeks":case"week":case"w":return 6048e5*s;case"days":case"day":case"d":return s*i;case"hours":case"hour":case"hrs":case"hr":case"h":return s*r;case"minutes":case"minute":case"mins":case"min":case"m":return s*n;case"seconds":case"second":case"secs":case"sec":case"s":return s*e;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return s;default:return}}}}(t);if("number"===c&&isFinite(t))return s.long?(a=t,(u=Math.abs(a))>=i?o(a,u,i,"day"):u>=r?o(a,u,r,"hour"):u>=n?o(a,u,n,"minute"):u>=e?o(a,u,e,"second"):a+" ms"):function(t){var o=Math.abs(t);return o>=i?Math.round(t/i)+"d":o>=r?Math.round(t/r)+"h":o>=n?Math.round(t/n)+"m":o>=e?Math.round(t/e)+"s":t+"ms"}(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))}},9336:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.configureChat=void 0;const i=r(n(3336));let o;function s(t){(0,i.default)("#chat-messages").html(t.map((t=>`
\n ${t.from}\n ${t.msg}\n
`)).join("\n")),(0,i.default)("#chat-messages").scrollTop((0,i.default)("#chat-messages")[0].scrollHeight)}function a(t){(0,i.default)("#chat-messages").append(`
\n ${t.from}\n ${t.msg}\n
`),(0,i.default)("#chat-messages").scrollTop((0,i.default)("#chat-messages")[0].scrollHeight)}e.configureChat=function(t){o=t,o.on("chathistory",s),o.on("chat",a),(0,i.default)("#chat-form").on("submit",(t=>{t.preventDefault(),t.stopPropagation();const e=(0,i.default)("#message").val().toString();e.length>0&&(o.emit("chat",e),(0,i.default)("#message").val(""))})),console.log("Chat Configured")}},3253:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CustomEventManager=void 0,e.CustomEventManager=class{constructor(){this.events={}}on(t,e){this.events[t]||(this.events[t]=[]),this.events[t].push(e)}emit(t,e=[]){this.events[t]&&this.events[t].forEach((t=>t.apply(null,e)))}}},5862:function(t,e){"use strict";var n=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,o){function s(t){try{u(r.next(t))}catch(t){o(t)}}function a(t){try{u(r.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}u((r=r.apply(t,e||[])).next())}))};function r(){return localStorage.getItem("authToken")}Object.defineProperty(e,"__esModule",{value:!0}),e.http=e.authToken=void 0,e.authToken=r,e.http={get:t=>n(void 0,void 0,void 0,(function*(){return(yield fetch(t,{headers:{"x-authtoken":r()}})).json()})),post:(t,e)=>n(void 0,void 0,void 0,(function*(){return(yield fetch(t,{method:"post",body:JSON.stringify(e),headers:{"x-authtoken":r(),"content-type":"application/json"}})).json()}))}},2174:function(t,e,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(e,n);i&&!("get"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,i)}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),i=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),o=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)"default"!==n&&Object.prototype.hasOwnProperty.call(t,n)&&r(e,t,n);return i(e,t),e},s=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,o){function s(t){try{u(r.next(t))}catch(t){o(t)}}function a(t){try{u(r.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}u((r=r.apply(t,e||[])).next())}))},a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const u=n(7046),c=a(n(3336)),l=n(4738),f=n(5862),h=n(3253),d=n(7429),p=n(6486),g=n(9502),v=n(9336),y=n(1916),m=o(n(7355)),_=new(n(8182).TimeManager),b=new Map,C=new h.CustomEventManager,w=(0,u.io)({extraHeaders:{"x-authtoken":(0,f.authToken)()}});function k(){const t=_.gradientName(),e=(0,c.default)("body");e.removeClass(Array.from(e[0].classList)).addClass(t),_.isNight()&&e.addClass("night")}function E(t){return``}function A(t,e,n,r=!0){let i=0;e>0&&(i=Math.floor(t/e*100));const o=r?`${i}% - `:"";return`
${o}${t}/${e}
`}function S(t,e,n,r){let i=0;e>0&&(i=Math.floor(t/e*100)),(0,c.default)(`#${n}`).css("background",`linear-gradient(to right, ${r}, ${r} ${i}%, transparent ${i}%, transparent)`).attr("title",`${i}% - ${t}/${e}`).html(`${t}/${e} - ${i}%`)}function x(){const t=b.get("player");(0,c.default)("#username").html(`${t.username}, level ${t.level} ${t.profession}`),S(t.hp,(0,l.maxHp)(t.constitution,t.level),"hp-bar","#ff7070"),S(t.exp,(0,l.expToLevel)(t.level+1),"exp-bar","#5997f9"),["strength","constitution","dexterity","intelligence","hp","exp"].forEach((e=>{(0,c.default)(`.${e}`).html(t[e])})),(0,c.default)(".maxHp").html((0,l.maxHp)(t.constitution,t.level).toString()),(0,c.default)(".expToLevel").html((0,l.expToLevel)(t.level+1).toString()),(0,c.default)(".gold").html(t.gold.toLocaleString()),"session"===t.account_type&&(0,c.default)("#signup-prompt").html('

Hey there! It looks like you\'re using a SESSION account. This allows you to play with away, but the account is tied to your current device, and will be lost if you ever clear your cookies.

\n

\n
\n \n \n
\n
\n \n \n
\n \n \n

').removeClass("hidden"),(0,c.default)("#extra-inventory-info").html(O())}function O(){const t=b.get("player");let e='';return l.StatDef.forEach((n=>{e+=`\n \n \n `})),e+=``,e+="
${n.display}\n ${t[n.id]}\n ${t.stat_points?function(t){return``}(n):""}\n
Stat Points${t.stat_points}
",e}function F(t){return t.map((t=>function(t,e){return`
\n
\n \n
\n
\n
${t.name}
\n
\n ${t.requirements.level?T("LVL",t.requirements.level):""}\n ${t.requirements.strength?T("STR",t.requirements.strength):""}\n ${t.requirements.constitution?T("CON",t.requirements.constitution):""}\n ${t.requirements.dexterity?T("DEX",t.requirements.dexterity):""}\n ${t.requirements.intelligence?T("INT",t.requirements.intelligence):""}\n ${T("PRF",t.profession)}\n
\n
\n ${t.boosts.strength?j("STR",t.boosts.strength):""}\n ${t.boosts.constitution?j("CON",t.boosts.constitution):""}\n ${t.boosts.dexterity?j("DEX",t.boosts.dexterity):""}\n ${t.boosts.intelligence?j("INT",t.boosts.intelligence):""}\n ${t.boosts.damage?j("DMG",t.boosts.damage):""}\n ${t.boosts.damage_mitigation?j("MIT",t.boosts.damage_mitigation)+"%":""}\n ${["WEAPON","SPELL"].includes(t.type)?"":A(t.currentAp,t.maxAp,"#7be67b")}\n
\n ${t.hasOwnProperty("id")?`
${t.cost.toLocaleString()}G
`:""}\n
\n
\n ${(t=>t.is_equipped?``:"ANY_HAND"===t.equipment_slot?`\n `:"LEFT_HAND"===t.equipment_slot?``:"RIGHT_HAND"===t.equipment_slot?``:(t.equipment_slot,``))(t)}\n
\n
`}(t))).join("\n")}function T(t,e,n){let r="";return n&&(r=n>=e?"success":"error"),`${t}: ${e.toLocaleString()}`}function j(t,e){let n="";return"number"==typeof e&&(n=e>0?"+":"-"),`${t}: 0?"success":"error"}">${n}${e}`}function P(t){const e=Math.floor(t.hp/t.maxHp*100);return`
\n
\n
\n \n
\n
\n
${t.name}
\n
${e}% - ${t.hp} / ${t.maxHp}
\n
\n
\n
\n \n \n \n \n
\n
\n
`}(0,v.configureChat)(w),k(),setInterval(k,6e4),w.on("connect",(()=>{console.log(`Connected: ${w.id}`)})),w.on("ready",(()=>{console.log("Server connection verified"),w.emit("inventory")})),w.on("server-stats",(t=>{(0,c.default)("#server-stats").html(`${t.onlinePlayers} players online`)})),(0,p.each)(m,(t=>{console.log(`Binding Event ${t.eventName}`),t instanceof y.SocketEvent?w.on(t.eventName,t.handler.bind(null,{cache:b,socket:w,events:C})):console.log("Skipped binding",t)})),w.on("calc:ap",(t=>{var e,n,r,i,o,s,a,u;const{ap:l}=t,f=`\n
\n ${E("helm")}\n ${A((null===(e=l.HEAD)||void 0===e?void 0:e.currentAp)||0,(null===(n=l.HEAD)||void 0===n?void 0:n.maxAp)||0,"#7be67b")}\n
\n
\n ${E("arms")}\n ${A((null===(r=l.ARMS)||void 0===r?void 0:r.currentAp)||0,(null===(i=l.ARMS)||void 0===i?void 0:i.maxAp)||0,"#7be67b")}\n
\n
\n ${E("chest")}\n ${A((null===(o=l.CHEST)||void 0===o?void 0:o.currentAp)||0,(null===(s=l.CHEST)||void 0===s?void 0:s.maxAp)||0,"#7be67b")}\n
\n
\n ${E("legs")}\n ${A((null===(a=l.LEGS)||void 0===a?void 0:a.currentAp)||0,(null===(u=l.LEGS)||void 0===u?void 0:u.maxAp)||0,"#7be67b")}\n
\n `;(0,c.default)("#ap-bar").html(f)})),C.on("tab:skills",(()=>{(0,c.default)("#skills").html(""),w.emit("skills")})),w.on("skills",(t=>{let e=`\n ${t.skills.map((t=>{const e=g.Skills.get(t.id),n=t.exp/e.expToLevel(t.level+1);return`\n \n \n \n \n `})).join("\n")}\n
${t.level.toLocaleString()}\n ${(100*n).toPrecision(2)}% to next level\n ${e.display}\n

${e.description}

\n
`;(0,c.default)("#skills").html(e)})),C.on("alert",(t=>{let e=(0,d.v4)();(0,c.default)("#alerts").append(`
${t.text}
`),setTimeout((()=>{(0,c.default)(`#alert-${e}`).remove()}),3e3)})),w.on("alert",(t=>{C.emit("alert",[t])})),w.on("authToken",(t=>{console.log(`recv auth token ${t}`),localStorage.setItem("authToken",t)})),w.on("player",(t=>{b.set("player",t),x()})),(0,c.default)("nav a").on("click",(t=>{t.preventDefault(),t.stopPropagation(),(0,c.default)(`#${(0,c.default)(t.target).data("container")}`).find(".tab").removeClass("active"),(0,c.default)(`#${(0,c.default)(t.target).data("section")}`).addClass("active"),(0,c.default)(t.target).closest("nav").find("a").removeClass("active"),(0,c.default)(t.target).addClass("active"),C.emit(`tab:${(0,c.default)(t.target).data("section")}`)})),C.on("tab:inventory",(()=>{w.emit("inventory")})),(0,c.default)("body").on("click","nav.filter",(t=>{t.preventDefault(),t.stopPropagation();const e=(0,c.default)(t.target),n=e.data("filter");(0,c.default)(".filter-result").removeClass("active").addClass("hidden"),(0,c.default)(`#filter_${n}`).addClass("active").removeClass("hidden"),e.closest("nav").find("a").removeClass("active"),e.addClass("active"),b.set("active-inventory-section",n)})),w.on("inventory",(t=>{b.get("player");const e=b.get("active-inventory-section")||"ARMOUR",n={ARMOUR:[],WEAPON:[],SPELL:[]};t.inventory.forEach((t=>{n[t.type].push(t)}));const r=`\n
\n
\n ${function(t){const e="https://via.placeholder.com/64x64",n=t.filter((t=>t.is_equipped)).reduce(((t,e)=>(t[e.equipment_slot]=e,t)),{});return`\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
\n \n ${n.HEAD?n.HEAD.name:"HEAD"}\n \n ${n.ARMS?n.ARMS.name:"ARMS"}\n
\n ${n.LEFT_HAND?n.LEFT_HAND.name:n.TWO_HANDED?n.TWO_HANDED.name:"L_HAND"}\n \n ${n.CHEST?n.CHEST.name:"CHEST"}\n \n ${n.RIGHT_HAND?n.RIGHT_HAND.name:n.TWO_HANDED?n.TWO_HANDED.name:"R_HAND"}\n
\n \n ${n.LEGS?n.LEGS.name:"LEGS"}\n \n
\n `}(t.inventory)}\n
\n ${O()}\n
\n
\n
\n \n
\n
\n ${F(n.ARMOUR)}\n
\n
\n ${F(n.WEAPON)}\n
\n
\n ${F(n.SPELL)}\n
\n
\n
\n
\n `;(0,c.default)("#inventory").html(r)})),(0,c.default)("body").on("click",".equip-item",(t=>{t.preventDefault(),t.stopPropagation();const e=(0,c.default)(t.target),n=e.data("id"),r=e.data("slot");w.emit("equip",{id:n,slot:r})})),(0,c.default)("body").on("click",".unequip-item",(t=>{t.preventDefault(),t.stopPropagation(),w.emit("unequip",{id:(0,c.default)(t.target).data("id")})})),C.on("renderMap",(function(t){return s(this,void 0,void 0,(function*(){if(!t||b.has("currentMapHTML"))return void(0,c.default)("#map").html(b.get("currentMapHTML"));t||console.error("oh no.. this got triggered without any city data"),(0,c.default)("#explore").css({"background-image":`linear-gradient(to left top, rgba(255,255,255,0) 0%,rgb(255,255,255) 100%), linear-gradient(to left, rgba(255, 255, 255, 0) 0%, rgb(255, 255, 255) 100%), url("/assets/img/map/${t.city.id}.jpeg")`});const e={SERVICES:[],STORES:[],EXPLORE:[]};t.locations.forEach((t=>{e[t.type].push(`${t.name}`)}));let n=`

${t.city.name}

\n
`;e.SERVICES.length&&(n+=`

Services

${e.SERVICES.join("
")}
`),e.STORES.length&&(n+=`

Stores

${e.STORES.join("
")}
`),e.EXPLORE.length&&(n+=`

Explore

${e.EXPLORE.join("
")}
`),n+=`\n
\n

Travel

\n ${t.paths.map((t=>`${t.ending_city_name}`)).join("
")}\n
\n
\n `,b.set("currentMapHTML",n),(0,c.default)("#map").html(n)}))})),w.on("city:stores",(t=>{let e=`
\n ${t.map((t=>function(t,e){const n=b.get("player");return`
\n
\n \n
\n
\n
${t.name}${"TWO_HANDED"===t.equipment_slot?" (2H)":""}
\n
\n ${t.requirements.level?T("LVL",t.requirements.level,n.level):""}\n ${t.requirements.strength?T("STR",t.requirements.strength,n.strength):""}\n ${t.requirements.constitution?T("CON",t.requirements.constitution,n.constitution):""}\n ${t.requirements.dexterity?T("DEX",t.requirements.dexterity,n.dexterity):""}\n ${t.requirements.intelligence?T("INT",t.requirements.intelligence,n.intelligence):""}\n ${T("PRF",t.profession)}\n
\n
\n ${t.boosts.strength?j("STR",t.boosts.strength):""}\n ${t.boosts.constitution?j("CON",t.boosts.constitution):""}\n ${t.boosts.dexterity?j("DEX",t.boosts.dexterity):""}\n ${t.boosts.intelligence?j("INT",t.boosts.intelligence):""}\n ${t.boosts.damage?j(t.affectedSkills.includes("restoration_magic")?"HP":"DMG",t.boosts.damage):""}\n ${t.boosts.damage_mitigation?j("MIT",t.boosts.damage_mitigation)+"%":""}\n ${["WEAPON","SPELL"].includes(t.type)?"":j("AP",t.maxAp)}\n
\n ${t.hasOwnProperty("id")?`
${t.cost.toLocaleString()}G
`:""}\n
\n
\n ${r=t,``}\n
\n
`;var r}(t))).join("\n")}\n
\n `;(0,c.default)("#map").html(e)})),(0,c.default)("body").on("click",".purchase-item",(t=>{t.preventDefault(),t.stopPropagation();const e=b.get("player"),n=parseInt((0,c.default)(t.target).data("cost")),r=(0,c.default)(t.target).data("id");e.gold{const e=(0,c.default)(t.target),n=e.data("event"),r=e.data("args");console.log(`Sending event ${n}`,{args:r}),w.emit(n,{args:r})})),(0,c.default)("body").on("click",".city-emit-event",(t=>{const e=(0,c.default)(t.target),n=e.data("event"),r=e.data("args");console.log(`Sending event ${n}`,{args:r}),w.emit(n,{args:r})})),w.on("explore:fights",(t=>{const e=b.get("last-selected-monster");if(t.length){let n=`
`;(0,c.default)("#map").html(n)}})),C.on("tab:explore",(()=>s(void 0,void 0,void 0,(function*(){const t=yield f.http.get("/fight");if(t)(0,c.default)("#map").html(P(t));else{let t;b.has("currentMapHTML")||(t=yield f.http.get(`/city/${b.get("player").city_id}`)),C.emit("renderMap",[t])}})))),w.on("updatePlayer",(t=>{b.set("player",t),x()})),w.on("fight-over",(t=>{const{roundData:e,monsters:n}=t;b.set("player",e.player),x(),(0,c.default)("#map").html(P(e.monster));let r=e.roundDetails.map((t=>`
${t}
`));if("player"===e.winner&&(r.push(`
You defeated the ${e.monster.name}!
`),e.rewards.gold&&r.push(`
You gained ${e.rewards.gold} gold`),e.rewards.exp&&r.push(`
You gained ${e.rewards.exp} exp`),e.rewards.levelIncrease&&r.push(`
You gained a level! ${e.player.level}`)),n.length){const t=b.get("last-selected-monster");r.unshift(`

Fight Again

\n
`)}(0,c.default)("#fight-results").html(r.join("\n")),(0,c.default)("#fight-actions").html("")})),w.on("fight-round",(t=>{(0,c.default)(".fight-action").prop("disabled",!1),b.set("player",t.player),x(),(0,c.default)("#map").html(P(t.monster)),(0,c.default)("#fight-results").html(t.roundDetails.map((t=>`
${t}
`)).join("\n"))})),(0,c.default)("body").on("submit","#fight-selector",(t=>s(void 0,void 0,void 0,(function*(){if(t.preventDefault(),t.stopPropagation(),b.get("player").hp<=0)return void C.emit("alert",[{type:"error",text:"You don't have enough HP to go looking for a fight"}]);const e=(0,c.default)("#monster-selector option:selected").val();b.set("last-selected-monster",e);try{const t=yield f.http.post("/fight",{monsterId:e});(0,c.default)("#map").html(P(t))}catch(t){C.emit("alert",[{type:"error",text:"Sorry, you can't start that fight"}])}})))),(0,c.default)("body").on("click",".fight-action",(t=>{t.preventDefault(),t.stopPropagation();const e=(0,c.default)(t.target).data("action"),n=(0,c.default)("#fight-target option:selected").val();(0,c.default)(".fight-action").prop("disabled",!0),w.emit("fight",{action:e,target:n})})),(0,c.default)("body").on("submit","#signup",(t=>s(void 0,void 0,void 0,(function*(){t.preventDefault(),t.stopPropagation();const e={};(0,c.default)(t.target).serializeArray().forEach((t=>e[t.name]=t.value));const n=yield f.http.post("/signup",e);n.error?C.emit("alert",[{type:"error",text:n.error}]):(b.set("player",n.player),x(),(0,c.default)("#signup-prompt").remove())})))),(0,c.default)("body").on("click","#login",(t=>s(void 0,void 0,void 0,(function*(){t.preventDefault(),t.stopPropagation();const e={};if((0,c.default)(t.target).closest("form").serializeArray().forEach((t=>e[t.name]=t.value)),e.username&&e.password){const t=yield f.http.post("/login",e);t.error?C.emit("alert",[{type:"error",text:t.error}]):(localStorage.setItem("authToken",t.player.id),window.location.reload())}}))))},1916:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SocketEvent=void 0,e.SocketEvent=class{constructor(t,e){this.eventName=t,this.handler=e}}},7355:function(t,e,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(e,n);i&&!("get"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,i)}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),i=this&&this.__exportStar||function(t,e){for(var n in t)"default"===n||Object.prototype.hasOwnProperty.call(e,n)||r(e,t,n)};Object.defineProperty(e,"__esModule",{value:!0}),i(n(5127),e),i(n(6041),e),i(n(9261),e)},9261:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.displayHealerDetauls=void 0;const i=n(1916),o=r(n(3336));e.displayHealerDetauls=new i.SocketEvent("city:service:healer",((t,e)=>{(0,o.default)("#map").html(e.text)}))},5127:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.professionChangeRogue=e.professionChangeMage=e.professionChangeWarrior=e.professionRecruiter=void 0;const i=n(1916),o=r(n(3336)),s=n(9554);function a(t,e){(0,o.default)("#map").html(e.text)}e.professionRecruiter=new i.SocketEvent(s.EVENT_NAME,a),e.professionChangeWarrior=new i.SocketEvent(`${s.EVENT_NAME}:warrior`,a),e.professionChangeMage=new i.SocketEvent(`${s.EVENT_NAME}:mage`,a),e.professionChangeRogue=new i.SocketEvent(`${s.EVENT_NAME}:rogue`,a)},9554:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EVENT_NAME=void 0,e.EVENT_NAME="city:services:profession_recruitor_windcross"},6041:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.travel=void 0;const r=n(1916);e.travel=new r.SocketEvent("city:travel",((t,e)=>{t.cache.delete("currentMapHTML"),t.events.emit("renderMap",[e])}))},4738:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StatDef=e.expToLevel=e.maxHp=void 0;const r=n(1407);e.maxHp=function(t,e){return Math.ceil(1.3*(t+e))},e.expToLevel=function(t){return t<10?10*t-10:13*t},e.StatDef=new Map,e.StatDef.set(r.Stat.strength,{id:r.Stat.strength,display:"Strength",abbrv:"STR"}),e.StatDef.set(r.Stat.constitution,{id:r.Stat.constitution,display:"Constitution",abbrv:"CON"}),e.StatDef.set(r.Stat.dexterity,{id:r.Stat.dexterity,display:"Dexterity",abbrv:"DEX"}),e.StatDef.set(r.Stat.intelligence,{id:r.Stat.intelligence,display:"Intelligence",abbrv:"INT"})},9502:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Skills=void 0,e.Skills=new Map,e.Skills.set("bladed",{id:"bladed",display:"Bladed Weapon Mastery",description:"Improves Bladed Weapon damage",effect:t=>t.level/100,expToLevel:t=>1e3*t}),e.Skills.set("blunt",{id:"blunt",display:"Blunt Weapons Mastery",description:"Improves Blunt Weapon damage",effect:t=>t.level/100,expToLevel:t=>1e3*t}),e.Skills.set("destruction_magic",{id:"destruction_magic",display:"Destruction Magic Mastery",description:"Improves Destruction Magic damage",effect:t=>t.level/100,expToLevel:t=>1e3*t}),e.Skills.set("restoration_magic",{id:"restoration_magic",display:"Restoration Magic Mastery",description:"Improves effectiveness of Restoration Magic",effect:t=>t.level/100,expToLevel:t=>1e3*t}),e.Skills.set("one_handed_mastery",{id:"one_handed_mastery",display:"One Handed Weapon Mastery",description:"Improves effectiveness when fighting using one-handed weapons",effect:t=>t.level/100,expToLevel:t=>1e3*t}),e.Skills.set("two_handed_mastery",{id:"two_handed_mastery",display:"Two Handed Weapon Mastery",description:"Improves effectiveness when fighting using two-handed weapons",effect:t=>t.level/100,expToLevel:t=>1e3*t})},1407:(t,e)=>{"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0}),e.Stat=void 0,(n=e.Stat||(e.Stat={})).strength="strength",n.constitution="constitution",n.dexterity="dexterity",n.intelligence="intelligence"},8182:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TimeManager=void 0,e.TimeManager=class{constructor(t=60){this.dayLength=t,this.scaleFactor=30,this.dayLengthAsMS=60*t*1e3}dayScaleFactor(){return this.dayLength/30}getTimePeriod(){return this.isDawn()?"dawn":this.isMorning()?"morning":this.isAfternoon()?"afternoon":this.isEvening()?"evening":this.isNight()?"night":void 0}now(){return Math.floor((new Date).getMinutes()/this.dayScaleFactor())}gradientName(){const t=this.now();return`sky-gradient-${t<10?"0":""}${t}`}isNight(){const t=this.now();return t>=0&&t<=5||t>=26&&t<=29}isDawn(){const t=this.now();return t>=6&&t<=10}isMorning(){const t=this.now();return t>=11&&t<=15}isAfternoon(){const t=this.now();return t>=16&&t<=20}isEvening(){const t=this.now();return t>=21&&t<=25}}},7429:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"NIL",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(e,"parse",{enumerable:!0,get:function(){return f.default}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return l.default}}),Object.defineProperty(e,"v1",{enumerable:!0,get:function(){return r.default}}),Object.defineProperty(e,"v3",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(e,"v4",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(e,"v5",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(e,"validate",{enumerable:!0,get:function(){return c.default}}),Object.defineProperty(e,"version",{enumerable:!0,get:function(){return u.default}});var r=h(n(3990)),i=h(n(8237)),o=h(n(5355)),s=h(n(3764)),a=h(n(6314)),u=h(n(8464)),c=h(n(6435)),l=h(n(4008)),f=h(n(8222));function h(t){return t&&t.__esModule?t:{default:t}}},4163:(t,e)=>{"use strict";function n(t){return 14+(t+64>>>9<<4)+1}function r(t,e){const n=(65535&t)+(65535&e);return(t>>16)+(e>>16)+(n>>16)<<16|65535&n}function i(t,e,n,i,o,s){return r((a=r(r(e,t),r(i,s)))<<(u=o)|a>>>32-u,n);var a,u}function o(t,e,n,r,o,s,a){return i(e&n|~e&r,t,e,o,s,a)}function s(t,e,n,r,o,s,a){return i(e&r|n&~r,t,e,o,s,a)}function a(t,e,n,r,o,s,a){return i(e^n^r,t,e,o,s,a)}function u(t,e,n,r,o,s,a){return i(n^(e|~r),t,e,o,s,a)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;e.default=function(t){if("string"==typeof t){const e=unescape(encodeURIComponent(t));t=new Uint8Array(e.length);for(let n=0;n>5]>>>i%32&255,o=parseInt(r.charAt(n>>>4&15)+r.charAt(15&n),16);e.push(o)}return e}(function(t,e){t[e>>5]|=128<>5]|=(255&t[n/8])<{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};e.default=n},6314:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default="00000000-0000-0000-0000-000000000000"},8222:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r,i=(r=n(6435))&&r.__esModule?r:{default:r};e.default=function(t){if(!(0,i.default)(t))throw TypeError("Invalid UUID");let e;const n=new Uint8Array(16);return n[0]=(e=parseInt(t.slice(0,8),16))>>>24,n[1]=e>>>16&255,n[2]=e>>>8&255,n[3]=255&e,n[4]=(e=parseInt(t.slice(9,13),16))>>>8,n[5]=255&e,n[6]=(e=parseInt(t.slice(14,18),16))>>>8,n[7]=255&e,n[8]=(e=parseInt(t.slice(19,23),16))>>>8,n[9]=255&e,n[10]=(e=parseInt(t.slice(24,36),16))/1099511627776&255,n[11]=e/4294967296&255,n[12]=e>>>24&255,n[13]=e>>>16&255,n[14]=e>>>8&255,n[15]=255&e,n}},58:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i},3319:(t,e)=>{"use strict";let n;Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(){if(!n&&(n="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!n))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return n(r)};const r=new Uint8Array(16)},3757:(t,e)=>{"use strict";function n(t,e,n,r){switch(t){case 0:return e&n^~e&r;case 1:case 3:return e^n^r;case 2:return e&n^e&r^n&r}}function r(t,e){return t<>>32-e}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;e.default=function(t){const e=[1518500249,1859775393,2400959708,3395469782],i=[1732584193,4023233417,2562383102,271733878,3285377520];if("string"==typeof t){const e=unescape(encodeURIComponent(t));t=[];for(let n=0;n>>0;f=l,l=c,c=r(u,30)>>>0,u=s,s=a}i[0]=i[0]+s>>>0,i[1]=i[1]+u>>>0,i[2]=i[2]+c>>>0,i[3]=i[3]+l>>>0,i[4]=i[4]+f>>>0}return[i[0]>>24&255,i[0]>>16&255,i[0]>>8&255,255&i[0],i[1]>>24&255,i[1]>>16&255,i[1]>>8&255,255&i[1],i[2]>>24&255,i[2]>>16&255,i[2]>>8&255,255&i[2],i[3]>>24&255,i[3]>>16&255,i[3]>>8&255,255&i[3],i[4]>>24&255,i[4]>>16&255,i[4]>>8&255,255&i[4]]}},4008:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.unsafeStringify=s;var r,i=(r=n(6435))&&r.__esModule?r:{default:r};const o=[];for(let t=0;t<256;++t)o.push((t+256).toString(16).slice(1));function s(t,e=0){return(o[t[e+0]]+o[t[e+1]]+o[t[e+2]]+o[t[e+3]]+"-"+o[t[e+4]]+o[t[e+5]]+"-"+o[t[e+6]]+o[t[e+7]]+"-"+o[t[e+8]]+o[t[e+9]]+"-"+o[t[e+10]]+o[t[e+11]]+o[t[e+12]]+o[t[e+13]]+o[t[e+14]]+o[t[e+15]]).toLowerCase()}e.default=function(t,e=0){const n=s(t,e);if(!(0,i.default)(n))throw TypeError("Stringified UUID is invalid");return n}},3990:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r,i=(r=n(3319))&&r.__esModule?r:{default:r},o=n(4008);let s,a,u=0,c=0;e.default=function(t,e,n){let r=e&&n||0;const l=e||new Array(16);let f=(t=t||{}).node||s,h=void 0!==t.clockseq?t.clockseq:a;if(null==f||null==h){const e=t.random||(t.rng||i.default)();null==f&&(f=s=[1|e[0],e[1],e[2],e[3],e[4],e[5]]),null==h&&(h=a=16383&(e[6]<<8|e[7]))}let d=void 0!==t.msecs?t.msecs:Date.now(),p=void 0!==t.nsecs?t.nsecs:c+1;const g=d-u+(p-c)/1e4;if(g<0&&void 0===t.clockseq&&(h=h+1&16383),(g<0||d>u)&&void 0===t.nsecs&&(p=0),p>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");u=d,c=p,a=h,d+=122192928e5;const v=(1e4*(268435455&d)+p)%4294967296;l[r++]=v>>>24&255,l[r++]=v>>>16&255,l[r++]=v>>>8&255,l[r++]=255&v;const y=d/4294967296*1e4&268435455;l[r++]=y>>>8&255,l[r++]=255&y,l[r++]=y>>>24&15|16,l[r++]=y>>>16&255,l[r++]=h>>>8|128,l[r++]=255&h;for(let t=0;t<6;++t)l[r+t]=f[t];return e||(0,o.unsafeStringify)(l)}},8237:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=o(n(7925)),i=o(n(4163));function o(t){return t&&t.__esModule?t:{default:t}}var s=(0,r.default)("v3",48,i.default);e.default=s},7925:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.URL=e.DNS=void 0,e.default=function(t,e,n){function r(t,r,s,a){var u;if("string"==typeof t&&(t=function(t){t=unescape(encodeURIComponent(t));const e=[];for(let n=0;n{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=s(n(4790)),i=s(n(3319)),o=n(4008);function s(t){return t&&t.__esModule?t:{default:t}}e.default=function(t,e,n){if(r.default.randomUUID&&!e&&!t)return r.default.randomUUID();const s=(t=t||{}).random||(t.rng||i.default)();if(s[6]=15&s[6]|64,s[8]=63&s[8]|128,e){n=n||0;for(let t=0;t<16;++t)e[n+t]=s[t];return e}return(0,o.unsafeStringify)(s)}},3764:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=o(n(7925)),i=o(n(3757));function o(t){return t&&t.__esModule?t:{default:t}}var s=(0,r.default)("v5",80,i.default);e.default=s},6435:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r,i=(r=n(58))&&r.__esModule?r:{default:r};e.default=function(t){return"string"==typeof t&&i.default.test(t)}},8464:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r,i=(r=n(6435))&&r.__esModule?r:{default:r};e.default=function(t){if(!(0,i.default)(t))throw TypeError("Invalid UUID");return parseInt(t.slice(14,15),16)}},3336:t=>{"use strict";t.exports=$},8419:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.hasCORS=void 0;let n=!1;try{n="undefined"!=typeof XMLHttpRequest&&"withCredentials"in new XMLHttpRequest}catch(t){}e.hasCORS=n},5754:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.decode=e.encode=void 0,e.encode=function(t){let e="";for(let n in t)t.hasOwnProperty(n)&&(e.length&&(e+="&"),e+=encodeURIComponent(n)+"="+encodeURIComponent(t[n]));return e},e.decode=function(t){let e={},n=t.split("&");for(let t=0,r=n.length;t{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.parse=void 0;const n=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,r=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];e.parse=function(t){const e=t,i=t.indexOf("["),o=t.indexOf("]");-1!=i&&-1!=o&&(t=t.substring(0,i)+t.substring(i,o).replace(/:/g,";")+t.substring(o,t.length));let s=n.exec(t||""),a={},u=14;for(;u--;)a[r[u]]=s[u]||"";return-1!=i&&-1!=o&&(a.source=e,a.host=a.host.substring(1,a.host.length-1).replace(/;/g,":"),a.authority=a.authority.replace("[","").replace("]","").replace(/;/g,":"),a.ipv6uri=!0),a.pathNames=function(t,e){const n=e.replace(/\/{2,9}/g,"/").split("/");return"/"!=e.slice(0,1)&&0!==e.length||n.splice(0,1),"/"==e.slice(-1)&&n.splice(n.length-1,1),n}(0,a.path),a.queryKey=function(t,e){const n={};return e.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,(function(t,e,r){e&&(n[e]=r)})),n}(0,a.query),a}},8726:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.yeast=e.decode=e.encode=void 0;const n="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),r={};let i,o=0,s=0;function a(t){let e="";do{e=n[t%64]+e,t=Math.floor(t/64)}while(t>0);return e}for(e.encode=a,e.decode=function(t){let e=0;for(s=0;s{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.globalThisShim=void 0,e.globalThisShim="undefined"!=typeof self?self:"undefined"!=typeof window?window:Function("return this")()},4679:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.nextTick=e.parse=e.installTimerFunctions=e.transports=e.Transport=e.protocol=e.Socket=void 0;const r=n(3481);Object.defineProperty(e,"Socket",{enumerable:!0,get:function(){return r.Socket}}),e.protocol=r.Socket.protocol;var i=n(9870);Object.defineProperty(e,"Transport",{enumerable:!0,get:function(){return i.Transport}});var o=n(7385);Object.defineProperty(e,"transports",{enumerable:!0,get:function(){return o.transports}});var s=n(9622);Object.defineProperty(e,"installTimerFunctions",{enumerable:!0,get:function(){return s.installTimerFunctions}});var a=n(5222);Object.defineProperty(e,"parse",{enumerable:!0,get:function(){return a.parse}});var u=n(5552);Object.defineProperty(e,"nextTick",{enumerable:!0,get:function(){return u.nextTick}})},3481:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.Socket=void 0;const i=n(7385),o=n(9622),s=n(5754),a=n(5222),u=r(n(4802)),c=n(5260),l=n(1373),f=(0,u.default)("engine.io-client:socket");class h extends c.Emitter{constructor(t,e={}){super(),this.writeBuffer=[],t&&"object"==typeof t&&(e=t,t=null),t?(t=(0,a.parse)(t),e.hostname=t.host,e.secure="https"===t.protocol||"wss"===t.protocol,e.port=t.port,t.query&&(e.query=t.query)):e.host&&(e.hostname=(0,a.parse)(e.host).host),(0,o.installTimerFunctions)(this,e),this.secure=null!=e.secure?e.secure:"undefined"!=typeof location&&"https:"===location.protocol,e.hostname&&!e.port&&(e.port=this.secure?"443":"80"),this.hostname=e.hostname||("undefined"!=typeof location?location.hostname:"localhost"),this.port=e.port||("undefined"!=typeof location&&location.port?location.port:this.secure?"443":"80"),this.transports=e.transports||["polling","websocket"],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:!0},e),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),"string"==typeof this.opts.query&&(this.opts.query=(0,s.decode)(this.opts.query)),this.id=null,this.upgrades=null,this.pingInterval=null,this.pingTimeout=null,this.pingTimeoutTimer=null,"function"==typeof addEventListener&&(this.opts.closeOnBeforeunload&&(this.beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this.beforeunloadEventListener,!1)),"localhost"!==this.hostname&&(this.offlineEventListener=()=>{this.onClose("transport close",{description:"network connection lost"})},addEventListener("offline",this.offlineEventListener,!1))),this.open()}createTransport(t){f('creating transport "%s"',t);const e=Object.assign({},this.opts.query);e.EIO=l.protocol,e.transport=t,this.id&&(e.sid=this.id);const n=Object.assign({},this.opts.transportOptions[t],this.opts,{query:e,socket:this,hostname:this.hostname,secure:this.secure,port:this.port});return f("options: %j",n),new i.transports[t](n)}open(){let t;if(this.opts.rememberUpgrade&&h.priorWebsocketSuccess&&-1!==this.transports.indexOf("websocket"))t="websocket";else{if(0===this.transports.length)return void this.setTimeoutFn((()=>{this.emitReserved("error","No transports available")}),0);t=this.transports[0]}this.readyState="opening";try{t=this.createTransport(t)}catch(t){return f("error while creating transport: %s",t),this.transports.shift(),void this.open()}t.open(),this.setTransport(t)}setTransport(t){f("setting transport %s",t.name),this.transport&&(f("clearing existing transport %s",this.transport.name),this.transport.removeAllListeners()),this.transport=t,t.on("drain",this.onDrain.bind(this)).on("packet",this.onPacket.bind(this)).on("error",this.onError.bind(this)).on("close",(t=>this.onClose("transport close",t)))}probe(t){f('probing transport "%s"',t);let e=this.createTransport(t),n=!1;h.priorWebsocketSuccess=!1;const r=()=>{n||(f('probe transport "%s" opened',t),e.send([{type:"ping",data:"probe"}]),e.once("packet",(r=>{if(!n)if("pong"===r.type&&"probe"===r.data){if(f('probe transport "%s" pong',t),this.upgrading=!0,this.emitReserved("upgrading",e),!e)return;h.priorWebsocketSuccess="websocket"===e.name,f('pausing current transport "%s"',this.transport.name),this.transport.pause((()=>{n||"closed"!==this.readyState&&(f("changing transport and sending upgrade packet"),c(),this.setTransport(e),e.send([{type:"upgrade"}]),this.emitReserved("upgrade",e),e=null,this.upgrading=!1,this.flush())}))}else{f('probe transport "%s" failed',t);const n=new Error("probe error");n.transport=e.name,this.emitReserved("upgradeError",n)}})))};function i(){n||(n=!0,c(),e.close(),e=null)}const o=n=>{const r=new Error("probe error: "+n);r.transport=e.name,i(),f('probe transport "%s" failed because of error: %s',t,n),this.emitReserved("upgradeError",r)};function s(){o("transport closed")}function a(){o("socket closed")}function u(t){e&&t.name!==e.name&&(f('"%s" works - aborting "%s"',t.name,e.name),i())}const c=()=>{e.removeListener("open",r),e.removeListener("error",o),e.removeListener("close",s),this.off("close",a),this.off("upgrading",u)};e.once("open",r),e.once("error",o),e.once("close",s),this.once("close",a),this.once("upgrading",u),e.open()}onOpen(){if(f("socket open"),this.readyState="open",h.priorWebsocketSuccess="websocket"===this.transport.name,this.emitReserved("open"),this.flush(),"open"===this.readyState&&this.opts.upgrade){f("starting upgrade probes");let t=0;const e=this.upgrades.length;for(;t{this.onClose("ping timeout")}),this.pingInterval+this.pingTimeout),this.opts.autoUnref&&this.pingTimeoutTimer.unref()}onDrain(){this.writeBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,0===this.writeBuffer.length?this.emitReserved("drain"):this.flush()}flush(){if("closed"!==this.readyState&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this.getWritablePackets();f("flushing %d packets in socket",t.length),this.transport.send(t),this.prevBufferLen=t.length,this.emitReserved("flush")}}getWritablePackets(){if(!(this.maxPayload&&"polling"===this.transport.name&&this.writeBuffer.length>1))return this.writeBuffer;let t=1;for(let e=0;e0&&t>this.maxPayload)return f("only send %d out of %d packets",e,this.writeBuffer.length),this.writeBuffer.slice(0,e);t+=2}return f("payload size is %d (max: %d)",t,this.maxPayload),this.writeBuffer}write(t,e,n){return this.sendPacket("message",t,e,n),this}send(t,e,n){return this.sendPacket("message",t,e,n),this}sendPacket(t,e,n,r){if("function"==typeof e&&(r=e,e=void 0),"function"==typeof n&&(r=n,n=null),"closing"===this.readyState||"closed"===this.readyState)return;(n=n||{}).compress=!1!==n.compress;const i={type:t,data:e,options:n};this.emitReserved("packetCreate",i),this.writeBuffer.push(i),r&&this.once("flush",r),this.flush()}close(){const t=()=>{this.onClose("forced close"),f("socket closing - telling transport to close"),this.transport.close()},e=()=>{this.off("upgrade",e),this.off("upgradeError",e),t()},n=()=>{this.once("upgrade",e),this.once("upgradeError",e)};return"opening"!==this.readyState&&"open"!==this.readyState||(this.readyState="closing",this.writeBuffer.length?this.once("drain",(()=>{this.upgrading?n():t()})):this.upgrading?n():t()),this}onError(t){f("socket error %j",t),h.priorWebsocketSuccess=!1,this.emitReserved("error",t),this.onClose("transport error",t)}onClose(t,e){"opening"!==this.readyState&&"open"!==this.readyState&&"closing"!==this.readyState||(f('socket close with reason: "%s"',t),this.clearTimeoutFn(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),"function"==typeof removeEventListener&&(removeEventListener("beforeunload",this.beforeunloadEventListener,!1),removeEventListener("offline",this.offlineEventListener,!1)),this.readyState="closed",this.id=null,this.emitReserved("close",t,e),this.writeBuffer=[],this.prevBufferLen=0)}filterUpgrades(t){const e=[];let n=0;const r=t.length;for(;n{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.transports=void 0;const r=n(484),i=n(1308);e.transports={websocket:i.WS,polling:r.Polling}},484:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.Request=e.Polling=void 0;const i=n(9870),o=r(n(4802)),s=n(8726),a=n(5754),u=n(1373),c=n(6666),l=n(5260),f=n(9622),h=n(6242),d=(0,o.default)("engine.io-client:polling");function p(){}const g=null!=new c.XHR({xdomain:!1}).responseType;class v extends i.Transport{constructor(t){if(super(t),this.polling=!1,"undefined"!=typeof location){const e="https:"===location.protocol;let n=location.port;n||(n=e?"443":"80"),this.xd="undefined"!=typeof location&&t.hostname!==location.hostname||n!==t.port,this.xs=t.secure!==e}const e=t&&t.forceBase64;this.supportsBinary=g&&!e}get name(){return"polling"}doOpen(){this.poll()}pause(t){this.readyState="pausing";const e=()=>{d("paused"),this.readyState="paused",t()};if(this.polling||!this.writable){let t=0;this.polling&&(d("we are currently polling - waiting to pause"),t++,this.once("pollComplete",(function(){d("pre-pause polling complete"),--t||e()}))),this.writable||(d("we are currently writing - waiting to pause"),t++,this.once("drain",(function(){d("pre-pause writing complete"),--t||e()})))}else e()}poll(){d("polling"),this.polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){d("polling got data %s",t),(0,u.decodePayload)(t,this.socket.binaryType).forEach((t=>{if("opening"===this.readyState&&"open"===t.type&&this.onOpen(),"close"===t.type)return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(t)})),"closed"!==this.readyState&&(this.polling=!1,this.emitReserved("pollComplete"),"open"===this.readyState?this.poll():d('ignoring poll - transport state "%s"',this.readyState))}doClose(){const t=()=>{d("writing close packet"),this.write([{type:"close"}])};"open"===this.readyState?(d("transport open - closing"),t()):(d("transport not open - deferring close"),this.once("open",t))}write(t){this.writable=!1,(0,u.encodePayload)(t,(t=>{this.doWrite(t,(()=>{this.writable=!0,this.emitReserved("drain")}))}))}uri(){let t=this.query||{};const e=this.opts.secure?"https":"http";let n="";!1!==this.opts.timestampRequests&&(t[this.opts.timestampParam]=(0,s.yeast)()),this.supportsBinary||t.sid||(t.b64=1),this.opts.port&&("https"===e&&443!==Number(this.opts.port)||"http"===e&&80!==Number(this.opts.port))&&(n=":"+this.opts.port);const r=(0,a.encode)(t);return e+"://"+(-1!==this.opts.hostname.indexOf(":")?"["+this.opts.hostname+"]":this.opts.hostname)+n+this.opts.path+(r.length?"?"+r:"")}request(t={}){return Object.assign(t,{xd:this.xd,xs:this.xs},this.opts),new y(this.uri(),t)}doWrite(t,e){const n=this.request({method:"POST",data:t});n.on("success",e),n.on("error",((t,e)=>{this.onError("xhr post error",t,e)}))}doPoll(){d("xhr poll");const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",((t,e)=>{this.onError("xhr poll error",t,e)})),this.pollXhr=t}}e.Polling=v;class y extends l.Emitter{constructor(t,e){super(),(0,f.installTimerFunctions)(this,e),this.opts=e,this.method=e.method||"GET",this.uri=t,this.async=!1!==e.async,this.data=void 0!==e.data?e.data:null,this.create()}create(){const t=(0,f.pick)(this.opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");t.xdomain=!!this.opts.xd,t.xscheme=!!this.opts.xs;const e=this.xhr=new c.XHR(t);try{d("xhr open %s: %s",this.method,this.uri),e.open(this.method,this.uri,this.async);try{if(this.opts.extraHeaders){e.setDisableHeaderCheck&&e.setDisableHeaderCheck(!0);for(let t in this.opts.extraHeaders)this.opts.extraHeaders.hasOwnProperty(t)&&e.setRequestHeader(t,this.opts.extraHeaders[t])}}catch(t){}if("POST"===this.method)try{e.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch(t){}try{e.setRequestHeader("Accept","*/*")}catch(t){}"withCredentials"in e&&(e.withCredentials=this.opts.withCredentials),this.opts.requestTimeout&&(e.timeout=this.opts.requestTimeout),e.onreadystatechange=()=>{4===e.readyState&&(200===e.status||1223===e.status?this.onLoad():this.setTimeoutFn((()=>{this.onError("number"==typeof e.status?e.status:0)}),0))},d("xhr data %s",this.data),e.send(this.data)}catch(t){return void this.setTimeoutFn((()=>{this.onError(t)}),0)}"undefined"!=typeof document&&(this.index=y.requestsCount++,y.requests[this.index]=this)}onError(t){this.emitReserved("error",t,this.xhr),this.cleanup(!0)}cleanup(t){if(void 0!==this.xhr&&null!==this.xhr){if(this.xhr.onreadystatechange=p,t)try{this.xhr.abort()}catch(t){}"undefined"!=typeof document&&delete y.requests[this.index],this.xhr=null}}onLoad(){const t=this.xhr.responseText;null!==t&&(this.emitReserved("data",t),this.emitReserved("success"),this.cleanup())}abort(){this.cleanup()}}if(e.Request=y,y.requestsCount=0,y.requests={},"undefined"!=typeof document)if("function"==typeof attachEvent)attachEvent("onunload",m);else if("function"==typeof addEventListener){const t="onpagehide"in h.globalThisShim?"pagehide":"unload";addEventListener(t,m,!1)}function m(){for(let t in y.requests)y.requests.hasOwnProperty(t)&&y.requests[t].abort()}},5552:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.defaultBinaryType=e.usingBrowserWebSocket=e.WebSocket=e.nextTick=void 0;const r=n(6242);e.nextTick="function"==typeof Promise&&"function"==typeof Promise.resolve?t=>Promise.resolve().then(t):(t,e)=>e(t,0),e.WebSocket=r.globalThisShim.WebSocket||r.globalThisShim.MozWebSocket,e.usingBrowserWebSocket=!0,e.defaultBinaryType="arraybuffer"},1308:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.WS=void 0;const i=n(9870),o=n(5754),s=n(8726),a=n(9622),u=n(5552),c=r(n(4802)),l=n(1373),f=(0,c.default)("engine.io-client:websocket"),h="undefined"!=typeof navigator&&"string"==typeof navigator.product&&"reactnative"===navigator.product.toLowerCase();class d extends i.Transport{constructor(t){super(t),this.supportsBinary=!t.forceBase64}get name(){return"websocket"}doOpen(){if(!this.check())return;const t=this.uri(),e=this.opts.protocols,n=h?{}:(0,a.pick)(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(n.headers=this.opts.extraHeaders);try{this.ws=u.usingBrowserWebSocket&&!h?e?new u.WebSocket(t,e):new u.WebSocket(t):new u.WebSocket(t,e,n)}catch(t){return this.emitReserved("error",t)}this.ws.binaryType=this.socket.binaryType||u.defaultBinaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let e=0;e{const e={};!u.usingBrowserWebSocket&&(n.options&&(e.compress=n.options.compress),this.opts.perMessageDeflate)&&("string"==typeof t?Buffer.byteLength(t):t.length){this.writable=!0,this.emitReserved("drain")}),this.setTimeoutFn)}))}}doClose(){void 0!==this.ws&&(this.ws.close(),this.ws=null)}uri(){let t=this.query||{};const e=this.opts.secure?"wss":"ws";let n="";this.opts.port&&("wss"===e&&443!==Number(this.opts.port)||"ws"===e&&80!==Number(this.opts.port))&&(n=":"+this.opts.port),this.opts.timestampRequests&&(t[this.opts.timestampParam]=(0,s.yeast)()),this.supportsBinary||(t.b64=1);const r=(0,o.encode)(t);return e+"://"+(-1!==this.opts.hostname.indexOf(":")?"["+this.opts.hostname+"]":this.opts.hostname)+n+this.opts.path+(r.length?"?"+r:"")}check(){return!!u.WebSocket}}e.WS=d},6666:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.XHR=void 0;const r=n(8419),i=n(6242);e.XHR=function(t){const e=t.xdomain;try{if("undefined"!=typeof XMLHttpRequest&&(!e||r.hasCORS))return new XMLHttpRequest}catch(t){}if(!e)try{return new(i.globalThisShim[["Active"].concat("Object").join("X")])("Microsoft.XMLHTTP")}catch(t){}}},9622:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.byteLength=e.installTimerFunctions=e.pick=void 0;const r=n(6242);e.pick=function(t,...e){return e.reduce(((e,n)=>(t.hasOwnProperty(n)&&(e[n]=t[n]),e)),{})};const i=r.globalThisShim.setTimeout,o=r.globalThisShim.clearTimeout;e.installTimerFunctions=function(t,e){e.useNativeTimers?(t.setTimeoutFn=i.bind(r.globalThisShim),t.clearTimeoutFn=o.bind(r.globalThisShim)):(t.setTimeoutFn=r.globalThisShim.setTimeout.bind(r.globalThisShim),t.clearTimeoutFn=r.globalThisShim.clearTimeout.bind(r.globalThisShim))},e.byteLength=function(t){return"string"==typeof t?function(t){let e=0,n=0;for(let r=0,i=t.length;r=57344?n+=3:(r++,n+=4);return n}(t):Math.ceil(1.33*(t.byteLength||t.size))}},3087:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ERROR_PACKET=e.PACKET_TYPES_REVERSE=e.PACKET_TYPES=void 0;const n=Object.create(null);e.PACKET_TYPES=n,n.open="0",n.close="1",n.ping="2",n.pong="3",n.message="4",n.upgrade="5",n.noop="6";const r=Object.create(null);e.PACKET_TYPES_REVERSE=r,Object.keys(n).forEach((t=>{r[n[t]]=t})),e.ERROR_PACKET={type:"error",data:"parser error"}},2469:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.decode=e.encode=void 0;const n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",r="undefined"==typeof Uint8Array?[]:new Uint8Array(256);for(let t=0;t<64;t++)r[n.charCodeAt(t)]=t;e.encode=t=>{let e,r=new Uint8Array(t),i=r.length,o="";for(e=0;e>2],o+=n[(3&r[e])<<4|r[e+1]>>4],o+=n[(15&r[e+1])<<2|r[e+2]>>6],o+=n[63&r[e+2]];return i%3==2?o=o.substring(0,o.length-1)+"=":i%3==1&&(o=o.substring(0,o.length-2)+"=="),o},e.decode=t=>{let e,n,i,o,s,a=.75*t.length,u=t.length,c=0;"="===t[t.length-1]&&(a--,"="===t[t.length-2]&&a--);const l=new ArrayBuffer(a),f=new Uint8Array(l);for(e=0;e>4,f[c++]=(15&i)<<4|o>>2,f[c++]=(3&o)<<6|63&s;return l}},7572:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});const r=n(3087),i=n(2469),o="function"==typeof ArrayBuffer,s=(t,e)=>{if(o){const n=(0,i.decode)(t);return a(n,e)}return{base64:!0,data:t}},a=(t,e)=>"blob"===e&&t instanceof ArrayBuffer?new Blob([t]):t;e.default=(t,e)=>{if("string"!=typeof t)return{type:"message",data:a(t,e)};const n=t.charAt(0);return"b"===n?{type:"message",data:s(t.substring(1),e)}:r.PACKET_TYPES_REVERSE[n]?t.length>1?{type:r.PACKET_TYPES_REVERSE[n],data:t.substring(1)}:{type:r.PACKET_TYPES_REVERSE[n]}:r.ERROR_PACKET}},3908:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});const r=n(3087),i="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===Object.prototype.toString.call(Blob),o="function"==typeof ArrayBuffer,s=(t,e)=>{const n=new FileReader;return n.onload=function(){const t=n.result.split(",")[1];e("b"+(t||""))},n.readAsDataURL(t)};e.default=({type:t,data:e},n,a)=>{return i&&e instanceof Blob?n?a(e):s(e,a):o&&(e instanceof ArrayBuffer||(u=e,"function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(u):u&&u.buffer instanceof ArrayBuffer))?n?a(e):s(new Blob([e]),a):a(r.PACKET_TYPES[t]+(e||""));var u}},1373:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.decodePayload=e.decodePacket=e.encodePayload=e.encodePacket=e.protocol=void 0;const r=n(3908);e.encodePacket=r.default;const i=n(7572);e.decodePacket=i.default;const o=String.fromCharCode(30);e.encodePayload=(t,e)=>{const n=t.length,i=new Array(n);let s=0;t.forEach(((t,a)=>{(0,r.default)(t,!1,(t=>{i[a]=t,++s===n&&e(i.join(o))}))}))},e.decodePayload=(t,e)=>{const n=t.split(o),r=[];for(let t=0;t{"use strict";function n(t){t=t||{},this.ms=t.min||100,this.max=t.max||1e4,this.factor=t.factor||2,this.jitter=t.jitter>0&&t.jitter<=1?t.jitter:0,this.attempts=0}Object.defineProperty(e,"__esModule",{value:!0}),e.Backoff=void 0,e.Backoff=n,n.prototype.duration=function(){var t=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var e=Math.random(),n=Math.floor(e*this.jitter*t);t=0==(1&Math.floor(10*e))?t-n:t+n}return 0|Math.min(t,this.max)},n.prototype.reset=function(){this.attempts=0},n.prototype.setMin=function(t){this.ms=t},n.prototype.setMax=function(t){this.max=t},n.prototype.setJitter=function(t){this.jitter=t}},7046:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.connect=e.io=e.Socket=e.Manager=e.protocol=void 0;const i=n(3084),o=n(4168);Object.defineProperty(e,"Manager",{enumerable:!0,get:function(){return o.Manager}});const s=n(8312);Object.defineProperty(e,"Socket",{enumerable:!0,get:function(){return s.Socket}});const a=r(n(3669)).default("socket.io-client"),u={};function c(t,e){"object"==typeof t&&(e=t,t=void 0),e=e||{};const n=i.url(t,e.path||"/socket.io"),r=n.source,s=n.id,c=n.path,l=u[s]&&c in u[s].nsps;let f;return e.forceNew||e["force new connection"]||!1===e.multiplex||l?(a("ignoring socket cache for %s",r),f=new o.Manager(r,e)):(u[s]||(a("new io instance for %s",r),u[s]=new o.Manager(r,e)),f=u[s]),n.query&&!e.query&&(e.query=n.queryKey),f.socket(n.path,e)}e.io=c,e.connect=c,e.default=c,Object.assign(c,{Manager:o.Manager,Socket:s.Socket,io:c,connect:c});var l=n(4514);Object.defineProperty(e,"protocol",{enumerable:!0,get:function(){return l.protocol}}),t.exports=c},4168:function(t,e,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),i=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),o=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)"default"!==n&&Object.prototype.hasOwnProperty.call(t,n)&&r(e,t,n);return i(e,t),e},s=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.Manager=void 0;const a=n(4679),u=n(8312),c=o(n(4514)),l=n(7149),f=n(5159),h=n(5260),d=s(n(3669)).default("socket.io-client:manager");class p extends h.Emitter{constructor(t,e){var n;super(),this.nsps={},this.subs=[],t&&"object"==typeof t&&(e=t,t=void 0),(e=e||{}).path=e.path||"/socket.io",this.opts=e,a.installTimerFunctions(this,e),this.reconnection(!1!==e.reconnection),this.reconnectionAttempts(e.reconnectionAttempts||1/0),this.reconnectionDelay(e.reconnectionDelay||1e3),this.reconnectionDelayMax(e.reconnectionDelayMax||5e3),this.randomizationFactor(null!==(n=e.randomizationFactor)&&void 0!==n?n:.5),this.backoff=new f.Backoff({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(null==e.timeout?2e4:e.timeout),this._readyState="closed",this.uri=t;const r=e.parser||c;this.encoder=new r.Encoder,this.decoder=new r.Decoder,this._autoConnect=!1!==e.autoConnect,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,this):this._reconnection}reconnectionAttempts(t){return void 0===t?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var e;return void 0===t?this._reconnectionDelay:(this._reconnectionDelay=t,null===(e=this.backoff)||void 0===e||e.setMin(t),this)}randomizationFactor(t){var e;return void 0===t?this._randomizationFactor:(this._randomizationFactor=t,null===(e=this.backoff)||void 0===e||e.setJitter(t),this)}reconnectionDelayMax(t){var e;return void 0===t?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,null===(e=this.backoff)||void 0===e||e.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&0===this.backoff.attempts&&this.reconnect()}open(t){if(d("readyState %s",this._readyState),~this._readyState.indexOf("open"))return this;d("opening %s",this.uri),this.engine=new a.Socket(this.uri,this.opts);const e=this.engine,n=this;this._readyState="opening",this.skipReconnect=!1;const r=l.on(e,"open",(function(){n.onopen(),t&&t()})),i=l.on(e,"error",(e=>{d("error"),n.cleanup(),n._readyState="closed",this.emitReserved("error",e),t?t(e):n.maybeReconnectOnOpen()}));if(!1!==this._timeout){const t=this._timeout;d("connect attempt will timeout after %d",t),0===t&&r();const n=this.setTimeoutFn((()=>{d("connect attempt timed out after %d",t),r(),e.close(),e.emit("error",new Error("timeout"))}),t);this.opts.autoUnref&&n.unref(),this.subs.push((function(){clearTimeout(n)}))}return this.subs.push(r),this.subs.push(i),this}connect(t){return this.open(t)}onopen(){d("open"),this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(l.on(t,"ping",this.onping.bind(this)),l.on(t,"data",this.ondata.bind(this)),l.on(t,"error",this.onerror.bind(this)),l.on(t,"close",this.onclose.bind(this)),l.on(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(t){this.onclose("parse error",t)}}ondecoded(t){a.nextTick((()=>{this.emitReserved("packet",t)}),this.setTimeoutFn)}onerror(t){d("error",t),this.emitReserved("error",t)}socket(t,e){let n=this.nsps[t];return n?this._autoConnect&&!n.active&&n.connect():(n=new u.Socket(this,t,e),this.nsps[t]=n),n}_destroy(t){const e=Object.keys(this.nsps);for(const t of e)if(this.nsps[t].active)return void d("socket %s is still active, skipping close",t);this._close()}_packet(t){d("writing packet %j",t);const e=this.encoder.encode(t);for(let n=0;nt())),this.subs.length=0,this.decoder.destroy()}_close(){d("disconnect"),this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close"),this.engine&&this.engine.close()}disconnect(){return this._close()}onclose(t,e){d("closed due to %s",t),this.cleanup(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,e),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)d("reconnect failed"),this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const e=this.backoff.duration();d("will wait %dms before reconnect attempt",e),this._reconnecting=!0;const n=this.setTimeoutFn((()=>{t.skipReconnect||(d("attempting reconnect"),this.emitReserved("reconnect_attempt",t.backoff.attempts),t.skipReconnect||t.open((e=>{e?(d("reconnect attempt error"),t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",e)):(d("reconnect success"),t.onreconnect())})))}),e);this.opts.autoUnref&&n.unref(),this.subs.push((function(){clearTimeout(n)}))}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}e.Manager=p},7149:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.on=void 0,e.on=function(t,e,n){return t.on(e,n),function(){t.off(e,n)}}},8312:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.Socket=void 0;const i=n(4514),o=n(7149),s=n(5260),a=r(n(3669)).default("socket.io-client:socket"),u=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class c extends s.Emitter{constructor(t,e,n){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=t,this.nsp=e,n&&n.auth&&(this.auth=n.auth),this._opts=Object.assign({},n),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const t=this.io;this.subs=[o.on(t,"open",this.onopen.bind(this)),o.on(t,"packet",this.onpacket.bind(this)),o.on(t,"error",this.onerror.bind(this)),o.on(t,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected||(this.subEvents(),this.io._reconnecting||this.io.open(),"open"===this.io._readyState&&this.onopen()),this}open(){return this.connect()}send(...t){return t.unshift("message"),this.emit.apply(this,t),this}emit(t,...e){if(u.hasOwnProperty(t))throw new Error('"'+t.toString()+'" is a reserved event name');if(e.unshift(t),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(e),this;const n={type:i.PacketType.EVENT,data:e,options:{}};if(n.options.compress=!1!==this.flags.compress,"function"==typeof e[e.length-1]){const t=this.ids++;a("emitting packet with ack id %d",t);const r=e.pop();this._registerAckCallback(t,r),n.id=t}const r=this.io.engine&&this.io.engine.transport&&this.io.engine.transport.writable;return!this.flags.volatile||r&&this.connected?this.connected?(this.notifyOutgoingListeners(n),this.packet(n)):this.sendBuffer.push(n):a("discard packet as the transport is not currently writable"),this.flags={},this}_registerAckCallback(t,e){var n;const r=null!==(n=this.flags.timeout)&&void 0!==n?n:this._opts.ackTimeout;if(void 0===r)return void(this.acks[t]=e);const i=this.io.setTimeoutFn((()=>{delete this.acks[t];for(let e=0;e{this.io.clearTimeoutFn(i),e.apply(this,[null,...t])}}emitWithAck(t,...e){const n=void 0!==this.flags.timeout||void 0!==this._opts.ackTimeout;return new Promise(((r,i)=>{e.push(((t,e)=>n?t?i(t):r(e):r(t))),this.emit(t,...e)}))}_addToQueue(t){let e;"function"==typeof t[t.length-1]&&(e=t.pop());const n={id:this._queueSeq++,tryCount:0,pending:!1,args:t,flags:Object.assign({fromQueue:!0},this.flags)};t.push(((t,...r)=>{if(n===this._queue[0])return null!==t?n.tryCount>this._opts.retries&&(a("packet [%d] is discarded after %d tries",n.id,n.tryCount),this._queue.shift(),e&&e(t)):(a("packet [%d] was successfully sent",n.id),this._queue.shift(),e&&e(null,...r)),n.pending=!1,this._drainQueue()})),this._queue.push(n),this._drainQueue()}_drainQueue(t=!1){if(a("draining queue"),!this.connected||0===this._queue.length)return;const e=this._queue[0];!e.pending||t?(e.pending=!0,e.tryCount++,a("sending packet [%d] (try n°%d)",e.id,e.tryCount),this.flags=e.flags,this.emit.apply(this,e.args)):a("packet [%d] has already been sent and is waiting for an ack",e.id)}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){a("transport is open - connecting"),"function"==typeof this.auth?this.auth((t=>{this._sendConnectPacket(t)})):this._sendConnectPacket(this.auth)}_sendConnectPacket(t){this.packet({type:i.PacketType.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},t):t})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,e){a("close (%s)",t),this.connected=!1,delete this.id,this.emitReserved("disconnect",t,e)}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case i.PacketType.CONNECT:t.data&&t.data.sid?this.onconnect(t.data.sid,t.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 i.PacketType.EVENT:case i.PacketType.BINARY_EVENT:this.onevent(t);break;case i.PacketType.ACK:case i.PacketType.BINARY_ACK:this.onack(t);break;case i.PacketType.DISCONNECT:this.ondisconnect();break;case i.PacketType.CONNECT_ERROR:this.destroy();const e=new Error(t.data.message);e.data=t.data.data,this.emitReserved("connect_error",e)}}onevent(t){const e=t.data||[];a("emitting event %j",e),null!=t.id&&(a("attaching ack callback to event"),e.push(this.ack(t.id))),this.connected?this.emitEvent(e):this.receiveBuffer.push(Object.freeze(e))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const e=this._anyListeners.slice();for(const n of e)n.apply(this,t)}super.emit.apply(this,t),this._pid&&t.length&&"string"==typeof t[t.length-1]&&(this._lastOffset=t[t.length-1])}ack(t){const e=this;let n=!1;return function(...r){n||(n=!0,a("sending ack %j",r),e.packet({type:i.PacketType.ACK,id:t,data:r}))}}onack(t){const e=this.acks[t.id];"function"==typeof e?(a("calling ack %s with %j",t.id,t.data),e.apply(this,t.data),delete this.acks[t.id]):a("bad ack %s",t.id)}onconnect(t,e){a("socket connected with id %s",t),this.id=t,this.recovered=e&&this._pid===e,this._pid=e,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach((t=>this.emitEvent(t))),this.receiveBuffer=[],this.sendBuffer.forEach((t=>{this.notifyOutgoingListeners(t),this.packet(t)})),this.sendBuffer=[]}ondisconnect(){a("server disconnect (%s)",this.nsp),this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach((t=>t())),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&(a("performing disconnect (%s)",this.nsp),this.packet({type:i.PacketType.DISCONNECT})),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){const e=this._anyListeners;for(let n=0;n{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.reconstructPacket=e.deconstructPacket=void 0;const r=n(665);function i(t,e){if(!t)return t;if((0,r.isBinary)(t)){const n={_placeholder:!0,num:e.length};return e.push(t),n}if(Array.isArray(t)){const n=new Array(t.length);for(let r=0;r=0&&t.num{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Decoder=e.Encoder=e.PacketType=e.protocol=void 0;const r=n(5260),i=n(4880),o=n(665),s=(0,n(1618).default)("socket.io-parser");var a;e.protocol=5,function(t){t[t.CONNECT=0]="CONNECT",t[t.DISCONNECT=1]="DISCONNECT",t[t.EVENT=2]="EVENT",t[t.ACK=3]="ACK",t[t.CONNECT_ERROR=4]="CONNECT_ERROR",t[t.BINARY_EVENT=5]="BINARY_EVENT",t[t.BINARY_ACK=6]="BINARY_ACK"}(a=e.PacketType||(e.PacketType={})),e.Encoder=class{constructor(t){this.replacer=t}encode(t){return s("encoding packet %j",t),t.type!==a.EVENT&&t.type!==a.ACK||!(0,o.hasBinary)(t)?[this.encodeAsString(t)]:this.encodeAsBinary({type:t.type===a.EVENT?a.BINARY_EVENT:a.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id})}encodeAsString(t){let e=""+t.type;return t.type!==a.BINARY_EVENT&&t.type!==a.BINARY_ACK||(e+=t.attachments+"-"),t.nsp&&"/"!==t.nsp&&(e+=t.nsp+","),null!=t.id&&(e+=t.id),null!=t.data&&(e+=JSON.stringify(t.data,this.replacer)),s("encoded %j as %s",t,e),e}encodeAsBinary(t){const e=(0,i.deconstructPacket)(t),n=this.encodeAsString(e.packet),r=e.buffers;return r.unshift(n),r}};class u extends r.Emitter{constructor(t){super(),this.reviver=t}add(t){let e;if("string"==typeof t){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");e=this.decodeString(t);const n=e.type===a.BINARY_EVENT;n||e.type===a.BINARY_ACK?(e.type=n?a.EVENT:a.ACK,this.reconstructor=new c(e),0===e.attachments&&super.emitReserved("decoded",e)):super.emitReserved("decoded",e)}else{if(!(0,o.isBinary)(t)&&!t.base64)throw new Error("Unknown type: "+t);if(!this.reconstructor)throw new Error("got binary data when not reconstructing a packet");e=this.reconstructor.takeBinaryData(t),e&&(this.reconstructor=null,super.emitReserved("decoded",e))}}decodeString(t){let e=0;const n={type:Number(t.charAt(0))};if(void 0===a[n.type])throw new Error("unknown packet type "+n.type);if(n.type===a.BINARY_EVENT||n.type===a.BINARY_ACK){const r=e+1;for(;"-"!==t.charAt(++e)&&e!=t.length;);const i=t.substring(r,e);if(i!=Number(i)||"-"!==t.charAt(e))throw new Error("Illegal attachments");n.attachments=Number(i)}if("/"===t.charAt(e+1)){const r=e+1;for(;++e&&","!==t.charAt(e)&&e!==t.length;);n.nsp=t.substring(r,e)}else n.nsp="/";const r=t.charAt(e+1);if(""!==r&&Number(r)==r){const r=e+1;for(;++e;){const n=t.charAt(e);if(null==n||Number(n)!=n){--e;break}if(e===t.length)break}n.id=Number(t.substring(r,e+1))}if(t.charAt(++e)){const r=this.tryParse(t.substr(e));if(!u.isPayloadValid(n.type,r))throw new Error("invalid payload");n.data=r}return s("decoded %s as %j",t,n),n}tryParse(t){try{return JSON.parse(t,this.reviver)}catch(t){return!1}}static isPayloadValid(t,e){switch(t){case a.CONNECT:return"object"==typeof e;case a.DISCONNECT:return void 0===e;case a.CONNECT_ERROR:return"string"==typeof e||"object"==typeof e;case a.EVENT:case a.BINARY_EVENT:return Array.isArray(e)&&("string"==typeof e[0]||"number"==typeof e[0]);case a.ACK:case a.BINARY_ACK:return Array.isArray(e)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}e.Decoder=u;class c{constructor(t){this.packet=t,this.buffers=[],this.reconPack=t}takeBinaryData(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){const t=(0,i.reconstructPacket)(this.reconPack,this.buffers);return this.finishedReconstruction(),t}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}},665:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.hasBinary=e.isBinary=void 0;const n="function"==typeof ArrayBuffer,r=Object.prototype.toString,i="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===r.call(Blob),o="function"==typeof File||"undefined"!=typeof File&&"[object FileConstructor]"===r.call(File);function s(t){return n&&(t instanceof ArrayBuffer||(t=>"function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(t):t.buffer instanceof ArrayBuffer)(t))||i&&t instanceof Blob||o&&t instanceof File}e.isBinary=s,e.hasBinary=function t(e,n){if(!e||"object"!=typeof e)return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n{"use strict";function r(t){if(t)return function(t){for(var e in r.prototype)t[e]=r.prototype[e];return t}(t)}n.r(e),n.d(e,{Emitter:()=>r}),r.prototype.on=r.prototype.addEventListener=function(t,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(e),this},r.prototype.once=function(t,e){function n(){this.off(t,n),e.apply(this,arguments)}return n.fn=e,this.on(t,n),this},r.prototype.off=r.prototype.removeListener=r.prototype.removeAllListeners=r.prototype.removeEventListener=function(t,e){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var n,r=this._callbacks["$"+t];if(!r)return this;if(1==arguments.length)return delete this._callbacks["$"+t],this;for(var i=0;i{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.nmd=t=>(t.paths=[],t.children||(t.children=[]),t),n(2174)})(); \ No newline at end of file +(()=>{var t={4802:(t,e,n)=>{e.formatArgs=function(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+t.exports.humanize(this.diff),!this.useColors)return;const n="color: "+this.color;e.splice(1,0,n,"color: inherit");let r=0,i=0;e[0].replace(/%[a-zA-Z%]/g,(t=>{"%%"!==t&&(r++,"%c"===t&&(i=r))})),e.splice(i,0,n)},e.save=function(t){try{t?e.storage.setItem("debug",t):e.storage.removeItem("debug")}catch(t){}},e.load=function(){let t;try{t=e.storage.getItem("debug")}catch(t){}return!t&&"undefined"!=typeof process&&"env"in process&&(t=process.env.DEBUG),t},e.useColors=function(){return!("undefined"==typeof window||!window.process||"renderer"!==window.process.type&&!window.process.__nwjs)||("undefined"==typeof navigator||!navigator.userAgent||!navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))&&("undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))},e.storage=function(){try{return localStorage}catch(t){}}(),e.destroy=(()=>{let t=!1;return()=>{t||(t=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),e.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],e.log=console.debug||console.log||(()=>{}),t.exports=n(804)(e);const{formatters:r}=t.exports;r.j=function(t){try{return JSON.stringify(t)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}},804:(t,e,n)=>{t.exports=function(t){function e(t){let n,i,o,s=null;function a(...t){if(!a.enabled)return;const r=a,i=Number(new Date),o=i-(n||i);r.diff=o,r.prev=n,r.curr=i,n=i,t[0]=e.coerce(t[0]),"string"!=typeof t[0]&&t.unshift("%O");let s=0;t[0]=t[0].replace(/%([a-zA-Z%])/g,((n,i)=>{if("%%"===n)return"%";s++;const o=e.formatters[i];if("function"==typeof o){const e=t[s];n=o.call(r,e),t.splice(s,1),s--}return n})),e.formatArgs.call(r,t),(r.log||e.log).apply(r,t)}return a.namespace=t,a.useColors=e.useColors(),a.color=e.selectColor(t),a.extend=r,a.destroy=e.destroy,Object.defineProperty(a,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==s?s:(i!==e.namespaces&&(i=e.namespaces,o=e.enabled(t)),o),set:t=>{s=t}}),"function"==typeof e.init&&e.init(a),a}function r(t,n){const r=e(this.namespace+(void 0===n?":":n)+t);return r.log=this.log,r}function i(t){return t.toString().substring(2,t.toString().length-2).replace(/\.\*\?$/,"*")}return e.debug=e,e.default=e,e.coerce=function(t){return t instanceof Error?t.stack||t.message:t},e.disable=function(){const t=[...e.names.map(i),...e.skips.map(i).map((t=>"-"+t))].join(",");return e.enable(""),t},e.enable=function(t){let n;e.save(t),e.namespaces=t,e.names=[],e.skips=[];const r=("string"==typeof t?t:"").split(/[\s,]+/),i=r.length;for(n=0;n{e[n]=t[n]})),e.names=[],e.skips=[],e.formatters={},e.selectColor=function(t){let n=0;for(let e=0;e{var e=1e3,n=60*e,r=60*n,i=24*r;function o(t,e,n,r){var i=e>=1.5*n;return Math.round(t/n)+" "+r+(i?"s":"")}t.exports=function(t,s){s=s||{};var a,u,c=typeof t;if("string"===c&&t.length>0)return function(t){if(!((t=String(t)).length>100)){var o=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(t);if(o){var s=parseFloat(o[1]);switch((o[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*s;case"weeks":case"week":case"w":return 6048e5*s;case"days":case"day":case"d":return s*i;case"hours":case"hour":case"hrs":case"hr":case"h":return s*r;case"minutes":case"minute":case"mins":case"min":case"m":return s*n;case"seconds":case"second":case"secs":case"sec":case"s":return s*e;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return s;default:return}}}}(t);if("number"===c&&isFinite(t))return s.long?(a=t,(u=Math.abs(a))>=i?o(a,u,i,"day"):u>=r?o(a,u,r,"hour"):u>=n?o(a,u,n,"minute"):u>=e?o(a,u,e,"second"):a+" ms"):function(t){var o=Math.abs(t);return o>=i?Math.round(t/i)+"d":o>=r?Math.round(t/r)+"h":o>=n?Math.round(t/n)+"m":o>=e?Math.round(t/e)+"s":t+"ms"}(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))}},6486:function(t,e,n){var r;t=n.nmd(t),function(){var i,o="Expected a function",s="__lodash_hash_undefined__",a="__lodash_placeholder__",u=32,c=128,l=1/0,f=9007199254740991,h=NaN,d=4294967295,p=[["ary",c],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",u],["partialRight",64],["rearg",256]],g="[object Arguments]",v="[object Array]",y="[object Boolean]",m="[object Date]",_="[object Error]",b="[object Function]",C="[object GeneratorFunction]",w="[object Map]",k="[object Number]",E="[object Object]",A="[object Promise]",S="[object RegExp]",x="[object Set]",O="[object String]",F="[object Symbol]",T="[object WeakMap]",j="[object ArrayBuffer]",P="[object DataView]",R="[object Float32Array]",$="[object Float64Array]",M="[object Int8Array]",L="[object Int16Array]",N="[object Int32Array]",D="[object Uint8Array]",I="[object Uint8ClampedArray]",B="[object Uint16Array]",q="[object Uint32Array]",U=/\b__p \+= '';/g,H=/\b(__p \+=) '' \+/g,W=/(__e\(.*?\)|\b__t\)) \+\n'';/g,z=/&(?:amp|lt|gt|quot|#39);/g,V=/[&<>"']/g,K=RegExp(z.source),Y=RegExp(V.source),G=/<%-([\s\S]+?)%>/g,J=/<%([\s\S]+?)%>/g,X=/<%=([\s\S]+?)%>/g,Z=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Q=/^\w*$/,tt=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,et=/[\\^$.*+?()[\]{}|]/g,nt=RegExp(et.source),rt=/^\s+/,it=/\s/,ot=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,st=/\{\n\/\* \[wrapped with (.+)\] \*/,at=/,? & /,ut=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,ct=/[()=,{}\[\]\/\s]/,lt=/\\(\\)?/g,ft=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,ht=/\w*$/,dt=/^[-+]0x[0-9a-f]+$/i,pt=/^0b[01]+$/i,gt=/^\[object .+?Constructor\]$/,vt=/^0o[0-7]+$/i,yt=/^(?:0|[1-9]\d*)$/,mt=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,_t=/($^)/,bt=/['\n\r\u2028\u2029\\]/g,Ct="\\ud800-\\udfff",wt="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",kt="\\u2700-\\u27bf",Et="a-z\\xdf-\\xf6\\xf8-\\xff",At="A-Z\\xc0-\\xd6\\xd8-\\xde",St="\\ufe0e\\ufe0f",xt="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\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",Ot="["+Ct+"]",Ft="["+xt+"]",Tt="["+wt+"]",jt="\\d+",Pt="["+kt+"]",Rt="["+Et+"]",$t="[^"+Ct+xt+jt+kt+Et+At+"]",Mt="\\ud83c[\\udffb-\\udfff]",Lt="[^"+Ct+"]",Nt="(?:\\ud83c[\\udde6-\\uddff]){2}",Dt="[\\ud800-\\udbff][\\udc00-\\udfff]",It="["+At+"]",Bt="\\u200d",qt="(?:"+Rt+"|"+$t+")",Ut="(?:"+It+"|"+$t+")",Ht="(?:['’](?:d|ll|m|re|s|t|ve))?",Wt="(?:['’](?:D|LL|M|RE|S|T|VE))?",zt="(?:"+Tt+"|"+Mt+")?",Vt="["+St+"]?",Kt=Vt+zt+"(?:"+Bt+"(?:"+[Lt,Nt,Dt].join("|")+")"+Vt+zt+")*",Yt="(?:"+[Pt,Nt,Dt].join("|")+")"+Kt,Gt="(?:"+[Lt+Tt+"?",Tt,Nt,Dt,Ot].join("|")+")",Jt=RegExp("['’]","g"),Xt=RegExp(Tt,"g"),Zt=RegExp(Mt+"(?="+Mt+")|"+Gt+Kt,"g"),Qt=RegExp([It+"?"+Rt+"+"+Ht+"(?="+[Ft,It,"$"].join("|")+")",Ut+"+"+Wt+"(?="+[Ft,It+qt,"$"].join("|")+")",It+"?"+qt+"+"+Ht,It+"+"+Wt,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",jt,Yt].join("|"),"g"),te=RegExp("["+Bt+Ct+wt+St+"]"),ee=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,ne=["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"],re=-1,ie={};ie[R]=ie[$]=ie[M]=ie[L]=ie[N]=ie[D]=ie[I]=ie[B]=ie[q]=!0,ie[g]=ie[v]=ie[j]=ie[y]=ie[P]=ie[m]=ie[_]=ie[b]=ie[w]=ie[k]=ie[E]=ie[S]=ie[x]=ie[O]=ie[T]=!1;var oe={};oe[g]=oe[v]=oe[j]=oe[P]=oe[y]=oe[m]=oe[R]=oe[$]=oe[M]=oe[L]=oe[N]=oe[w]=oe[k]=oe[E]=oe[S]=oe[x]=oe[O]=oe[F]=oe[D]=oe[I]=oe[B]=oe[q]=!0,oe[_]=oe[b]=oe[T]=!1;var se={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},ae=parseFloat,ue=parseInt,ce="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,le="object"==typeof self&&self&&self.Object===Object&&self,fe=ce||le||Function("return this")(),he=e&&!e.nodeType&&e,de=he&&t&&!t.nodeType&&t,pe=de&&de.exports===he,ge=pe&&ce.process,ve=function(){try{return de&&de.require&&de.require("util").types||ge&&ge.binding&&ge.binding("util")}catch(t){}}(),ye=ve&&ve.isArrayBuffer,me=ve&&ve.isDate,_e=ve&&ve.isMap,be=ve&&ve.isRegExp,Ce=ve&&ve.isSet,we=ve&&ve.isTypedArray;function ke(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}function Ee(t,e,n,r){for(var i=-1,o=null==t?0:t.length;++i-1}function Te(t,e,n){for(var r=-1,i=null==t?0:t.length;++r-1;);return n}function Qe(t,e){for(var n=t.length;n--&&Ie(e,t[n],0)>-1;);return n}var tn=We({À:"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"}),en=We({"&":"&","<":"<",">":">",'"':""","'":"'"});function nn(t){return"\\"+se[t]}function rn(t){return te.test(t)}function on(t){var e=-1,n=Array(t.size);return t.forEach((function(t,r){n[++e]=[r,t]})),n}function sn(t,e){return function(n){return t(e(n))}}function an(t,e){for(var n=-1,r=t.length,i=0,o=[];++n",""":'"',"'":"'"}),pn=function t(e){var n,r=(e=null==e?fe:pn.defaults(fe.Object(),e,pn.pick(fe,ne))).Array,it=e.Date,Ct=e.Error,wt=e.Function,kt=e.Math,Et=e.Object,At=e.RegExp,St=e.String,xt=e.TypeError,Ot=r.prototype,Ft=wt.prototype,Tt=Et.prototype,jt=e["__core-js_shared__"],Pt=Ft.toString,Rt=Tt.hasOwnProperty,$t=0,Mt=(n=/[^.]+$/.exec(jt&&jt.keys&&jt.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"",Lt=Tt.toString,Nt=Pt.call(Et),Dt=fe._,It=At("^"+Pt.call(Rt).replace(et,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Bt=pe?e.Buffer:i,qt=e.Symbol,Ut=e.Uint8Array,Ht=Bt?Bt.allocUnsafe:i,Wt=sn(Et.getPrototypeOf,Et),zt=Et.create,Vt=Tt.propertyIsEnumerable,Kt=Ot.splice,Yt=qt?qt.isConcatSpreadable:i,Gt=qt?qt.iterator:i,Zt=qt?qt.toStringTag:i,te=function(){try{var t=uo(Et,"defineProperty");return t({},"",{}),t}catch(t){}}(),se=e.clearTimeout!==fe.clearTimeout&&e.clearTimeout,ce=it&&it.now!==fe.Date.now&&it.now,le=e.setTimeout!==fe.setTimeout&&e.setTimeout,he=kt.ceil,de=kt.floor,ge=Et.getOwnPropertySymbols,ve=Bt?Bt.isBuffer:i,Le=e.isFinite,We=Ot.join,gn=sn(Et.keys,Et),vn=kt.max,yn=kt.min,mn=it.now,_n=e.parseInt,bn=kt.random,Cn=Ot.reverse,wn=uo(e,"DataView"),kn=uo(e,"Map"),En=uo(e,"Promise"),An=uo(e,"Set"),Sn=uo(e,"WeakMap"),xn=uo(Et,"create"),On=Sn&&new Sn,Fn={},Tn=No(wn),jn=No(kn),Pn=No(En),Rn=No(An),$n=No(Sn),Mn=qt?qt.prototype:i,Ln=Mn?Mn.valueOf:i,Nn=Mn?Mn.toString:i;function Dn(t){if(ta(t)&&!Hs(t)&&!(t instanceof Un)){if(t instanceof qn)return t;if(Rt.call(t,"__wrapped__"))return Do(t)}return new qn(t)}var In=function(){function t(){}return function(e){if(!Qs(e))return{};if(zt)return zt(e);t.prototype=e;var n=new t;return t.prototype=i,n}}();function Bn(){}function qn(t,e){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!e,this.__index__=0,this.__values__=i}function Un(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=d,this.__views__=[]}function Hn(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e=e?t:e)),t}function sr(t,e,n,r,o,s){var a,u=1&e,c=2&e,l=4&e;if(n&&(a=o?n(t,r,o,s):n(t)),a!==i)return a;if(!Qs(t))return t;var f=Hs(t);if(f){if(a=function(t){var e=t.length,n=new t.constructor(e);return e&&"string"==typeof t[0]&&Rt.call(t,"index")&&(n.index=t.index,n.input=t.input),n}(t),!u)return Si(t,a)}else{var h=fo(t),d=h==b||h==C;if(Ks(t))return bi(t,u);if(h==E||h==g||d&&!o){if(a=c||d?{}:po(t),!u)return c?function(t,e){return xi(t,lo(t),e)}(t,function(t,e){return t&&xi(e,ja(e),t)}(a,t)):function(t,e){return xi(t,co(t),e)}(t,nr(a,t))}else{if(!oe[h])return o?t:{};a=function(t,e,n){var r,i=t.constructor;switch(e){case j:return Ci(t);case y:case m:return new i(+t);case P:return function(t,e){var n=e?Ci(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}(t,n);case R:case $:case M:case L:case N:case D:case I:case B:case q:return wi(t,n);case w:return new i;case k:case O:return new i(t);case S:return function(t){var e=new t.constructor(t.source,ht.exec(t));return e.lastIndex=t.lastIndex,e}(t);case x:return new i;case F:return r=t,Ln?Et(Ln.call(r)):{}}}(t,h,u)}}s||(s=new Kn);var p=s.get(t);if(p)return p;s.set(t,a),oa(t)?t.forEach((function(r){a.add(sr(r,e,n,r,t,s))})):ea(t)&&t.forEach((function(r,i){a.set(i,sr(r,e,n,i,t,s))}));var v=f?i:(l?c?eo:to:c?ja:Ta)(t);return Ae(v||t,(function(r,i){v&&(r=t[i=r]),Qn(a,i,sr(r,e,n,i,t,s))})),a}function ar(t,e,n){var r=n.length;if(null==t)return!r;for(t=Et(t);r--;){var o=n[r],s=e[o],a=t[o];if(a===i&&!(o in t)||!s(a))return!1}return!0}function ur(t,e,n){if("function"!=typeof t)throw new xt(o);return Oo((function(){t.apply(i,n)}),e)}function cr(t,e,n,r){var i=-1,o=Fe,s=!0,a=t.length,u=[],c=e.length;if(!a)return u;n&&(e=je(e,Ge(n))),r?(o=Te,s=!1):e.length>=200&&(o=Xe,s=!1,e=new Vn(e));t:for(;++i-1},Wn.prototype.set=function(t,e){var n=this.__data__,r=tr(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this},zn.prototype.clear=function(){this.size=0,this.__data__={hash:new Hn,map:new(kn||Wn),string:new Hn}},zn.prototype.delete=function(t){var e=so(this,t).delete(t);return this.size-=e?1:0,e},zn.prototype.get=function(t){return so(this,t).get(t)},zn.prototype.has=function(t){return so(this,t).has(t)},zn.prototype.set=function(t,e){var n=so(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this},Vn.prototype.add=Vn.prototype.push=function(t){return this.__data__.set(t,s),this},Vn.prototype.has=function(t){return this.__data__.has(t)},Kn.prototype.clear=function(){this.__data__=new Wn,this.size=0},Kn.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},Kn.prototype.get=function(t){return this.__data__.get(t)},Kn.prototype.has=function(t){return this.__data__.has(t)},Kn.prototype.set=function(t,e){var n=this.__data__;if(n instanceof Wn){var r=n.__data__;if(!kn||r.length<199)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new zn(r)}return n.set(t,e),this.size=n.size,this};var lr=Ti(mr),fr=Ti(_r,!0);function hr(t,e){var n=!0;return lr(t,(function(t,r,i){return n=!!e(t,r,i)})),n}function dr(t,e,n){for(var r=-1,o=t.length;++r0&&n(a)?e>1?gr(a,e-1,n,r,i):Pe(i,a):r||(i[i.length]=a)}return i}var vr=ji(),yr=ji(!0);function mr(t,e){return t&&vr(t,e,Ta)}function _r(t,e){return t&&yr(t,e,Ta)}function br(t,e){return Oe(e,(function(e){return Js(t[e])}))}function Cr(t,e){for(var n=0,r=(e=vi(e,t)).length;null!=t&&ne}function Ar(t,e){return null!=t&&Rt.call(t,e)}function Sr(t,e){return null!=t&&e in Et(t)}function xr(t,e,n){for(var o=n?Te:Fe,s=t[0].length,a=t.length,u=a,c=r(a),l=1/0,f=[];u--;){var h=t[u];u&&e&&(h=je(h,Ge(e))),l=yn(h.length,l),c[u]=!n&&(e||s>=120&&h.length>=120)?new Vn(u&&h):i}h=t[0];var d=-1,p=c[0];t:for(;++d=a?u:u*("desc"==n[r]?-1:1)}return t.index-e.index}(t,e,n)}));r--;)t[r]=t[r].value;return t}(i)}function Ur(t,e,n){for(var r=-1,i=e.length,o={};++r-1;)a!==t&&Kt.call(a,u,1),Kt.call(t,u,1);return t}function Wr(t,e){for(var n=t?e.length:0,r=n-1;n--;){var i=e[n];if(n==r||i!==o){var o=i;vo(i)?Kt.call(t,i,1):ui(t,i)}}return t}function zr(t,e){return t+de(bn()*(e-t+1))}function Vr(t,e){var n="";if(!t||e<1||e>f)return n;do{e%2&&(n+=t),(e=de(e/2))&&(t+=t)}while(e);return n}function Kr(t,e){return Fo(Eo(t,e,nu),t+"")}function Yr(t){return Gn(Ia(t))}function Gr(t,e){var n=Ia(t);return Po(n,or(e,0,n.length))}function Jr(t,e,n,r){if(!Qs(t))return t;for(var o=-1,s=(e=vi(e,t)).length,a=s-1,u=t;null!=u&&++oo?0:o+e),(n=n>o?o:n)<0&&(n+=o),o=e>n?0:n-e>>>0,e>>>=0;for(var s=r(o);++i>>1,s=t[o];null!==s&&!aa(s)&&(n?s<=e:s=200){var c=e?null:Vi(t);if(c)return un(c);s=!1,i=Xe,u=new Vn}else u=e?[]:a;t:for(;++r=r?t:ti(t,e,n)}var _i=se||function(t){return fe.clearTimeout(t)};function bi(t,e){if(e)return t.slice();var n=t.length,r=Ht?Ht(n):new t.constructor(n);return t.copy(r),r}function Ci(t){var e=new t.constructor(t.byteLength);return new Ut(e).set(new Ut(t)),e}function wi(t,e){var n=e?Ci(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}function ki(t,e){if(t!==e){var n=t!==i,r=null===t,o=t==t,s=aa(t),a=e!==i,u=null===e,c=e==e,l=aa(e);if(!u&&!l&&!s&&t>e||s&&a&&c&&!u&&!l||r&&a&&c||!n&&c||!o)return 1;if(!r&&!s&&!l&&t1?n[o-1]:i,a=o>2?n[2]:i;for(s=t.length>3&&"function"==typeof s?(o--,s):i,a&&yo(n[0],n[1],a)&&(s=o<3?i:s,o=1),e=Et(e);++r-1?o[s?e[a]:a]:i}}function Li(t){return Qi((function(e){var n=e.length,r=n,s=qn.prototype.thru;for(t&&e.reverse();r--;){var a=e[r];if("function"!=typeof a)throw new xt(o);if(s&&!u&&"wrapper"==ro(a))var u=new qn([],!0)}for(r=u?r:n;++r1&&b.reverse(),d&&f<_&&(b.length=f),this&&this!==fe&&this instanceof c&&(S=m||$i(S)),S.apply(A,b)}}function Di(t,e){return function(n,r){return function(t,e,n,r){return mr(t,(function(t,i,o){e(r,n(t),i,o)})),r}(n,t,e(r),{})}}function Ii(t,e){return function(n,r){var o;if(n===i&&r===i)return e;if(n!==i&&(o=n),r!==i){if(o===i)return r;"string"==typeof n||"string"==typeof r?(n=si(n),r=si(r)):(n=oi(n),r=oi(r)),o=t(n,r)}return o}}function Bi(t){return Qi((function(e){return e=je(e,Ge(oo())),Kr((function(n){var r=this;return t(e,(function(t){return ke(t,r,n)}))}))}))}function qi(t,e){var n=(e=e===i?" ":si(e)).length;if(n<2)return n?Vr(e,t):e;var r=Vr(e,he(t/ln(e)));return rn(e)?mi(fn(r),0,t).join(""):r.slice(0,t)}function Ui(t){return function(e,n,o){return o&&"number"!=typeof o&&yo(e,n,o)&&(n=o=i),e=ha(e),n===i?(n=e,e=0):n=ha(n),function(t,e,n,i){for(var o=-1,s=vn(he((e-t)/(n||1)),0),a=r(s);s--;)a[i?s:++o]=t,t+=n;return a}(e,n,o=o===i?eu))return!1;var l=s.get(t),f=s.get(e);if(l&&f)return l==e&&f==t;var h=-1,d=!0,p=2&n?new Vn:i;for(s.set(t,e),s.set(e,t);++h-1&&t%1==0&&t1?"& ":"")+e[r],e=e.join(n>2?", ":" "),t.replace(ot,"{\n/* [wrapped with "+e+"] */\n")}(r,function(t,e){return Ae(p,(function(n){var r="_."+n[0];e&n[1]&&!Fe(t,r)&&t.push(r)})),t.sort()}(function(t){var e=t.match(st);return e?e[1].split(at):[]}(r),n)))}function jo(t){var e=0,n=0;return function(){var r=mn(),o=16-(r-n);if(n=r,o>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(i,arguments)}}function Po(t,e){var n=-1,r=t.length,o=r-1;for(e=e===i?r:e;++n1?t[e-1]:i;return n="function"==typeof n?(t.pop(),n):i,is(t,n)}));function fs(t){var e=Dn(t);return e.__chain__=!0,e}function hs(t,e){return e(t)}var ds=Qi((function(t){var e=t.length,n=e?t[0]:0,r=this.__wrapped__,o=function(e){return ir(e,t)};return!(e>1||this.__actions__.length)&&r instanceof Un&&vo(n)?((r=r.slice(n,+n+(e?1:0))).__actions__.push({func:hs,args:[o],thisArg:i}),new qn(r,this.__chain__).thru((function(t){return e&&!t.length&&t.push(i),t}))):this.thru(o)})),ps=Oi((function(t,e,n){Rt.call(t,n)?++t[n]:rr(t,n,1)})),gs=Mi(Uo),vs=Mi(Ho);function ys(t,e){return(Hs(t)?Ae:lr)(t,oo(e,3))}function ms(t,e){return(Hs(t)?Se:fr)(t,oo(e,3))}var _s=Oi((function(t,e,n){Rt.call(t,n)?t[n].push(e):rr(t,n,[e])})),bs=Kr((function(t,e,n){var i=-1,o="function"==typeof e,s=zs(t)?r(t.length):[];return lr(t,(function(t){s[++i]=o?ke(e,t,n):Or(t,e,n)})),s})),Cs=Oi((function(t,e,n){rr(t,n,e)}));function ws(t,e){return(Hs(t)?je:Lr)(t,oo(e,3))}var ks=Oi((function(t,e,n){t[n?0:1].push(e)}),(function(){return[[],[]]})),Es=Kr((function(t,e){if(null==t)return[];var n=e.length;return n>1&&yo(t,e[0],e[1])?e=[]:n>2&&yo(e[0],e[1],e[2])&&(e=[e[0]]),qr(t,gr(e,1),[])})),As=ce||function(){return fe.Date.now()};function Ss(t,e,n){return e=n?i:e,e=t&&null==e?t.length:e,Yi(t,c,i,i,i,i,e)}function xs(t,e){var n;if("function"!=typeof e)throw new xt(o);return t=da(t),function(){return--t>0&&(n=e.apply(this,arguments)),t<=1&&(e=i),n}}var Os=Kr((function(t,e,n){var r=1;if(n.length){var i=an(n,io(Os));r|=u}return Yi(t,r,e,n,i)})),Fs=Kr((function(t,e,n){var r=3;if(n.length){var i=an(n,io(Fs));r|=u}return Yi(e,r,t,n,i)}));function Ts(t,e,n){var r,s,a,u,c,l,f=0,h=!1,d=!1,p=!0;if("function"!=typeof t)throw new xt(o);function g(e){var n=r,o=s;return r=s=i,f=e,u=t.apply(o,n)}function v(t){var n=t-l;return l===i||n>=e||n<0||d&&t-f>=a}function y(){var t=As();if(v(t))return m(t);c=Oo(y,function(t){var n=e-(t-l);return d?yn(n,a-(t-f)):n}(t))}function m(t){return c=i,p&&r?g(t):(r=s=i,u)}function _(){var t=As(),n=v(t);if(r=arguments,s=this,l=t,n){if(c===i)return function(t){return f=t,c=Oo(y,e),h?g(t):u}(l);if(d)return _i(c),c=Oo(y,e),g(l)}return c===i&&(c=Oo(y,e)),u}return e=ga(e)||0,Qs(n)&&(h=!!n.leading,a=(d="maxWait"in n)?vn(ga(n.maxWait)||0,e):a,p="trailing"in n?!!n.trailing:p),_.cancel=function(){c!==i&&_i(c),f=0,r=l=s=c=i},_.flush=function(){return c===i?u:m(As())},_}var js=Kr((function(t,e){return ur(t,1,e)})),Ps=Kr((function(t,e,n){return ur(t,ga(e)||0,n)}));function Rs(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new xt(o);var n=function(){var r=arguments,i=e?e.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var s=t.apply(this,r);return n.cache=o.set(i,s)||o,s};return n.cache=new(Rs.Cache||zn),n}function $s(t){if("function"!=typeof t)throw new xt(o);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)}}Rs.Cache=zn;var Ms=yi((function(t,e){var n=(e=1==e.length&&Hs(e[0])?je(e[0],Ge(oo())):je(gr(e,1),Ge(oo()))).length;return Kr((function(r){for(var i=-1,o=yn(r.length,n);++i=e})),Us=Fr(function(){return arguments}())?Fr:function(t){return ta(t)&&Rt.call(t,"callee")&&!Vt.call(t,"callee")},Hs=r.isArray,Ws=ye?Ge(ye):function(t){return ta(t)&&kr(t)==j};function zs(t){return null!=t&&Zs(t.length)&&!Js(t)}function Vs(t){return ta(t)&&zs(t)}var Ks=ve||gu,Ys=me?Ge(me):function(t){return ta(t)&&kr(t)==m};function Gs(t){if(!ta(t))return!1;var e=kr(t);return e==_||"[object DOMException]"==e||"string"==typeof t.message&&"string"==typeof t.name&&!ra(t)}function Js(t){if(!Qs(t))return!1;var e=kr(t);return e==b||e==C||"[object AsyncFunction]"==e||"[object Proxy]"==e}function Xs(t){return"number"==typeof t&&t==da(t)}function Zs(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=f}function Qs(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function ta(t){return null!=t&&"object"==typeof t}var ea=_e?Ge(_e):function(t){return ta(t)&&fo(t)==w};function na(t){return"number"==typeof t||ta(t)&&kr(t)==k}function ra(t){if(!ta(t)||kr(t)!=E)return!1;var e=Wt(t);if(null===e)return!0;var n=Rt.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&Pt.call(n)==Nt}var ia=be?Ge(be):function(t){return ta(t)&&kr(t)==S},oa=Ce?Ge(Ce):function(t){return ta(t)&&fo(t)==x};function sa(t){return"string"==typeof t||!Hs(t)&&ta(t)&&kr(t)==O}function aa(t){return"symbol"==typeof t||ta(t)&&kr(t)==F}var ua=we?Ge(we):function(t){return ta(t)&&Zs(t.length)&&!!ie[kr(t)]},ca=Hi(Mr),la=Hi((function(t,e){return t<=e}));function fa(t){if(!t)return[];if(zs(t))return sa(t)?fn(t):Si(t);if(Gt&&t[Gt])return function(t){for(var e,n=[];!(e=t.next()).done;)n.push(e.value);return n}(t[Gt]());var e=fo(t);return(e==w?on:e==x?un:Ia)(t)}function ha(t){return t?(t=ga(t))===l||t===-1/0?17976931348623157e292*(t<0?-1:1):t==t?t:0:0===t?t:0}function da(t){var e=ha(t),n=e%1;return e==e?n?e-n:e:0}function pa(t){return t?or(da(t),0,d):0}function ga(t){if("number"==typeof t)return t;if(aa(t))return h;if(Qs(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=Qs(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=Ye(t);var n=pt.test(t);return n||vt.test(t)?ue(t.slice(2),n?2:8):dt.test(t)?h:+t}function va(t){return xi(t,ja(t))}function ya(t){return null==t?"":si(t)}var ma=Fi((function(t,e){if(Co(e)||zs(e))xi(e,Ta(e),t);else for(var n in e)Rt.call(e,n)&&Qn(t,n,e[n])})),_a=Fi((function(t,e){xi(e,ja(e),t)})),ba=Fi((function(t,e,n,r){xi(e,ja(e),t,r)})),Ca=Fi((function(t,e,n,r){xi(e,Ta(e),t,r)})),wa=Qi(ir),ka=Kr((function(t,e){t=Et(t);var n=-1,r=e.length,o=r>2?e[2]:i;for(o&&yo(e[0],e[1],o)&&(r=1);++n1),e})),xi(t,eo(t),n),r&&(n=sr(n,7,Xi));for(var i=e.length;i--;)ui(n,e[i]);return n})),Ma=Qi((function(t,e){return null==t?{}:function(t,e){return Ur(t,e,(function(e,n){return Sa(t,n)}))}(t,e)}));function La(t,e){if(null==t)return{};var n=je(eo(t),(function(t){return[t]}));return e=oo(e),Ur(t,n,(function(t,n){return e(t,n[0])}))}var Na=Ki(Ta),Da=Ki(ja);function Ia(t){return null==t?[]:Je(t,Ta(t))}var Ba=Ri((function(t,e,n){return e=e.toLowerCase(),t+(n?qa(e):e)}));function qa(t){return Ga(ya(t).toLowerCase())}function Ua(t){return(t=ya(t))&&t.replace(mt,tn).replace(Xt,"")}var Ha=Ri((function(t,e,n){return t+(n?"-":"")+e.toLowerCase()})),Wa=Ri((function(t,e,n){return t+(n?" ":"")+e.toLowerCase()})),za=Pi("toLowerCase"),Va=Ri((function(t,e,n){return t+(n?"_":"")+e.toLowerCase()})),Ka=Ri((function(t,e,n){return t+(n?" ":"")+Ga(e)})),Ya=Ri((function(t,e,n){return t+(n?" ":"")+e.toUpperCase()})),Ga=Pi("toUpperCase");function Ja(t,e,n){return t=ya(t),(e=n?i:e)===i?function(t){return ee.test(t)}(t)?function(t){return t.match(Qt)||[]}(t):function(t){return t.match(ut)||[]}(t):t.match(e)||[]}var Xa=Kr((function(t,e){try{return ke(t,i,e)}catch(t){return Gs(t)?t:new Ct(t)}})),Za=Qi((function(t,e){return Ae(e,(function(e){e=Lo(e),rr(t,e,Os(t[e],t))})),t}));function Qa(t){return function(){return t}}var tu=Li(),eu=Li(!0);function nu(t){return t}function ru(t){return Rr("function"==typeof t?t:sr(t,1))}var iu=Kr((function(t,e){return function(n){return Or(n,t,e)}})),ou=Kr((function(t,e){return function(n){return Or(t,n,e)}}));function su(t,e,n){var r=Ta(e),i=br(e,r);null!=n||Qs(e)&&(i.length||!r.length)||(n=e,e=t,t=this,i=br(e,Ta(e)));var o=!(Qs(n)&&"chain"in n&&!n.chain),s=Js(t);return Ae(i,(function(n){var r=e[n];t[n]=r,s&&(t.prototype[n]=function(){var e=this.__chain__;if(o||e){var n=t(this.__wrapped__);return(n.__actions__=Si(this.__actions__)).push({func:r,args:arguments,thisArg:t}),n.__chain__=e,n}return r.apply(t,Pe([this.value()],arguments))})})),t}function au(){}var uu=Bi(je),cu=Bi(xe),lu=Bi(Me);function fu(t){return mo(t)?He(Lo(t)):function(t){return function(e){return Cr(e,t)}}(t)}var hu=Ui(),du=Ui(!0);function pu(){return[]}function gu(){return!1}var vu,yu=Ii((function(t,e){return t+e}),0),mu=zi("ceil"),_u=Ii((function(t,e){return t/e}),1),bu=zi("floor"),Cu=Ii((function(t,e){return t*e}),1),wu=zi("round"),ku=Ii((function(t,e){return t-e}),0);return Dn.after=function(t,e){if("function"!=typeof e)throw new xt(o);return t=da(t),function(){if(--t<1)return e.apply(this,arguments)}},Dn.ary=Ss,Dn.assign=ma,Dn.assignIn=_a,Dn.assignInWith=ba,Dn.assignWith=Ca,Dn.at=wa,Dn.before=xs,Dn.bind=Os,Dn.bindAll=Za,Dn.bindKey=Fs,Dn.castArray=function(){if(!arguments.length)return[];var t=arguments[0];return Hs(t)?t:[t]},Dn.chain=fs,Dn.chunk=function(t,e,n){e=(n?yo(t,e,n):e===i)?1:vn(da(e),0);var o=null==t?0:t.length;if(!o||e<1)return[];for(var s=0,a=0,u=r(he(o/e));so?0:o+n),(r=r===i||r>o?o:da(r))<0&&(r+=o),r=n>r?0:pa(r);n>>0)?(t=ya(t))&&("string"==typeof e||null!=e&&!ia(e))&&!(e=si(e))&&rn(t)?mi(fn(t),0,n):t.split(e,n):[]},Dn.spread=function(t,e){if("function"!=typeof t)throw new xt(o);return e=null==e?0:vn(da(e),0),Kr((function(n){var r=n[e],i=mi(n,0,e);return r&&Pe(i,r),ke(t,this,i)}))},Dn.tail=function(t){var e=null==t?0:t.length;return e?ti(t,1,e):[]},Dn.take=function(t,e,n){return t&&t.length?ti(t,0,(e=n||e===i?1:da(e))<0?0:e):[]},Dn.takeRight=function(t,e,n){var r=null==t?0:t.length;return r?ti(t,(e=r-(e=n||e===i?1:da(e)))<0?0:e,r):[]},Dn.takeRightWhile=function(t,e){return t&&t.length?li(t,oo(e,3),!1,!0):[]},Dn.takeWhile=function(t,e){return t&&t.length?li(t,oo(e,3)):[]},Dn.tap=function(t,e){return e(t),t},Dn.throttle=function(t,e,n){var r=!0,i=!0;if("function"!=typeof t)throw new xt(o);return Qs(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),Ts(t,e,{leading:r,maxWait:e,trailing:i})},Dn.thru=hs,Dn.toArray=fa,Dn.toPairs=Na,Dn.toPairsIn=Da,Dn.toPath=function(t){return Hs(t)?je(t,Lo):aa(t)?[t]:Si(Mo(ya(t)))},Dn.toPlainObject=va,Dn.transform=function(t,e,n){var r=Hs(t),i=r||Ks(t)||ua(t);if(e=oo(e,4),null==n){var o=t&&t.constructor;n=i?r?new o:[]:Qs(t)&&Js(o)?In(Wt(t)):{}}return(i?Ae:mr)(t,(function(t,r,i){return e(n,t,r,i)})),n},Dn.unary=function(t){return Ss(t,1)},Dn.union=ts,Dn.unionBy=es,Dn.unionWith=ns,Dn.uniq=function(t){return t&&t.length?ai(t):[]},Dn.uniqBy=function(t,e){return t&&t.length?ai(t,oo(e,2)):[]},Dn.uniqWith=function(t,e){return e="function"==typeof e?e:i,t&&t.length?ai(t,i,e):[]},Dn.unset=function(t,e){return null==t||ui(t,e)},Dn.unzip=rs,Dn.unzipWith=is,Dn.update=function(t,e,n){return null==t?t:ci(t,e,gi(n))},Dn.updateWith=function(t,e,n,r){return r="function"==typeof r?r:i,null==t?t:ci(t,e,gi(n),r)},Dn.values=Ia,Dn.valuesIn=function(t){return null==t?[]:Je(t,ja(t))},Dn.without=os,Dn.words=Ja,Dn.wrap=function(t,e){return Ls(gi(e),t)},Dn.xor=ss,Dn.xorBy=as,Dn.xorWith=us,Dn.zip=cs,Dn.zipObject=function(t,e){return di(t||[],e||[],Qn)},Dn.zipObjectDeep=function(t,e){return di(t||[],e||[],Jr)},Dn.zipWith=ls,Dn.entries=Na,Dn.entriesIn=Da,Dn.extend=_a,Dn.extendWith=ba,su(Dn,Dn),Dn.add=yu,Dn.attempt=Xa,Dn.camelCase=Ba,Dn.capitalize=qa,Dn.ceil=mu,Dn.clamp=function(t,e,n){return n===i&&(n=e,e=i),n!==i&&(n=(n=ga(n))==n?n:0),e!==i&&(e=(e=ga(e))==e?e:0),or(ga(t),e,n)},Dn.clone=function(t){return sr(t,4)},Dn.cloneDeep=function(t){return sr(t,5)},Dn.cloneDeepWith=function(t,e){return sr(t,5,e="function"==typeof e?e:i)},Dn.cloneWith=function(t,e){return sr(t,4,e="function"==typeof e?e:i)},Dn.conformsTo=function(t,e){return null==e||ar(t,e,Ta(e))},Dn.deburr=Ua,Dn.defaultTo=function(t,e){return null==t||t!=t?e:t},Dn.divide=_u,Dn.endsWith=function(t,e,n){t=ya(t),e=si(e);var r=t.length,o=n=n===i?r:or(da(n),0,r);return(n-=e.length)>=0&&t.slice(n,o)==e},Dn.eq=Is,Dn.escape=function(t){return(t=ya(t))&&Y.test(t)?t.replace(V,en):t},Dn.escapeRegExp=function(t){return(t=ya(t))&&nt.test(t)?t.replace(et,"\\$&"):t},Dn.every=function(t,e,n){var r=Hs(t)?xe:hr;return n&&yo(t,e,n)&&(e=i),r(t,oo(e,3))},Dn.find=gs,Dn.findIndex=Uo,Dn.findKey=function(t,e){return Ne(t,oo(e,3),mr)},Dn.findLast=vs,Dn.findLastIndex=Ho,Dn.findLastKey=function(t,e){return Ne(t,oo(e,3),_r)},Dn.floor=bu,Dn.forEach=ys,Dn.forEachRight=ms,Dn.forIn=function(t,e){return null==t?t:vr(t,oo(e,3),ja)},Dn.forInRight=function(t,e){return null==t?t:yr(t,oo(e,3),ja)},Dn.forOwn=function(t,e){return t&&mr(t,oo(e,3))},Dn.forOwnRight=function(t,e){return t&&_r(t,oo(e,3))},Dn.get=Aa,Dn.gt=Bs,Dn.gte=qs,Dn.has=function(t,e){return null!=t&&ho(t,e,Ar)},Dn.hasIn=Sa,Dn.head=zo,Dn.identity=nu,Dn.includes=function(t,e,n,r){t=zs(t)?t:Ia(t),n=n&&!r?da(n):0;var i=t.length;return n<0&&(n=vn(i+n,0)),sa(t)?n<=i&&t.indexOf(e,n)>-1:!!i&&Ie(t,e,n)>-1},Dn.indexOf=function(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=null==n?0:da(n);return i<0&&(i=vn(r+i,0)),Ie(t,e,i)},Dn.inRange=function(t,e,n){return e=ha(e),n===i?(n=e,e=0):n=ha(n),function(t,e,n){return t>=yn(e,n)&&t=-9007199254740991&&t<=f},Dn.isSet=oa,Dn.isString=sa,Dn.isSymbol=aa,Dn.isTypedArray=ua,Dn.isUndefined=function(t){return t===i},Dn.isWeakMap=function(t){return ta(t)&&fo(t)==T},Dn.isWeakSet=function(t){return ta(t)&&"[object WeakSet]"==kr(t)},Dn.join=function(t,e){return null==t?"":We.call(t,e)},Dn.kebabCase=Ha,Dn.last=Go,Dn.lastIndexOf=function(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var o=r;return n!==i&&(o=(o=da(n))<0?vn(r+o,0):yn(o,r-1)),e==e?function(t,e,n){for(var r=n+1;r--;)if(t[r]===e)return r;return r}(t,e,o):De(t,qe,o,!0)},Dn.lowerCase=Wa,Dn.lowerFirst=za,Dn.lt=ca,Dn.lte=la,Dn.max=function(t){return t&&t.length?dr(t,nu,Er):i},Dn.maxBy=function(t,e){return t&&t.length?dr(t,oo(e,2),Er):i},Dn.mean=function(t){return Ue(t,nu)},Dn.meanBy=function(t,e){return Ue(t,oo(e,2))},Dn.min=function(t){return t&&t.length?dr(t,nu,Mr):i},Dn.minBy=function(t,e){return t&&t.length?dr(t,oo(e,2),Mr):i},Dn.stubArray=pu,Dn.stubFalse=gu,Dn.stubObject=function(){return{}},Dn.stubString=function(){return""},Dn.stubTrue=function(){return!0},Dn.multiply=Cu,Dn.nth=function(t,e){return t&&t.length?Br(t,da(e)):i},Dn.noConflict=function(){return fe._===this&&(fe._=Dt),this},Dn.noop=au,Dn.now=As,Dn.pad=function(t,e,n){t=ya(t);var r=(e=da(e))?ln(t):0;if(!e||r>=e)return t;var i=(e-r)/2;return qi(de(i),n)+t+qi(he(i),n)},Dn.padEnd=function(t,e,n){t=ya(t);var r=(e=da(e))?ln(t):0;return e&&re){var r=t;t=e,e=r}if(n||t%1||e%1){var o=bn();return yn(t+o*(e-t+ae("1e-"+((o+"").length-1))),e)}return zr(t,e)},Dn.reduce=function(t,e,n){var r=Hs(t)?Re:ze,i=arguments.length<3;return r(t,oo(e,4),n,i,lr)},Dn.reduceRight=function(t,e,n){var r=Hs(t)?$e:ze,i=arguments.length<3;return r(t,oo(e,4),n,i,fr)},Dn.repeat=function(t,e,n){return e=(n?yo(t,e,n):e===i)?1:da(e),Vr(ya(t),e)},Dn.replace=function(){var t=arguments,e=ya(t[0]);return t.length<3?e:e.replace(t[1],t[2])},Dn.result=function(t,e,n){var r=-1,o=(e=vi(e,t)).length;for(o||(o=1,t=i);++rf)return[];var n=d,r=yn(t,d);e=oo(e),t-=d;for(var i=Ke(r,e);++n=s)return t;var u=n-ln(r);if(u<1)return r;var c=a?mi(a,0,u).join(""):t.slice(0,u);if(o===i)return c+r;if(a&&(u+=c.length-u),ia(o)){if(t.slice(u).search(o)){var l,f=c;for(o.global||(o=At(o.source,ya(ht.exec(o))+"g")),o.lastIndex=0;l=o.exec(f);)var h=l.index;c=c.slice(0,h===i?u:h)}}else if(t.indexOf(si(o),u)!=u){var d=c.lastIndexOf(o);d>-1&&(c=c.slice(0,d))}return c+r},Dn.unescape=function(t){return(t=ya(t))&&K.test(t)?t.replace(z,dn):t},Dn.uniqueId=function(t){var e=++$t;return ya(t)+e},Dn.upperCase=Ya,Dn.upperFirst=Ga,Dn.each=ys,Dn.eachRight=ms,Dn.first=zo,su(Dn,(vu={},mr(Dn,(function(t,e){Rt.call(Dn.prototype,e)||(vu[e]=t)})),vu),{chain:!1}),Dn.VERSION="4.17.21",Ae(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(t){Dn[t].placeholder=Dn})),Ae(["drop","take"],(function(t,e){Un.prototype[t]=function(n){n=n===i?1:vn(da(n),0);var r=this.__filtered__&&!e?new Un(this):this.clone();return r.__filtered__?r.__takeCount__=yn(n,r.__takeCount__):r.__views__.push({size:yn(n,d),type:t+(r.__dir__<0?"Right":"")}),r},Un.prototype[t+"Right"]=function(e){return this.reverse()[t](e).reverse()}})),Ae(["filter","map","takeWhile"],(function(t,e){var n=e+1,r=1==n||3==n;Un.prototype[t]=function(t){var e=this.clone();return e.__iteratees__.push({iteratee:oo(t,3),type:n}),e.__filtered__=e.__filtered__||r,e}})),Ae(["head","last"],(function(t,e){var n="take"+(e?"Right":"");Un.prototype[t]=function(){return this[n](1).value()[0]}})),Ae(["initial","tail"],(function(t,e){var n="drop"+(e?"":"Right");Un.prototype[t]=function(){return this.__filtered__?new Un(this):this[n](1)}})),Un.prototype.compact=function(){return this.filter(nu)},Un.prototype.find=function(t){return this.filter(t).head()},Un.prototype.findLast=function(t){return this.reverse().find(t)},Un.prototype.invokeMap=Kr((function(t,e){return"function"==typeof t?new Un(this):this.map((function(n){return Or(n,t,e)}))})),Un.prototype.reject=function(t){return this.filter($s(oo(t)))},Un.prototype.slice=function(t,e){t=da(t);var n=this;return n.__filtered__&&(t>0||e<0)?new Un(n):(t<0?n=n.takeRight(-t):t&&(n=n.drop(t)),e!==i&&(n=(e=da(e))<0?n.dropRight(-e):n.take(e-t)),n)},Un.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},Un.prototype.toArray=function(){return this.take(d)},mr(Un.prototype,(function(t,e){var n=/^(?:filter|find|map|reject)|While$/.test(e),r=/^(?:head|last)$/.test(e),o=Dn[r?"take"+("last"==e?"Right":""):e],s=r||/^find/.test(e);o&&(Dn.prototype[e]=function(){var e=this.__wrapped__,a=r?[1]:arguments,u=e instanceof Un,c=a[0],l=u||Hs(e),f=function(t){var e=o.apply(Dn,Pe([t],a));return r&&h?e[0]:e};l&&n&&"function"==typeof c&&1!=c.length&&(u=l=!1);var h=this.__chain__,d=!!this.__actions__.length,p=s&&!h,g=u&&!d;if(!s&&l){e=g?e:new Un(this);var v=t.apply(e,a);return v.__actions__.push({func:hs,args:[f],thisArg:i}),new qn(v,h)}return p&&g?t.apply(this,a):(v=this.thru(f),p?r?v.value()[0]:v.value():v)})})),Ae(["pop","push","shift","sort","splice","unshift"],(function(t){var e=Ot[t],n=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",r=/^(?:pop|shift)$/.test(t);Dn.prototype[t]=function(){var t=arguments;if(r&&!this.__chain__){var i=this.value();return e.apply(Hs(i)?i:[],t)}return this[n]((function(n){return e.apply(Hs(n)?n:[],t)}))}})),mr(Un.prototype,(function(t,e){var n=Dn[e];if(n){var r=n.name+"";Rt.call(Fn,r)||(Fn[r]=[]),Fn[r].push({name:e,func:n})}})),Fn[Ni(i,2).name]=[{name:"wrapper",func:i}],Un.prototype.clone=function(){var t=new Un(this.__wrapped__);return t.__actions__=Si(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=Si(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=Si(this.__views__),t},Un.prototype.reverse=function(){if(this.__filtered__){var t=new Un(this);t.__dir__=-1,t.__filtered__=!0}else(t=this.clone()).__dir__*=-1;return t},Un.prototype.value=function(){var t=this.__wrapped__.value(),e=this.__dir__,n=Hs(t),r=e<0,i=n?t.length:0,o=function(t,e,n){for(var r=-1,i=n.length;++r=this.__values__.length;return{done:t,value:t?i:this.__values__[this.__index__++]}},Dn.prototype.plant=function(t){for(var e,n=this;n instanceof Bn;){var r=Do(n);r.__index__=0,r.__values__=i,e?o.__wrapped__=r:e=r;var o=r;n=n.__wrapped__}return o.__wrapped__=t,e},Dn.prototype.reverse=function(){var t=this.__wrapped__;if(t instanceof Un){var e=t;return this.__actions__.length&&(e=new Un(this)),(e=e.reverse()).__actions__.push({func:hs,args:[Qo],thisArg:i}),new qn(e,this.__chain__)}return this.thru(Qo)},Dn.prototype.toJSON=Dn.prototype.valueOf=Dn.prototype.value=function(){return fi(this.__wrapped__,this.__actions__)},Dn.prototype.first=Dn.prototype.head,Gt&&(Dn.prototype[Gt]=function(){return this}),Dn}();fe._=pn,(r=function(){return pn}.call(e,n,e,t))===i||(t.exports=r)}.call(this)},3669:(t,e,n)=>{e.formatArgs=function(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+t.exports.humanize(this.diff),!this.useColors)return;const n="color: "+this.color;e.splice(1,0,n,"color: inherit");let r=0,i=0;e[0].replace(/%[a-zA-Z%]/g,(t=>{"%%"!==t&&(r++,"%c"===t&&(i=r))})),e.splice(i,0,n)},e.save=function(t){try{t?e.storage.setItem("debug",t):e.storage.removeItem("debug")}catch(t){}},e.load=function(){let t;try{t=e.storage.getItem("debug")}catch(t){}return!t&&"undefined"!=typeof process&&"env"in process&&(t=process.env.DEBUG),t},e.useColors=function(){return!("undefined"==typeof window||!window.process||"renderer"!==window.process.type&&!window.process.__nwjs)||("undefined"==typeof navigator||!navigator.userAgent||!navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))&&("undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))},e.storage=function(){try{return localStorage}catch(t){}}(),e.destroy=(()=>{let t=!1;return()=>{t||(t=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),e.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],e.log=console.debug||console.log||(()=>{}),t.exports=n(9231)(e);const{formatters:r}=t.exports;r.j=function(t){try{return JSON.stringify(t)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}},9231:(t,e,n)=>{t.exports=function(t){function e(t){let n,i,o,s=null;function a(...t){if(!a.enabled)return;const r=a,i=Number(new Date),o=i-(n||i);r.diff=o,r.prev=n,r.curr=i,n=i,t[0]=e.coerce(t[0]),"string"!=typeof t[0]&&t.unshift("%O");let s=0;t[0]=t[0].replace(/%([a-zA-Z%])/g,((n,i)=>{if("%%"===n)return"%";s++;const o=e.formatters[i];if("function"==typeof o){const e=t[s];n=o.call(r,e),t.splice(s,1),s--}return n})),e.formatArgs.call(r,t),(r.log||e.log).apply(r,t)}return a.namespace=t,a.useColors=e.useColors(),a.color=e.selectColor(t),a.extend=r,a.destroy=e.destroy,Object.defineProperty(a,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==s?s:(i!==e.namespaces&&(i=e.namespaces,o=e.enabled(t)),o),set:t=>{s=t}}),"function"==typeof e.init&&e.init(a),a}function r(t,n){const r=e(this.namespace+(void 0===n?":":n)+t);return r.log=this.log,r}function i(t){return t.toString().substring(2,t.toString().length-2).replace(/\.\*\?$/,"*")}return e.debug=e,e.default=e,e.coerce=function(t){return t instanceof Error?t.stack||t.message:t},e.disable=function(){const t=[...e.names.map(i),...e.skips.map(i).map((t=>"-"+t))].join(",");return e.enable(""),t},e.enable=function(t){let n;e.save(t),e.namespaces=t,e.names=[],e.skips=[];const r=("string"==typeof t?t:"").split(/[\s,]+/),i=r.length;for(n=0;n{e[n]=t[n]})),e.names=[],e.skips=[],e.formatters={},e.selectColor=function(t){let n=0;for(let e=0;e{var e=1e3,n=60*e,r=60*n,i=24*r;function o(t,e,n,r){var i=e>=1.5*n;return Math.round(t/n)+" "+r+(i?"s":"")}t.exports=function(t,s){s=s||{};var a,u,c=typeof t;if("string"===c&&t.length>0)return function(t){if(!((t=String(t)).length>100)){var o=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(t);if(o){var s=parseFloat(o[1]);switch((o[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*s;case"weeks":case"week":case"w":return 6048e5*s;case"days":case"day":case"d":return s*i;case"hours":case"hour":case"hrs":case"hr":case"h":return s*r;case"minutes":case"minute":case"mins":case"min":case"m":return s*n;case"seconds":case"second":case"secs":case"sec":case"s":return s*e;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return s;default:return}}}}(t);if("number"===c&&isFinite(t))return s.long?(a=t,(u=Math.abs(a))>=i?o(a,u,i,"day"):u>=r?o(a,u,r,"hour"):u>=n?o(a,u,n,"minute"):u>=e?o(a,u,e,"second"):a+" ms"):function(t){var o=Math.abs(t);return o>=i?Math.round(t/i)+"d":o>=r?Math.round(t/r)+"h":o>=n?Math.round(t/n)+"m":o>=e?Math.round(t/e)+"s":t+"ms"}(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))}},1618:(t,e,n)=>{e.formatArgs=function(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+t.exports.humanize(this.diff),!this.useColors)return;const n="color: "+this.color;e.splice(1,0,n,"color: inherit");let r=0,i=0;e[0].replace(/%[a-zA-Z%]/g,(t=>{"%%"!==t&&(r++,"%c"===t&&(i=r))})),e.splice(i,0,n)},e.save=function(t){try{t?e.storage.setItem("debug",t):e.storage.removeItem("debug")}catch(t){}},e.load=function(){let t;try{t=e.storage.getItem("debug")}catch(t){}return!t&&"undefined"!=typeof process&&"env"in process&&(t=process.env.DEBUG),t},e.useColors=function(){return!("undefined"==typeof window||!window.process||"renderer"!==window.process.type&&!window.process.__nwjs)||("undefined"==typeof navigator||!navigator.userAgent||!navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))&&("undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))},e.storage=function(){try{return localStorage}catch(t){}}(),e.destroy=(()=>{let t=!1;return()=>{t||(t=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),e.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],e.log=console.debug||console.log||(()=>{}),t.exports=n(5224)(e);const{formatters:r}=t.exports;r.j=function(t){try{return JSON.stringify(t)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}},5224:(t,e,n)=>{t.exports=function(t){function e(t){let n,i,o,s=null;function a(...t){if(!a.enabled)return;const r=a,i=Number(new Date),o=i-(n||i);r.diff=o,r.prev=n,r.curr=i,n=i,t[0]=e.coerce(t[0]),"string"!=typeof t[0]&&t.unshift("%O");let s=0;t[0]=t[0].replace(/%([a-zA-Z%])/g,((n,i)=>{if("%%"===n)return"%";s++;const o=e.formatters[i];if("function"==typeof o){const e=t[s];n=o.call(r,e),t.splice(s,1),s--}return n})),e.formatArgs.call(r,t),(r.log||e.log).apply(r,t)}return a.namespace=t,a.useColors=e.useColors(),a.color=e.selectColor(t),a.extend=r,a.destroy=e.destroy,Object.defineProperty(a,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==s?s:(i!==e.namespaces&&(i=e.namespaces,o=e.enabled(t)),o),set:t=>{s=t}}),"function"==typeof e.init&&e.init(a),a}function r(t,n){const r=e(this.namespace+(void 0===n?":":n)+t);return r.log=this.log,r}function i(t){return t.toString().substring(2,t.toString().length-2).replace(/\.\*\?$/,"*")}return e.debug=e,e.default=e,e.coerce=function(t){return t instanceof Error?t.stack||t.message:t},e.disable=function(){const t=[...e.names.map(i),...e.skips.map(i).map((t=>"-"+t))].join(",");return e.enable(""),t},e.enable=function(t){let n;e.save(t),e.namespaces=t,e.names=[],e.skips=[];const r=("string"==typeof t?t:"").split(/[\s,]+/),i=r.length;for(n=0;n{e[n]=t[n]})),e.names=[],e.skips=[],e.formatters={},e.selectColor=function(t){let n=0;for(let e=0;e{var e=1e3,n=60*e,r=60*n,i=24*r;function o(t,e,n,r){var i=e>=1.5*n;return Math.round(t/n)+" "+r+(i?"s":"")}t.exports=function(t,s){s=s||{};var a,u,c=typeof t;if("string"===c&&t.length>0)return function(t){if(!((t=String(t)).length>100)){var o=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(t);if(o){var s=parseFloat(o[1]);switch((o[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*s;case"weeks":case"week":case"w":return 6048e5*s;case"days":case"day":case"d":return s*i;case"hours":case"hour":case"hrs":case"hr":case"h":return s*r;case"minutes":case"minute":case"mins":case"min":case"m":return s*n;case"seconds":case"second":case"secs":case"sec":case"s":return s*e;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return s;default:return}}}}(t);if("number"===c&&isFinite(t))return s.long?(a=t,(u=Math.abs(a))>=i?o(a,u,i,"day"):u>=r?o(a,u,r,"hour"):u>=n?o(a,u,n,"minute"):u>=e?o(a,u,e,"second"):a+" ms"):function(t){var o=Math.abs(t);return o>=i?Math.round(t/i)+"d":o>=r?Math.round(t/r)+"h":o>=n?Math.round(t/n)+"m":o>=e?Math.round(t/e)+"s":t+"ms"}(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))}},9336:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.configureChat=void 0;const i=r(n(3336));let o;function s(t){(0,i.default)("#chat-messages").html(t.map((t=>`
\n ${t.from}\n ${t.msg}\n
`)).join("\n")),(0,i.default)("#chat-messages").scrollTop((0,i.default)("#chat-messages")[0].scrollHeight)}function a(t){(0,i.default)("#chat-messages").append(`
\n ${t.from}\n ${t.msg}\n
`),(0,i.default)("#chat-messages").scrollTop((0,i.default)("#chat-messages")[0].scrollHeight)}e.configureChat=function(t){o=t,o.on("chathistory",s),o.on("chat",a),(0,i.default)("#chat-form").on("submit",(t=>{t.preventDefault(),t.stopPropagation();const e=(0,i.default)("#message").val().toString();e.length>0&&(o.emit("chat",e),(0,i.default)("#message").val(""))})),console.log("Chat Configured")}},3253:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CustomEventManager=void 0,e.CustomEventManager=class{constructor(){this.events={}}on(t,e){this.events[t]||(this.events[t]=[]),this.events[t].push(e)}emit(t,e=[]){this.events[t]&&this.events[t].forEach((t=>t.apply(null,e)))}}},5862:function(t,e){"use strict";var n=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,o){function s(t){try{u(r.next(t))}catch(t){o(t)}}function a(t){try{u(r.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}u((r=r.apply(t,e||[])).next())}))};function r(){return localStorage.getItem("authToken")}Object.defineProperty(e,"__esModule",{value:!0}),e.http=e.authToken=void 0,e.authToken=r,e.http={get:t=>n(void 0,void 0,void 0,(function*(){return(yield fetch(t,{headers:{"x-authtoken":r()}})).json()})),post:(t,e)=>n(void 0,void 0,void 0,(function*(){return(yield fetch(t,{method:"post",body:JSON.stringify(e),headers:{"x-authtoken":r(),"content-type":"application/json"}})).json()}))}},2174:function(t,e,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(e,n);i&&!("get"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,i)}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),i=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),o=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)"default"!==n&&Object.prototype.hasOwnProperty.call(t,n)&&r(e,t,n);return i(e,t),e},s=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,o){function s(t){try{u(r.next(t))}catch(t){o(t)}}function a(t){try{u(r.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}u((r=r.apply(t,e||[])).next())}))},a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const u=n(7046),c=a(n(3336)),l=n(4738),f=n(5862),h=n(3253),d=n(7429),p=n(6486),g=n(9502),v=n(9336),y=n(1916),m=o(n(7355)),_=new(n(8182).TimeManager),b=new Map,C=new h.CustomEventManager,w=(0,u.io)({extraHeaders:{"x-authtoken":(0,f.authToken)()}});function k(){const t=_.gradientName(),e=(0,c.default)("body");e.removeClass(Array.from(e[0].classList)).addClass(t),_.isNight()&&e.addClass("night")}function E(t){return``}function A(t,e,n,r=!0){let i=0;e>0&&(i=Math.floor(t/e*100));const o=r?`${i}% - `:"";return`
${o}${t}/${e}
`}function S(t,e,n,r){let i=0;e>0&&(i=Math.floor(t/e*100)),(0,c.default)(`#${n}`).css("background",`linear-gradient(to right, ${r}, ${r} ${i}%, transparent ${i}%, transparent)`).attr("title",`${i}% - ${t}/${e}`).html(`${t}/${e} - ${i}%`)}function x(){const t=b.get("player");(0,c.default)("#username").html(`${t.username}, level ${t.level} ${t.profession}`),S(t.hp,(0,l.maxHp)(t.constitution,t.level),"hp-bar","#ff7070"),S(t.exp,(0,l.expToLevel)(t.level+1),"exp-bar","#5997f9"),["strength","constitution","dexterity","intelligence","hp","exp"].forEach((e=>{(0,c.default)(`.${e}`).html(t[e])})),(0,c.default)(".maxHp").html((0,l.maxHp)(t.constitution,t.level).toString()),(0,c.default)(".expToLevel").html((0,l.expToLevel)(t.level+1).toString()),(0,c.default)(".gold").html(t.gold.toLocaleString()),"session"===t.account_type&&(0,c.default)("#signup-prompt").html('

Hey there! It looks like you\'re using a SESSION account. This allows you to play with away, but the account is tied to your current device, and will be lost if you ever clear your cookies.

\n

\n
\n \n \n
\n
\n \n \n
\n \n \n

').removeClass("hidden"),(0,c.default)("#extra-inventory-info").html(O())}function O(){const t=b.get("player");let e='';return l.StatDef.forEach((n=>{e+=`\n \n \n `})),e+=``,e+="
${n.display}\n ${t[n.id]}\n ${t.stat_points?function(t){return``}(n):""}\n
Stat Points${t.stat_points}
",e}function F(t){return t.map((t=>function(t,e){return`
\n
\n \n
\n
\n
${t.name}
\n
\n ${t.requirements.level?T("LVL",t.requirements.level):""}\n ${t.requirements.strength?T("STR",t.requirements.strength):""}\n ${t.requirements.constitution?T("CON",t.requirements.constitution):""}\n ${t.requirements.dexterity?T("DEX",t.requirements.dexterity):""}\n ${t.requirements.intelligence?T("INT",t.requirements.intelligence):""}\n ${T("PRF",t.profession)}\n
\n
\n ${t.boosts.strength?j("STR",t.boosts.strength):""}\n ${t.boosts.constitution?j("CON",t.boosts.constitution):""}\n ${t.boosts.dexterity?j("DEX",t.boosts.dexterity):""}\n ${t.boosts.intelligence?j("INT",t.boosts.intelligence):""}\n ${t.boosts.damage?j("DMG",t.boosts.damage):""}\n ${t.boosts.damage_mitigation?j("MIT",t.boosts.damage_mitigation)+"%":""}\n ${["WEAPON","SPELL"].includes(t.type)?"":A(t.currentAp,t.maxAp,"#7be67b")}\n
\n ${t.hasOwnProperty("id")?`
${t.cost.toLocaleString()}G
`:""}\n
\n
\n ${(t=>t.is_equipped?``:"ANY_HAND"===t.equipment_slot?`\n `:"LEFT_HAND"===t.equipment_slot?``:"RIGHT_HAND"===t.equipment_slot?``:(t.equipment_slot,``))(t)}\n
\n
`}(t))).join("\n")}function T(t,e,n){let r="";return n&&(r=n>=e?"success":"error"),`${t}: ${e.toLocaleString()}`}function j(t,e){let n="";return"number"==typeof e&&(n=e>0?"+":"-"),`${t}: 0?"success":"error"}">${n}${e}`}function P(t){const e=Math.floor(t.hp/t.maxHp*100);return`
\n
\n
\n \n
\n
\n
${t.name}
\n
${e}% - ${t.hp} / ${t.maxHp}
\n
\n
\n
\n \n \n \n \n
\n
\n
`}(0,v.configureChat)(w),k(),setInterval(k,6e4),w.on("connect",(()=>{console.log(`Connected: ${w.id}`)})),w.on("ready",(()=>{console.log("Server connection verified"),w.emit("inventory")})),w.on("server-stats",(t=>{(0,c.default)("#server-stats").html(`${t.onlinePlayers} players online`)})),(0,p.each)(m,(t=>{console.log(`Binding Event ${t.eventName}`),t instanceof y.SocketEvent?w.on(t.eventName,t.handler.bind(null,{cache:b,socket:w,events:C})):console.log("Skipped binding",t)})),w.on("calc:ap",(t=>{var e,n,r,i,o,s,a,u;const{ap:l}=t,f=`\n
\n ${E("helm")}\n ${A((null===(e=l.HEAD)||void 0===e?void 0:e.currentAp)||0,(null===(n=l.HEAD)||void 0===n?void 0:n.maxAp)||0,"#7be67b")}\n
\n
\n ${E("arms")}\n ${A((null===(r=l.ARMS)||void 0===r?void 0:r.currentAp)||0,(null===(i=l.ARMS)||void 0===i?void 0:i.maxAp)||0,"#7be67b")}\n
\n
\n ${E("chest")}\n ${A((null===(o=l.CHEST)||void 0===o?void 0:o.currentAp)||0,(null===(s=l.CHEST)||void 0===s?void 0:s.maxAp)||0,"#7be67b")}\n
\n
\n ${E("legs")}\n ${A((null===(a=l.LEGS)||void 0===a?void 0:a.currentAp)||0,(null===(u=l.LEGS)||void 0===u?void 0:u.maxAp)||0,"#7be67b")}\n
\n `;(0,c.default)("#ap-bar").html(f)})),C.on("tab:skills",(()=>{(0,c.default)("#skills").html(""),w.emit("skills")})),w.on("skills",(t=>{let e=`\n ${t.skills.map((t=>{const e=g.Skills.get(t.id),n=t.exp/e.expToLevel(t.level+1);return`\n \n \n \n \n `})).join("\n")}\n
${t.level.toLocaleString()}\n ${(100*n).toPrecision(2)}% to next level\n ${e.display}\n

${e.description}

\n
`;(0,c.default)("#skills").html(e)})),C.on("alert",(t=>{let e=(0,d.v4)();(0,c.default)("#alerts").append(`
${t.text}
`),setTimeout((()=>{(0,c.default)(`#alert-${e}`).remove()}),3e3)})),w.on("alert",(t=>{C.emit("alert",[t])})),w.on("authToken",(t=>{console.log(`recv auth token ${t}`),localStorage.setItem("authToken",t)})),w.on("player",(t=>{b.set("player",t),x()})),(0,c.default)("nav a").on("click",(t=>{t.preventDefault(),t.stopPropagation(),(0,c.default)(`#${(0,c.default)(t.target).data("container")}`).find(".tab").removeClass("active"),(0,c.default)(`#${(0,c.default)(t.target).data("section")}`).addClass("active"),"Settings"!==t.target.innerHTML&&((0,c.default)(t.target).closest("nav").find("a").removeClass("active"),(0,c.default)(t.target).addClass("active")),C.emit(`tab:${(0,c.default)(t.target).data("section")}`)})),C.on("tab:inventory",(()=>{w.emit("inventory")})),(0,c.default)("body").on("click","nav.filter",(t=>{t.preventDefault(),t.stopPropagation();const e=(0,c.default)(t.target),n=e.data("filter");(0,c.default)(".filter-result").removeClass("active").addClass("hidden"),(0,c.default)(`#filter_${n}`).addClass("active").removeClass("hidden"),e.closest("nav").find("a").removeClass("active"),e.addClass("active"),b.set("active-inventory-section",n)})),w.on("inventory",(t=>{b.get("player");const e=b.get("active-inventory-section")||"ARMOUR",n={ARMOUR:[],WEAPON:[],SPELL:[]};t.inventory.forEach((t=>{n[t.type].push(t)}));const r=`\n
\n
\n ${function(t){const e="https://via.placeholder.com/64x64",n=t.filter((t=>t.is_equipped)).reduce(((t,e)=>(t[e.equipment_slot]=e,t)),{});return`\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
\n \n ${n.HEAD?n.HEAD.name:"HEAD"}\n \n ${n.ARMS?n.ARMS.name:"ARMS"}\n
\n ${n.LEFT_HAND?n.LEFT_HAND.name:n.TWO_HANDED?n.TWO_HANDED.name:"L_HAND"}\n \n ${n.CHEST?n.CHEST.name:"CHEST"}\n \n ${n.RIGHT_HAND?n.RIGHT_HAND.name:n.TWO_HANDED?n.TWO_HANDED.name:"R_HAND"}\n
\n \n ${n.LEGS?n.LEGS.name:"LEGS"}\n \n
\n `}(t.inventory)}\n
\n ${O()}\n
\n
\n
\n \n
\n
\n ${F(n.ARMOUR)}\n
\n
\n ${F(n.WEAPON)}\n
\n
\n ${F(n.SPELL)}\n
\n
\n
\n
\n `;(0,c.default)("#inventory").html(r)})),(0,c.default)("body").on("click",".equip-item",(t=>{t.preventDefault(),t.stopPropagation();const e=(0,c.default)(t.target),n=e.data("id"),r=e.data("slot");w.emit("equip",{id:n,slot:r})})),(0,c.default)("body").on("click",".unequip-item",(t=>{t.preventDefault(),t.stopPropagation(),w.emit("unequip",{id:(0,c.default)(t.target).data("id")})})),C.on("renderMap",(function(t){return s(this,void 0,void 0,(function*(){if(!t||b.has("currentMapHTML"))return void(0,c.default)("#map").html(b.get("currentMapHTML"));t||console.error("oh no.. this got triggered without any city data"),(0,c.default)("#explore").css({"background-image":`linear-gradient(to left top, rgba(255,255,255,0) 0%,rgb(255,255,255) 100%), linear-gradient(to left, rgba(255, 255, 255, 0) 0%, rgb(255, 255, 255) 100%), url("/assets/img/map/${t.city.id}.jpeg")`});const e={SERVICES:[],STORES:[],EXPLORE:[]};t.locations.forEach((t=>{e[t.type].push(`${t.name}`)}));let n=`

${t.city.name}

\n
`;e.SERVICES.length&&(n+=`

Services

${e.SERVICES.join("
")}
`),e.STORES.length&&(n+=`

Stores

${e.STORES.join("
")}
`),e.EXPLORE.length&&(n+=`

Explore

${e.EXPLORE.join("
")}
`),n+=`\n
\n

Travel

\n ${t.paths.map((t=>`${t.ending_city_name}`)).join("
")}\n
\n
\n `,b.set("currentMapHTML",n),(0,c.default)("#map").html(n)}))})),w.on("city:stores",(t=>{let e=`
\n ${t.map((t=>function(t,e){const n=b.get("player");return`
\n
\n \n
\n
\n
${t.name}${"TWO_HANDED"===t.equipment_slot?" (2H)":""}
\n
\n ${t.requirements.level?T("LVL",t.requirements.level,n.level):""}\n ${t.requirements.strength?T("STR",t.requirements.strength,n.strength):""}\n ${t.requirements.constitution?T("CON",t.requirements.constitution,n.constitution):""}\n ${t.requirements.dexterity?T("DEX",t.requirements.dexterity,n.dexterity):""}\n ${t.requirements.intelligence?T("INT",t.requirements.intelligence,n.intelligence):""}\n ${T("PRF",t.profession)}\n
\n
\n ${t.boosts.strength?j("STR",t.boosts.strength):""}\n ${t.boosts.constitution?j("CON",t.boosts.constitution):""}\n ${t.boosts.dexterity?j("DEX",t.boosts.dexterity):""}\n ${t.boosts.intelligence?j("INT",t.boosts.intelligence):""}\n ${t.boosts.damage?j(t.affectedSkills.includes("restoration_magic")?"HP":"DMG",t.boosts.damage):""}\n ${t.boosts.damage_mitigation?j("MIT",t.boosts.damage_mitigation)+"%":""}\n ${["WEAPON","SPELL"].includes(t.type)?"":j("AP",t.maxAp)}\n
\n ${t.hasOwnProperty("id")?`
${t.cost.toLocaleString()}G
`:""}\n
\n
\n ${r=t,``}\n
\n
`;var r}(t))).join("\n")}\n
\n `;(0,c.default)("#map").html(e)})),(0,c.default)("body").on("click",".purchase-item",(t=>{t.preventDefault(),t.stopPropagation();const e=b.get("player"),n=parseInt((0,c.default)(t.target).data("cost")),r=(0,c.default)(t.target).data("id");e.gold{const e=(0,c.default)(t.target),n=e.data("event"),r=e.data("args");console.log(`Sending event ${n}`,{args:r}),w.emit(n,{args:r})})),(0,c.default)("body").on("click",".city-emit-event",(t=>{const e=(0,c.default)(t.target),n=e.data("event"),r=e.data("args");console.log(`Sending event ${n}`,{args:r}),w.emit(n,{args:r})})),w.on("explore:fights",(t=>{const e=b.get("last-selected-monster");if(t.length){let n=`
`;(0,c.default)("#map").html(n)}})),C.on("tab:explore",(()=>s(void 0,void 0,void 0,(function*(){const t=yield f.http.get("/fight");if(t)(0,c.default)("#map").html(P(t));else{let t;b.has("currentMapHTML")||(t=yield f.http.get(`/city/${b.get("player").city_id}`)),C.emit("renderMap",[t])}})))),w.on("updatePlayer",(t=>{b.set("player",t),x()})),w.on("fight-over",(t=>{const{roundData:e,monsters:n}=t;b.set("player",e.player),x(),(0,c.default)("#map").html(P(e.monster));let r=e.roundDetails.map((t=>`
${t}
`));if("player"===e.winner&&(r.push(`
You defeated the ${e.monster.name}!
`),e.rewards.gold&&r.push(`
You gained ${e.rewards.gold} gold`),e.rewards.exp&&r.push(`
You gained ${e.rewards.exp} exp`),e.rewards.levelIncrease&&r.push(`
You gained a level! ${e.player.level}`)),n.length){const t=b.get("last-selected-monster");r.unshift(`

Fight Again

\n
`)}(0,c.default)("#fight-results").html(r.join("\n")),(0,c.default)("#fight-actions").html("")})),w.on("fight-round",(t=>{(0,c.default)(".fight-action").prop("disabled",!1),b.set("player",t.player),x(),(0,c.default)("#map").html(P(t.monster)),(0,c.default)("#fight-results").html(t.roundDetails.map((t=>`
${t}
`)).join("\n"))})),(0,c.default)("body").on("submit","#fight-selector",(t=>s(void 0,void 0,void 0,(function*(){if(t.preventDefault(),t.stopPropagation(),b.get("player").hp<=0)return void C.emit("alert",[{type:"error",text:"You don't have enough HP to go looking for a fight"}]);const e=(0,c.default)("#monster-selector option:selected").val();b.set("last-selected-monster",e);try{const t=yield f.http.post("/fight",{monsterId:e});(0,c.default)("#map").html(P(t))}catch(t){C.emit("alert",[{type:"error",text:"Sorry, you can't start that fight"}])}})))),(0,c.default)("body").on("click",".fight-action",(t=>{t.preventDefault(),t.stopPropagation();const e=(0,c.default)(t.target).data("action"),n=(0,c.default)("#fight-target option:selected").val();(0,c.default)(".fight-action").prop("disabled",!0),w.emit("fight",{action:e,target:n})})),(0,c.default)("body").on("submit","#signup",(t=>s(void 0,void 0,void 0,(function*(){t.preventDefault(),t.stopPropagation();const e={};(0,c.default)(t.target).serializeArray().forEach((t=>e[t.name]=t.value));const n=yield f.http.post("/signup",e);n.error?C.emit("alert",[{type:"error",text:n.error}]):(b.set("player",n.player),x(),(0,c.default)("#signup-prompt").remove())})))),(0,c.default)("body").on("click","#login",(t=>s(void 0,void 0,void 0,(function*(){t.preventDefault(),t.stopPropagation();const e={};if((0,c.default)(t.target).closest("form").serializeArray().forEach((t=>e[t.name]=t.value)),e.username&&e.password){const t=yield f.http.post("/login",e);t.error?C.emit("alert",[{type:"error",text:t.error}]):(localStorage.setItem("authToken",t.player.id),window.location.reload())}})))),(0,c.default)("body").on("click","#logout",(t=>s(void 0,void 0,void 0,(function*(){t.preventDefault(),t.stopPropagation();let e=!1;const n=b.get("player");e=!/^Player[\d]+$/.test(n.username)||!!confirm("Are you sure? You will not be able to retrieve this character unless you set up an email/password"),e&&(w.emit("logout"),localStorage.clear(),window.location.reload())}))))},1916:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SocketEvent=void 0,e.SocketEvent=class{constructor(t,e){this.eventName=t,this.handler=e}}},7355:function(t,e,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(e,n);i&&!("get"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,i)}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),i=this&&this.__exportStar||function(t,e){for(var n in t)"default"===n||Object.prototype.hasOwnProperty.call(e,n)||r(e,t,n)};Object.defineProperty(e,"__esModule",{value:!0}),i(n(5127),e),i(n(6041),e),i(n(9261),e)},9261:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.displayHealerDetauls=void 0;const i=n(1916),o=r(n(3336));e.displayHealerDetauls=new i.SocketEvent("city:service:healer",((t,e)=>{(0,o.default)("#map").html(e.text)}))},5127:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.professionChangeRogue=e.professionChangeMage=e.professionChangeWarrior=e.professionRecruiter=void 0;const i=n(1916),o=r(n(3336)),s=n(9554);function a(t,e){(0,o.default)("#map").html(e.text)}e.professionRecruiter=new i.SocketEvent(s.EVENT_NAME,a),e.professionChangeWarrior=new i.SocketEvent(`${s.EVENT_NAME}:warrior`,a),e.professionChangeMage=new i.SocketEvent(`${s.EVENT_NAME}:mage`,a),e.professionChangeRogue=new i.SocketEvent(`${s.EVENT_NAME}:rogue`,a)},9554:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EVENT_NAME=void 0,e.EVENT_NAME="city:services:profession_recruitor_windcross"},6041:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.travel=void 0;const r=n(1916);e.travel=new r.SocketEvent("city:travel",((t,e)=>{t.cache.delete("currentMapHTML"),t.events.emit("renderMap",[e])}))},4738:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StatDef=e.expToLevel=e.maxHp=void 0;const r=n(1407);e.maxHp=function(t,e){return Math.ceil(1.3*(t+e))},e.expToLevel=function(t){return t<10?10*t-10:13*t},e.StatDef=new Map,e.StatDef.set(r.Stat.strength,{id:r.Stat.strength,display:"Strength",abbrv:"STR"}),e.StatDef.set(r.Stat.constitution,{id:r.Stat.constitution,display:"Constitution",abbrv:"CON"}),e.StatDef.set(r.Stat.dexterity,{id:r.Stat.dexterity,display:"Dexterity",abbrv:"DEX"}),e.StatDef.set(r.Stat.intelligence,{id:r.Stat.intelligence,display:"Intelligence",abbrv:"INT"})},9502:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Skills=void 0,e.Skills=new Map,e.Skills.set("bladed",{id:"bladed",display:"Bladed Weapon Mastery",description:"Improves Bladed Weapon damage",effect:t=>t.level/100,expToLevel:t=>1e3*t}),e.Skills.set("blunt",{id:"blunt",display:"Blunt Weapons Mastery",description:"Improves Blunt Weapon damage",effect:t=>t.level/100,expToLevel:t=>1e3*t}),e.Skills.set("destruction_magic",{id:"destruction_magic",display:"Destruction Magic Mastery",description:"Improves Destruction Magic damage",effect:t=>t.level/100,expToLevel:t=>1e3*t}),e.Skills.set("restoration_magic",{id:"restoration_magic",display:"Restoration Magic Mastery",description:"Improves effectiveness of Restoration Magic",effect:t=>t.level/100,expToLevel:t=>1e3*t}),e.Skills.set("one_handed_mastery",{id:"one_handed_mastery",display:"One Handed Weapon Mastery",description:"Improves effectiveness when fighting using one-handed weapons",effect:t=>t.level/100,expToLevel:t=>1e3*t}),e.Skills.set("two_handed_mastery",{id:"two_handed_mastery",display:"Two Handed Weapon Mastery",description:"Improves effectiveness when fighting using two-handed weapons",effect:t=>t.level/100,expToLevel:t=>1e3*t})},1407:(t,e)=>{"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0}),e.Stat=void 0,(n=e.Stat||(e.Stat={})).strength="strength",n.constitution="constitution",n.dexterity="dexterity",n.intelligence="intelligence"},8182:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TimeManager=void 0,e.TimeManager=class{constructor(t=60){this.dayLength=t,this.scaleFactor=30,this.dayLengthAsMS=60*t*1e3}dayScaleFactor(){return this.dayLength/30}getTimePeriod(){return this.isDawn()?"dawn":this.isMorning()?"morning":this.isAfternoon()?"afternoon":this.isEvening()?"evening":this.isNight()?"night":void 0}now(){return Math.floor((new Date).getMinutes()/this.dayScaleFactor())}gradientName(){const t=this.now();return`sky-gradient-${t<10?"0":""}${t}`}isNight(){const t=this.now();return t>=0&&t<=5||t>=26&&t<=29}isDawn(){const t=this.now();return t>=6&&t<=10}isMorning(){const t=this.now();return t>=11&&t<=15}isAfternoon(){const t=this.now();return t>=16&&t<=20}isEvening(){const t=this.now();return t>=21&&t<=25}}},7429:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"NIL",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(e,"parse",{enumerable:!0,get:function(){return f.default}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return l.default}}),Object.defineProperty(e,"v1",{enumerable:!0,get:function(){return r.default}}),Object.defineProperty(e,"v3",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(e,"v4",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(e,"v5",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(e,"validate",{enumerable:!0,get:function(){return c.default}}),Object.defineProperty(e,"version",{enumerable:!0,get:function(){return u.default}});var r=h(n(3990)),i=h(n(8237)),o=h(n(5355)),s=h(n(3764)),a=h(n(6314)),u=h(n(8464)),c=h(n(6435)),l=h(n(4008)),f=h(n(8222));function h(t){return t&&t.__esModule?t:{default:t}}},4163:(t,e)=>{"use strict";function n(t){return 14+(t+64>>>9<<4)+1}function r(t,e){const n=(65535&t)+(65535&e);return(t>>16)+(e>>16)+(n>>16)<<16|65535&n}function i(t,e,n,i,o,s){return r((a=r(r(e,t),r(i,s)))<<(u=o)|a>>>32-u,n);var a,u}function o(t,e,n,r,o,s,a){return i(e&n|~e&r,t,e,o,s,a)}function s(t,e,n,r,o,s,a){return i(e&r|n&~r,t,e,o,s,a)}function a(t,e,n,r,o,s,a){return i(e^n^r,t,e,o,s,a)}function u(t,e,n,r,o,s,a){return i(n^(e|~r),t,e,o,s,a)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;e.default=function(t){if("string"==typeof t){const e=unescape(encodeURIComponent(t));t=new Uint8Array(e.length);for(let n=0;n>5]>>>i%32&255,o=parseInt(r.charAt(n>>>4&15)+r.charAt(15&n),16);e.push(o)}return e}(function(t,e){t[e>>5]|=128<>5]|=(255&t[n/8])<{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};e.default=n},6314:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default="00000000-0000-0000-0000-000000000000"},8222:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r,i=(r=n(6435))&&r.__esModule?r:{default:r};e.default=function(t){if(!(0,i.default)(t))throw TypeError("Invalid UUID");let e;const n=new Uint8Array(16);return n[0]=(e=parseInt(t.slice(0,8),16))>>>24,n[1]=e>>>16&255,n[2]=e>>>8&255,n[3]=255&e,n[4]=(e=parseInt(t.slice(9,13),16))>>>8,n[5]=255&e,n[6]=(e=parseInt(t.slice(14,18),16))>>>8,n[7]=255&e,n[8]=(e=parseInt(t.slice(19,23),16))>>>8,n[9]=255&e,n[10]=(e=parseInt(t.slice(24,36),16))/1099511627776&255,n[11]=e/4294967296&255,n[12]=e>>>24&255,n[13]=e>>>16&255,n[14]=e>>>8&255,n[15]=255&e,n}},58:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i},3319:(t,e)=>{"use strict";let n;Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(){if(!n&&(n="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!n))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return n(r)};const r=new Uint8Array(16)},3757:(t,e)=>{"use strict";function n(t,e,n,r){switch(t){case 0:return e&n^~e&r;case 1:case 3:return e^n^r;case 2:return e&n^e&r^n&r}}function r(t,e){return t<>>32-e}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;e.default=function(t){const e=[1518500249,1859775393,2400959708,3395469782],i=[1732584193,4023233417,2562383102,271733878,3285377520];if("string"==typeof t){const e=unescape(encodeURIComponent(t));t=[];for(let n=0;n>>0;f=l,l=c,c=r(u,30)>>>0,u=s,s=a}i[0]=i[0]+s>>>0,i[1]=i[1]+u>>>0,i[2]=i[2]+c>>>0,i[3]=i[3]+l>>>0,i[4]=i[4]+f>>>0}return[i[0]>>24&255,i[0]>>16&255,i[0]>>8&255,255&i[0],i[1]>>24&255,i[1]>>16&255,i[1]>>8&255,255&i[1],i[2]>>24&255,i[2]>>16&255,i[2]>>8&255,255&i[2],i[3]>>24&255,i[3]>>16&255,i[3]>>8&255,255&i[3],i[4]>>24&255,i[4]>>16&255,i[4]>>8&255,255&i[4]]}},4008:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.unsafeStringify=s;var r,i=(r=n(6435))&&r.__esModule?r:{default:r};const o=[];for(let t=0;t<256;++t)o.push((t+256).toString(16).slice(1));function s(t,e=0){return(o[t[e+0]]+o[t[e+1]]+o[t[e+2]]+o[t[e+3]]+"-"+o[t[e+4]]+o[t[e+5]]+"-"+o[t[e+6]]+o[t[e+7]]+"-"+o[t[e+8]]+o[t[e+9]]+"-"+o[t[e+10]]+o[t[e+11]]+o[t[e+12]]+o[t[e+13]]+o[t[e+14]]+o[t[e+15]]).toLowerCase()}e.default=function(t,e=0){const n=s(t,e);if(!(0,i.default)(n))throw TypeError("Stringified UUID is invalid");return n}},3990:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r,i=(r=n(3319))&&r.__esModule?r:{default:r},o=n(4008);let s,a,u=0,c=0;e.default=function(t,e,n){let r=e&&n||0;const l=e||new Array(16);let f=(t=t||{}).node||s,h=void 0!==t.clockseq?t.clockseq:a;if(null==f||null==h){const e=t.random||(t.rng||i.default)();null==f&&(f=s=[1|e[0],e[1],e[2],e[3],e[4],e[5]]),null==h&&(h=a=16383&(e[6]<<8|e[7]))}let d=void 0!==t.msecs?t.msecs:Date.now(),p=void 0!==t.nsecs?t.nsecs:c+1;const g=d-u+(p-c)/1e4;if(g<0&&void 0===t.clockseq&&(h=h+1&16383),(g<0||d>u)&&void 0===t.nsecs&&(p=0),p>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");u=d,c=p,a=h,d+=122192928e5;const v=(1e4*(268435455&d)+p)%4294967296;l[r++]=v>>>24&255,l[r++]=v>>>16&255,l[r++]=v>>>8&255,l[r++]=255&v;const y=d/4294967296*1e4&268435455;l[r++]=y>>>8&255,l[r++]=255&y,l[r++]=y>>>24&15|16,l[r++]=y>>>16&255,l[r++]=h>>>8|128,l[r++]=255&h;for(let t=0;t<6;++t)l[r+t]=f[t];return e||(0,o.unsafeStringify)(l)}},8237:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=o(n(7925)),i=o(n(4163));function o(t){return t&&t.__esModule?t:{default:t}}var s=(0,r.default)("v3",48,i.default);e.default=s},7925:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.URL=e.DNS=void 0,e.default=function(t,e,n){function r(t,r,s,a){var u;if("string"==typeof t&&(t=function(t){t=unescape(encodeURIComponent(t));const e=[];for(let n=0;n{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=s(n(4790)),i=s(n(3319)),o=n(4008);function s(t){return t&&t.__esModule?t:{default:t}}e.default=function(t,e,n){if(r.default.randomUUID&&!e&&!t)return r.default.randomUUID();const s=(t=t||{}).random||(t.rng||i.default)();if(s[6]=15&s[6]|64,s[8]=63&s[8]|128,e){n=n||0;for(let t=0;t<16;++t)e[n+t]=s[t];return e}return(0,o.unsafeStringify)(s)}},3764:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=o(n(7925)),i=o(n(3757));function o(t){return t&&t.__esModule?t:{default:t}}var s=(0,r.default)("v5",80,i.default);e.default=s},6435:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r,i=(r=n(58))&&r.__esModule?r:{default:r};e.default=function(t){return"string"==typeof t&&i.default.test(t)}},8464:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r,i=(r=n(6435))&&r.__esModule?r:{default:r};e.default=function(t){if(!(0,i.default)(t))throw TypeError("Invalid UUID");return parseInt(t.slice(14,15),16)}},3336:t=>{"use strict";t.exports=$},8419:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.hasCORS=void 0;let n=!1;try{n="undefined"!=typeof XMLHttpRequest&&"withCredentials"in new XMLHttpRequest}catch(t){}e.hasCORS=n},5754:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.decode=e.encode=void 0,e.encode=function(t){let e="";for(let n in t)t.hasOwnProperty(n)&&(e.length&&(e+="&"),e+=encodeURIComponent(n)+"="+encodeURIComponent(t[n]));return e},e.decode=function(t){let e={},n=t.split("&");for(let t=0,r=n.length;t{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.parse=void 0;const n=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,r=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];e.parse=function(t){const e=t,i=t.indexOf("["),o=t.indexOf("]");-1!=i&&-1!=o&&(t=t.substring(0,i)+t.substring(i,o).replace(/:/g,";")+t.substring(o,t.length));let s=n.exec(t||""),a={},u=14;for(;u--;)a[r[u]]=s[u]||"";return-1!=i&&-1!=o&&(a.source=e,a.host=a.host.substring(1,a.host.length-1).replace(/;/g,":"),a.authority=a.authority.replace("[","").replace("]","").replace(/;/g,":"),a.ipv6uri=!0),a.pathNames=function(t,e){const n=e.replace(/\/{2,9}/g,"/").split("/");return"/"!=e.slice(0,1)&&0!==e.length||n.splice(0,1),"/"==e.slice(-1)&&n.splice(n.length-1,1),n}(0,a.path),a.queryKey=function(t,e){const n={};return e.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,(function(t,e,r){e&&(n[e]=r)})),n}(0,a.query),a}},8726:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.yeast=e.decode=e.encode=void 0;const n="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),r={};let i,o=0,s=0;function a(t){let e="";do{e=n[t%64]+e,t=Math.floor(t/64)}while(t>0);return e}for(e.encode=a,e.decode=function(t){let e=0;for(s=0;s{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.globalThisShim=void 0,e.globalThisShim="undefined"!=typeof self?self:"undefined"!=typeof window?window:Function("return this")()},4679:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.nextTick=e.parse=e.installTimerFunctions=e.transports=e.Transport=e.protocol=e.Socket=void 0;const r=n(3481);Object.defineProperty(e,"Socket",{enumerable:!0,get:function(){return r.Socket}}),e.protocol=r.Socket.protocol;var i=n(9870);Object.defineProperty(e,"Transport",{enumerable:!0,get:function(){return i.Transport}});var o=n(7385);Object.defineProperty(e,"transports",{enumerable:!0,get:function(){return o.transports}});var s=n(9622);Object.defineProperty(e,"installTimerFunctions",{enumerable:!0,get:function(){return s.installTimerFunctions}});var a=n(5222);Object.defineProperty(e,"parse",{enumerable:!0,get:function(){return a.parse}});var u=n(5552);Object.defineProperty(e,"nextTick",{enumerable:!0,get:function(){return u.nextTick}})},3481:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.Socket=void 0;const i=n(7385),o=n(9622),s=n(5754),a=n(5222),u=r(n(4802)),c=n(5260),l=n(1373),f=(0,u.default)("engine.io-client:socket");class h extends c.Emitter{constructor(t,e={}){super(),this.writeBuffer=[],t&&"object"==typeof t&&(e=t,t=null),t?(t=(0,a.parse)(t),e.hostname=t.host,e.secure="https"===t.protocol||"wss"===t.protocol,e.port=t.port,t.query&&(e.query=t.query)):e.host&&(e.hostname=(0,a.parse)(e.host).host),(0,o.installTimerFunctions)(this,e),this.secure=null!=e.secure?e.secure:"undefined"!=typeof location&&"https:"===location.protocol,e.hostname&&!e.port&&(e.port=this.secure?"443":"80"),this.hostname=e.hostname||("undefined"!=typeof location?location.hostname:"localhost"),this.port=e.port||("undefined"!=typeof location&&location.port?location.port:this.secure?"443":"80"),this.transports=e.transports||["polling","websocket"],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:!0},e),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),"string"==typeof this.opts.query&&(this.opts.query=(0,s.decode)(this.opts.query)),this.id=null,this.upgrades=null,this.pingInterval=null,this.pingTimeout=null,this.pingTimeoutTimer=null,"function"==typeof addEventListener&&(this.opts.closeOnBeforeunload&&(this.beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this.beforeunloadEventListener,!1)),"localhost"!==this.hostname&&(this.offlineEventListener=()=>{this.onClose("transport close",{description:"network connection lost"})},addEventListener("offline",this.offlineEventListener,!1))),this.open()}createTransport(t){f('creating transport "%s"',t);const e=Object.assign({},this.opts.query);e.EIO=l.protocol,e.transport=t,this.id&&(e.sid=this.id);const n=Object.assign({},this.opts.transportOptions[t],this.opts,{query:e,socket:this,hostname:this.hostname,secure:this.secure,port:this.port});return f("options: %j",n),new i.transports[t](n)}open(){let t;if(this.opts.rememberUpgrade&&h.priorWebsocketSuccess&&-1!==this.transports.indexOf("websocket"))t="websocket";else{if(0===this.transports.length)return void this.setTimeoutFn((()=>{this.emitReserved("error","No transports available")}),0);t=this.transports[0]}this.readyState="opening";try{t=this.createTransport(t)}catch(t){return f("error while creating transport: %s",t),this.transports.shift(),void this.open()}t.open(),this.setTransport(t)}setTransport(t){f("setting transport %s",t.name),this.transport&&(f("clearing existing transport %s",this.transport.name),this.transport.removeAllListeners()),this.transport=t,t.on("drain",this.onDrain.bind(this)).on("packet",this.onPacket.bind(this)).on("error",this.onError.bind(this)).on("close",(t=>this.onClose("transport close",t)))}probe(t){f('probing transport "%s"',t);let e=this.createTransport(t),n=!1;h.priorWebsocketSuccess=!1;const r=()=>{n||(f('probe transport "%s" opened',t),e.send([{type:"ping",data:"probe"}]),e.once("packet",(r=>{if(!n)if("pong"===r.type&&"probe"===r.data){if(f('probe transport "%s" pong',t),this.upgrading=!0,this.emitReserved("upgrading",e),!e)return;h.priorWebsocketSuccess="websocket"===e.name,f('pausing current transport "%s"',this.transport.name),this.transport.pause((()=>{n||"closed"!==this.readyState&&(f("changing transport and sending upgrade packet"),c(),this.setTransport(e),e.send([{type:"upgrade"}]),this.emitReserved("upgrade",e),e=null,this.upgrading=!1,this.flush())}))}else{f('probe transport "%s" failed',t);const n=new Error("probe error");n.transport=e.name,this.emitReserved("upgradeError",n)}})))};function i(){n||(n=!0,c(),e.close(),e=null)}const o=n=>{const r=new Error("probe error: "+n);r.transport=e.name,i(),f('probe transport "%s" failed because of error: %s',t,n),this.emitReserved("upgradeError",r)};function s(){o("transport closed")}function a(){o("socket closed")}function u(t){e&&t.name!==e.name&&(f('"%s" works - aborting "%s"',t.name,e.name),i())}const c=()=>{e.removeListener("open",r),e.removeListener("error",o),e.removeListener("close",s),this.off("close",a),this.off("upgrading",u)};e.once("open",r),e.once("error",o),e.once("close",s),this.once("close",a),this.once("upgrading",u),e.open()}onOpen(){if(f("socket open"),this.readyState="open",h.priorWebsocketSuccess="websocket"===this.transport.name,this.emitReserved("open"),this.flush(),"open"===this.readyState&&this.opts.upgrade){f("starting upgrade probes");let t=0;const e=this.upgrades.length;for(;t{this.onClose("ping timeout")}),this.pingInterval+this.pingTimeout),this.opts.autoUnref&&this.pingTimeoutTimer.unref()}onDrain(){this.writeBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,0===this.writeBuffer.length?this.emitReserved("drain"):this.flush()}flush(){if("closed"!==this.readyState&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this.getWritablePackets();f("flushing %d packets in socket",t.length),this.transport.send(t),this.prevBufferLen=t.length,this.emitReserved("flush")}}getWritablePackets(){if(!(this.maxPayload&&"polling"===this.transport.name&&this.writeBuffer.length>1))return this.writeBuffer;let t=1;for(let e=0;e0&&t>this.maxPayload)return f("only send %d out of %d packets",e,this.writeBuffer.length),this.writeBuffer.slice(0,e);t+=2}return f("payload size is %d (max: %d)",t,this.maxPayload),this.writeBuffer}write(t,e,n){return this.sendPacket("message",t,e,n),this}send(t,e,n){return this.sendPacket("message",t,e,n),this}sendPacket(t,e,n,r){if("function"==typeof e&&(r=e,e=void 0),"function"==typeof n&&(r=n,n=null),"closing"===this.readyState||"closed"===this.readyState)return;(n=n||{}).compress=!1!==n.compress;const i={type:t,data:e,options:n};this.emitReserved("packetCreate",i),this.writeBuffer.push(i),r&&this.once("flush",r),this.flush()}close(){const t=()=>{this.onClose("forced close"),f("socket closing - telling transport to close"),this.transport.close()},e=()=>{this.off("upgrade",e),this.off("upgradeError",e),t()},n=()=>{this.once("upgrade",e),this.once("upgradeError",e)};return"opening"!==this.readyState&&"open"!==this.readyState||(this.readyState="closing",this.writeBuffer.length?this.once("drain",(()=>{this.upgrading?n():t()})):this.upgrading?n():t()),this}onError(t){f("socket error %j",t),h.priorWebsocketSuccess=!1,this.emitReserved("error",t),this.onClose("transport error",t)}onClose(t,e){"opening"!==this.readyState&&"open"!==this.readyState&&"closing"!==this.readyState||(f('socket close with reason: "%s"',t),this.clearTimeoutFn(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),"function"==typeof removeEventListener&&(removeEventListener("beforeunload",this.beforeunloadEventListener,!1),removeEventListener("offline",this.offlineEventListener,!1)),this.readyState="closed",this.id=null,this.emitReserved("close",t,e),this.writeBuffer=[],this.prevBufferLen=0)}filterUpgrades(t){const e=[];let n=0;const r=t.length;for(;n{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.transports=void 0;const r=n(484),i=n(1308);e.transports={websocket:i.WS,polling:r.Polling}},484:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.Request=e.Polling=void 0;const i=n(9870),o=r(n(4802)),s=n(8726),a=n(5754),u=n(1373),c=n(6666),l=n(5260),f=n(9622),h=n(6242),d=(0,o.default)("engine.io-client:polling");function p(){}const g=null!=new c.XHR({xdomain:!1}).responseType;class v extends i.Transport{constructor(t){if(super(t),this.polling=!1,"undefined"!=typeof location){const e="https:"===location.protocol;let n=location.port;n||(n=e?"443":"80"),this.xd="undefined"!=typeof location&&t.hostname!==location.hostname||n!==t.port,this.xs=t.secure!==e}const e=t&&t.forceBase64;this.supportsBinary=g&&!e}get name(){return"polling"}doOpen(){this.poll()}pause(t){this.readyState="pausing";const e=()=>{d("paused"),this.readyState="paused",t()};if(this.polling||!this.writable){let t=0;this.polling&&(d("we are currently polling - waiting to pause"),t++,this.once("pollComplete",(function(){d("pre-pause polling complete"),--t||e()}))),this.writable||(d("we are currently writing - waiting to pause"),t++,this.once("drain",(function(){d("pre-pause writing complete"),--t||e()})))}else e()}poll(){d("polling"),this.polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){d("polling got data %s",t),(0,u.decodePayload)(t,this.socket.binaryType).forEach((t=>{if("opening"===this.readyState&&"open"===t.type&&this.onOpen(),"close"===t.type)return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(t)})),"closed"!==this.readyState&&(this.polling=!1,this.emitReserved("pollComplete"),"open"===this.readyState?this.poll():d('ignoring poll - transport state "%s"',this.readyState))}doClose(){const t=()=>{d("writing close packet"),this.write([{type:"close"}])};"open"===this.readyState?(d("transport open - closing"),t()):(d("transport not open - deferring close"),this.once("open",t))}write(t){this.writable=!1,(0,u.encodePayload)(t,(t=>{this.doWrite(t,(()=>{this.writable=!0,this.emitReserved("drain")}))}))}uri(){let t=this.query||{};const e=this.opts.secure?"https":"http";let n="";!1!==this.opts.timestampRequests&&(t[this.opts.timestampParam]=(0,s.yeast)()),this.supportsBinary||t.sid||(t.b64=1),this.opts.port&&("https"===e&&443!==Number(this.opts.port)||"http"===e&&80!==Number(this.opts.port))&&(n=":"+this.opts.port);const r=(0,a.encode)(t);return e+"://"+(-1!==this.opts.hostname.indexOf(":")?"["+this.opts.hostname+"]":this.opts.hostname)+n+this.opts.path+(r.length?"?"+r:"")}request(t={}){return Object.assign(t,{xd:this.xd,xs:this.xs},this.opts),new y(this.uri(),t)}doWrite(t,e){const n=this.request({method:"POST",data:t});n.on("success",e),n.on("error",((t,e)=>{this.onError("xhr post error",t,e)}))}doPoll(){d("xhr poll");const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",((t,e)=>{this.onError("xhr poll error",t,e)})),this.pollXhr=t}}e.Polling=v;class y extends l.Emitter{constructor(t,e){super(),(0,f.installTimerFunctions)(this,e),this.opts=e,this.method=e.method||"GET",this.uri=t,this.async=!1!==e.async,this.data=void 0!==e.data?e.data:null,this.create()}create(){const t=(0,f.pick)(this.opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");t.xdomain=!!this.opts.xd,t.xscheme=!!this.opts.xs;const e=this.xhr=new c.XHR(t);try{d("xhr open %s: %s",this.method,this.uri),e.open(this.method,this.uri,this.async);try{if(this.opts.extraHeaders){e.setDisableHeaderCheck&&e.setDisableHeaderCheck(!0);for(let t in this.opts.extraHeaders)this.opts.extraHeaders.hasOwnProperty(t)&&e.setRequestHeader(t,this.opts.extraHeaders[t])}}catch(t){}if("POST"===this.method)try{e.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch(t){}try{e.setRequestHeader("Accept","*/*")}catch(t){}"withCredentials"in e&&(e.withCredentials=this.opts.withCredentials),this.opts.requestTimeout&&(e.timeout=this.opts.requestTimeout),e.onreadystatechange=()=>{4===e.readyState&&(200===e.status||1223===e.status?this.onLoad():this.setTimeoutFn((()=>{this.onError("number"==typeof e.status?e.status:0)}),0))},d("xhr data %s",this.data),e.send(this.data)}catch(t){return void this.setTimeoutFn((()=>{this.onError(t)}),0)}"undefined"!=typeof document&&(this.index=y.requestsCount++,y.requests[this.index]=this)}onError(t){this.emitReserved("error",t,this.xhr),this.cleanup(!0)}cleanup(t){if(void 0!==this.xhr&&null!==this.xhr){if(this.xhr.onreadystatechange=p,t)try{this.xhr.abort()}catch(t){}"undefined"!=typeof document&&delete y.requests[this.index],this.xhr=null}}onLoad(){const t=this.xhr.responseText;null!==t&&(this.emitReserved("data",t),this.emitReserved("success"),this.cleanup())}abort(){this.cleanup()}}if(e.Request=y,y.requestsCount=0,y.requests={},"undefined"!=typeof document)if("function"==typeof attachEvent)attachEvent("onunload",m);else if("function"==typeof addEventListener){const t="onpagehide"in h.globalThisShim?"pagehide":"unload";addEventListener(t,m,!1)}function m(){for(let t in y.requests)y.requests.hasOwnProperty(t)&&y.requests[t].abort()}},5552:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.defaultBinaryType=e.usingBrowserWebSocket=e.WebSocket=e.nextTick=void 0;const r=n(6242);e.nextTick="function"==typeof Promise&&"function"==typeof Promise.resolve?t=>Promise.resolve().then(t):(t,e)=>e(t,0),e.WebSocket=r.globalThisShim.WebSocket||r.globalThisShim.MozWebSocket,e.usingBrowserWebSocket=!0,e.defaultBinaryType="arraybuffer"},1308:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.WS=void 0;const i=n(9870),o=n(5754),s=n(8726),a=n(9622),u=n(5552),c=r(n(4802)),l=n(1373),f=(0,c.default)("engine.io-client:websocket"),h="undefined"!=typeof navigator&&"string"==typeof navigator.product&&"reactnative"===navigator.product.toLowerCase();class d extends i.Transport{constructor(t){super(t),this.supportsBinary=!t.forceBase64}get name(){return"websocket"}doOpen(){if(!this.check())return;const t=this.uri(),e=this.opts.protocols,n=h?{}:(0,a.pick)(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(n.headers=this.opts.extraHeaders);try{this.ws=u.usingBrowserWebSocket&&!h?e?new u.WebSocket(t,e):new u.WebSocket(t):new u.WebSocket(t,e,n)}catch(t){return this.emitReserved("error",t)}this.ws.binaryType=this.socket.binaryType||u.defaultBinaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let e=0;e{const e={};!u.usingBrowserWebSocket&&(n.options&&(e.compress=n.options.compress),this.opts.perMessageDeflate)&&("string"==typeof t?Buffer.byteLength(t):t.length){this.writable=!0,this.emitReserved("drain")}),this.setTimeoutFn)}))}}doClose(){void 0!==this.ws&&(this.ws.close(),this.ws=null)}uri(){let t=this.query||{};const e=this.opts.secure?"wss":"ws";let n="";this.opts.port&&("wss"===e&&443!==Number(this.opts.port)||"ws"===e&&80!==Number(this.opts.port))&&(n=":"+this.opts.port),this.opts.timestampRequests&&(t[this.opts.timestampParam]=(0,s.yeast)()),this.supportsBinary||(t.b64=1);const r=(0,o.encode)(t);return e+"://"+(-1!==this.opts.hostname.indexOf(":")?"["+this.opts.hostname+"]":this.opts.hostname)+n+this.opts.path+(r.length?"?"+r:"")}check(){return!!u.WebSocket}}e.WS=d},6666:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.XHR=void 0;const r=n(8419),i=n(6242);e.XHR=function(t){const e=t.xdomain;try{if("undefined"!=typeof XMLHttpRequest&&(!e||r.hasCORS))return new XMLHttpRequest}catch(t){}if(!e)try{return new(i.globalThisShim[["Active"].concat("Object").join("X")])("Microsoft.XMLHTTP")}catch(t){}}},9622:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.byteLength=e.installTimerFunctions=e.pick=void 0;const r=n(6242);e.pick=function(t,...e){return e.reduce(((e,n)=>(t.hasOwnProperty(n)&&(e[n]=t[n]),e)),{})};const i=r.globalThisShim.setTimeout,o=r.globalThisShim.clearTimeout;e.installTimerFunctions=function(t,e){e.useNativeTimers?(t.setTimeoutFn=i.bind(r.globalThisShim),t.clearTimeoutFn=o.bind(r.globalThisShim)):(t.setTimeoutFn=r.globalThisShim.setTimeout.bind(r.globalThisShim),t.clearTimeoutFn=r.globalThisShim.clearTimeout.bind(r.globalThisShim))},e.byteLength=function(t){return"string"==typeof t?function(t){let e=0,n=0;for(let r=0,i=t.length;r=57344?n+=3:(r++,n+=4);return n}(t):Math.ceil(1.33*(t.byteLength||t.size))}},3087:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ERROR_PACKET=e.PACKET_TYPES_REVERSE=e.PACKET_TYPES=void 0;const n=Object.create(null);e.PACKET_TYPES=n,n.open="0",n.close="1",n.ping="2",n.pong="3",n.message="4",n.upgrade="5",n.noop="6";const r=Object.create(null);e.PACKET_TYPES_REVERSE=r,Object.keys(n).forEach((t=>{r[n[t]]=t})),e.ERROR_PACKET={type:"error",data:"parser error"}},2469:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.decode=e.encode=void 0;const n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",r="undefined"==typeof Uint8Array?[]:new Uint8Array(256);for(let t=0;t<64;t++)r[n.charCodeAt(t)]=t;e.encode=t=>{let e,r=new Uint8Array(t),i=r.length,o="";for(e=0;e>2],o+=n[(3&r[e])<<4|r[e+1]>>4],o+=n[(15&r[e+1])<<2|r[e+2]>>6],o+=n[63&r[e+2]];return i%3==2?o=o.substring(0,o.length-1)+"=":i%3==1&&(o=o.substring(0,o.length-2)+"=="),o},e.decode=t=>{let e,n,i,o,s,a=.75*t.length,u=t.length,c=0;"="===t[t.length-1]&&(a--,"="===t[t.length-2]&&a--);const l=new ArrayBuffer(a),f=new Uint8Array(l);for(e=0;e>4,f[c++]=(15&i)<<4|o>>2,f[c++]=(3&o)<<6|63&s;return l}},7572:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});const r=n(3087),i=n(2469),o="function"==typeof ArrayBuffer,s=(t,e)=>{if(o){const n=(0,i.decode)(t);return a(n,e)}return{base64:!0,data:t}},a=(t,e)=>"blob"===e&&t instanceof ArrayBuffer?new Blob([t]):t;e.default=(t,e)=>{if("string"!=typeof t)return{type:"message",data:a(t,e)};const n=t.charAt(0);return"b"===n?{type:"message",data:s(t.substring(1),e)}:r.PACKET_TYPES_REVERSE[n]?t.length>1?{type:r.PACKET_TYPES_REVERSE[n],data:t.substring(1)}:{type:r.PACKET_TYPES_REVERSE[n]}:r.ERROR_PACKET}},3908:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});const r=n(3087),i="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===Object.prototype.toString.call(Blob),o="function"==typeof ArrayBuffer,s=(t,e)=>{const n=new FileReader;return n.onload=function(){const t=n.result.split(",")[1];e("b"+(t||""))},n.readAsDataURL(t)};e.default=({type:t,data:e},n,a)=>{return i&&e instanceof Blob?n?a(e):s(e,a):o&&(e instanceof ArrayBuffer||(u=e,"function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(u):u&&u.buffer instanceof ArrayBuffer))?n?a(e):s(new Blob([e]),a):a(r.PACKET_TYPES[t]+(e||""));var u}},1373:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.decodePayload=e.decodePacket=e.encodePayload=e.encodePacket=e.protocol=void 0;const r=n(3908);e.encodePacket=r.default;const i=n(7572);e.decodePacket=i.default;const o=String.fromCharCode(30);e.encodePayload=(t,e)=>{const n=t.length,i=new Array(n);let s=0;t.forEach(((t,a)=>{(0,r.default)(t,!1,(t=>{i[a]=t,++s===n&&e(i.join(o))}))}))},e.decodePayload=(t,e)=>{const n=t.split(o),r=[];for(let t=0;t{"use strict";function n(t){t=t||{},this.ms=t.min||100,this.max=t.max||1e4,this.factor=t.factor||2,this.jitter=t.jitter>0&&t.jitter<=1?t.jitter:0,this.attempts=0}Object.defineProperty(e,"__esModule",{value:!0}),e.Backoff=void 0,e.Backoff=n,n.prototype.duration=function(){var t=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var e=Math.random(),n=Math.floor(e*this.jitter*t);t=0==(1&Math.floor(10*e))?t-n:t+n}return 0|Math.min(t,this.max)},n.prototype.reset=function(){this.attempts=0},n.prototype.setMin=function(t){this.ms=t},n.prototype.setMax=function(t){this.max=t},n.prototype.setJitter=function(t){this.jitter=t}},7046:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.connect=e.io=e.Socket=e.Manager=e.protocol=void 0;const i=n(3084),o=n(4168);Object.defineProperty(e,"Manager",{enumerable:!0,get:function(){return o.Manager}});const s=n(8312);Object.defineProperty(e,"Socket",{enumerable:!0,get:function(){return s.Socket}});const a=r(n(3669)).default("socket.io-client"),u={};function c(t,e){"object"==typeof t&&(e=t,t=void 0),e=e||{};const n=i.url(t,e.path||"/socket.io"),r=n.source,s=n.id,c=n.path,l=u[s]&&c in u[s].nsps;let f;return e.forceNew||e["force new connection"]||!1===e.multiplex||l?(a("ignoring socket cache for %s",r),f=new o.Manager(r,e)):(u[s]||(a("new io instance for %s",r),u[s]=new o.Manager(r,e)),f=u[s]),n.query&&!e.query&&(e.query=n.queryKey),f.socket(n.path,e)}e.io=c,e.connect=c,e.default=c,Object.assign(c,{Manager:o.Manager,Socket:s.Socket,io:c,connect:c});var l=n(4514);Object.defineProperty(e,"protocol",{enumerable:!0,get:function(){return l.protocol}}),t.exports=c},4168:function(t,e,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),i=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),o=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)"default"!==n&&Object.prototype.hasOwnProperty.call(t,n)&&r(e,t,n);return i(e,t),e},s=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.Manager=void 0;const a=n(4679),u=n(8312),c=o(n(4514)),l=n(7149),f=n(5159),h=n(5260),d=s(n(3669)).default("socket.io-client:manager");class p extends h.Emitter{constructor(t,e){var n;super(),this.nsps={},this.subs=[],t&&"object"==typeof t&&(e=t,t=void 0),(e=e||{}).path=e.path||"/socket.io",this.opts=e,a.installTimerFunctions(this,e),this.reconnection(!1!==e.reconnection),this.reconnectionAttempts(e.reconnectionAttempts||1/0),this.reconnectionDelay(e.reconnectionDelay||1e3),this.reconnectionDelayMax(e.reconnectionDelayMax||5e3),this.randomizationFactor(null!==(n=e.randomizationFactor)&&void 0!==n?n:.5),this.backoff=new f.Backoff({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(null==e.timeout?2e4:e.timeout),this._readyState="closed",this.uri=t;const r=e.parser||c;this.encoder=new r.Encoder,this.decoder=new r.Decoder,this._autoConnect=!1!==e.autoConnect,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,this):this._reconnection}reconnectionAttempts(t){return void 0===t?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var e;return void 0===t?this._reconnectionDelay:(this._reconnectionDelay=t,null===(e=this.backoff)||void 0===e||e.setMin(t),this)}randomizationFactor(t){var e;return void 0===t?this._randomizationFactor:(this._randomizationFactor=t,null===(e=this.backoff)||void 0===e||e.setJitter(t),this)}reconnectionDelayMax(t){var e;return void 0===t?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,null===(e=this.backoff)||void 0===e||e.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&0===this.backoff.attempts&&this.reconnect()}open(t){if(d("readyState %s",this._readyState),~this._readyState.indexOf("open"))return this;d("opening %s",this.uri),this.engine=new a.Socket(this.uri,this.opts);const e=this.engine,n=this;this._readyState="opening",this.skipReconnect=!1;const r=l.on(e,"open",(function(){n.onopen(),t&&t()})),i=l.on(e,"error",(e=>{d("error"),n.cleanup(),n._readyState="closed",this.emitReserved("error",e),t?t(e):n.maybeReconnectOnOpen()}));if(!1!==this._timeout){const t=this._timeout;d("connect attempt will timeout after %d",t),0===t&&r();const n=this.setTimeoutFn((()=>{d("connect attempt timed out after %d",t),r(),e.close(),e.emit("error",new Error("timeout"))}),t);this.opts.autoUnref&&n.unref(),this.subs.push((function(){clearTimeout(n)}))}return this.subs.push(r),this.subs.push(i),this}connect(t){return this.open(t)}onopen(){d("open"),this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(l.on(t,"ping",this.onping.bind(this)),l.on(t,"data",this.ondata.bind(this)),l.on(t,"error",this.onerror.bind(this)),l.on(t,"close",this.onclose.bind(this)),l.on(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(t){this.onclose("parse error",t)}}ondecoded(t){a.nextTick((()=>{this.emitReserved("packet",t)}),this.setTimeoutFn)}onerror(t){d("error",t),this.emitReserved("error",t)}socket(t,e){let n=this.nsps[t];return n?this._autoConnect&&!n.active&&n.connect():(n=new u.Socket(this,t,e),this.nsps[t]=n),n}_destroy(t){const e=Object.keys(this.nsps);for(const t of e)if(this.nsps[t].active)return void d("socket %s is still active, skipping close",t);this._close()}_packet(t){d("writing packet %j",t);const e=this.encoder.encode(t);for(let n=0;nt())),this.subs.length=0,this.decoder.destroy()}_close(){d("disconnect"),this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close"),this.engine&&this.engine.close()}disconnect(){return this._close()}onclose(t,e){d("closed due to %s",t),this.cleanup(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,e),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)d("reconnect failed"),this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const e=this.backoff.duration();d("will wait %dms before reconnect attempt",e),this._reconnecting=!0;const n=this.setTimeoutFn((()=>{t.skipReconnect||(d("attempting reconnect"),this.emitReserved("reconnect_attempt",t.backoff.attempts),t.skipReconnect||t.open((e=>{e?(d("reconnect attempt error"),t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",e)):(d("reconnect success"),t.onreconnect())})))}),e);this.opts.autoUnref&&n.unref(),this.subs.push((function(){clearTimeout(n)}))}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}e.Manager=p},7149:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.on=void 0,e.on=function(t,e,n){return t.on(e,n),function(){t.off(e,n)}}},8312:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.Socket=void 0;const i=n(4514),o=n(7149),s=n(5260),a=r(n(3669)).default("socket.io-client:socket"),u=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class c extends s.Emitter{constructor(t,e,n){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=t,this.nsp=e,n&&n.auth&&(this.auth=n.auth),this._opts=Object.assign({},n),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const t=this.io;this.subs=[o.on(t,"open",this.onopen.bind(this)),o.on(t,"packet",this.onpacket.bind(this)),o.on(t,"error",this.onerror.bind(this)),o.on(t,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected||(this.subEvents(),this.io._reconnecting||this.io.open(),"open"===this.io._readyState&&this.onopen()),this}open(){return this.connect()}send(...t){return t.unshift("message"),this.emit.apply(this,t),this}emit(t,...e){if(u.hasOwnProperty(t))throw new Error('"'+t.toString()+'" is a reserved event name');if(e.unshift(t),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(e),this;const n={type:i.PacketType.EVENT,data:e,options:{}};if(n.options.compress=!1!==this.flags.compress,"function"==typeof e[e.length-1]){const t=this.ids++;a("emitting packet with ack id %d",t);const r=e.pop();this._registerAckCallback(t,r),n.id=t}const r=this.io.engine&&this.io.engine.transport&&this.io.engine.transport.writable;return!this.flags.volatile||r&&this.connected?this.connected?(this.notifyOutgoingListeners(n),this.packet(n)):this.sendBuffer.push(n):a("discard packet as the transport is not currently writable"),this.flags={},this}_registerAckCallback(t,e){var n;const r=null!==(n=this.flags.timeout)&&void 0!==n?n:this._opts.ackTimeout;if(void 0===r)return void(this.acks[t]=e);const i=this.io.setTimeoutFn((()=>{delete this.acks[t];for(let e=0;e{this.io.clearTimeoutFn(i),e.apply(this,[null,...t])}}emitWithAck(t,...e){const n=void 0!==this.flags.timeout||void 0!==this._opts.ackTimeout;return new Promise(((r,i)=>{e.push(((t,e)=>n?t?i(t):r(e):r(t))),this.emit(t,...e)}))}_addToQueue(t){let e;"function"==typeof t[t.length-1]&&(e=t.pop());const n={id:this._queueSeq++,tryCount:0,pending:!1,args:t,flags:Object.assign({fromQueue:!0},this.flags)};t.push(((t,...r)=>{if(n===this._queue[0])return null!==t?n.tryCount>this._opts.retries&&(a("packet [%d] is discarded after %d tries",n.id,n.tryCount),this._queue.shift(),e&&e(t)):(a("packet [%d] was successfully sent",n.id),this._queue.shift(),e&&e(null,...r)),n.pending=!1,this._drainQueue()})),this._queue.push(n),this._drainQueue()}_drainQueue(t=!1){if(a("draining queue"),!this.connected||0===this._queue.length)return;const e=this._queue[0];!e.pending||t?(e.pending=!0,e.tryCount++,a("sending packet [%d] (try n°%d)",e.id,e.tryCount),this.flags=e.flags,this.emit.apply(this,e.args)):a("packet [%d] has already been sent and is waiting for an ack",e.id)}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){a("transport is open - connecting"),"function"==typeof this.auth?this.auth((t=>{this._sendConnectPacket(t)})):this._sendConnectPacket(this.auth)}_sendConnectPacket(t){this.packet({type:i.PacketType.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},t):t})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,e){a("close (%s)",t),this.connected=!1,delete this.id,this.emitReserved("disconnect",t,e)}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case i.PacketType.CONNECT:t.data&&t.data.sid?this.onconnect(t.data.sid,t.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 i.PacketType.EVENT:case i.PacketType.BINARY_EVENT:this.onevent(t);break;case i.PacketType.ACK:case i.PacketType.BINARY_ACK:this.onack(t);break;case i.PacketType.DISCONNECT:this.ondisconnect();break;case i.PacketType.CONNECT_ERROR:this.destroy();const e=new Error(t.data.message);e.data=t.data.data,this.emitReserved("connect_error",e)}}onevent(t){const e=t.data||[];a("emitting event %j",e),null!=t.id&&(a("attaching ack callback to event"),e.push(this.ack(t.id))),this.connected?this.emitEvent(e):this.receiveBuffer.push(Object.freeze(e))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const e=this._anyListeners.slice();for(const n of e)n.apply(this,t)}super.emit.apply(this,t),this._pid&&t.length&&"string"==typeof t[t.length-1]&&(this._lastOffset=t[t.length-1])}ack(t){const e=this;let n=!1;return function(...r){n||(n=!0,a("sending ack %j",r),e.packet({type:i.PacketType.ACK,id:t,data:r}))}}onack(t){const e=this.acks[t.id];"function"==typeof e?(a("calling ack %s with %j",t.id,t.data),e.apply(this,t.data),delete this.acks[t.id]):a("bad ack %s",t.id)}onconnect(t,e){a("socket connected with id %s",t),this.id=t,this.recovered=e&&this._pid===e,this._pid=e,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach((t=>this.emitEvent(t))),this.receiveBuffer=[],this.sendBuffer.forEach((t=>{this.notifyOutgoingListeners(t),this.packet(t)})),this.sendBuffer=[]}ondisconnect(){a("server disconnect (%s)",this.nsp),this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach((t=>t())),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&(a("performing disconnect (%s)",this.nsp),this.packet({type:i.PacketType.DISCONNECT})),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){const e=this._anyListeners;for(let n=0;n{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.reconstructPacket=e.deconstructPacket=void 0;const r=n(665);function i(t,e){if(!t)return t;if((0,r.isBinary)(t)){const n={_placeholder:!0,num:e.length};return e.push(t),n}if(Array.isArray(t)){const n=new Array(t.length);for(let r=0;r=0&&t.num{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Decoder=e.Encoder=e.PacketType=e.protocol=void 0;const r=n(5260),i=n(4880),o=n(665),s=(0,n(1618).default)("socket.io-parser");var a;e.protocol=5,function(t){t[t.CONNECT=0]="CONNECT",t[t.DISCONNECT=1]="DISCONNECT",t[t.EVENT=2]="EVENT",t[t.ACK=3]="ACK",t[t.CONNECT_ERROR=4]="CONNECT_ERROR",t[t.BINARY_EVENT=5]="BINARY_EVENT",t[t.BINARY_ACK=6]="BINARY_ACK"}(a=e.PacketType||(e.PacketType={})),e.Encoder=class{constructor(t){this.replacer=t}encode(t){return s("encoding packet %j",t),t.type!==a.EVENT&&t.type!==a.ACK||!(0,o.hasBinary)(t)?[this.encodeAsString(t)]:this.encodeAsBinary({type:t.type===a.EVENT?a.BINARY_EVENT:a.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id})}encodeAsString(t){let e=""+t.type;return t.type!==a.BINARY_EVENT&&t.type!==a.BINARY_ACK||(e+=t.attachments+"-"),t.nsp&&"/"!==t.nsp&&(e+=t.nsp+","),null!=t.id&&(e+=t.id),null!=t.data&&(e+=JSON.stringify(t.data,this.replacer)),s("encoded %j as %s",t,e),e}encodeAsBinary(t){const e=(0,i.deconstructPacket)(t),n=this.encodeAsString(e.packet),r=e.buffers;return r.unshift(n),r}};class u extends r.Emitter{constructor(t){super(),this.reviver=t}add(t){let e;if("string"==typeof t){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");e=this.decodeString(t);const n=e.type===a.BINARY_EVENT;n||e.type===a.BINARY_ACK?(e.type=n?a.EVENT:a.ACK,this.reconstructor=new c(e),0===e.attachments&&super.emitReserved("decoded",e)):super.emitReserved("decoded",e)}else{if(!(0,o.isBinary)(t)&&!t.base64)throw new Error("Unknown type: "+t);if(!this.reconstructor)throw new Error("got binary data when not reconstructing a packet");e=this.reconstructor.takeBinaryData(t),e&&(this.reconstructor=null,super.emitReserved("decoded",e))}}decodeString(t){let e=0;const n={type:Number(t.charAt(0))};if(void 0===a[n.type])throw new Error("unknown packet type "+n.type);if(n.type===a.BINARY_EVENT||n.type===a.BINARY_ACK){const r=e+1;for(;"-"!==t.charAt(++e)&&e!=t.length;);const i=t.substring(r,e);if(i!=Number(i)||"-"!==t.charAt(e))throw new Error("Illegal attachments");n.attachments=Number(i)}if("/"===t.charAt(e+1)){const r=e+1;for(;++e&&","!==t.charAt(e)&&e!==t.length;);n.nsp=t.substring(r,e)}else n.nsp="/";const r=t.charAt(e+1);if(""!==r&&Number(r)==r){const r=e+1;for(;++e;){const n=t.charAt(e);if(null==n||Number(n)!=n){--e;break}if(e===t.length)break}n.id=Number(t.substring(r,e+1))}if(t.charAt(++e)){const r=this.tryParse(t.substr(e));if(!u.isPayloadValid(n.type,r))throw new Error("invalid payload");n.data=r}return s("decoded %s as %j",t,n),n}tryParse(t){try{return JSON.parse(t,this.reviver)}catch(t){return!1}}static isPayloadValid(t,e){switch(t){case a.CONNECT:return"object"==typeof e;case a.DISCONNECT:return void 0===e;case a.CONNECT_ERROR:return"string"==typeof e||"object"==typeof e;case a.EVENT:case a.BINARY_EVENT:return Array.isArray(e)&&("string"==typeof e[0]||"number"==typeof e[0]);case a.ACK:case a.BINARY_ACK:return Array.isArray(e)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}e.Decoder=u;class c{constructor(t){this.packet=t,this.buffers=[],this.reconPack=t}takeBinaryData(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){const t=(0,i.reconstructPacket)(this.reconPack,this.buffers);return this.finishedReconstruction(),t}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}},665:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.hasBinary=e.isBinary=void 0;const n="function"==typeof ArrayBuffer,r=Object.prototype.toString,i="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===r.call(Blob),o="function"==typeof File||"undefined"!=typeof File&&"[object FileConstructor]"===r.call(File);function s(t){return n&&(t instanceof ArrayBuffer||(t=>"function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(t):t.buffer instanceof ArrayBuffer)(t))||i&&t instanceof Blob||o&&t instanceof File}e.isBinary=s,e.hasBinary=function t(e,n){if(!e||"object"!=typeof e)return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n{"use strict";function r(t){if(t)return function(t){for(var e in r.prototype)t[e]=r.prototype[e];return t}(t)}n.r(e),n.d(e,{Emitter:()=>r}),r.prototype.on=r.prototype.addEventListener=function(t,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(e),this},r.prototype.once=function(t,e){function n(){this.off(t,n),e.apply(this,arguments)}return n.fn=e,this.on(t,n),this},r.prototype.off=r.prototype.removeListener=r.prototype.removeAllListeners=r.prototype.removeEventListener=function(t,e){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var n,r=this._callbacks["$"+t];if(!r)return this;if(1==arguments.length)return delete this._callbacks["$"+t],this;for(var i=0;i{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.nmd=t=>(t.paths=[],t.children||(t.children=[]),t),n(2174)})(); \ No newline at end of file diff --git a/public/assets/css/game.css b/public/assets/css/game.css index bdf0a9b..85491d4 100644 --- a/public/assets/css/game.css +++ b/public/assets/css/game.css @@ -421,9 +421,19 @@ h3 { font-weight: bold; } -#server-stats { +#game-footer { + display: flex; + justify-content: space-between; margin-top: 1rem; - text-align: right; + border: 0; +} +#game-footer nav { + margin: 0; + padding: 0; +} +#game-footer img { + width: 1rem; + height: 1rem; } footer { diff --git a/public/index.html b/public/index.html index a46a29a..cc0b470 100644 --- a/public/index.html +++ b/public/index.html @@ -44,6 +44,12 @@
+
+
+

If you haven't set a username/password you will not be able to access this character again.

+

+
+
@@ -52,7 +58,15 @@
-
0 Online - Now
+ +
diff --git a/src/client/index.ts b/src/client/index.ts index 1a3dabb..e18c877 100644 --- a/src/client/index.ts +++ b/src/client/index.ts @@ -217,14 +217,17 @@ $('nav a').on('click', e => { e.preventDefault(); e.stopPropagation(); + const $tabContainer = $(`#${$(e.target).data('container')}`); $tabContainer.find('.tab').removeClass('active'); $(`#${$(e.target).data('section')}`).addClass('active'); - $(e.target).closest('nav').find('a').removeClass('active'); - $(e.target).addClass('active'); + if(e.target.innerHTML !== 'Settings') { + $(e.target).closest('nav').find('a').removeClass('active'); + $(e.target).addClass('active'); + } events.emit(`tab:${$(e.target).data('section')}`); }); @@ -803,3 +806,31 @@ $('body').on('click', '#login', async e => { } } }); + +$('body').on('click', '#logout', async e => { + e.preventDefault(); + e.stopPropagation(); + + let logout = false; + + const player = cache.get('player'); + if(/^Player[\d]+$/.test(player.username)) { + const clear = confirm('Are you sure? You will not be able to retrieve this character unless you set up an email/password'); + if(clear) { + logout = true; + } + else { + logout = false; + } + } + else { + logout = true; + } + + if(logout) { + socket.emit('logout'); + localStorage.clear(); + window.location.reload(); + } + +}); diff --git a/src/server/api.ts b/src/server/api.ts index 8cb0f56..24da483 100644 --- a/src/server/api.ts +++ b/src/server/api.ts @@ -185,6 +185,11 @@ io.on('connection', async socket => { }); }); + socket.on('logout', async () => { + // clear this player from the cache! + console.log(`Player ${player.username} logged out`); + }); + socket.on('fight', async (data: {action: 'attack' | 'cast' | 'flee', target: 'head' | 'body' | 'arms' | 'legs'}) => { const monster = await loadMonsterWithFaction(player.id); const playerSkills = await getPlayerSkillsAsObject(player.id); -- 2.25.1 From 223bc6d8d6a9e1a3d55a343ee10fc7638242ae45 Mon Sep 17 00:00:00 2001 From: xangelo Date: Thu, 13 Jul 2023 13:20:19 -0400 Subject: [PATCH 5/7] fix: casting now uses INT instead of CON Fighting was defaulting to constitution instead of intelligence for calculating magical damage. --- src/server/api.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/server/api.ts b/src/server/api.ts index 24da483..ac29843 100644 --- a/src/server/api.ts +++ b/src/server/api.ts @@ -282,9 +282,9 @@ io.on('connection', async socket => { return; } - const primaryStat = data.action === 'attack' ? player.strength : player.constitution; - const boostStat = data.action === 'attack' ? boost.strength : boost.constitution; const attackType = data.action === 'attack' ? 'physical' : 'magical'; + const primaryStat = data.action === 'attack' ? player.strength : player.intelligence; + const boostStat = data.action === 'attack' ? boost.strength : boost.intelligence; const playerDamage = Math.floor(((primaryStat + boostStat) * 1.3) + boost.damage); const skillsUsed: Record = {}; @@ -312,7 +312,7 @@ io.on('connection', async socket => { await updatePlayerSkills(player.id, skillsUsed); - const playerFinalDamage = (attackType === 'magical' && !anyDamageSpells) ? 0 : Math.floor(playerDamage + playerDamageAfterMasteries); + const playerFinalDamage = (data.action === 'cast' && !anyDamageSpells) ? 0 : Math.floor(playerDamage + playerDamageAfterMasteries); const playerFinalHeal = Math.floor(boost.hp + hpHealAfterMasteries); roundData.roundDetails.push(`You targeted the monsters ${data.target.toUpperCase()} with ${attackType} damage!`); -- 2.25.1 From a717a304a25bbff491949a94d01e9332b6e07300 Mon Sep 17 00:00:00 2001 From: xangelo Date: Thu, 13 Jul 2023 13:28:09 -0400 Subject: [PATCH 6/7] feat: display current deployed version in UI --- public/assets/bundle.js | 2 +- public/index.html | 2 +- src/client/index.ts | 4 ++++ src/server/api.ts | 5 +++++ 4 files changed, 11 insertions(+), 2 deletions(-) diff --git a/public/assets/bundle.js b/public/assets/bundle.js index b2a5847..a7a54bf 100644 --- a/public/assets/bundle.js +++ b/public/assets/bundle.js @@ -1,2 +1,2 @@ /*! For license information please see bundle.js.LICENSE.txt */ -(()=>{var t={4802:(t,e,n)=>{e.formatArgs=function(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+t.exports.humanize(this.diff),!this.useColors)return;const n="color: "+this.color;e.splice(1,0,n,"color: inherit");let r=0,i=0;e[0].replace(/%[a-zA-Z%]/g,(t=>{"%%"!==t&&(r++,"%c"===t&&(i=r))})),e.splice(i,0,n)},e.save=function(t){try{t?e.storage.setItem("debug",t):e.storage.removeItem("debug")}catch(t){}},e.load=function(){let t;try{t=e.storage.getItem("debug")}catch(t){}return!t&&"undefined"!=typeof process&&"env"in process&&(t=process.env.DEBUG),t},e.useColors=function(){return!("undefined"==typeof window||!window.process||"renderer"!==window.process.type&&!window.process.__nwjs)||("undefined"==typeof navigator||!navigator.userAgent||!navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))&&("undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))},e.storage=function(){try{return localStorage}catch(t){}}(),e.destroy=(()=>{let t=!1;return()=>{t||(t=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),e.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],e.log=console.debug||console.log||(()=>{}),t.exports=n(804)(e);const{formatters:r}=t.exports;r.j=function(t){try{return JSON.stringify(t)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}},804:(t,e,n)=>{t.exports=function(t){function e(t){let n,i,o,s=null;function a(...t){if(!a.enabled)return;const r=a,i=Number(new Date),o=i-(n||i);r.diff=o,r.prev=n,r.curr=i,n=i,t[0]=e.coerce(t[0]),"string"!=typeof t[0]&&t.unshift("%O");let s=0;t[0]=t[0].replace(/%([a-zA-Z%])/g,((n,i)=>{if("%%"===n)return"%";s++;const o=e.formatters[i];if("function"==typeof o){const e=t[s];n=o.call(r,e),t.splice(s,1),s--}return n})),e.formatArgs.call(r,t),(r.log||e.log).apply(r,t)}return a.namespace=t,a.useColors=e.useColors(),a.color=e.selectColor(t),a.extend=r,a.destroy=e.destroy,Object.defineProperty(a,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==s?s:(i!==e.namespaces&&(i=e.namespaces,o=e.enabled(t)),o),set:t=>{s=t}}),"function"==typeof e.init&&e.init(a),a}function r(t,n){const r=e(this.namespace+(void 0===n?":":n)+t);return r.log=this.log,r}function i(t){return t.toString().substring(2,t.toString().length-2).replace(/\.\*\?$/,"*")}return e.debug=e,e.default=e,e.coerce=function(t){return t instanceof Error?t.stack||t.message:t},e.disable=function(){const t=[...e.names.map(i),...e.skips.map(i).map((t=>"-"+t))].join(",");return e.enable(""),t},e.enable=function(t){let n;e.save(t),e.namespaces=t,e.names=[],e.skips=[];const r=("string"==typeof t?t:"").split(/[\s,]+/),i=r.length;for(n=0;n{e[n]=t[n]})),e.names=[],e.skips=[],e.formatters={},e.selectColor=function(t){let n=0;for(let e=0;e{var e=1e3,n=60*e,r=60*n,i=24*r;function o(t,e,n,r){var i=e>=1.5*n;return Math.round(t/n)+" "+r+(i?"s":"")}t.exports=function(t,s){s=s||{};var a,u,c=typeof t;if("string"===c&&t.length>0)return function(t){if(!((t=String(t)).length>100)){var o=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(t);if(o){var s=parseFloat(o[1]);switch((o[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*s;case"weeks":case"week":case"w":return 6048e5*s;case"days":case"day":case"d":return s*i;case"hours":case"hour":case"hrs":case"hr":case"h":return s*r;case"minutes":case"minute":case"mins":case"min":case"m":return s*n;case"seconds":case"second":case"secs":case"sec":case"s":return s*e;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return s;default:return}}}}(t);if("number"===c&&isFinite(t))return s.long?(a=t,(u=Math.abs(a))>=i?o(a,u,i,"day"):u>=r?o(a,u,r,"hour"):u>=n?o(a,u,n,"minute"):u>=e?o(a,u,e,"second"):a+" ms"):function(t){var o=Math.abs(t);return o>=i?Math.round(t/i)+"d":o>=r?Math.round(t/r)+"h":o>=n?Math.round(t/n)+"m":o>=e?Math.round(t/e)+"s":t+"ms"}(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))}},6486:function(t,e,n){var r;t=n.nmd(t),function(){var i,o="Expected a function",s="__lodash_hash_undefined__",a="__lodash_placeholder__",u=32,c=128,l=1/0,f=9007199254740991,h=NaN,d=4294967295,p=[["ary",c],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",u],["partialRight",64],["rearg",256]],g="[object Arguments]",v="[object Array]",y="[object Boolean]",m="[object Date]",_="[object Error]",b="[object Function]",C="[object GeneratorFunction]",w="[object Map]",k="[object Number]",E="[object Object]",A="[object Promise]",S="[object RegExp]",x="[object Set]",O="[object String]",F="[object Symbol]",T="[object WeakMap]",j="[object ArrayBuffer]",P="[object DataView]",R="[object Float32Array]",$="[object Float64Array]",M="[object Int8Array]",L="[object Int16Array]",N="[object Int32Array]",D="[object Uint8Array]",I="[object Uint8ClampedArray]",B="[object Uint16Array]",q="[object Uint32Array]",U=/\b__p \+= '';/g,H=/\b(__p \+=) '' \+/g,W=/(__e\(.*?\)|\b__t\)) \+\n'';/g,z=/&(?:amp|lt|gt|quot|#39);/g,V=/[&<>"']/g,K=RegExp(z.source),Y=RegExp(V.source),G=/<%-([\s\S]+?)%>/g,J=/<%([\s\S]+?)%>/g,X=/<%=([\s\S]+?)%>/g,Z=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Q=/^\w*$/,tt=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,et=/[\\^$.*+?()[\]{}|]/g,nt=RegExp(et.source),rt=/^\s+/,it=/\s/,ot=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,st=/\{\n\/\* \[wrapped with (.+)\] \*/,at=/,? & /,ut=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,ct=/[()=,{}\[\]\/\s]/,lt=/\\(\\)?/g,ft=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,ht=/\w*$/,dt=/^[-+]0x[0-9a-f]+$/i,pt=/^0b[01]+$/i,gt=/^\[object .+?Constructor\]$/,vt=/^0o[0-7]+$/i,yt=/^(?:0|[1-9]\d*)$/,mt=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,_t=/($^)/,bt=/['\n\r\u2028\u2029\\]/g,Ct="\\ud800-\\udfff",wt="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",kt="\\u2700-\\u27bf",Et="a-z\\xdf-\\xf6\\xf8-\\xff",At="A-Z\\xc0-\\xd6\\xd8-\\xde",St="\\ufe0e\\ufe0f",xt="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\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",Ot="["+Ct+"]",Ft="["+xt+"]",Tt="["+wt+"]",jt="\\d+",Pt="["+kt+"]",Rt="["+Et+"]",$t="[^"+Ct+xt+jt+kt+Et+At+"]",Mt="\\ud83c[\\udffb-\\udfff]",Lt="[^"+Ct+"]",Nt="(?:\\ud83c[\\udde6-\\uddff]){2}",Dt="[\\ud800-\\udbff][\\udc00-\\udfff]",It="["+At+"]",Bt="\\u200d",qt="(?:"+Rt+"|"+$t+")",Ut="(?:"+It+"|"+$t+")",Ht="(?:['’](?:d|ll|m|re|s|t|ve))?",Wt="(?:['’](?:D|LL|M|RE|S|T|VE))?",zt="(?:"+Tt+"|"+Mt+")?",Vt="["+St+"]?",Kt=Vt+zt+"(?:"+Bt+"(?:"+[Lt,Nt,Dt].join("|")+")"+Vt+zt+")*",Yt="(?:"+[Pt,Nt,Dt].join("|")+")"+Kt,Gt="(?:"+[Lt+Tt+"?",Tt,Nt,Dt,Ot].join("|")+")",Jt=RegExp("['’]","g"),Xt=RegExp(Tt,"g"),Zt=RegExp(Mt+"(?="+Mt+")|"+Gt+Kt,"g"),Qt=RegExp([It+"?"+Rt+"+"+Ht+"(?="+[Ft,It,"$"].join("|")+")",Ut+"+"+Wt+"(?="+[Ft,It+qt,"$"].join("|")+")",It+"?"+qt+"+"+Ht,It+"+"+Wt,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",jt,Yt].join("|"),"g"),te=RegExp("["+Bt+Ct+wt+St+"]"),ee=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,ne=["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"],re=-1,ie={};ie[R]=ie[$]=ie[M]=ie[L]=ie[N]=ie[D]=ie[I]=ie[B]=ie[q]=!0,ie[g]=ie[v]=ie[j]=ie[y]=ie[P]=ie[m]=ie[_]=ie[b]=ie[w]=ie[k]=ie[E]=ie[S]=ie[x]=ie[O]=ie[T]=!1;var oe={};oe[g]=oe[v]=oe[j]=oe[P]=oe[y]=oe[m]=oe[R]=oe[$]=oe[M]=oe[L]=oe[N]=oe[w]=oe[k]=oe[E]=oe[S]=oe[x]=oe[O]=oe[F]=oe[D]=oe[I]=oe[B]=oe[q]=!0,oe[_]=oe[b]=oe[T]=!1;var se={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},ae=parseFloat,ue=parseInt,ce="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,le="object"==typeof self&&self&&self.Object===Object&&self,fe=ce||le||Function("return this")(),he=e&&!e.nodeType&&e,de=he&&t&&!t.nodeType&&t,pe=de&&de.exports===he,ge=pe&&ce.process,ve=function(){try{return de&&de.require&&de.require("util").types||ge&&ge.binding&&ge.binding("util")}catch(t){}}(),ye=ve&&ve.isArrayBuffer,me=ve&&ve.isDate,_e=ve&&ve.isMap,be=ve&&ve.isRegExp,Ce=ve&&ve.isSet,we=ve&&ve.isTypedArray;function ke(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}function Ee(t,e,n,r){for(var i=-1,o=null==t?0:t.length;++i-1}function Te(t,e,n){for(var r=-1,i=null==t?0:t.length;++r-1;);return n}function Qe(t,e){for(var n=t.length;n--&&Ie(e,t[n],0)>-1;);return n}var tn=We({À:"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"}),en=We({"&":"&","<":"<",">":">",'"':""","'":"'"});function nn(t){return"\\"+se[t]}function rn(t){return te.test(t)}function on(t){var e=-1,n=Array(t.size);return t.forEach((function(t,r){n[++e]=[r,t]})),n}function sn(t,e){return function(n){return t(e(n))}}function an(t,e){for(var n=-1,r=t.length,i=0,o=[];++n",""":'"',"'":"'"}),pn=function t(e){var n,r=(e=null==e?fe:pn.defaults(fe.Object(),e,pn.pick(fe,ne))).Array,it=e.Date,Ct=e.Error,wt=e.Function,kt=e.Math,Et=e.Object,At=e.RegExp,St=e.String,xt=e.TypeError,Ot=r.prototype,Ft=wt.prototype,Tt=Et.prototype,jt=e["__core-js_shared__"],Pt=Ft.toString,Rt=Tt.hasOwnProperty,$t=0,Mt=(n=/[^.]+$/.exec(jt&&jt.keys&&jt.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"",Lt=Tt.toString,Nt=Pt.call(Et),Dt=fe._,It=At("^"+Pt.call(Rt).replace(et,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Bt=pe?e.Buffer:i,qt=e.Symbol,Ut=e.Uint8Array,Ht=Bt?Bt.allocUnsafe:i,Wt=sn(Et.getPrototypeOf,Et),zt=Et.create,Vt=Tt.propertyIsEnumerable,Kt=Ot.splice,Yt=qt?qt.isConcatSpreadable:i,Gt=qt?qt.iterator:i,Zt=qt?qt.toStringTag:i,te=function(){try{var t=uo(Et,"defineProperty");return t({},"",{}),t}catch(t){}}(),se=e.clearTimeout!==fe.clearTimeout&&e.clearTimeout,ce=it&&it.now!==fe.Date.now&&it.now,le=e.setTimeout!==fe.setTimeout&&e.setTimeout,he=kt.ceil,de=kt.floor,ge=Et.getOwnPropertySymbols,ve=Bt?Bt.isBuffer:i,Le=e.isFinite,We=Ot.join,gn=sn(Et.keys,Et),vn=kt.max,yn=kt.min,mn=it.now,_n=e.parseInt,bn=kt.random,Cn=Ot.reverse,wn=uo(e,"DataView"),kn=uo(e,"Map"),En=uo(e,"Promise"),An=uo(e,"Set"),Sn=uo(e,"WeakMap"),xn=uo(Et,"create"),On=Sn&&new Sn,Fn={},Tn=No(wn),jn=No(kn),Pn=No(En),Rn=No(An),$n=No(Sn),Mn=qt?qt.prototype:i,Ln=Mn?Mn.valueOf:i,Nn=Mn?Mn.toString:i;function Dn(t){if(ta(t)&&!Hs(t)&&!(t instanceof Un)){if(t instanceof qn)return t;if(Rt.call(t,"__wrapped__"))return Do(t)}return new qn(t)}var In=function(){function t(){}return function(e){if(!Qs(e))return{};if(zt)return zt(e);t.prototype=e;var n=new t;return t.prototype=i,n}}();function Bn(){}function qn(t,e){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!e,this.__index__=0,this.__values__=i}function Un(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=d,this.__views__=[]}function Hn(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e=e?t:e)),t}function sr(t,e,n,r,o,s){var a,u=1&e,c=2&e,l=4&e;if(n&&(a=o?n(t,r,o,s):n(t)),a!==i)return a;if(!Qs(t))return t;var f=Hs(t);if(f){if(a=function(t){var e=t.length,n=new t.constructor(e);return e&&"string"==typeof t[0]&&Rt.call(t,"index")&&(n.index=t.index,n.input=t.input),n}(t),!u)return Si(t,a)}else{var h=fo(t),d=h==b||h==C;if(Ks(t))return bi(t,u);if(h==E||h==g||d&&!o){if(a=c||d?{}:po(t),!u)return c?function(t,e){return xi(t,lo(t),e)}(t,function(t,e){return t&&xi(e,ja(e),t)}(a,t)):function(t,e){return xi(t,co(t),e)}(t,nr(a,t))}else{if(!oe[h])return o?t:{};a=function(t,e,n){var r,i=t.constructor;switch(e){case j:return Ci(t);case y:case m:return new i(+t);case P:return function(t,e){var n=e?Ci(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}(t,n);case R:case $:case M:case L:case N:case D:case I:case B:case q:return wi(t,n);case w:return new i;case k:case O:return new i(t);case S:return function(t){var e=new t.constructor(t.source,ht.exec(t));return e.lastIndex=t.lastIndex,e}(t);case x:return new i;case F:return r=t,Ln?Et(Ln.call(r)):{}}}(t,h,u)}}s||(s=new Kn);var p=s.get(t);if(p)return p;s.set(t,a),oa(t)?t.forEach((function(r){a.add(sr(r,e,n,r,t,s))})):ea(t)&&t.forEach((function(r,i){a.set(i,sr(r,e,n,i,t,s))}));var v=f?i:(l?c?eo:to:c?ja:Ta)(t);return Ae(v||t,(function(r,i){v&&(r=t[i=r]),Qn(a,i,sr(r,e,n,i,t,s))})),a}function ar(t,e,n){var r=n.length;if(null==t)return!r;for(t=Et(t);r--;){var o=n[r],s=e[o],a=t[o];if(a===i&&!(o in t)||!s(a))return!1}return!0}function ur(t,e,n){if("function"!=typeof t)throw new xt(o);return Oo((function(){t.apply(i,n)}),e)}function cr(t,e,n,r){var i=-1,o=Fe,s=!0,a=t.length,u=[],c=e.length;if(!a)return u;n&&(e=je(e,Ge(n))),r?(o=Te,s=!1):e.length>=200&&(o=Xe,s=!1,e=new Vn(e));t:for(;++i-1},Wn.prototype.set=function(t,e){var n=this.__data__,r=tr(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this},zn.prototype.clear=function(){this.size=0,this.__data__={hash:new Hn,map:new(kn||Wn),string:new Hn}},zn.prototype.delete=function(t){var e=so(this,t).delete(t);return this.size-=e?1:0,e},zn.prototype.get=function(t){return so(this,t).get(t)},zn.prototype.has=function(t){return so(this,t).has(t)},zn.prototype.set=function(t,e){var n=so(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this},Vn.prototype.add=Vn.prototype.push=function(t){return this.__data__.set(t,s),this},Vn.prototype.has=function(t){return this.__data__.has(t)},Kn.prototype.clear=function(){this.__data__=new Wn,this.size=0},Kn.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},Kn.prototype.get=function(t){return this.__data__.get(t)},Kn.prototype.has=function(t){return this.__data__.has(t)},Kn.prototype.set=function(t,e){var n=this.__data__;if(n instanceof Wn){var r=n.__data__;if(!kn||r.length<199)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new zn(r)}return n.set(t,e),this.size=n.size,this};var lr=Ti(mr),fr=Ti(_r,!0);function hr(t,e){var n=!0;return lr(t,(function(t,r,i){return n=!!e(t,r,i)})),n}function dr(t,e,n){for(var r=-1,o=t.length;++r0&&n(a)?e>1?gr(a,e-1,n,r,i):Pe(i,a):r||(i[i.length]=a)}return i}var vr=ji(),yr=ji(!0);function mr(t,e){return t&&vr(t,e,Ta)}function _r(t,e){return t&&yr(t,e,Ta)}function br(t,e){return Oe(e,(function(e){return Js(t[e])}))}function Cr(t,e){for(var n=0,r=(e=vi(e,t)).length;null!=t&&ne}function Ar(t,e){return null!=t&&Rt.call(t,e)}function Sr(t,e){return null!=t&&e in Et(t)}function xr(t,e,n){for(var o=n?Te:Fe,s=t[0].length,a=t.length,u=a,c=r(a),l=1/0,f=[];u--;){var h=t[u];u&&e&&(h=je(h,Ge(e))),l=yn(h.length,l),c[u]=!n&&(e||s>=120&&h.length>=120)?new Vn(u&&h):i}h=t[0];var d=-1,p=c[0];t:for(;++d=a?u:u*("desc"==n[r]?-1:1)}return t.index-e.index}(t,e,n)}));r--;)t[r]=t[r].value;return t}(i)}function Ur(t,e,n){for(var r=-1,i=e.length,o={};++r-1;)a!==t&&Kt.call(a,u,1),Kt.call(t,u,1);return t}function Wr(t,e){for(var n=t?e.length:0,r=n-1;n--;){var i=e[n];if(n==r||i!==o){var o=i;vo(i)?Kt.call(t,i,1):ui(t,i)}}return t}function zr(t,e){return t+de(bn()*(e-t+1))}function Vr(t,e){var n="";if(!t||e<1||e>f)return n;do{e%2&&(n+=t),(e=de(e/2))&&(t+=t)}while(e);return n}function Kr(t,e){return Fo(Eo(t,e,nu),t+"")}function Yr(t){return Gn(Ia(t))}function Gr(t,e){var n=Ia(t);return Po(n,or(e,0,n.length))}function Jr(t,e,n,r){if(!Qs(t))return t;for(var o=-1,s=(e=vi(e,t)).length,a=s-1,u=t;null!=u&&++oo?0:o+e),(n=n>o?o:n)<0&&(n+=o),o=e>n?0:n-e>>>0,e>>>=0;for(var s=r(o);++i>>1,s=t[o];null!==s&&!aa(s)&&(n?s<=e:s=200){var c=e?null:Vi(t);if(c)return un(c);s=!1,i=Xe,u=new Vn}else u=e?[]:a;t:for(;++r=r?t:ti(t,e,n)}var _i=se||function(t){return fe.clearTimeout(t)};function bi(t,e){if(e)return t.slice();var n=t.length,r=Ht?Ht(n):new t.constructor(n);return t.copy(r),r}function Ci(t){var e=new t.constructor(t.byteLength);return new Ut(e).set(new Ut(t)),e}function wi(t,e){var n=e?Ci(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}function ki(t,e){if(t!==e){var n=t!==i,r=null===t,o=t==t,s=aa(t),a=e!==i,u=null===e,c=e==e,l=aa(e);if(!u&&!l&&!s&&t>e||s&&a&&c&&!u&&!l||r&&a&&c||!n&&c||!o)return 1;if(!r&&!s&&!l&&t1?n[o-1]:i,a=o>2?n[2]:i;for(s=t.length>3&&"function"==typeof s?(o--,s):i,a&&yo(n[0],n[1],a)&&(s=o<3?i:s,o=1),e=Et(e);++r-1?o[s?e[a]:a]:i}}function Li(t){return Qi((function(e){var n=e.length,r=n,s=qn.prototype.thru;for(t&&e.reverse();r--;){var a=e[r];if("function"!=typeof a)throw new xt(o);if(s&&!u&&"wrapper"==ro(a))var u=new qn([],!0)}for(r=u?r:n;++r1&&b.reverse(),d&&f<_&&(b.length=f),this&&this!==fe&&this instanceof c&&(S=m||$i(S)),S.apply(A,b)}}function Di(t,e){return function(n,r){return function(t,e,n,r){return mr(t,(function(t,i,o){e(r,n(t),i,o)})),r}(n,t,e(r),{})}}function Ii(t,e){return function(n,r){var o;if(n===i&&r===i)return e;if(n!==i&&(o=n),r!==i){if(o===i)return r;"string"==typeof n||"string"==typeof r?(n=si(n),r=si(r)):(n=oi(n),r=oi(r)),o=t(n,r)}return o}}function Bi(t){return Qi((function(e){return e=je(e,Ge(oo())),Kr((function(n){var r=this;return t(e,(function(t){return ke(t,r,n)}))}))}))}function qi(t,e){var n=(e=e===i?" ":si(e)).length;if(n<2)return n?Vr(e,t):e;var r=Vr(e,he(t/ln(e)));return rn(e)?mi(fn(r),0,t).join(""):r.slice(0,t)}function Ui(t){return function(e,n,o){return o&&"number"!=typeof o&&yo(e,n,o)&&(n=o=i),e=ha(e),n===i?(n=e,e=0):n=ha(n),function(t,e,n,i){for(var o=-1,s=vn(he((e-t)/(n||1)),0),a=r(s);s--;)a[i?s:++o]=t,t+=n;return a}(e,n,o=o===i?eu))return!1;var l=s.get(t),f=s.get(e);if(l&&f)return l==e&&f==t;var h=-1,d=!0,p=2&n?new Vn:i;for(s.set(t,e),s.set(e,t);++h-1&&t%1==0&&t1?"& ":"")+e[r],e=e.join(n>2?", ":" "),t.replace(ot,"{\n/* [wrapped with "+e+"] */\n")}(r,function(t,e){return Ae(p,(function(n){var r="_."+n[0];e&n[1]&&!Fe(t,r)&&t.push(r)})),t.sort()}(function(t){var e=t.match(st);return e?e[1].split(at):[]}(r),n)))}function jo(t){var e=0,n=0;return function(){var r=mn(),o=16-(r-n);if(n=r,o>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(i,arguments)}}function Po(t,e){var n=-1,r=t.length,o=r-1;for(e=e===i?r:e;++n1?t[e-1]:i;return n="function"==typeof n?(t.pop(),n):i,is(t,n)}));function fs(t){var e=Dn(t);return e.__chain__=!0,e}function hs(t,e){return e(t)}var ds=Qi((function(t){var e=t.length,n=e?t[0]:0,r=this.__wrapped__,o=function(e){return ir(e,t)};return!(e>1||this.__actions__.length)&&r instanceof Un&&vo(n)?((r=r.slice(n,+n+(e?1:0))).__actions__.push({func:hs,args:[o],thisArg:i}),new qn(r,this.__chain__).thru((function(t){return e&&!t.length&&t.push(i),t}))):this.thru(o)})),ps=Oi((function(t,e,n){Rt.call(t,n)?++t[n]:rr(t,n,1)})),gs=Mi(Uo),vs=Mi(Ho);function ys(t,e){return(Hs(t)?Ae:lr)(t,oo(e,3))}function ms(t,e){return(Hs(t)?Se:fr)(t,oo(e,3))}var _s=Oi((function(t,e,n){Rt.call(t,n)?t[n].push(e):rr(t,n,[e])})),bs=Kr((function(t,e,n){var i=-1,o="function"==typeof e,s=zs(t)?r(t.length):[];return lr(t,(function(t){s[++i]=o?ke(e,t,n):Or(t,e,n)})),s})),Cs=Oi((function(t,e,n){rr(t,n,e)}));function ws(t,e){return(Hs(t)?je:Lr)(t,oo(e,3))}var ks=Oi((function(t,e,n){t[n?0:1].push(e)}),(function(){return[[],[]]})),Es=Kr((function(t,e){if(null==t)return[];var n=e.length;return n>1&&yo(t,e[0],e[1])?e=[]:n>2&&yo(e[0],e[1],e[2])&&(e=[e[0]]),qr(t,gr(e,1),[])})),As=ce||function(){return fe.Date.now()};function Ss(t,e,n){return e=n?i:e,e=t&&null==e?t.length:e,Yi(t,c,i,i,i,i,e)}function xs(t,e){var n;if("function"!=typeof e)throw new xt(o);return t=da(t),function(){return--t>0&&(n=e.apply(this,arguments)),t<=1&&(e=i),n}}var Os=Kr((function(t,e,n){var r=1;if(n.length){var i=an(n,io(Os));r|=u}return Yi(t,r,e,n,i)})),Fs=Kr((function(t,e,n){var r=3;if(n.length){var i=an(n,io(Fs));r|=u}return Yi(e,r,t,n,i)}));function Ts(t,e,n){var r,s,a,u,c,l,f=0,h=!1,d=!1,p=!0;if("function"!=typeof t)throw new xt(o);function g(e){var n=r,o=s;return r=s=i,f=e,u=t.apply(o,n)}function v(t){var n=t-l;return l===i||n>=e||n<0||d&&t-f>=a}function y(){var t=As();if(v(t))return m(t);c=Oo(y,function(t){var n=e-(t-l);return d?yn(n,a-(t-f)):n}(t))}function m(t){return c=i,p&&r?g(t):(r=s=i,u)}function _(){var t=As(),n=v(t);if(r=arguments,s=this,l=t,n){if(c===i)return function(t){return f=t,c=Oo(y,e),h?g(t):u}(l);if(d)return _i(c),c=Oo(y,e),g(l)}return c===i&&(c=Oo(y,e)),u}return e=ga(e)||0,Qs(n)&&(h=!!n.leading,a=(d="maxWait"in n)?vn(ga(n.maxWait)||0,e):a,p="trailing"in n?!!n.trailing:p),_.cancel=function(){c!==i&&_i(c),f=0,r=l=s=c=i},_.flush=function(){return c===i?u:m(As())},_}var js=Kr((function(t,e){return ur(t,1,e)})),Ps=Kr((function(t,e,n){return ur(t,ga(e)||0,n)}));function Rs(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new xt(o);var n=function(){var r=arguments,i=e?e.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var s=t.apply(this,r);return n.cache=o.set(i,s)||o,s};return n.cache=new(Rs.Cache||zn),n}function $s(t){if("function"!=typeof t)throw new xt(o);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)}}Rs.Cache=zn;var Ms=yi((function(t,e){var n=(e=1==e.length&&Hs(e[0])?je(e[0],Ge(oo())):je(gr(e,1),Ge(oo()))).length;return Kr((function(r){for(var i=-1,o=yn(r.length,n);++i=e})),Us=Fr(function(){return arguments}())?Fr:function(t){return ta(t)&&Rt.call(t,"callee")&&!Vt.call(t,"callee")},Hs=r.isArray,Ws=ye?Ge(ye):function(t){return ta(t)&&kr(t)==j};function zs(t){return null!=t&&Zs(t.length)&&!Js(t)}function Vs(t){return ta(t)&&zs(t)}var Ks=ve||gu,Ys=me?Ge(me):function(t){return ta(t)&&kr(t)==m};function Gs(t){if(!ta(t))return!1;var e=kr(t);return e==_||"[object DOMException]"==e||"string"==typeof t.message&&"string"==typeof t.name&&!ra(t)}function Js(t){if(!Qs(t))return!1;var e=kr(t);return e==b||e==C||"[object AsyncFunction]"==e||"[object Proxy]"==e}function Xs(t){return"number"==typeof t&&t==da(t)}function Zs(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=f}function Qs(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function ta(t){return null!=t&&"object"==typeof t}var ea=_e?Ge(_e):function(t){return ta(t)&&fo(t)==w};function na(t){return"number"==typeof t||ta(t)&&kr(t)==k}function ra(t){if(!ta(t)||kr(t)!=E)return!1;var e=Wt(t);if(null===e)return!0;var n=Rt.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&Pt.call(n)==Nt}var ia=be?Ge(be):function(t){return ta(t)&&kr(t)==S},oa=Ce?Ge(Ce):function(t){return ta(t)&&fo(t)==x};function sa(t){return"string"==typeof t||!Hs(t)&&ta(t)&&kr(t)==O}function aa(t){return"symbol"==typeof t||ta(t)&&kr(t)==F}var ua=we?Ge(we):function(t){return ta(t)&&Zs(t.length)&&!!ie[kr(t)]},ca=Hi(Mr),la=Hi((function(t,e){return t<=e}));function fa(t){if(!t)return[];if(zs(t))return sa(t)?fn(t):Si(t);if(Gt&&t[Gt])return function(t){for(var e,n=[];!(e=t.next()).done;)n.push(e.value);return n}(t[Gt]());var e=fo(t);return(e==w?on:e==x?un:Ia)(t)}function ha(t){return t?(t=ga(t))===l||t===-1/0?17976931348623157e292*(t<0?-1:1):t==t?t:0:0===t?t:0}function da(t){var e=ha(t),n=e%1;return e==e?n?e-n:e:0}function pa(t){return t?or(da(t),0,d):0}function ga(t){if("number"==typeof t)return t;if(aa(t))return h;if(Qs(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=Qs(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=Ye(t);var n=pt.test(t);return n||vt.test(t)?ue(t.slice(2),n?2:8):dt.test(t)?h:+t}function va(t){return xi(t,ja(t))}function ya(t){return null==t?"":si(t)}var ma=Fi((function(t,e){if(Co(e)||zs(e))xi(e,Ta(e),t);else for(var n in e)Rt.call(e,n)&&Qn(t,n,e[n])})),_a=Fi((function(t,e){xi(e,ja(e),t)})),ba=Fi((function(t,e,n,r){xi(e,ja(e),t,r)})),Ca=Fi((function(t,e,n,r){xi(e,Ta(e),t,r)})),wa=Qi(ir),ka=Kr((function(t,e){t=Et(t);var n=-1,r=e.length,o=r>2?e[2]:i;for(o&&yo(e[0],e[1],o)&&(r=1);++n1),e})),xi(t,eo(t),n),r&&(n=sr(n,7,Xi));for(var i=e.length;i--;)ui(n,e[i]);return n})),Ma=Qi((function(t,e){return null==t?{}:function(t,e){return Ur(t,e,(function(e,n){return Sa(t,n)}))}(t,e)}));function La(t,e){if(null==t)return{};var n=je(eo(t),(function(t){return[t]}));return e=oo(e),Ur(t,n,(function(t,n){return e(t,n[0])}))}var Na=Ki(Ta),Da=Ki(ja);function Ia(t){return null==t?[]:Je(t,Ta(t))}var Ba=Ri((function(t,e,n){return e=e.toLowerCase(),t+(n?qa(e):e)}));function qa(t){return Ga(ya(t).toLowerCase())}function Ua(t){return(t=ya(t))&&t.replace(mt,tn).replace(Xt,"")}var Ha=Ri((function(t,e,n){return t+(n?"-":"")+e.toLowerCase()})),Wa=Ri((function(t,e,n){return t+(n?" ":"")+e.toLowerCase()})),za=Pi("toLowerCase"),Va=Ri((function(t,e,n){return t+(n?"_":"")+e.toLowerCase()})),Ka=Ri((function(t,e,n){return t+(n?" ":"")+Ga(e)})),Ya=Ri((function(t,e,n){return t+(n?" ":"")+e.toUpperCase()})),Ga=Pi("toUpperCase");function Ja(t,e,n){return t=ya(t),(e=n?i:e)===i?function(t){return ee.test(t)}(t)?function(t){return t.match(Qt)||[]}(t):function(t){return t.match(ut)||[]}(t):t.match(e)||[]}var Xa=Kr((function(t,e){try{return ke(t,i,e)}catch(t){return Gs(t)?t:new Ct(t)}})),Za=Qi((function(t,e){return Ae(e,(function(e){e=Lo(e),rr(t,e,Os(t[e],t))})),t}));function Qa(t){return function(){return t}}var tu=Li(),eu=Li(!0);function nu(t){return t}function ru(t){return Rr("function"==typeof t?t:sr(t,1))}var iu=Kr((function(t,e){return function(n){return Or(n,t,e)}})),ou=Kr((function(t,e){return function(n){return Or(t,n,e)}}));function su(t,e,n){var r=Ta(e),i=br(e,r);null!=n||Qs(e)&&(i.length||!r.length)||(n=e,e=t,t=this,i=br(e,Ta(e)));var o=!(Qs(n)&&"chain"in n&&!n.chain),s=Js(t);return Ae(i,(function(n){var r=e[n];t[n]=r,s&&(t.prototype[n]=function(){var e=this.__chain__;if(o||e){var n=t(this.__wrapped__);return(n.__actions__=Si(this.__actions__)).push({func:r,args:arguments,thisArg:t}),n.__chain__=e,n}return r.apply(t,Pe([this.value()],arguments))})})),t}function au(){}var uu=Bi(je),cu=Bi(xe),lu=Bi(Me);function fu(t){return mo(t)?He(Lo(t)):function(t){return function(e){return Cr(e,t)}}(t)}var hu=Ui(),du=Ui(!0);function pu(){return[]}function gu(){return!1}var vu,yu=Ii((function(t,e){return t+e}),0),mu=zi("ceil"),_u=Ii((function(t,e){return t/e}),1),bu=zi("floor"),Cu=Ii((function(t,e){return t*e}),1),wu=zi("round"),ku=Ii((function(t,e){return t-e}),0);return Dn.after=function(t,e){if("function"!=typeof e)throw new xt(o);return t=da(t),function(){if(--t<1)return e.apply(this,arguments)}},Dn.ary=Ss,Dn.assign=ma,Dn.assignIn=_a,Dn.assignInWith=ba,Dn.assignWith=Ca,Dn.at=wa,Dn.before=xs,Dn.bind=Os,Dn.bindAll=Za,Dn.bindKey=Fs,Dn.castArray=function(){if(!arguments.length)return[];var t=arguments[0];return Hs(t)?t:[t]},Dn.chain=fs,Dn.chunk=function(t,e,n){e=(n?yo(t,e,n):e===i)?1:vn(da(e),0);var o=null==t?0:t.length;if(!o||e<1)return[];for(var s=0,a=0,u=r(he(o/e));so?0:o+n),(r=r===i||r>o?o:da(r))<0&&(r+=o),r=n>r?0:pa(r);n>>0)?(t=ya(t))&&("string"==typeof e||null!=e&&!ia(e))&&!(e=si(e))&&rn(t)?mi(fn(t),0,n):t.split(e,n):[]},Dn.spread=function(t,e){if("function"!=typeof t)throw new xt(o);return e=null==e?0:vn(da(e),0),Kr((function(n){var r=n[e],i=mi(n,0,e);return r&&Pe(i,r),ke(t,this,i)}))},Dn.tail=function(t){var e=null==t?0:t.length;return e?ti(t,1,e):[]},Dn.take=function(t,e,n){return t&&t.length?ti(t,0,(e=n||e===i?1:da(e))<0?0:e):[]},Dn.takeRight=function(t,e,n){var r=null==t?0:t.length;return r?ti(t,(e=r-(e=n||e===i?1:da(e)))<0?0:e,r):[]},Dn.takeRightWhile=function(t,e){return t&&t.length?li(t,oo(e,3),!1,!0):[]},Dn.takeWhile=function(t,e){return t&&t.length?li(t,oo(e,3)):[]},Dn.tap=function(t,e){return e(t),t},Dn.throttle=function(t,e,n){var r=!0,i=!0;if("function"!=typeof t)throw new xt(o);return Qs(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),Ts(t,e,{leading:r,maxWait:e,trailing:i})},Dn.thru=hs,Dn.toArray=fa,Dn.toPairs=Na,Dn.toPairsIn=Da,Dn.toPath=function(t){return Hs(t)?je(t,Lo):aa(t)?[t]:Si(Mo(ya(t)))},Dn.toPlainObject=va,Dn.transform=function(t,e,n){var r=Hs(t),i=r||Ks(t)||ua(t);if(e=oo(e,4),null==n){var o=t&&t.constructor;n=i?r?new o:[]:Qs(t)&&Js(o)?In(Wt(t)):{}}return(i?Ae:mr)(t,(function(t,r,i){return e(n,t,r,i)})),n},Dn.unary=function(t){return Ss(t,1)},Dn.union=ts,Dn.unionBy=es,Dn.unionWith=ns,Dn.uniq=function(t){return t&&t.length?ai(t):[]},Dn.uniqBy=function(t,e){return t&&t.length?ai(t,oo(e,2)):[]},Dn.uniqWith=function(t,e){return e="function"==typeof e?e:i,t&&t.length?ai(t,i,e):[]},Dn.unset=function(t,e){return null==t||ui(t,e)},Dn.unzip=rs,Dn.unzipWith=is,Dn.update=function(t,e,n){return null==t?t:ci(t,e,gi(n))},Dn.updateWith=function(t,e,n,r){return r="function"==typeof r?r:i,null==t?t:ci(t,e,gi(n),r)},Dn.values=Ia,Dn.valuesIn=function(t){return null==t?[]:Je(t,ja(t))},Dn.without=os,Dn.words=Ja,Dn.wrap=function(t,e){return Ls(gi(e),t)},Dn.xor=ss,Dn.xorBy=as,Dn.xorWith=us,Dn.zip=cs,Dn.zipObject=function(t,e){return di(t||[],e||[],Qn)},Dn.zipObjectDeep=function(t,e){return di(t||[],e||[],Jr)},Dn.zipWith=ls,Dn.entries=Na,Dn.entriesIn=Da,Dn.extend=_a,Dn.extendWith=ba,su(Dn,Dn),Dn.add=yu,Dn.attempt=Xa,Dn.camelCase=Ba,Dn.capitalize=qa,Dn.ceil=mu,Dn.clamp=function(t,e,n){return n===i&&(n=e,e=i),n!==i&&(n=(n=ga(n))==n?n:0),e!==i&&(e=(e=ga(e))==e?e:0),or(ga(t),e,n)},Dn.clone=function(t){return sr(t,4)},Dn.cloneDeep=function(t){return sr(t,5)},Dn.cloneDeepWith=function(t,e){return sr(t,5,e="function"==typeof e?e:i)},Dn.cloneWith=function(t,e){return sr(t,4,e="function"==typeof e?e:i)},Dn.conformsTo=function(t,e){return null==e||ar(t,e,Ta(e))},Dn.deburr=Ua,Dn.defaultTo=function(t,e){return null==t||t!=t?e:t},Dn.divide=_u,Dn.endsWith=function(t,e,n){t=ya(t),e=si(e);var r=t.length,o=n=n===i?r:or(da(n),0,r);return(n-=e.length)>=0&&t.slice(n,o)==e},Dn.eq=Is,Dn.escape=function(t){return(t=ya(t))&&Y.test(t)?t.replace(V,en):t},Dn.escapeRegExp=function(t){return(t=ya(t))&&nt.test(t)?t.replace(et,"\\$&"):t},Dn.every=function(t,e,n){var r=Hs(t)?xe:hr;return n&&yo(t,e,n)&&(e=i),r(t,oo(e,3))},Dn.find=gs,Dn.findIndex=Uo,Dn.findKey=function(t,e){return Ne(t,oo(e,3),mr)},Dn.findLast=vs,Dn.findLastIndex=Ho,Dn.findLastKey=function(t,e){return Ne(t,oo(e,3),_r)},Dn.floor=bu,Dn.forEach=ys,Dn.forEachRight=ms,Dn.forIn=function(t,e){return null==t?t:vr(t,oo(e,3),ja)},Dn.forInRight=function(t,e){return null==t?t:yr(t,oo(e,3),ja)},Dn.forOwn=function(t,e){return t&&mr(t,oo(e,3))},Dn.forOwnRight=function(t,e){return t&&_r(t,oo(e,3))},Dn.get=Aa,Dn.gt=Bs,Dn.gte=qs,Dn.has=function(t,e){return null!=t&&ho(t,e,Ar)},Dn.hasIn=Sa,Dn.head=zo,Dn.identity=nu,Dn.includes=function(t,e,n,r){t=zs(t)?t:Ia(t),n=n&&!r?da(n):0;var i=t.length;return n<0&&(n=vn(i+n,0)),sa(t)?n<=i&&t.indexOf(e,n)>-1:!!i&&Ie(t,e,n)>-1},Dn.indexOf=function(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=null==n?0:da(n);return i<0&&(i=vn(r+i,0)),Ie(t,e,i)},Dn.inRange=function(t,e,n){return e=ha(e),n===i?(n=e,e=0):n=ha(n),function(t,e,n){return t>=yn(e,n)&&t=-9007199254740991&&t<=f},Dn.isSet=oa,Dn.isString=sa,Dn.isSymbol=aa,Dn.isTypedArray=ua,Dn.isUndefined=function(t){return t===i},Dn.isWeakMap=function(t){return ta(t)&&fo(t)==T},Dn.isWeakSet=function(t){return ta(t)&&"[object WeakSet]"==kr(t)},Dn.join=function(t,e){return null==t?"":We.call(t,e)},Dn.kebabCase=Ha,Dn.last=Go,Dn.lastIndexOf=function(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var o=r;return n!==i&&(o=(o=da(n))<0?vn(r+o,0):yn(o,r-1)),e==e?function(t,e,n){for(var r=n+1;r--;)if(t[r]===e)return r;return r}(t,e,o):De(t,qe,o,!0)},Dn.lowerCase=Wa,Dn.lowerFirst=za,Dn.lt=ca,Dn.lte=la,Dn.max=function(t){return t&&t.length?dr(t,nu,Er):i},Dn.maxBy=function(t,e){return t&&t.length?dr(t,oo(e,2),Er):i},Dn.mean=function(t){return Ue(t,nu)},Dn.meanBy=function(t,e){return Ue(t,oo(e,2))},Dn.min=function(t){return t&&t.length?dr(t,nu,Mr):i},Dn.minBy=function(t,e){return t&&t.length?dr(t,oo(e,2),Mr):i},Dn.stubArray=pu,Dn.stubFalse=gu,Dn.stubObject=function(){return{}},Dn.stubString=function(){return""},Dn.stubTrue=function(){return!0},Dn.multiply=Cu,Dn.nth=function(t,e){return t&&t.length?Br(t,da(e)):i},Dn.noConflict=function(){return fe._===this&&(fe._=Dt),this},Dn.noop=au,Dn.now=As,Dn.pad=function(t,e,n){t=ya(t);var r=(e=da(e))?ln(t):0;if(!e||r>=e)return t;var i=(e-r)/2;return qi(de(i),n)+t+qi(he(i),n)},Dn.padEnd=function(t,e,n){t=ya(t);var r=(e=da(e))?ln(t):0;return e&&re){var r=t;t=e,e=r}if(n||t%1||e%1){var o=bn();return yn(t+o*(e-t+ae("1e-"+((o+"").length-1))),e)}return zr(t,e)},Dn.reduce=function(t,e,n){var r=Hs(t)?Re:ze,i=arguments.length<3;return r(t,oo(e,4),n,i,lr)},Dn.reduceRight=function(t,e,n){var r=Hs(t)?$e:ze,i=arguments.length<3;return r(t,oo(e,4),n,i,fr)},Dn.repeat=function(t,e,n){return e=(n?yo(t,e,n):e===i)?1:da(e),Vr(ya(t),e)},Dn.replace=function(){var t=arguments,e=ya(t[0]);return t.length<3?e:e.replace(t[1],t[2])},Dn.result=function(t,e,n){var r=-1,o=(e=vi(e,t)).length;for(o||(o=1,t=i);++rf)return[];var n=d,r=yn(t,d);e=oo(e),t-=d;for(var i=Ke(r,e);++n=s)return t;var u=n-ln(r);if(u<1)return r;var c=a?mi(a,0,u).join(""):t.slice(0,u);if(o===i)return c+r;if(a&&(u+=c.length-u),ia(o)){if(t.slice(u).search(o)){var l,f=c;for(o.global||(o=At(o.source,ya(ht.exec(o))+"g")),o.lastIndex=0;l=o.exec(f);)var h=l.index;c=c.slice(0,h===i?u:h)}}else if(t.indexOf(si(o),u)!=u){var d=c.lastIndexOf(o);d>-1&&(c=c.slice(0,d))}return c+r},Dn.unescape=function(t){return(t=ya(t))&&K.test(t)?t.replace(z,dn):t},Dn.uniqueId=function(t){var e=++$t;return ya(t)+e},Dn.upperCase=Ya,Dn.upperFirst=Ga,Dn.each=ys,Dn.eachRight=ms,Dn.first=zo,su(Dn,(vu={},mr(Dn,(function(t,e){Rt.call(Dn.prototype,e)||(vu[e]=t)})),vu),{chain:!1}),Dn.VERSION="4.17.21",Ae(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(t){Dn[t].placeholder=Dn})),Ae(["drop","take"],(function(t,e){Un.prototype[t]=function(n){n=n===i?1:vn(da(n),0);var r=this.__filtered__&&!e?new Un(this):this.clone();return r.__filtered__?r.__takeCount__=yn(n,r.__takeCount__):r.__views__.push({size:yn(n,d),type:t+(r.__dir__<0?"Right":"")}),r},Un.prototype[t+"Right"]=function(e){return this.reverse()[t](e).reverse()}})),Ae(["filter","map","takeWhile"],(function(t,e){var n=e+1,r=1==n||3==n;Un.prototype[t]=function(t){var e=this.clone();return e.__iteratees__.push({iteratee:oo(t,3),type:n}),e.__filtered__=e.__filtered__||r,e}})),Ae(["head","last"],(function(t,e){var n="take"+(e?"Right":"");Un.prototype[t]=function(){return this[n](1).value()[0]}})),Ae(["initial","tail"],(function(t,e){var n="drop"+(e?"":"Right");Un.prototype[t]=function(){return this.__filtered__?new Un(this):this[n](1)}})),Un.prototype.compact=function(){return this.filter(nu)},Un.prototype.find=function(t){return this.filter(t).head()},Un.prototype.findLast=function(t){return this.reverse().find(t)},Un.prototype.invokeMap=Kr((function(t,e){return"function"==typeof t?new Un(this):this.map((function(n){return Or(n,t,e)}))})),Un.prototype.reject=function(t){return this.filter($s(oo(t)))},Un.prototype.slice=function(t,e){t=da(t);var n=this;return n.__filtered__&&(t>0||e<0)?new Un(n):(t<0?n=n.takeRight(-t):t&&(n=n.drop(t)),e!==i&&(n=(e=da(e))<0?n.dropRight(-e):n.take(e-t)),n)},Un.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},Un.prototype.toArray=function(){return this.take(d)},mr(Un.prototype,(function(t,e){var n=/^(?:filter|find|map|reject)|While$/.test(e),r=/^(?:head|last)$/.test(e),o=Dn[r?"take"+("last"==e?"Right":""):e],s=r||/^find/.test(e);o&&(Dn.prototype[e]=function(){var e=this.__wrapped__,a=r?[1]:arguments,u=e instanceof Un,c=a[0],l=u||Hs(e),f=function(t){var e=o.apply(Dn,Pe([t],a));return r&&h?e[0]:e};l&&n&&"function"==typeof c&&1!=c.length&&(u=l=!1);var h=this.__chain__,d=!!this.__actions__.length,p=s&&!h,g=u&&!d;if(!s&&l){e=g?e:new Un(this);var v=t.apply(e,a);return v.__actions__.push({func:hs,args:[f],thisArg:i}),new qn(v,h)}return p&&g?t.apply(this,a):(v=this.thru(f),p?r?v.value()[0]:v.value():v)})})),Ae(["pop","push","shift","sort","splice","unshift"],(function(t){var e=Ot[t],n=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",r=/^(?:pop|shift)$/.test(t);Dn.prototype[t]=function(){var t=arguments;if(r&&!this.__chain__){var i=this.value();return e.apply(Hs(i)?i:[],t)}return this[n]((function(n){return e.apply(Hs(n)?n:[],t)}))}})),mr(Un.prototype,(function(t,e){var n=Dn[e];if(n){var r=n.name+"";Rt.call(Fn,r)||(Fn[r]=[]),Fn[r].push({name:e,func:n})}})),Fn[Ni(i,2).name]=[{name:"wrapper",func:i}],Un.prototype.clone=function(){var t=new Un(this.__wrapped__);return t.__actions__=Si(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=Si(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=Si(this.__views__),t},Un.prototype.reverse=function(){if(this.__filtered__){var t=new Un(this);t.__dir__=-1,t.__filtered__=!0}else(t=this.clone()).__dir__*=-1;return t},Un.prototype.value=function(){var t=this.__wrapped__.value(),e=this.__dir__,n=Hs(t),r=e<0,i=n?t.length:0,o=function(t,e,n){for(var r=-1,i=n.length;++r=this.__values__.length;return{done:t,value:t?i:this.__values__[this.__index__++]}},Dn.prototype.plant=function(t){for(var e,n=this;n instanceof Bn;){var r=Do(n);r.__index__=0,r.__values__=i,e?o.__wrapped__=r:e=r;var o=r;n=n.__wrapped__}return o.__wrapped__=t,e},Dn.prototype.reverse=function(){var t=this.__wrapped__;if(t instanceof Un){var e=t;return this.__actions__.length&&(e=new Un(this)),(e=e.reverse()).__actions__.push({func:hs,args:[Qo],thisArg:i}),new qn(e,this.__chain__)}return this.thru(Qo)},Dn.prototype.toJSON=Dn.prototype.valueOf=Dn.prototype.value=function(){return fi(this.__wrapped__,this.__actions__)},Dn.prototype.first=Dn.prototype.head,Gt&&(Dn.prototype[Gt]=function(){return this}),Dn}();fe._=pn,(r=function(){return pn}.call(e,n,e,t))===i||(t.exports=r)}.call(this)},3669:(t,e,n)=>{e.formatArgs=function(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+t.exports.humanize(this.diff),!this.useColors)return;const n="color: "+this.color;e.splice(1,0,n,"color: inherit");let r=0,i=0;e[0].replace(/%[a-zA-Z%]/g,(t=>{"%%"!==t&&(r++,"%c"===t&&(i=r))})),e.splice(i,0,n)},e.save=function(t){try{t?e.storage.setItem("debug",t):e.storage.removeItem("debug")}catch(t){}},e.load=function(){let t;try{t=e.storage.getItem("debug")}catch(t){}return!t&&"undefined"!=typeof process&&"env"in process&&(t=process.env.DEBUG),t},e.useColors=function(){return!("undefined"==typeof window||!window.process||"renderer"!==window.process.type&&!window.process.__nwjs)||("undefined"==typeof navigator||!navigator.userAgent||!navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))&&("undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))},e.storage=function(){try{return localStorage}catch(t){}}(),e.destroy=(()=>{let t=!1;return()=>{t||(t=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),e.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],e.log=console.debug||console.log||(()=>{}),t.exports=n(9231)(e);const{formatters:r}=t.exports;r.j=function(t){try{return JSON.stringify(t)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}},9231:(t,e,n)=>{t.exports=function(t){function e(t){let n,i,o,s=null;function a(...t){if(!a.enabled)return;const r=a,i=Number(new Date),o=i-(n||i);r.diff=o,r.prev=n,r.curr=i,n=i,t[0]=e.coerce(t[0]),"string"!=typeof t[0]&&t.unshift("%O");let s=0;t[0]=t[0].replace(/%([a-zA-Z%])/g,((n,i)=>{if("%%"===n)return"%";s++;const o=e.formatters[i];if("function"==typeof o){const e=t[s];n=o.call(r,e),t.splice(s,1),s--}return n})),e.formatArgs.call(r,t),(r.log||e.log).apply(r,t)}return a.namespace=t,a.useColors=e.useColors(),a.color=e.selectColor(t),a.extend=r,a.destroy=e.destroy,Object.defineProperty(a,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==s?s:(i!==e.namespaces&&(i=e.namespaces,o=e.enabled(t)),o),set:t=>{s=t}}),"function"==typeof e.init&&e.init(a),a}function r(t,n){const r=e(this.namespace+(void 0===n?":":n)+t);return r.log=this.log,r}function i(t){return t.toString().substring(2,t.toString().length-2).replace(/\.\*\?$/,"*")}return e.debug=e,e.default=e,e.coerce=function(t){return t instanceof Error?t.stack||t.message:t},e.disable=function(){const t=[...e.names.map(i),...e.skips.map(i).map((t=>"-"+t))].join(",");return e.enable(""),t},e.enable=function(t){let n;e.save(t),e.namespaces=t,e.names=[],e.skips=[];const r=("string"==typeof t?t:"").split(/[\s,]+/),i=r.length;for(n=0;n{e[n]=t[n]})),e.names=[],e.skips=[],e.formatters={},e.selectColor=function(t){let n=0;for(let e=0;e{var e=1e3,n=60*e,r=60*n,i=24*r;function o(t,e,n,r){var i=e>=1.5*n;return Math.round(t/n)+" "+r+(i?"s":"")}t.exports=function(t,s){s=s||{};var a,u,c=typeof t;if("string"===c&&t.length>0)return function(t){if(!((t=String(t)).length>100)){var o=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(t);if(o){var s=parseFloat(o[1]);switch((o[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*s;case"weeks":case"week":case"w":return 6048e5*s;case"days":case"day":case"d":return s*i;case"hours":case"hour":case"hrs":case"hr":case"h":return s*r;case"minutes":case"minute":case"mins":case"min":case"m":return s*n;case"seconds":case"second":case"secs":case"sec":case"s":return s*e;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return s;default:return}}}}(t);if("number"===c&&isFinite(t))return s.long?(a=t,(u=Math.abs(a))>=i?o(a,u,i,"day"):u>=r?o(a,u,r,"hour"):u>=n?o(a,u,n,"minute"):u>=e?o(a,u,e,"second"):a+" ms"):function(t){var o=Math.abs(t);return o>=i?Math.round(t/i)+"d":o>=r?Math.round(t/r)+"h":o>=n?Math.round(t/n)+"m":o>=e?Math.round(t/e)+"s":t+"ms"}(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))}},1618:(t,e,n)=>{e.formatArgs=function(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+t.exports.humanize(this.diff),!this.useColors)return;const n="color: "+this.color;e.splice(1,0,n,"color: inherit");let r=0,i=0;e[0].replace(/%[a-zA-Z%]/g,(t=>{"%%"!==t&&(r++,"%c"===t&&(i=r))})),e.splice(i,0,n)},e.save=function(t){try{t?e.storage.setItem("debug",t):e.storage.removeItem("debug")}catch(t){}},e.load=function(){let t;try{t=e.storage.getItem("debug")}catch(t){}return!t&&"undefined"!=typeof process&&"env"in process&&(t=process.env.DEBUG),t},e.useColors=function(){return!("undefined"==typeof window||!window.process||"renderer"!==window.process.type&&!window.process.__nwjs)||("undefined"==typeof navigator||!navigator.userAgent||!navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))&&("undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))},e.storage=function(){try{return localStorage}catch(t){}}(),e.destroy=(()=>{let t=!1;return()=>{t||(t=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),e.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],e.log=console.debug||console.log||(()=>{}),t.exports=n(5224)(e);const{formatters:r}=t.exports;r.j=function(t){try{return JSON.stringify(t)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}},5224:(t,e,n)=>{t.exports=function(t){function e(t){let n,i,o,s=null;function a(...t){if(!a.enabled)return;const r=a,i=Number(new Date),o=i-(n||i);r.diff=o,r.prev=n,r.curr=i,n=i,t[0]=e.coerce(t[0]),"string"!=typeof t[0]&&t.unshift("%O");let s=0;t[0]=t[0].replace(/%([a-zA-Z%])/g,((n,i)=>{if("%%"===n)return"%";s++;const o=e.formatters[i];if("function"==typeof o){const e=t[s];n=o.call(r,e),t.splice(s,1),s--}return n})),e.formatArgs.call(r,t),(r.log||e.log).apply(r,t)}return a.namespace=t,a.useColors=e.useColors(),a.color=e.selectColor(t),a.extend=r,a.destroy=e.destroy,Object.defineProperty(a,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==s?s:(i!==e.namespaces&&(i=e.namespaces,o=e.enabled(t)),o),set:t=>{s=t}}),"function"==typeof e.init&&e.init(a),a}function r(t,n){const r=e(this.namespace+(void 0===n?":":n)+t);return r.log=this.log,r}function i(t){return t.toString().substring(2,t.toString().length-2).replace(/\.\*\?$/,"*")}return e.debug=e,e.default=e,e.coerce=function(t){return t instanceof Error?t.stack||t.message:t},e.disable=function(){const t=[...e.names.map(i),...e.skips.map(i).map((t=>"-"+t))].join(",");return e.enable(""),t},e.enable=function(t){let n;e.save(t),e.namespaces=t,e.names=[],e.skips=[];const r=("string"==typeof t?t:"").split(/[\s,]+/),i=r.length;for(n=0;n{e[n]=t[n]})),e.names=[],e.skips=[],e.formatters={},e.selectColor=function(t){let n=0;for(let e=0;e{var e=1e3,n=60*e,r=60*n,i=24*r;function o(t,e,n,r){var i=e>=1.5*n;return Math.round(t/n)+" "+r+(i?"s":"")}t.exports=function(t,s){s=s||{};var a,u,c=typeof t;if("string"===c&&t.length>0)return function(t){if(!((t=String(t)).length>100)){var o=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(t);if(o){var s=parseFloat(o[1]);switch((o[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*s;case"weeks":case"week":case"w":return 6048e5*s;case"days":case"day":case"d":return s*i;case"hours":case"hour":case"hrs":case"hr":case"h":return s*r;case"minutes":case"minute":case"mins":case"min":case"m":return s*n;case"seconds":case"second":case"secs":case"sec":case"s":return s*e;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return s;default:return}}}}(t);if("number"===c&&isFinite(t))return s.long?(a=t,(u=Math.abs(a))>=i?o(a,u,i,"day"):u>=r?o(a,u,r,"hour"):u>=n?o(a,u,n,"minute"):u>=e?o(a,u,e,"second"):a+" ms"):function(t){var o=Math.abs(t);return o>=i?Math.round(t/i)+"d":o>=r?Math.round(t/r)+"h":o>=n?Math.round(t/n)+"m":o>=e?Math.round(t/e)+"s":t+"ms"}(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))}},9336:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.configureChat=void 0;const i=r(n(3336));let o;function s(t){(0,i.default)("#chat-messages").html(t.map((t=>`
\n ${t.from}\n ${t.msg}\n
`)).join("\n")),(0,i.default)("#chat-messages").scrollTop((0,i.default)("#chat-messages")[0].scrollHeight)}function a(t){(0,i.default)("#chat-messages").append(`
\n ${t.from}\n ${t.msg}\n
`),(0,i.default)("#chat-messages").scrollTop((0,i.default)("#chat-messages")[0].scrollHeight)}e.configureChat=function(t){o=t,o.on("chathistory",s),o.on("chat",a),(0,i.default)("#chat-form").on("submit",(t=>{t.preventDefault(),t.stopPropagation();const e=(0,i.default)("#message").val().toString();e.length>0&&(o.emit("chat",e),(0,i.default)("#message").val(""))})),console.log("Chat Configured")}},3253:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CustomEventManager=void 0,e.CustomEventManager=class{constructor(){this.events={}}on(t,e){this.events[t]||(this.events[t]=[]),this.events[t].push(e)}emit(t,e=[]){this.events[t]&&this.events[t].forEach((t=>t.apply(null,e)))}}},5862:function(t,e){"use strict";var n=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,o){function s(t){try{u(r.next(t))}catch(t){o(t)}}function a(t){try{u(r.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}u((r=r.apply(t,e||[])).next())}))};function r(){return localStorage.getItem("authToken")}Object.defineProperty(e,"__esModule",{value:!0}),e.http=e.authToken=void 0,e.authToken=r,e.http={get:t=>n(void 0,void 0,void 0,(function*(){return(yield fetch(t,{headers:{"x-authtoken":r()}})).json()})),post:(t,e)=>n(void 0,void 0,void 0,(function*(){return(yield fetch(t,{method:"post",body:JSON.stringify(e),headers:{"x-authtoken":r(),"content-type":"application/json"}})).json()}))}},2174:function(t,e,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(e,n);i&&!("get"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,i)}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),i=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),o=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)"default"!==n&&Object.prototype.hasOwnProperty.call(t,n)&&r(e,t,n);return i(e,t),e},s=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,o){function s(t){try{u(r.next(t))}catch(t){o(t)}}function a(t){try{u(r.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}u((r=r.apply(t,e||[])).next())}))},a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const u=n(7046),c=a(n(3336)),l=n(4738),f=n(5862),h=n(3253),d=n(7429),p=n(6486),g=n(9502),v=n(9336),y=n(1916),m=o(n(7355)),_=new(n(8182).TimeManager),b=new Map,C=new h.CustomEventManager,w=(0,u.io)({extraHeaders:{"x-authtoken":(0,f.authToken)()}});function k(){const t=_.gradientName(),e=(0,c.default)("body");e.removeClass(Array.from(e[0].classList)).addClass(t),_.isNight()&&e.addClass("night")}function E(t){return``}function A(t,e,n,r=!0){let i=0;e>0&&(i=Math.floor(t/e*100));const o=r?`${i}% - `:"";return`
${o}${t}/${e}
`}function S(t,e,n,r){let i=0;e>0&&(i=Math.floor(t/e*100)),(0,c.default)(`#${n}`).css("background",`linear-gradient(to right, ${r}, ${r} ${i}%, transparent ${i}%, transparent)`).attr("title",`${i}% - ${t}/${e}`).html(`${t}/${e} - ${i}%`)}function x(){const t=b.get("player");(0,c.default)("#username").html(`${t.username}, level ${t.level} ${t.profession}`),S(t.hp,(0,l.maxHp)(t.constitution,t.level),"hp-bar","#ff7070"),S(t.exp,(0,l.expToLevel)(t.level+1),"exp-bar","#5997f9"),["strength","constitution","dexterity","intelligence","hp","exp"].forEach((e=>{(0,c.default)(`.${e}`).html(t[e])})),(0,c.default)(".maxHp").html((0,l.maxHp)(t.constitution,t.level).toString()),(0,c.default)(".expToLevel").html((0,l.expToLevel)(t.level+1).toString()),(0,c.default)(".gold").html(t.gold.toLocaleString()),"session"===t.account_type&&(0,c.default)("#signup-prompt").html('

Hey there! It looks like you\'re using a SESSION account. This allows you to play with away, but the account is tied to your current device, and will be lost if you ever clear your cookies.

\n

\n
\n \n \n
\n
\n \n \n
\n \n \n

').removeClass("hidden"),(0,c.default)("#extra-inventory-info").html(O())}function O(){const t=b.get("player");let e='';return l.StatDef.forEach((n=>{e+=`\n \n \n `})),e+=``,e+="
${n.display}\n ${t[n.id]}\n ${t.stat_points?function(t){return``}(n):""}\n
Stat Points${t.stat_points}
",e}function F(t){return t.map((t=>function(t,e){return`
\n
\n \n
\n
\n
${t.name}
\n
\n ${t.requirements.level?T("LVL",t.requirements.level):""}\n ${t.requirements.strength?T("STR",t.requirements.strength):""}\n ${t.requirements.constitution?T("CON",t.requirements.constitution):""}\n ${t.requirements.dexterity?T("DEX",t.requirements.dexterity):""}\n ${t.requirements.intelligence?T("INT",t.requirements.intelligence):""}\n ${T("PRF",t.profession)}\n
\n
\n ${t.boosts.strength?j("STR",t.boosts.strength):""}\n ${t.boosts.constitution?j("CON",t.boosts.constitution):""}\n ${t.boosts.dexterity?j("DEX",t.boosts.dexterity):""}\n ${t.boosts.intelligence?j("INT",t.boosts.intelligence):""}\n ${t.boosts.damage?j("DMG",t.boosts.damage):""}\n ${t.boosts.damage_mitigation?j("MIT",t.boosts.damage_mitigation)+"%":""}\n ${["WEAPON","SPELL"].includes(t.type)?"":A(t.currentAp,t.maxAp,"#7be67b")}\n
\n ${t.hasOwnProperty("id")?`
${t.cost.toLocaleString()}G
`:""}\n
\n
\n ${(t=>t.is_equipped?``:"ANY_HAND"===t.equipment_slot?`\n `:"LEFT_HAND"===t.equipment_slot?``:"RIGHT_HAND"===t.equipment_slot?``:(t.equipment_slot,``))(t)}\n
\n
`}(t))).join("\n")}function T(t,e,n){let r="";return n&&(r=n>=e?"success":"error"),`${t}: ${e.toLocaleString()}`}function j(t,e){let n="";return"number"==typeof e&&(n=e>0?"+":"-"),`${t}: 0?"success":"error"}">${n}${e}`}function P(t){const e=Math.floor(t.hp/t.maxHp*100);return`
\n
\n
\n \n
\n
\n
${t.name}
\n
${e}% - ${t.hp} / ${t.maxHp}
\n
\n
\n
\n \n \n \n \n
\n
\n
`}(0,v.configureChat)(w),k(),setInterval(k,6e4),w.on("connect",(()=>{console.log(`Connected: ${w.id}`)})),w.on("ready",(()=>{console.log("Server connection verified"),w.emit("inventory")})),w.on("server-stats",(t=>{(0,c.default)("#server-stats").html(`${t.onlinePlayers} players online`)})),(0,p.each)(m,(t=>{console.log(`Binding Event ${t.eventName}`),t instanceof y.SocketEvent?w.on(t.eventName,t.handler.bind(null,{cache:b,socket:w,events:C})):console.log("Skipped binding",t)})),w.on("calc:ap",(t=>{var e,n,r,i,o,s,a,u;const{ap:l}=t,f=`\n
\n ${E("helm")}\n ${A((null===(e=l.HEAD)||void 0===e?void 0:e.currentAp)||0,(null===(n=l.HEAD)||void 0===n?void 0:n.maxAp)||0,"#7be67b")}\n
\n
\n ${E("arms")}\n ${A((null===(r=l.ARMS)||void 0===r?void 0:r.currentAp)||0,(null===(i=l.ARMS)||void 0===i?void 0:i.maxAp)||0,"#7be67b")}\n
\n
\n ${E("chest")}\n ${A((null===(o=l.CHEST)||void 0===o?void 0:o.currentAp)||0,(null===(s=l.CHEST)||void 0===s?void 0:s.maxAp)||0,"#7be67b")}\n
\n
\n ${E("legs")}\n ${A((null===(a=l.LEGS)||void 0===a?void 0:a.currentAp)||0,(null===(u=l.LEGS)||void 0===u?void 0:u.maxAp)||0,"#7be67b")}\n
\n `;(0,c.default)("#ap-bar").html(f)})),C.on("tab:skills",(()=>{(0,c.default)("#skills").html(""),w.emit("skills")})),w.on("skills",(t=>{let e=`\n ${t.skills.map((t=>{const e=g.Skills.get(t.id),n=t.exp/e.expToLevel(t.level+1);return`\n \n \n \n \n `})).join("\n")}\n
${t.level.toLocaleString()}\n ${(100*n).toPrecision(2)}% to next level\n ${e.display}\n

${e.description}

\n
`;(0,c.default)("#skills").html(e)})),C.on("alert",(t=>{let e=(0,d.v4)();(0,c.default)("#alerts").append(`
${t.text}
`),setTimeout((()=>{(0,c.default)(`#alert-${e}`).remove()}),3e3)})),w.on("alert",(t=>{C.emit("alert",[t])})),w.on("authToken",(t=>{console.log(`recv auth token ${t}`),localStorage.setItem("authToken",t)})),w.on("player",(t=>{b.set("player",t),x()})),(0,c.default)("nav a").on("click",(t=>{t.preventDefault(),t.stopPropagation(),(0,c.default)(`#${(0,c.default)(t.target).data("container")}`).find(".tab").removeClass("active"),(0,c.default)(`#${(0,c.default)(t.target).data("section")}`).addClass("active"),"Settings"!==t.target.innerHTML&&((0,c.default)(t.target).closest("nav").find("a").removeClass("active"),(0,c.default)(t.target).addClass("active")),C.emit(`tab:${(0,c.default)(t.target).data("section")}`)})),C.on("tab:inventory",(()=>{w.emit("inventory")})),(0,c.default)("body").on("click","nav.filter",(t=>{t.preventDefault(),t.stopPropagation();const e=(0,c.default)(t.target),n=e.data("filter");(0,c.default)(".filter-result").removeClass("active").addClass("hidden"),(0,c.default)(`#filter_${n}`).addClass("active").removeClass("hidden"),e.closest("nav").find("a").removeClass("active"),e.addClass("active"),b.set("active-inventory-section",n)})),w.on("inventory",(t=>{b.get("player");const e=b.get("active-inventory-section")||"ARMOUR",n={ARMOUR:[],WEAPON:[],SPELL:[]};t.inventory.forEach((t=>{n[t.type].push(t)}));const r=`\n
\n
\n ${function(t){const e="https://via.placeholder.com/64x64",n=t.filter((t=>t.is_equipped)).reduce(((t,e)=>(t[e.equipment_slot]=e,t)),{});return`\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
\n \n ${n.HEAD?n.HEAD.name:"HEAD"}\n \n ${n.ARMS?n.ARMS.name:"ARMS"}\n
\n ${n.LEFT_HAND?n.LEFT_HAND.name:n.TWO_HANDED?n.TWO_HANDED.name:"L_HAND"}\n \n ${n.CHEST?n.CHEST.name:"CHEST"}\n \n ${n.RIGHT_HAND?n.RIGHT_HAND.name:n.TWO_HANDED?n.TWO_HANDED.name:"R_HAND"}\n
\n \n ${n.LEGS?n.LEGS.name:"LEGS"}\n \n
\n `}(t.inventory)}\n
\n ${O()}\n
\n
\n
\n \n
\n
\n ${F(n.ARMOUR)}\n
\n
\n ${F(n.WEAPON)}\n
\n
\n ${F(n.SPELL)}\n
\n
\n
\n
\n `;(0,c.default)("#inventory").html(r)})),(0,c.default)("body").on("click",".equip-item",(t=>{t.preventDefault(),t.stopPropagation();const e=(0,c.default)(t.target),n=e.data("id"),r=e.data("slot");w.emit("equip",{id:n,slot:r})})),(0,c.default)("body").on("click",".unequip-item",(t=>{t.preventDefault(),t.stopPropagation(),w.emit("unequip",{id:(0,c.default)(t.target).data("id")})})),C.on("renderMap",(function(t){return s(this,void 0,void 0,(function*(){if(!t||b.has("currentMapHTML"))return void(0,c.default)("#map").html(b.get("currentMapHTML"));t||console.error("oh no.. this got triggered without any city data"),(0,c.default)("#explore").css({"background-image":`linear-gradient(to left top, rgba(255,255,255,0) 0%,rgb(255,255,255) 100%), linear-gradient(to left, rgba(255, 255, 255, 0) 0%, rgb(255, 255, 255) 100%), url("/assets/img/map/${t.city.id}.jpeg")`});const e={SERVICES:[],STORES:[],EXPLORE:[]};t.locations.forEach((t=>{e[t.type].push(`${t.name}`)}));let n=`

${t.city.name}

\n
`;e.SERVICES.length&&(n+=`

Services

${e.SERVICES.join("
")}
`),e.STORES.length&&(n+=`

Stores

${e.STORES.join("
")}
`),e.EXPLORE.length&&(n+=`

Explore

${e.EXPLORE.join("
")}
`),n+=`\n
\n

Travel

\n ${t.paths.map((t=>`${t.ending_city_name}`)).join("
")}\n
\n
\n `,b.set("currentMapHTML",n),(0,c.default)("#map").html(n)}))})),w.on("city:stores",(t=>{let e=`
\n ${t.map((t=>function(t,e){const n=b.get("player");return`
\n
\n \n
\n
\n
${t.name}${"TWO_HANDED"===t.equipment_slot?" (2H)":""}
\n
\n ${t.requirements.level?T("LVL",t.requirements.level,n.level):""}\n ${t.requirements.strength?T("STR",t.requirements.strength,n.strength):""}\n ${t.requirements.constitution?T("CON",t.requirements.constitution,n.constitution):""}\n ${t.requirements.dexterity?T("DEX",t.requirements.dexterity,n.dexterity):""}\n ${t.requirements.intelligence?T("INT",t.requirements.intelligence,n.intelligence):""}\n ${T("PRF",t.profession)}\n
\n
\n ${t.boosts.strength?j("STR",t.boosts.strength):""}\n ${t.boosts.constitution?j("CON",t.boosts.constitution):""}\n ${t.boosts.dexterity?j("DEX",t.boosts.dexterity):""}\n ${t.boosts.intelligence?j("INT",t.boosts.intelligence):""}\n ${t.boosts.damage?j(t.affectedSkills.includes("restoration_magic")?"HP":"DMG",t.boosts.damage):""}\n ${t.boosts.damage_mitigation?j("MIT",t.boosts.damage_mitigation)+"%":""}\n ${["WEAPON","SPELL"].includes(t.type)?"":j("AP",t.maxAp)}\n
\n ${t.hasOwnProperty("id")?`
${t.cost.toLocaleString()}G
`:""}\n
\n
\n ${r=t,``}\n
\n
`;var r}(t))).join("\n")}\n
\n `;(0,c.default)("#map").html(e)})),(0,c.default)("body").on("click",".purchase-item",(t=>{t.preventDefault(),t.stopPropagation();const e=b.get("player"),n=parseInt((0,c.default)(t.target).data("cost")),r=(0,c.default)(t.target).data("id");e.gold{const e=(0,c.default)(t.target),n=e.data("event"),r=e.data("args");console.log(`Sending event ${n}`,{args:r}),w.emit(n,{args:r})})),(0,c.default)("body").on("click",".city-emit-event",(t=>{const e=(0,c.default)(t.target),n=e.data("event"),r=e.data("args");console.log(`Sending event ${n}`,{args:r}),w.emit(n,{args:r})})),w.on("explore:fights",(t=>{const e=b.get("last-selected-monster");if(t.length){let n=`
`;(0,c.default)("#map").html(n)}})),C.on("tab:explore",(()=>s(void 0,void 0,void 0,(function*(){const t=yield f.http.get("/fight");if(t)(0,c.default)("#map").html(P(t));else{let t;b.has("currentMapHTML")||(t=yield f.http.get(`/city/${b.get("player").city_id}`)),C.emit("renderMap",[t])}})))),w.on("updatePlayer",(t=>{b.set("player",t),x()})),w.on("fight-over",(t=>{const{roundData:e,monsters:n}=t;b.set("player",e.player),x(),(0,c.default)("#map").html(P(e.monster));let r=e.roundDetails.map((t=>`
${t}
`));if("player"===e.winner&&(r.push(`
You defeated the ${e.monster.name}!
`),e.rewards.gold&&r.push(`
You gained ${e.rewards.gold} gold`),e.rewards.exp&&r.push(`
You gained ${e.rewards.exp} exp`),e.rewards.levelIncrease&&r.push(`
You gained a level! ${e.player.level}`)),n.length){const t=b.get("last-selected-monster");r.unshift(`

Fight Again

\n
`)}(0,c.default)("#fight-results").html(r.join("\n")),(0,c.default)("#fight-actions").html("")})),w.on("fight-round",(t=>{(0,c.default)(".fight-action").prop("disabled",!1),b.set("player",t.player),x(),(0,c.default)("#map").html(P(t.monster)),(0,c.default)("#fight-results").html(t.roundDetails.map((t=>`
${t}
`)).join("\n"))})),(0,c.default)("body").on("submit","#fight-selector",(t=>s(void 0,void 0,void 0,(function*(){if(t.preventDefault(),t.stopPropagation(),b.get("player").hp<=0)return void C.emit("alert",[{type:"error",text:"You don't have enough HP to go looking for a fight"}]);const e=(0,c.default)("#monster-selector option:selected").val();b.set("last-selected-monster",e);try{const t=yield f.http.post("/fight",{monsterId:e});(0,c.default)("#map").html(P(t))}catch(t){C.emit("alert",[{type:"error",text:"Sorry, you can't start that fight"}])}})))),(0,c.default)("body").on("click",".fight-action",(t=>{t.preventDefault(),t.stopPropagation();const e=(0,c.default)(t.target).data("action"),n=(0,c.default)("#fight-target option:selected").val();(0,c.default)(".fight-action").prop("disabled",!0),w.emit("fight",{action:e,target:n})})),(0,c.default)("body").on("submit","#signup",(t=>s(void 0,void 0,void 0,(function*(){t.preventDefault(),t.stopPropagation();const e={};(0,c.default)(t.target).serializeArray().forEach((t=>e[t.name]=t.value));const n=yield f.http.post("/signup",e);n.error?C.emit("alert",[{type:"error",text:n.error}]):(b.set("player",n.player),x(),(0,c.default)("#signup-prompt").remove())})))),(0,c.default)("body").on("click","#login",(t=>s(void 0,void 0,void 0,(function*(){t.preventDefault(),t.stopPropagation();const e={};if((0,c.default)(t.target).closest("form").serializeArray().forEach((t=>e[t.name]=t.value)),e.username&&e.password){const t=yield f.http.post("/login",e);t.error?C.emit("alert",[{type:"error",text:t.error}]):(localStorage.setItem("authToken",t.player.id),window.location.reload())}})))),(0,c.default)("body").on("click","#logout",(t=>s(void 0,void 0,void 0,(function*(){t.preventDefault(),t.stopPropagation();let e=!1;const n=b.get("player");e=!/^Player[\d]+$/.test(n.username)||!!confirm("Are you sure? You will not be able to retrieve this character unless you set up an email/password"),e&&(w.emit("logout"),localStorage.clear(),window.location.reload())}))))},1916:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SocketEvent=void 0,e.SocketEvent=class{constructor(t,e){this.eventName=t,this.handler=e}}},7355:function(t,e,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(e,n);i&&!("get"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,i)}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),i=this&&this.__exportStar||function(t,e){for(var n in t)"default"===n||Object.prototype.hasOwnProperty.call(e,n)||r(e,t,n)};Object.defineProperty(e,"__esModule",{value:!0}),i(n(5127),e),i(n(6041),e),i(n(9261),e)},9261:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.displayHealerDetauls=void 0;const i=n(1916),o=r(n(3336));e.displayHealerDetauls=new i.SocketEvent("city:service:healer",((t,e)=>{(0,o.default)("#map").html(e.text)}))},5127:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.professionChangeRogue=e.professionChangeMage=e.professionChangeWarrior=e.professionRecruiter=void 0;const i=n(1916),o=r(n(3336)),s=n(9554);function a(t,e){(0,o.default)("#map").html(e.text)}e.professionRecruiter=new i.SocketEvent(s.EVENT_NAME,a),e.professionChangeWarrior=new i.SocketEvent(`${s.EVENT_NAME}:warrior`,a),e.professionChangeMage=new i.SocketEvent(`${s.EVENT_NAME}:mage`,a),e.professionChangeRogue=new i.SocketEvent(`${s.EVENT_NAME}:rogue`,a)},9554:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EVENT_NAME=void 0,e.EVENT_NAME="city:services:profession_recruitor_windcross"},6041:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.travel=void 0;const r=n(1916);e.travel=new r.SocketEvent("city:travel",((t,e)=>{t.cache.delete("currentMapHTML"),t.events.emit("renderMap",[e])}))},4738:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StatDef=e.expToLevel=e.maxHp=void 0;const r=n(1407);e.maxHp=function(t,e){return Math.ceil(1.3*(t+e))},e.expToLevel=function(t){return t<10?10*t-10:13*t},e.StatDef=new Map,e.StatDef.set(r.Stat.strength,{id:r.Stat.strength,display:"Strength",abbrv:"STR"}),e.StatDef.set(r.Stat.constitution,{id:r.Stat.constitution,display:"Constitution",abbrv:"CON"}),e.StatDef.set(r.Stat.dexterity,{id:r.Stat.dexterity,display:"Dexterity",abbrv:"DEX"}),e.StatDef.set(r.Stat.intelligence,{id:r.Stat.intelligence,display:"Intelligence",abbrv:"INT"})},9502:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Skills=void 0,e.Skills=new Map,e.Skills.set("bladed",{id:"bladed",display:"Bladed Weapon Mastery",description:"Improves Bladed Weapon damage",effect:t=>t.level/100,expToLevel:t=>1e3*t}),e.Skills.set("blunt",{id:"blunt",display:"Blunt Weapons Mastery",description:"Improves Blunt Weapon damage",effect:t=>t.level/100,expToLevel:t=>1e3*t}),e.Skills.set("destruction_magic",{id:"destruction_magic",display:"Destruction Magic Mastery",description:"Improves Destruction Magic damage",effect:t=>t.level/100,expToLevel:t=>1e3*t}),e.Skills.set("restoration_magic",{id:"restoration_magic",display:"Restoration Magic Mastery",description:"Improves effectiveness of Restoration Magic",effect:t=>t.level/100,expToLevel:t=>1e3*t}),e.Skills.set("one_handed_mastery",{id:"one_handed_mastery",display:"One Handed Weapon Mastery",description:"Improves effectiveness when fighting using one-handed weapons",effect:t=>t.level/100,expToLevel:t=>1e3*t}),e.Skills.set("two_handed_mastery",{id:"two_handed_mastery",display:"Two Handed Weapon Mastery",description:"Improves effectiveness when fighting using two-handed weapons",effect:t=>t.level/100,expToLevel:t=>1e3*t})},1407:(t,e)=>{"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0}),e.Stat=void 0,(n=e.Stat||(e.Stat={})).strength="strength",n.constitution="constitution",n.dexterity="dexterity",n.intelligence="intelligence"},8182:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TimeManager=void 0,e.TimeManager=class{constructor(t=60){this.dayLength=t,this.scaleFactor=30,this.dayLengthAsMS=60*t*1e3}dayScaleFactor(){return this.dayLength/30}getTimePeriod(){return this.isDawn()?"dawn":this.isMorning()?"morning":this.isAfternoon()?"afternoon":this.isEvening()?"evening":this.isNight()?"night":void 0}now(){return Math.floor((new Date).getMinutes()/this.dayScaleFactor())}gradientName(){const t=this.now();return`sky-gradient-${t<10?"0":""}${t}`}isNight(){const t=this.now();return t>=0&&t<=5||t>=26&&t<=29}isDawn(){const t=this.now();return t>=6&&t<=10}isMorning(){const t=this.now();return t>=11&&t<=15}isAfternoon(){const t=this.now();return t>=16&&t<=20}isEvening(){const t=this.now();return t>=21&&t<=25}}},7429:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"NIL",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(e,"parse",{enumerable:!0,get:function(){return f.default}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return l.default}}),Object.defineProperty(e,"v1",{enumerable:!0,get:function(){return r.default}}),Object.defineProperty(e,"v3",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(e,"v4",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(e,"v5",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(e,"validate",{enumerable:!0,get:function(){return c.default}}),Object.defineProperty(e,"version",{enumerable:!0,get:function(){return u.default}});var r=h(n(3990)),i=h(n(8237)),o=h(n(5355)),s=h(n(3764)),a=h(n(6314)),u=h(n(8464)),c=h(n(6435)),l=h(n(4008)),f=h(n(8222));function h(t){return t&&t.__esModule?t:{default:t}}},4163:(t,e)=>{"use strict";function n(t){return 14+(t+64>>>9<<4)+1}function r(t,e){const n=(65535&t)+(65535&e);return(t>>16)+(e>>16)+(n>>16)<<16|65535&n}function i(t,e,n,i,o,s){return r((a=r(r(e,t),r(i,s)))<<(u=o)|a>>>32-u,n);var a,u}function o(t,e,n,r,o,s,a){return i(e&n|~e&r,t,e,o,s,a)}function s(t,e,n,r,o,s,a){return i(e&r|n&~r,t,e,o,s,a)}function a(t,e,n,r,o,s,a){return i(e^n^r,t,e,o,s,a)}function u(t,e,n,r,o,s,a){return i(n^(e|~r),t,e,o,s,a)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;e.default=function(t){if("string"==typeof t){const e=unescape(encodeURIComponent(t));t=new Uint8Array(e.length);for(let n=0;n>5]>>>i%32&255,o=parseInt(r.charAt(n>>>4&15)+r.charAt(15&n),16);e.push(o)}return e}(function(t,e){t[e>>5]|=128<>5]|=(255&t[n/8])<{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};e.default=n},6314:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default="00000000-0000-0000-0000-000000000000"},8222:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r,i=(r=n(6435))&&r.__esModule?r:{default:r};e.default=function(t){if(!(0,i.default)(t))throw TypeError("Invalid UUID");let e;const n=new Uint8Array(16);return n[0]=(e=parseInt(t.slice(0,8),16))>>>24,n[1]=e>>>16&255,n[2]=e>>>8&255,n[3]=255&e,n[4]=(e=parseInt(t.slice(9,13),16))>>>8,n[5]=255&e,n[6]=(e=parseInt(t.slice(14,18),16))>>>8,n[7]=255&e,n[8]=(e=parseInt(t.slice(19,23),16))>>>8,n[9]=255&e,n[10]=(e=parseInt(t.slice(24,36),16))/1099511627776&255,n[11]=e/4294967296&255,n[12]=e>>>24&255,n[13]=e>>>16&255,n[14]=e>>>8&255,n[15]=255&e,n}},58:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i},3319:(t,e)=>{"use strict";let n;Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(){if(!n&&(n="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!n))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return n(r)};const r=new Uint8Array(16)},3757:(t,e)=>{"use strict";function n(t,e,n,r){switch(t){case 0:return e&n^~e&r;case 1:case 3:return e^n^r;case 2:return e&n^e&r^n&r}}function r(t,e){return t<>>32-e}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;e.default=function(t){const e=[1518500249,1859775393,2400959708,3395469782],i=[1732584193,4023233417,2562383102,271733878,3285377520];if("string"==typeof t){const e=unescape(encodeURIComponent(t));t=[];for(let n=0;n>>0;f=l,l=c,c=r(u,30)>>>0,u=s,s=a}i[0]=i[0]+s>>>0,i[1]=i[1]+u>>>0,i[2]=i[2]+c>>>0,i[3]=i[3]+l>>>0,i[4]=i[4]+f>>>0}return[i[0]>>24&255,i[0]>>16&255,i[0]>>8&255,255&i[0],i[1]>>24&255,i[1]>>16&255,i[1]>>8&255,255&i[1],i[2]>>24&255,i[2]>>16&255,i[2]>>8&255,255&i[2],i[3]>>24&255,i[3]>>16&255,i[3]>>8&255,255&i[3],i[4]>>24&255,i[4]>>16&255,i[4]>>8&255,255&i[4]]}},4008:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.unsafeStringify=s;var r,i=(r=n(6435))&&r.__esModule?r:{default:r};const o=[];for(let t=0;t<256;++t)o.push((t+256).toString(16).slice(1));function s(t,e=0){return(o[t[e+0]]+o[t[e+1]]+o[t[e+2]]+o[t[e+3]]+"-"+o[t[e+4]]+o[t[e+5]]+"-"+o[t[e+6]]+o[t[e+7]]+"-"+o[t[e+8]]+o[t[e+9]]+"-"+o[t[e+10]]+o[t[e+11]]+o[t[e+12]]+o[t[e+13]]+o[t[e+14]]+o[t[e+15]]).toLowerCase()}e.default=function(t,e=0){const n=s(t,e);if(!(0,i.default)(n))throw TypeError("Stringified UUID is invalid");return n}},3990:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r,i=(r=n(3319))&&r.__esModule?r:{default:r},o=n(4008);let s,a,u=0,c=0;e.default=function(t,e,n){let r=e&&n||0;const l=e||new Array(16);let f=(t=t||{}).node||s,h=void 0!==t.clockseq?t.clockseq:a;if(null==f||null==h){const e=t.random||(t.rng||i.default)();null==f&&(f=s=[1|e[0],e[1],e[2],e[3],e[4],e[5]]),null==h&&(h=a=16383&(e[6]<<8|e[7]))}let d=void 0!==t.msecs?t.msecs:Date.now(),p=void 0!==t.nsecs?t.nsecs:c+1;const g=d-u+(p-c)/1e4;if(g<0&&void 0===t.clockseq&&(h=h+1&16383),(g<0||d>u)&&void 0===t.nsecs&&(p=0),p>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");u=d,c=p,a=h,d+=122192928e5;const v=(1e4*(268435455&d)+p)%4294967296;l[r++]=v>>>24&255,l[r++]=v>>>16&255,l[r++]=v>>>8&255,l[r++]=255&v;const y=d/4294967296*1e4&268435455;l[r++]=y>>>8&255,l[r++]=255&y,l[r++]=y>>>24&15|16,l[r++]=y>>>16&255,l[r++]=h>>>8|128,l[r++]=255&h;for(let t=0;t<6;++t)l[r+t]=f[t];return e||(0,o.unsafeStringify)(l)}},8237:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=o(n(7925)),i=o(n(4163));function o(t){return t&&t.__esModule?t:{default:t}}var s=(0,r.default)("v3",48,i.default);e.default=s},7925:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.URL=e.DNS=void 0,e.default=function(t,e,n){function r(t,r,s,a){var u;if("string"==typeof t&&(t=function(t){t=unescape(encodeURIComponent(t));const e=[];for(let n=0;n{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=s(n(4790)),i=s(n(3319)),o=n(4008);function s(t){return t&&t.__esModule?t:{default:t}}e.default=function(t,e,n){if(r.default.randomUUID&&!e&&!t)return r.default.randomUUID();const s=(t=t||{}).random||(t.rng||i.default)();if(s[6]=15&s[6]|64,s[8]=63&s[8]|128,e){n=n||0;for(let t=0;t<16;++t)e[n+t]=s[t];return e}return(0,o.unsafeStringify)(s)}},3764:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=o(n(7925)),i=o(n(3757));function o(t){return t&&t.__esModule?t:{default:t}}var s=(0,r.default)("v5",80,i.default);e.default=s},6435:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r,i=(r=n(58))&&r.__esModule?r:{default:r};e.default=function(t){return"string"==typeof t&&i.default.test(t)}},8464:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r,i=(r=n(6435))&&r.__esModule?r:{default:r};e.default=function(t){if(!(0,i.default)(t))throw TypeError("Invalid UUID");return parseInt(t.slice(14,15),16)}},3336:t=>{"use strict";t.exports=$},8419:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.hasCORS=void 0;let n=!1;try{n="undefined"!=typeof XMLHttpRequest&&"withCredentials"in new XMLHttpRequest}catch(t){}e.hasCORS=n},5754:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.decode=e.encode=void 0,e.encode=function(t){let e="";for(let n in t)t.hasOwnProperty(n)&&(e.length&&(e+="&"),e+=encodeURIComponent(n)+"="+encodeURIComponent(t[n]));return e},e.decode=function(t){let e={},n=t.split("&");for(let t=0,r=n.length;t{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.parse=void 0;const n=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,r=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];e.parse=function(t){const e=t,i=t.indexOf("["),o=t.indexOf("]");-1!=i&&-1!=o&&(t=t.substring(0,i)+t.substring(i,o).replace(/:/g,";")+t.substring(o,t.length));let s=n.exec(t||""),a={},u=14;for(;u--;)a[r[u]]=s[u]||"";return-1!=i&&-1!=o&&(a.source=e,a.host=a.host.substring(1,a.host.length-1).replace(/;/g,":"),a.authority=a.authority.replace("[","").replace("]","").replace(/;/g,":"),a.ipv6uri=!0),a.pathNames=function(t,e){const n=e.replace(/\/{2,9}/g,"/").split("/");return"/"!=e.slice(0,1)&&0!==e.length||n.splice(0,1),"/"==e.slice(-1)&&n.splice(n.length-1,1),n}(0,a.path),a.queryKey=function(t,e){const n={};return e.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,(function(t,e,r){e&&(n[e]=r)})),n}(0,a.query),a}},8726:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.yeast=e.decode=e.encode=void 0;const n="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),r={};let i,o=0,s=0;function a(t){let e="";do{e=n[t%64]+e,t=Math.floor(t/64)}while(t>0);return e}for(e.encode=a,e.decode=function(t){let e=0;for(s=0;s{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.globalThisShim=void 0,e.globalThisShim="undefined"!=typeof self?self:"undefined"!=typeof window?window:Function("return this")()},4679:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.nextTick=e.parse=e.installTimerFunctions=e.transports=e.Transport=e.protocol=e.Socket=void 0;const r=n(3481);Object.defineProperty(e,"Socket",{enumerable:!0,get:function(){return r.Socket}}),e.protocol=r.Socket.protocol;var i=n(9870);Object.defineProperty(e,"Transport",{enumerable:!0,get:function(){return i.Transport}});var o=n(7385);Object.defineProperty(e,"transports",{enumerable:!0,get:function(){return o.transports}});var s=n(9622);Object.defineProperty(e,"installTimerFunctions",{enumerable:!0,get:function(){return s.installTimerFunctions}});var a=n(5222);Object.defineProperty(e,"parse",{enumerable:!0,get:function(){return a.parse}});var u=n(5552);Object.defineProperty(e,"nextTick",{enumerable:!0,get:function(){return u.nextTick}})},3481:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.Socket=void 0;const i=n(7385),o=n(9622),s=n(5754),a=n(5222),u=r(n(4802)),c=n(5260),l=n(1373),f=(0,u.default)("engine.io-client:socket");class h extends c.Emitter{constructor(t,e={}){super(),this.writeBuffer=[],t&&"object"==typeof t&&(e=t,t=null),t?(t=(0,a.parse)(t),e.hostname=t.host,e.secure="https"===t.protocol||"wss"===t.protocol,e.port=t.port,t.query&&(e.query=t.query)):e.host&&(e.hostname=(0,a.parse)(e.host).host),(0,o.installTimerFunctions)(this,e),this.secure=null!=e.secure?e.secure:"undefined"!=typeof location&&"https:"===location.protocol,e.hostname&&!e.port&&(e.port=this.secure?"443":"80"),this.hostname=e.hostname||("undefined"!=typeof location?location.hostname:"localhost"),this.port=e.port||("undefined"!=typeof location&&location.port?location.port:this.secure?"443":"80"),this.transports=e.transports||["polling","websocket"],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:!0},e),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),"string"==typeof this.opts.query&&(this.opts.query=(0,s.decode)(this.opts.query)),this.id=null,this.upgrades=null,this.pingInterval=null,this.pingTimeout=null,this.pingTimeoutTimer=null,"function"==typeof addEventListener&&(this.opts.closeOnBeforeunload&&(this.beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this.beforeunloadEventListener,!1)),"localhost"!==this.hostname&&(this.offlineEventListener=()=>{this.onClose("transport close",{description:"network connection lost"})},addEventListener("offline",this.offlineEventListener,!1))),this.open()}createTransport(t){f('creating transport "%s"',t);const e=Object.assign({},this.opts.query);e.EIO=l.protocol,e.transport=t,this.id&&(e.sid=this.id);const n=Object.assign({},this.opts.transportOptions[t],this.opts,{query:e,socket:this,hostname:this.hostname,secure:this.secure,port:this.port});return f("options: %j",n),new i.transports[t](n)}open(){let t;if(this.opts.rememberUpgrade&&h.priorWebsocketSuccess&&-1!==this.transports.indexOf("websocket"))t="websocket";else{if(0===this.transports.length)return void this.setTimeoutFn((()=>{this.emitReserved("error","No transports available")}),0);t=this.transports[0]}this.readyState="opening";try{t=this.createTransport(t)}catch(t){return f("error while creating transport: %s",t),this.transports.shift(),void this.open()}t.open(),this.setTransport(t)}setTransport(t){f("setting transport %s",t.name),this.transport&&(f("clearing existing transport %s",this.transport.name),this.transport.removeAllListeners()),this.transport=t,t.on("drain",this.onDrain.bind(this)).on("packet",this.onPacket.bind(this)).on("error",this.onError.bind(this)).on("close",(t=>this.onClose("transport close",t)))}probe(t){f('probing transport "%s"',t);let e=this.createTransport(t),n=!1;h.priorWebsocketSuccess=!1;const r=()=>{n||(f('probe transport "%s" opened',t),e.send([{type:"ping",data:"probe"}]),e.once("packet",(r=>{if(!n)if("pong"===r.type&&"probe"===r.data){if(f('probe transport "%s" pong',t),this.upgrading=!0,this.emitReserved("upgrading",e),!e)return;h.priorWebsocketSuccess="websocket"===e.name,f('pausing current transport "%s"',this.transport.name),this.transport.pause((()=>{n||"closed"!==this.readyState&&(f("changing transport and sending upgrade packet"),c(),this.setTransport(e),e.send([{type:"upgrade"}]),this.emitReserved("upgrade",e),e=null,this.upgrading=!1,this.flush())}))}else{f('probe transport "%s" failed',t);const n=new Error("probe error");n.transport=e.name,this.emitReserved("upgradeError",n)}})))};function i(){n||(n=!0,c(),e.close(),e=null)}const o=n=>{const r=new Error("probe error: "+n);r.transport=e.name,i(),f('probe transport "%s" failed because of error: %s',t,n),this.emitReserved("upgradeError",r)};function s(){o("transport closed")}function a(){o("socket closed")}function u(t){e&&t.name!==e.name&&(f('"%s" works - aborting "%s"',t.name,e.name),i())}const c=()=>{e.removeListener("open",r),e.removeListener("error",o),e.removeListener("close",s),this.off("close",a),this.off("upgrading",u)};e.once("open",r),e.once("error",o),e.once("close",s),this.once("close",a),this.once("upgrading",u),e.open()}onOpen(){if(f("socket open"),this.readyState="open",h.priorWebsocketSuccess="websocket"===this.transport.name,this.emitReserved("open"),this.flush(),"open"===this.readyState&&this.opts.upgrade){f("starting upgrade probes");let t=0;const e=this.upgrades.length;for(;t{this.onClose("ping timeout")}),this.pingInterval+this.pingTimeout),this.opts.autoUnref&&this.pingTimeoutTimer.unref()}onDrain(){this.writeBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,0===this.writeBuffer.length?this.emitReserved("drain"):this.flush()}flush(){if("closed"!==this.readyState&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this.getWritablePackets();f("flushing %d packets in socket",t.length),this.transport.send(t),this.prevBufferLen=t.length,this.emitReserved("flush")}}getWritablePackets(){if(!(this.maxPayload&&"polling"===this.transport.name&&this.writeBuffer.length>1))return this.writeBuffer;let t=1;for(let e=0;e0&&t>this.maxPayload)return f("only send %d out of %d packets",e,this.writeBuffer.length),this.writeBuffer.slice(0,e);t+=2}return f("payload size is %d (max: %d)",t,this.maxPayload),this.writeBuffer}write(t,e,n){return this.sendPacket("message",t,e,n),this}send(t,e,n){return this.sendPacket("message",t,e,n),this}sendPacket(t,e,n,r){if("function"==typeof e&&(r=e,e=void 0),"function"==typeof n&&(r=n,n=null),"closing"===this.readyState||"closed"===this.readyState)return;(n=n||{}).compress=!1!==n.compress;const i={type:t,data:e,options:n};this.emitReserved("packetCreate",i),this.writeBuffer.push(i),r&&this.once("flush",r),this.flush()}close(){const t=()=>{this.onClose("forced close"),f("socket closing - telling transport to close"),this.transport.close()},e=()=>{this.off("upgrade",e),this.off("upgradeError",e),t()},n=()=>{this.once("upgrade",e),this.once("upgradeError",e)};return"opening"!==this.readyState&&"open"!==this.readyState||(this.readyState="closing",this.writeBuffer.length?this.once("drain",(()=>{this.upgrading?n():t()})):this.upgrading?n():t()),this}onError(t){f("socket error %j",t),h.priorWebsocketSuccess=!1,this.emitReserved("error",t),this.onClose("transport error",t)}onClose(t,e){"opening"!==this.readyState&&"open"!==this.readyState&&"closing"!==this.readyState||(f('socket close with reason: "%s"',t),this.clearTimeoutFn(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),"function"==typeof removeEventListener&&(removeEventListener("beforeunload",this.beforeunloadEventListener,!1),removeEventListener("offline",this.offlineEventListener,!1)),this.readyState="closed",this.id=null,this.emitReserved("close",t,e),this.writeBuffer=[],this.prevBufferLen=0)}filterUpgrades(t){const e=[];let n=0;const r=t.length;for(;n{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.transports=void 0;const r=n(484),i=n(1308);e.transports={websocket:i.WS,polling:r.Polling}},484:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.Request=e.Polling=void 0;const i=n(9870),o=r(n(4802)),s=n(8726),a=n(5754),u=n(1373),c=n(6666),l=n(5260),f=n(9622),h=n(6242),d=(0,o.default)("engine.io-client:polling");function p(){}const g=null!=new c.XHR({xdomain:!1}).responseType;class v extends i.Transport{constructor(t){if(super(t),this.polling=!1,"undefined"!=typeof location){const e="https:"===location.protocol;let n=location.port;n||(n=e?"443":"80"),this.xd="undefined"!=typeof location&&t.hostname!==location.hostname||n!==t.port,this.xs=t.secure!==e}const e=t&&t.forceBase64;this.supportsBinary=g&&!e}get name(){return"polling"}doOpen(){this.poll()}pause(t){this.readyState="pausing";const e=()=>{d("paused"),this.readyState="paused",t()};if(this.polling||!this.writable){let t=0;this.polling&&(d("we are currently polling - waiting to pause"),t++,this.once("pollComplete",(function(){d("pre-pause polling complete"),--t||e()}))),this.writable||(d("we are currently writing - waiting to pause"),t++,this.once("drain",(function(){d("pre-pause writing complete"),--t||e()})))}else e()}poll(){d("polling"),this.polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){d("polling got data %s",t),(0,u.decodePayload)(t,this.socket.binaryType).forEach((t=>{if("opening"===this.readyState&&"open"===t.type&&this.onOpen(),"close"===t.type)return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(t)})),"closed"!==this.readyState&&(this.polling=!1,this.emitReserved("pollComplete"),"open"===this.readyState?this.poll():d('ignoring poll - transport state "%s"',this.readyState))}doClose(){const t=()=>{d("writing close packet"),this.write([{type:"close"}])};"open"===this.readyState?(d("transport open - closing"),t()):(d("transport not open - deferring close"),this.once("open",t))}write(t){this.writable=!1,(0,u.encodePayload)(t,(t=>{this.doWrite(t,(()=>{this.writable=!0,this.emitReserved("drain")}))}))}uri(){let t=this.query||{};const e=this.opts.secure?"https":"http";let n="";!1!==this.opts.timestampRequests&&(t[this.opts.timestampParam]=(0,s.yeast)()),this.supportsBinary||t.sid||(t.b64=1),this.opts.port&&("https"===e&&443!==Number(this.opts.port)||"http"===e&&80!==Number(this.opts.port))&&(n=":"+this.opts.port);const r=(0,a.encode)(t);return e+"://"+(-1!==this.opts.hostname.indexOf(":")?"["+this.opts.hostname+"]":this.opts.hostname)+n+this.opts.path+(r.length?"?"+r:"")}request(t={}){return Object.assign(t,{xd:this.xd,xs:this.xs},this.opts),new y(this.uri(),t)}doWrite(t,e){const n=this.request({method:"POST",data:t});n.on("success",e),n.on("error",((t,e)=>{this.onError("xhr post error",t,e)}))}doPoll(){d("xhr poll");const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",((t,e)=>{this.onError("xhr poll error",t,e)})),this.pollXhr=t}}e.Polling=v;class y extends l.Emitter{constructor(t,e){super(),(0,f.installTimerFunctions)(this,e),this.opts=e,this.method=e.method||"GET",this.uri=t,this.async=!1!==e.async,this.data=void 0!==e.data?e.data:null,this.create()}create(){const t=(0,f.pick)(this.opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");t.xdomain=!!this.opts.xd,t.xscheme=!!this.opts.xs;const e=this.xhr=new c.XHR(t);try{d("xhr open %s: %s",this.method,this.uri),e.open(this.method,this.uri,this.async);try{if(this.opts.extraHeaders){e.setDisableHeaderCheck&&e.setDisableHeaderCheck(!0);for(let t in this.opts.extraHeaders)this.opts.extraHeaders.hasOwnProperty(t)&&e.setRequestHeader(t,this.opts.extraHeaders[t])}}catch(t){}if("POST"===this.method)try{e.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch(t){}try{e.setRequestHeader("Accept","*/*")}catch(t){}"withCredentials"in e&&(e.withCredentials=this.opts.withCredentials),this.opts.requestTimeout&&(e.timeout=this.opts.requestTimeout),e.onreadystatechange=()=>{4===e.readyState&&(200===e.status||1223===e.status?this.onLoad():this.setTimeoutFn((()=>{this.onError("number"==typeof e.status?e.status:0)}),0))},d("xhr data %s",this.data),e.send(this.data)}catch(t){return void this.setTimeoutFn((()=>{this.onError(t)}),0)}"undefined"!=typeof document&&(this.index=y.requestsCount++,y.requests[this.index]=this)}onError(t){this.emitReserved("error",t,this.xhr),this.cleanup(!0)}cleanup(t){if(void 0!==this.xhr&&null!==this.xhr){if(this.xhr.onreadystatechange=p,t)try{this.xhr.abort()}catch(t){}"undefined"!=typeof document&&delete y.requests[this.index],this.xhr=null}}onLoad(){const t=this.xhr.responseText;null!==t&&(this.emitReserved("data",t),this.emitReserved("success"),this.cleanup())}abort(){this.cleanup()}}if(e.Request=y,y.requestsCount=0,y.requests={},"undefined"!=typeof document)if("function"==typeof attachEvent)attachEvent("onunload",m);else if("function"==typeof addEventListener){const t="onpagehide"in h.globalThisShim?"pagehide":"unload";addEventListener(t,m,!1)}function m(){for(let t in y.requests)y.requests.hasOwnProperty(t)&&y.requests[t].abort()}},5552:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.defaultBinaryType=e.usingBrowserWebSocket=e.WebSocket=e.nextTick=void 0;const r=n(6242);e.nextTick="function"==typeof Promise&&"function"==typeof Promise.resolve?t=>Promise.resolve().then(t):(t,e)=>e(t,0),e.WebSocket=r.globalThisShim.WebSocket||r.globalThisShim.MozWebSocket,e.usingBrowserWebSocket=!0,e.defaultBinaryType="arraybuffer"},1308:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.WS=void 0;const i=n(9870),o=n(5754),s=n(8726),a=n(9622),u=n(5552),c=r(n(4802)),l=n(1373),f=(0,c.default)("engine.io-client:websocket"),h="undefined"!=typeof navigator&&"string"==typeof navigator.product&&"reactnative"===navigator.product.toLowerCase();class d extends i.Transport{constructor(t){super(t),this.supportsBinary=!t.forceBase64}get name(){return"websocket"}doOpen(){if(!this.check())return;const t=this.uri(),e=this.opts.protocols,n=h?{}:(0,a.pick)(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(n.headers=this.opts.extraHeaders);try{this.ws=u.usingBrowserWebSocket&&!h?e?new u.WebSocket(t,e):new u.WebSocket(t):new u.WebSocket(t,e,n)}catch(t){return this.emitReserved("error",t)}this.ws.binaryType=this.socket.binaryType||u.defaultBinaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let e=0;e{const e={};!u.usingBrowserWebSocket&&(n.options&&(e.compress=n.options.compress),this.opts.perMessageDeflate)&&("string"==typeof t?Buffer.byteLength(t):t.length){this.writable=!0,this.emitReserved("drain")}),this.setTimeoutFn)}))}}doClose(){void 0!==this.ws&&(this.ws.close(),this.ws=null)}uri(){let t=this.query||{};const e=this.opts.secure?"wss":"ws";let n="";this.opts.port&&("wss"===e&&443!==Number(this.opts.port)||"ws"===e&&80!==Number(this.opts.port))&&(n=":"+this.opts.port),this.opts.timestampRequests&&(t[this.opts.timestampParam]=(0,s.yeast)()),this.supportsBinary||(t.b64=1);const r=(0,o.encode)(t);return e+"://"+(-1!==this.opts.hostname.indexOf(":")?"["+this.opts.hostname+"]":this.opts.hostname)+n+this.opts.path+(r.length?"?"+r:"")}check(){return!!u.WebSocket}}e.WS=d},6666:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.XHR=void 0;const r=n(8419),i=n(6242);e.XHR=function(t){const e=t.xdomain;try{if("undefined"!=typeof XMLHttpRequest&&(!e||r.hasCORS))return new XMLHttpRequest}catch(t){}if(!e)try{return new(i.globalThisShim[["Active"].concat("Object").join("X")])("Microsoft.XMLHTTP")}catch(t){}}},9622:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.byteLength=e.installTimerFunctions=e.pick=void 0;const r=n(6242);e.pick=function(t,...e){return e.reduce(((e,n)=>(t.hasOwnProperty(n)&&(e[n]=t[n]),e)),{})};const i=r.globalThisShim.setTimeout,o=r.globalThisShim.clearTimeout;e.installTimerFunctions=function(t,e){e.useNativeTimers?(t.setTimeoutFn=i.bind(r.globalThisShim),t.clearTimeoutFn=o.bind(r.globalThisShim)):(t.setTimeoutFn=r.globalThisShim.setTimeout.bind(r.globalThisShim),t.clearTimeoutFn=r.globalThisShim.clearTimeout.bind(r.globalThisShim))},e.byteLength=function(t){return"string"==typeof t?function(t){let e=0,n=0;for(let r=0,i=t.length;r=57344?n+=3:(r++,n+=4);return n}(t):Math.ceil(1.33*(t.byteLength||t.size))}},3087:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ERROR_PACKET=e.PACKET_TYPES_REVERSE=e.PACKET_TYPES=void 0;const n=Object.create(null);e.PACKET_TYPES=n,n.open="0",n.close="1",n.ping="2",n.pong="3",n.message="4",n.upgrade="5",n.noop="6";const r=Object.create(null);e.PACKET_TYPES_REVERSE=r,Object.keys(n).forEach((t=>{r[n[t]]=t})),e.ERROR_PACKET={type:"error",data:"parser error"}},2469:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.decode=e.encode=void 0;const n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",r="undefined"==typeof Uint8Array?[]:new Uint8Array(256);for(let t=0;t<64;t++)r[n.charCodeAt(t)]=t;e.encode=t=>{let e,r=new Uint8Array(t),i=r.length,o="";for(e=0;e>2],o+=n[(3&r[e])<<4|r[e+1]>>4],o+=n[(15&r[e+1])<<2|r[e+2]>>6],o+=n[63&r[e+2]];return i%3==2?o=o.substring(0,o.length-1)+"=":i%3==1&&(o=o.substring(0,o.length-2)+"=="),o},e.decode=t=>{let e,n,i,o,s,a=.75*t.length,u=t.length,c=0;"="===t[t.length-1]&&(a--,"="===t[t.length-2]&&a--);const l=new ArrayBuffer(a),f=new Uint8Array(l);for(e=0;e>4,f[c++]=(15&i)<<4|o>>2,f[c++]=(3&o)<<6|63&s;return l}},7572:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});const r=n(3087),i=n(2469),o="function"==typeof ArrayBuffer,s=(t,e)=>{if(o){const n=(0,i.decode)(t);return a(n,e)}return{base64:!0,data:t}},a=(t,e)=>"blob"===e&&t instanceof ArrayBuffer?new Blob([t]):t;e.default=(t,e)=>{if("string"!=typeof t)return{type:"message",data:a(t,e)};const n=t.charAt(0);return"b"===n?{type:"message",data:s(t.substring(1),e)}:r.PACKET_TYPES_REVERSE[n]?t.length>1?{type:r.PACKET_TYPES_REVERSE[n],data:t.substring(1)}:{type:r.PACKET_TYPES_REVERSE[n]}:r.ERROR_PACKET}},3908:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});const r=n(3087),i="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===Object.prototype.toString.call(Blob),o="function"==typeof ArrayBuffer,s=(t,e)=>{const n=new FileReader;return n.onload=function(){const t=n.result.split(",")[1];e("b"+(t||""))},n.readAsDataURL(t)};e.default=({type:t,data:e},n,a)=>{return i&&e instanceof Blob?n?a(e):s(e,a):o&&(e instanceof ArrayBuffer||(u=e,"function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(u):u&&u.buffer instanceof ArrayBuffer))?n?a(e):s(new Blob([e]),a):a(r.PACKET_TYPES[t]+(e||""));var u}},1373:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.decodePayload=e.decodePacket=e.encodePayload=e.encodePacket=e.protocol=void 0;const r=n(3908);e.encodePacket=r.default;const i=n(7572);e.decodePacket=i.default;const o=String.fromCharCode(30);e.encodePayload=(t,e)=>{const n=t.length,i=new Array(n);let s=0;t.forEach(((t,a)=>{(0,r.default)(t,!1,(t=>{i[a]=t,++s===n&&e(i.join(o))}))}))},e.decodePayload=(t,e)=>{const n=t.split(o),r=[];for(let t=0;t{"use strict";function n(t){t=t||{},this.ms=t.min||100,this.max=t.max||1e4,this.factor=t.factor||2,this.jitter=t.jitter>0&&t.jitter<=1?t.jitter:0,this.attempts=0}Object.defineProperty(e,"__esModule",{value:!0}),e.Backoff=void 0,e.Backoff=n,n.prototype.duration=function(){var t=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var e=Math.random(),n=Math.floor(e*this.jitter*t);t=0==(1&Math.floor(10*e))?t-n:t+n}return 0|Math.min(t,this.max)},n.prototype.reset=function(){this.attempts=0},n.prototype.setMin=function(t){this.ms=t},n.prototype.setMax=function(t){this.max=t},n.prototype.setJitter=function(t){this.jitter=t}},7046:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.connect=e.io=e.Socket=e.Manager=e.protocol=void 0;const i=n(3084),o=n(4168);Object.defineProperty(e,"Manager",{enumerable:!0,get:function(){return o.Manager}});const s=n(8312);Object.defineProperty(e,"Socket",{enumerable:!0,get:function(){return s.Socket}});const a=r(n(3669)).default("socket.io-client"),u={};function c(t,e){"object"==typeof t&&(e=t,t=void 0),e=e||{};const n=i.url(t,e.path||"/socket.io"),r=n.source,s=n.id,c=n.path,l=u[s]&&c in u[s].nsps;let f;return e.forceNew||e["force new connection"]||!1===e.multiplex||l?(a("ignoring socket cache for %s",r),f=new o.Manager(r,e)):(u[s]||(a("new io instance for %s",r),u[s]=new o.Manager(r,e)),f=u[s]),n.query&&!e.query&&(e.query=n.queryKey),f.socket(n.path,e)}e.io=c,e.connect=c,e.default=c,Object.assign(c,{Manager:o.Manager,Socket:s.Socket,io:c,connect:c});var l=n(4514);Object.defineProperty(e,"protocol",{enumerable:!0,get:function(){return l.protocol}}),t.exports=c},4168:function(t,e,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),i=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),o=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)"default"!==n&&Object.prototype.hasOwnProperty.call(t,n)&&r(e,t,n);return i(e,t),e},s=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.Manager=void 0;const a=n(4679),u=n(8312),c=o(n(4514)),l=n(7149),f=n(5159),h=n(5260),d=s(n(3669)).default("socket.io-client:manager");class p extends h.Emitter{constructor(t,e){var n;super(),this.nsps={},this.subs=[],t&&"object"==typeof t&&(e=t,t=void 0),(e=e||{}).path=e.path||"/socket.io",this.opts=e,a.installTimerFunctions(this,e),this.reconnection(!1!==e.reconnection),this.reconnectionAttempts(e.reconnectionAttempts||1/0),this.reconnectionDelay(e.reconnectionDelay||1e3),this.reconnectionDelayMax(e.reconnectionDelayMax||5e3),this.randomizationFactor(null!==(n=e.randomizationFactor)&&void 0!==n?n:.5),this.backoff=new f.Backoff({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(null==e.timeout?2e4:e.timeout),this._readyState="closed",this.uri=t;const r=e.parser||c;this.encoder=new r.Encoder,this.decoder=new r.Decoder,this._autoConnect=!1!==e.autoConnect,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,this):this._reconnection}reconnectionAttempts(t){return void 0===t?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var e;return void 0===t?this._reconnectionDelay:(this._reconnectionDelay=t,null===(e=this.backoff)||void 0===e||e.setMin(t),this)}randomizationFactor(t){var e;return void 0===t?this._randomizationFactor:(this._randomizationFactor=t,null===(e=this.backoff)||void 0===e||e.setJitter(t),this)}reconnectionDelayMax(t){var e;return void 0===t?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,null===(e=this.backoff)||void 0===e||e.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&0===this.backoff.attempts&&this.reconnect()}open(t){if(d("readyState %s",this._readyState),~this._readyState.indexOf("open"))return this;d("opening %s",this.uri),this.engine=new a.Socket(this.uri,this.opts);const e=this.engine,n=this;this._readyState="opening",this.skipReconnect=!1;const r=l.on(e,"open",(function(){n.onopen(),t&&t()})),i=l.on(e,"error",(e=>{d("error"),n.cleanup(),n._readyState="closed",this.emitReserved("error",e),t?t(e):n.maybeReconnectOnOpen()}));if(!1!==this._timeout){const t=this._timeout;d("connect attempt will timeout after %d",t),0===t&&r();const n=this.setTimeoutFn((()=>{d("connect attempt timed out after %d",t),r(),e.close(),e.emit("error",new Error("timeout"))}),t);this.opts.autoUnref&&n.unref(),this.subs.push((function(){clearTimeout(n)}))}return this.subs.push(r),this.subs.push(i),this}connect(t){return this.open(t)}onopen(){d("open"),this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(l.on(t,"ping",this.onping.bind(this)),l.on(t,"data",this.ondata.bind(this)),l.on(t,"error",this.onerror.bind(this)),l.on(t,"close",this.onclose.bind(this)),l.on(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(t){this.onclose("parse error",t)}}ondecoded(t){a.nextTick((()=>{this.emitReserved("packet",t)}),this.setTimeoutFn)}onerror(t){d("error",t),this.emitReserved("error",t)}socket(t,e){let n=this.nsps[t];return n?this._autoConnect&&!n.active&&n.connect():(n=new u.Socket(this,t,e),this.nsps[t]=n),n}_destroy(t){const e=Object.keys(this.nsps);for(const t of e)if(this.nsps[t].active)return void d("socket %s is still active, skipping close",t);this._close()}_packet(t){d("writing packet %j",t);const e=this.encoder.encode(t);for(let n=0;nt())),this.subs.length=0,this.decoder.destroy()}_close(){d("disconnect"),this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close"),this.engine&&this.engine.close()}disconnect(){return this._close()}onclose(t,e){d("closed due to %s",t),this.cleanup(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,e),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)d("reconnect failed"),this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const e=this.backoff.duration();d("will wait %dms before reconnect attempt",e),this._reconnecting=!0;const n=this.setTimeoutFn((()=>{t.skipReconnect||(d("attempting reconnect"),this.emitReserved("reconnect_attempt",t.backoff.attempts),t.skipReconnect||t.open((e=>{e?(d("reconnect attempt error"),t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",e)):(d("reconnect success"),t.onreconnect())})))}),e);this.opts.autoUnref&&n.unref(),this.subs.push((function(){clearTimeout(n)}))}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}e.Manager=p},7149:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.on=void 0,e.on=function(t,e,n){return t.on(e,n),function(){t.off(e,n)}}},8312:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.Socket=void 0;const i=n(4514),o=n(7149),s=n(5260),a=r(n(3669)).default("socket.io-client:socket"),u=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class c extends s.Emitter{constructor(t,e,n){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=t,this.nsp=e,n&&n.auth&&(this.auth=n.auth),this._opts=Object.assign({},n),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const t=this.io;this.subs=[o.on(t,"open",this.onopen.bind(this)),o.on(t,"packet",this.onpacket.bind(this)),o.on(t,"error",this.onerror.bind(this)),o.on(t,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected||(this.subEvents(),this.io._reconnecting||this.io.open(),"open"===this.io._readyState&&this.onopen()),this}open(){return this.connect()}send(...t){return t.unshift("message"),this.emit.apply(this,t),this}emit(t,...e){if(u.hasOwnProperty(t))throw new Error('"'+t.toString()+'" is a reserved event name');if(e.unshift(t),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(e),this;const n={type:i.PacketType.EVENT,data:e,options:{}};if(n.options.compress=!1!==this.flags.compress,"function"==typeof e[e.length-1]){const t=this.ids++;a("emitting packet with ack id %d",t);const r=e.pop();this._registerAckCallback(t,r),n.id=t}const r=this.io.engine&&this.io.engine.transport&&this.io.engine.transport.writable;return!this.flags.volatile||r&&this.connected?this.connected?(this.notifyOutgoingListeners(n),this.packet(n)):this.sendBuffer.push(n):a("discard packet as the transport is not currently writable"),this.flags={},this}_registerAckCallback(t,e){var n;const r=null!==(n=this.flags.timeout)&&void 0!==n?n:this._opts.ackTimeout;if(void 0===r)return void(this.acks[t]=e);const i=this.io.setTimeoutFn((()=>{delete this.acks[t];for(let e=0;e{this.io.clearTimeoutFn(i),e.apply(this,[null,...t])}}emitWithAck(t,...e){const n=void 0!==this.flags.timeout||void 0!==this._opts.ackTimeout;return new Promise(((r,i)=>{e.push(((t,e)=>n?t?i(t):r(e):r(t))),this.emit(t,...e)}))}_addToQueue(t){let e;"function"==typeof t[t.length-1]&&(e=t.pop());const n={id:this._queueSeq++,tryCount:0,pending:!1,args:t,flags:Object.assign({fromQueue:!0},this.flags)};t.push(((t,...r)=>{if(n===this._queue[0])return null!==t?n.tryCount>this._opts.retries&&(a("packet [%d] is discarded after %d tries",n.id,n.tryCount),this._queue.shift(),e&&e(t)):(a("packet [%d] was successfully sent",n.id),this._queue.shift(),e&&e(null,...r)),n.pending=!1,this._drainQueue()})),this._queue.push(n),this._drainQueue()}_drainQueue(t=!1){if(a("draining queue"),!this.connected||0===this._queue.length)return;const e=this._queue[0];!e.pending||t?(e.pending=!0,e.tryCount++,a("sending packet [%d] (try n°%d)",e.id,e.tryCount),this.flags=e.flags,this.emit.apply(this,e.args)):a("packet [%d] has already been sent and is waiting for an ack",e.id)}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){a("transport is open - connecting"),"function"==typeof this.auth?this.auth((t=>{this._sendConnectPacket(t)})):this._sendConnectPacket(this.auth)}_sendConnectPacket(t){this.packet({type:i.PacketType.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},t):t})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,e){a("close (%s)",t),this.connected=!1,delete this.id,this.emitReserved("disconnect",t,e)}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case i.PacketType.CONNECT:t.data&&t.data.sid?this.onconnect(t.data.sid,t.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 i.PacketType.EVENT:case i.PacketType.BINARY_EVENT:this.onevent(t);break;case i.PacketType.ACK:case i.PacketType.BINARY_ACK:this.onack(t);break;case i.PacketType.DISCONNECT:this.ondisconnect();break;case i.PacketType.CONNECT_ERROR:this.destroy();const e=new Error(t.data.message);e.data=t.data.data,this.emitReserved("connect_error",e)}}onevent(t){const e=t.data||[];a("emitting event %j",e),null!=t.id&&(a("attaching ack callback to event"),e.push(this.ack(t.id))),this.connected?this.emitEvent(e):this.receiveBuffer.push(Object.freeze(e))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const e=this._anyListeners.slice();for(const n of e)n.apply(this,t)}super.emit.apply(this,t),this._pid&&t.length&&"string"==typeof t[t.length-1]&&(this._lastOffset=t[t.length-1])}ack(t){const e=this;let n=!1;return function(...r){n||(n=!0,a("sending ack %j",r),e.packet({type:i.PacketType.ACK,id:t,data:r}))}}onack(t){const e=this.acks[t.id];"function"==typeof e?(a("calling ack %s with %j",t.id,t.data),e.apply(this,t.data),delete this.acks[t.id]):a("bad ack %s",t.id)}onconnect(t,e){a("socket connected with id %s",t),this.id=t,this.recovered=e&&this._pid===e,this._pid=e,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach((t=>this.emitEvent(t))),this.receiveBuffer=[],this.sendBuffer.forEach((t=>{this.notifyOutgoingListeners(t),this.packet(t)})),this.sendBuffer=[]}ondisconnect(){a("server disconnect (%s)",this.nsp),this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach((t=>t())),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&(a("performing disconnect (%s)",this.nsp),this.packet({type:i.PacketType.DISCONNECT})),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){const e=this._anyListeners;for(let n=0;n{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.reconstructPacket=e.deconstructPacket=void 0;const r=n(665);function i(t,e){if(!t)return t;if((0,r.isBinary)(t)){const n={_placeholder:!0,num:e.length};return e.push(t),n}if(Array.isArray(t)){const n=new Array(t.length);for(let r=0;r=0&&t.num{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Decoder=e.Encoder=e.PacketType=e.protocol=void 0;const r=n(5260),i=n(4880),o=n(665),s=(0,n(1618).default)("socket.io-parser");var a;e.protocol=5,function(t){t[t.CONNECT=0]="CONNECT",t[t.DISCONNECT=1]="DISCONNECT",t[t.EVENT=2]="EVENT",t[t.ACK=3]="ACK",t[t.CONNECT_ERROR=4]="CONNECT_ERROR",t[t.BINARY_EVENT=5]="BINARY_EVENT",t[t.BINARY_ACK=6]="BINARY_ACK"}(a=e.PacketType||(e.PacketType={})),e.Encoder=class{constructor(t){this.replacer=t}encode(t){return s("encoding packet %j",t),t.type!==a.EVENT&&t.type!==a.ACK||!(0,o.hasBinary)(t)?[this.encodeAsString(t)]:this.encodeAsBinary({type:t.type===a.EVENT?a.BINARY_EVENT:a.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id})}encodeAsString(t){let e=""+t.type;return t.type!==a.BINARY_EVENT&&t.type!==a.BINARY_ACK||(e+=t.attachments+"-"),t.nsp&&"/"!==t.nsp&&(e+=t.nsp+","),null!=t.id&&(e+=t.id),null!=t.data&&(e+=JSON.stringify(t.data,this.replacer)),s("encoded %j as %s",t,e),e}encodeAsBinary(t){const e=(0,i.deconstructPacket)(t),n=this.encodeAsString(e.packet),r=e.buffers;return r.unshift(n),r}};class u extends r.Emitter{constructor(t){super(),this.reviver=t}add(t){let e;if("string"==typeof t){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");e=this.decodeString(t);const n=e.type===a.BINARY_EVENT;n||e.type===a.BINARY_ACK?(e.type=n?a.EVENT:a.ACK,this.reconstructor=new c(e),0===e.attachments&&super.emitReserved("decoded",e)):super.emitReserved("decoded",e)}else{if(!(0,o.isBinary)(t)&&!t.base64)throw new Error("Unknown type: "+t);if(!this.reconstructor)throw new Error("got binary data when not reconstructing a packet");e=this.reconstructor.takeBinaryData(t),e&&(this.reconstructor=null,super.emitReserved("decoded",e))}}decodeString(t){let e=0;const n={type:Number(t.charAt(0))};if(void 0===a[n.type])throw new Error("unknown packet type "+n.type);if(n.type===a.BINARY_EVENT||n.type===a.BINARY_ACK){const r=e+1;for(;"-"!==t.charAt(++e)&&e!=t.length;);const i=t.substring(r,e);if(i!=Number(i)||"-"!==t.charAt(e))throw new Error("Illegal attachments");n.attachments=Number(i)}if("/"===t.charAt(e+1)){const r=e+1;for(;++e&&","!==t.charAt(e)&&e!==t.length;);n.nsp=t.substring(r,e)}else n.nsp="/";const r=t.charAt(e+1);if(""!==r&&Number(r)==r){const r=e+1;for(;++e;){const n=t.charAt(e);if(null==n||Number(n)!=n){--e;break}if(e===t.length)break}n.id=Number(t.substring(r,e+1))}if(t.charAt(++e)){const r=this.tryParse(t.substr(e));if(!u.isPayloadValid(n.type,r))throw new Error("invalid payload");n.data=r}return s("decoded %s as %j",t,n),n}tryParse(t){try{return JSON.parse(t,this.reviver)}catch(t){return!1}}static isPayloadValid(t,e){switch(t){case a.CONNECT:return"object"==typeof e;case a.DISCONNECT:return void 0===e;case a.CONNECT_ERROR:return"string"==typeof e||"object"==typeof e;case a.EVENT:case a.BINARY_EVENT:return Array.isArray(e)&&("string"==typeof e[0]||"number"==typeof e[0]);case a.ACK:case a.BINARY_ACK:return Array.isArray(e)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}e.Decoder=u;class c{constructor(t){this.packet=t,this.buffers=[],this.reconPack=t}takeBinaryData(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){const t=(0,i.reconstructPacket)(this.reconPack,this.buffers);return this.finishedReconstruction(),t}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}},665:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.hasBinary=e.isBinary=void 0;const n="function"==typeof ArrayBuffer,r=Object.prototype.toString,i="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===r.call(Blob),o="function"==typeof File||"undefined"!=typeof File&&"[object FileConstructor]"===r.call(File);function s(t){return n&&(t instanceof ArrayBuffer||(t=>"function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(t):t.buffer instanceof ArrayBuffer)(t))||i&&t instanceof Blob||o&&t instanceof File}e.isBinary=s,e.hasBinary=function t(e,n){if(!e||"object"!=typeof e)return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n{"use strict";function r(t){if(t)return function(t){for(var e in r.prototype)t[e]=r.prototype[e];return t}(t)}n.r(e),n.d(e,{Emitter:()=>r}),r.prototype.on=r.prototype.addEventListener=function(t,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(e),this},r.prototype.once=function(t,e){function n(){this.off(t,n),e.apply(this,arguments)}return n.fn=e,this.on(t,n),this},r.prototype.off=r.prototype.removeListener=r.prototype.removeAllListeners=r.prototype.removeEventListener=function(t,e){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var n,r=this._callbacks["$"+t];if(!r)return this;if(1==arguments.length)return delete this._callbacks["$"+t],this;for(var i=0;i{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.nmd=t=>(t.paths=[],t.children||(t.children=[]),t),n(2174)})(); \ No newline at end of file +(()=>{var t={4802:(t,e,n)=>{e.formatArgs=function(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+t.exports.humanize(this.diff),!this.useColors)return;const n="color: "+this.color;e.splice(1,0,n,"color: inherit");let r=0,i=0;e[0].replace(/%[a-zA-Z%]/g,(t=>{"%%"!==t&&(r++,"%c"===t&&(i=r))})),e.splice(i,0,n)},e.save=function(t){try{t?e.storage.setItem("debug",t):e.storage.removeItem("debug")}catch(t){}},e.load=function(){let t;try{t=e.storage.getItem("debug")}catch(t){}return!t&&"undefined"!=typeof process&&"env"in process&&(t=process.env.DEBUG),t},e.useColors=function(){return!("undefined"==typeof window||!window.process||"renderer"!==window.process.type&&!window.process.__nwjs)||("undefined"==typeof navigator||!navigator.userAgent||!navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))&&("undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))},e.storage=function(){try{return localStorage}catch(t){}}(),e.destroy=(()=>{let t=!1;return()=>{t||(t=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),e.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],e.log=console.debug||console.log||(()=>{}),t.exports=n(804)(e);const{formatters:r}=t.exports;r.j=function(t){try{return JSON.stringify(t)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}},804:(t,e,n)=>{t.exports=function(t){function e(t){let n,i,o,s=null;function a(...t){if(!a.enabled)return;const r=a,i=Number(new Date),o=i-(n||i);r.diff=o,r.prev=n,r.curr=i,n=i,t[0]=e.coerce(t[0]),"string"!=typeof t[0]&&t.unshift("%O");let s=0;t[0]=t[0].replace(/%([a-zA-Z%])/g,((n,i)=>{if("%%"===n)return"%";s++;const o=e.formatters[i];if("function"==typeof o){const e=t[s];n=o.call(r,e),t.splice(s,1),s--}return n})),e.formatArgs.call(r,t),(r.log||e.log).apply(r,t)}return a.namespace=t,a.useColors=e.useColors(),a.color=e.selectColor(t),a.extend=r,a.destroy=e.destroy,Object.defineProperty(a,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==s?s:(i!==e.namespaces&&(i=e.namespaces,o=e.enabled(t)),o),set:t=>{s=t}}),"function"==typeof e.init&&e.init(a),a}function r(t,n){const r=e(this.namespace+(void 0===n?":":n)+t);return r.log=this.log,r}function i(t){return t.toString().substring(2,t.toString().length-2).replace(/\.\*\?$/,"*")}return e.debug=e,e.default=e,e.coerce=function(t){return t instanceof Error?t.stack||t.message:t},e.disable=function(){const t=[...e.names.map(i),...e.skips.map(i).map((t=>"-"+t))].join(",");return e.enable(""),t},e.enable=function(t){let n;e.save(t),e.namespaces=t,e.names=[],e.skips=[];const r=("string"==typeof t?t:"").split(/[\s,]+/),i=r.length;for(n=0;n{e[n]=t[n]})),e.names=[],e.skips=[],e.formatters={},e.selectColor=function(t){let n=0;for(let e=0;e{var e=1e3,n=60*e,r=60*n,i=24*r;function o(t,e,n,r){var i=e>=1.5*n;return Math.round(t/n)+" "+r+(i?"s":"")}t.exports=function(t,s){s=s||{};var a,u,c=typeof t;if("string"===c&&t.length>0)return function(t){if(!((t=String(t)).length>100)){var o=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(t);if(o){var s=parseFloat(o[1]);switch((o[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*s;case"weeks":case"week":case"w":return 6048e5*s;case"days":case"day":case"d":return s*i;case"hours":case"hour":case"hrs":case"hr":case"h":return s*r;case"minutes":case"minute":case"mins":case"min":case"m":return s*n;case"seconds":case"second":case"secs":case"sec":case"s":return s*e;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return s;default:return}}}}(t);if("number"===c&&isFinite(t))return s.long?(a=t,(u=Math.abs(a))>=i?o(a,u,i,"day"):u>=r?o(a,u,r,"hour"):u>=n?o(a,u,n,"minute"):u>=e?o(a,u,e,"second"):a+" ms"):function(t){var o=Math.abs(t);return o>=i?Math.round(t/i)+"d":o>=r?Math.round(t/r)+"h":o>=n?Math.round(t/n)+"m":o>=e?Math.round(t/e)+"s":t+"ms"}(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))}},6486:function(t,e,n){var r;t=n.nmd(t),function(){var i,o="Expected a function",s="__lodash_hash_undefined__",a="__lodash_placeholder__",u=32,c=128,l=1/0,f=9007199254740991,h=NaN,d=4294967295,p=[["ary",c],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",u],["partialRight",64],["rearg",256]],g="[object Arguments]",v="[object Array]",y="[object Boolean]",m="[object Date]",_="[object Error]",b="[object Function]",C="[object GeneratorFunction]",w="[object Map]",k="[object Number]",E="[object Object]",A="[object Promise]",S="[object RegExp]",x="[object Set]",O="[object String]",F="[object Symbol]",T="[object WeakMap]",j="[object ArrayBuffer]",P="[object DataView]",R="[object Float32Array]",$="[object Float64Array]",M="[object Int8Array]",L="[object Int16Array]",N="[object Int32Array]",D="[object Uint8Array]",I="[object Uint8ClampedArray]",B="[object Uint16Array]",q="[object Uint32Array]",U=/\b__p \+= '';/g,H=/\b(__p \+=) '' \+/g,W=/(__e\(.*?\)|\b__t\)) \+\n'';/g,z=/&(?:amp|lt|gt|quot|#39);/g,V=/[&<>"']/g,K=RegExp(z.source),Y=RegExp(V.source),G=/<%-([\s\S]+?)%>/g,J=/<%([\s\S]+?)%>/g,X=/<%=([\s\S]+?)%>/g,Z=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Q=/^\w*$/,tt=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,et=/[\\^$.*+?()[\]{}|]/g,nt=RegExp(et.source),rt=/^\s+/,it=/\s/,ot=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,st=/\{\n\/\* \[wrapped with (.+)\] \*/,at=/,? & /,ut=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,ct=/[()=,{}\[\]\/\s]/,lt=/\\(\\)?/g,ft=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,ht=/\w*$/,dt=/^[-+]0x[0-9a-f]+$/i,pt=/^0b[01]+$/i,gt=/^\[object .+?Constructor\]$/,vt=/^0o[0-7]+$/i,yt=/^(?:0|[1-9]\d*)$/,mt=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,_t=/($^)/,bt=/['\n\r\u2028\u2029\\]/g,Ct="\\ud800-\\udfff",wt="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",kt="\\u2700-\\u27bf",Et="a-z\\xdf-\\xf6\\xf8-\\xff",At="A-Z\\xc0-\\xd6\\xd8-\\xde",St="\\ufe0e\\ufe0f",xt="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\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",Ot="["+Ct+"]",Ft="["+xt+"]",Tt="["+wt+"]",jt="\\d+",Pt="["+kt+"]",Rt="["+Et+"]",$t="[^"+Ct+xt+jt+kt+Et+At+"]",Mt="\\ud83c[\\udffb-\\udfff]",Lt="[^"+Ct+"]",Nt="(?:\\ud83c[\\udde6-\\uddff]){2}",Dt="[\\ud800-\\udbff][\\udc00-\\udfff]",It="["+At+"]",Bt="\\u200d",qt="(?:"+Rt+"|"+$t+")",Ut="(?:"+It+"|"+$t+")",Ht="(?:['’](?:d|ll|m|re|s|t|ve))?",Wt="(?:['’](?:D|LL|M|RE|S|T|VE))?",zt="(?:"+Tt+"|"+Mt+")?",Vt="["+St+"]?",Kt=Vt+zt+"(?:"+Bt+"(?:"+[Lt,Nt,Dt].join("|")+")"+Vt+zt+")*",Yt="(?:"+[Pt,Nt,Dt].join("|")+")"+Kt,Gt="(?:"+[Lt+Tt+"?",Tt,Nt,Dt,Ot].join("|")+")",Jt=RegExp("['’]","g"),Xt=RegExp(Tt,"g"),Zt=RegExp(Mt+"(?="+Mt+")|"+Gt+Kt,"g"),Qt=RegExp([It+"?"+Rt+"+"+Ht+"(?="+[Ft,It,"$"].join("|")+")",Ut+"+"+Wt+"(?="+[Ft,It+qt,"$"].join("|")+")",It+"?"+qt+"+"+Ht,It+"+"+Wt,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",jt,Yt].join("|"),"g"),te=RegExp("["+Bt+Ct+wt+St+"]"),ee=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,ne=["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"],re=-1,ie={};ie[R]=ie[$]=ie[M]=ie[L]=ie[N]=ie[D]=ie[I]=ie[B]=ie[q]=!0,ie[g]=ie[v]=ie[j]=ie[y]=ie[P]=ie[m]=ie[_]=ie[b]=ie[w]=ie[k]=ie[E]=ie[S]=ie[x]=ie[O]=ie[T]=!1;var oe={};oe[g]=oe[v]=oe[j]=oe[P]=oe[y]=oe[m]=oe[R]=oe[$]=oe[M]=oe[L]=oe[N]=oe[w]=oe[k]=oe[E]=oe[S]=oe[x]=oe[O]=oe[F]=oe[D]=oe[I]=oe[B]=oe[q]=!0,oe[_]=oe[b]=oe[T]=!1;var se={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},ae=parseFloat,ue=parseInt,ce="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,le="object"==typeof self&&self&&self.Object===Object&&self,fe=ce||le||Function("return this")(),he=e&&!e.nodeType&&e,de=he&&t&&!t.nodeType&&t,pe=de&&de.exports===he,ge=pe&&ce.process,ve=function(){try{return de&&de.require&&de.require("util").types||ge&&ge.binding&&ge.binding("util")}catch(t){}}(),ye=ve&&ve.isArrayBuffer,me=ve&&ve.isDate,_e=ve&&ve.isMap,be=ve&&ve.isRegExp,Ce=ve&&ve.isSet,we=ve&&ve.isTypedArray;function ke(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}function Ee(t,e,n,r){for(var i=-1,o=null==t?0:t.length;++i-1}function Te(t,e,n){for(var r=-1,i=null==t?0:t.length;++r-1;);return n}function Qe(t,e){for(var n=t.length;n--&&Ie(e,t[n],0)>-1;);return n}var tn=We({À:"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"}),en=We({"&":"&","<":"<",">":">",'"':""","'":"'"});function nn(t){return"\\"+se[t]}function rn(t){return te.test(t)}function on(t){var e=-1,n=Array(t.size);return t.forEach((function(t,r){n[++e]=[r,t]})),n}function sn(t,e){return function(n){return t(e(n))}}function an(t,e){for(var n=-1,r=t.length,i=0,o=[];++n",""":'"',"'":"'"}),pn=function t(e){var n,r=(e=null==e?fe:pn.defaults(fe.Object(),e,pn.pick(fe,ne))).Array,it=e.Date,Ct=e.Error,wt=e.Function,kt=e.Math,Et=e.Object,At=e.RegExp,St=e.String,xt=e.TypeError,Ot=r.prototype,Ft=wt.prototype,Tt=Et.prototype,jt=e["__core-js_shared__"],Pt=Ft.toString,Rt=Tt.hasOwnProperty,$t=0,Mt=(n=/[^.]+$/.exec(jt&&jt.keys&&jt.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"",Lt=Tt.toString,Nt=Pt.call(Et),Dt=fe._,It=At("^"+Pt.call(Rt).replace(et,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Bt=pe?e.Buffer:i,qt=e.Symbol,Ut=e.Uint8Array,Ht=Bt?Bt.allocUnsafe:i,Wt=sn(Et.getPrototypeOf,Et),zt=Et.create,Vt=Tt.propertyIsEnumerable,Kt=Ot.splice,Yt=qt?qt.isConcatSpreadable:i,Gt=qt?qt.iterator:i,Zt=qt?qt.toStringTag:i,te=function(){try{var t=uo(Et,"defineProperty");return t({},"",{}),t}catch(t){}}(),se=e.clearTimeout!==fe.clearTimeout&&e.clearTimeout,ce=it&&it.now!==fe.Date.now&&it.now,le=e.setTimeout!==fe.setTimeout&&e.setTimeout,he=kt.ceil,de=kt.floor,ge=Et.getOwnPropertySymbols,ve=Bt?Bt.isBuffer:i,Le=e.isFinite,We=Ot.join,gn=sn(Et.keys,Et),vn=kt.max,yn=kt.min,mn=it.now,_n=e.parseInt,bn=kt.random,Cn=Ot.reverse,wn=uo(e,"DataView"),kn=uo(e,"Map"),En=uo(e,"Promise"),An=uo(e,"Set"),Sn=uo(e,"WeakMap"),xn=uo(Et,"create"),On=Sn&&new Sn,Fn={},Tn=No(wn),jn=No(kn),Pn=No(En),Rn=No(An),$n=No(Sn),Mn=qt?qt.prototype:i,Ln=Mn?Mn.valueOf:i,Nn=Mn?Mn.toString:i;function Dn(t){if(ta(t)&&!Hs(t)&&!(t instanceof Un)){if(t instanceof qn)return t;if(Rt.call(t,"__wrapped__"))return Do(t)}return new qn(t)}var In=function(){function t(){}return function(e){if(!Qs(e))return{};if(zt)return zt(e);t.prototype=e;var n=new t;return t.prototype=i,n}}();function Bn(){}function qn(t,e){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!e,this.__index__=0,this.__values__=i}function Un(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=d,this.__views__=[]}function Hn(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e=e?t:e)),t}function sr(t,e,n,r,o,s){var a,u=1&e,c=2&e,l=4&e;if(n&&(a=o?n(t,r,o,s):n(t)),a!==i)return a;if(!Qs(t))return t;var f=Hs(t);if(f){if(a=function(t){var e=t.length,n=new t.constructor(e);return e&&"string"==typeof t[0]&&Rt.call(t,"index")&&(n.index=t.index,n.input=t.input),n}(t),!u)return Si(t,a)}else{var h=fo(t),d=h==b||h==C;if(Ks(t))return bi(t,u);if(h==E||h==g||d&&!o){if(a=c||d?{}:po(t),!u)return c?function(t,e){return xi(t,lo(t),e)}(t,function(t,e){return t&&xi(e,ja(e),t)}(a,t)):function(t,e){return xi(t,co(t),e)}(t,nr(a,t))}else{if(!oe[h])return o?t:{};a=function(t,e,n){var r,i=t.constructor;switch(e){case j:return Ci(t);case y:case m:return new i(+t);case P:return function(t,e){var n=e?Ci(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}(t,n);case R:case $:case M:case L:case N:case D:case I:case B:case q:return wi(t,n);case w:return new i;case k:case O:return new i(t);case S:return function(t){var e=new t.constructor(t.source,ht.exec(t));return e.lastIndex=t.lastIndex,e}(t);case x:return new i;case F:return r=t,Ln?Et(Ln.call(r)):{}}}(t,h,u)}}s||(s=new Kn);var p=s.get(t);if(p)return p;s.set(t,a),oa(t)?t.forEach((function(r){a.add(sr(r,e,n,r,t,s))})):ea(t)&&t.forEach((function(r,i){a.set(i,sr(r,e,n,i,t,s))}));var v=f?i:(l?c?eo:to:c?ja:Ta)(t);return Ae(v||t,(function(r,i){v&&(r=t[i=r]),Qn(a,i,sr(r,e,n,i,t,s))})),a}function ar(t,e,n){var r=n.length;if(null==t)return!r;for(t=Et(t);r--;){var o=n[r],s=e[o],a=t[o];if(a===i&&!(o in t)||!s(a))return!1}return!0}function ur(t,e,n){if("function"!=typeof t)throw new xt(o);return Oo((function(){t.apply(i,n)}),e)}function cr(t,e,n,r){var i=-1,o=Fe,s=!0,a=t.length,u=[],c=e.length;if(!a)return u;n&&(e=je(e,Ge(n))),r?(o=Te,s=!1):e.length>=200&&(o=Xe,s=!1,e=new Vn(e));t:for(;++i-1},Wn.prototype.set=function(t,e){var n=this.__data__,r=tr(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this},zn.prototype.clear=function(){this.size=0,this.__data__={hash:new Hn,map:new(kn||Wn),string:new Hn}},zn.prototype.delete=function(t){var e=so(this,t).delete(t);return this.size-=e?1:0,e},zn.prototype.get=function(t){return so(this,t).get(t)},zn.prototype.has=function(t){return so(this,t).has(t)},zn.prototype.set=function(t,e){var n=so(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this},Vn.prototype.add=Vn.prototype.push=function(t){return this.__data__.set(t,s),this},Vn.prototype.has=function(t){return this.__data__.has(t)},Kn.prototype.clear=function(){this.__data__=new Wn,this.size=0},Kn.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},Kn.prototype.get=function(t){return this.__data__.get(t)},Kn.prototype.has=function(t){return this.__data__.has(t)},Kn.prototype.set=function(t,e){var n=this.__data__;if(n instanceof Wn){var r=n.__data__;if(!kn||r.length<199)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new zn(r)}return n.set(t,e),this.size=n.size,this};var lr=Ti(mr),fr=Ti(_r,!0);function hr(t,e){var n=!0;return lr(t,(function(t,r,i){return n=!!e(t,r,i)})),n}function dr(t,e,n){for(var r=-1,o=t.length;++r0&&n(a)?e>1?gr(a,e-1,n,r,i):Pe(i,a):r||(i[i.length]=a)}return i}var vr=ji(),yr=ji(!0);function mr(t,e){return t&&vr(t,e,Ta)}function _r(t,e){return t&&yr(t,e,Ta)}function br(t,e){return Oe(e,(function(e){return Js(t[e])}))}function Cr(t,e){for(var n=0,r=(e=vi(e,t)).length;null!=t&&ne}function Ar(t,e){return null!=t&&Rt.call(t,e)}function Sr(t,e){return null!=t&&e in Et(t)}function xr(t,e,n){for(var o=n?Te:Fe,s=t[0].length,a=t.length,u=a,c=r(a),l=1/0,f=[];u--;){var h=t[u];u&&e&&(h=je(h,Ge(e))),l=yn(h.length,l),c[u]=!n&&(e||s>=120&&h.length>=120)?new Vn(u&&h):i}h=t[0];var d=-1,p=c[0];t:for(;++d=a?u:u*("desc"==n[r]?-1:1)}return t.index-e.index}(t,e,n)}));r--;)t[r]=t[r].value;return t}(i)}function Ur(t,e,n){for(var r=-1,i=e.length,o={};++r-1;)a!==t&&Kt.call(a,u,1),Kt.call(t,u,1);return t}function Wr(t,e){for(var n=t?e.length:0,r=n-1;n--;){var i=e[n];if(n==r||i!==o){var o=i;vo(i)?Kt.call(t,i,1):ui(t,i)}}return t}function zr(t,e){return t+de(bn()*(e-t+1))}function Vr(t,e){var n="";if(!t||e<1||e>f)return n;do{e%2&&(n+=t),(e=de(e/2))&&(t+=t)}while(e);return n}function Kr(t,e){return Fo(Eo(t,e,nu),t+"")}function Yr(t){return Gn(Ia(t))}function Gr(t,e){var n=Ia(t);return Po(n,or(e,0,n.length))}function Jr(t,e,n,r){if(!Qs(t))return t;for(var o=-1,s=(e=vi(e,t)).length,a=s-1,u=t;null!=u&&++oo?0:o+e),(n=n>o?o:n)<0&&(n+=o),o=e>n?0:n-e>>>0,e>>>=0;for(var s=r(o);++i>>1,s=t[o];null!==s&&!aa(s)&&(n?s<=e:s=200){var c=e?null:Vi(t);if(c)return un(c);s=!1,i=Xe,u=new Vn}else u=e?[]:a;t:for(;++r=r?t:ti(t,e,n)}var _i=se||function(t){return fe.clearTimeout(t)};function bi(t,e){if(e)return t.slice();var n=t.length,r=Ht?Ht(n):new t.constructor(n);return t.copy(r),r}function Ci(t){var e=new t.constructor(t.byteLength);return new Ut(e).set(new Ut(t)),e}function wi(t,e){var n=e?Ci(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}function ki(t,e){if(t!==e){var n=t!==i,r=null===t,o=t==t,s=aa(t),a=e!==i,u=null===e,c=e==e,l=aa(e);if(!u&&!l&&!s&&t>e||s&&a&&c&&!u&&!l||r&&a&&c||!n&&c||!o)return 1;if(!r&&!s&&!l&&t1?n[o-1]:i,a=o>2?n[2]:i;for(s=t.length>3&&"function"==typeof s?(o--,s):i,a&&yo(n[0],n[1],a)&&(s=o<3?i:s,o=1),e=Et(e);++r-1?o[s?e[a]:a]:i}}function Li(t){return Qi((function(e){var n=e.length,r=n,s=qn.prototype.thru;for(t&&e.reverse();r--;){var a=e[r];if("function"!=typeof a)throw new xt(o);if(s&&!u&&"wrapper"==ro(a))var u=new qn([],!0)}for(r=u?r:n;++r1&&b.reverse(),d&&f<_&&(b.length=f),this&&this!==fe&&this instanceof c&&(S=m||$i(S)),S.apply(A,b)}}function Di(t,e){return function(n,r){return function(t,e,n,r){return mr(t,(function(t,i,o){e(r,n(t),i,o)})),r}(n,t,e(r),{})}}function Ii(t,e){return function(n,r){var o;if(n===i&&r===i)return e;if(n!==i&&(o=n),r!==i){if(o===i)return r;"string"==typeof n||"string"==typeof r?(n=si(n),r=si(r)):(n=oi(n),r=oi(r)),o=t(n,r)}return o}}function Bi(t){return Qi((function(e){return e=je(e,Ge(oo())),Kr((function(n){var r=this;return t(e,(function(t){return ke(t,r,n)}))}))}))}function qi(t,e){var n=(e=e===i?" ":si(e)).length;if(n<2)return n?Vr(e,t):e;var r=Vr(e,he(t/ln(e)));return rn(e)?mi(fn(r),0,t).join(""):r.slice(0,t)}function Ui(t){return function(e,n,o){return o&&"number"!=typeof o&&yo(e,n,o)&&(n=o=i),e=ha(e),n===i?(n=e,e=0):n=ha(n),function(t,e,n,i){for(var o=-1,s=vn(he((e-t)/(n||1)),0),a=r(s);s--;)a[i?s:++o]=t,t+=n;return a}(e,n,o=o===i?eu))return!1;var l=s.get(t),f=s.get(e);if(l&&f)return l==e&&f==t;var h=-1,d=!0,p=2&n?new Vn:i;for(s.set(t,e),s.set(e,t);++h-1&&t%1==0&&t1?"& ":"")+e[r],e=e.join(n>2?", ":" "),t.replace(ot,"{\n/* [wrapped with "+e+"] */\n")}(r,function(t,e){return Ae(p,(function(n){var r="_."+n[0];e&n[1]&&!Fe(t,r)&&t.push(r)})),t.sort()}(function(t){var e=t.match(st);return e?e[1].split(at):[]}(r),n)))}function jo(t){var e=0,n=0;return function(){var r=mn(),o=16-(r-n);if(n=r,o>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(i,arguments)}}function Po(t,e){var n=-1,r=t.length,o=r-1;for(e=e===i?r:e;++n1?t[e-1]:i;return n="function"==typeof n?(t.pop(),n):i,is(t,n)}));function fs(t){var e=Dn(t);return e.__chain__=!0,e}function hs(t,e){return e(t)}var ds=Qi((function(t){var e=t.length,n=e?t[0]:0,r=this.__wrapped__,o=function(e){return ir(e,t)};return!(e>1||this.__actions__.length)&&r instanceof Un&&vo(n)?((r=r.slice(n,+n+(e?1:0))).__actions__.push({func:hs,args:[o],thisArg:i}),new qn(r,this.__chain__).thru((function(t){return e&&!t.length&&t.push(i),t}))):this.thru(o)})),ps=Oi((function(t,e,n){Rt.call(t,n)?++t[n]:rr(t,n,1)})),gs=Mi(Uo),vs=Mi(Ho);function ys(t,e){return(Hs(t)?Ae:lr)(t,oo(e,3))}function ms(t,e){return(Hs(t)?Se:fr)(t,oo(e,3))}var _s=Oi((function(t,e,n){Rt.call(t,n)?t[n].push(e):rr(t,n,[e])})),bs=Kr((function(t,e,n){var i=-1,o="function"==typeof e,s=zs(t)?r(t.length):[];return lr(t,(function(t){s[++i]=o?ke(e,t,n):Or(t,e,n)})),s})),Cs=Oi((function(t,e,n){rr(t,n,e)}));function ws(t,e){return(Hs(t)?je:Lr)(t,oo(e,3))}var ks=Oi((function(t,e,n){t[n?0:1].push(e)}),(function(){return[[],[]]})),Es=Kr((function(t,e){if(null==t)return[];var n=e.length;return n>1&&yo(t,e[0],e[1])?e=[]:n>2&&yo(e[0],e[1],e[2])&&(e=[e[0]]),qr(t,gr(e,1),[])})),As=ce||function(){return fe.Date.now()};function Ss(t,e,n){return e=n?i:e,e=t&&null==e?t.length:e,Yi(t,c,i,i,i,i,e)}function xs(t,e){var n;if("function"!=typeof e)throw new xt(o);return t=da(t),function(){return--t>0&&(n=e.apply(this,arguments)),t<=1&&(e=i),n}}var Os=Kr((function(t,e,n){var r=1;if(n.length){var i=an(n,io(Os));r|=u}return Yi(t,r,e,n,i)})),Fs=Kr((function(t,e,n){var r=3;if(n.length){var i=an(n,io(Fs));r|=u}return Yi(e,r,t,n,i)}));function Ts(t,e,n){var r,s,a,u,c,l,f=0,h=!1,d=!1,p=!0;if("function"!=typeof t)throw new xt(o);function g(e){var n=r,o=s;return r=s=i,f=e,u=t.apply(o,n)}function v(t){var n=t-l;return l===i||n>=e||n<0||d&&t-f>=a}function y(){var t=As();if(v(t))return m(t);c=Oo(y,function(t){var n=e-(t-l);return d?yn(n,a-(t-f)):n}(t))}function m(t){return c=i,p&&r?g(t):(r=s=i,u)}function _(){var t=As(),n=v(t);if(r=arguments,s=this,l=t,n){if(c===i)return function(t){return f=t,c=Oo(y,e),h?g(t):u}(l);if(d)return _i(c),c=Oo(y,e),g(l)}return c===i&&(c=Oo(y,e)),u}return e=ga(e)||0,Qs(n)&&(h=!!n.leading,a=(d="maxWait"in n)?vn(ga(n.maxWait)||0,e):a,p="trailing"in n?!!n.trailing:p),_.cancel=function(){c!==i&&_i(c),f=0,r=l=s=c=i},_.flush=function(){return c===i?u:m(As())},_}var js=Kr((function(t,e){return ur(t,1,e)})),Ps=Kr((function(t,e,n){return ur(t,ga(e)||0,n)}));function Rs(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new xt(o);var n=function(){var r=arguments,i=e?e.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var s=t.apply(this,r);return n.cache=o.set(i,s)||o,s};return n.cache=new(Rs.Cache||zn),n}function $s(t){if("function"!=typeof t)throw new xt(o);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)}}Rs.Cache=zn;var Ms=yi((function(t,e){var n=(e=1==e.length&&Hs(e[0])?je(e[0],Ge(oo())):je(gr(e,1),Ge(oo()))).length;return Kr((function(r){for(var i=-1,o=yn(r.length,n);++i=e})),Us=Fr(function(){return arguments}())?Fr:function(t){return ta(t)&&Rt.call(t,"callee")&&!Vt.call(t,"callee")},Hs=r.isArray,Ws=ye?Ge(ye):function(t){return ta(t)&&kr(t)==j};function zs(t){return null!=t&&Zs(t.length)&&!Js(t)}function Vs(t){return ta(t)&&zs(t)}var Ks=ve||gu,Ys=me?Ge(me):function(t){return ta(t)&&kr(t)==m};function Gs(t){if(!ta(t))return!1;var e=kr(t);return e==_||"[object DOMException]"==e||"string"==typeof t.message&&"string"==typeof t.name&&!ra(t)}function Js(t){if(!Qs(t))return!1;var e=kr(t);return e==b||e==C||"[object AsyncFunction]"==e||"[object Proxy]"==e}function Xs(t){return"number"==typeof t&&t==da(t)}function Zs(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=f}function Qs(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function ta(t){return null!=t&&"object"==typeof t}var ea=_e?Ge(_e):function(t){return ta(t)&&fo(t)==w};function na(t){return"number"==typeof t||ta(t)&&kr(t)==k}function ra(t){if(!ta(t)||kr(t)!=E)return!1;var e=Wt(t);if(null===e)return!0;var n=Rt.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&Pt.call(n)==Nt}var ia=be?Ge(be):function(t){return ta(t)&&kr(t)==S},oa=Ce?Ge(Ce):function(t){return ta(t)&&fo(t)==x};function sa(t){return"string"==typeof t||!Hs(t)&&ta(t)&&kr(t)==O}function aa(t){return"symbol"==typeof t||ta(t)&&kr(t)==F}var ua=we?Ge(we):function(t){return ta(t)&&Zs(t.length)&&!!ie[kr(t)]},ca=Hi(Mr),la=Hi((function(t,e){return t<=e}));function fa(t){if(!t)return[];if(zs(t))return sa(t)?fn(t):Si(t);if(Gt&&t[Gt])return function(t){for(var e,n=[];!(e=t.next()).done;)n.push(e.value);return n}(t[Gt]());var e=fo(t);return(e==w?on:e==x?un:Ia)(t)}function ha(t){return t?(t=ga(t))===l||t===-1/0?17976931348623157e292*(t<0?-1:1):t==t?t:0:0===t?t:0}function da(t){var e=ha(t),n=e%1;return e==e?n?e-n:e:0}function pa(t){return t?or(da(t),0,d):0}function ga(t){if("number"==typeof t)return t;if(aa(t))return h;if(Qs(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=Qs(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=Ye(t);var n=pt.test(t);return n||vt.test(t)?ue(t.slice(2),n?2:8):dt.test(t)?h:+t}function va(t){return xi(t,ja(t))}function ya(t){return null==t?"":si(t)}var ma=Fi((function(t,e){if(Co(e)||zs(e))xi(e,Ta(e),t);else for(var n in e)Rt.call(e,n)&&Qn(t,n,e[n])})),_a=Fi((function(t,e){xi(e,ja(e),t)})),ba=Fi((function(t,e,n,r){xi(e,ja(e),t,r)})),Ca=Fi((function(t,e,n,r){xi(e,Ta(e),t,r)})),wa=Qi(ir),ka=Kr((function(t,e){t=Et(t);var n=-1,r=e.length,o=r>2?e[2]:i;for(o&&yo(e[0],e[1],o)&&(r=1);++n1),e})),xi(t,eo(t),n),r&&(n=sr(n,7,Xi));for(var i=e.length;i--;)ui(n,e[i]);return n})),Ma=Qi((function(t,e){return null==t?{}:function(t,e){return Ur(t,e,(function(e,n){return Sa(t,n)}))}(t,e)}));function La(t,e){if(null==t)return{};var n=je(eo(t),(function(t){return[t]}));return e=oo(e),Ur(t,n,(function(t,n){return e(t,n[0])}))}var Na=Ki(Ta),Da=Ki(ja);function Ia(t){return null==t?[]:Je(t,Ta(t))}var Ba=Ri((function(t,e,n){return e=e.toLowerCase(),t+(n?qa(e):e)}));function qa(t){return Ga(ya(t).toLowerCase())}function Ua(t){return(t=ya(t))&&t.replace(mt,tn).replace(Xt,"")}var Ha=Ri((function(t,e,n){return t+(n?"-":"")+e.toLowerCase()})),Wa=Ri((function(t,e,n){return t+(n?" ":"")+e.toLowerCase()})),za=Pi("toLowerCase"),Va=Ri((function(t,e,n){return t+(n?"_":"")+e.toLowerCase()})),Ka=Ri((function(t,e,n){return t+(n?" ":"")+Ga(e)})),Ya=Ri((function(t,e,n){return t+(n?" ":"")+e.toUpperCase()})),Ga=Pi("toUpperCase");function Ja(t,e,n){return t=ya(t),(e=n?i:e)===i?function(t){return ee.test(t)}(t)?function(t){return t.match(Qt)||[]}(t):function(t){return t.match(ut)||[]}(t):t.match(e)||[]}var Xa=Kr((function(t,e){try{return ke(t,i,e)}catch(t){return Gs(t)?t:new Ct(t)}})),Za=Qi((function(t,e){return Ae(e,(function(e){e=Lo(e),rr(t,e,Os(t[e],t))})),t}));function Qa(t){return function(){return t}}var tu=Li(),eu=Li(!0);function nu(t){return t}function ru(t){return Rr("function"==typeof t?t:sr(t,1))}var iu=Kr((function(t,e){return function(n){return Or(n,t,e)}})),ou=Kr((function(t,e){return function(n){return Or(t,n,e)}}));function su(t,e,n){var r=Ta(e),i=br(e,r);null!=n||Qs(e)&&(i.length||!r.length)||(n=e,e=t,t=this,i=br(e,Ta(e)));var o=!(Qs(n)&&"chain"in n&&!n.chain),s=Js(t);return Ae(i,(function(n){var r=e[n];t[n]=r,s&&(t.prototype[n]=function(){var e=this.__chain__;if(o||e){var n=t(this.__wrapped__);return(n.__actions__=Si(this.__actions__)).push({func:r,args:arguments,thisArg:t}),n.__chain__=e,n}return r.apply(t,Pe([this.value()],arguments))})})),t}function au(){}var uu=Bi(je),cu=Bi(xe),lu=Bi(Me);function fu(t){return mo(t)?He(Lo(t)):function(t){return function(e){return Cr(e,t)}}(t)}var hu=Ui(),du=Ui(!0);function pu(){return[]}function gu(){return!1}var vu,yu=Ii((function(t,e){return t+e}),0),mu=zi("ceil"),_u=Ii((function(t,e){return t/e}),1),bu=zi("floor"),Cu=Ii((function(t,e){return t*e}),1),wu=zi("round"),ku=Ii((function(t,e){return t-e}),0);return Dn.after=function(t,e){if("function"!=typeof e)throw new xt(o);return t=da(t),function(){if(--t<1)return e.apply(this,arguments)}},Dn.ary=Ss,Dn.assign=ma,Dn.assignIn=_a,Dn.assignInWith=ba,Dn.assignWith=Ca,Dn.at=wa,Dn.before=xs,Dn.bind=Os,Dn.bindAll=Za,Dn.bindKey=Fs,Dn.castArray=function(){if(!arguments.length)return[];var t=arguments[0];return Hs(t)?t:[t]},Dn.chain=fs,Dn.chunk=function(t,e,n){e=(n?yo(t,e,n):e===i)?1:vn(da(e),0);var o=null==t?0:t.length;if(!o||e<1)return[];for(var s=0,a=0,u=r(he(o/e));so?0:o+n),(r=r===i||r>o?o:da(r))<0&&(r+=o),r=n>r?0:pa(r);n>>0)?(t=ya(t))&&("string"==typeof e||null!=e&&!ia(e))&&!(e=si(e))&&rn(t)?mi(fn(t),0,n):t.split(e,n):[]},Dn.spread=function(t,e){if("function"!=typeof t)throw new xt(o);return e=null==e?0:vn(da(e),0),Kr((function(n){var r=n[e],i=mi(n,0,e);return r&&Pe(i,r),ke(t,this,i)}))},Dn.tail=function(t){var e=null==t?0:t.length;return e?ti(t,1,e):[]},Dn.take=function(t,e,n){return t&&t.length?ti(t,0,(e=n||e===i?1:da(e))<0?0:e):[]},Dn.takeRight=function(t,e,n){var r=null==t?0:t.length;return r?ti(t,(e=r-(e=n||e===i?1:da(e)))<0?0:e,r):[]},Dn.takeRightWhile=function(t,e){return t&&t.length?li(t,oo(e,3),!1,!0):[]},Dn.takeWhile=function(t,e){return t&&t.length?li(t,oo(e,3)):[]},Dn.tap=function(t,e){return e(t),t},Dn.throttle=function(t,e,n){var r=!0,i=!0;if("function"!=typeof t)throw new xt(o);return Qs(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),Ts(t,e,{leading:r,maxWait:e,trailing:i})},Dn.thru=hs,Dn.toArray=fa,Dn.toPairs=Na,Dn.toPairsIn=Da,Dn.toPath=function(t){return Hs(t)?je(t,Lo):aa(t)?[t]:Si(Mo(ya(t)))},Dn.toPlainObject=va,Dn.transform=function(t,e,n){var r=Hs(t),i=r||Ks(t)||ua(t);if(e=oo(e,4),null==n){var o=t&&t.constructor;n=i?r?new o:[]:Qs(t)&&Js(o)?In(Wt(t)):{}}return(i?Ae:mr)(t,(function(t,r,i){return e(n,t,r,i)})),n},Dn.unary=function(t){return Ss(t,1)},Dn.union=ts,Dn.unionBy=es,Dn.unionWith=ns,Dn.uniq=function(t){return t&&t.length?ai(t):[]},Dn.uniqBy=function(t,e){return t&&t.length?ai(t,oo(e,2)):[]},Dn.uniqWith=function(t,e){return e="function"==typeof e?e:i,t&&t.length?ai(t,i,e):[]},Dn.unset=function(t,e){return null==t||ui(t,e)},Dn.unzip=rs,Dn.unzipWith=is,Dn.update=function(t,e,n){return null==t?t:ci(t,e,gi(n))},Dn.updateWith=function(t,e,n,r){return r="function"==typeof r?r:i,null==t?t:ci(t,e,gi(n),r)},Dn.values=Ia,Dn.valuesIn=function(t){return null==t?[]:Je(t,ja(t))},Dn.without=os,Dn.words=Ja,Dn.wrap=function(t,e){return Ls(gi(e),t)},Dn.xor=ss,Dn.xorBy=as,Dn.xorWith=us,Dn.zip=cs,Dn.zipObject=function(t,e){return di(t||[],e||[],Qn)},Dn.zipObjectDeep=function(t,e){return di(t||[],e||[],Jr)},Dn.zipWith=ls,Dn.entries=Na,Dn.entriesIn=Da,Dn.extend=_a,Dn.extendWith=ba,su(Dn,Dn),Dn.add=yu,Dn.attempt=Xa,Dn.camelCase=Ba,Dn.capitalize=qa,Dn.ceil=mu,Dn.clamp=function(t,e,n){return n===i&&(n=e,e=i),n!==i&&(n=(n=ga(n))==n?n:0),e!==i&&(e=(e=ga(e))==e?e:0),or(ga(t),e,n)},Dn.clone=function(t){return sr(t,4)},Dn.cloneDeep=function(t){return sr(t,5)},Dn.cloneDeepWith=function(t,e){return sr(t,5,e="function"==typeof e?e:i)},Dn.cloneWith=function(t,e){return sr(t,4,e="function"==typeof e?e:i)},Dn.conformsTo=function(t,e){return null==e||ar(t,e,Ta(e))},Dn.deburr=Ua,Dn.defaultTo=function(t,e){return null==t||t!=t?e:t},Dn.divide=_u,Dn.endsWith=function(t,e,n){t=ya(t),e=si(e);var r=t.length,o=n=n===i?r:or(da(n),0,r);return(n-=e.length)>=0&&t.slice(n,o)==e},Dn.eq=Is,Dn.escape=function(t){return(t=ya(t))&&Y.test(t)?t.replace(V,en):t},Dn.escapeRegExp=function(t){return(t=ya(t))&&nt.test(t)?t.replace(et,"\\$&"):t},Dn.every=function(t,e,n){var r=Hs(t)?xe:hr;return n&&yo(t,e,n)&&(e=i),r(t,oo(e,3))},Dn.find=gs,Dn.findIndex=Uo,Dn.findKey=function(t,e){return Ne(t,oo(e,3),mr)},Dn.findLast=vs,Dn.findLastIndex=Ho,Dn.findLastKey=function(t,e){return Ne(t,oo(e,3),_r)},Dn.floor=bu,Dn.forEach=ys,Dn.forEachRight=ms,Dn.forIn=function(t,e){return null==t?t:vr(t,oo(e,3),ja)},Dn.forInRight=function(t,e){return null==t?t:yr(t,oo(e,3),ja)},Dn.forOwn=function(t,e){return t&&mr(t,oo(e,3))},Dn.forOwnRight=function(t,e){return t&&_r(t,oo(e,3))},Dn.get=Aa,Dn.gt=Bs,Dn.gte=qs,Dn.has=function(t,e){return null!=t&&ho(t,e,Ar)},Dn.hasIn=Sa,Dn.head=zo,Dn.identity=nu,Dn.includes=function(t,e,n,r){t=zs(t)?t:Ia(t),n=n&&!r?da(n):0;var i=t.length;return n<0&&(n=vn(i+n,0)),sa(t)?n<=i&&t.indexOf(e,n)>-1:!!i&&Ie(t,e,n)>-1},Dn.indexOf=function(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=null==n?0:da(n);return i<0&&(i=vn(r+i,0)),Ie(t,e,i)},Dn.inRange=function(t,e,n){return e=ha(e),n===i?(n=e,e=0):n=ha(n),function(t,e,n){return t>=yn(e,n)&&t=-9007199254740991&&t<=f},Dn.isSet=oa,Dn.isString=sa,Dn.isSymbol=aa,Dn.isTypedArray=ua,Dn.isUndefined=function(t){return t===i},Dn.isWeakMap=function(t){return ta(t)&&fo(t)==T},Dn.isWeakSet=function(t){return ta(t)&&"[object WeakSet]"==kr(t)},Dn.join=function(t,e){return null==t?"":We.call(t,e)},Dn.kebabCase=Ha,Dn.last=Go,Dn.lastIndexOf=function(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var o=r;return n!==i&&(o=(o=da(n))<0?vn(r+o,0):yn(o,r-1)),e==e?function(t,e,n){for(var r=n+1;r--;)if(t[r]===e)return r;return r}(t,e,o):De(t,qe,o,!0)},Dn.lowerCase=Wa,Dn.lowerFirst=za,Dn.lt=ca,Dn.lte=la,Dn.max=function(t){return t&&t.length?dr(t,nu,Er):i},Dn.maxBy=function(t,e){return t&&t.length?dr(t,oo(e,2),Er):i},Dn.mean=function(t){return Ue(t,nu)},Dn.meanBy=function(t,e){return Ue(t,oo(e,2))},Dn.min=function(t){return t&&t.length?dr(t,nu,Mr):i},Dn.minBy=function(t,e){return t&&t.length?dr(t,oo(e,2),Mr):i},Dn.stubArray=pu,Dn.stubFalse=gu,Dn.stubObject=function(){return{}},Dn.stubString=function(){return""},Dn.stubTrue=function(){return!0},Dn.multiply=Cu,Dn.nth=function(t,e){return t&&t.length?Br(t,da(e)):i},Dn.noConflict=function(){return fe._===this&&(fe._=Dt),this},Dn.noop=au,Dn.now=As,Dn.pad=function(t,e,n){t=ya(t);var r=(e=da(e))?ln(t):0;if(!e||r>=e)return t;var i=(e-r)/2;return qi(de(i),n)+t+qi(he(i),n)},Dn.padEnd=function(t,e,n){t=ya(t);var r=(e=da(e))?ln(t):0;return e&&re){var r=t;t=e,e=r}if(n||t%1||e%1){var o=bn();return yn(t+o*(e-t+ae("1e-"+((o+"").length-1))),e)}return zr(t,e)},Dn.reduce=function(t,e,n){var r=Hs(t)?Re:ze,i=arguments.length<3;return r(t,oo(e,4),n,i,lr)},Dn.reduceRight=function(t,e,n){var r=Hs(t)?$e:ze,i=arguments.length<3;return r(t,oo(e,4),n,i,fr)},Dn.repeat=function(t,e,n){return e=(n?yo(t,e,n):e===i)?1:da(e),Vr(ya(t),e)},Dn.replace=function(){var t=arguments,e=ya(t[0]);return t.length<3?e:e.replace(t[1],t[2])},Dn.result=function(t,e,n){var r=-1,o=(e=vi(e,t)).length;for(o||(o=1,t=i);++rf)return[];var n=d,r=yn(t,d);e=oo(e),t-=d;for(var i=Ke(r,e);++n=s)return t;var u=n-ln(r);if(u<1)return r;var c=a?mi(a,0,u).join(""):t.slice(0,u);if(o===i)return c+r;if(a&&(u+=c.length-u),ia(o)){if(t.slice(u).search(o)){var l,f=c;for(o.global||(o=At(o.source,ya(ht.exec(o))+"g")),o.lastIndex=0;l=o.exec(f);)var h=l.index;c=c.slice(0,h===i?u:h)}}else if(t.indexOf(si(o),u)!=u){var d=c.lastIndexOf(o);d>-1&&(c=c.slice(0,d))}return c+r},Dn.unescape=function(t){return(t=ya(t))&&K.test(t)?t.replace(z,dn):t},Dn.uniqueId=function(t){var e=++$t;return ya(t)+e},Dn.upperCase=Ya,Dn.upperFirst=Ga,Dn.each=ys,Dn.eachRight=ms,Dn.first=zo,su(Dn,(vu={},mr(Dn,(function(t,e){Rt.call(Dn.prototype,e)||(vu[e]=t)})),vu),{chain:!1}),Dn.VERSION="4.17.21",Ae(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(t){Dn[t].placeholder=Dn})),Ae(["drop","take"],(function(t,e){Un.prototype[t]=function(n){n=n===i?1:vn(da(n),0);var r=this.__filtered__&&!e?new Un(this):this.clone();return r.__filtered__?r.__takeCount__=yn(n,r.__takeCount__):r.__views__.push({size:yn(n,d),type:t+(r.__dir__<0?"Right":"")}),r},Un.prototype[t+"Right"]=function(e){return this.reverse()[t](e).reverse()}})),Ae(["filter","map","takeWhile"],(function(t,e){var n=e+1,r=1==n||3==n;Un.prototype[t]=function(t){var e=this.clone();return e.__iteratees__.push({iteratee:oo(t,3),type:n}),e.__filtered__=e.__filtered__||r,e}})),Ae(["head","last"],(function(t,e){var n="take"+(e?"Right":"");Un.prototype[t]=function(){return this[n](1).value()[0]}})),Ae(["initial","tail"],(function(t,e){var n="drop"+(e?"":"Right");Un.prototype[t]=function(){return this.__filtered__?new Un(this):this[n](1)}})),Un.prototype.compact=function(){return this.filter(nu)},Un.prototype.find=function(t){return this.filter(t).head()},Un.prototype.findLast=function(t){return this.reverse().find(t)},Un.prototype.invokeMap=Kr((function(t,e){return"function"==typeof t?new Un(this):this.map((function(n){return Or(n,t,e)}))})),Un.prototype.reject=function(t){return this.filter($s(oo(t)))},Un.prototype.slice=function(t,e){t=da(t);var n=this;return n.__filtered__&&(t>0||e<0)?new Un(n):(t<0?n=n.takeRight(-t):t&&(n=n.drop(t)),e!==i&&(n=(e=da(e))<0?n.dropRight(-e):n.take(e-t)),n)},Un.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},Un.prototype.toArray=function(){return this.take(d)},mr(Un.prototype,(function(t,e){var n=/^(?:filter|find|map|reject)|While$/.test(e),r=/^(?:head|last)$/.test(e),o=Dn[r?"take"+("last"==e?"Right":""):e],s=r||/^find/.test(e);o&&(Dn.prototype[e]=function(){var e=this.__wrapped__,a=r?[1]:arguments,u=e instanceof Un,c=a[0],l=u||Hs(e),f=function(t){var e=o.apply(Dn,Pe([t],a));return r&&h?e[0]:e};l&&n&&"function"==typeof c&&1!=c.length&&(u=l=!1);var h=this.__chain__,d=!!this.__actions__.length,p=s&&!h,g=u&&!d;if(!s&&l){e=g?e:new Un(this);var v=t.apply(e,a);return v.__actions__.push({func:hs,args:[f],thisArg:i}),new qn(v,h)}return p&&g?t.apply(this,a):(v=this.thru(f),p?r?v.value()[0]:v.value():v)})})),Ae(["pop","push","shift","sort","splice","unshift"],(function(t){var e=Ot[t],n=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",r=/^(?:pop|shift)$/.test(t);Dn.prototype[t]=function(){var t=arguments;if(r&&!this.__chain__){var i=this.value();return e.apply(Hs(i)?i:[],t)}return this[n]((function(n){return e.apply(Hs(n)?n:[],t)}))}})),mr(Un.prototype,(function(t,e){var n=Dn[e];if(n){var r=n.name+"";Rt.call(Fn,r)||(Fn[r]=[]),Fn[r].push({name:e,func:n})}})),Fn[Ni(i,2).name]=[{name:"wrapper",func:i}],Un.prototype.clone=function(){var t=new Un(this.__wrapped__);return t.__actions__=Si(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=Si(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=Si(this.__views__),t},Un.prototype.reverse=function(){if(this.__filtered__){var t=new Un(this);t.__dir__=-1,t.__filtered__=!0}else(t=this.clone()).__dir__*=-1;return t},Un.prototype.value=function(){var t=this.__wrapped__.value(),e=this.__dir__,n=Hs(t),r=e<0,i=n?t.length:0,o=function(t,e,n){for(var r=-1,i=n.length;++r=this.__values__.length;return{done:t,value:t?i:this.__values__[this.__index__++]}},Dn.prototype.plant=function(t){for(var e,n=this;n instanceof Bn;){var r=Do(n);r.__index__=0,r.__values__=i,e?o.__wrapped__=r:e=r;var o=r;n=n.__wrapped__}return o.__wrapped__=t,e},Dn.prototype.reverse=function(){var t=this.__wrapped__;if(t instanceof Un){var e=t;return this.__actions__.length&&(e=new Un(this)),(e=e.reverse()).__actions__.push({func:hs,args:[Qo],thisArg:i}),new qn(e,this.__chain__)}return this.thru(Qo)},Dn.prototype.toJSON=Dn.prototype.valueOf=Dn.prototype.value=function(){return fi(this.__wrapped__,this.__actions__)},Dn.prototype.first=Dn.prototype.head,Gt&&(Dn.prototype[Gt]=function(){return this}),Dn}();fe._=pn,(r=function(){return pn}.call(e,n,e,t))===i||(t.exports=r)}.call(this)},3669:(t,e,n)=>{e.formatArgs=function(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+t.exports.humanize(this.diff),!this.useColors)return;const n="color: "+this.color;e.splice(1,0,n,"color: inherit");let r=0,i=0;e[0].replace(/%[a-zA-Z%]/g,(t=>{"%%"!==t&&(r++,"%c"===t&&(i=r))})),e.splice(i,0,n)},e.save=function(t){try{t?e.storage.setItem("debug",t):e.storage.removeItem("debug")}catch(t){}},e.load=function(){let t;try{t=e.storage.getItem("debug")}catch(t){}return!t&&"undefined"!=typeof process&&"env"in process&&(t=process.env.DEBUG),t},e.useColors=function(){return!("undefined"==typeof window||!window.process||"renderer"!==window.process.type&&!window.process.__nwjs)||("undefined"==typeof navigator||!navigator.userAgent||!navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))&&("undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))},e.storage=function(){try{return localStorage}catch(t){}}(),e.destroy=(()=>{let t=!1;return()=>{t||(t=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),e.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],e.log=console.debug||console.log||(()=>{}),t.exports=n(9231)(e);const{formatters:r}=t.exports;r.j=function(t){try{return JSON.stringify(t)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}},9231:(t,e,n)=>{t.exports=function(t){function e(t){let n,i,o,s=null;function a(...t){if(!a.enabled)return;const r=a,i=Number(new Date),o=i-(n||i);r.diff=o,r.prev=n,r.curr=i,n=i,t[0]=e.coerce(t[0]),"string"!=typeof t[0]&&t.unshift("%O");let s=0;t[0]=t[0].replace(/%([a-zA-Z%])/g,((n,i)=>{if("%%"===n)return"%";s++;const o=e.formatters[i];if("function"==typeof o){const e=t[s];n=o.call(r,e),t.splice(s,1),s--}return n})),e.formatArgs.call(r,t),(r.log||e.log).apply(r,t)}return a.namespace=t,a.useColors=e.useColors(),a.color=e.selectColor(t),a.extend=r,a.destroy=e.destroy,Object.defineProperty(a,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==s?s:(i!==e.namespaces&&(i=e.namespaces,o=e.enabled(t)),o),set:t=>{s=t}}),"function"==typeof e.init&&e.init(a),a}function r(t,n){const r=e(this.namespace+(void 0===n?":":n)+t);return r.log=this.log,r}function i(t){return t.toString().substring(2,t.toString().length-2).replace(/\.\*\?$/,"*")}return e.debug=e,e.default=e,e.coerce=function(t){return t instanceof Error?t.stack||t.message:t},e.disable=function(){const t=[...e.names.map(i),...e.skips.map(i).map((t=>"-"+t))].join(",");return e.enable(""),t},e.enable=function(t){let n;e.save(t),e.namespaces=t,e.names=[],e.skips=[];const r=("string"==typeof t?t:"").split(/[\s,]+/),i=r.length;for(n=0;n{e[n]=t[n]})),e.names=[],e.skips=[],e.formatters={},e.selectColor=function(t){let n=0;for(let e=0;e{var e=1e3,n=60*e,r=60*n,i=24*r;function o(t,e,n,r){var i=e>=1.5*n;return Math.round(t/n)+" "+r+(i?"s":"")}t.exports=function(t,s){s=s||{};var a,u,c=typeof t;if("string"===c&&t.length>0)return function(t){if(!((t=String(t)).length>100)){var o=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(t);if(o){var s=parseFloat(o[1]);switch((o[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*s;case"weeks":case"week":case"w":return 6048e5*s;case"days":case"day":case"d":return s*i;case"hours":case"hour":case"hrs":case"hr":case"h":return s*r;case"minutes":case"minute":case"mins":case"min":case"m":return s*n;case"seconds":case"second":case"secs":case"sec":case"s":return s*e;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return s;default:return}}}}(t);if("number"===c&&isFinite(t))return s.long?(a=t,(u=Math.abs(a))>=i?o(a,u,i,"day"):u>=r?o(a,u,r,"hour"):u>=n?o(a,u,n,"minute"):u>=e?o(a,u,e,"second"):a+" ms"):function(t){var o=Math.abs(t);return o>=i?Math.round(t/i)+"d":o>=r?Math.round(t/r)+"h":o>=n?Math.round(t/n)+"m":o>=e?Math.round(t/e)+"s":t+"ms"}(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))}},1618:(t,e,n)=>{e.formatArgs=function(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+t.exports.humanize(this.diff),!this.useColors)return;const n="color: "+this.color;e.splice(1,0,n,"color: inherit");let r=0,i=0;e[0].replace(/%[a-zA-Z%]/g,(t=>{"%%"!==t&&(r++,"%c"===t&&(i=r))})),e.splice(i,0,n)},e.save=function(t){try{t?e.storage.setItem("debug",t):e.storage.removeItem("debug")}catch(t){}},e.load=function(){let t;try{t=e.storage.getItem("debug")}catch(t){}return!t&&"undefined"!=typeof process&&"env"in process&&(t=process.env.DEBUG),t},e.useColors=function(){return!("undefined"==typeof window||!window.process||"renderer"!==window.process.type&&!window.process.__nwjs)||("undefined"==typeof navigator||!navigator.userAgent||!navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))&&("undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))},e.storage=function(){try{return localStorage}catch(t){}}(),e.destroy=(()=>{let t=!1;return()=>{t||(t=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),e.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],e.log=console.debug||console.log||(()=>{}),t.exports=n(5224)(e);const{formatters:r}=t.exports;r.j=function(t){try{return JSON.stringify(t)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}},5224:(t,e,n)=>{t.exports=function(t){function e(t){let n,i,o,s=null;function a(...t){if(!a.enabled)return;const r=a,i=Number(new Date),o=i-(n||i);r.diff=o,r.prev=n,r.curr=i,n=i,t[0]=e.coerce(t[0]),"string"!=typeof t[0]&&t.unshift("%O");let s=0;t[0]=t[0].replace(/%([a-zA-Z%])/g,((n,i)=>{if("%%"===n)return"%";s++;const o=e.formatters[i];if("function"==typeof o){const e=t[s];n=o.call(r,e),t.splice(s,1),s--}return n})),e.formatArgs.call(r,t),(r.log||e.log).apply(r,t)}return a.namespace=t,a.useColors=e.useColors(),a.color=e.selectColor(t),a.extend=r,a.destroy=e.destroy,Object.defineProperty(a,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==s?s:(i!==e.namespaces&&(i=e.namespaces,o=e.enabled(t)),o),set:t=>{s=t}}),"function"==typeof e.init&&e.init(a),a}function r(t,n){const r=e(this.namespace+(void 0===n?":":n)+t);return r.log=this.log,r}function i(t){return t.toString().substring(2,t.toString().length-2).replace(/\.\*\?$/,"*")}return e.debug=e,e.default=e,e.coerce=function(t){return t instanceof Error?t.stack||t.message:t},e.disable=function(){const t=[...e.names.map(i),...e.skips.map(i).map((t=>"-"+t))].join(",");return e.enable(""),t},e.enable=function(t){let n;e.save(t),e.namespaces=t,e.names=[],e.skips=[];const r=("string"==typeof t?t:"").split(/[\s,]+/),i=r.length;for(n=0;n{e[n]=t[n]})),e.names=[],e.skips=[],e.formatters={},e.selectColor=function(t){let n=0;for(let e=0;e{var e=1e3,n=60*e,r=60*n,i=24*r;function o(t,e,n,r){var i=e>=1.5*n;return Math.round(t/n)+" "+r+(i?"s":"")}t.exports=function(t,s){s=s||{};var a,u,c=typeof t;if("string"===c&&t.length>0)return function(t){if(!((t=String(t)).length>100)){var o=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(t);if(o){var s=parseFloat(o[1]);switch((o[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*s;case"weeks":case"week":case"w":return 6048e5*s;case"days":case"day":case"d":return s*i;case"hours":case"hour":case"hrs":case"hr":case"h":return s*r;case"minutes":case"minute":case"mins":case"min":case"m":return s*n;case"seconds":case"second":case"secs":case"sec":case"s":return s*e;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return s;default:return}}}}(t);if("number"===c&&isFinite(t))return s.long?(a=t,(u=Math.abs(a))>=i?o(a,u,i,"day"):u>=r?o(a,u,r,"hour"):u>=n?o(a,u,n,"minute"):u>=e?o(a,u,e,"second"):a+" ms"):function(t){var o=Math.abs(t);return o>=i?Math.round(t/i)+"d":o>=r?Math.round(t/r)+"h":o>=n?Math.round(t/n)+"m":o>=e?Math.round(t/e)+"s":t+"ms"}(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))}},9336:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.configureChat=void 0;const i=r(n(3336));let o;function s(t){(0,i.default)("#chat-messages").html(t.map((t=>`
\n ${t.from}\n ${t.msg}\n
`)).join("\n")),(0,i.default)("#chat-messages").scrollTop((0,i.default)("#chat-messages")[0].scrollHeight)}function a(t){(0,i.default)("#chat-messages").append(`
\n ${t.from}\n ${t.msg}\n
`),(0,i.default)("#chat-messages").scrollTop((0,i.default)("#chat-messages")[0].scrollHeight)}e.configureChat=function(t){o=t,o.on("chathistory",s),o.on("chat",a),(0,i.default)("#chat-form").on("submit",(t=>{t.preventDefault(),t.stopPropagation();const e=(0,i.default)("#message").val().toString();e.length>0&&(o.emit("chat",e),(0,i.default)("#message").val(""))})),console.log("Chat Configured")}},3253:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CustomEventManager=void 0,e.CustomEventManager=class{constructor(){this.events={}}on(t,e){this.events[t]||(this.events[t]=[]),this.events[t].push(e)}emit(t,e=[]){this.events[t]&&this.events[t].forEach((t=>t.apply(null,e)))}}},5862:function(t,e){"use strict";var n=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,o){function s(t){try{u(r.next(t))}catch(t){o(t)}}function a(t){try{u(r.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}u((r=r.apply(t,e||[])).next())}))};function r(){return localStorage.getItem("authToken")}Object.defineProperty(e,"__esModule",{value:!0}),e.http=e.authToken=void 0,e.authToken=r,e.http={get:t=>n(void 0,void 0,void 0,(function*(){return(yield fetch(t,{headers:{"x-authtoken":r()}})).json()})),post:(t,e)=>n(void 0,void 0,void 0,(function*(){return(yield fetch(t,{method:"post",body:JSON.stringify(e),headers:{"x-authtoken":r(),"content-type":"application/json"}})).json()}))}},2174:function(t,e,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(e,n);i&&!("get"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,i)}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),i=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),o=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)"default"!==n&&Object.prototype.hasOwnProperty.call(t,n)&&r(e,t,n);return i(e,t),e},s=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,o){function s(t){try{u(r.next(t))}catch(t){o(t)}}function a(t){try{u(r.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}u((r=r.apply(t,e||[])).next())}))},a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const u=n(7046),c=a(n(3336)),l=n(4738),f=n(5862),h=n(3253),d=n(7429),p=n(6486),g=n(9502),v=n(9336),y=n(1916),m=o(n(7355)),_=new(n(8182).TimeManager),b=new Map,C=new h.CustomEventManager,w=(0,u.io)({extraHeaders:{"x-authtoken":(0,f.authToken)()}});function k(){const t=_.gradientName(),e=(0,c.default)("body");e.removeClass(Array.from(e[0].classList)).addClass(t),_.isNight()&&e.addClass("night")}function E(t){return``}function A(t,e,n,r=!0){let i=0;e>0&&(i=Math.floor(t/e*100));const o=r?`${i}% - `:"";return`
${o}${t}/${e}
`}function S(t,e,n,r){let i=0;e>0&&(i=Math.floor(t/e*100)),(0,c.default)(`#${n}`).css("background",`linear-gradient(to right, ${r}, ${r} ${i}%, transparent ${i}%, transparent)`).attr("title",`${i}% - ${t}/${e}`).html(`${t}/${e} - ${i}%`)}function x(){const t=b.get("player");(0,c.default)("#username").html(`${t.username}, level ${t.level} ${t.profession}`),S(t.hp,(0,l.maxHp)(t.constitution,t.level),"hp-bar","#ff7070"),S(t.exp,(0,l.expToLevel)(t.level+1),"exp-bar","#5997f9"),["strength","constitution","dexterity","intelligence","hp","exp"].forEach((e=>{(0,c.default)(`.${e}`).html(t[e])})),(0,c.default)(".maxHp").html((0,l.maxHp)(t.constitution,t.level).toString()),(0,c.default)(".expToLevel").html((0,l.expToLevel)(t.level+1).toString()),(0,c.default)(".gold").html(t.gold.toLocaleString()),"session"===t.account_type&&(0,c.default)("#signup-prompt").html('

Hey there! It looks like you\'re using a SESSION account. This allows you to play with away, but the account is tied to your current device, and will be lost if you ever clear your cookies.

\n

\n
\n \n \n
\n
\n \n \n
\n \n \n

').removeClass("hidden"),(0,c.default)("#extra-inventory-info").html(O())}function O(){const t=b.get("player");let e='';return l.StatDef.forEach((n=>{e+=`\n \n \n `})),e+=``,e+="
${n.display}\n ${t[n.id]}\n ${t.stat_points?function(t){return``}(n):""}\n
Stat Points${t.stat_points}
",e}function F(t){return t.map((t=>function(t,e){return`
\n
\n \n
\n
\n
${t.name}
\n
\n ${t.requirements.level?T("LVL",t.requirements.level):""}\n ${t.requirements.strength?T("STR",t.requirements.strength):""}\n ${t.requirements.constitution?T("CON",t.requirements.constitution):""}\n ${t.requirements.dexterity?T("DEX",t.requirements.dexterity):""}\n ${t.requirements.intelligence?T("INT",t.requirements.intelligence):""}\n ${T("PRF",t.profession)}\n
\n
\n ${t.boosts.strength?j("STR",t.boosts.strength):""}\n ${t.boosts.constitution?j("CON",t.boosts.constitution):""}\n ${t.boosts.dexterity?j("DEX",t.boosts.dexterity):""}\n ${t.boosts.intelligence?j("INT",t.boosts.intelligence):""}\n ${t.boosts.damage?j("DMG",t.boosts.damage):""}\n ${t.boosts.damage_mitigation?j("MIT",t.boosts.damage_mitigation)+"%":""}\n ${["WEAPON","SPELL"].includes(t.type)?"":A(t.currentAp,t.maxAp,"#7be67b")}\n
\n ${t.hasOwnProperty("id")?`
${t.cost.toLocaleString()}G
`:""}\n
\n
\n ${(t=>t.is_equipped?``:"ANY_HAND"===t.equipment_slot?`\n `:"LEFT_HAND"===t.equipment_slot?``:"RIGHT_HAND"===t.equipment_slot?``:(t.equipment_slot,``))(t)}\n
\n
`}(t))).join("\n")}function T(t,e,n){let r="";return n&&(r=n>=e?"success":"error"),`${t}: ${e.toLocaleString()}`}function j(t,e){let n="";return"number"==typeof e&&(n=e>0?"+":"-"),`${t}: 0?"success":"error"}">${n}${e}`}function P(t){const e=Math.floor(t.hp/t.maxHp*100);return`
\n
\n
\n \n
\n
\n
${t.name}
\n
${e}% - ${t.hp} / ${t.maxHp}
\n
\n
\n
\n \n \n \n \n
\n
\n
`}(0,v.configureChat)(w),k(),setInterval(k,6e4),w.on("connect",(()=>{console.log(`Connected: ${w.id}`)})),w.on("ready",(()=>{console.log("Server connection verified"),w.emit("inventory")})),w.on("server-stats",(t=>{(0,c.default)("#server-stats").html(`${t.onlinePlayers} players online`)})),(0,p.each)(m,(t=>{console.log(`Binding Event ${t.eventName}`),t instanceof y.SocketEvent?w.on(t.eventName,t.handler.bind(null,{cache:b,socket:w,events:C})):console.log("Skipped binding",t)})),w.on("calc:ap",(t=>{var e,n,r,i,o,s,a,u;const{ap:l}=t,f=`\n
\n ${E("helm")}\n ${A((null===(e=l.HEAD)||void 0===e?void 0:e.currentAp)||0,(null===(n=l.HEAD)||void 0===n?void 0:n.maxAp)||0,"#7be67b")}\n
\n
\n ${E("arms")}\n ${A((null===(r=l.ARMS)||void 0===r?void 0:r.currentAp)||0,(null===(i=l.ARMS)||void 0===i?void 0:i.maxAp)||0,"#7be67b")}\n
\n
\n ${E("chest")}\n ${A((null===(o=l.CHEST)||void 0===o?void 0:o.currentAp)||0,(null===(s=l.CHEST)||void 0===s?void 0:s.maxAp)||0,"#7be67b")}\n
\n
\n ${E("legs")}\n ${A((null===(a=l.LEGS)||void 0===a?void 0:a.currentAp)||0,(null===(u=l.LEGS)||void 0===u?void 0:u.maxAp)||0,"#7be67b")}\n
\n `;(0,c.default)("#ap-bar").html(f)})),C.on("tab:skills",(()=>{(0,c.default)("#skills").html(""),w.emit("skills")})),w.on("skills",(t=>{let e=`\n ${t.skills.map((t=>{const e=g.Skills.get(t.id),n=t.exp/e.expToLevel(t.level+1);return`\n \n \n \n \n `})).join("\n")}\n
${t.level.toLocaleString()}\n ${(100*n).toPrecision(2)}% to next level\n ${e.display}\n

${e.description}

\n
`;(0,c.default)("#skills").html(e)})),C.on("alert",(t=>{let e=(0,d.v4)();(0,c.default)("#alerts").append(`
${t.text}
`),setTimeout((()=>{(0,c.default)(`#alert-${e}`).remove()}),3e3)})),w.on("alert",(t=>{C.emit("alert",[t])})),w.on("init",(t=>{(0,c.default)("#version").html(`v${t.version}`)})),w.on("authToken",(t=>{console.log(`recv auth token ${t}`),localStorage.setItem("authToken",t)})),w.on("player",(t=>{b.set("player",t),x()})),(0,c.default)("nav a").on("click",(t=>{t.preventDefault(),t.stopPropagation(),(0,c.default)(`#${(0,c.default)(t.target).data("container")}`).find(".tab").removeClass("active"),(0,c.default)(`#${(0,c.default)(t.target).data("section")}`).addClass("active"),"Settings"!==t.target.innerHTML&&((0,c.default)(t.target).closest("nav").find("a").removeClass("active"),(0,c.default)(t.target).addClass("active")),C.emit(`tab:${(0,c.default)(t.target).data("section")}`)})),C.on("tab:inventory",(()=>{w.emit("inventory")})),(0,c.default)("body").on("click","nav.filter",(t=>{t.preventDefault(),t.stopPropagation();const e=(0,c.default)(t.target),n=e.data("filter");(0,c.default)(".filter-result").removeClass("active").addClass("hidden"),(0,c.default)(`#filter_${n}`).addClass("active").removeClass("hidden"),e.closest("nav").find("a").removeClass("active"),e.addClass("active"),b.set("active-inventory-section",n)})),w.on("inventory",(t=>{b.get("player");const e=b.get("active-inventory-section")||"ARMOUR",n={ARMOUR:[],WEAPON:[],SPELL:[]};t.inventory.forEach((t=>{n[t.type].push(t)}));const r=`\n
\n
\n ${function(t){const e="https://via.placeholder.com/64x64",n=t.filter((t=>t.is_equipped)).reduce(((t,e)=>(t[e.equipment_slot]=e,t)),{});return`\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
\n \n ${n.HEAD?n.HEAD.name:"HEAD"}\n \n ${n.ARMS?n.ARMS.name:"ARMS"}\n
\n ${n.LEFT_HAND?n.LEFT_HAND.name:n.TWO_HANDED?n.TWO_HANDED.name:"L_HAND"}\n \n ${n.CHEST?n.CHEST.name:"CHEST"}\n \n ${n.RIGHT_HAND?n.RIGHT_HAND.name:n.TWO_HANDED?n.TWO_HANDED.name:"R_HAND"}\n
\n \n ${n.LEGS?n.LEGS.name:"LEGS"}\n \n
\n `}(t.inventory)}\n
\n ${O()}\n
\n
\n
\n \n
\n
\n ${F(n.ARMOUR)}\n
\n
\n ${F(n.WEAPON)}\n
\n
\n ${F(n.SPELL)}\n
\n
\n
\n
\n `;(0,c.default)("#inventory").html(r)})),(0,c.default)("body").on("click",".equip-item",(t=>{t.preventDefault(),t.stopPropagation();const e=(0,c.default)(t.target),n=e.data("id"),r=e.data("slot");w.emit("equip",{id:n,slot:r})})),(0,c.default)("body").on("click",".unequip-item",(t=>{t.preventDefault(),t.stopPropagation(),w.emit("unequip",{id:(0,c.default)(t.target).data("id")})})),C.on("renderMap",(function(t){return s(this,void 0,void 0,(function*(){if(!t||b.has("currentMapHTML"))return void(0,c.default)("#map").html(b.get("currentMapHTML"));t||console.error("oh no.. this got triggered without any city data"),(0,c.default)("#explore").css({"background-image":`linear-gradient(to left top, rgba(255,255,255,0) 0%,rgb(255,255,255) 100%), linear-gradient(to left, rgba(255, 255, 255, 0) 0%, rgb(255, 255, 255) 100%), url("/assets/img/map/${t.city.id}.jpeg")`});const e={SERVICES:[],STORES:[],EXPLORE:[]};t.locations.forEach((t=>{e[t.type].push(`${t.name}`)}));let n=`

${t.city.name}

\n
`;e.SERVICES.length&&(n+=`

Services

${e.SERVICES.join("
")}
`),e.STORES.length&&(n+=`

Stores

${e.STORES.join("
")}
`),e.EXPLORE.length&&(n+=`

Explore

${e.EXPLORE.join("
")}
`),n+=`\n
\n

Travel

\n ${t.paths.map((t=>`${t.ending_city_name}`)).join("
")}\n
\n
\n `,b.set("currentMapHTML",n),(0,c.default)("#map").html(n)}))})),w.on("city:stores",(t=>{let e=`
\n ${t.map((t=>function(t,e){const n=b.get("player");return`
\n
\n \n
\n
\n
${t.name}${"TWO_HANDED"===t.equipment_slot?" (2H)":""}
\n
\n ${t.requirements.level?T("LVL",t.requirements.level,n.level):""}\n ${t.requirements.strength?T("STR",t.requirements.strength,n.strength):""}\n ${t.requirements.constitution?T("CON",t.requirements.constitution,n.constitution):""}\n ${t.requirements.dexterity?T("DEX",t.requirements.dexterity,n.dexterity):""}\n ${t.requirements.intelligence?T("INT",t.requirements.intelligence,n.intelligence):""}\n ${T("PRF",t.profession)}\n
\n
\n ${t.boosts.strength?j("STR",t.boosts.strength):""}\n ${t.boosts.constitution?j("CON",t.boosts.constitution):""}\n ${t.boosts.dexterity?j("DEX",t.boosts.dexterity):""}\n ${t.boosts.intelligence?j("INT",t.boosts.intelligence):""}\n ${t.boosts.damage?j(t.affectedSkills.includes("restoration_magic")?"HP":"DMG",t.boosts.damage):""}\n ${t.boosts.damage_mitigation?j("MIT",t.boosts.damage_mitigation)+"%":""}\n ${["WEAPON","SPELL"].includes(t.type)?"":j("AP",t.maxAp)}\n
\n ${t.hasOwnProperty("id")?`
${t.cost.toLocaleString()}G
`:""}\n
\n
\n ${r=t,``}\n
\n
`;var r}(t))).join("\n")}\n
\n `;(0,c.default)("#map").html(e)})),(0,c.default)("body").on("click",".purchase-item",(t=>{t.preventDefault(),t.stopPropagation();const e=b.get("player"),n=parseInt((0,c.default)(t.target).data("cost")),r=(0,c.default)(t.target).data("id");e.gold{const e=(0,c.default)(t.target),n=e.data("event"),r=e.data("args");console.log(`Sending event ${n}`,{args:r}),w.emit(n,{args:r})})),(0,c.default)("body").on("click",".city-emit-event",(t=>{const e=(0,c.default)(t.target),n=e.data("event"),r=e.data("args");console.log(`Sending event ${n}`,{args:r}),w.emit(n,{args:r})})),w.on("explore:fights",(t=>{const e=b.get("last-selected-monster");if(t.length){let n=`
`;(0,c.default)("#map").html(n)}})),C.on("tab:explore",(()=>s(void 0,void 0,void 0,(function*(){const t=yield f.http.get("/fight");if(t)(0,c.default)("#map").html(P(t));else{let t;b.has("currentMapHTML")||(t=yield f.http.get(`/city/${b.get("player").city_id}`)),C.emit("renderMap",[t])}})))),w.on("updatePlayer",(t=>{b.set("player",t),x()})),w.on("fight-over",(t=>{const{roundData:e,monsters:n}=t;b.set("player",e.player),x(),(0,c.default)("#map").html(P(e.monster));let r=e.roundDetails.map((t=>`
${t}
`));if("player"===e.winner&&(r.push(`
You defeated the ${e.monster.name}!
`),e.rewards.gold&&r.push(`
You gained ${e.rewards.gold} gold`),e.rewards.exp&&r.push(`
You gained ${e.rewards.exp} exp`),e.rewards.levelIncrease&&r.push(`
You gained a level! ${e.player.level}`)),n.length){const t=b.get("last-selected-monster");r.unshift(`

Fight Again

\n
`)}(0,c.default)("#fight-results").html(r.join("\n")),(0,c.default)("#fight-actions").html("")})),w.on("fight-round",(t=>{(0,c.default)(".fight-action").prop("disabled",!1),b.set("player",t.player),x(),(0,c.default)("#map").html(P(t.monster)),(0,c.default)("#fight-results").html(t.roundDetails.map((t=>`
${t}
`)).join("\n"))})),(0,c.default)("body").on("submit","#fight-selector",(t=>s(void 0,void 0,void 0,(function*(){if(t.preventDefault(),t.stopPropagation(),b.get("player").hp<=0)return void C.emit("alert",[{type:"error",text:"You don't have enough HP to go looking for a fight"}]);const e=(0,c.default)("#monster-selector option:selected").val();b.set("last-selected-monster",e);try{const t=yield f.http.post("/fight",{monsterId:e});(0,c.default)("#map").html(P(t))}catch(t){C.emit("alert",[{type:"error",text:"Sorry, you can't start that fight"}])}})))),(0,c.default)("body").on("click",".fight-action",(t=>{t.preventDefault(),t.stopPropagation();const e=(0,c.default)(t.target).data("action"),n=(0,c.default)("#fight-target option:selected").val();(0,c.default)(".fight-action").prop("disabled",!0),w.emit("fight",{action:e,target:n})})),(0,c.default)("body").on("submit","#signup",(t=>s(void 0,void 0,void 0,(function*(){t.preventDefault(),t.stopPropagation();const e={};(0,c.default)(t.target).serializeArray().forEach((t=>e[t.name]=t.value));const n=yield f.http.post("/signup",e);n.error?C.emit("alert",[{type:"error",text:n.error}]):(b.set("player",n.player),x(),(0,c.default)("#signup-prompt").remove())})))),(0,c.default)("body").on("click","#login",(t=>s(void 0,void 0,void 0,(function*(){t.preventDefault(),t.stopPropagation();const e={};if((0,c.default)(t.target).closest("form").serializeArray().forEach((t=>e[t.name]=t.value)),e.username&&e.password){const t=yield f.http.post("/login",e);t.error?C.emit("alert",[{type:"error",text:t.error}]):(localStorage.setItem("authToken",t.player.id),window.location.reload())}})))),(0,c.default)("body").on("click","#logout",(t=>s(void 0,void 0,void 0,(function*(){t.preventDefault(),t.stopPropagation();let e=!1;const n=b.get("player");e=!/^Player[\d]+$/.test(n.username)||!!confirm("Are you sure? You will not be able to retrieve this character unless you set up an email/password"),e&&(w.emit("logout"),localStorage.clear(),window.location.reload())}))))},1916:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SocketEvent=void 0,e.SocketEvent=class{constructor(t,e){this.eventName=t,this.handler=e}}},7355:function(t,e,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(e,n);i&&!("get"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,i)}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),i=this&&this.__exportStar||function(t,e){for(var n in t)"default"===n||Object.prototype.hasOwnProperty.call(e,n)||r(e,t,n)};Object.defineProperty(e,"__esModule",{value:!0}),i(n(5127),e),i(n(6041),e),i(n(9261),e)},9261:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.displayHealerDetauls=void 0;const i=n(1916),o=r(n(3336));e.displayHealerDetauls=new i.SocketEvent("city:service:healer",((t,e)=>{(0,o.default)("#map").html(e.text)}))},5127:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.professionChangeRogue=e.professionChangeMage=e.professionChangeWarrior=e.professionRecruiter=void 0;const i=n(1916),o=r(n(3336)),s=n(9554);function a(t,e){(0,o.default)("#map").html(e.text)}e.professionRecruiter=new i.SocketEvent(s.EVENT_NAME,a),e.professionChangeWarrior=new i.SocketEvent(`${s.EVENT_NAME}:warrior`,a),e.professionChangeMage=new i.SocketEvent(`${s.EVENT_NAME}:mage`,a),e.professionChangeRogue=new i.SocketEvent(`${s.EVENT_NAME}:rogue`,a)},9554:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EVENT_NAME=void 0,e.EVENT_NAME="city:services:profession_recruitor_windcross"},6041:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.travel=void 0;const r=n(1916);e.travel=new r.SocketEvent("city:travel",((t,e)=>{t.cache.delete("currentMapHTML"),t.events.emit("renderMap",[e])}))},4738:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StatDef=e.expToLevel=e.maxHp=void 0;const r=n(1407);e.maxHp=function(t,e){return Math.ceil(1.3*(t+e))},e.expToLevel=function(t){return t<10?10*t-10:13*t},e.StatDef=new Map,e.StatDef.set(r.Stat.strength,{id:r.Stat.strength,display:"Strength",abbrv:"STR"}),e.StatDef.set(r.Stat.constitution,{id:r.Stat.constitution,display:"Constitution",abbrv:"CON"}),e.StatDef.set(r.Stat.dexterity,{id:r.Stat.dexterity,display:"Dexterity",abbrv:"DEX"}),e.StatDef.set(r.Stat.intelligence,{id:r.Stat.intelligence,display:"Intelligence",abbrv:"INT"})},9502:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Skills=void 0,e.Skills=new Map,e.Skills.set("bladed",{id:"bladed",display:"Bladed Weapon Mastery",description:"Improves Bladed Weapon damage",effect:t=>t.level/100,expToLevel:t=>1e3*t}),e.Skills.set("blunt",{id:"blunt",display:"Blunt Weapons Mastery",description:"Improves Blunt Weapon damage",effect:t=>t.level/100,expToLevel:t=>1e3*t}),e.Skills.set("destruction_magic",{id:"destruction_magic",display:"Destruction Magic Mastery",description:"Improves Destruction Magic damage",effect:t=>t.level/100,expToLevel:t=>1e3*t}),e.Skills.set("restoration_magic",{id:"restoration_magic",display:"Restoration Magic Mastery",description:"Improves effectiveness of Restoration Magic",effect:t=>t.level/100,expToLevel:t=>1e3*t}),e.Skills.set("one_handed_mastery",{id:"one_handed_mastery",display:"One Handed Weapon Mastery",description:"Improves effectiveness when fighting using one-handed weapons",effect:t=>t.level/100,expToLevel:t=>1e3*t}),e.Skills.set("two_handed_mastery",{id:"two_handed_mastery",display:"Two Handed Weapon Mastery",description:"Improves effectiveness when fighting using two-handed weapons",effect:t=>t.level/100,expToLevel:t=>1e3*t})},1407:(t,e)=>{"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0}),e.Stat=void 0,(n=e.Stat||(e.Stat={})).strength="strength",n.constitution="constitution",n.dexterity="dexterity",n.intelligence="intelligence"},8182:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TimeManager=void 0,e.TimeManager=class{constructor(t=60){this.dayLength=t,this.scaleFactor=30,this.dayLengthAsMS=60*t*1e3}dayScaleFactor(){return this.dayLength/30}getTimePeriod(){return this.isDawn()?"dawn":this.isMorning()?"morning":this.isAfternoon()?"afternoon":this.isEvening()?"evening":this.isNight()?"night":void 0}now(){return Math.floor((new Date).getMinutes()/this.dayScaleFactor())}gradientName(){const t=this.now();return`sky-gradient-${t<10?"0":""}${t}`}isNight(){const t=this.now();return t>=0&&t<=5||t>=26&&t<=29}isDawn(){const t=this.now();return t>=6&&t<=10}isMorning(){const t=this.now();return t>=11&&t<=15}isAfternoon(){const t=this.now();return t>=16&&t<=20}isEvening(){const t=this.now();return t>=21&&t<=25}}},7429:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"NIL",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(e,"parse",{enumerable:!0,get:function(){return f.default}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return l.default}}),Object.defineProperty(e,"v1",{enumerable:!0,get:function(){return r.default}}),Object.defineProperty(e,"v3",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(e,"v4",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(e,"v5",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(e,"validate",{enumerable:!0,get:function(){return c.default}}),Object.defineProperty(e,"version",{enumerable:!0,get:function(){return u.default}});var r=h(n(3990)),i=h(n(8237)),o=h(n(5355)),s=h(n(3764)),a=h(n(6314)),u=h(n(8464)),c=h(n(6435)),l=h(n(4008)),f=h(n(8222));function h(t){return t&&t.__esModule?t:{default:t}}},4163:(t,e)=>{"use strict";function n(t){return 14+(t+64>>>9<<4)+1}function r(t,e){const n=(65535&t)+(65535&e);return(t>>16)+(e>>16)+(n>>16)<<16|65535&n}function i(t,e,n,i,o,s){return r((a=r(r(e,t),r(i,s)))<<(u=o)|a>>>32-u,n);var a,u}function o(t,e,n,r,o,s,a){return i(e&n|~e&r,t,e,o,s,a)}function s(t,e,n,r,o,s,a){return i(e&r|n&~r,t,e,o,s,a)}function a(t,e,n,r,o,s,a){return i(e^n^r,t,e,o,s,a)}function u(t,e,n,r,o,s,a){return i(n^(e|~r),t,e,o,s,a)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;e.default=function(t){if("string"==typeof t){const e=unescape(encodeURIComponent(t));t=new Uint8Array(e.length);for(let n=0;n>5]>>>i%32&255,o=parseInt(r.charAt(n>>>4&15)+r.charAt(15&n),16);e.push(o)}return e}(function(t,e){t[e>>5]|=128<>5]|=(255&t[n/8])<{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};e.default=n},6314:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default="00000000-0000-0000-0000-000000000000"},8222:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r,i=(r=n(6435))&&r.__esModule?r:{default:r};e.default=function(t){if(!(0,i.default)(t))throw TypeError("Invalid UUID");let e;const n=new Uint8Array(16);return n[0]=(e=parseInt(t.slice(0,8),16))>>>24,n[1]=e>>>16&255,n[2]=e>>>8&255,n[3]=255&e,n[4]=(e=parseInt(t.slice(9,13),16))>>>8,n[5]=255&e,n[6]=(e=parseInt(t.slice(14,18),16))>>>8,n[7]=255&e,n[8]=(e=parseInt(t.slice(19,23),16))>>>8,n[9]=255&e,n[10]=(e=parseInt(t.slice(24,36),16))/1099511627776&255,n[11]=e/4294967296&255,n[12]=e>>>24&255,n[13]=e>>>16&255,n[14]=e>>>8&255,n[15]=255&e,n}},58:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.default=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i},3319:(t,e)=>{"use strict";let n;Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(){if(!n&&(n="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!n))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return n(r)};const r=new Uint8Array(16)},3757:(t,e)=>{"use strict";function n(t,e,n,r){switch(t){case 0:return e&n^~e&r;case 1:case 3:return e^n^r;case 2:return e&n^e&r^n&r}}function r(t,e){return t<>>32-e}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;e.default=function(t){const e=[1518500249,1859775393,2400959708,3395469782],i=[1732584193,4023233417,2562383102,271733878,3285377520];if("string"==typeof t){const e=unescape(encodeURIComponent(t));t=[];for(let n=0;n>>0;f=l,l=c,c=r(u,30)>>>0,u=s,s=a}i[0]=i[0]+s>>>0,i[1]=i[1]+u>>>0,i[2]=i[2]+c>>>0,i[3]=i[3]+l>>>0,i[4]=i[4]+f>>>0}return[i[0]>>24&255,i[0]>>16&255,i[0]>>8&255,255&i[0],i[1]>>24&255,i[1]>>16&255,i[1]>>8&255,255&i[1],i[2]>>24&255,i[2]>>16&255,i[2]>>8&255,255&i[2],i[3]>>24&255,i[3]>>16&255,i[3]>>8&255,255&i[3],i[4]>>24&255,i[4]>>16&255,i[4]>>8&255,255&i[4]]}},4008:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,e.unsafeStringify=s;var r,i=(r=n(6435))&&r.__esModule?r:{default:r};const o=[];for(let t=0;t<256;++t)o.push((t+256).toString(16).slice(1));function s(t,e=0){return(o[t[e+0]]+o[t[e+1]]+o[t[e+2]]+o[t[e+3]]+"-"+o[t[e+4]]+o[t[e+5]]+"-"+o[t[e+6]]+o[t[e+7]]+"-"+o[t[e+8]]+o[t[e+9]]+"-"+o[t[e+10]]+o[t[e+11]]+o[t[e+12]]+o[t[e+13]]+o[t[e+14]]+o[t[e+15]]).toLowerCase()}e.default=function(t,e=0){const n=s(t,e);if(!(0,i.default)(n))throw TypeError("Stringified UUID is invalid");return n}},3990:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r,i=(r=n(3319))&&r.__esModule?r:{default:r},o=n(4008);let s,a,u=0,c=0;e.default=function(t,e,n){let r=e&&n||0;const l=e||new Array(16);let f=(t=t||{}).node||s,h=void 0!==t.clockseq?t.clockseq:a;if(null==f||null==h){const e=t.random||(t.rng||i.default)();null==f&&(f=s=[1|e[0],e[1],e[2],e[3],e[4],e[5]]),null==h&&(h=a=16383&(e[6]<<8|e[7]))}let d=void 0!==t.msecs?t.msecs:Date.now(),p=void 0!==t.nsecs?t.nsecs:c+1;const g=d-u+(p-c)/1e4;if(g<0&&void 0===t.clockseq&&(h=h+1&16383),(g<0||d>u)&&void 0===t.nsecs&&(p=0),p>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");u=d,c=p,a=h,d+=122192928e5;const v=(1e4*(268435455&d)+p)%4294967296;l[r++]=v>>>24&255,l[r++]=v>>>16&255,l[r++]=v>>>8&255,l[r++]=255&v;const y=d/4294967296*1e4&268435455;l[r++]=y>>>8&255,l[r++]=255&y,l[r++]=y>>>24&15|16,l[r++]=y>>>16&255,l[r++]=h>>>8|128,l[r++]=255&h;for(let t=0;t<6;++t)l[r+t]=f[t];return e||(0,o.unsafeStringify)(l)}},8237:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=o(n(7925)),i=o(n(4163));function o(t){return t&&t.__esModule?t:{default:t}}var s=(0,r.default)("v3",48,i.default);e.default=s},7925:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.URL=e.DNS=void 0,e.default=function(t,e,n){function r(t,r,s,a){var u;if("string"==typeof t&&(t=function(t){t=unescape(encodeURIComponent(t));const e=[];for(let n=0;n{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=s(n(4790)),i=s(n(3319)),o=n(4008);function s(t){return t&&t.__esModule?t:{default:t}}e.default=function(t,e,n){if(r.default.randomUUID&&!e&&!t)return r.default.randomUUID();const s=(t=t||{}).random||(t.rng||i.default)();if(s[6]=15&s[6]|64,s[8]=63&s[8]|128,e){n=n||0;for(let t=0;t<16;++t)e[n+t]=s[t];return e}return(0,o.unsafeStringify)(s)}},3764:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=o(n(7925)),i=o(n(3757));function o(t){return t&&t.__esModule?t:{default:t}}var s=(0,r.default)("v5",80,i.default);e.default=s},6435:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r,i=(r=n(58))&&r.__esModule?r:{default:r};e.default=function(t){return"string"==typeof t&&i.default.test(t)}},8464:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r,i=(r=n(6435))&&r.__esModule?r:{default:r};e.default=function(t){if(!(0,i.default)(t))throw TypeError("Invalid UUID");return parseInt(t.slice(14,15),16)}},3336:t=>{"use strict";t.exports=$},8419:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.hasCORS=void 0;let n=!1;try{n="undefined"!=typeof XMLHttpRequest&&"withCredentials"in new XMLHttpRequest}catch(t){}e.hasCORS=n},5754:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.decode=e.encode=void 0,e.encode=function(t){let e="";for(let n in t)t.hasOwnProperty(n)&&(e.length&&(e+="&"),e+=encodeURIComponent(n)+"="+encodeURIComponent(t[n]));return e},e.decode=function(t){let e={},n=t.split("&");for(let t=0,r=n.length;t{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.parse=void 0;const n=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,r=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];e.parse=function(t){const e=t,i=t.indexOf("["),o=t.indexOf("]");-1!=i&&-1!=o&&(t=t.substring(0,i)+t.substring(i,o).replace(/:/g,";")+t.substring(o,t.length));let s=n.exec(t||""),a={},u=14;for(;u--;)a[r[u]]=s[u]||"";return-1!=i&&-1!=o&&(a.source=e,a.host=a.host.substring(1,a.host.length-1).replace(/;/g,":"),a.authority=a.authority.replace("[","").replace("]","").replace(/;/g,":"),a.ipv6uri=!0),a.pathNames=function(t,e){const n=e.replace(/\/{2,9}/g,"/").split("/");return"/"!=e.slice(0,1)&&0!==e.length||n.splice(0,1),"/"==e.slice(-1)&&n.splice(n.length-1,1),n}(0,a.path),a.queryKey=function(t,e){const n={};return e.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,(function(t,e,r){e&&(n[e]=r)})),n}(0,a.query),a}},8726:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.yeast=e.decode=e.encode=void 0;const n="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),r={};let i,o=0,s=0;function a(t){let e="";do{e=n[t%64]+e,t=Math.floor(t/64)}while(t>0);return e}for(e.encode=a,e.decode=function(t){let e=0;for(s=0;s{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.globalThisShim=void 0,e.globalThisShim="undefined"!=typeof self?self:"undefined"!=typeof window?window:Function("return this")()},4679:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.nextTick=e.parse=e.installTimerFunctions=e.transports=e.Transport=e.protocol=e.Socket=void 0;const r=n(3481);Object.defineProperty(e,"Socket",{enumerable:!0,get:function(){return r.Socket}}),e.protocol=r.Socket.protocol;var i=n(9870);Object.defineProperty(e,"Transport",{enumerable:!0,get:function(){return i.Transport}});var o=n(7385);Object.defineProperty(e,"transports",{enumerable:!0,get:function(){return o.transports}});var s=n(9622);Object.defineProperty(e,"installTimerFunctions",{enumerable:!0,get:function(){return s.installTimerFunctions}});var a=n(5222);Object.defineProperty(e,"parse",{enumerable:!0,get:function(){return a.parse}});var u=n(5552);Object.defineProperty(e,"nextTick",{enumerable:!0,get:function(){return u.nextTick}})},3481:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.Socket=void 0;const i=n(7385),o=n(9622),s=n(5754),a=n(5222),u=r(n(4802)),c=n(5260),l=n(1373),f=(0,u.default)("engine.io-client:socket");class h extends c.Emitter{constructor(t,e={}){super(),this.writeBuffer=[],t&&"object"==typeof t&&(e=t,t=null),t?(t=(0,a.parse)(t),e.hostname=t.host,e.secure="https"===t.protocol||"wss"===t.protocol,e.port=t.port,t.query&&(e.query=t.query)):e.host&&(e.hostname=(0,a.parse)(e.host).host),(0,o.installTimerFunctions)(this,e),this.secure=null!=e.secure?e.secure:"undefined"!=typeof location&&"https:"===location.protocol,e.hostname&&!e.port&&(e.port=this.secure?"443":"80"),this.hostname=e.hostname||("undefined"!=typeof location?location.hostname:"localhost"),this.port=e.port||("undefined"!=typeof location&&location.port?location.port:this.secure?"443":"80"),this.transports=e.transports||["polling","websocket"],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:!0},e),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),"string"==typeof this.opts.query&&(this.opts.query=(0,s.decode)(this.opts.query)),this.id=null,this.upgrades=null,this.pingInterval=null,this.pingTimeout=null,this.pingTimeoutTimer=null,"function"==typeof addEventListener&&(this.opts.closeOnBeforeunload&&(this.beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this.beforeunloadEventListener,!1)),"localhost"!==this.hostname&&(this.offlineEventListener=()=>{this.onClose("transport close",{description:"network connection lost"})},addEventListener("offline",this.offlineEventListener,!1))),this.open()}createTransport(t){f('creating transport "%s"',t);const e=Object.assign({},this.opts.query);e.EIO=l.protocol,e.transport=t,this.id&&(e.sid=this.id);const n=Object.assign({},this.opts.transportOptions[t],this.opts,{query:e,socket:this,hostname:this.hostname,secure:this.secure,port:this.port});return f("options: %j",n),new i.transports[t](n)}open(){let t;if(this.opts.rememberUpgrade&&h.priorWebsocketSuccess&&-1!==this.transports.indexOf("websocket"))t="websocket";else{if(0===this.transports.length)return void this.setTimeoutFn((()=>{this.emitReserved("error","No transports available")}),0);t=this.transports[0]}this.readyState="opening";try{t=this.createTransport(t)}catch(t){return f("error while creating transport: %s",t),this.transports.shift(),void this.open()}t.open(),this.setTransport(t)}setTransport(t){f("setting transport %s",t.name),this.transport&&(f("clearing existing transport %s",this.transport.name),this.transport.removeAllListeners()),this.transport=t,t.on("drain",this.onDrain.bind(this)).on("packet",this.onPacket.bind(this)).on("error",this.onError.bind(this)).on("close",(t=>this.onClose("transport close",t)))}probe(t){f('probing transport "%s"',t);let e=this.createTransport(t),n=!1;h.priorWebsocketSuccess=!1;const r=()=>{n||(f('probe transport "%s" opened',t),e.send([{type:"ping",data:"probe"}]),e.once("packet",(r=>{if(!n)if("pong"===r.type&&"probe"===r.data){if(f('probe transport "%s" pong',t),this.upgrading=!0,this.emitReserved("upgrading",e),!e)return;h.priorWebsocketSuccess="websocket"===e.name,f('pausing current transport "%s"',this.transport.name),this.transport.pause((()=>{n||"closed"!==this.readyState&&(f("changing transport and sending upgrade packet"),c(),this.setTransport(e),e.send([{type:"upgrade"}]),this.emitReserved("upgrade",e),e=null,this.upgrading=!1,this.flush())}))}else{f('probe transport "%s" failed',t);const n=new Error("probe error");n.transport=e.name,this.emitReserved("upgradeError",n)}})))};function i(){n||(n=!0,c(),e.close(),e=null)}const o=n=>{const r=new Error("probe error: "+n);r.transport=e.name,i(),f('probe transport "%s" failed because of error: %s',t,n),this.emitReserved("upgradeError",r)};function s(){o("transport closed")}function a(){o("socket closed")}function u(t){e&&t.name!==e.name&&(f('"%s" works - aborting "%s"',t.name,e.name),i())}const c=()=>{e.removeListener("open",r),e.removeListener("error",o),e.removeListener("close",s),this.off("close",a),this.off("upgrading",u)};e.once("open",r),e.once("error",o),e.once("close",s),this.once("close",a),this.once("upgrading",u),e.open()}onOpen(){if(f("socket open"),this.readyState="open",h.priorWebsocketSuccess="websocket"===this.transport.name,this.emitReserved("open"),this.flush(),"open"===this.readyState&&this.opts.upgrade){f("starting upgrade probes");let t=0;const e=this.upgrades.length;for(;t{this.onClose("ping timeout")}),this.pingInterval+this.pingTimeout),this.opts.autoUnref&&this.pingTimeoutTimer.unref()}onDrain(){this.writeBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,0===this.writeBuffer.length?this.emitReserved("drain"):this.flush()}flush(){if("closed"!==this.readyState&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this.getWritablePackets();f("flushing %d packets in socket",t.length),this.transport.send(t),this.prevBufferLen=t.length,this.emitReserved("flush")}}getWritablePackets(){if(!(this.maxPayload&&"polling"===this.transport.name&&this.writeBuffer.length>1))return this.writeBuffer;let t=1;for(let e=0;e0&&t>this.maxPayload)return f("only send %d out of %d packets",e,this.writeBuffer.length),this.writeBuffer.slice(0,e);t+=2}return f("payload size is %d (max: %d)",t,this.maxPayload),this.writeBuffer}write(t,e,n){return this.sendPacket("message",t,e,n),this}send(t,e,n){return this.sendPacket("message",t,e,n),this}sendPacket(t,e,n,r){if("function"==typeof e&&(r=e,e=void 0),"function"==typeof n&&(r=n,n=null),"closing"===this.readyState||"closed"===this.readyState)return;(n=n||{}).compress=!1!==n.compress;const i={type:t,data:e,options:n};this.emitReserved("packetCreate",i),this.writeBuffer.push(i),r&&this.once("flush",r),this.flush()}close(){const t=()=>{this.onClose("forced close"),f("socket closing - telling transport to close"),this.transport.close()},e=()=>{this.off("upgrade",e),this.off("upgradeError",e),t()},n=()=>{this.once("upgrade",e),this.once("upgradeError",e)};return"opening"!==this.readyState&&"open"!==this.readyState||(this.readyState="closing",this.writeBuffer.length?this.once("drain",(()=>{this.upgrading?n():t()})):this.upgrading?n():t()),this}onError(t){f("socket error %j",t),h.priorWebsocketSuccess=!1,this.emitReserved("error",t),this.onClose("transport error",t)}onClose(t,e){"opening"!==this.readyState&&"open"!==this.readyState&&"closing"!==this.readyState||(f('socket close with reason: "%s"',t),this.clearTimeoutFn(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),"function"==typeof removeEventListener&&(removeEventListener("beforeunload",this.beforeunloadEventListener,!1),removeEventListener("offline",this.offlineEventListener,!1)),this.readyState="closed",this.id=null,this.emitReserved("close",t,e),this.writeBuffer=[],this.prevBufferLen=0)}filterUpgrades(t){const e=[];let n=0;const r=t.length;for(;n{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.transports=void 0;const r=n(484),i=n(1308);e.transports={websocket:i.WS,polling:r.Polling}},484:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.Request=e.Polling=void 0;const i=n(9870),o=r(n(4802)),s=n(8726),a=n(5754),u=n(1373),c=n(6666),l=n(5260),f=n(9622),h=n(6242),d=(0,o.default)("engine.io-client:polling");function p(){}const g=null!=new c.XHR({xdomain:!1}).responseType;class v extends i.Transport{constructor(t){if(super(t),this.polling=!1,"undefined"!=typeof location){const e="https:"===location.protocol;let n=location.port;n||(n=e?"443":"80"),this.xd="undefined"!=typeof location&&t.hostname!==location.hostname||n!==t.port,this.xs=t.secure!==e}const e=t&&t.forceBase64;this.supportsBinary=g&&!e}get name(){return"polling"}doOpen(){this.poll()}pause(t){this.readyState="pausing";const e=()=>{d("paused"),this.readyState="paused",t()};if(this.polling||!this.writable){let t=0;this.polling&&(d("we are currently polling - waiting to pause"),t++,this.once("pollComplete",(function(){d("pre-pause polling complete"),--t||e()}))),this.writable||(d("we are currently writing - waiting to pause"),t++,this.once("drain",(function(){d("pre-pause writing complete"),--t||e()})))}else e()}poll(){d("polling"),this.polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){d("polling got data %s",t),(0,u.decodePayload)(t,this.socket.binaryType).forEach((t=>{if("opening"===this.readyState&&"open"===t.type&&this.onOpen(),"close"===t.type)return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(t)})),"closed"!==this.readyState&&(this.polling=!1,this.emitReserved("pollComplete"),"open"===this.readyState?this.poll():d('ignoring poll - transport state "%s"',this.readyState))}doClose(){const t=()=>{d("writing close packet"),this.write([{type:"close"}])};"open"===this.readyState?(d("transport open - closing"),t()):(d("transport not open - deferring close"),this.once("open",t))}write(t){this.writable=!1,(0,u.encodePayload)(t,(t=>{this.doWrite(t,(()=>{this.writable=!0,this.emitReserved("drain")}))}))}uri(){let t=this.query||{};const e=this.opts.secure?"https":"http";let n="";!1!==this.opts.timestampRequests&&(t[this.opts.timestampParam]=(0,s.yeast)()),this.supportsBinary||t.sid||(t.b64=1),this.opts.port&&("https"===e&&443!==Number(this.opts.port)||"http"===e&&80!==Number(this.opts.port))&&(n=":"+this.opts.port);const r=(0,a.encode)(t);return e+"://"+(-1!==this.opts.hostname.indexOf(":")?"["+this.opts.hostname+"]":this.opts.hostname)+n+this.opts.path+(r.length?"?"+r:"")}request(t={}){return Object.assign(t,{xd:this.xd,xs:this.xs},this.opts),new y(this.uri(),t)}doWrite(t,e){const n=this.request({method:"POST",data:t});n.on("success",e),n.on("error",((t,e)=>{this.onError("xhr post error",t,e)}))}doPoll(){d("xhr poll");const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",((t,e)=>{this.onError("xhr poll error",t,e)})),this.pollXhr=t}}e.Polling=v;class y extends l.Emitter{constructor(t,e){super(),(0,f.installTimerFunctions)(this,e),this.opts=e,this.method=e.method||"GET",this.uri=t,this.async=!1!==e.async,this.data=void 0!==e.data?e.data:null,this.create()}create(){const t=(0,f.pick)(this.opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");t.xdomain=!!this.opts.xd,t.xscheme=!!this.opts.xs;const e=this.xhr=new c.XHR(t);try{d("xhr open %s: %s",this.method,this.uri),e.open(this.method,this.uri,this.async);try{if(this.opts.extraHeaders){e.setDisableHeaderCheck&&e.setDisableHeaderCheck(!0);for(let t in this.opts.extraHeaders)this.opts.extraHeaders.hasOwnProperty(t)&&e.setRequestHeader(t,this.opts.extraHeaders[t])}}catch(t){}if("POST"===this.method)try{e.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch(t){}try{e.setRequestHeader("Accept","*/*")}catch(t){}"withCredentials"in e&&(e.withCredentials=this.opts.withCredentials),this.opts.requestTimeout&&(e.timeout=this.opts.requestTimeout),e.onreadystatechange=()=>{4===e.readyState&&(200===e.status||1223===e.status?this.onLoad():this.setTimeoutFn((()=>{this.onError("number"==typeof e.status?e.status:0)}),0))},d("xhr data %s",this.data),e.send(this.data)}catch(t){return void this.setTimeoutFn((()=>{this.onError(t)}),0)}"undefined"!=typeof document&&(this.index=y.requestsCount++,y.requests[this.index]=this)}onError(t){this.emitReserved("error",t,this.xhr),this.cleanup(!0)}cleanup(t){if(void 0!==this.xhr&&null!==this.xhr){if(this.xhr.onreadystatechange=p,t)try{this.xhr.abort()}catch(t){}"undefined"!=typeof document&&delete y.requests[this.index],this.xhr=null}}onLoad(){const t=this.xhr.responseText;null!==t&&(this.emitReserved("data",t),this.emitReserved("success"),this.cleanup())}abort(){this.cleanup()}}if(e.Request=y,y.requestsCount=0,y.requests={},"undefined"!=typeof document)if("function"==typeof attachEvent)attachEvent("onunload",m);else if("function"==typeof addEventListener){const t="onpagehide"in h.globalThisShim?"pagehide":"unload";addEventListener(t,m,!1)}function m(){for(let t in y.requests)y.requests.hasOwnProperty(t)&&y.requests[t].abort()}},5552:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.defaultBinaryType=e.usingBrowserWebSocket=e.WebSocket=e.nextTick=void 0;const r=n(6242);e.nextTick="function"==typeof Promise&&"function"==typeof Promise.resolve?t=>Promise.resolve().then(t):(t,e)=>e(t,0),e.WebSocket=r.globalThisShim.WebSocket||r.globalThisShim.MozWebSocket,e.usingBrowserWebSocket=!0,e.defaultBinaryType="arraybuffer"},1308:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.WS=void 0;const i=n(9870),o=n(5754),s=n(8726),a=n(9622),u=n(5552),c=r(n(4802)),l=n(1373),f=(0,c.default)("engine.io-client:websocket"),h="undefined"!=typeof navigator&&"string"==typeof navigator.product&&"reactnative"===navigator.product.toLowerCase();class d extends i.Transport{constructor(t){super(t),this.supportsBinary=!t.forceBase64}get name(){return"websocket"}doOpen(){if(!this.check())return;const t=this.uri(),e=this.opts.protocols,n=h?{}:(0,a.pick)(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(n.headers=this.opts.extraHeaders);try{this.ws=u.usingBrowserWebSocket&&!h?e?new u.WebSocket(t,e):new u.WebSocket(t):new u.WebSocket(t,e,n)}catch(t){return this.emitReserved("error",t)}this.ws.binaryType=this.socket.binaryType||u.defaultBinaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let e=0;e{const e={};!u.usingBrowserWebSocket&&(n.options&&(e.compress=n.options.compress),this.opts.perMessageDeflate)&&("string"==typeof t?Buffer.byteLength(t):t.length){this.writable=!0,this.emitReserved("drain")}),this.setTimeoutFn)}))}}doClose(){void 0!==this.ws&&(this.ws.close(),this.ws=null)}uri(){let t=this.query||{};const e=this.opts.secure?"wss":"ws";let n="";this.opts.port&&("wss"===e&&443!==Number(this.opts.port)||"ws"===e&&80!==Number(this.opts.port))&&(n=":"+this.opts.port),this.opts.timestampRequests&&(t[this.opts.timestampParam]=(0,s.yeast)()),this.supportsBinary||(t.b64=1);const r=(0,o.encode)(t);return e+"://"+(-1!==this.opts.hostname.indexOf(":")?"["+this.opts.hostname+"]":this.opts.hostname)+n+this.opts.path+(r.length?"?"+r:"")}check(){return!!u.WebSocket}}e.WS=d},6666:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.XHR=void 0;const r=n(8419),i=n(6242);e.XHR=function(t){const e=t.xdomain;try{if("undefined"!=typeof XMLHttpRequest&&(!e||r.hasCORS))return new XMLHttpRequest}catch(t){}if(!e)try{return new(i.globalThisShim[["Active"].concat("Object").join("X")])("Microsoft.XMLHTTP")}catch(t){}}},9622:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.byteLength=e.installTimerFunctions=e.pick=void 0;const r=n(6242);e.pick=function(t,...e){return e.reduce(((e,n)=>(t.hasOwnProperty(n)&&(e[n]=t[n]),e)),{})};const i=r.globalThisShim.setTimeout,o=r.globalThisShim.clearTimeout;e.installTimerFunctions=function(t,e){e.useNativeTimers?(t.setTimeoutFn=i.bind(r.globalThisShim),t.clearTimeoutFn=o.bind(r.globalThisShim)):(t.setTimeoutFn=r.globalThisShim.setTimeout.bind(r.globalThisShim),t.clearTimeoutFn=r.globalThisShim.clearTimeout.bind(r.globalThisShim))},e.byteLength=function(t){return"string"==typeof t?function(t){let e=0,n=0;for(let r=0,i=t.length;r=57344?n+=3:(r++,n+=4);return n}(t):Math.ceil(1.33*(t.byteLength||t.size))}},3087:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ERROR_PACKET=e.PACKET_TYPES_REVERSE=e.PACKET_TYPES=void 0;const n=Object.create(null);e.PACKET_TYPES=n,n.open="0",n.close="1",n.ping="2",n.pong="3",n.message="4",n.upgrade="5",n.noop="6";const r=Object.create(null);e.PACKET_TYPES_REVERSE=r,Object.keys(n).forEach((t=>{r[n[t]]=t})),e.ERROR_PACKET={type:"error",data:"parser error"}},2469:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.decode=e.encode=void 0;const n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",r="undefined"==typeof Uint8Array?[]:new Uint8Array(256);for(let t=0;t<64;t++)r[n.charCodeAt(t)]=t;e.encode=t=>{let e,r=new Uint8Array(t),i=r.length,o="";for(e=0;e>2],o+=n[(3&r[e])<<4|r[e+1]>>4],o+=n[(15&r[e+1])<<2|r[e+2]>>6],o+=n[63&r[e+2]];return i%3==2?o=o.substring(0,o.length-1)+"=":i%3==1&&(o=o.substring(0,o.length-2)+"=="),o},e.decode=t=>{let e,n,i,o,s,a=.75*t.length,u=t.length,c=0;"="===t[t.length-1]&&(a--,"="===t[t.length-2]&&a--);const l=new ArrayBuffer(a),f=new Uint8Array(l);for(e=0;e>4,f[c++]=(15&i)<<4|o>>2,f[c++]=(3&o)<<6|63&s;return l}},7572:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});const r=n(3087),i=n(2469),o="function"==typeof ArrayBuffer,s=(t,e)=>{if(o){const n=(0,i.decode)(t);return a(n,e)}return{base64:!0,data:t}},a=(t,e)=>"blob"===e&&t instanceof ArrayBuffer?new Blob([t]):t;e.default=(t,e)=>{if("string"!=typeof t)return{type:"message",data:a(t,e)};const n=t.charAt(0);return"b"===n?{type:"message",data:s(t.substring(1),e)}:r.PACKET_TYPES_REVERSE[n]?t.length>1?{type:r.PACKET_TYPES_REVERSE[n],data:t.substring(1)}:{type:r.PACKET_TYPES_REVERSE[n]}:r.ERROR_PACKET}},3908:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});const r=n(3087),i="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===Object.prototype.toString.call(Blob),o="function"==typeof ArrayBuffer,s=(t,e)=>{const n=new FileReader;return n.onload=function(){const t=n.result.split(",")[1];e("b"+(t||""))},n.readAsDataURL(t)};e.default=({type:t,data:e},n,a)=>{return i&&e instanceof Blob?n?a(e):s(e,a):o&&(e instanceof ArrayBuffer||(u=e,"function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(u):u&&u.buffer instanceof ArrayBuffer))?n?a(e):s(new Blob([e]),a):a(r.PACKET_TYPES[t]+(e||""));var u}},1373:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.decodePayload=e.decodePacket=e.encodePayload=e.encodePacket=e.protocol=void 0;const r=n(3908);e.encodePacket=r.default;const i=n(7572);e.decodePacket=i.default;const o=String.fromCharCode(30);e.encodePayload=(t,e)=>{const n=t.length,i=new Array(n);let s=0;t.forEach(((t,a)=>{(0,r.default)(t,!1,(t=>{i[a]=t,++s===n&&e(i.join(o))}))}))},e.decodePayload=(t,e)=>{const n=t.split(o),r=[];for(let t=0;t{"use strict";function n(t){t=t||{},this.ms=t.min||100,this.max=t.max||1e4,this.factor=t.factor||2,this.jitter=t.jitter>0&&t.jitter<=1?t.jitter:0,this.attempts=0}Object.defineProperty(e,"__esModule",{value:!0}),e.Backoff=void 0,e.Backoff=n,n.prototype.duration=function(){var t=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var e=Math.random(),n=Math.floor(e*this.jitter*t);t=0==(1&Math.floor(10*e))?t-n:t+n}return 0|Math.min(t,this.max)},n.prototype.reset=function(){this.attempts=0},n.prototype.setMin=function(t){this.ms=t},n.prototype.setMax=function(t){this.max=t},n.prototype.setJitter=function(t){this.jitter=t}},7046:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.connect=e.io=e.Socket=e.Manager=e.protocol=void 0;const i=n(3084),o=n(4168);Object.defineProperty(e,"Manager",{enumerable:!0,get:function(){return o.Manager}});const s=n(8312);Object.defineProperty(e,"Socket",{enumerable:!0,get:function(){return s.Socket}});const a=r(n(3669)).default("socket.io-client"),u={};function c(t,e){"object"==typeof t&&(e=t,t=void 0),e=e||{};const n=i.url(t,e.path||"/socket.io"),r=n.source,s=n.id,c=n.path,l=u[s]&&c in u[s].nsps;let f;return e.forceNew||e["force new connection"]||!1===e.multiplex||l?(a("ignoring socket cache for %s",r),f=new o.Manager(r,e)):(u[s]||(a("new io instance for %s",r),u[s]=new o.Manager(r,e)),f=u[s]),n.query&&!e.query&&(e.query=n.queryKey),f.socket(n.path,e)}e.io=c,e.connect=c,e.default=c,Object.assign(c,{Manager:o.Manager,Socket:s.Socket,io:c,connect:c});var l=n(4514);Object.defineProperty(e,"protocol",{enumerable:!0,get:function(){return l.protocol}}),t.exports=c},4168:function(t,e,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),i=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),o=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)"default"!==n&&Object.prototype.hasOwnProperty.call(t,n)&&r(e,t,n);return i(e,t),e},s=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.Manager=void 0;const a=n(4679),u=n(8312),c=o(n(4514)),l=n(7149),f=n(5159),h=n(5260),d=s(n(3669)).default("socket.io-client:manager");class p extends h.Emitter{constructor(t,e){var n;super(),this.nsps={},this.subs=[],t&&"object"==typeof t&&(e=t,t=void 0),(e=e||{}).path=e.path||"/socket.io",this.opts=e,a.installTimerFunctions(this,e),this.reconnection(!1!==e.reconnection),this.reconnectionAttempts(e.reconnectionAttempts||1/0),this.reconnectionDelay(e.reconnectionDelay||1e3),this.reconnectionDelayMax(e.reconnectionDelayMax||5e3),this.randomizationFactor(null!==(n=e.randomizationFactor)&&void 0!==n?n:.5),this.backoff=new f.Backoff({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(null==e.timeout?2e4:e.timeout),this._readyState="closed",this.uri=t;const r=e.parser||c;this.encoder=new r.Encoder,this.decoder=new r.Decoder,this._autoConnect=!1!==e.autoConnect,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,this):this._reconnection}reconnectionAttempts(t){return void 0===t?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var e;return void 0===t?this._reconnectionDelay:(this._reconnectionDelay=t,null===(e=this.backoff)||void 0===e||e.setMin(t),this)}randomizationFactor(t){var e;return void 0===t?this._randomizationFactor:(this._randomizationFactor=t,null===(e=this.backoff)||void 0===e||e.setJitter(t),this)}reconnectionDelayMax(t){var e;return void 0===t?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,null===(e=this.backoff)||void 0===e||e.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&0===this.backoff.attempts&&this.reconnect()}open(t){if(d("readyState %s",this._readyState),~this._readyState.indexOf("open"))return this;d("opening %s",this.uri),this.engine=new a.Socket(this.uri,this.opts);const e=this.engine,n=this;this._readyState="opening",this.skipReconnect=!1;const r=l.on(e,"open",(function(){n.onopen(),t&&t()})),i=l.on(e,"error",(e=>{d("error"),n.cleanup(),n._readyState="closed",this.emitReserved("error",e),t?t(e):n.maybeReconnectOnOpen()}));if(!1!==this._timeout){const t=this._timeout;d("connect attempt will timeout after %d",t),0===t&&r();const n=this.setTimeoutFn((()=>{d("connect attempt timed out after %d",t),r(),e.close(),e.emit("error",new Error("timeout"))}),t);this.opts.autoUnref&&n.unref(),this.subs.push((function(){clearTimeout(n)}))}return this.subs.push(r),this.subs.push(i),this}connect(t){return this.open(t)}onopen(){d("open"),this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(l.on(t,"ping",this.onping.bind(this)),l.on(t,"data",this.ondata.bind(this)),l.on(t,"error",this.onerror.bind(this)),l.on(t,"close",this.onclose.bind(this)),l.on(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(t){this.onclose("parse error",t)}}ondecoded(t){a.nextTick((()=>{this.emitReserved("packet",t)}),this.setTimeoutFn)}onerror(t){d("error",t),this.emitReserved("error",t)}socket(t,e){let n=this.nsps[t];return n?this._autoConnect&&!n.active&&n.connect():(n=new u.Socket(this,t,e),this.nsps[t]=n),n}_destroy(t){const e=Object.keys(this.nsps);for(const t of e)if(this.nsps[t].active)return void d("socket %s is still active, skipping close",t);this._close()}_packet(t){d("writing packet %j",t);const e=this.encoder.encode(t);for(let n=0;nt())),this.subs.length=0,this.decoder.destroy()}_close(){d("disconnect"),this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close"),this.engine&&this.engine.close()}disconnect(){return this._close()}onclose(t,e){d("closed due to %s",t),this.cleanup(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,e),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)d("reconnect failed"),this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const e=this.backoff.duration();d("will wait %dms before reconnect attempt",e),this._reconnecting=!0;const n=this.setTimeoutFn((()=>{t.skipReconnect||(d("attempting reconnect"),this.emitReserved("reconnect_attempt",t.backoff.attempts),t.skipReconnect||t.open((e=>{e?(d("reconnect attempt error"),t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",e)):(d("reconnect success"),t.onreconnect())})))}),e);this.opts.autoUnref&&n.unref(),this.subs.push((function(){clearTimeout(n)}))}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}e.Manager=p},7149:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.on=void 0,e.on=function(t,e,n){return t.on(e,n),function(){t.off(e,n)}}},8312:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.Socket=void 0;const i=n(4514),o=n(7149),s=n(5260),a=r(n(3669)).default("socket.io-client:socket"),u=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class c extends s.Emitter{constructor(t,e,n){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=t,this.nsp=e,n&&n.auth&&(this.auth=n.auth),this._opts=Object.assign({},n),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const t=this.io;this.subs=[o.on(t,"open",this.onopen.bind(this)),o.on(t,"packet",this.onpacket.bind(this)),o.on(t,"error",this.onerror.bind(this)),o.on(t,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected||(this.subEvents(),this.io._reconnecting||this.io.open(),"open"===this.io._readyState&&this.onopen()),this}open(){return this.connect()}send(...t){return t.unshift("message"),this.emit.apply(this,t),this}emit(t,...e){if(u.hasOwnProperty(t))throw new Error('"'+t.toString()+'" is a reserved event name');if(e.unshift(t),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(e),this;const n={type:i.PacketType.EVENT,data:e,options:{}};if(n.options.compress=!1!==this.flags.compress,"function"==typeof e[e.length-1]){const t=this.ids++;a("emitting packet with ack id %d",t);const r=e.pop();this._registerAckCallback(t,r),n.id=t}const r=this.io.engine&&this.io.engine.transport&&this.io.engine.transport.writable;return!this.flags.volatile||r&&this.connected?this.connected?(this.notifyOutgoingListeners(n),this.packet(n)):this.sendBuffer.push(n):a("discard packet as the transport is not currently writable"),this.flags={},this}_registerAckCallback(t,e){var n;const r=null!==(n=this.flags.timeout)&&void 0!==n?n:this._opts.ackTimeout;if(void 0===r)return void(this.acks[t]=e);const i=this.io.setTimeoutFn((()=>{delete this.acks[t];for(let e=0;e{this.io.clearTimeoutFn(i),e.apply(this,[null,...t])}}emitWithAck(t,...e){const n=void 0!==this.flags.timeout||void 0!==this._opts.ackTimeout;return new Promise(((r,i)=>{e.push(((t,e)=>n?t?i(t):r(e):r(t))),this.emit(t,...e)}))}_addToQueue(t){let e;"function"==typeof t[t.length-1]&&(e=t.pop());const n={id:this._queueSeq++,tryCount:0,pending:!1,args:t,flags:Object.assign({fromQueue:!0},this.flags)};t.push(((t,...r)=>{if(n===this._queue[0])return null!==t?n.tryCount>this._opts.retries&&(a("packet [%d] is discarded after %d tries",n.id,n.tryCount),this._queue.shift(),e&&e(t)):(a("packet [%d] was successfully sent",n.id),this._queue.shift(),e&&e(null,...r)),n.pending=!1,this._drainQueue()})),this._queue.push(n),this._drainQueue()}_drainQueue(t=!1){if(a("draining queue"),!this.connected||0===this._queue.length)return;const e=this._queue[0];!e.pending||t?(e.pending=!0,e.tryCount++,a("sending packet [%d] (try n°%d)",e.id,e.tryCount),this.flags=e.flags,this.emit.apply(this,e.args)):a("packet [%d] has already been sent and is waiting for an ack",e.id)}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){a("transport is open - connecting"),"function"==typeof this.auth?this.auth((t=>{this._sendConnectPacket(t)})):this._sendConnectPacket(this.auth)}_sendConnectPacket(t){this.packet({type:i.PacketType.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},t):t})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,e){a("close (%s)",t),this.connected=!1,delete this.id,this.emitReserved("disconnect",t,e)}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case i.PacketType.CONNECT:t.data&&t.data.sid?this.onconnect(t.data.sid,t.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 i.PacketType.EVENT:case i.PacketType.BINARY_EVENT:this.onevent(t);break;case i.PacketType.ACK:case i.PacketType.BINARY_ACK:this.onack(t);break;case i.PacketType.DISCONNECT:this.ondisconnect();break;case i.PacketType.CONNECT_ERROR:this.destroy();const e=new Error(t.data.message);e.data=t.data.data,this.emitReserved("connect_error",e)}}onevent(t){const e=t.data||[];a("emitting event %j",e),null!=t.id&&(a("attaching ack callback to event"),e.push(this.ack(t.id))),this.connected?this.emitEvent(e):this.receiveBuffer.push(Object.freeze(e))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const e=this._anyListeners.slice();for(const n of e)n.apply(this,t)}super.emit.apply(this,t),this._pid&&t.length&&"string"==typeof t[t.length-1]&&(this._lastOffset=t[t.length-1])}ack(t){const e=this;let n=!1;return function(...r){n||(n=!0,a("sending ack %j",r),e.packet({type:i.PacketType.ACK,id:t,data:r}))}}onack(t){const e=this.acks[t.id];"function"==typeof e?(a("calling ack %s with %j",t.id,t.data),e.apply(this,t.data),delete this.acks[t.id]):a("bad ack %s",t.id)}onconnect(t,e){a("socket connected with id %s",t),this.id=t,this.recovered=e&&this._pid===e,this._pid=e,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach((t=>this.emitEvent(t))),this.receiveBuffer=[],this.sendBuffer.forEach((t=>{this.notifyOutgoingListeners(t),this.packet(t)})),this.sendBuffer=[]}ondisconnect(){a("server disconnect (%s)",this.nsp),this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach((t=>t())),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&(a("performing disconnect (%s)",this.nsp),this.packet({type:i.PacketType.DISCONNECT})),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){const e=this._anyListeners;for(let n=0;n{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.reconstructPacket=e.deconstructPacket=void 0;const r=n(665);function i(t,e){if(!t)return t;if((0,r.isBinary)(t)){const n={_placeholder:!0,num:e.length};return e.push(t),n}if(Array.isArray(t)){const n=new Array(t.length);for(let r=0;r=0&&t.num{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Decoder=e.Encoder=e.PacketType=e.protocol=void 0;const r=n(5260),i=n(4880),o=n(665),s=(0,n(1618).default)("socket.io-parser");var a;e.protocol=5,function(t){t[t.CONNECT=0]="CONNECT",t[t.DISCONNECT=1]="DISCONNECT",t[t.EVENT=2]="EVENT",t[t.ACK=3]="ACK",t[t.CONNECT_ERROR=4]="CONNECT_ERROR",t[t.BINARY_EVENT=5]="BINARY_EVENT",t[t.BINARY_ACK=6]="BINARY_ACK"}(a=e.PacketType||(e.PacketType={})),e.Encoder=class{constructor(t){this.replacer=t}encode(t){return s("encoding packet %j",t),t.type!==a.EVENT&&t.type!==a.ACK||!(0,o.hasBinary)(t)?[this.encodeAsString(t)]:this.encodeAsBinary({type:t.type===a.EVENT?a.BINARY_EVENT:a.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id})}encodeAsString(t){let e=""+t.type;return t.type!==a.BINARY_EVENT&&t.type!==a.BINARY_ACK||(e+=t.attachments+"-"),t.nsp&&"/"!==t.nsp&&(e+=t.nsp+","),null!=t.id&&(e+=t.id),null!=t.data&&(e+=JSON.stringify(t.data,this.replacer)),s("encoded %j as %s",t,e),e}encodeAsBinary(t){const e=(0,i.deconstructPacket)(t),n=this.encodeAsString(e.packet),r=e.buffers;return r.unshift(n),r}};class u extends r.Emitter{constructor(t){super(),this.reviver=t}add(t){let e;if("string"==typeof t){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");e=this.decodeString(t);const n=e.type===a.BINARY_EVENT;n||e.type===a.BINARY_ACK?(e.type=n?a.EVENT:a.ACK,this.reconstructor=new c(e),0===e.attachments&&super.emitReserved("decoded",e)):super.emitReserved("decoded",e)}else{if(!(0,o.isBinary)(t)&&!t.base64)throw new Error("Unknown type: "+t);if(!this.reconstructor)throw new Error("got binary data when not reconstructing a packet");e=this.reconstructor.takeBinaryData(t),e&&(this.reconstructor=null,super.emitReserved("decoded",e))}}decodeString(t){let e=0;const n={type:Number(t.charAt(0))};if(void 0===a[n.type])throw new Error("unknown packet type "+n.type);if(n.type===a.BINARY_EVENT||n.type===a.BINARY_ACK){const r=e+1;for(;"-"!==t.charAt(++e)&&e!=t.length;);const i=t.substring(r,e);if(i!=Number(i)||"-"!==t.charAt(e))throw new Error("Illegal attachments");n.attachments=Number(i)}if("/"===t.charAt(e+1)){const r=e+1;for(;++e&&","!==t.charAt(e)&&e!==t.length;);n.nsp=t.substring(r,e)}else n.nsp="/";const r=t.charAt(e+1);if(""!==r&&Number(r)==r){const r=e+1;for(;++e;){const n=t.charAt(e);if(null==n||Number(n)!=n){--e;break}if(e===t.length)break}n.id=Number(t.substring(r,e+1))}if(t.charAt(++e)){const r=this.tryParse(t.substr(e));if(!u.isPayloadValid(n.type,r))throw new Error("invalid payload");n.data=r}return s("decoded %s as %j",t,n),n}tryParse(t){try{return JSON.parse(t,this.reviver)}catch(t){return!1}}static isPayloadValid(t,e){switch(t){case a.CONNECT:return"object"==typeof e;case a.DISCONNECT:return void 0===e;case a.CONNECT_ERROR:return"string"==typeof e||"object"==typeof e;case a.EVENT:case a.BINARY_EVENT:return Array.isArray(e)&&("string"==typeof e[0]||"number"==typeof e[0]);case a.ACK:case a.BINARY_ACK:return Array.isArray(e)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}e.Decoder=u;class c{constructor(t){this.packet=t,this.buffers=[],this.reconPack=t}takeBinaryData(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){const t=(0,i.reconstructPacket)(this.reconPack,this.buffers);return this.finishedReconstruction(),t}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}},665:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.hasBinary=e.isBinary=void 0;const n="function"==typeof ArrayBuffer,r=Object.prototype.toString,i="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===r.call(Blob),o="function"==typeof File||"undefined"!=typeof File&&"[object FileConstructor]"===r.call(File);function s(t){return n&&(t instanceof ArrayBuffer||(t=>"function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(t):t.buffer instanceof ArrayBuffer)(t))||i&&t instanceof Blob||o&&t instanceof File}e.isBinary=s,e.hasBinary=function t(e,n){if(!e||"object"!=typeof e)return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n{"use strict";function r(t){if(t)return function(t){for(var e in r.prototype)t[e]=r.prototype[e];return t}(t)}n.r(e),n.d(e,{Emitter:()=>r}),r.prototype.on=r.prototype.addEventListener=function(t,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(e),this},r.prototype.once=function(t,e){function n(){this.off(t,n),e.apply(this,arguments)}return n.fn=e,this.on(t,n),this},r.prototype.off=r.prototype.removeListener=r.prototype.removeAllListeners=r.prototype.removeEventListener=function(t,e){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var n,r=this._callbacks["$"+t];if(!r)return this;if(1==arguments.length)return delete this._callbacks["$"+t],this;for(var i=0;i{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.nmd=t=>(t.paths=[],t.children||(t.children=[]),t),n(2174)})(); \ No newline at end of file diff --git a/public/index.html b/public/index.html index cc0b470..82d1a52 100644 --- a/public/index.html +++ b/public/index.html @@ -68,7 +68,7 @@
0 Online - Now
- +
diff --git a/src/client/index.ts b/src/client/index.ts index e18c877..8d16cea 100644 --- a/src/client/index.ts +++ b/src/client/index.ts @@ -201,6 +201,10 @@ socket.on('alert', data => { events.emit('alert', [data]); }); +socket.on('init', (data: {version: string}) => { + $('#version').html(`v${data.version}`); +}); + socket.on('authToken', (authToken: string) => { console.log(`recv auth token ${authToken}`); localStorage.setItem('authToken', authToken); diff --git a/src/server/api.ts b/src/server/api.ts index ac29843..885e49b 100644 --- a/src/server/api.ts +++ b/src/server/api.ts @@ -1,4 +1,5 @@ import * as otel from './tracing'; +import { version } from "../../package.json"; import { config as dotenv } from 'dotenv'; import { join } from 'path'; import express, {Request, Response} from 'express'; @@ -85,6 +86,10 @@ io.on('connection', async socket => { logger.log(`Socket [${socket.id}] auth token: ${player.id}`); + socket.emit('init', { + version + }); + socket.emit('authToken', player.id); socket.emit('player', player); -- 2.25.1 From a83addd73a35f57797e536435760ad8532d69b66 Mon Sep 17 00:00:00 2001 From: xangelo Date: Thu, 13 Jul 2023 13:28:56 -0400 Subject: [PATCH 7/7] chore(release): 0.1.1 --- CHANGELOG.md | 16 ++++++++++++++++ package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 19 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a6e196f..1df60ec 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,22 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. +### [0.1.1](https://git.xangelo.ca/?p=risinglegends.git;a=commitdiff;h=v0.1.1;hp=v0.1.0;ds=sidebyside) (2023-07-13) + + +### Features + +* allow users to log out 22d96bc +* display current deployed version in UI a717a30 + + +### Bug Fixes + +* casting now uses INT instead of CON 223bc6d +* check players hp before allowing them to start a battle 4d7a556, closes #2 +* move jquery to a webpack external to reduce bundle size 56baafa +* prod build process + migration cecab78 + ## [0.1.0](https://git.xangelo.ca/?p=risinglegends.git;a=commitdiff;h=v0.1.0;hp=v0.0.3;ds=sidebyside) (2023-07-12) diff --git a/package-lock.json b/package-lock.json index 4560910..d799766 100644 --- a/package-lock.json +++ b/package-lock.json @@ -47,7 +47,7 @@ "tsconfig-paths-webpack-plugin": "^4.0.1", "typescript": "^4.9.5" }, - "version": "0.1.0" + "version": "0.1.1" }, "node_modules/@babel/code-frame": { "version": "7.22.5", @@ -16160,5 +16160,5 @@ "integrity": "sha512-LLHANmdm53+MucY9aOFIggzYtUdkSBFxUsy4glTTQYNyK6B3uCPWTbfiGvSrEvLojw0mSzyFJ1/RRLv+QMNdzQ==" } }, - "version": "0.1.0" + "version": "0.1.1" } diff --git a/package.json b/package.json index b420ea0..e60af56 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "rising-legends", "private": true, - "version": "0.1.0", + "version": "0.1.1", "scripts": { "up": "npx prisma migrate dev --name \"init\"", "start": "pm2 start dist/server/api.js", -- 2.25.1