diff --git a/assets/@socket.io-Dkula2eQ.js b/assets/@socket.io-Dkula2eQ.js new file mode 100644 index 0000000..7b5486c --- /dev/null +++ b/assets/@socket.io-Dkula2eQ.js @@ -0,0 +1 @@ +function r(t){if(t)return l(t)}function l(t){for(var s in r.prototype)t[s]=r.prototype[s];return t}r.prototype.on=r.prototype.addEventListener=function(t,s){return this._callbacks=this._callbacks||{},(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(s),this},r.prototype.once=function(t,s){function e(){this.off(t,e),s.apply(this,arguments)}return e.fn=s,this.on(t,e),this},r.prototype.off=r.prototype.removeListener=r.prototype.removeAllListeners=r.prototype.removeEventListener=function(t,s){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var e=this._callbacks["$"+t];if(!e)return this;if(arguments.length==1)return delete this._callbacks["$"+t],this;for(var n,i=0;ie=>{const n=Bt.call(e);return t[n]||(t[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),O=t=>(t=t.toLowerCase(),e=>x(e)===t),_=t=>e=>typeof e===t,{isArray:T}=Array,N=_("undefined");function Lt(t){return t!==null&&!N(t)&&t.constructor!==null&&!N(t.constructor)&&w(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const rt=O("ArrayBuffer");function Dt(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&rt(t.buffer),e}const kt=_("string"),w=_("function"),ot=_("number"),F=t=>t!==null&&typeof t=="object",qt=t=>t===!0||t===!1,U=t=>{if(x(t)!=="object")return!1;const e=z(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)},It=O("Date"),zt=O("File"),Mt=O("Blob"),Ht=O("FileList"),Jt=t=>F(t)&&w(t.pipe),Wt=t=>{let e;return t&&(typeof FormData=="function"&&t instanceof FormData||w(t.append)&&((e=x(t))==="formdata"||e==="object"&&w(t.toString)&&t.toString()==="[object FormData]"))},Kt=O("URLSearchParams"),Vt=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function C(t,e,{allOwnKeys:n=!1}={}){if(t===null||typeof t>"u")return;let r,o;if(typeof t!="object"&&(t=[t]),T(t))for(r=0,o=t.length;r0;)if(o=n[r],e===o.toLowerCase())return o;return null}const it=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,at=t=>!N(t)&&t!==it;function M(){const{caseless:t}=at(this)&&this||{},e={},n=(r,o)=>{const s=t&&st(e,o)||o;U(e[s])&&U(r)?e[s]=M(e[s],r):U(r)?e[s]=M({},r):T(r)?e[s]=r.slice():e[s]=r};for(let r=0,o=arguments.length;r(C(e,(o,s)=>{n&&w(o)?t[s]=nt(o,n):t[s]=o},{allOwnKeys:r}),t),$t=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),Xt=(t,e,n,r)=>{t.prototype=Object.create(e.prototype,r),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),n&&Object.assign(t.prototype,n)},Qt=(t,e,n,r)=>{let o,s,i;const u={};if(e=e||{},t==null)return e;do{for(o=Object.getOwnPropertyNames(t),s=o.length;s-- >0;)i=o[s],(!r||r(i,t,e))&&!u[i]&&(e[i]=t[i],u[i]=!0);t=n!==!1&&z(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},Zt=(t,e,n)=>{t=String(t),(n===void 0||n>t.length)&&(n=t.length),n-=e.length;const r=t.indexOf(e,n);return r!==-1&&r===n},Yt=t=>{if(!t)return null;if(T(t))return t;let e=t.length;if(!ot(e))return null;const n=new Array(e);for(;e-- >0;)n[e]=t[e];return n},te=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&z(Uint8Array)),ee=(t,e)=>{const n=(t&&t[Symbol.iterator]).call(t);let r;for(;(r=n.next())&&!r.done;){const o=r.value;e.call(t,o[0],o[1])}},ne=(t,e)=>{let n;const r=[];for(;(n=t.exec(e))!==null;)r.push(n);return r},re=O("HTMLFormElement"),oe=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,n,r){return n.toUpperCase()+r}),ct=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),se=O("RegExp"),ut=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),r={};C(n,(o,s)=>{let i;(i=e(o,s,t))!==!1&&(r[s]=i||o)}),Object.defineProperties(t,r)},ie=t=>{ut(t,(e,n)=>{if(w(t)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=t[n];if(w(r)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},ae=(t,e)=>{const n={},r=o=>{o.forEach(s=>{n[s]=!0})};return T(t)?r(t):r(String(t).split(e)),n},ce=()=>{},ue=(t,e)=>(t=+t,Number.isFinite(t)?t:e),H="abcdefghijklmnopqrstuvwxyz",lt="0123456789",ft={DIGIT:lt,ALPHA:H,ALPHA_DIGIT:H+H.toUpperCase()+lt},le=(t=16,e=ft.ALPHA_DIGIT)=>{let n="";const{length:r}=e;for(;t--;)n+=e[Math.random()*r|0];return n};function fe(t){return!!(t&&w(t.append)&&t[Symbol.toStringTag]==="FormData"&&t[Symbol.iterator])}const pe=t=>{const e=new Array(10),n=(r,o)=>{if(F(r)){if(e.indexOf(r)>=0)return;if(!("toJSON"in r)){e[o]=r;const s=T(r)?[]:{};return C(r,(i,u)=>{const p=n(i,o+1);!N(p)&&(s[u]=p)}),e[o]=void 0,s}}return r};return n(t,0)},he=O("AsyncFunction"),de=t=>t&&(F(t)||w(t))&&w(t.then)&&w(t.catch),a={isArray:T,isArrayBuffer:rt,isBuffer:Lt,isFormData:Wt,isArrayBufferView:Dt,isString:kt,isNumber:ot,isBoolean:qt,isObject:F,isPlainObject:U,isUndefined:N,isDate:It,isFile:zt,isBlob:Mt,isRegExp:se,isFunction:w,isStream:Jt,isURLSearchParams:Kt,isTypedArray:te,isFileList:Ht,forEach:C,merge:M,extend:Gt,trim:Vt,stripBOM:$t,inherits:Xt,toFlatObject:Qt,kindOf:x,kindOfTest:O,endsWith:Zt,toArray:Yt,forEachEntry:ee,matchAll:ne,isHTMLForm:re,hasOwnProperty:ct,hasOwnProp:ct,reduceDescriptors:ut,freezeMethods:ie,toObjectSet:ae,toCamelCase:oe,noop:ce,toFiniteNumber:ue,findKey:st,global:it,isContextDefined:at,ALPHABET:ft,generateString:le,isSpecCompliantForm:fe,toJSONObject:pe,isAsyncFn:he,isThenable:de};function m(t,e,n,r,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=t,this.name="AxiosError",e&&(this.code=e),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o)}a.inherits(m,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:a.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const pt=m.prototype,ht={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(t=>{ht[t]={value:t}}),Object.defineProperties(m,ht),Object.defineProperty(pt,"isAxiosError",{value:!0}),m.from=(t,e,n,r,o,s)=>{const i=Object.create(pt);return a.toFlatObject(t,i,function(u){return u!==Error.prototype},u=>u!=="isAxiosError"),m.call(i,t.message,e,n,r,o),i.cause=t,i.name=t.name,s&&Object.assign(i,s),i};const me=null;function J(t){return a.isPlainObject(t)||a.isArray(t)}function dt(t){return a.endsWith(t,"[]")?t.slice(0,-2):t}function mt(t,e,n){return t?t.concat(e).map(function(r,o){return r=dt(r),!n&&o?"["+r+"]":r}).join(n?".":""):e}function ye(t){return a.isArray(t)&&!t.some(J)}const ge=a.toFlatObject(a,{},null,function(t){return/^is[A-Z]/.test(t)});function B(t,e,n){if(!a.isObject(t))throw new TypeError("target must be an object");e=e||new FormData,n=a.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(d,l){return!a.isUndefined(l[d])});const r=n.metaTokens,o=n.visitor||f,s=n.dots,i=n.indexes,u=(n.Blob||typeof Blob<"u"&&Blob)&&a.isSpecCompliantForm(e);if(!a.isFunction(o))throw new TypeError("visitor must be a function");function p(d){if(d===null)return"";if(a.isDate(d))return d.toISOString();if(!u&&a.isBlob(d))throw new m("Blob is not supported. Use a Buffer instead.");return a.isArrayBuffer(d)||a.isTypedArray(d)?u&&typeof Blob=="function"?new Blob([d]):Buffer.from(d):d}function f(d,l,g){let b=d;if(d&&!g&&typeof d=="object"){if(a.endsWith(l,"{}"))l=r?l:l.slice(0,-2),d=JSON.stringify(d);else if(a.isArray(d)&&ye(d)||(a.isFileList(d)||a.endsWith(l,"[]"))&&(b=a.toArray(d)))return l=dt(l),b.forEach(function(I,Ut){!(a.isUndefined(I)||I===null)&&e.append(i===!0?mt([l],Ut,s):i===null?l:l+"[]",p(I))}),!1}return J(d)?!0:(e.append(mt(g,l,s),p(d)),!1)}const c=[],h=Object.assign(ge,{defaultVisitor:f,convertValue:p,isVisitable:J});function E(d,l){if(!a.isUndefined(d)){if(c.indexOf(d)!==-1)throw Error("Circular reference detected in "+l.join("."));c.push(d),a.forEach(d,function(g,b){(!(a.isUndefined(g)||g===null)&&o.call(e,g,a.isString(b)?b.trim():b,l,h))===!0&&E(g,l?l.concat(b):[b])}),c.pop()}}if(!a.isObject(t))throw new TypeError("data must be an object");return E(t),e}function yt(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(n){return e[n]})}function W(t,e){this._pairs=[],t&&B(t,this,e)}const gt=W.prototype;gt.append=function(t,e){this._pairs.push([t,e])},gt.toString=function(t){const e=t?function(n){return t.call(this,n,yt)}:yt;return this._pairs.map(function(n){return e(n[0])+"="+e(n[1])},"").join("&")};function be(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function bt(t,e,n){if(!e)return t;const r=n&&n.encode||be,o=n&&n.serialize;let s;if(o?s=o(e,n):s=a.isURLSearchParams(e)?e.toString():new W(e,n).toString(r),s){const i=t.indexOf("#");i!==-1&&(t=t.slice(0,i)),t+=(t.indexOf("?")===-1?"?":"&")+s}return t}class Et{constructor(){this.handlers=[]}use(e,n,r){return this.handlers.push({fulfilled:e,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){a.forEach(this.handlers,function(n){n!==null&&e(n)})}}const wt={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Ee=typeof URLSearchParams<"u"?URLSearchParams:W,we=typeof FormData<"u"?FormData:null,Oe=typeof Blob<"u"?Blob:null,Se={isBrowser:!0,classes:{URLSearchParams:Ee,FormData:we,Blob:Oe},protocols:["http","https","file","blob","url","data"]},Ot=typeof window<"u"&&typeof document<"u",Re=(t=>Ot&&["ReactNative","NativeScript","NS"].indexOf(t)<0)(typeof navigator<"u"&&navigator.product),Ae=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Te=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Ot,hasStandardBrowserEnv:Re,hasStandardBrowserWebWorkerEnv:Ae},Symbol.toStringTag,{value:"Module"})),S={...Te,...Se};function je(t,e){return B(t,new S.classes.URLSearchParams,Object.assign({visitor:function(n,r,o,s){return S.isNode&&a.isBuffer(n)?(this.append(r,n.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)}},e))}function Ne(t){return a.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function Ce(t){const e={},n=Object.keys(t);let r;const o=n.length;let s;for(r=0;r=n.length;return i=!i&&a.isArray(o)?o.length:i,p?(a.hasOwnProp(o,i)?o[i]=[o[i],r]:o[i]=r,!u):((!o[i]||!a.isObject(o[i]))&&(o[i]=[]),e(n,r,o[i],s)&&a.isArray(o[i])&&(o[i]=Ce(o[i])),!u)}if(a.isFormData(t)&&a.isFunction(t.entries)){const n={};return a.forEachEntry(t,(r,o)=>{e(Ne(r),o,n,0)}),n}return null}function Pe(t,e,n){if(a.isString(t))try{return(e||JSON.parse)(t),a.trim(t)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(t)}const K={transitional:wt,adapter:["xhr","http"],transformRequest:[function(t,e){const n=e.getContentType()||"",r=n.indexOf("application/json")>-1,o=a.isObject(t);if(o&&a.isHTMLForm(t)&&(t=new FormData(t)),a.isFormData(t))return r?JSON.stringify(St(t)):t;if(a.isArrayBuffer(t)||a.isBuffer(t)||a.isStream(t)||a.isFile(t)||a.isBlob(t))return t;if(a.isArrayBufferView(t))return t.buffer;if(a.isURLSearchParams(t))return e.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let s;if(o){if(n.indexOf("application/x-www-form-urlencoded")>-1)return je(t,this.formSerializer).toString();if((s=a.isFileList(t))||n.indexOf("multipart/form-data")>-1){const i=this.env&&this.env.FormData;return B(s?{"files[]":t}:t,i&&new i,this.formSerializer)}}return o||r?(e.setContentType("application/json",!1),Pe(t)):t}],transformResponse:[function(t){const e=this.transitional||K.transitional,n=e&&e.forcedJSONParsing,r=this.responseType==="json";if(t&&a.isString(t)&&(n&&!this.responseType||r)){const o=!(e&&e.silentJSONParsing)&&r;try{return JSON.parse(t)}catch(s){if(o)throw s.name==="SyntaxError"?m.from(s,m.ERR_BAD_RESPONSE,this,null,this.response):s}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:S.classes.FormData,Blob:S.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};a.forEach(["delete","get","head","post","put","patch"],t=>{K.headers[t]={}});const V=K,ve=a.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),xe=t=>{const e={};let n,r,o;return t&&t.split(` -`).forEach(function(s){o=s.indexOf(":"),n=s.substring(0,o).trim().toLowerCase(),r=s.substring(o+1).trim(),!(!n||e[n]&&ve[n])&&(n==="set-cookie"?e[n]?e[n].push(r):e[n]=[r]:e[n]=e[n]?e[n]+", "+r:r)}),e},Rt=Symbol("internals");function P(t){return t&&String(t).trim().toLowerCase()}function L(t){return t===!1||t==null?t:a.isArray(t)?t.map(L):String(t)}function _e(t){const e=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(t);)e[r[1]]=r[2];return e}const Fe=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function G(t,e,n,r,o){if(a.isFunction(r))return r.call(this,e,n);if(o&&(e=n),!!a.isString(e)){if(a.isString(r))return e.indexOf(r)!==-1;if(a.isRegExp(r))return r.test(e)}}function Ue(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,n,r)=>n.toUpperCase()+r)}function Be(t,e){const n=a.toCamelCase(" "+e);["get","set","has"].forEach(r=>{Object.defineProperty(t,r+n,{value:function(o,s,i){return this[r].call(this,e,o,s,i)},configurable:!0})})}class D{constructor(e){e&&this.set(e)}set(e,n,r){const o=this;function s(u,p,f){const c=P(p);if(!c)throw new Error("header name must be a non-empty string");const h=a.findKey(o,c);(!h||o[h]===void 0||f===!0||f===void 0&&o[h]!==!1)&&(o[h||p]=L(u))}const i=(u,p)=>a.forEach(u,(f,c)=>s(f,c,p));return a.isPlainObject(e)||e instanceof this.constructor?i(e,n):a.isString(e)&&(e=e.trim())&&!Fe(e)?i(xe(e),n):e!=null&&s(n,e,r),this}get(e,n){if(e=P(e),e){const r=a.findKey(this,e);if(r){const o=this[r];if(!n)return o;if(n===!0)return _e(o);if(a.isFunction(n))return n.call(this,o,r);if(a.isRegExp(n))return n.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,n){if(e=P(e),e){const r=a.findKey(this,e);return!!(r&&this[r]!==void 0&&(!n||G(this,this[r],r,n)))}return!1}delete(e,n){const r=this;let o=!1;function s(i){if(i=P(i),i){const u=a.findKey(r,i);u&&(!n||G(r,r[u],u,n))&&(delete r[u],o=!0)}}return a.isArray(e)?e.forEach(s):s(e),o}clear(e){const n=Object.keys(this);let r=n.length,o=!1;for(;r--;){const s=n[r];(!e||G(this,this[s],s,e,!0))&&(delete this[s],o=!0)}return o}normalize(e){const n=this,r={};return a.forEach(this,(o,s)=>{const i=a.findKey(r,s);if(i){n[i]=L(o),delete n[s];return}const u=e?Ue(s):String(s).trim();u!==s&&delete n[s],n[u]=L(o),r[u]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const n=Object.create(null);return a.forEach(this,(r,o)=>{r!=null&&r!==!1&&(n[o]=e&&a.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,n])=>e+": "+n).join(` -`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...n){const r=new this(e);return n.forEach(o=>r.set(o)),r}static accessor(e){const n=(this[Rt]=this[Rt]={accessors:{}}).accessors,r=this.prototype;function o(s){const i=P(s);n[i]||(Be(r,s),n[i]=!0)}return a.isArray(e)?e.forEach(o):o(e),this}}D.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),a.reduceDescriptors(D.prototype,({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(r){this[n]=r}}}),a.freezeMethods(D);const R=D;function $(t,e){const n=this||V,r=e||n,o=R.from(r.headers);let s=r.data;return a.forEach(t,function(i){s=i.call(n,s,o.normalize(),e?e.status:void 0)}),o.normalize(),s}function At(t){return!!(t&&t.__CANCEL__)}function v(t,e,n){m.call(this,t??"canceled",m.ERR_CANCELED,e,n),this.name="CanceledError"}a.inherits(v,m,{__CANCEL__:!0});function Le(t,e,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?t(n):e(new m("Request failed with status code "+n.status,[m.ERR_BAD_REQUEST,m.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}const De=S.hasStandardBrowserEnv?{write(t,e,n,r,o,s){const i=[t+"="+encodeURIComponent(e)];a.isNumber(n)&&i.push("expires="+new Date(n).toGMTString()),a.isString(r)&&i.push("path="+r),a.isString(o)&&i.push("domain="+o),s===!0&&i.push("secure"),document.cookie=i.join("; ")},read(t){const e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(t){this.write(t,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function ke(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function qe(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function Tt(t,e){return t&&!ke(e)?qe(t,e):e}const Ie=S.hasStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(navigator.userAgent),e=document.createElement("a");let n;function r(o){let s=o;return t&&(e.setAttribute("href",s),s=e.href),e.setAttribute("href",s),{href:e.href,protocol:e.protocol?e.protocol.replace(/:$/,""):"",host:e.host,search:e.search?e.search.replace(/^\?/,""):"",hash:e.hash?e.hash.replace(/^#/,""):"",hostname:e.hostname,port:e.port,pathname:e.pathname.charAt(0)==="/"?e.pathname:"/"+e.pathname}}return n=r(window.location.href),function(o){const s=a.isString(o)?r(o):o;return s.protocol===n.protocol&&s.host===n.host}}():function(){return function(){return!0}}();function ze(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function Me(t,e){t=t||10;const n=new Array(t),r=new Array(t);let o=0,s=0,i;return e=e!==void 0?e:1e3,function(u){const p=Date.now(),f=r[s];i||(i=p),n[o]=u,r[o]=p;let c=s,h=0;for(;c!==o;)h+=n[c++],c=c%t;if(o=(o+1)%t,o===s&&(s=(s+1)%t),p-i{const s=o.loaded,i=o.lengthComputable?o.total:void 0,u=s-n,p=r(u),f=s<=i;n=s;const c={loaded:s,total:i,progress:i?s/i:void 0,bytes:u,rate:p||void 0,estimated:p&&i&&f?(i-s)/p:void 0,event:o};c[e?"download":"upload"]=!0,t(c)}}const He=typeof XMLHttpRequest<"u",Je=He&&function(t){return new Promise(function(e,n){let r=t.data;const o=R.from(t.headers).normalize();let{responseType:s,withXSRFToken:i}=t,u;function p(){t.cancelToken&&t.cancelToken.unsubscribe(u),t.signal&&t.signal.removeEventListener("abort",u)}let f;if(a.isFormData(r)){if(S.hasStandardBrowserEnv||S.hasStandardBrowserWebWorkerEnv)o.setContentType(!1);else if((f=o.getContentType())!==!1){const[l,...g]=f?f.split(";").map(b=>b.trim()).filter(Boolean):[];o.setContentType([l||"multipart/form-data",...g].join("; "))}}let c=new XMLHttpRequest;if(t.auth){const l=t.auth.username||"",g=t.auth.password?unescape(encodeURIComponent(t.auth.password)):"";o.set("Authorization","Basic "+btoa(l+":"+g))}const h=Tt(t.baseURL,t.url);c.open(t.method.toUpperCase(),bt(h,t.params,t.paramsSerializer),!0),c.timeout=t.timeout;function E(){if(!c)return;const l=R.from("getAllResponseHeaders"in c&&c.getAllResponseHeaders()),g={data:!s||s==="text"||s==="json"?c.responseText:c.response,status:c.status,statusText:c.statusText,headers:l,config:t,request:c};Le(function(b){e(b),p()},function(b){n(b),p()},g),c=null}if("onloadend"in c?c.onloadend=E:c.onreadystatechange=function(){!c||c.readyState!==4||c.status===0&&!(c.responseURL&&c.responseURL.indexOf("file:")===0)||setTimeout(E)},c.onabort=function(){c&&(n(new m("Request aborted",m.ECONNABORTED,t,c)),c=null)},c.onerror=function(){n(new m("Network Error",m.ERR_NETWORK,t,c)),c=null},c.ontimeout=function(){let l=t.timeout?"timeout of "+t.timeout+"ms exceeded":"timeout exceeded";const g=t.transitional||wt;t.timeoutErrorMessage&&(l=t.timeoutErrorMessage),n(new m(l,g.clarifyTimeoutError?m.ETIMEDOUT:m.ECONNABORTED,t,c)),c=null},S.hasStandardBrowserEnv&&(i&&a.isFunction(i)&&(i=i(t)),i||i!==!1&&Ie(h))){const l=t.xsrfHeaderName&&t.xsrfCookieName&&De.read(t.xsrfCookieName);l&&o.set(t.xsrfHeaderName,l)}r===void 0&&o.setContentType(null),"setRequestHeader"in c&&a.forEach(o.toJSON(),function(l,g){c.setRequestHeader(g,l)}),a.isUndefined(t.withCredentials)||(c.withCredentials=!!t.withCredentials),s&&s!=="json"&&(c.responseType=t.responseType),typeof t.onDownloadProgress=="function"&&c.addEventListener("progress",jt(t.onDownloadProgress,!0)),typeof t.onUploadProgress=="function"&&c.upload&&c.upload.addEventListener("progress",jt(t.onUploadProgress)),(t.cancelToken||t.signal)&&(u=l=>{c&&(n(!l||l.type?new v(null,t,c):l),c.abort(),c=null)},t.cancelToken&&t.cancelToken.subscribe(u),t.signal&&(t.signal.aborted?u():t.signal.addEventListener("abort",u)));const d=ze(h);if(d&&S.protocols.indexOf(d)===-1){n(new m("Unsupported protocol "+d+":",m.ERR_BAD_REQUEST,t));return}c.send(r||null)})},X={http:me,xhr:Je};a.forEach(X,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch{}Object.defineProperty(t,"adapterName",{value:e})}});const Nt=t=>`- ${t}`,We=t=>a.isFunction(t)||t===null||t===!1,Ct={getAdapter:t=>{t=a.isArray(t)?t:[t];const{length:e}=t;let n,r;const o={};for(let s=0;s`adapter ${u} `+(p===!1?"is not supported by the environment":"is not available in the build"));let i=e?s.length>1?`since : -`+s.map(Nt).join(` -`):" "+Nt(s[0]):"as no adapter specified";throw new m("There is no suitable adapter to dispatch the request "+i,"ERR_NOT_SUPPORT")}return r},adapters:X};function Q(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new v(null,t)}function Pt(t){return Q(t),t.headers=R.from(t.headers),t.data=$.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),Ct.getAdapter(t.adapter||V.adapter)(t).then(function(e){return Q(t),e.data=$.call(t,t.transformResponse,e),e.headers=R.from(e.headers),e},function(e){return At(e)||(Q(t),e&&e.response&&(e.response.data=$.call(t,t.transformResponse,e.response),e.response.headers=R.from(e.response.headers))),Promise.reject(e)})}const vt=t=>t instanceof R?{...t}:t;function j(t,e){e=e||{};const n={};function r(f,c,h){return a.isPlainObject(f)&&a.isPlainObject(c)?a.merge.call({caseless:h},f,c):a.isPlainObject(c)?a.merge({},c):a.isArray(c)?c.slice():c}function o(f,c,h){if(a.isUndefined(c)){if(!a.isUndefined(f))return r(void 0,f,h)}else return r(f,c,h)}function s(f,c){if(!a.isUndefined(c))return r(void 0,c)}function i(f,c){if(a.isUndefined(c)){if(!a.isUndefined(f))return r(void 0,f)}else return r(void 0,c)}function u(f,c,h){if(h in e)return r(f,c);if(h in t)return r(void 0,f)}const p={url:s,method:s,data:s,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,withXSRFToken:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,responseEncoding:i,validateStatus:u,headers:(f,c)=>o(vt(f),vt(c),!0)};return a.forEach(Object.keys(Object.assign({},t,e)),function(f){const c=p[f]||o,h=c(t[f],e[f],f);a.isUndefined(h)&&c!==u||(n[f]=h)}),n}const xt="1.6.8",Z={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{Z[t]=function(n){return typeof n===t||"a"+(e<1?"n ":" ")+t}});const _t={};Z.transitional=function(t,e,n){function r(o,s){return"[Axios v"+xt+"] Transitional option '"+o+"'"+s+(n?". "+n:"")}return(o,s,i)=>{if(t===!1)throw new m(r(s," has been removed"+(e?" in "+e:"")),m.ERR_DEPRECATED);return e&&!_t[s]&&(_t[s]=!0,console.warn(r(s," has been deprecated since v"+e+" and will be removed in the near future"))),t?t(o,s,i):!0}};function Ke(t,e,n){if(typeof t!="object")throw new m("options must be an object",m.ERR_BAD_OPTION_VALUE);const r=Object.keys(t);let o=r.length;for(;o-- >0;){const s=r[o],i=e[s];if(i){const u=t[s],p=u===void 0||i(u,s,t);if(p!==!0)throw new m("option "+s+" must be "+p,m.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new m("Unknown option "+s,m.ERR_BAD_OPTION)}}const Y={assertOptions:Ke,validators:Z},A=Y.validators;class k{constructor(e){this.defaults=e,this.interceptors={request:new Et,response:new Et}}async request(e,n){try{return await this._request(e,n)}catch(r){if(r instanceof Error){let o;Error.captureStackTrace?Error.captureStackTrace(o={}):o=new Error;const s=o.stack?o.stack.replace(/^.+\n/,""):"";r.stack?s&&!String(r.stack).endsWith(s.replace(/^.+\n.+\n/,""))&&(r.stack+=` -`+s):r.stack=s}throw r}}_request(e,n){typeof e=="string"?(n=n||{},n.url=e):n=e||{},n=j(this.defaults,n);const{transitional:r,paramsSerializer:o,headers:s}=n;r!==void 0&&Y.assertOptions(r,{silentJSONParsing:A.transitional(A.boolean),forcedJSONParsing:A.transitional(A.boolean),clarifyTimeoutError:A.transitional(A.boolean)},!1),o!=null&&(a.isFunction(o)?n.paramsSerializer={serialize:o}:Y.assertOptions(o,{encode:A.function,serialize:A.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let i=s&&a.merge(s.common,s[n.method]);s&&a.forEach(["delete","get","head","post","put","patch","common"],l=>{delete s[l]}),n.headers=R.concat(i,s);const u=[];let p=!0;this.interceptors.request.forEach(function(l){typeof l.runWhen=="function"&&l.runWhen(n)===!1||(p=p&&l.synchronous,u.unshift(l.fulfilled,l.rejected))});const f=[];this.interceptors.response.forEach(function(l){f.push(l.fulfilled,l.rejected)});let c,h=0,E;if(!p){const l=[Pt.bind(this),void 0];for(l.unshift.apply(l,u),l.push.apply(l,f),E=l.length,c=Promise.resolve(n);h{if(!r._listeners)return;let s=r._listeners.length;for(;s-- >0;)r._listeners[s](o);r._listeners=null}),this.promise.then=o=>{let s;const i=new Promise(u=>{r.subscribe(u),s=u}).then(o);return i.cancel=function(){r.unsubscribe(s)},i},e(function(o,s,i){r.reason||(r.reason=new v(o,s,i),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const n=this._listeners.indexOf(e);n!==-1&&this._listeners.splice(n,1)}static source(){let e;return{token:new et(function(n){e=n}),cancel:e}}}const Ve=et;function Ge(t){return function(e){return t.apply(null,e)}}function $e(t){return a.isObject(t)&&t.isAxiosError===!0}const tt={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(tt).forEach(([t,e])=>{tt[e]=t});const Xe=tt;function Ft(t){const e=new q(t),n=nt(q.prototype.request,e);return a.extend(n,q.prototype,e,{allOwnKeys:!0}),a.extend(n,e,null,{allOwnKeys:!0}),n.create=function(r){return Ft(j(t,r))},n}const y=Ft(V);y.Axios=q,y.CanceledError=v,y.CancelToken=Ve,y.isCancel=At,y.VERSION=xt,y.toFormData=B,y.AxiosError=m,y.Cancel=y.CanceledError,y.all=function(t){return Promise.all(t)},y.spread=Ge,y.isAxiosError=$e,y.mergeConfig=j,y.AxiosHeaders=R,y.formToJSON=t=>St(a.isHTMLForm(t)?new FormData(t):t),y.getAdapter=Ct.getAdapter,y.HttpStatusCode=Xe,y.default=y;export{y as a}; diff --git a/assets/engine.io-client-DBBxzneW.js b/assets/engine.io-client-DBBxzneW.js new file mode 100644 index 0000000..1536156 --- /dev/null +++ b/assets/engine.io-client-DBBxzneW.js @@ -0,0 +1 @@ +import{d as W,a as I,e as M,b as D,c as j,f as A,p as S}from"./engine.io-parser-BiEtp6m2.js";import{E as y}from"./@socket.io-Dkula2eQ.js";const a=typeof self<"u"?self:typeof window<"u"?window:Function("return this")();function R(r,...t){return t.reduce((e,s)=>(r.hasOwnProperty(s)&&(e[s]=r[s]),e),{})}const X=a.setTimeout,N=a.clearTimeout;function f(r,t){t.useNativeTimers?(r.setTimeoutFn=X.bind(a),r.clearTimeoutFn=N.bind(a)):(r.setTimeoutFn=a.setTimeout.bind(a),r.clearTimeoutFn=a.clearTimeout.bind(a))}const J=1.33;function z(r){return typeof r=="string"?G(r):Math.ceil((r.byteLength||r.size)*J)}function G(r){let t=0,e=0;for(let s=0,i=r.length;s=57344?e+=3:(s++,e+=4);return e}function $(r){let t="";for(let e in r)r.hasOwnProperty(e)&&(t.length&&(t+="&"),t+=encodeURIComponent(e)+"="+encodeURIComponent(r[e]));return t}function K(r){let t={},e=r.split("&");for(let s=0,i=e.length;s0);return t}function P(){const r=L(+new Date);return r!==C?(q=0,C=r):r+"."+L(q++)}for(;m{this.readyState="paused",t()};if(this.polling||!this.writable){let s=0;this.polling&&(s++,this.once("pollComplete",function(){--s||e()})),this.writable||(s++,this.once("drain",function(){--s||e()}))}else e()}poll(){this.polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){const e=s=>{if(this.readyState==="opening"&&s.type==="open"&&this.onOpen(),s.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(s)};I(t,this.socket.binaryType).forEach(e),this.readyState!=="closed"&&(this.polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this.poll())}doClose(){const t=()=>{this.write([{type:"close"}])};this.readyState==="open"?t():this.once("open",t)}write(t){this.writable=!1,M(t,e=>{this.doWrite(e,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const t=this.opts.secure?"https":"http",e=this.query||{};return this.opts.timestampRequests!==!1&&(e[this.opts.timestampParam]=P()),!this.supportsBinary&&!e.sid&&(e.b64=1),this.createUri(t,e)}request(t={}){return Object.assign(t,{xd:this.xd,cookieJar:this.cookieJar},this.opts),new h(this.uri(),t)}doWrite(t,e){const s=this.request({method:"POST",data:t});s.on("success",e),s.on("error",(i,o)=>{this.onError("xhr post error",i,o)})}doPoll(){const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(e,s)=>{this.onError("xhr poll error",e,s)}),this.pollXhr=t}}class h extends y{constructor(t,e){super(),f(this,e),this.opts=e,this.method=e.method||"GET",this.uri=t,this.data=e.data!==void 0?e.data:null,this.create()}create(){var t;const e=R(this.opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");e.xdomain=!!this.opts.xd;const s=this.xhr=new B(e);try{s.open(this.method,this.uri,!0);try{if(this.opts.extraHeaders){s.setDisableHeaderCheck&&s.setDisableHeaderCheck(!0);for(let i in this.opts.extraHeaders)this.opts.extraHeaders.hasOwnProperty(i)&&s.setRequestHeader(i,this.opts.extraHeaders[i])}}catch{}if(this.method==="POST")try{s.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{s.setRequestHeader("Accept","*/*")}catch{}(t=this.opts.cookieJar)===null||t===void 0||t.addCookies(s),"withCredentials"in s&&(s.withCredentials=this.opts.withCredentials),this.opts.requestTimeout&&(s.timeout=this.opts.requestTimeout),s.onreadystatechange=()=>{var i;s.readyState===3&&((i=this.opts.cookieJar)===null||i===void 0||i.parseCookies(s)),s.readyState===4&&(s.status===200||s.status===1223?this.onLoad():this.setTimeoutFn(()=>{this.onError(typeof s.status=="number"?s.status:0)},0))},s.send(this.data)}catch(i){this.setTimeoutFn(()=>{this.onError(i)},0);return}typeof document<"u"&&(this.index=h.requestsCount++,h.requests[this.index]=this)}onError(t){this.emitReserved("error",t,this.xhr),this.cleanup(!0)}cleanup(t){if(!(typeof this.xhr>"u"||this.xhr===null)){if(this.xhr.onreadystatechange=Y,t)try{this.xhr.abort()}catch{}typeof document<"u"&&delete h.requests[this.index],this.xhr=null}}onLoad(){const t=this.xhr.responseText;t!==null&&(this.emitReserved("data",t),this.emitReserved("success"),this.cleanup())}abort(){this.cleanup()}}if(h.requestsCount=0,h.requests={},typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",U);else if(typeof addEventListener=="function"){const r="onpagehide"in a?"pagehide":"unload";addEventListener(r,U,!1)}}function U(){for(let r in h.requests)h.requests.hasOwnProperty(r)&&h.requests[r].abort()}const v=typeof Promise=="function"&&typeof Promise.resolve=="function"?r=>Promise.resolve().then(r):(r,t)=>t(r,0),g=a.WebSocket||a.MozWebSocket,H=!0,et="arraybuffer",F=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class st extends w{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,s=F?{}:R(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(s.headers=this.opts.extraHeaders);try{this.ws=H&&!F?e?new g(t,e):new g(t):new g(t,e,s)}catch(i){return this.emitReserved("error",i)}this.ws.binaryType=this.socket.binaryType,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 n={};try{H&&this.ws.send(o)}catch{}i&&v(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.close(),this.ws=null)}uri(){const t=this.opts.secure?"wss":"ws",e=this.query||{};return this.opts.timestampRequests&&(e[this.opts.timestampParam]=P()),this.supportsBinary||(e.b64=1),this.createUri(t,e)}check(){return!!g}}class rt extends w{get name(){return"webtransport"}doOpen(){typeof WebTransport=="function"&&(this.transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name]),this.transport.closed.then(()=>{this.onClose()}).catch(t=>{this.onError("webtransport error",t)}),this.transport.ready.then(()=>{this.transport.createBidirectionalStream().then(t=>{const e=j(Number.MAX_SAFE_INTEGER,this.socket.binaryType),s=t.readable.pipeThrough(e).getReader(),i=A();i.readable.pipeTo(t.writable),this.writer=i.writable.getWriter();const o=()=>{s.read().then(({done:u,value:d})=>{u||(this.onPacket(d),o())}).catch(u=>{})};o();const n={type:"open"};this.query.sid&&(n.data=`{"sid":"${this.query.sid}"}`),this.writer.write(n).then(()=>this.onOpen())})}))}write(t){this.writable=!1;for(let e=0;e{i&&v(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this.transport)===null||t===void 0||t.close()}}const it={websocket:st,webtransport:rt,polling:tt},ot=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,nt=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function T(r){if(r.length>2e3)throw"URI too long";const t=r,e=r.indexOf("["),s=r.indexOf("]");e!=-1&&s!=-1&&(r=r.substring(0,e)+r.substring(e,s).replace(/:/g,";")+r.substring(s,r.length));let i=ot.exec(r||""),o={},n=14;for(;n--;)o[nt[n]]=i[n]||"";return e!=-1&&s!=-1&&(o.source=t,o.host=o.host.substring(1,o.host.length-1).replace(/;/g,":"),o.authority=o.authority.replace("[","").replace("]","").replace(/;/g,":"),o.ipv6uri=!0),o.pathNames=at(o,o.path),o.queryKey=ht(o,o.query),o}function at(r,t){const e=/\/{2,9}/g,s=t.replace(e,"/").split("/");return(t.slice(0,1)=="/"||t.length===0)&&s.splice(0,1),t.slice(-1)=="/"&&s.splice(s.length-1,1),s}function ht(r,t){const e={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(s,i,o){i&&(e[i]=o)}),e}class p extends y{constructor(t,e={}){super(),this.binaryType=et,this.writeBuffer=[],t&&typeof t=="object"&&(e=t,t=null),t?(t=T(t),e.hostname=t.host,e.secure=t.protocol==="https"||t.protocol==="wss",e.port=t.port,t.query&&(e.query=t.query)):e.host&&(e.hostname=T(e.host).host),f(this,e),this.secure=e.secure!=null?e.secure:typeof location<"u"&&location.protocol==="https:",e.hostname&&!e.port&&(e.port=this.secure?"443":"80"),this.hostname=e.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=e.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=e.transports||["polling","websocket","webtransport"],this.writeBuffer=[],this.prevBufferLen=0,this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},e),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=K(this.opts.query)),this.id=null,this.upgrades=null,this.pingInterval=null,this.pingTimeout=null,this.pingTimeoutTimer=null,typeof addEventListener=="function"&&(this.opts.closeOnBeforeunload&&(this.beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this.beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this.offlineEventListener=()=>{this.onClose("transport close",{description:"network connection lost"})},addEventListener("offline",this.offlineEventListener,!1))),this.open()}createTransport(t){const e=Object.assign({},this.opts.query);e.EIO=S,e.transport=t,this.id&&(e.sid=this.id);const s=Object.assign({},this.opts,{query:e,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[t]);return new it[t](s)}open(){let t;if(this.opts.rememberUpgrade&&p.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1)t="websocket";else if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}else t=this.transports[0];this.readyState="opening";try{t=this.createTransport(t)}catch{this.transports.shift(),this.open();return}t.open(),this.setTransport(t)}setTransport(t){this.transport&&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",e=>this.onClose("transport close",e))}probe(t){let e=this.createTransport(t),s=!1;p.priorWebsocketSuccess=!1;const i=()=>{s||(e.send([{type:"ping",data:"probe"}]),e.once("packet",c=>{if(!s)if(c.type==="pong"&&c.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",e),!e)return;p.priorWebsocketSuccess=e.name==="websocket",this.transport.pause(()=>{s||this.readyState!=="closed"&&(x(),this.setTransport(e),e.send([{type:"upgrade"}]),this.emitReserved("upgrade",e),e=null,this.upgrading=!1,this.flush())})}else{const l=new Error("probe error");l.transport=e.name,this.emitReserved("upgradeError",l)}}))};function o(){s||(s=!0,x(),e.close(),e=null)}const n=c=>{const l=new Error("probe error: "+c);l.transport=e.name,o(),this.emitReserved("upgradeError",l)};function u(){n("transport closed")}function d(){n("socket closed")}function k(c){e&&c.name!==e.name&&o()}const x=()=>{e.removeListener("open",i),e.removeListener("error",n),e.removeListener("close",u),this.off("close",d),this.off("upgrading",k)};e.once("open",i),e.once("error",n),e.once("close",u),this.once("close",d),this.once("upgrading",k),this.upgrades.indexOf("webtransport")!==-1&&t!=="webtransport"?this.setTimeoutFn(()=>{s||e.open()},200):e.open()}onOpen(){if(this.readyState="open",p.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush(),this.readyState==="open"&&this.opts.upgrade){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,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this.getWritablePackets();this.transport.send(t),this.prevBufferLen=t.length,this.emitReserved("flush")}}getWritablePackets(){if(!(this.maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let t=1;for(let e=0;e0&&t>this.maxPayload)return this.writeBuffer.slice(0,e);t+=2}return this.writeBuffer}write(t,e,s){return this.sendPacket("message",t,e,s),this}send(t,e,s){return this.sendPacket("message",t,e,s),this}sendPacket(t,e,s,i){if(typeof e=="function"&&(i=e,e=void 0),typeof s=="function"&&(i=s,s=null),this.readyState==="closing"||this.readyState==="closed")return;s=s||{},s.compress=s.compress!==!1;const o={type:t,data:e,options:s};this.emitReserved("packetCreate",o),this.writeBuffer.push(o),i&&this.once("flush",i),this.flush()}close(){const t=()=>{this.onClose("forced close"),this.transport.close()},e=()=>{this.off("upgrade",e),this.off("upgradeError",e),t()},s=()=>{this.once("upgrade",e),this.once("upgradeError",e)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?s():t()}):this.upgrading?s():t()),this}onError(t){p.priorWebsocketSuccess=!1,this.emitReserved("error",t),this.onClose("transport error",t)}onClose(t,e){(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")&&(this.clearTimeoutFn(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),typeof removeEventListener=="function"&&(removeEventListener("beforeunload",this.beforeunloadEventListener,!1),removeEventListener("offline",this.offlineEventListener,!1)),this.readyState="closed",this.id=null,this.emitReserved("close",t,e),this.writeBuffer=[],this.prevBufferLen=0)}filterUpgrades(t){const e=[];let s=0;const i=t.length;for(;s{b[s[t]]=t});const w={type:"error",data:"parser error"},U=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",m=typeof ArrayBuffer=="function",k=t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t&&t.buffer instanceof ArrayBuffer,p=({type:t,data:n},r,e)=>U&&n instanceof Blob?r?e(n):D(n,e):m&&(n instanceof ArrayBuffer||k(n))?r?e(n):D(new Blob([n]),e):e(s[t]+(n||"")),D=(t,n)=>{const r=new FileReader;return r.onload=function(){const e=r.result.split(",")[1];n("b"+(e||""))},r.readAsDataURL(t)};function O(t){return t instanceof Uint8Array?t:t instanceof ArrayBuffer?new Uint8Array(t):new Uint8Array(t.buffer,t.byteOffset,t.byteLength)}let d;function q(t,n){if(U&&t.data instanceof Blob)return t.data.arrayBuffer().then(O).then(n);if(m&&(t.data instanceof ArrayBuffer||k(t.data)))return n(O(t.data));p(t,!1,r=>{d||(d=new TextEncoder),n(d.encode(r))})}const V="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",y=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let t=0;t{let n=t.length*.75,r=t.length,e,a=0,f,u,i,o;t[t.length-1]==="="&&(n--,t[t.length-2]==="="&&n--);const l=new ArrayBuffer(n),c=new Uint8Array(l);for(e=0;e>4,c[a++]=(u&15)<<4|i>>2,c[a++]=(i&3)<<6|o&63;return l},x=typeof ArrayBuffer=="function",A=(t,n)=>{if(typeof t!="string")return{type:"message",data:j(t,n)};const r=t.charAt(0);return r==="b"?{type:"message",data:E(t.substring(1),n)}:b[r]?t.length>1?{type:b[r],data:t.substring(1)}:{type:b[r]}:w},E=(t,n)=>{if(x){const r=T(t);return j(r,n)}else return{base64:!0,data:t}},j=(t,n)=>{switch(n){case"blob":return t instanceof Blob?t:new Blob([t]);case"arraybuffer":default:return t instanceof ArrayBuffer?t:t.buffer}},C="",S=(t,n)=>{const r=t.length,e=new Array(r);let a=0;t.forEach((f,u)=>{p(f,!1,i=>{e[u]=i,++a===r&&n(e.join(C))})})},L=(t,n)=>{const r=t.split(C),e=[];for(let a=0;a{const e=r.length;let a;if(e<126)a=new Uint8Array(1),new DataView(a.buffer).setUint8(0,e);else if(e<65536){a=new Uint8Array(3);const f=new DataView(a.buffer);f.setUint8(0,126),f.setUint16(1,e)}else{a=new Uint8Array(9);const f=new DataView(a.buffer);f.setUint8(0,127),f.setBigUint64(1,BigInt(e))}t.data&&typeof t.data!="string"&&(a[0]|=128),n.enqueue(a),n.enqueue(r)})}})}let B;function h(t){return t.reduce((n,r)=>n+r.length,0)}function g(t,n){if(t[0].length===n)return t.shift();const r=new Uint8Array(n);let e=0;for(let a=0;aMath.pow(2,21)-1){i.enqueue(w);break}a=c*Math.pow(2,32)+l.getUint32(4),e=3}else{if(h(r)t){i.enqueue(w);break}}}})}const v=4;export{L as a,p as b,M as c,A as d,S as e,R as f,v as p}; diff --git a/assets/index-BBrqajbs.js b/assets/index-BBrqajbs.js deleted file mode 100644 index 6f34f18..0000000 --- a/assets/index-BBrqajbs.js +++ /dev/null @@ -1 +0,0 @@ -import{j as t,r as h,R as D}from"./react-ePaza90U.js";import{c as Q}from"./react-dom-BGCucnFv.js";import{L as X,B as Z}from"./react-router-dom-hlOzkE61.js";import{B as N,C as O,R as v,a as k,N as y,b as ee,F as A}from"./react-bootstrap-JrysSMUi.js";import{a as B,d as te,e as T}from"./react-router-CSlUcBGA.js";import{u as f,a as I,P as ae}from"./react-redux-Ce23xZ5m.js";import{c as P,a as se}from"./@reduxjs-CJetLCaM.js";import{a as ie}from"./axios-Cm0UX6qg.js";import"./classnames-C9FZUsQl.js";import"./scheduler-CzFDRTuY.js";import"./@remix-run-DyRdwddT.js";import"./@restart-BR1W1S6M.js";import"./dom-helpers-BCHGzjX0.js";import"./prop-types-ZMHxiqrO.js";import"./prop-types-extra-_x66_ok4.js";import"./uncontrollable-CNb32MsV.js";import"./@babel-XUcqRoeX.js";import"./react-transition-group-DoHwZBwe.js";import"./use-sync-external-store-R5Bn9tbY.js";import"./redux-DITMfSWq.js";import"./immer-D6jAg06p.js";import"./reselect-DJRGOWkq.js";import"./redux-thunk-ClJT1hhx.js";(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))n(i);new MutationObserver(i=>{for(const s of i)if(s.type==="childList")for(const o of s.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&n(o)}).observe(document,{childList:!0,subtree:!0});function a(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerPolicy&&(s.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?s.credentials="include":i.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function n(i){if(i.ep)return;i.ep=!0;const s=a(i);fetch(i.href,s)}})();const ne="/",oe="/speech-therapy",le="/mainMenu",re="/debug",_={START_APP_ROUTE:ne,BASE_ROUTE:oe,MAIN_MENU_ROUTE:le,DEBUG_ROUTE:re},ce=()=>{const e=B();return{onClickNavigateToPath:a=>{e(a)}}},R=e=>{const{id:a,classStyle:n,children:i,path:s,type:o,onClick:c,isDisabled:d}=e,{onClickNavigateToPath:l}=ce();return t.jsx(t.Fragment,{children:o==="button"&&c?t.jsx(N,{id:a,type:"button",variant:"primary",className:`${n}`,onTouchEnd:c,disabled:!!d,children:i}):o==="button"&&!c?t.jsx(N,{id:a,type:"button",variant:"primary",className:`${n}`,onTouchEnd:()=>l(s),disabled:!!d,children:i}):t.jsx(N,{id:a,type:o,variant:"primary",className:`${n}`,disabled:!!d,children:i})})},de="_container_yjrep_19",ue="_row_yjrep_39",he="_rowTitle_yjrep_51",pe="_rowButton_yjrep_65",me="_col_yjrep_73",be="_button_yjrep_85",xe="_buttonText_yjrep_103",p={container:de,row:ue,rowTitle:he,rowButton:pe,col:me,button:be,buttonText:xe},ge=()=>t.jsx(t.Fragment,{children:t.jsxs(O,{fluid:!0,className:p.container,children:[t.jsx(v,{className:`${p.row} ${p.rowTitle}`,children:t.jsx(k,{className:p.col,children:t.jsx("p",{children:"Ejercicios Logopedia"})})}),t.jsx(v,{className:`${p.row} ${p.rowButton}`,children:t.jsx(k,{className:p.col,children:t.jsx(R,{id:"start",classStyle:p.button,path:"/mainMenu",type:"button",isDisabled:!1,children:t.jsx("p",{className:p.buttonText,children:"Comenzar"})})})})]})}),ve={isOptionChecked:!1},w=P({name:"menuState",initialState:ve,reducers:{setIsOptionChecked:(e,a)=>{e.isOptionChecked=a.payload}}}),{setIsOptionChecked:L}=w.actions,ke=w.reducer,je=()=>{const[e,a]=h.useState(1),[n,i]=h.useState(""),{printDebug:s}=h.useContext($),o=f(),c=()=>{a(u=>u+1),l()},d=()=>{a(u=>u-1),l()},l=()=>{o(L(!1))};return h.useEffect(()=>{(async()=>{try{const u=await ie.get("https://speech-therapy-server.onrender.com/api/data");i(u.data.message),console.log("Inside useEffect received data => "+u.data.message),s("Inside useEffect received data => "+u.data.message)}catch(u){console.error("Error al obtener datos del servidor:",u)}})()},[]),{menuNumber:e,handleNextButtonClick:c,handlePreviousButtonClick:d}},Ce=e=>{const{links:a}=e,n=B(),i=o=>{n(o)},s={color:"white",fontWeight:"bold",backgroundColor:"transparent",border:"none",textDecoration:"none"};return t.jsx(y,{collapseOnSelect:!0,expand:"md",bg:"dark",children:t.jsxs(O,{style:{width:"100%"},children:[t.jsx(y.Brand,{style:{color:"white",fontWeight:"bold"},href:"#home",children:"Logopedia"}),t.jsx(y.Toggle,{style:{backgroundColor:"white"},"aria-controls":"responsive-navbar-nav"}),t.jsx(y.Collapse,{id:"responsive-navbar-nav",children:t.jsx(ee,{className:"justify-content-end",style:{width:"100%",color:"white",fontWeight:"bold"},children:a.map((o,c)=>t.jsx(N,{variant:"link",style:s,onClick:()=>{i(o.href)},children:o.label},c))})})]})})},Ne="_menuView_o2kvl_1",Se="_container_o2kvl_13",ye="_col_o2kvl_33",fe="_content_o2kvl_45",_e="_title_o2kvl_63",Ee="_buttonDiv_o2kvl_77",Me="_button_o2kvl_77",Oe="_buttonText_o2kvl_107",b={menuView:Ne,container:Se,col:ye,content:fe,title:_e,buttonDiv:Ee,button:Me,buttonText:Oe},j=e=>{const{title:a,navLinks:n,children:i,buttons:s}=e,o=I(c=>c.menuState.isOptionChecked);return t.jsxs("div",{className:b.menuView,children:[t.jsx(Ce,{links:n}),t.jsx(O,{fluid:!0,className:b.container,children:t.jsx(v,{className:`${b.content}`,children:t.jsxs(k,{className:"p-0",children:[t.jsx(v,{children:t.jsx(k,{children:t.jsx("h1",{className:b.title,children:a})})}),t.jsx(v,{children:t.jsx(k,{className:"p-10",children:t.jsx("div",{children:i})})}),t.jsx(v,{children:t.jsx(k,{className:"p-10",children:t.jsx("div",{className:b.buttonDiv,children:s.map((c,d)=>t.jsx(R,{id:c.id,classStyle:b.button,onClick:c.onClick,path:c.path,type:"button",isDisabled:!o,children:t.jsx("p",{className:b.buttonText,children:c.label})},d))})})})]})})})]})},Te={variables:{task:"",mode:"",source:"",responseMode:"",algorithm:""}},U=P({name:"facialModuleState",initialState:Te,reducers:{setTask:(e,a)=>{e.variables.task=a.payload},setMode:(e,a)=>{e.variables.mode=a.payload},setSource:(e,a)=>{e.variables.source=a.payload},setResponseMode:(e,a)=>{e.variables.responseMode=a.payload},setAlgorithm:(e,a)=>{e.variables.algorithm=a.payload}}}),{setTask:Pe,setMode:De,setSource:Ae,setResponseMode:Be,setAlgorithm:Ie}=U.actions,Re=U.reducer,we=()=>{const e=f(),a=(l,u)=>{switch(d(),u){case"task-id":n(l.target.value);break;case"mode-id":i(l.target.value);break;case"source-id":s(l.target.value);break;case"response-id":o(l.target.value);break;case"algorithm-id":c(l.target.value);break}},n=l=>{e(Pe(l))},i=l=>{e(De(l))},s=l=>{e(Ae(l))},o=l=>{e(Be(l))},c=l=>{e(Ie(l))},d=()=>{e(L(!0))};return{handleOptionChange:a}},C=e=>{const{variableId:a,items:n}=e,{handleOptionChange:i}=we();return t.jsxs(t.Fragment,{children:[t.jsx("h4",{children:"Seleccione una de las siguientes opciones: "}),t.jsx(A,{children:t.jsx("div",{className:"mb-3",children:n.map((s,o)=>t.jsx(A.Check,{type:"radio",id:a,label:s.label,value:s.label,name:"options",onChange:c=>i(c,a)},o))},"default-radio")})]})},Le=e=>{const{handleNextButtonClick:a}=e,n=[{label:"Debug",href:"/debug"},{label:"Salir",href:"/"}],i=[{label:"Detectar la cara"},{label:"Detectar la persona"},{label:"Detectar puntos clave de la cara"},{label:"Detectar la expresi\xF3n facial"},{label:"Detectar la edad y el g\xE9nero"},{label:"Reconocimiento facial"},{label:"Eliminar fondo"}],s=[{id:"next",path:"/mainMenu",label:"Siguiente",onClick:a}];return t.jsx(j,{title:"1.- TAREA",navLinks:n,buttons:s,children:t.jsx(C,{variableId:"task-id",items:i})})},Ue=e=>{const{handleNextButtonClick:a,handlePreviousButtonClick:n}=e,i=[{label:"Salir",href:"/"}],s=[{label:"Modo imagen"},{label:"Modo v\xEDdeo"}],o=[{id:"previous",path:"/mainMenu",label:"Anterior",onClick:n},{id:"next",path:"/mainMenu",label:"Siguiente",onClick:a}];return t.jsx(j,{title:"2.- MODO",navLinks:i,buttons:o,children:t.jsx(C,{variableId:"mode-id",items:s})})},Ve=e=>{const{handleNextButtonClick:a,handlePreviousButtonClick:n}=e,i=[{label:"Salir",href:"/"}],s=[{label:"Respuesta en texto"},{label:"Respuesta sobre imagen"}],o=[{id:"previous",path:"/mainMenu",label:"Anterior",onClick:n},{id:"next",path:"/mainMenu",label:"Siguiente",onClick:a}];return t.jsx(j,{title:"4.- RESPUESTA",navLinks:i,buttons:o,children:t.jsx(C,{variableId:"algorithm-id",items:s})})},He=e=>{const{handleNextButtonClick:a,handlePreviousButtonClick:n}=e,i=[{label:"Salir",href:"/"}],s=[{label:"Subir im\xE1genes"},{label:"Tomar foto"}],o=[{id:"previous",path:"/mainMenu",label:"Anterior",onClick:n},{id:"next",path:"/mainMenu",label:"Siguiente",onClick:a}];return t.jsx(j,{title:"3.- FUENTE IMAGEN",navLinks:i,buttons:o,children:t.jsx(C,{variableId:"source-id",items:s})})},qe=e=>{const{handleNextButtonClick:a,handlePreviousButtonClick:n}=e,i=[{label:"Salir",href:"/"}],s=[{label:"Subir v\xEDdeo"},{label:"Grabar v\xEDdeo"}],o=[{id:"previous",path:"/mainMenu",label:"Anterior",onClick:n},{id:"next",path:"/mainMenu",label:"Siguiente",onClick:a}];return t.jsx(j,{title:"3.- FUENTE V\xCDDEO",navLinks:i,buttons:o,children:t.jsx(C,{variableId:"source-id",items:s})})},$e=e=>{let a;const{handleNextButtonClick:n,handlePreviousButtonClick:i}=e,s=I(o=>o.facialModuleState.variables.mode);switch(console.log("+++ Inside SourceMenuView - facialModuleMode => "+s),s){case"Modo imagen":a=t.jsx(He,{handleNextButtonClick:n,handlePreviousButtonClick:i});break;case"Modo v\xEDdeo":a=t.jsx(qe,{handleNextButtonClick:n,handlePreviousButtonClick:i});break;default:a=null}return t.jsx("div",{children:a})},Fe=e=>{const{handleNextButtonClick:a,handlePreviousButtonClick:n}=e,i=[{label:"Salir",href:"/"}],s=[{label:"YOLOv8"},{label:"InsightFace"}],o=[{id:"previous",path:"/mainMenu",label:"Anterior",onClick:n},{id:"finish",path:"/mainMenu",label:"Acabar",onClick:a}];return t.jsx(j,{title:"5.- ALGORITMO",navLinks:i,buttons:o,children:t.jsx(C,{variableId:"response-id",items:s})})},Ge=()=>{let e;const{menuNumber:a,handleNextButtonClick:n,handlePreviousButtonClick:i}=je();switch(a){case 1:e=t.jsx(Le,{handleNextButtonClick:n});break;case 2:e=t.jsx(Ue,{handleNextButtonClick:n,handlePreviousButtonClick:i});break;case 3:e=t.jsx($e,{handleNextButtonClick:n,handlePreviousButtonClick:i});break;case 4:e=t.jsx(Ve,{handleNextButtonClick:n,handlePreviousButtonClick:i});break;case 5:e=t.jsx(Fe,{handleNextButtonClick:n,handlePreviousButtonClick:i});break;default:e=null}return t.jsx("div",{children:e})},Ke=({msg:e})=>t.jsx(t.Fragment,{children:t.jsx("div",{className:"debug-container",children:t.jsxs("div",{className:"debug-container-grid",children:[t.jsx("div",{className:"debug-container-grid-item-traza",children:t.jsx("ul",{children:e.map((a,n)=>a&&t.jsx("li",{children:a},n))})}),t.jsx("div",{className:"debug-container-grid-item-input-btns",children:t.jsx("div",{className:"debug-container-grid-item-input-field",children:t.jsxs("div",{className:"input-group mb-3",children:[t.jsx("div",{className:"input-group-prepend",children:t.jsx("span",{className:"input-group-text",id:"inputGroup-sizing-default",children:"UID"})}),t.jsx("input",{type:"number",name:"uid",placeholder:"UID del usuario que ha realizado test usabilidad",pattern:"^[0-9]+$",title:"Solo se permiten n\xFAmeros",className:"form-control","aria-label":"Default","aria-describedby":"inputGroup-sizing-default",required:!0}),t.jsx(X,{to:"/",children:t.jsx(N,{style:{marginLeft:"10px"},children:"Volver"})})]})})})]})})});var x=(e=>(e.SEND_SPEECH="send-msg",e.START_SPEECH="start-saying-msg",e.END_SPEECH="end-saying-msg",e.NONE="none",e))(x||{}),m=(e=>(e.LOADING="loading",e.OK="ok",e.NOT_OK="not-ok",e))(m||{}),E=(e=>(e.MICROPHONE_OPENED="opened",e.MICROPHONE_CLOSED="closed",e))(E||{});const V={data:{intentType:"",userRequest:""},voiceAPIStatus:m.LOADING,voiceMicroStatus:E.MICROPHONE_CLOSED,voiceMsgProps:{body:"",status:x.NONE},deviceId:"1",processingUserRequest:!1},H=P({name:"voiceState",initialState:V,reducers:{setVoiceAPIStatus:(e,a)=>{e.voiceAPIStatus=a.payload},setVoiceMicroStatus:(e,a)=>{e.voiceMicroStatus=a.payload},setVoiceMsgBody:(e,a)=>{e.voiceMsgProps.body=a.payload},setVoiceMsgStatus:(e,a)=>{e.voiceMsgProps.status=a.payload},setDeviceId:(e,a)=>{e.deviceId=a.payload},setProcessingUserRequest:(e,a)=>{e.processingUserRequest=a.payload},setUserSpeechData:(e,a)=>{e.data=a.payload},resetUserSpeechData:e=>{e.data=V.data}}}),{setVoiceAPIStatus:M,setVoiceMicroStatus:q,setVoiceMsgBody:ft,setVoiceMsgStatus:S,setDeviceId:ze,setProcessingUserRequest:We,setUserSpeechData:Je,resetUserSpeechData:Ye}=H.actions,Qe=H.reducer,Xe=()=>{const[e,a]=h.useState(null),[n,i]=h.useState([]),s=f(),o=h.useCallback(async()=>{l("Beginning Alexa.create"),window.Alexa?window.Alexa.create({version:"1.0"}).then(r=>{r.alexa?(a(r.alexa),r.alexa.skill.onMessage(G),r.alexa.speech.onStarted(K),r.alexa.speech.onStopped(z),r.alexa.voice.onMicrophoneOpened(W),r.alexa.voice.onMicrophoneClosed(J),l("Alexa is ready - newest version 5 :) Received initial data 45"),r.message.deviceId&&(l("Alexa Skill init data: "+r.message.deviceId),console.log("Alexa Skill init data: "+r.message.deviceId),s(ze(r.message.deviceId))),s(M(m.OK))):(l(`Alexa failed to initialize, code: ${r.code}`),s(M(m.NOT_OK)))}).catch(r=>{l(`Alexa not ready :(. Error: ${r}`),s(M(m.NOT_OK))}):s(M(m.NOT_OK))},[]),c=r=>{i(g=>[...g,r]),console.log(r)},d=()=>{i([])},l=r=>{c(typeof r!="string"?JSON.stringify(r,null,2):r)},u=r=>{r.statusCode==200?l("message was sent to backend successfully"):(s(S(x.END_SPEECH)),l("failed to send message to skill backend:"))},F=h.useCallback(async r=>{try{l("sending message to skill endpoint ==> "+JSON.stringify(r)),l("+++ INSIDE sendMessage - alexaClient ==> "+e),await e.skill.sendMessage(r,u)}catch(g){s(S(x.END_SPEECH)),l("Alexa error ==> "+g)}},[e]),G=r=>{let g;l("Web APP received a message from the skill endpoint"),l(r),r&&(g={intentType:r.intentType,userRequest:r.userRequest},s(We(!0)),s(Je(g)))},K=()=>{s(S(x.START_SPEECH))},z=()=>{s(S(x.END_SPEECH))},W=()=>{s(q(E.MICROPHONE_OPENED))},J=()=>{s(q(E.MICROPHONE_CLOSED))},Y=h.useCallback(()=>{s(Ye())},[]);return h.useEffect(()=>{o()},[]),{debugMessages:n,printDebug:l,sendMessage:F,resetVoiceIntent:Y,resetDebugMessages:d}},Ze=()=>{const e=f(),{debugMessages:a,printDebug:n,sendMessage:i,resetDebugMessages:s}=Xe();return{debugMessages:a,printDebug:n,sendLogToAlexa:async(o,c)=>{o===m.OK&&await i({intentRequest:"log-text-intent",logTxt:c})},sendTextToAlexa:async(o,c,d)=>{o===m.OK&&(e(S(x.SEND_SPEECH)),await i({intentRequest:"text-to-speech-intent",speech:c,otherInfo:d}))},resetDebugMessages:s}};D.createContext({});const $=D.createContext({});function et(){const{debugMessages:e,printDebug:a,sendLogToAlexa:n,sendTextToAlexa:i,resetDebugMessages:s}=Ze();return t.jsx(t.Fragment,{children:t.jsx($.Provider,{value:{debugMessages:e,printDebug:a,sendLogToAlexa:n,sendTextToAlexa:i,resetDebugMessages:s},children:t.jsx(Z,{basename:_.BASE_ROUTE,children:t.jsxs(te,{children:[t.jsx(T,{path:_.START_APP_ROUTE,element:t.jsx(ge,{})}),t.jsx(T,{path:_.MAIN_MENU_ROUTE,element:t.jsx(Ge,{})}),t.jsx(T,{path:_.DEBUG_ROUTE,element:t.jsx(Ke,{msg:e})})]})})})})}const tt=se({reducer:{facialModuleState:Re,menuState:ke,voiceState:Qe}});Q.createRoot(document.getElementById("root")).render(t.jsx(t.Fragment,{children:t.jsx(ae,{store:tt,children:t.jsx(et,{})})})); diff --git a/assets/index-BFiUKQAs.js b/assets/index-BFiUKQAs.js new file mode 100644 index 0000000..2f9c00c --- /dev/null +++ b/assets/index-BFiUKQAs.js @@ -0,0 +1 @@ +import{j as t,r as u,R as D}from"./react-ePaza90U.js";import{c as X}from"./react-dom-BGCucnFv.js";import{L as Z,B as ee}from"./react-router-dom-hlOzkE61.js";import{B as C,C as O,R as g,a as v,N as S,b as te,F as A}from"./react-bootstrap-JrysSMUi.js";import{a as B,d as ae,e as T}from"./react-router-CSlUcBGA.js";import{u as y,a as I,P as se}from"./react-redux-Ce23xZ5m.js";import{c as P,a as ie}from"./@reduxjs-CJetLCaM.js";import{l as ne}from"./socket.io-client-DFi9RC7o.js";import"./classnames-C9FZUsQl.js";import"./scheduler-CzFDRTuY.js";import"./@remix-run-DyRdwddT.js";import"./@restart-BR1W1S6M.js";import"./dom-helpers-BCHGzjX0.js";import"./prop-types-ZMHxiqrO.js";import"./prop-types-extra-_x66_ok4.js";import"./uncontrollable-CNb32MsV.js";import"./@babel-XUcqRoeX.js";import"./react-transition-group-DoHwZBwe.js";import"./use-sync-external-store-R5Bn9tbY.js";import"./redux-DITMfSWq.js";import"./immer-D6jAg06p.js";import"./reselect-DJRGOWkq.js";import"./redux-thunk-ClJT1hhx.js";import"./engine.io-client-DBBxzneW.js";import"./engine.io-parser-BiEtp6m2.js";import"./@socket.io-Dkula2eQ.js";import"./socket.io-parser-BBkuslX-.js";(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))n(i);new MutationObserver(i=>{for(const s of i)if(s.type==="childList")for(const o of s.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&n(o)}).observe(document,{childList:!0,subtree:!0});function a(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerPolicy&&(s.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?s.credentials="include":i.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function n(i){if(i.ep)return;i.ep=!0;const s=a(i);fetch(i.href,s)}})();const oe="/",le="/speech-therapy",re="/mainMenu",ce="/debug",f={START_APP_ROUTE:oe,BASE_ROUTE:le,MAIN_MENU_ROUTE:re,DEBUG_ROUTE:ce},de=()=>{const e=B();return{onClickNavigateToPath:a=>{e(a)}}},R=e=>{const{id:a,classStyle:n,children:i,path:s,type:o,onClick:c,isDisabled:d}=e,{onClickNavigateToPath:l}=de();return t.jsx(t.Fragment,{children:o==="button"&&c?t.jsx(C,{id:a,type:"button",variant:"primary",className:`${n}`,onTouchEnd:c,disabled:!!d,children:i}):o==="button"&&!c?t.jsx(C,{id:a,type:"button",variant:"primary",className:`${n}`,onTouchEnd:()=>l(s),disabled:!!d,children:i}):t.jsx(C,{id:a,type:o,variant:"primary",className:`${n}`,disabled:!!d,children:i})})},ue="_container_yjrep_19",he="_row_yjrep_39",pe="_rowTitle_yjrep_51",me="_rowButton_yjrep_65",be="_col_yjrep_73",xe="_button_yjrep_85",ge="_buttonText_yjrep_103",h={container:ue,row:he,rowTitle:pe,rowButton:me,col:be,button:xe,buttonText:ge},ve=()=>t.jsx(t.Fragment,{children:t.jsxs(O,{fluid:!0,className:h.container,children:[t.jsx(g,{className:`${h.row} ${h.rowTitle}`,children:t.jsx(v,{className:h.col,children:t.jsx("p",{children:"Ejercicios Logopedia"})})}),t.jsx(g,{className:`${h.row} ${h.rowButton}`,children:t.jsx(v,{className:h.col,children:t.jsx(R,{id:"start",classStyle:h.button,path:"/mainMenu",type:"button",isDisabled:!1,children:t.jsx("p",{className:h.buttonText,children:"Comenzar"})})})})]})}),ke={isOptionChecked:!1},w=P({name:"menuState",initialState:ke,reducers:{setIsOptionChecked:(e,a)=>{e.isOptionChecked=a.payload}}}),{setIsOptionChecked:L}=w.actions,je=w.reducer,Ce="https://192.168.1.109",U=ne(Ce),Ne=()=>{const[e,a]=u.useState(1);u.useState(""),u.useContext($);const n=y(),i=()=>{a(d=>d+1),o()},s=()=>{a(d=>d-1),o()},o=()=>{n(L(!1))},c=()=>{U.emit("tomarFoto")};return u.useEffect(()=>{console.log("Sending image to socket io..."),c()},[]),u.useEffect(()=>{U.on("fotoLista",d=>{console.log("Received image by socket => "+d)})},[]),{menuNumber:e,handleNextButtonClick:i,handlePreviousButtonClick:s}},Se=e=>{const{links:a}=e,n=B(),i=o=>{n(o)},s={color:"white",fontWeight:"bold",backgroundColor:"transparent",border:"none",textDecoration:"none"};return t.jsx(S,{collapseOnSelect:!0,expand:"md",bg:"dark",children:t.jsxs(O,{style:{width:"100%"},children:[t.jsx(S.Brand,{style:{color:"white",fontWeight:"bold"},href:"#home",children:"Logopedia"}),t.jsx(S.Toggle,{style:{backgroundColor:"white"},"aria-controls":"responsive-navbar-nav"}),t.jsx(S.Collapse,{id:"responsive-navbar-nav",children:t.jsx(te,{className:"justify-content-end",style:{width:"100%",color:"white",fontWeight:"bold"},children:a.map((o,c)=>t.jsx(C,{variant:"link",style:s,onClick:()=>{i(o.href)},children:o.label},c))})})]})})},ye="_menuView_o2kvl_1",fe="_container_o2kvl_13",_e="_col_o2kvl_33",Ee="_content_o2kvl_45",Me="_title_o2kvl_63",Oe="_buttonDiv_o2kvl_77",Te="_button_o2kvl_77",Pe="_buttonText_o2kvl_107",m={menuView:ye,container:fe,col:_e,content:Ee,title:Me,buttonDiv:Oe,button:Te,buttonText:Pe},k=e=>{const{title:a,navLinks:n,children:i,buttons:s}=e,o=I(c=>c.menuState.isOptionChecked);return t.jsxs("div",{className:m.menuView,children:[t.jsx(Se,{links:n}),t.jsx(O,{fluid:!0,className:m.container,children:t.jsx(g,{className:`${m.content}`,children:t.jsxs(v,{className:"p-0",children:[t.jsx(g,{children:t.jsx(v,{children:t.jsx("h1",{className:m.title,children:a})})}),t.jsx(g,{children:t.jsx(v,{className:"p-10",children:t.jsx("div",{children:i})})}),t.jsx(g,{children:t.jsx(v,{className:"p-10",children:t.jsx("div",{className:m.buttonDiv,children:s.map((c,d)=>t.jsx(R,{id:c.id,classStyle:m.button,onClick:c.onClick,path:c.path,type:"button",isDisabled:!o,children:t.jsx("p",{className:m.buttonText,children:c.label})},d))})})})]})})})]})},De={variables:{task:"",mode:"",source:"",responseMode:"",algorithm:""}},V=P({name:"facialModuleState",initialState:De,reducers:{setTask:(e,a)=>{e.variables.task=a.payload},setMode:(e,a)=>{e.variables.mode=a.payload},setSource:(e,a)=>{e.variables.source=a.payload},setResponseMode:(e,a)=>{e.variables.responseMode=a.payload},setAlgorithm:(e,a)=>{e.variables.algorithm=a.payload}}}),{setTask:Ae,setMode:Be,setSource:Ie,setResponseMode:Re,setAlgorithm:we}=V.actions,Le=V.reducer,Ue=()=>{const e=y(),a=(l,M)=>{switch(d(),M){case"task-id":n(l.target.value);break;case"mode-id":i(l.target.value);break;case"source-id":s(l.target.value);break;case"response-id":o(l.target.value);break;case"algorithm-id":c(l.target.value);break}},n=l=>{e(Ae(l))},i=l=>{e(Be(l))},s=l=>{e(Ie(l))},o=l=>{e(Re(l))},c=l=>{e(we(l))},d=()=>{e(L(!0))};return{handleOptionChange:a}},j=e=>{const{variableId:a,items:n}=e,{handleOptionChange:i}=Ue();return t.jsxs(t.Fragment,{children:[t.jsx("h4",{children:"Seleccione una de las siguientes opciones: "}),t.jsx(A,{children:t.jsx("div",{className:"mb-3",children:n.map((s,o)=>t.jsx(A.Check,{type:"radio",id:a,label:s.label,value:s.label,name:"options",onChange:c=>i(c,a)},o))},"default-radio")})]})},Ve=e=>{const{handleNextButtonClick:a}=e,n=[{label:"Debug",href:"/debug"},{label:"Salir",href:"/"}],i=[{label:"Detectar la cara"},{label:"Detectar la persona"},{label:"Detectar puntos clave de la cara"},{label:"Detectar la expresi\xF3n facial"},{label:"Detectar la edad y el g\xE9nero"},{label:"Reconocimiento facial"},{label:"Eliminar fondo"}],s=[{id:"next",path:"/mainMenu",label:"Siguiente",onClick:a}];return t.jsx(k,{title:"1.- TAREA",navLinks:n,buttons:s,children:t.jsx(j,{variableId:"task-id",items:i})})},He=e=>{const{handleNextButtonClick:a,handlePreviousButtonClick:n}=e,i=[{label:"Salir",href:"/"}],s=[{label:"Modo imagen"},{label:"Modo v\xEDdeo"}],o=[{id:"previous",path:"/mainMenu",label:"Anterior",onClick:n},{id:"next",path:"/mainMenu",label:"Siguiente",onClick:a}];return t.jsx(k,{title:"2.- MODO",navLinks:i,buttons:o,children:t.jsx(j,{variableId:"mode-id",items:s})})},qe=e=>{const{handleNextButtonClick:a,handlePreviousButtonClick:n}=e,i=[{label:"Salir",href:"/"}],s=[{label:"Respuesta en texto"},{label:"Respuesta sobre imagen"}],o=[{id:"previous",path:"/mainMenu",label:"Anterior",onClick:n},{id:"next",path:"/mainMenu",label:"Siguiente",onClick:a}];return t.jsx(k,{title:"4.- RESPUESTA",navLinks:i,buttons:o,children:t.jsx(j,{variableId:"algorithm-id",items:s})})},Fe=e=>{const{handleNextButtonClick:a,handlePreviousButtonClick:n}=e,i=[{label:"Salir",href:"/"}],s=[{label:"Subir im\xE1genes"},{label:"Tomar foto"}],o=[{id:"previous",path:"/mainMenu",label:"Anterior",onClick:n},{id:"next",path:"/mainMenu",label:"Siguiente",onClick:a}];return t.jsx(k,{title:"3.- FUENTE IMAGEN",navLinks:i,buttons:o,children:t.jsx(j,{variableId:"source-id",items:s})})},$e=e=>{const{handleNextButtonClick:a,handlePreviousButtonClick:n}=e,i=[{label:"Salir",href:"/"}],s=[{label:"Subir v\xEDdeo"},{label:"Grabar v\xEDdeo"}],o=[{id:"previous",path:"/mainMenu",label:"Anterior",onClick:n},{id:"next",path:"/mainMenu",label:"Siguiente",onClick:a}];return t.jsx(k,{title:"3.- FUENTE V\xCDDEO",navLinks:i,buttons:o,children:t.jsx(j,{variableId:"source-id",items:s})})},Ge=e=>{let a;const{handleNextButtonClick:n,handlePreviousButtonClick:i}=e,s=I(o=>o.facialModuleState.variables.mode);switch(console.log("+++ Inside SourceMenuView - facialModuleMode => "+s),s){case"Modo imagen":a=t.jsx(Fe,{handleNextButtonClick:n,handlePreviousButtonClick:i});break;case"Modo v\xEDdeo":a=t.jsx($e,{handleNextButtonClick:n,handlePreviousButtonClick:i});break;default:a=null}return t.jsx("div",{children:a})},Ke=e=>{const{handleNextButtonClick:a,handlePreviousButtonClick:n}=e,i=[{label:"Salir",href:"/"}],s=[{label:"YOLOv8"},{label:"InsightFace"}],o=[{id:"previous",path:"/mainMenu",label:"Anterior",onClick:n},{id:"finish",path:"/mainMenu",label:"Acabar",onClick:a}];return t.jsx(k,{title:"5.- ALGORITMO",navLinks:i,buttons:o,children:t.jsx(j,{variableId:"response-id",items:s})})},ze=()=>{let e;const{menuNumber:a,handleNextButtonClick:n,handlePreviousButtonClick:i}=Ne();switch(a){case 1:e=t.jsx(Ve,{handleNextButtonClick:n});break;case 2:e=t.jsx(He,{handleNextButtonClick:n,handlePreviousButtonClick:i});break;case 3:e=t.jsx(Ge,{handleNextButtonClick:n,handlePreviousButtonClick:i});break;case 4:e=t.jsx(qe,{handleNextButtonClick:n,handlePreviousButtonClick:i});break;case 5:e=t.jsx(Ke,{handleNextButtonClick:n,handlePreviousButtonClick:i});break;default:e=null}return t.jsx("div",{children:e})},We=({msg:e})=>t.jsx(t.Fragment,{children:t.jsx("div",{className:"debug-container",children:t.jsxs("div",{className:"debug-container-grid",children:[t.jsx("div",{className:"debug-container-grid-item-traza",children:t.jsx("ul",{children:e.map((a,n)=>a&&t.jsx("li",{children:a},n))})}),t.jsx("div",{className:"debug-container-grid-item-input-btns",children:t.jsx("div",{className:"debug-container-grid-item-input-field",children:t.jsxs("div",{className:"input-group mb-3",children:[t.jsx("div",{className:"input-group-prepend",children:t.jsx("span",{className:"input-group-text",id:"inputGroup-sizing-default",children:"UID"})}),t.jsx("input",{type:"number",name:"uid",placeholder:"UID del usuario que ha realizado test usabilidad",pattern:"^[0-9]+$",title:"Solo se permiten n\xFAmeros",className:"form-control","aria-label":"Default","aria-describedby":"inputGroup-sizing-default",required:!0}),t.jsx(Z,{to:"/",children:t.jsx(C,{style:{marginLeft:"10px"},children:"Volver"})})]})})})]})})});var b=(e=>(e.SEND_SPEECH="send-msg",e.START_SPEECH="start-saying-msg",e.END_SPEECH="end-saying-msg",e.NONE="none",e))(b||{}),p=(e=>(e.LOADING="loading",e.OK="ok",e.NOT_OK="not-ok",e))(p||{}),_=(e=>(e.MICROPHONE_OPENED="opened",e.MICROPHONE_CLOSED="closed",e))(_||{});const H={data:{intentType:"",userRequest:""},voiceAPIStatus:p.LOADING,voiceMicroStatus:_.MICROPHONE_CLOSED,voiceMsgProps:{body:"",status:b.NONE},deviceId:"1",processingUserRequest:!1},q=P({name:"voiceState",initialState:H,reducers:{setVoiceAPIStatus:(e,a)=>{e.voiceAPIStatus=a.payload},setVoiceMicroStatus:(e,a)=>{e.voiceMicroStatus=a.payload},setVoiceMsgBody:(e,a)=>{e.voiceMsgProps.body=a.payload},setVoiceMsgStatus:(e,a)=>{e.voiceMsgProps.status=a.payload},setDeviceId:(e,a)=>{e.deviceId=a.payload},setProcessingUserRequest:(e,a)=>{e.processingUserRequest=a.payload},setUserSpeechData:(e,a)=>{e.data=a.payload},resetUserSpeechData:e=>{e.data=H.data}}}),{setVoiceAPIStatus:E,setVoiceMicroStatus:F,setVoiceMsgBody:Pt,setVoiceMsgStatus:N,setDeviceId:Je,setProcessingUserRequest:Ye,setUserSpeechData:Qe,resetUserSpeechData:Xe}=q.actions,Ze=q.reducer,et=()=>{const[e,a]=u.useState(null),[n,i]=u.useState([]),s=y(),o=u.useCallback(async()=>{l("Beginning Alexa.create"),window.Alexa?window.Alexa.create({version:"1.0"}).then(r=>{r.alexa?(a(r.alexa),r.alexa.skill.onMessage(K),r.alexa.speech.onStarted(z),r.alexa.speech.onStopped(W),r.alexa.voice.onMicrophoneOpened(J),r.alexa.voice.onMicrophoneClosed(Y),l("Alexa is ready - newest version 5 :) Received initial data 45"),r.message.deviceId&&(l("Alexa Skill init data: "+r.message.deviceId),console.log("Alexa Skill init data: "+r.message.deviceId),s(Je(r.message.deviceId))),s(E(p.OK))):(l(`Alexa failed to initialize, code: ${r.code}`),s(E(p.NOT_OK)))}).catch(r=>{l(`Alexa not ready :(. Error: ${r}`),s(E(p.NOT_OK))}):s(E(p.NOT_OK))},[]),c=r=>{i(x=>[...x,r]),console.log(r)},d=()=>{i([])},l=r=>{c(typeof r!="string"?JSON.stringify(r,null,2):r)},M=r=>{r.statusCode==200?l("message was sent to backend successfully"):(s(N(b.END_SPEECH)),l("failed to send message to skill backend:"))},G=u.useCallback(async r=>{try{l("sending message to skill endpoint ==> "+JSON.stringify(r)),l("+++ INSIDE sendMessage - alexaClient ==> "+e),await e.skill.sendMessage(r,M)}catch(x){s(N(b.END_SPEECH)),l("Alexa error ==> "+x)}},[e]),K=r=>{let x;l("Web APP received a message from the skill endpoint"),l(r),r&&(x={intentType:r.intentType,userRequest:r.userRequest},s(Ye(!0)),s(Qe(x)))},z=()=>{s(N(b.START_SPEECH))},W=()=>{s(N(b.END_SPEECH))},J=()=>{s(F(_.MICROPHONE_OPENED))},Y=()=>{s(F(_.MICROPHONE_CLOSED))},Q=u.useCallback(()=>{s(Xe())},[]);return u.useEffect(()=>{o()},[]),{debugMessages:n,printDebug:l,sendMessage:G,resetVoiceIntent:Q,resetDebugMessages:d}},tt=()=>{const e=y(),{debugMessages:a,printDebug:n,sendMessage:i,resetDebugMessages:s}=et();return{debugMessages:a,printDebug:n,sendLogToAlexa:async(o,c)=>{o===p.OK&&await i({intentRequest:"log-text-intent",logTxt:c})},sendTextToAlexa:async(o,c,d)=>{o===p.OK&&(e(N(b.SEND_SPEECH)),await i({intentRequest:"text-to-speech-intent",speech:c,otherInfo:d}))},resetDebugMessages:s}};D.createContext({});const $=D.createContext({});function at(){const{debugMessages:e,printDebug:a,sendLogToAlexa:n,sendTextToAlexa:i,resetDebugMessages:s}=tt();return t.jsx(t.Fragment,{children:t.jsx($.Provider,{value:{debugMessages:e,printDebug:a,sendLogToAlexa:n,sendTextToAlexa:i,resetDebugMessages:s},children:t.jsx(ee,{basename:f.BASE_ROUTE,children:t.jsxs(ae,{children:[t.jsx(T,{path:f.START_APP_ROUTE,element:t.jsx(ve,{})}),t.jsx(T,{path:f.MAIN_MENU_ROUTE,element:t.jsx(ze,{})}),t.jsx(T,{path:f.DEBUG_ROUTE,element:t.jsx(We,{msg:e})})]})})})})}const st=ie({reducer:{facialModuleState:Le,menuState:je,voiceState:Ze}});X.createRoot(document.getElementById("root")).render(t.jsx(t.Fragment,{children:t.jsx(se,{store:st,children:t.jsx(at,{})})})); diff --git a/assets/socket.io-client-DFi9RC7o.js b/assets/socket.io-client-DFi9RC7o.js new file mode 100644 index 0000000..55c8293 --- /dev/null +++ b/assets/socket.io-client-DFi9RC7o.js @@ -0,0 +1 @@ +import{p as m,i as y,S as k,n as v}from"./engine.io-client-DBBxzneW.js";import"./engine.io-parser-BiEtp6m2.js";import{E as g}from"./@socket.io-Dkula2eQ.js";import{P as c,p as b}from"./socket.io-parser-BBkuslX-.js";function O(i,t="",e){let s=i;e=e||typeof location<"u"&&location,i==null&&(i=e.protocol+"//"+e.host),typeof i=="string"&&(i.charAt(0)==="/"&&(i.charAt(1)==="/"?i=e.protocol+i:i=e.host+i),/^(https?|wss?):\/\//.test(i)||(typeof e<"u"?i=e.protocol+"//"+i:i="https://"+i),s=m(i)),s.port||(/^(http|ws)$/.test(s.protocol)?s.port="80":/^(http|ws)s$/.test(s.protocol)&&(s.port="443")),s.path=s.path||"/";const n=s.host.indexOf(":")!==-1?"["+s.host+"]":s.host;return s.id=s.protocol+"://"+n+":"+s.port+t,s.href=s.protocol+"://"+n+(e&&e.port===s.port?"":":"+s.port),s}function a(i,t,e){return i.on(t,e),function(){i.off(t,e)}}const E=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class _ extends g{constructor(t,e,s){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=t,this.nsp=e,s&&s.auth&&(this.auth=s.auth),this._opts=Object.assign({},s),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const t=this.io;this.subs=[a(t,"open",this.onopen.bind(this)),a(t,"packet",this.onpacket.bind(this)),a(t,"error",this.onerror.bind(this)),a(t,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...t){return t.unshift("message"),this.emit.apply(this,t),this}emit(t,...e){if(E.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 s={type:c.EVENT,data:e};if(s.options={},s.options.compress=this.flags.compress!==!1,typeof e[e.length-1]=="function"){const r=this.ids++,h=e.pop();this._registerAckCallback(r,h),s.id=r}const n=this.io.engine&&this.io.engine.transport&&this.io.engine.transport.writable;return this.flags.volatile&&(!n||!this.connected)||(this.connected?(this.notifyOutgoingListeners(s),this.packet(s)):this.sendBuffer.push(s)),this.flags={},this}_registerAckCallback(t,e){var s;const n=(s=this.flags.timeout)!==null&&s!==void 0?s:this._opts.ackTimeout;if(n===void 0){this.acks[t]=e;return}const r=this.io.setTimeoutFn(()=>{delete this.acks[t];for(let o=0;o{this.io.clearTimeoutFn(r),e.apply(this,o)};h.withError=!0,this.acks[t]=h}emitWithAck(t,...e){return new Promise((s,n)=>{const r=(h,o)=>h?n(h):s(o);r.withError=!0,e.push(r),this.emit(t,...e)})}_addToQueue(t){let e;typeof t[t.length-1]=="function"&&(e=t.pop());const s={id:this._queueSeq++,tryCount:0,pending:!1,args:t,flags:Object.assign({fromQueue:!0},this.flags)};t.push((n,...r)=>s!==this._queue[0]?void 0:(n!==null?s.tryCount>this._opts.retries&&(this._queue.shift(),e&&e(n)):(this._queue.shift(),e&&e(null,...r)),s.pending=!1,this._drainQueue())),this._queue.push(s),this._drainQueue()}_drainQueue(t=!1){if(!this.connected||this._queue.length===0)return;const e=this._queue[0];e.pending&&!t||(e.pending=!0,e.tryCount++,this.flags=e.flags,this.emit.apply(this,e.args))}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){typeof this.auth=="function"?this.auth(t=>{this._sendConnectPacket(t)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(t){this.packet({type:c.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){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,e),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(t=>{if(!this.sendBuffer.some(e=>String(e.id)===t)){const e=this.acks[t];delete this.acks[t],e.withError&&e.call(this,new Error("socket has been disconnected"))}})}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case c.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 c.EVENT:case c.BINARY_EVENT:this.onevent(t);break;case c.ACK:case c.BINARY_ACK:this.onack(t);break;case c.DISCONNECT:this.ondisconnect();break;case c.CONNECT_ERROR:this.destroy();const e=new Error(t.data.message);e.data=t.data.data,this.emitReserved("connect_error",e);break}}onevent(t){const e=t.data||[];t.id!=null&&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 s of e)s.apply(this,t)}super.emit.apply(this,t),this._pid&&t.length&&typeof t[t.length-1]=="string"&&(this._lastOffset=t[t.length-1])}ack(t){const e=this;let s=!1;return function(...n){s||(s=!0,e.packet({type:c.ACK,id:t,data:n}))}}onack(t){const e=this.acks[t.id];typeof e=="function"&&(delete this.acks[t.id],e.withError&&t.data.unshift(null),e.apply(this,t.data))}onconnect(t,e){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(){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&&this.packet({type:c.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 s=0;s0&&i.jitter<=1?i.jitter:0,this.attempts=0}p.prototype.duration=function(){var i=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),e=Math.floor(t*this.jitter*i);i=Math.floor(t*10)&1?i+e:i-e}return Math.min(i,this.max)|0},p.prototype.reset=function(){this.attempts=0},p.prototype.setMin=function(i){this.ms=i},p.prototype.setMax=function(i){this.max=i},p.prototype.setJitter=function(i){this.jitter=i};class l extends g{constructor(t,e){var s;super(),this.nsps={},this.subs=[],t&&typeof t=="object"&&(e=t,t=void 0),e=e||{},e.path=e.path||"/socket.io",this.opts=e,y(this,e),this.reconnection(e.reconnection!==!1),this.reconnectionAttempts(e.reconnectionAttempts||1/0),this.reconnectionDelay(e.reconnectionDelay||1e3),this.reconnectionDelayMax(e.reconnectionDelayMax||5e3),this.randomizationFactor((s=e.randomizationFactor)!==null&&s!==void 0?s:.5),this.backoff=new p({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(e.timeout==null?2e4:e.timeout),this._readyState="closed",this.uri=t;const n=e.parser||b;this.encoder=new n.Encoder,this.decoder=new n.Decoder,this._autoConnect=e.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,this):this._reconnection}reconnectionAttempts(t){return t===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var e;return t===void 0?this._reconnectionDelay:(this._reconnectionDelay=t,(e=this.backoff)===null||e===void 0||e.setMin(t),this)}randomizationFactor(t){var e;return t===void 0?this._randomizationFactor:(this._randomizationFactor=t,(e=this.backoff)===null||e===void 0||e.setJitter(t),this)}reconnectionDelayMax(t){var e;return t===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,(e=this.backoff)===null||e===void 0||e.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(t){if(~this._readyState.indexOf("open"))return this;this.engine=new k(this.uri,this.opts);const e=this.engine,s=this;this._readyState="opening",this.skipReconnect=!1;const n=a(e,"open",function(){s.onopen(),t&&t()}),r=o=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",o),t?t(o):this.maybeReconnectOnOpen()},h=a(e,"error",r);if(this._timeout!==!1){const o=this._timeout,u=this.setTimeoutFn(()=>{n(),r(new Error("timeout")),e.close()},o);this.opts.autoUnref&&u.unref(),this.subs.push(()=>{this.clearTimeoutFn(u)})}return this.subs.push(n),this.subs.push(h),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(a(t,"ping",this.onping.bind(this)),a(t,"data",this.ondata.bind(this)),a(t,"error",this.onerror.bind(this)),a(t,"close",this.onclose.bind(this)),a(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(e){this.onclose("parse error",e)}}ondecoded(t){v(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,e){let s=this.nsps[t];return s?this._autoConnect&&!s.active&&s.connect():(s=new _(this,t,e),this.nsps[t]=s),s}_destroy(t){const e=Object.keys(this.nsps);for(const s of e)if(this.nsps[s].active)return;this._close()}_packet(t){const e=this.encoder.encode(t);for(let s=0;st()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close"),this.engine&&this.engine.close()}disconnect(){return this._close()}onclose(t,e){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)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const e=this.backoff.duration();this._reconnecting=!0;const s=this.setTimeoutFn(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(n=>{n?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",n)):t.onreconnect()}))},e);this.opts.autoUnref&&s.unref(),this.subs.push(()=>{this.clearTimeoutFn(s)})}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}const d={};function f(i,t){typeof i=="object"&&(t=i,i=void 0),t=t||{};const e=O(i,t.path||"/socket.io"),s=e.source,n=e.id,r=e.path,h=d[n]&&r in d[n].nsps,o=t.forceNew||t["force new connection"]||t.multiplex===!1||h;let u;return o?u=new l(s,t):(d[n]||(d[n]=new l(s,t)),u=d[n]),e.query&&!t.query&&(t.query=e.queryKey),u.socket(e.path,t)}Object.assign(f,{Manager:l,Socket:_,io:f,connect:f});export{f as l}; diff --git a/assets/socket.io-parser-BBkuslX-.js b/assets/socket.io-parser-BBkuslX-.js new file mode 100644 index 0000000..42d7d2c --- /dev/null +++ b/assets/socket.io-parser-BBkuslX-.js @@ -0,0 +1 @@ +import{E as d}from"./@socket.io-Dkula2eQ.js";const N=typeof ArrayBuffer=="function",A=t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t.buffer instanceof ArrayBuffer,h=Object.prototype.toString,E=typeof Blob=="function"||typeof Blob<"u"&&h.call(Blob)==="[object BlobConstructor]",b=typeof File=="function"||typeof File<"u"&&h.call(File)==="[object FileConstructor]";function u(t){return N&&(t instanceof ArrayBuffer||A(t))||E&&t instanceof Blob||b&&t instanceof File}function a(t,r){if(!t||typeof t!="object")return!1;if(Array.isArray(t)){for(let e=0,n=t.length;e=0&&t.numVite + React + TS - + @@ -30,7 +30,11 @@ - + + + + +