vue-wiguet-chatweb 0.1.16 → 0.1.17

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,7 +1,7 @@
1
- (function(ue,u){typeof exports=="object"&&typeof module<"u"?u(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],u):(ue=typeof globalThis<"u"?globalThis:ue||self,u(ue["vue-wiguet-chatweb"]={},ue.Vue))})(this,function(ue,u){"use strict";let st;const Ei=new Uint8Array(16);function ki(){if(!st&&(st=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!st))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return st(Ei)}const U=[];for(let t=0;t<256;++t)U.push((t+256).toString(16).slice(1));function Si(t,e=0){return U[t[e+0]]+U[t[e+1]]+U[t[e+2]]+U[t[e+3]]+"-"+U[t[e+4]]+U[t[e+5]]+"-"+U[t[e+6]]+U[t[e+7]]+"-"+U[t[e+8]]+U[t[e+9]]+"-"+U[t[e+10]]+U[t[e+11]]+U[t[e+12]]+U[t[e+13]]+U[t[e+14]]+U[t[e+15]]}const Fn={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function Ti(t,e,n){if(Fn.randomUUID&&!e&&!t)return Fn.randomUUID();t=t||{};const s=t.random||(t.rng||ki)();return s[6]=s[6]&15|64,s[8]=s[8]&63|128,Si(s)}const X=(t,e)=>{const n=t.__vccOpts||t;for(const[s,r]of e)n[s]=r;return n},bi={},Oi={width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Ni=[u.createElementVNode("path",{d:"M16 31C24.2843 31 31 24.2843 31 16C31 7.71573 24.2843 1 16 1C7.71573 1 1 7.71573 1 16C1 24.2843 7.71573 31 16 31Z",stroke:"#B3B3B3","stroke-miterlimit":"10"},null,-1),u.createElementVNode("path",{d:"M19.78 22.3L15.98 16.63H15.9601L12.2001 22.3H11.0701L15.37 15.8899L11.25 9.69995H12.38L15.98 15.08H16L19.67 9.69995H20.8L16.55 15.82L20.92 22.3H19.77H19.78Z",fill:"#B3B3B3"},null,-1)];function Ci(t,e){return u.openBlock(),u.createElementBlock("svg",Oi,Ni)}const vi=X(bi,[["render",Ci]]),xi={},_i={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},Ai=[u.createElementVNode("path",{fill:"#F28B0C",d:"M16.1 260.2c-22.6 12.9-20.5 47.3 3.6 57.3L160 376V479.3c0 18.1 14.6 32.7 32.7 32.7c9.7 0 18.9-4.3 25.1-11.8l62-74.3 123.9 51.6c18.9 7.9 40.8-4.5 43.9-24.7l64-416c1.9-12.1-3.4-24.3-13.5-31.2s-23.3-7.5-34-1.4l-448 256zm52.1 25.5L409.7 90.6 190.1 336l1.2 1L68.2 285.7zM403.3 425.4L236.7 355.9 450.8 116.6 403.3 425.4z"},null,-1)];function Mi(t,e){return u.openBlock(),u.createElementBlock("svg",_i,Ai)}const Di=X(xi,[["render",Mi]]);function Bn(t,e){return function(){return t.apply(e,arguments)}}const{toString:Ii}=Object.prototype,{getPrototypeOf:$t}=Object,rt=(t=>e=>{const n=Ii.call(e);return t[n]||(t[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),ie=t=>(t=t.toLowerCase(),e=>rt(e)===t),it=t=>e=>typeof e===t,{isArray:be}=Array,Ue=it("undefined");function Ri(t){return t!==null&&!Ue(t)&&t.constructor!==null&&!Ue(t.constructor)&&Z(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const $n=ie("ArrayBuffer");function Li(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&$n(t.buffer),e}const Vi=it("string"),Z=it("function"),Un=it("number"),ot=t=>t!==null&&typeof t=="object",Fi=t=>t===!0||t===!1,at=t=>{if(rt(t)!=="object")return!1;const e=$t(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)},Bi=ie("Date"),$i=ie("File"),Ui=ie("Blob"),Pi=ie("FileList"),Wi=t=>ot(t)&&Z(t.pipe),qi=t=>{let e;return t&&(typeof FormData=="function"&&t instanceof FormData||Z(t.append)&&((e=rt(t))==="formdata"||e==="object"&&Z(t.toString)&&t.toString()==="[object FormData]"))},Hi=ie("URLSearchParams"),zi=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Pe(t,e,{allOwnKeys:n=!1}={}){if(t===null||typeof t>"u")return;let s,r;if(typeof t!="object"&&(t=[t]),be(t))for(s=0,r=t.length;s<r;s++)e.call(null,t[s],s,t);else{const i=n?Object.getOwnPropertyNames(t):Object.keys(t),o=i.length;let a;for(s=0;s<o;s++)a=i[s],e.call(null,t[a],a,t)}}function Pn(t,e){e=e.toLowerCase();const n=Object.keys(t);let s=n.length,r;for(;s-- >0;)if(r=n[s],e===r.toLowerCase())return r;return null}const Wn=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,qn=t=>!Ue(t)&&t!==Wn;function Ut(){const{caseless:t}=qn(this)&&this||{},e={},n=(s,r)=>{const i=t&&Pn(e,r)||r;at(e[i])&&at(s)?e[i]=Ut(e[i],s):at(s)?e[i]=Ut({},s):be(s)?e[i]=s.slice():e[i]=s};for(let s=0,r=arguments.length;s<r;s++)arguments[s]&&Pe(arguments[s],n);return e}const Zi=(t,e,n,{allOwnKeys:s}={})=>(Pe(e,(r,i)=>{n&&Z(r)?t[i]=Bn(r,n):t[i]=r},{allOwnKeys:s}),t),ji=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),Yi=(t,e,n,s)=>{t.prototype=Object.create(e.prototype,s),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),n&&Object.assign(t.prototype,n)},Ji=(t,e,n,s)=>{let r,i,o;const a={};if(e=e||{},t==null)return e;do{for(r=Object.getOwnPropertyNames(t),i=r.length;i-- >0;)o=r[i],(!s||s(o,t,e))&&!a[o]&&(e[o]=t[o],a[o]=!0);t=n!==!1&&$t(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},Gi=(t,e,n)=>{t=String(t),(n===void 0||n>t.length)&&(n=t.length),n-=e.length;const s=t.indexOf(e,n);return s!==-1&&s===n},Ki=t=>{if(!t)return null;if(be(t))return t;let e=t.length;if(!Un(e))return null;const n=new Array(e);for(;e-- >0;)n[e]=t[e];return n},Xi=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&$t(Uint8Array)),Qi=(t,e)=>{const s=(t&&t[Symbol.iterator]).call(t);let r;for(;(r=s.next())&&!r.done;){const i=r.value;e.call(t,i[0],i[1])}},eo=(t,e)=>{let n;const s=[];for(;(n=t.exec(e))!==null;)s.push(n);return s},to=ie("HTMLFormElement"),no=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,s,r){return s.toUpperCase()+r}),Hn=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),so=ie("RegExp"),zn=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),s={};Pe(n,(r,i)=>{e(r,i,t)!==!1&&(s[i]=r)}),Object.defineProperties(t,s)},ro=t=>{zn(t,(e,n)=>{if(Z(t)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const s=t[n];if(Z(s)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},io=(t,e)=>{const n={},s=r=>{r.forEach(i=>{n[i]=!0})};return be(t)?s(t):s(String(t).split(e)),n},oo=()=>{},ao=(t,e)=>(t=+t,Number.isFinite(t)?t:e),Pt="abcdefghijklmnopqrstuvwxyz",Zn="0123456789",jn={DIGIT:Zn,ALPHA:Pt,ALPHA_DIGIT:Pt+Pt.toUpperCase()+Zn},co=(t=16,e=jn.ALPHA_DIGIT)=>{let n="";const{length:s}=e;for(;t--;)n+=e[Math.random()*s|0];return n};function lo(t){return!!(t&&Z(t.append)&&t[Symbol.toStringTag]==="FormData"&&t[Symbol.iterator])}const uo=t=>{const e=new Array(10),n=(s,r)=>{if(ot(s)){if(e.indexOf(s)>=0)return;if(!("toJSON"in s)){e[r]=s;const i=be(s)?[]:{};return Pe(s,(o,a)=>{const c=n(o,r+1);!Ue(c)&&(i[a]=c)}),e[r]=void 0,i}}return s};return n(t,0)},fo=ie("AsyncFunction"),h={isArray:be,isArrayBuffer:$n,isBuffer:Ri,isFormData:qi,isArrayBufferView:Li,isString:Vi,isNumber:Un,isBoolean:Fi,isObject:ot,isPlainObject:at,isUndefined:Ue,isDate:Bi,isFile:$i,isBlob:Ui,isRegExp:so,isFunction:Z,isStream:Wi,isURLSearchParams:Hi,isTypedArray:Xi,isFileList:Pi,forEach:Pe,merge:Ut,extend:Zi,trim:zi,stripBOM:ji,inherits:Yi,toFlatObject:Ji,kindOf:rt,kindOfTest:ie,endsWith:Gi,toArray:Ki,forEachEntry:Qi,matchAll:eo,isHTMLForm:to,hasOwnProperty:Hn,hasOwnProp:Hn,reduceDescriptors:zn,freezeMethods:ro,toObjectSet:io,toCamelCase:no,noop:oo,toFiniteNumber:ao,findKey:Pn,global:Wn,isContextDefined:qn,ALPHABET:jn,generateString:co,isSpecCompliantForm:lo,toJSONObject:uo,isAsyncFn:fo,isThenable:t=>t&&(ot(t)||Z(t))&&Z(t.then)&&Z(t.catch)};function N(t,e,n,s,r){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),s&&(this.request=s),r&&(this.response=r)}h.inherits(N,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:h.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const Yn=N.prototype,Jn={};["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=>{Jn[t]={value:t}}),Object.defineProperties(N,Jn),Object.defineProperty(Yn,"isAxiosError",{value:!0}),N.from=(t,e,n,s,r,i)=>{const o=Object.create(Yn);return h.toFlatObject(t,o,function(c){return c!==Error.prototype},a=>a!=="isAxiosError"),N.call(o,t.message,e,n,s,r),o.cause=t,o.name=t.name,i&&Object.assign(o,i),o};const ho=null;function Wt(t){return h.isPlainObject(t)||h.isArray(t)}function Gn(t){return h.endsWith(t,"[]")?t.slice(0,-2):t}function Kn(t,e,n){return t?t.concat(e).map(function(r,i){return r=Gn(r),!n&&i?"["+r+"]":r}).join(n?".":""):e}function mo(t){return h.isArray(t)&&!t.some(Wt)}const po=h.toFlatObject(h,{},null,function(e){return/^is[A-Z]/.test(e)});function ct(t,e,n){if(!h.isObject(t))throw new TypeError("target must be an object");e=e||new FormData,n=h.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(w,O){return!h.isUndefined(O[w])});const s=n.metaTokens,r=n.visitor||f,i=n.dots,o=n.indexes,c=(n.Blob||typeof Blob<"u"&&Blob)&&h.isSpecCompliantForm(e);if(!h.isFunction(r))throw new TypeError("visitor must be a function");function l(m){if(m===null)return"";if(h.isDate(m))return m.toISOString();if(!c&&h.isBlob(m))throw new N("Blob is not supported. Use a Buffer instead.");return h.isArrayBuffer(m)||h.isTypedArray(m)?c&&typeof Blob=="function"?new Blob([m]):Buffer.from(m):m}function f(m,w,O){let A=m;if(m&&!O&&typeof m=="object"){if(h.endsWith(w,"{}"))w=s?w:w.slice(0,-2),m=JSON.stringify(m);else if(h.isArray(m)&&mo(m)||(h.isFileList(m)||h.endsWith(w,"[]"))&&(A=h.toArray(m)))return w=Gn(w),A.forEach(function(q,tt){!(h.isUndefined(q)||q===null)&&e.append(o===!0?Kn([w],tt,i):o===null?w:w+"[]",l(q))}),!1}return Wt(m)?!0:(e.append(Kn(O,w,i),l(m)),!1)}const d=[],g=Object.assign(po,{defaultVisitor:f,convertValue:l,isVisitable:Wt});function p(m,w){if(!h.isUndefined(m)){if(d.indexOf(m)!==-1)throw Error("Circular reference detected in "+w.join("."));d.push(m),h.forEach(m,function(A,I){(!(h.isUndefined(A)||A===null)&&r.call(e,A,h.isString(I)?I.trim():I,w,g))===!0&&p(A,w?w.concat(I):[I])}),d.pop()}}if(!h.isObject(t))throw new TypeError("data must be an object");return p(t),e}function Xn(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(s){return e[s]})}function qt(t,e){this._pairs=[],t&&ct(t,this,e)}const Qn=qt.prototype;Qn.append=function(e,n){this._pairs.push([e,n])},Qn.toString=function(e){const n=e?function(s){return e.call(this,s,Xn)}:Xn;return this._pairs.map(function(r){return n(r[0])+"="+n(r[1])},"").join("&")};function yo(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function es(t,e,n){if(!e)return t;const s=n&&n.encode||yo,r=n&&n.serialize;let i;if(r?i=r(e,n):i=h.isURLSearchParams(e)?e.toString():new qt(e,n).toString(s),i){const o=t.indexOf("#");o!==-1&&(t=t.slice(0,o)),t+=(t.indexOf("?")===-1?"?":"&")+i}return t}class ts{constructor(){this.handlers=[]}use(e,n,s){return this.handlers.push({fulfilled:e,rejected:n,synchronous:s?s.synchronous:!1,runWhen:s?s.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){h.forEach(this.handlers,function(s){s!==null&&e(s)})}}const ns={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},go=typeof URLSearchParams<"u"?URLSearchParams:qt,wo=typeof FormData<"u"?FormData:null,Eo=typeof Blob<"u"?Blob:null,ko=(()=>{let t;return typeof navigator<"u"&&((t=navigator.product)==="ReactNative"||t==="NativeScript"||t==="NS")?!1:typeof window<"u"&&typeof document<"u"})(),So=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",oe={isBrowser:!0,classes:{URLSearchParams:go,FormData:wo,Blob:Eo},isStandardBrowserEnv:ko,isStandardBrowserWebWorkerEnv:So,protocols:["http","https","file","blob","url","data"]};function To(t,e){return ct(t,new oe.classes.URLSearchParams,Object.assign({visitor:function(n,s,r,i){return oe.isNode&&h.isBuffer(n)?(this.append(s,n.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)}},e))}function bo(t){return h.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function Oo(t){const e={},n=Object.keys(t);let s;const r=n.length;let i;for(s=0;s<r;s++)i=n[s],e[i]=t[i];return e}function ss(t){function e(n,s,r,i){let o=n[i++];const a=Number.isFinite(+o),c=i>=n.length;return o=!o&&h.isArray(r)?r.length:o,c?(h.hasOwnProp(r,o)?r[o]=[r[o],s]:r[o]=s,!a):((!r[o]||!h.isObject(r[o]))&&(r[o]=[]),e(n,s,r[o],i)&&h.isArray(r[o])&&(r[o]=Oo(r[o])),!a)}if(h.isFormData(t)&&h.isFunction(t.entries)){const n={};return h.forEachEntry(t,(s,r)=>{e(bo(s),r,n,0)}),n}return null}const No={"Content-Type":void 0};function Co(t,e,n){if(h.isString(t))try{return(e||JSON.parse)(t),h.trim(t)}catch(s){if(s.name!=="SyntaxError")throw s}return(n||JSON.stringify)(t)}const Oe={transitional:ns,adapter:["xhr","http"],transformRequest:[function(e,n){const s=n.getContentType()||"",r=s.indexOf("application/json")>-1,i=h.isObject(e);if(i&&h.isHTMLForm(e)&&(e=new FormData(e)),h.isFormData(e))return r&&r?JSON.stringify(ss(e)):e;if(h.isArrayBuffer(e)||h.isBuffer(e)||h.isStream(e)||h.isFile(e)||h.isBlob(e))return e;if(h.isArrayBufferView(e))return e.buffer;if(h.isURLSearchParams(e))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let a;if(i){if(s.indexOf("application/x-www-form-urlencoded")>-1)return To(e,this.formSerializer).toString();if((a=h.isFileList(e))||s.indexOf("multipart/form-data")>-1){const c=this.env&&this.env.FormData;return ct(a?{"files[]":e}:e,c&&new c,this.formSerializer)}}return i||r?(n.setContentType("application/json",!1),Co(e)):e}],transformResponse:[function(e){const n=this.transitional||Oe.transitional,s=n&&n.forcedJSONParsing,r=this.responseType==="json";if(e&&h.isString(e)&&(s&&!this.responseType||r)){const o=!(n&&n.silentJSONParsing)&&r;try{return JSON.parse(e)}catch(a){if(o)throw a.name==="SyntaxError"?N.from(a,N.ERR_BAD_RESPONSE,this,null,this.response):a}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:oe.classes.FormData,Blob:oe.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};h.forEach(["delete","get","head"],function(e){Oe.headers[e]={}}),h.forEach(["post","put","patch"],function(e){Oe.headers[e]=h.merge(No)});const vo=h.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"]),xo=t=>{const e={};let n,s,r;return t&&t.split(`
2
- `).forEach(function(o){r=o.indexOf(":"),n=o.substring(0,r).trim().toLowerCase(),s=o.substring(r+1).trim(),!(!n||e[n]&&vo[n])&&(n==="set-cookie"?e[n]?e[n].push(s):e[n]=[s]:e[n]=e[n]?e[n]+", "+s:s)}),e},rs=Symbol("internals");function We(t){return t&&String(t).trim().toLowerCase()}function lt(t){return t===!1||t==null?t:h.isArray(t)?t.map(lt):String(t)}function _o(t){const e=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let s;for(;s=n.exec(t);)e[s[1]]=s[2];return e}const Ao=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function Ht(t,e,n,s,r){if(h.isFunction(s))return s.call(this,e,n);if(r&&(e=n),!!h.isString(e)){if(h.isString(s))return e.indexOf(s)!==-1;if(h.isRegExp(s))return s.test(e)}}function Mo(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,n,s)=>n.toUpperCase()+s)}function Do(t,e){const n=h.toCamelCase(" "+e);["get","set","has"].forEach(s=>{Object.defineProperty(t,s+n,{value:function(r,i,o){return this[s].call(this,e,r,i,o)},configurable:!0})})}class j{constructor(e){e&&this.set(e)}set(e,n,s){const r=this;function i(a,c,l){const f=We(c);if(!f)throw new Error("header name must be a non-empty string");const d=h.findKey(r,f);(!d||r[d]===void 0||l===!0||l===void 0&&r[d]!==!1)&&(r[d||c]=lt(a))}const o=(a,c)=>h.forEach(a,(l,f)=>i(l,f,c));return h.isPlainObject(e)||e instanceof this.constructor?o(e,n):h.isString(e)&&(e=e.trim())&&!Ao(e)?o(xo(e),n):e!=null&&i(n,e,s),this}get(e,n){if(e=We(e),e){const s=h.findKey(this,e);if(s){const r=this[s];if(!n)return r;if(n===!0)return _o(r);if(h.isFunction(n))return n.call(this,r,s);if(h.isRegExp(n))return n.exec(r);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,n){if(e=We(e),e){const s=h.findKey(this,e);return!!(s&&this[s]!==void 0&&(!n||Ht(this,this[s],s,n)))}return!1}delete(e,n){const s=this;let r=!1;function i(o){if(o=We(o),o){const a=h.findKey(s,o);a&&(!n||Ht(s,s[a],a,n))&&(delete s[a],r=!0)}}return h.isArray(e)?e.forEach(i):i(e),r}clear(e){const n=Object.keys(this);let s=n.length,r=!1;for(;s--;){const i=n[s];(!e||Ht(this,this[i],i,e,!0))&&(delete this[i],r=!0)}return r}normalize(e){const n=this,s={};return h.forEach(this,(r,i)=>{const o=h.findKey(s,i);if(o){n[o]=lt(r),delete n[i];return}const a=e?Mo(i):String(i).trim();a!==i&&delete n[i],n[a]=lt(r),s[a]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const n=Object.create(null);return h.forEach(this,(s,r)=>{s!=null&&s!==!1&&(n[r]=e&&h.isArray(s)?s.join(", "):s)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,n])=>e+": "+n).join(`
3
- `)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...n){const s=new this(e);return n.forEach(r=>s.set(r)),s}static accessor(e){const s=(this[rs]=this[rs]={accessors:{}}).accessors,r=this.prototype;function i(o){const a=We(o);s[a]||(Do(r,o),s[a]=!0)}return h.isArray(e)?e.forEach(i):i(e),this}}j.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),h.freezeMethods(j.prototype),h.freezeMethods(j);function zt(t,e){const n=this||Oe,s=e||n,r=j.from(s.headers);let i=s.data;return h.forEach(t,function(a){i=a.call(n,i,r.normalize(),e?e.status:void 0)}),r.normalize(),i}function is(t){return!!(t&&t.__CANCEL__)}function qe(t,e,n){N.call(this,t??"canceled",N.ERR_CANCELED,e,n),this.name="CanceledError"}h.inherits(qe,N,{__CANCEL__:!0});function Io(t,e,n){const s=n.config.validateStatus;!n.status||!s||s(n.status)?t(n):e(new N("Request failed with status code "+n.status,[N.ERR_BAD_REQUEST,N.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}const Ro=oe.isStandardBrowserEnv?function(){return{write:function(n,s,r,i,o,a){const c=[];c.push(n+"="+encodeURIComponent(s)),h.isNumber(r)&&c.push("expires="+new Date(r).toGMTString()),h.isString(i)&&c.push("path="+i),h.isString(o)&&c.push("domain="+o),a===!0&&c.push("secure"),document.cookie=c.join("; ")},read:function(n){const s=document.cookie.match(new RegExp("(^|;\\s*)("+n+")=([^;]*)"));return s?decodeURIComponent(s[3]):null},remove:function(n){this.write(n,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}();function Lo(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function Vo(t,e){return e?t.replace(/\/+$/,"")+"/"+e.replace(/^\/+/,""):t}function os(t,e){return t&&!Lo(e)?Vo(t,e):e}const Fo=oe.isStandardBrowserEnv?function(){const e=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");let s;function r(i){let o=i;return e&&(n.setAttribute("href",o),o=n.href),n.setAttribute("href",o),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return s=r(window.location.href),function(o){const a=h.isString(o)?r(o):o;return a.protocol===s.protocol&&a.host===s.host}}():function(){return function(){return!0}}();function Bo(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function $o(t,e){t=t||10;const n=new Array(t),s=new Array(t);let r=0,i=0,o;return e=e!==void 0?e:1e3,function(c){const l=Date.now(),f=s[i];o||(o=l),n[r]=c,s[r]=l;let d=i,g=0;for(;d!==r;)g+=n[d++],d=d%t;if(r=(r+1)%t,r===i&&(i=(i+1)%t),l-o<e)return;const p=f&&l-f;return p?Math.round(g*1e3/p):void 0}}function as(t,e){let n=0;const s=$o(50,250);return r=>{const i=r.loaded,o=r.lengthComputable?r.total:void 0,a=i-n,c=s(a),l=i<=o;n=i;const f={loaded:i,total:o,progress:o?i/o:void 0,bytes:a,rate:c||void 0,estimated:c&&o&&l?(o-i)/c:void 0,event:r};f[e?"download":"upload"]=!0,t(f)}}const ut={http:ho,xhr:typeof XMLHttpRequest<"u"&&function(t){return new Promise(function(n,s){let r=t.data;const i=j.from(t.headers).normalize(),o=t.responseType;let a;function c(){t.cancelToken&&t.cancelToken.unsubscribe(a),t.signal&&t.signal.removeEventListener("abort",a)}h.isFormData(r)&&(oe.isStandardBrowserEnv||oe.isStandardBrowserWebWorkerEnv?i.setContentType(!1):i.setContentType("multipart/form-data;",!1));let l=new XMLHttpRequest;if(t.auth){const p=t.auth.username||"",m=t.auth.password?unescape(encodeURIComponent(t.auth.password)):"";i.set("Authorization","Basic "+btoa(p+":"+m))}const f=os(t.baseURL,t.url);l.open(t.method.toUpperCase(),es(f,t.params,t.paramsSerializer),!0),l.timeout=t.timeout;function d(){if(!l)return;const p=j.from("getAllResponseHeaders"in l&&l.getAllResponseHeaders()),w={data:!o||o==="text"||o==="json"?l.responseText:l.response,status:l.status,statusText:l.statusText,headers:p,config:t,request:l};Io(function(A){n(A),c()},function(A){s(A),c()},w),l=null}if("onloadend"in l?l.onloadend=d:l.onreadystatechange=function(){!l||l.readyState!==4||l.status===0&&!(l.responseURL&&l.responseURL.indexOf("file:")===0)||setTimeout(d)},l.onabort=function(){l&&(s(new N("Request aborted",N.ECONNABORTED,t,l)),l=null)},l.onerror=function(){s(new N("Network Error",N.ERR_NETWORK,t,l)),l=null},l.ontimeout=function(){let m=t.timeout?"timeout of "+t.timeout+"ms exceeded":"timeout exceeded";const w=t.transitional||ns;t.timeoutErrorMessage&&(m=t.timeoutErrorMessage),s(new N(m,w.clarifyTimeoutError?N.ETIMEDOUT:N.ECONNABORTED,t,l)),l=null},oe.isStandardBrowserEnv){const p=(t.withCredentials||Fo(f))&&t.xsrfCookieName&&Ro.read(t.xsrfCookieName);p&&i.set(t.xsrfHeaderName,p)}r===void 0&&i.setContentType(null),"setRequestHeader"in l&&h.forEach(i.toJSON(),function(m,w){l.setRequestHeader(w,m)}),h.isUndefined(t.withCredentials)||(l.withCredentials=!!t.withCredentials),o&&o!=="json"&&(l.responseType=t.responseType),typeof t.onDownloadProgress=="function"&&l.addEventListener("progress",as(t.onDownloadProgress,!0)),typeof t.onUploadProgress=="function"&&l.upload&&l.upload.addEventListener("progress",as(t.onUploadProgress)),(t.cancelToken||t.signal)&&(a=p=>{l&&(s(!p||p.type?new qe(null,t,l):p),l.abort(),l=null)},t.cancelToken&&t.cancelToken.subscribe(a),t.signal&&(t.signal.aborted?a():t.signal.addEventListener("abort",a)));const g=Bo(f);if(g&&oe.protocols.indexOf(g)===-1){s(new N("Unsupported protocol "+g+":",N.ERR_BAD_REQUEST,t));return}l.send(r||null)})}};h.forEach(ut,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch{}Object.defineProperty(t,"adapterName",{value:e})}});const Uo={getAdapter:t=>{t=h.isArray(t)?t:[t];const{length:e}=t;let n,s;for(let r=0;r<e&&(n=t[r],!(s=h.isString(n)?ut[n.toLowerCase()]:n));r++);if(!s)throw s===!1?new N(`Adapter ${n} is not supported by the environment`,"ERR_NOT_SUPPORT"):new Error(h.hasOwnProp(ut,n)?`Adapter '${n}' is not available in the build`:`Unknown adapter '${n}'`);if(!h.isFunction(s))throw new TypeError("adapter is not a function");return s},adapters:ut};function Zt(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new qe(null,t)}function cs(t){return Zt(t),t.headers=j.from(t.headers),t.data=zt.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),Uo.getAdapter(t.adapter||Oe.adapter)(t).then(function(s){return Zt(t),s.data=zt.call(t,t.transformResponse,s),s.headers=j.from(s.headers),s},function(s){return is(s)||(Zt(t),s&&s.response&&(s.response.data=zt.call(t,t.transformResponse,s.response),s.response.headers=j.from(s.response.headers))),Promise.reject(s)})}const ls=t=>t instanceof j?t.toJSON():t;function Ne(t,e){e=e||{};const n={};function s(l,f,d){return h.isPlainObject(l)&&h.isPlainObject(f)?h.merge.call({caseless:d},l,f):h.isPlainObject(f)?h.merge({},f):h.isArray(f)?f.slice():f}function r(l,f,d){if(h.isUndefined(f)){if(!h.isUndefined(l))return s(void 0,l,d)}else return s(l,f,d)}function i(l,f){if(!h.isUndefined(f))return s(void 0,f)}function o(l,f){if(h.isUndefined(f)){if(!h.isUndefined(l))return s(void 0,l)}else return s(void 0,f)}function a(l,f,d){if(d in e)return s(l,f);if(d in t)return s(void 0,l)}const c={url:i,method:i,data:i,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:a,headers:(l,f)=>r(ls(l),ls(f),!0)};return h.forEach(Object.keys(Object.assign({},t,e)),function(f){const d=c[f]||r,g=d(t[f],e[f],f);h.isUndefined(g)&&d!==a||(n[f]=g)}),n}const us="1.4.0",jt={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{jt[t]=function(s){return typeof s===t||"a"+(e<1?"n ":" ")+t}});const fs={};jt.transitional=function(e,n,s){function r(i,o){return"[Axios v"+us+"] Transitional option '"+i+"'"+o+(s?". "+s:"")}return(i,o,a)=>{if(e===!1)throw new N(r(o," has been removed"+(n?" in "+n:"")),N.ERR_DEPRECATED);return n&&!fs[o]&&(fs[o]=!0,console.warn(r(o," has been deprecated since v"+n+" and will be removed in the near future"))),e?e(i,o,a):!0}};function Po(t,e,n){if(typeof t!="object")throw new N("options must be an object",N.ERR_BAD_OPTION_VALUE);const s=Object.keys(t);let r=s.length;for(;r-- >0;){const i=s[r],o=e[i];if(o){const a=t[i],c=a===void 0||o(a,i,t);if(c!==!0)throw new N("option "+i+" must be "+c,N.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new N("Unknown option "+i,N.ERR_BAD_OPTION)}}const Yt={assertOptions:Po,validators:jt},fe=Yt.validators;class ge{constructor(e){this.defaults=e,this.interceptors={request:new ts,response:new ts}}request(e,n){typeof e=="string"?(n=n||{},n.url=e):n=e||{},n=Ne(this.defaults,n);const{transitional:s,paramsSerializer:r,headers:i}=n;s!==void 0&&Yt.assertOptions(s,{silentJSONParsing:fe.transitional(fe.boolean),forcedJSONParsing:fe.transitional(fe.boolean),clarifyTimeoutError:fe.transitional(fe.boolean)},!1),r!=null&&(h.isFunction(r)?n.paramsSerializer={serialize:r}:Yt.assertOptions(r,{encode:fe.function,serialize:fe.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let o;o=i&&h.merge(i.common,i[n.method]),o&&h.forEach(["delete","get","head","post","put","patch","common"],m=>{delete i[m]}),n.headers=j.concat(o,i);const a=[];let c=!0;this.interceptors.request.forEach(function(w){typeof w.runWhen=="function"&&w.runWhen(n)===!1||(c=c&&w.synchronous,a.unshift(w.fulfilled,w.rejected))});const l=[];this.interceptors.response.forEach(function(w){l.push(w.fulfilled,w.rejected)});let f,d=0,g;if(!c){const m=[cs.bind(this),void 0];for(m.unshift.apply(m,a),m.push.apply(m,l),g=m.length,f=Promise.resolve(n);d<g;)f=f.then(m[d++],m[d++]);return f}g=a.length;let p=n;for(d=0;d<g;){const m=a[d++],w=a[d++];try{p=m(p)}catch(O){w.call(this,O);break}}try{f=cs.call(this,p)}catch(m){return Promise.reject(m)}for(d=0,g=l.length;d<g;)f=f.then(l[d++],l[d++]);return f}getUri(e){e=Ne(this.defaults,e);const n=os(e.baseURL,e.url);return es(n,e.params,e.paramsSerializer)}}h.forEach(["delete","get","head","options"],function(e){ge.prototype[e]=function(n,s){return this.request(Ne(s||{},{method:e,url:n,data:(s||{}).data}))}}),h.forEach(["post","put","patch"],function(e){function n(s){return function(i,o,a){return this.request(Ne(a||{},{method:e,headers:s?{"Content-Type":"multipart/form-data"}:{},url:i,data:o}))}}ge.prototype[e]=n(),ge.prototype[e+"Form"]=n(!0)});class Jt{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(i){n=i});const s=this;this.promise.then(r=>{if(!s._listeners)return;let i=s._listeners.length;for(;i-- >0;)s._listeners[i](r);s._listeners=null}),this.promise.then=r=>{let i;const o=new Promise(a=>{s.subscribe(a),i=a}).then(r);return o.cancel=function(){s.unsubscribe(i)},o},e(function(i,o,a){s.reason||(s.reason=new qe(i,o,a),n(s.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 Jt(function(r){e=r}),cancel:e}}}function Wo(t){return function(n){return t.apply(null,n)}}function qo(t){return h.isObject(t)&&t.isAxiosError===!0}const Gt={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(Gt).forEach(([t,e])=>{Gt[e]=t});function hs(t){const e=new ge(t),n=Bn(ge.prototype.request,e);return h.extend(n,ge.prototype,e,{allOwnKeys:!0}),h.extend(n,e,null,{allOwnKeys:!0}),n.create=function(r){return hs(Ne(t,r))},n}const B=hs(Oe);B.Axios=ge,B.CanceledError=qe,B.CancelToken=Jt,B.isCancel=is,B.VERSION=us,B.toFormData=ct,B.AxiosError=N,B.Cancel=B.CanceledError,B.all=function(e){return Promise.all(e)},B.spread=Wo,B.isAxiosError=qo,B.mergeConfig=Ne,B.AxiosHeaders=j,B.formToJSON=t=>ss(h.isHTMLForm(t)?new FormData(t):t),B.HttpStatusCode=Gt,B.default=B;const ft=async function(t){const e=t,n=window.VITE_BACKEND_URL?window.VITE_BACKEND_URL:"https://chatadmin-gw.dev.mp.gob.bo",s={method:e.method,url:`${n}${e.url}`,headers:{Authorization:`Bearer ${t.token}`,"Content-Type":"application/json; charset=utf-8",...e.headers},data:e.data};return await B(s).then(async function(r){return await r.data}).catch(async function(r){console.error(r);const i=await r.response.data;if(i.statusCode==401&&i.message=="Unauthorized")localStorage.clear();else throw i})};async function Ho(t){const e={url:"/v1/message/list-messages",method:"post",data:t.body,token:t.token},n=await ft(e).catch(r=>(console.error(r),null)),s=n==null?void 0:n.response;return s!=null&&s.data?{data:s.data,pagination:s.pagination}:{data:[],pagination:{total:0,limit:0,size:0}}}async function zo(t,e){var r;const s=await ft({url:"/v1/message/send-message",method:"POST",data:t,token:e}).catch(i=>(console.error(i),null));return(r=s==null?void 0:s.response)==null?void 0:r.data}async function ds(t){var s;const n=await ft({url:"/v1/app-chats/web-chat",method:"get",token:t}).catch(r=>(console.error(r),null));return(s=n==null?void 0:n.response)==null?void 0:s.data}async function ms(t,e){var i;const n={esCliente:!0,totalNoVistos:0,totalNoVistosCliente:0},s={url:`/v1/app-chats/update-vistos/${t}`,method:"PATCH",data:n,token:e},r=await ft(s).catch(o=>(console.error(o),null));return(i=r==null?void 0:r.response)==null?void 0:i.data}function Zo(t){return u.getCurrentScope()?(u.onScopeDispose(t),!0):!1}function ps(t){return typeof t=="function"?t():u.unref(t)}const jo=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const Yo=t=>t!=null,Kt=()=>{};function Xt(t){var e;const n=ps(t);return(e=n==null?void 0:n.$el)!=null?e:n}const Jo=jo?window:void 0;function Go(){const t=u.ref(!1),e=u.getCurrentInstance();return e&&u.onMounted(()=>{t.value=!0},e),t}function Ko(t){const e=Go();return u.computed(()=>(e.value,!!t()))}function Xo(t,e,n={}){const{root:s,rootMargin:r="0px",threshold:i=.1,window:o=Jo,immediate:a=!0}=n,c=Ko(()=>o&&"IntersectionObserver"in o),l=u.computed(()=>{const m=ps(t);return(Array.isArray(m)?m:[m]).map(Xt).filter(Yo)});let f=Kt;const d=u.ref(a),g=c.value?u.watch(()=>[l.value,Xt(s),d.value],([m,w])=>{if(f(),!d.value||!m.length)return;const O=new IntersectionObserver(e,{root:Xt(w),rootMargin:r,threshold:i});m.forEach(A=>A&&O.observe(A)),f=()=>{O.disconnect(),f=Kt}},{immediate:a,flush:"post"}):Kt,p=()=>{f(),g(),d.value=!1};return Zo(p),{isSupported:c,isActive:d,pause(){f(),d.value=!1},resume(){d.value=!0},stop:p}}class we extends Error{}class Qo extends we{constructor(e){super(`Invalid DateTime: ${e.toMessage()}`)}}class ea extends we{constructor(e){super(`Invalid Interval: ${e.toMessage()}`)}}class ta extends we{constructor(e){super(`Invalid Duration: ${e.toMessage()}`)}}class Ce extends we{}class ys extends we{constructor(e){super(`Invalid unit ${e}`)}}class P extends we{}class he extends we{constructor(){super("Zone is an abstract class")}}const y="numeric",Q="short",z="long",ht={year:y,month:y,day:y},gs={year:y,month:Q,day:y},na={year:y,month:Q,day:y,weekday:Q},ws={year:y,month:z,day:y},Es={year:y,month:z,day:y,weekday:z},ks={hour:y,minute:y},Ss={hour:y,minute:y,second:y},Ts={hour:y,minute:y,second:y,timeZoneName:Q},bs={hour:y,minute:y,second:y,timeZoneName:z},Os={hour:y,minute:y,hourCycle:"h23"},Ns={hour:y,minute:y,second:y,hourCycle:"h23"},Cs={hour:y,minute:y,second:y,hourCycle:"h23",timeZoneName:Q},vs={hour:y,minute:y,second:y,hourCycle:"h23",timeZoneName:z},xs={year:y,month:y,day:y,hour:y,minute:y},_s={year:y,month:y,day:y,hour:y,minute:y,second:y},As={year:y,month:Q,day:y,hour:y,minute:y},Ms={year:y,month:Q,day:y,hour:y,minute:y,second:y},sa={year:y,month:Q,day:y,weekday:Q,hour:y,minute:y},Ds={year:y,month:z,day:y,hour:y,minute:y,timeZoneName:Q},Is={year:y,month:z,day:y,hour:y,minute:y,second:y,timeZoneName:Q},Rs={year:y,month:z,day:y,weekday:z,hour:y,minute:y,timeZoneName:z},Ls={year:y,month:z,day:y,weekday:z,hour:y,minute:y,second:y,timeZoneName:z};class He{get type(){throw new he}get name(){throw new he}get ianaName(){return this.name}get isUniversal(){throw new he}offsetName(e,n){throw new he}formatOffset(e,n){throw new he}offset(e){throw new he}equals(e){throw new he}get isValid(){throw new he}}let Qt=null;class dt extends He{static get instance(){return Qt===null&&(Qt=new dt),Qt}get type(){return"system"}get name(){return new Intl.DateTimeFormat().resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(e,{format:n,locale:s}){return or(e,n,s)}formatOffset(e,n){return Ye(this.offset(e),n)}offset(e){return-new Date(e).getTimezoneOffset()}equals(e){return e.type==="system"}get isValid(){return!0}}let mt={};function ra(t){return mt[t]||(mt[t]=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:t,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",era:"short"})),mt[t]}const ia={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};function oa(t,e){const n=t.format(e).replace(/\u200E/g,""),s=/(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(n),[,r,i,o,a,c,l,f]=s;return[o,r,i,a,c,l,f]}function aa(t,e){const n=t.formatToParts(e),s=[];for(let r=0;r<n.length;r++){const{type:i,value:o}=n[r],a=ia[i];i==="era"?s[a]=o:k(a)||(s[a]=parseInt(o,10))}return s}let pt={};class le extends He{static create(e){return pt[e]||(pt[e]=new le(e)),pt[e]}static resetCache(){pt={},mt={}}static isValidSpecifier(e){return this.isValidZone(e)}static isValidZone(e){if(!e)return!1;try{return new Intl.DateTimeFormat("en-US",{timeZone:e}).format(),!0}catch{return!1}}constructor(e){super(),this.zoneName=e,this.valid=le.isValidZone(e)}get type(){return"iana"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(e,{format:n,locale:s}){return or(e,n,s,this.name)}formatOffset(e,n){return Ye(this.offset(e),n)}offset(e){const n=new Date(e);if(isNaN(n))return NaN;const s=ra(this.name);let[r,i,o,a,c,l,f]=s.formatToParts?aa(s,n):oa(s,n);a==="BC"&&(r=-Math.abs(r)+1);const g=kt({year:r,month:i,day:o,hour:c===24?0:c,minute:l,second:f,millisecond:0});let p=+n;const m=p%1e3;return p-=m>=0?m:1e3+m,(g-p)/(60*1e3)}equals(e){return e.type==="iana"&&e.name===this.name}get isValid(){return this.valid}}let Vs={};function ca(t,e={}){const n=JSON.stringify([t,e]);let s=Vs[n];return s||(s=new Intl.ListFormat(t,e),Vs[n]=s),s}let en={};function tn(t,e={}){const n=JSON.stringify([t,e]);let s=en[n];return s||(s=new Intl.DateTimeFormat(t,e),en[n]=s),s}let nn={};function la(t,e={}){const n=JSON.stringify([t,e]);let s=nn[n];return s||(s=new Intl.NumberFormat(t,e),nn[n]=s),s}let sn={};function ua(t,e={}){const{base:n,...s}=e,r=JSON.stringify([t,s]);let i=sn[r];return i||(i=new Intl.RelativeTimeFormat(t,e),sn[r]=i),i}let ze=null;function fa(){return ze||(ze=new Intl.DateTimeFormat().resolvedOptions().locale,ze)}let Fs={};function ha(t){let e=Fs[t];if(!e){const n=new Intl.Locale(t);e="getWeekInfo"in n?n.getWeekInfo():n.weekInfo,Fs[t]=e}return e}function da(t){const e=t.indexOf("-x-");e!==-1&&(t=t.substring(0,e));const n=t.indexOf("-u-");if(n===-1)return[t];{let s,r;try{s=tn(t).resolvedOptions(),r=t}catch{const c=t.substring(0,n);s=tn(c).resolvedOptions(),r=c}const{numberingSystem:i,calendar:o}=s;return[r,i,o]}}function ma(t,e,n){return(n||e)&&(t.includes("-u-")||(t+="-u"),n&&(t+=`-ca-${n}`),e&&(t+=`-nu-${e}`)),t}function pa(t){const e=[];for(let n=1;n<=12;n++){const s=S.utc(2009,n,1);e.push(t(s))}return e}function ya(t){const e=[];for(let n=1;n<=7;n++){const s=S.utc(2016,11,13+n);e.push(t(s))}return e}function yt(t,e,n,s){const r=t.listingMode();return r==="error"?null:r==="en"?n(e):s(e)}function ga(t){return t.numberingSystem&&t.numberingSystem!=="latn"?!1:t.numberingSystem==="latn"||!t.locale||t.locale.startsWith("en")||new Intl.DateTimeFormat(t.intl).resolvedOptions().numberingSystem==="latn"}class wa{constructor(e,n,s){this.padTo=s.padTo||0,this.floor=s.floor||!1;const{padTo:r,floor:i,...o}=s;if(!n||Object.keys(o).length>0){const a={useGrouping:!1,...s};s.padTo>0&&(a.minimumIntegerDigits=s.padTo),this.inf=la(e,a)}}format(e){if(this.inf){const n=this.floor?Math.floor(e):e;return this.inf.format(n)}else{const n=this.floor?Math.floor(e):hn(e,3);return R(n,this.padTo)}}}class Ea{constructor(e,n,s){this.opts=s,this.originalZone=void 0;let r;if(this.opts.timeZone)this.dt=e;else if(e.zone.type==="fixed"){const o=-1*(e.offset/60),a=o>=0?`Etc/GMT+${o}`:`Etc/GMT${o}`;e.offset!==0&&le.create(a).valid?(r=a,this.dt=e):(r="UTC",this.dt=e.offset===0?e:e.setZone("UTC").plus({minutes:e.offset}),this.originalZone=e.zone)}else e.zone.type==="system"?this.dt=e:e.zone.type==="iana"?(this.dt=e,r=e.zone.name):(r="UTC",this.dt=e.setZone("UTC").plus({minutes:e.offset}),this.originalZone=e.zone);const i={...this.opts};i.timeZone=i.timeZone||r,this.dtf=tn(n,i)}format(){return this.originalZone?this.formatToParts().map(({value:e})=>e).join(""):this.dtf.format(this.dt.toJSDate())}formatToParts(){const e=this.dtf.formatToParts(this.dt.toJSDate());return this.originalZone?e.map(n=>{if(n.type==="timeZoneName"){const s=this.originalZone.offsetName(this.dt.ts,{locale:this.dt.locale,format:this.opts.timeZoneName});return{...n,value:s}}else return n}):e}resolvedOptions(){return this.dtf.resolvedOptions()}}class ka{constructor(e,n,s){this.opts={style:"long",...s},!n&&nr()&&(this.rtf=ua(e,s))}format(e,n){return this.rtf?this.rtf.format(e,n):qa(n,e,this.opts.numeric,this.opts.style!=="long")}formatToParts(e,n){return this.rtf?this.rtf.formatToParts(e,n):[]}}const Sa={firstDay:1,minimalDays:4,weekend:[6,7]};class x{static fromOpts(e){return x.create(e.locale,e.numberingSystem,e.outputCalendar,e.weekSettings,e.defaultToEN)}static create(e,n,s,r,i=!1){const o=e||M.defaultLocale,a=o||(i?"en-US":fa()),c=n||M.defaultNumberingSystem,l=s||M.defaultOutputCalendar,f=un(r)||M.defaultWeekSettings;return new x(a,c,l,f,o)}static resetCache(){ze=null,en={},nn={},sn={}}static fromObject({locale:e,numberingSystem:n,outputCalendar:s,weekSettings:r}={}){return x.create(e,n,s,r)}constructor(e,n,s,r,i){const[o,a,c]=da(e);this.locale=o,this.numberingSystem=n||a||null,this.outputCalendar=s||c||null,this.weekSettings=r,this.intl=ma(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=i,this.fastNumbersCached=null}get fastNumbers(){return this.fastNumbersCached==null&&(this.fastNumbersCached=ga(this)),this.fastNumbersCached}listingMode(){const e=this.isEnglish(),n=(this.numberingSystem===null||this.numberingSystem==="latn")&&(this.outputCalendar===null||this.outputCalendar==="gregory");return e&&n?"en":"intl"}clone(e){return!e||Object.getOwnPropertyNames(e).length===0?this:x.create(e.locale||this.specifiedLocale,e.numberingSystem||this.numberingSystem,e.outputCalendar||this.outputCalendar,un(e.weekSettings)||this.weekSettings,e.defaultToEN||!1)}redefaultToEN(e={}){return this.clone({...e,defaultToEN:!0})}redefaultToSystem(e={}){return this.clone({...e,defaultToEN:!1})}months(e,n=!1){return yt(this,e,lr,()=>{const s=n?{month:e,day:"numeric"}:{month:e},r=n?"format":"standalone";return this.monthsCache[r][e]||(this.monthsCache[r][e]=pa(i=>this.extract(i,s,"month"))),this.monthsCache[r][e]})}weekdays(e,n=!1){return yt(this,e,hr,()=>{const s=n?{weekday:e,year:"numeric",month:"long",day:"numeric"}:{weekday:e},r=n?"format":"standalone";return this.weekdaysCache[r][e]||(this.weekdaysCache[r][e]=ya(i=>this.extract(i,s,"weekday"))),this.weekdaysCache[r][e]})}meridiems(){return yt(this,void 0,()=>dr,()=>{if(!this.meridiemCache){const e={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[S.utc(2016,11,13,9),S.utc(2016,11,13,19)].map(n=>this.extract(n,e,"dayperiod"))}return this.meridiemCache})}eras(e){return yt(this,e,mr,()=>{const n={era:e};return this.eraCache[e]||(this.eraCache[e]=[S.utc(-40,1,1),S.utc(2017,1,1)].map(s=>this.extract(s,n,"era"))),this.eraCache[e]})}extract(e,n,s){const r=this.dtFormatter(e,n),i=r.formatToParts(),o=i.find(a=>a.type.toLowerCase()===s);return o?o.value:null}numberFormatter(e={}){return new wa(this.intl,e.forceSimple||this.fastNumbers,e)}dtFormatter(e,n={}){return new Ea(e,this.intl,n)}relFormatter(e={}){return new ka(this.intl,this.isEnglish(),e)}listFormatter(e={}){return ca(this.intl,e)}isEnglish(){return this.locale==="en"||this.locale.toLowerCase()==="en-us"||new Intl.DateTimeFormat(this.intl).resolvedOptions().locale.startsWith("en-us")}getWeekSettings(){return this.weekSettings?this.weekSettings:sr()?ha(this.locale):Sa}getStartOfWeek(){return this.getWeekSettings().firstDay}getMinDaysInFirstWeek(){return this.getWeekSettings().minimalDays}getWeekendDays(){return this.getWeekSettings().weekend}equals(e){return this.locale===e.locale&&this.numberingSystem===e.numberingSystem&&this.outputCalendar===e.outputCalendar}toString(){return`Locale(${this.locale}, ${this.numberingSystem}, ${this.outputCalendar})`}}let rn=null;class H extends He{static get utcInstance(){return rn===null&&(rn=new H(0)),rn}static instance(e){return e===0?H.utcInstance:new H(e)}static parseSpecifier(e){if(e){const n=e.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(n)return new H(St(n[1],n[2]))}return null}constructor(e){super(),this.fixed=e}get type(){return"fixed"}get name(){return this.fixed===0?"UTC":`UTC${Ye(this.fixed,"narrow")}`}get ianaName(){return this.fixed===0?"Etc/UTC":`Etc/GMT${Ye(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(e,n){return Ye(this.fixed,n)}get isUniversal(){return!0}offset(){return this.fixed}equals(e){return e.type==="fixed"&&e.fixed===this.fixed}get isValid(){return!0}}class Ta extends He{constructor(e){super(),this.zoneName=e}get type(){return"invalid"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(){return null}formatOffset(){return""}offset(){return NaN}equals(){return!1}get isValid(){return!1}}function de(t,e){if(k(t)||t===null)return e;if(t instanceof He)return t;if(xa(t)){const n=t.toLowerCase();return n==="default"?e:n==="local"||n==="system"?dt.instance:n==="utc"||n==="gmt"?H.utcInstance:H.parseSpecifier(n)||le.create(t)}else return me(t)?H.instance(t):typeof t=="object"&&"offset"in t&&typeof t.offset=="function"?t:new Ta(t)}const on={arab:"[٠-٩]",arabext:"[۰-۹]",bali:"[᭐-᭙]",beng:"[০-৯]",deva:"[०-९]",fullwide:"[0-9]",gujr:"[૦-૯]",hanidec:"[〇|一|二|三|四|五|六|七|八|九]",khmr:"[០-៩]",knda:"[೦-೯]",laoo:"[໐-໙]",limb:"[᥆-᥏]",mlym:"[൦-൯]",mong:"[᠐-᠙]",mymr:"[၀-၉]",orya:"[୦-୯]",tamldec:"[௦-௯]",telu:"[౦-౯]",thai:"[๐-๙]",tibt:"[༠-༩]",latn:"\\d"},Bs={arab:[1632,1641],arabext:[1776,1785],bali:[6992,7001],beng:[2534,2543],deva:[2406,2415],fullwide:[65296,65303],gujr:[2790,2799],khmr:[6112,6121],knda:[3302,3311],laoo:[3792,3801],limb:[6470,6479],mlym:[3430,3439],mong:[6160,6169],mymr:[4160,4169],orya:[2918,2927],tamldec:[3046,3055],telu:[3174,3183],thai:[3664,3673],tibt:[3872,3881]},ba=on.hanidec.replace(/[\[|\]]/g,"").split("");function Oa(t){let e=parseInt(t,10);if(isNaN(e)){e="";for(let n=0;n<t.length;n++){const s=t.charCodeAt(n);if(t[n].search(on.hanidec)!==-1)e+=ba.indexOf(t[n]);else for(const r in Bs){const[i,o]=Bs[r];s>=i&&s<=o&&(e+=s-i)}}return parseInt(e,10)}else return e}let ve={};function Na(){ve={}}function ee({numberingSystem:t},e=""){const n=t||"latn";return ve[n]||(ve[n]={}),ve[n][e]||(ve[n][e]=new RegExp(`${on[n]}${e}`)),ve[n][e]}let $s=()=>Date.now(),Us="system",Ps=null,Ws=null,qs=null,Hs=60,zs,Zs=null;class M{static get now(){return $s}static set now(e){$s=e}static set defaultZone(e){Us=e}static get defaultZone(){return de(Us,dt.instance)}static get defaultLocale(){return Ps}static set defaultLocale(e){Ps=e}static get defaultNumberingSystem(){return Ws}static set defaultNumberingSystem(e){Ws=e}static get defaultOutputCalendar(){return qs}static set defaultOutputCalendar(e){qs=e}static get defaultWeekSettings(){return Zs}static set defaultWeekSettings(e){Zs=un(e)}static get twoDigitCutoffYear(){return Hs}static set twoDigitCutoffYear(e){Hs=e%100}static get throwOnInvalid(){return zs}static set throwOnInvalid(e){zs=e}static resetCaches(){x.resetCache(),le.resetCache(),S.resetCache(),Na()}}class te{constructor(e,n){this.reason=e,this.explanation=n}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}}const js=[0,31,59,90,120,151,181,212,243,273,304,334],Ys=[0,31,60,91,121,152,182,213,244,274,305,335];function Y(t,e){return new te("unit out of range",`you specified ${e} (of type ${typeof e}) as a ${t}, which is invalid`)}function an(t,e,n){const s=new Date(Date.UTC(t,e-1,n));t<100&&t>=0&&s.setUTCFullYear(s.getUTCFullYear()-1900);const r=s.getUTCDay();return r===0?7:r}function Js(t,e,n){return n+(Ze(t)?Ys:js)[e-1]}function Gs(t,e){const n=Ze(t)?Ys:js,s=n.findIndex(i=>i<e),r=e-n[s];return{month:s+1,day:r}}function cn(t,e){return(t-e+7)%7+1}function gt(t,e=4,n=1){const{year:s,month:r,day:i}=t,o=Js(s,r,i),a=cn(an(s,r,i),n);let c=Math.floor((o-a+14-e)/7),l;return c<1?(l=s-1,c=je(l,e,n)):c>je(s,e,n)?(l=s+1,c=1):l=s,{weekYear:l,weekNumber:c,weekday:a,...bt(t)}}function Ks(t,e=4,n=1){const{weekYear:s,weekNumber:r,weekday:i}=t,o=cn(an(s,1,e),n),a=_e(s);let c=r*7+i-o-7+e,l;c<1?(l=s-1,c+=_e(l)):c>a?(l=s+1,c-=_e(s)):l=s;const{month:f,day:d}=Gs(l,c);return{year:l,month:f,day:d,...bt(t)}}function ln(t){const{year:e,month:n,day:s}=t,r=Js(e,n,s);return{year:e,ordinal:r,...bt(t)}}function Xs(t){const{year:e,ordinal:n}=t,{month:s,day:r}=Gs(e,n);return{year:e,month:s,day:r,...bt(t)}}function Qs(t,e){if(!k(t.localWeekday)||!k(t.localWeekNumber)||!k(t.localWeekYear)){if(!k(t.weekday)||!k(t.weekNumber)||!k(t.weekYear))throw new Ce("Cannot mix locale-based week fields with ISO-based week fields");return k(t.localWeekday)||(t.weekday=t.localWeekday),k(t.localWeekNumber)||(t.weekNumber=t.localWeekNumber),k(t.localWeekYear)||(t.weekYear=t.localWeekYear),delete t.localWeekday,delete t.localWeekNumber,delete t.localWeekYear,{minDaysInFirstWeek:e.getMinDaysInFirstWeek(),startOfWeek:e.getStartOfWeek()}}else return{minDaysInFirstWeek:4,startOfWeek:1}}function Ca(t,e=4,n=1){const s=wt(t.weekYear),r=J(t.weekNumber,1,je(t.weekYear,e,n)),i=J(t.weekday,1,7);return s?r?i?!1:Y("weekday",t.weekday):Y("week",t.weekNumber):Y("weekYear",t.weekYear)}function va(t){const e=wt(t.year),n=J(t.ordinal,1,_e(t.year));return e?n?!1:Y("ordinal",t.ordinal):Y("year",t.year)}function er(t){const e=wt(t.year),n=J(t.month,1,12),s=J(t.day,1,Et(t.year,t.month));return e?n?s?!1:Y("day",t.day):Y("month",t.month):Y("year",t.year)}function tr(t){const{hour:e,minute:n,second:s,millisecond:r}=t,i=J(e,0,23)||e===24&&n===0&&s===0&&r===0,o=J(n,0,59),a=J(s,0,59),c=J(r,0,999);return i?o?a?c?!1:Y("millisecond",r):Y("second",s):Y("minute",n):Y("hour",e)}function k(t){return typeof t>"u"}function me(t){return typeof t=="number"}function wt(t){return typeof t=="number"&&t%1===0}function xa(t){return typeof t=="string"}function _a(t){return Object.prototype.toString.call(t)==="[object Date]"}function nr(){try{return typeof Intl<"u"&&!!Intl.RelativeTimeFormat}catch{return!1}}function sr(){try{return typeof Intl<"u"&&!!Intl.Locale&&("weekInfo"in Intl.Locale.prototype||"getWeekInfo"in Intl.Locale.prototype)}catch{return!1}}function Aa(t){return Array.isArray(t)?t:[t]}function rr(t,e,n){if(t.length!==0)return t.reduce((s,r)=>{const i=[e(r),r];return s&&n(s[0],i[0])===s[0]?s:i},null)[1]}function Ma(t,e){return e.reduce((n,s)=>(n[s]=t[s],n),{})}function xe(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function un(t){if(t==null)return null;if(typeof t!="object")throw new P("Week settings must be an object");if(!J(t.firstDay,1,7)||!J(t.minimalDays,1,7)||!Array.isArray(t.weekend)||t.weekend.some(e=>!J(e,1,7)))throw new P("Invalid week settings");return{firstDay:t.firstDay,minimalDays:t.minimalDays,weekend:Array.from(t.weekend)}}function J(t,e,n){return wt(t)&&t>=e&&t<=n}function Da(t,e){return t-e*Math.floor(t/e)}function R(t,e=2){const n=t<0;let s;return n?s="-"+(""+-t).padStart(e,"0"):s=(""+t).padStart(e,"0"),s}function pe(t){if(!(k(t)||t===null||t===""))return parseInt(t,10)}function Ee(t){if(!(k(t)||t===null||t===""))return parseFloat(t)}function fn(t){if(!(k(t)||t===null||t==="")){const e=parseFloat("0."+t)*1e3;return Math.floor(e)}}function hn(t,e,n=!1){const s=10**e;return(n?Math.trunc:Math.round)(t*s)/s}function Ze(t){return t%4===0&&(t%100!==0||t%400===0)}function _e(t){return Ze(t)?366:365}function Et(t,e){const n=Da(e-1,12)+1,s=t+(e-n)/12;return n===2?Ze(s)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][n-1]}function kt(t){let e=Date.UTC(t.year,t.month-1,t.day,t.hour,t.minute,t.second,t.millisecond);return t.year<100&&t.year>=0&&(e=new Date(e),e.setUTCFullYear(t.year,t.month-1,t.day)),+e}function ir(t,e,n){return-cn(an(t,1,e),n)+e-1}function je(t,e=4,n=1){const s=ir(t,e,n),r=ir(t+1,e,n);return(_e(t)-s+r)/7}function dn(t){return t>99?t:t>M.twoDigitCutoffYear?1900+t:2e3+t}function or(t,e,n,s=null){const r=new Date(t),i={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};s&&(i.timeZone=s);const o={timeZoneName:e,...i},a=new Intl.DateTimeFormat(n,o).formatToParts(r).find(c=>c.type.toLowerCase()==="timezonename");return a?a.value:null}function St(t,e){let n=parseInt(t,10);Number.isNaN(n)&&(n=0);const s=parseInt(e,10)||0,r=n<0||Object.is(n,-0)?-s:s;return n*60+r}function ar(t){const e=Number(t);if(typeof t=="boolean"||t===""||Number.isNaN(e))throw new P(`Invalid unit value ${t}`);return e}function Tt(t,e){const n={};for(const s in t)if(xe(t,s)){const r=t[s];if(r==null)continue;n[e(s)]=ar(r)}return n}function Ye(t,e){const n=Math.trunc(Math.abs(t/60)),s=Math.trunc(Math.abs(t%60)),r=t>=0?"+":"-";switch(e){case"short":return`${r}${R(n,2)}:${R(s,2)}`;case"narrow":return`${r}${n}${s>0?`:${s}`:""}`;case"techie":return`${r}${R(n,2)}${R(s,2)}`;default:throw new RangeError(`Value format ${e} is out of range for property format`)}}function bt(t){return Ma(t,["hour","minute","second","millisecond"])}const Ia=["January","February","March","April","May","June","July","August","September","October","November","December"],cr=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],Ra=["J","F","M","A","M","J","J","A","S","O","N","D"];function lr(t){switch(t){case"narrow":return[...Ra];case"short":return[...cr];case"long":return[...Ia];case"numeric":return["1","2","3","4","5","6","7","8","9","10","11","12"];case"2-digit":return["01","02","03","04","05","06","07","08","09","10","11","12"];default:return null}}const ur=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],fr=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],La=["M","T","W","T","F","S","S"];function hr(t){switch(t){case"narrow":return[...La];case"short":return[...fr];case"long":return[...ur];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}const dr=["AM","PM"],Va=["Before Christ","Anno Domini"],Fa=["BC","AD"],Ba=["B","A"];function mr(t){switch(t){case"narrow":return[...Ba];case"short":return[...Fa];case"long":return[...Va];default:return null}}function $a(t){return dr[t.hour<12?0:1]}function Ua(t,e){return hr(e)[t.weekday-1]}function Pa(t,e){return lr(e)[t.month-1]}function Wa(t,e){return mr(e)[t.year<0?0:1]}function qa(t,e,n="always",s=!1){const r={years:["year","yr."],quarters:["quarter","qtr."],months:["month","mo."],weeks:["week","wk."],days:["day","day","days"],hours:["hour","hr."],minutes:["minute","min."],seconds:["second","sec."]},i=["hours","minutes","seconds"].indexOf(t)===-1;if(n==="auto"&&i){const d=t==="days";switch(e){case 1:return d?"tomorrow":`next ${r[t][0]}`;case-1:return d?"yesterday":`last ${r[t][0]}`;case 0:return d?"today":`this ${r[t][0]}`}}const o=Object.is(e,-0)||e<0,a=Math.abs(e),c=a===1,l=r[t],f=s?c?l[1]:l[2]||l[1]:c?r[t][0]:t;return o?`${a} ${f} ago`:`in ${a} ${f}`}function pr(t,e){let n="";for(const s of t)s.literal?n+=s.val:n+=e(s.val);return n}const Ha={D:ht,DD:gs,DDD:ws,DDDD:Es,t:ks,tt:Ss,ttt:Ts,tttt:bs,T:Os,TT:Ns,TTT:Cs,TTTT:vs,f:xs,ff:As,fff:Ds,ffff:Rs,F:_s,FF:Ms,FFF:Is,FFFF:Ls};class W{static create(e,n={}){return new W(e,n)}static parseFormat(e){let n=null,s="",r=!1;const i=[];for(let o=0;o<e.length;o++){const a=e.charAt(o);a==="'"?(s.length>0&&i.push({literal:r||/^\s+$/.test(s),val:s}),n=null,s="",r=!r):r||a===n?s+=a:(s.length>0&&i.push({literal:/^\s+$/.test(s),val:s}),s=a,n=a)}return s.length>0&&i.push({literal:r||/^\s+$/.test(s),val:s}),i}static macroTokenToFormatOpts(e){return Ha[e]}constructor(e,n){this.opts=n,this.loc=e,this.systemLoc=null}formatWithSystemDefault(e,n){return this.systemLoc===null&&(this.systemLoc=this.loc.redefaultToSystem()),this.systemLoc.dtFormatter(e,{...this.opts,...n}).format()}dtFormatter(e,n={}){return this.loc.dtFormatter(e,{...this.opts,...n})}formatDateTime(e,n){return this.dtFormatter(e,n).format()}formatDateTimeParts(e,n){return this.dtFormatter(e,n).formatToParts()}formatInterval(e,n){return this.dtFormatter(e.start,n).dtf.formatRange(e.start.toJSDate(),e.end.toJSDate())}resolvedOptions(e,n){return this.dtFormatter(e,n).resolvedOptions()}num(e,n=0){if(this.opts.forceSimple)return R(e,n);const s={...this.opts};return n>0&&(s.padTo=n),this.loc.numberFormatter(s).format(e)}formatDateTimeFromString(e,n){const s=this.loc.listingMode()==="en",r=this.loc.outputCalendar&&this.loc.outputCalendar!=="gregory",i=(p,m)=>this.loc.extract(e,p,m),o=p=>e.isOffsetFixed&&e.offset===0&&p.allowZ?"Z":e.isValid?e.zone.formatOffset(e.ts,p.format):"",a=()=>s?$a(e):i({hour:"numeric",hourCycle:"h12"},"dayperiod"),c=(p,m)=>s?Pa(e,p):i(m?{month:p}:{month:p,day:"numeric"},"month"),l=(p,m)=>s?Ua(e,p):i(m?{weekday:p}:{weekday:p,month:"long",day:"numeric"},"weekday"),f=p=>{const m=W.macroTokenToFormatOpts(p);return m?this.formatWithSystemDefault(e,m):p},d=p=>s?Wa(e,p):i({era:p},"era"),g=p=>{switch(p){case"S":return this.num(e.millisecond);case"u":case"SSS":return this.num(e.millisecond,3);case"s":return this.num(e.second);case"ss":return this.num(e.second,2);case"uu":return this.num(Math.floor(e.millisecond/10),2);case"uuu":return this.num(Math.floor(e.millisecond/100));case"m":return this.num(e.minute);case"mm":return this.num(e.minute,2);case"h":return this.num(e.hour%12===0?12:e.hour%12);case"hh":return this.num(e.hour%12===0?12:e.hour%12,2);case"H":return this.num(e.hour);case"HH":return this.num(e.hour,2);case"Z":return o({format:"narrow",allowZ:this.opts.allowZ});case"ZZ":return o({format:"short",allowZ:this.opts.allowZ});case"ZZZ":return o({format:"techie",allowZ:this.opts.allowZ});case"ZZZZ":return e.zone.offsetName(e.ts,{format:"short",locale:this.loc.locale});case"ZZZZZ":return e.zone.offsetName(e.ts,{format:"long",locale:this.loc.locale});case"z":return e.zoneName;case"a":return a();case"d":return r?i({day:"numeric"},"day"):this.num(e.day);case"dd":return r?i({day:"2-digit"},"day"):this.num(e.day,2);case"c":return this.num(e.weekday);case"ccc":return l("short",!0);case"cccc":return l("long",!0);case"ccccc":return l("narrow",!0);case"E":return this.num(e.weekday);case"EEE":return l("short",!1);case"EEEE":return l("long",!1);case"EEEEE":return l("narrow",!1);case"L":return r?i({month:"numeric",day:"numeric"},"month"):this.num(e.month);case"LL":return r?i({month:"2-digit",day:"numeric"},"month"):this.num(e.month,2);case"LLL":return c("short",!0);case"LLLL":return c("long",!0);case"LLLLL":return c("narrow",!0);case"M":return r?i({month:"numeric"},"month"):this.num(e.month);case"MM":return r?i({month:"2-digit"},"month"):this.num(e.month,2);case"MMM":return c("short",!1);case"MMMM":return c("long",!1);case"MMMMM":return c("narrow",!1);case"y":return r?i({year:"numeric"},"year"):this.num(e.year);case"yy":return r?i({year:"2-digit"},"year"):this.num(e.year.toString().slice(-2),2);case"yyyy":return r?i({year:"numeric"},"year"):this.num(e.year,4);case"yyyyyy":return r?i({year:"numeric"},"year"):this.num(e.year,6);case"G":return d("short");case"GG":return d("long");case"GGGGG":return d("narrow");case"kk":return this.num(e.weekYear.toString().slice(-2),2);case"kkkk":return this.num(e.weekYear,4);case"W":return this.num(e.weekNumber);case"WW":return this.num(e.weekNumber,2);case"n":return this.num(e.localWeekNumber);case"nn":return this.num(e.localWeekNumber,2);case"ii":return this.num(e.localWeekYear.toString().slice(-2),2);case"iiii":return this.num(e.localWeekYear,4);case"o":return this.num(e.ordinal);case"ooo":return this.num(e.ordinal,3);case"q":return this.num(e.quarter);case"qq":return this.num(e.quarter,2);case"X":return this.num(Math.floor(e.ts/1e3));case"x":return this.num(e.ts);default:return f(p)}};return pr(W.parseFormat(n),g)}formatDurationFromString(e,n){const s=c=>{switch(c[0]){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":return"hour";case"d":return"day";case"w":return"week";case"M":return"month";case"y":return"year";default:return null}},r=c=>l=>{const f=s(l);return f?this.num(c.get(f),l.length):l},i=W.parseFormat(n),o=i.reduce((c,{literal:l,val:f})=>l?c:c.concat(f),[]),a=e.shiftTo(...o.map(s).filter(c=>c));return pr(i,r(a))}}const yr=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;function Ae(...t){const e=t.reduce((n,s)=>n+s.source,"");return RegExp(`^${e}$`)}function Me(...t){return e=>t.reduce(([n,s,r],i)=>{const[o,a,c]=i(e,r);return[{...n,...o},a||s,c]},[{},null,1]).slice(0,2)}function De(t,...e){if(t==null)return[null,null];for(const[n,s]of e){const r=n.exec(t);if(r)return s(r)}return[null,null]}function gr(...t){return(e,n)=>{const s={};let r;for(r=0;r<t.length;r++)s[t[r]]=pe(e[n+r]);return[s,null,n+r]}}const wr=/(?:(Z)|([+-]\d\d)(?::?(\d\d))?)/,za=`(?:${wr.source}?(?:\\[(${yr.source})\\])?)?`,mn=/(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/,Er=RegExp(`${mn.source}${za}`),pn=RegExp(`(?:T${Er.source})?`),Za=/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,ja=/(\d{4})-?W(\d\d)(?:-?(\d))?/,Ya=/(\d{4})-?(\d{3})/,Ja=gr("weekYear","weekNumber","weekDay"),Ga=gr("year","ordinal"),Ka=/(\d{4})-(\d\d)-(\d\d)/,kr=RegExp(`${mn.source} ?(?:${wr.source}|(${yr.source}))?`),Xa=RegExp(`(?: ${kr.source})?`);function Ie(t,e,n){const s=t[e];return k(s)?n:pe(s)}function Qa(t,e){return[{year:Ie(t,e),month:Ie(t,e+1,1),day:Ie(t,e+2,1)},null,e+3]}function Re(t,e){return[{hours:Ie(t,e,0),minutes:Ie(t,e+1,0),seconds:Ie(t,e+2,0),milliseconds:fn(t[e+3])},null,e+4]}function Je(t,e){const n=!t[e]&&!t[e+1],s=St(t[e+1],t[e+2]),r=n?null:H.instance(s);return[{},r,e+3]}function Ge(t,e){const n=t[e]?le.create(t[e]):null;return[{},n,e+1]}const ec=RegExp(`^T?${mn.source}$`),tc=/^-?P(?:(?:(-?\d{1,20}(?:\.\d{1,20})?)Y)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20}(?:\.\d{1,20})?)W)?(?:(-?\d{1,20}(?:\.\d{1,20})?)D)?(?:T(?:(-?\d{1,20}(?:\.\d{1,20})?)H)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20})(?:[.,](-?\d{1,20}))?S)?)?)$/;function nc(t){const[e,n,s,r,i,o,a,c,l]=t,f=e[0]==="-",d=c&&c[0]==="-",g=(p,m=!1)=>p!==void 0&&(m||p&&f)?-p:p;return[{years:g(Ee(n)),months:g(Ee(s)),weeks:g(Ee(r)),days:g(Ee(i)),hours:g(Ee(o)),minutes:g(Ee(a)),seconds:g(Ee(c),c==="-0"),milliseconds:g(fn(l),d)}]}const sc={GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function yn(t,e,n,s,r,i,o){const a={year:e.length===2?dn(pe(e)):pe(e),month:cr.indexOf(n)+1,day:pe(s),hour:pe(r),minute:pe(i)};return o&&(a.second=pe(o)),t&&(a.weekday=t.length>3?ur.indexOf(t)+1:fr.indexOf(t)+1),a}const rc=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\d\d)(\d\d)))$/;function ic(t){const[,e,n,s,r,i,o,a,c,l,f,d]=t,g=yn(e,r,s,n,i,o,a);let p;return c?p=sc[c]:l?p=0:p=St(f,d),[g,new H(p)]}function oc(t){return t.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}const ac=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/,cc=/^(Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/,lc=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/;function Sr(t){const[,e,n,s,r,i,o,a]=t;return[yn(e,r,s,n,i,o,a),H.utcInstance]}function uc(t){const[,e,n,s,r,i,o,a]=t;return[yn(e,a,n,s,r,i,o),H.utcInstance]}const fc=Ae(Za,pn),hc=Ae(ja,pn),dc=Ae(Ya,pn),mc=Ae(Er),Tr=Me(Qa,Re,Je,Ge),pc=Me(Ja,Re,Je,Ge),yc=Me(Ga,Re,Je,Ge),gc=Me(Re,Je,Ge);function wc(t){return De(t,[fc,Tr],[hc,pc],[dc,yc],[mc,gc])}function Ec(t){return De(oc(t),[rc,ic])}function kc(t){return De(t,[ac,Sr],[cc,Sr],[lc,uc])}function Sc(t){return De(t,[tc,nc])}const Tc=Me(Re);function bc(t){return De(t,[ec,Tc])}const Oc=Ae(Ka,Xa),Nc=Ae(kr),Cc=Me(Re,Je,Ge);function vc(t){return De(t,[Oc,Tr],[Nc,Cc])}const br="Invalid Duration",Or={weeks:{days:7,hours:7*24,minutes:7*24*60,seconds:7*24*60*60,milliseconds:7*24*60*60*1e3},days:{hours:24,minutes:24*60,seconds:24*60*60,milliseconds:24*60*60*1e3},hours:{minutes:60,seconds:60*60,milliseconds:60*60*1e3},minutes:{seconds:60,milliseconds:60*1e3},seconds:{milliseconds:1e3}},xc={years:{quarters:4,months:12,weeks:52,days:365,hours:365*24,minutes:365*24*60,seconds:365*24*60*60,milliseconds:365*24*60*60*1e3},quarters:{months:3,weeks:13,days:91,hours:91*24,minutes:91*24*60,seconds:91*24*60*60,milliseconds:91*24*60*60*1e3},months:{weeks:4,days:30,hours:30*24,minutes:30*24*60,seconds:30*24*60*60,milliseconds:30*24*60*60*1e3},...Or},G=146097/400,Le=146097/4800,_c={years:{quarters:4,months:12,weeks:G/7,days:G,hours:G*24,minutes:G*24*60,seconds:G*24*60*60,milliseconds:G*24*60*60*1e3},quarters:{months:3,weeks:G/28,days:G/4,hours:G*24/4,minutes:G*24*60/4,seconds:G*24*60*60/4,milliseconds:G*24*60*60*1e3/4},months:{weeks:Le/7,days:Le,hours:Le*24,minutes:Le*24*60,seconds:Le*24*60*60,milliseconds:Le*24*60*60*1e3},...Or},ke=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],Ac=ke.slice(0).reverse();function ye(t,e,n=!1){const s={values:n?e.values:{...t.values,...e.values||{}},loc:t.loc.clone(e.loc),conversionAccuracy:e.conversionAccuracy||t.conversionAccuracy,matrix:e.matrix||t.matrix};return new C(s)}function Nr(t,e){let n=e.milliseconds??0;for(const s of Ac.slice(1))e[s]&&(n+=e[s]*t[s].milliseconds);return n}function Cr(t,e){const n=Nr(t,e)<0?-1:1;ke.reduceRight((s,r)=>{if(k(e[r]))return s;if(s){const i=e[s]*n,o=t[r][s],a=Math.floor(i/o);e[r]+=a*n,e[s]-=a*o*n}return r},null),ke.reduce((s,r)=>{if(k(e[r]))return s;if(s){const i=e[s]%1;e[s]-=i,e[r]+=i*t[s][r]}return r},null)}function Mc(t){const e={};for(const[n,s]of Object.entries(t))s!==0&&(e[n]=s);return e}class C{constructor(e){const n=e.conversionAccuracy==="longterm"||!1;let s=n?_c:xc;e.matrix&&(s=e.matrix),this.values=e.values,this.loc=e.loc||x.create(),this.conversionAccuracy=n?"longterm":"casual",this.invalid=e.invalid||null,this.matrix=s,this.isLuxonDuration=!0}static fromMillis(e,n){return C.fromObject({milliseconds:e},n)}static fromObject(e,n={}){if(e==null||typeof e!="object")throw new P(`Duration.fromObject: argument expected to be an object, got ${e===null?"null":typeof e}`);return new C({values:Tt(e,C.normalizeUnit),loc:x.fromObject(n),conversionAccuracy:n.conversionAccuracy,matrix:n.matrix})}static fromDurationLike(e){if(me(e))return C.fromMillis(e);if(C.isDuration(e))return e;if(typeof e=="object")return C.fromObject(e);throw new P(`Unknown duration argument ${e} of type ${typeof e}`)}static fromISO(e,n){const[s]=Sc(e);return s?C.fromObject(s,n):C.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static fromISOTime(e,n){const[s]=bc(e);return s?C.fromObject(s,n):C.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static invalid(e,n=null){if(!e)throw new P("need to specify a reason the Duration is invalid");const s=e instanceof te?e:new te(e,n);if(M.throwOnInvalid)throw new ta(s);return new C({invalid:s})}static normalizeUnit(e){const n={year:"years",years:"years",quarter:"quarters",quarters:"quarters",month:"months",months:"months",week:"weeks",weeks:"weeks",day:"days",days:"days",hour:"hours",hours:"hours",minute:"minutes",minutes:"minutes",second:"seconds",seconds:"seconds",millisecond:"milliseconds",milliseconds:"milliseconds"}[e&&e.toLowerCase()];if(!n)throw new ys(e);return n}static isDuration(e){return e&&e.isLuxonDuration||!1}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}toFormat(e,n={}){const s={...n,floor:n.round!==!1&&n.floor!==!1};return this.isValid?W.create(this.loc,s).formatDurationFromString(this,e):br}toHuman(e={}){if(!this.isValid)return br;const n=ke.map(s=>{const r=this.values[s];return k(r)?null:this.loc.numberFormatter({style:"unit",unitDisplay:"long",...e,unit:s.slice(0,-1)}).format(r)}).filter(s=>s);return this.loc.listFormatter({type:"conjunction",style:e.listStyle||"narrow",...e}).format(n)}toObject(){return this.isValid?{...this.values}:{}}toISO(){if(!this.isValid)return null;let e="P";return this.years!==0&&(e+=this.years+"Y"),(this.months!==0||this.quarters!==0)&&(e+=this.months+this.quarters*3+"M"),this.weeks!==0&&(e+=this.weeks+"W"),this.days!==0&&(e+=this.days+"D"),(this.hours!==0||this.minutes!==0||this.seconds!==0||this.milliseconds!==0)&&(e+="T"),this.hours!==0&&(e+=this.hours+"H"),this.minutes!==0&&(e+=this.minutes+"M"),(this.seconds!==0||this.milliseconds!==0)&&(e+=hn(this.seconds+this.milliseconds/1e3,3)+"S"),e==="P"&&(e+="T0S"),e}toISOTime(e={}){if(!this.isValid)return null;const n=this.toMillis();return n<0||n>=864e5?null:(e={suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended",...e,includeOffset:!1},S.fromMillis(n,{zone:"UTC"}).toISOTime(e))}toJSON(){return this.toISO()}toString(){return this.toISO()}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Duration { values: ${JSON.stringify(this.values)} }`:`Duration { Invalid, reason: ${this.invalidReason} }`}toMillis(){return this.isValid?Nr(this.matrix,this.values):NaN}valueOf(){return this.toMillis()}plus(e){if(!this.isValid)return this;const n=C.fromDurationLike(e),s={};for(const r of ke)(xe(n.values,r)||xe(this.values,r))&&(s[r]=n.get(r)+this.get(r));return ye(this,{values:s},!0)}minus(e){if(!this.isValid)return this;const n=C.fromDurationLike(e);return this.plus(n.negate())}mapUnits(e){if(!this.isValid)return this;const n={};for(const s of Object.keys(this.values))n[s]=ar(e(this.values[s],s));return ye(this,{values:n},!0)}get(e){return this[C.normalizeUnit(e)]}set(e){if(!this.isValid)return this;const n={...this.values,...Tt(e,C.normalizeUnit)};return ye(this,{values:n})}reconfigure({locale:e,numberingSystem:n,conversionAccuracy:s,matrix:r}={}){const o={loc:this.loc.clone({locale:e,numberingSystem:n}),matrix:r,conversionAccuracy:s};return ye(this,o)}as(e){return this.isValid?this.shiftTo(e).get(e):NaN}normalize(){if(!this.isValid)return this;const e=this.toObject();return Cr(this.matrix,e),ye(this,{values:e},!0)}rescale(){if(!this.isValid)return this;const e=Mc(this.normalize().shiftToAll().toObject());return ye(this,{values:e},!0)}shiftTo(...e){if(!this.isValid)return this;if(e.length===0)return this;e=e.map(o=>C.normalizeUnit(o));const n={},s={},r=this.toObject();let i;for(const o of ke)if(e.indexOf(o)>=0){i=o;let a=0;for(const l in s)a+=this.matrix[l][o]*s[l],s[l]=0;me(r[o])&&(a+=r[o]);const c=Math.trunc(a);n[o]=c,s[o]=(a*1e3-c*1e3)/1e3}else me(r[o])&&(s[o]=r[o]);for(const o in s)s[o]!==0&&(n[i]+=o===i?s[o]:s[o]/this.matrix[i][o]);return Cr(this.matrix,n),ye(this,{values:n},!0)}shiftToAll(){return this.isValid?this.shiftTo("years","months","weeks","days","hours","minutes","seconds","milliseconds"):this}negate(){if(!this.isValid)return this;const e={};for(const n of Object.keys(this.values))e[n]=this.values[n]===0?0:-this.values[n];return ye(this,{values:e},!0)}get years(){return this.isValid?this.values.years||0:NaN}get quarters(){return this.isValid?this.values.quarters||0:NaN}get months(){return this.isValid?this.values.months||0:NaN}get weeks(){return this.isValid?this.values.weeks||0:NaN}get days(){return this.isValid?this.values.days||0:NaN}get hours(){return this.isValid?this.values.hours||0:NaN}get minutes(){return this.isValid?this.values.minutes||0:NaN}get seconds(){return this.isValid?this.values.seconds||0:NaN}get milliseconds(){return this.isValid?this.values.milliseconds||0:NaN}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}equals(e){if(!this.isValid||!e.isValid||!this.loc.equals(e.loc))return!1;function n(s,r){return s===void 0||s===0?r===void 0||r===0:s===r}for(const s of ke)if(!n(this.values[s],e.values[s]))return!1;return!0}}const Ve="Invalid Interval";function Dc(t,e){return!t||!t.isValid?D.invalid("missing or invalid start"):!e||!e.isValid?D.invalid("missing or invalid end"):e<t?D.invalid("end before start",`The end of an interval must be after its start, but you had start=${t.toISO()} and end=${e.toISO()}`):null}class D{constructor(e){this.s=e.start,this.e=e.end,this.invalid=e.invalid||null,this.isLuxonInterval=!0}static invalid(e,n=null){if(!e)throw new P("need to specify a reason the Interval is invalid");const s=e instanceof te?e:new te(e,n);if(M.throwOnInvalid)throw new ea(s);return new D({invalid:s})}static fromDateTimes(e,n){const s=Xe(e),r=Xe(n),i=Dc(s,r);return i??new D({start:s,end:r})}static after(e,n){const s=C.fromDurationLike(n),r=Xe(e);return D.fromDateTimes(r,r.plus(s))}static before(e,n){const s=C.fromDurationLike(n),r=Xe(e);return D.fromDateTimes(r.minus(s),r)}static fromISO(e,n){const[s,r]=(e||"").split("/",2);if(s&&r){let i,o;try{i=S.fromISO(s,n),o=i.isValid}catch{o=!1}let a,c;try{a=S.fromISO(r,n),c=a.isValid}catch{c=!1}if(o&&c)return D.fromDateTimes(i,a);if(o){const l=C.fromISO(r,n);if(l.isValid)return D.after(i,l)}else if(c){const l=C.fromISO(s,n);if(l.isValid)return D.before(a,l)}}return D.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static isInterval(e){return e&&e.isLuxonInterval||!1}get start(){return this.isValid?this.s:null}get end(){return this.isValid?this.e:null}get isValid(){return this.invalidReason===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}length(e="milliseconds"){return this.isValid?this.toDuration(e).get(e):NaN}count(e="milliseconds",n){if(!this.isValid)return NaN;const s=this.start.startOf(e,n);let r;return n!=null&&n.useLocaleWeeks?r=this.end.reconfigure({locale:s.locale}):r=this.end,r=r.startOf(e,n),Math.floor(r.diff(s,e).get(e))+(r.valueOf()!==this.end.valueOf())}hasSame(e){return this.isValid?this.isEmpty()||this.e.minus(1).hasSame(this.s,e):!1}isEmpty(){return this.s.valueOf()===this.e.valueOf()}isAfter(e){return this.isValid?this.s>e:!1}isBefore(e){return this.isValid?this.e<=e:!1}contains(e){return this.isValid?this.s<=e&&this.e>e:!1}set({start:e,end:n}={}){return this.isValid?D.fromDateTimes(e||this.s,n||this.e):this}splitAt(...e){if(!this.isValid)return[];const n=e.map(Xe).filter(o=>this.contains(o)).sort((o,a)=>o.toMillis()-a.toMillis()),s=[];let{s:r}=this,i=0;for(;r<this.e;){const o=n[i]||this.e,a=+o>+this.e?this.e:o;s.push(D.fromDateTimes(r,a)),r=a,i+=1}return s}splitBy(e){const n=C.fromDurationLike(e);if(!this.isValid||!n.isValid||n.as("milliseconds")===0)return[];let{s}=this,r=1,i;const o=[];for(;s<this.e;){const a=this.start.plus(n.mapUnits(c=>c*r));i=+a>+this.e?this.e:a,o.push(D.fromDateTimes(s,i)),s=i,r+=1}return o}divideEqually(e){return this.isValid?this.splitBy(this.length()/e).slice(0,e):[]}overlaps(e){return this.e>e.s&&this.s<e.e}abutsStart(e){return this.isValid?+this.e==+e.s:!1}abutsEnd(e){return this.isValid?+e.e==+this.s:!1}engulfs(e){return this.isValid?this.s<=e.s&&this.e>=e.e:!1}equals(e){return!this.isValid||!e.isValid?!1:this.s.equals(e.s)&&this.e.equals(e.e)}intersection(e){if(!this.isValid)return this;const n=this.s>e.s?this.s:e.s,s=this.e<e.e?this.e:e.e;return n>=s?null:D.fromDateTimes(n,s)}union(e){if(!this.isValid)return this;const n=this.s<e.s?this.s:e.s,s=this.e>e.e?this.e:e.e;return D.fromDateTimes(n,s)}static merge(e){const[n,s]=e.sort((r,i)=>r.s-i.s).reduce(([r,i],o)=>i?i.overlaps(o)||i.abutsStart(o)?[r,i.union(o)]:[r.concat([i]),o]:[r,o],[[],null]);return s&&n.push(s),n}static xor(e){let n=null,s=0;const r=[],i=e.map(c=>[{time:c.s,type:"s"},{time:c.e,type:"e"}]),o=Array.prototype.concat(...i),a=o.sort((c,l)=>c.time-l.time);for(const c of a)s+=c.type==="s"?1:-1,s===1?n=c.time:(n&&+n!=+c.time&&r.push(D.fromDateTimes(n,c.time)),n=null);return D.merge(r)}difference(...e){return D.xor([this].concat(e)).map(n=>this.intersection(n)).filter(n=>n&&!n.isEmpty())}toString(){return this.isValid?`[${this.s.toISO()} – ${this.e.toISO()})`:Ve}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Interval { start: ${this.s.toISO()}, end: ${this.e.toISO()} }`:`Interval { Invalid, reason: ${this.invalidReason} }`}toLocaleString(e=ht,n={}){return this.isValid?W.create(this.s.loc.clone(n),e).formatInterval(this):Ve}toISO(e){return this.isValid?`${this.s.toISO(e)}/${this.e.toISO(e)}`:Ve}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:Ve}toISOTime(e){return this.isValid?`${this.s.toISOTime(e)}/${this.e.toISOTime(e)}`:Ve}toFormat(e,{separator:n=" – "}={}){return this.isValid?`${this.s.toFormat(e)}${n}${this.e.toFormat(e)}`:Ve}toDuration(e,n){return this.isValid?this.e.diff(this.s,e,n):C.invalid(this.invalidReason)}mapEndpoints(e){return D.fromDateTimes(e(this.s),e(this.e))}}class Ot{static hasDST(e=M.defaultZone){const n=S.now().setZone(e).set({month:12});return!e.isUniversal&&n.offset!==n.set({month:6}).offset}static isValidIANAZone(e){return le.isValidZone(e)}static normalizeZone(e){return de(e,M.defaultZone)}static getStartOfWeek({locale:e=null,locObj:n=null}={}){return(n||x.create(e)).getStartOfWeek()}static getMinimumDaysInFirstWeek({locale:e=null,locObj:n=null}={}){return(n||x.create(e)).getMinDaysInFirstWeek()}static getWeekendWeekdays({locale:e=null,locObj:n=null}={}){return(n||x.create(e)).getWeekendDays().slice()}static months(e="long",{locale:n=null,numberingSystem:s=null,locObj:r=null,outputCalendar:i="gregory"}={}){return(r||x.create(n,s,i)).months(e)}static monthsFormat(e="long",{locale:n=null,numberingSystem:s=null,locObj:r=null,outputCalendar:i="gregory"}={}){return(r||x.create(n,s,i)).months(e,!0)}static weekdays(e="long",{locale:n=null,numberingSystem:s=null,locObj:r=null}={}){return(r||x.create(n,s,null)).weekdays(e)}static weekdaysFormat(e="long",{locale:n=null,numberingSystem:s=null,locObj:r=null}={}){return(r||x.create(n,s,null)).weekdays(e,!0)}static meridiems({locale:e=null}={}){return x.create(e).meridiems()}static eras(e="short",{locale:n=null}={}){return x.create(n,null,"gregory").eras(e)}static features(){return{relative:nr(),localeWeek:sr()}}}function vr(t,e){const n=r=>r.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),s=n(e)-n(t);return Math.floor(C.fromMillis(s).as("days"))}function Ic(t,e,n){const s=[["years",(c,l)=>l.year-c.year],["quarters",(c,l)=>l.quarter-c.quarter+(l.year-c.year)*4],["months",(c,l)=>l.month-c.month+(l.year-c.year)*12],["weeks",(c,l)=>{const f=vr(c,l);return(f-f%7)/7}],["days",vr]],r={},i=t;let o,a;for(const[c,l]of s)n.indexOf(c)>=0&&(o=c,r[c]=l(t,e),a=i.plus(r),a>e?(r[c]--,t=i.plus(r),t>e&&(a=t,r[c]--,t=i.plus(r))):t=a);return[t,r,a,o]}function Rc(t,e,n,s){let[r,i,o,a]=Ic(t,e,n);const c=e-r,l=n.filter(d=>["hours","minutes","seconds","milliseconds"].indexOf(d)>=0);l.length===0&&(o<e&&(o=r.plus({[a]:1})),o!==r&&(i[a]=(i[a]||0)+c/(o-r)));const f=C.fromObject(i,s);return l.length>0?C.fromMillis(c,s).shiftTo(...l).plus(f):f}const Lc="missing Intl.DateTimeFormat.formatToParts support";function v(t,e=n=>n){return{regex:t,deser:([n])=>e(Oa(n))}}const xr="[  ]",_r=new RegExp(xr,"g");function Vc(t){return t.replace(/\./g,"\\.?").replace(_r,xr)}function Ar(t){return t.replace(/\./g,"").replace(_r," ").toLowerCase()}function ne(t,e){return t===null?null:{regex:RegExp(t.map(Vc).join("|")),deser:([n])=>t.findIndex(s=>Ar(n)===Ar(s))+e}}function Mr(t,e){return{regex:t,deser:([,n,s])=>St(n,s),groups:e}}function Nt(t){return{regex:t,deser:([e])=>e}}function Fc(t){return t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function Bc(t,e){const n=ee(e),s=ee(e,"{2}"),r=ee(e,"{3}"),i=ee(e,"{4}"),o=ee(e,"{6}"),a=ee(e,"{1,2}"),c=ee(e,"{1,3}"),l=ee(e,"{1,6}"),f=ee(e,"{1,9}"),d=ee(e,"{2,4}"),g=ee(e,"{4,6}"),p=O=>({regex:RegExp(Fc(O.val)),deser:([A])=>A,literal:!0}),w=(O=>{if(t.literal)return p(O);switch(O.val){case"G":return ne(e.eras("short"),0);case"GG":return ne(e.eras("long"),0);case"y":return v(l);case"yy":return v(d,dn);case"yyyy":return v(i);case"yyyyy":return v(g);case"yyyyyy":return v(o);case"M":return v(a);case"MM":return v(s);case"MMM":return ne(e.months("short",!0),1);case"MMMM":return ne(e.months("long",!0),1);case"L":return v(a);case"LL":return v(s);case"LLL":return ne(e.months("short",!1),1);case"LLLL":return ne(e.months("long",!1),1);case"d":return v(a);case"dd":return v(s);case"o":return v(c);case"ooo":return v(r);case"HH":return v(s);case"H":return v(a);case"hh":return v(s);case"h":return v(a);case"mm":return v(s);case"m":return v(a);case"q":return v(a);case"qq":return v(s);case"s":return v(a);case"ss":return v(s);case"S":return v(c);case"SSS":return v(r);case"u":return Nt(f);case"uu":return Nt(a);case"uuu":return v(n);case"a":return ne(e.meridiems(),0);case"kkkk":return v(i);case"kk":return v(d,dn);case"W":return v(a);case"WW":return v(s);case"E":case"c":return v(n);case"EEE":return ne(e.weekdays("short",!1),1);case"EEEE":return ne(e.weekdays("long",!1),1);case"ccc":return ne(e.weekdays("short",!0),1);case"cccc":return ne(e.weekdays("long",!0),1);case"Z":case"ZZ":return Mr(new RegExp(`([+-]${a.source})(?::(${s.source}))?`),2);case"ZZZ":return Mr(new RegExp(`([+-]${a.source})(${s.source})?`),2);case"z":return Nt(/[a-z_+-/]{1,256}?/i);case" ":return Nt(/[^\S\n\r]/);default:return p(O)}})(t)||{invalidReason:Lc};return w.token=t,w}const $c={year:{"2-digit":"yy",numeric:"yyyyy"},month:{numeric:"M","2-digit":"MM",short:"MMM",long:"MMMM"},day:{numeric:"d","2-digit":"dd"},weekday:{short:"EEE",long:"EEEE"},dayperiod:"a",dayPeriod:"a",hour12:{numeric:"h","2-digit":"hh"},hour24:{numeric:"H","2-digit":"HH"},minute:{numeric:"m","2-digit":"mm"},second:{numeric:"s","2-digit":"ss"},timeZoneName:{long:"ZZZZZ",short:"ZZZ"}};function Uc(t,e,n){const{type:s,value:r}=t;if(s==="literal"){const c=/^\s+$/.test(r);return{literal:!c,val:c?" ":r}}const i=e[s];let o=s;s==="hour"&&(e.hour12!=null?o=e.hour12?"hour12":"hour24":e.hourCycle!=null?e.hourCycle==="h11"||e.hourCycle==="h12"?o="hour12":o="hour24":o=n.hour12?"hour12":"hour24");let a=$c[o];if(typeof a=="object"&&(a=a[i]),a)return{literal:!1,val:a}}function Pc(t){return[`^${t.map(n=>n.regex).reduce((n,s)=>`${n}(${s.source})`,"")}$`,t]}function Wc(t,e,n){const s=t.match(e);if(s){const r={};let i=1;for(const o in n)if(xe(n,o)){const a=n[o],c=a.groups?a.groups+1:1;!a.literal&&a.token&&(r[a.token.val[0]]=a.deser(s.slice(i,i+c))),i+=c}return[s,r]}else return[s,{}]}function qc(t){const e=i=>{switch(i){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":case"H":return"hour";case"d":return"day";case"o":return"ordinal";case"L":case"M":return"month";case"y":return"year";case"E":case"c":return"weekday";case"W":return"weekNumber";case"k":return"weekYear";case"q":return"quarter";default:return null}};let n=null,s;return k(t.z)||(n=le.create(t.z)),k(t.Z)||(n||(n=new H(t.Z)),s=t.Z),k(t.q)||(t.M=(t.q-1)*3+1),k(t.h)||(t.h<12&&t.a===1?t.h+=12:t.h===12&&t.a===0&&(t.h=0)),t.G===0&&t.y&&(t.y=-t.y),k(t.u)||(t.S=fn(t.u)),[Object.keys(t).reduce((i,o)=>{const a=e(o);return a&&(i[a]=t[o]),i},{}),n,s]}let gn=null;function Hc(){return gn||(gn=S.fromMillis(1555555555555)),gn}function zc(t,e){if(t.literal)return t;const n=W.macroTokenToFormatOpts(t.val),s=Lr(n,e);return s==null||s.includes(void 0)?t:s}function Dr(t,e){return Array.prototype.concat(...t.map(n=>zc(n,e)))}class Ir{constructor(e,n){if(this.locale=e,this.format=n,this.tokens=Dr(W.parseFormat(n),e),this.units=this.tokens.map(s=>Bc(s,e)),this.disqualifyingUnit=this.units.find(s=>s.invalidReason),!this.disqualifyingUnit){const[s,r]=Pc(this.units);this.regex=RegExp(s,"i"),this.handlers=r}}explainFromTokens(e){if(this.isValid){const[n,s]=Wc(e,this.regex,this.handlers),[r,i,o]=s?qc(s):[null,null,void 0];if(xe(s,"a")&&xe(s,"H"))throw new Ce("Can't include meridiem when specifying 24-hour format");return{input:e,tokens:this.tokens,regex:this.regex,rawMatches:n,matches:s,result:r,zone:i,specificOffset:o}}else return{input:e,tokens:this.tokens,invalidReason:this.invalidReason}}get isValid(){return!this.disqualifyingUnit}get invalidReason(){return this.disqualifyingUnit?this.disqualifyingUnit.invalidReason:null}}function Rr(t,e,n){return new Ir(t,n).explainFromTokens(e)}function Zc(t,e,n){const{result:s,zone:r,specificOffset:i,invalidReason:o}=Rr(t,e,n);return[s,r,i,o]}function Lr(t,e){if(!t)return null;const s=W.create(e,t).dtFormatter(Hc()),r=s.formatToParts(),i=s.resolvedOptions();return r.map(o=>Uc(o,t,i))}const wn="Invalid DateTime",Vr=864e13;function Ke(t){return new te("unsupported zone",`the zone "${t.name}" is not supported`)}function En(t){return t.weekData===null&&(t.weekData=gt(t.c)),t.weekData}function kn(t){return t.localWeekData===null&&(t.localWeekData=gt(t.c,t.loc.getMinDaysInFirstWeek(),t.loc.getStartOfWeek())),t.localWeekData}function Se(t,e){const n={ts:t.ts,zone:t.zone,c:t.c,o:t.o,loc:t.loc,invalid:t.invalid};return new S({...n,...e,old:n})}function Fr(t,e,n){let s=t-e*60*1e3;const r=n.offset(s);if(e===r)return[s,e];s-=(r-e)*60*1e3;const i=n.offset(s);return r===i?[s,r]:[t-Math.min(r,i)*60*1e3,Math.max(r,i)]}function Ct(t,e){t+=e*60*1e3;const n=new Date(t);return{year:n.getUTCFullYear(),month:n.getUTCMonth()+1,day:n.getUTCDate(),hour:n.getUTCHours(),minute:n.getUTCMinutes(),second:n.getUTCSeconds(),millisecond:n.getUTCMilliseconds()}}function vt(t,e,n){return Fr(kt(t),e,n)}function Br(t,e){const n=t.o,s=t.c.year+Math.trunc(e.years),r=t.c.month+Math.trunc(e.months)+Math.trunc(e.quarters)*3,i={...t.c,year:s,month:r,day:Math.min(t.c.day,Et(s,r))+Math.trunc(e.days)+Math.trunc(e.weeks)*7},o=C.fromObject({years:e.years-Math.trunc(e.years),quarters:e.quarters-Math.trunc(e.quarters),months:e.months-Math.trunc(e.months),weeks:e.weeks-Math.trunc(e.weeks),days:e.days-Math.trunc(e.days),hours:e.hours,minutes:e.minutes,seconds:e.seconds,milliseconds:e.milliseconds}).as("milliseconds"),a=kt(i);let[c,l]=Fr(a,n,t.zone);return o!==0&&(c+=o,l=t.zone.offset(c)),{ts:c,o:l}}function Fe(t,e,n,s,r,i){const{setZone:o,zone:a}=n;if(t&&Object.keys(t).length!==0||e){const c=e||a,l=S.fromObject(t,{...n,zone:c,specificOffset:i});return o?l:l.setZone(a)}else return S.invalid(new te("unparsable",`the input "${r}" can't be parsed as ${s}`))}function xt(t,e,n=!0){return t.isValid?W.create(x.create("en-US"),{allowZ:n,forceSimple:!0}).formatDateTimeFromString(t,e):null}function Sn(t,e){const n=t.c.year>9999||t.c.year<0;let s="";return n&&t.c.year>=0&&(s+="+"),s+=R(t.c.year,n?6:4),e?(s+="-",s+=R(t.c.month),s+="-",s+=R(t.c.day)):(s+=R(t.c.month),s+=R(t.c.day)),s}function $r(t,e,n,s,r,i){let o=R(t.c.hour);return e?(o+=":",o+=R(t.c.minute),(t.c.millisecond!==0||t.c.second!==0||!n)&&(o+=":")):o+=R(t.c.minute),(t.c.millisecond!==0||t.c.second!==0||!n)&&(o+=R(t.c.second),(t.c.millisecond!==0||!s)&&(o+=".",o+=R(t.c.millisecond,3))),r&&(t.isOffsetFixed&&t.offset===0&&!i?o+="Z":t.o<0?(o+="-",o+=R(Math.trunc(-t.o/60)),o+=":",o+=R(Math.trunc(-t.o%60))):(o+="+",o+=R(Math.trunc(t.o/60)),o+=":",o+=R(Math.trunc(t.o%60)))),i&&(o+="["+t.zone.ianaName+"]"),o}const Ur={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},jc={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},Yc={ordinal:1,hour:0,minute:0,second:0,millisecond:0},Pr=["year","month","day","hour","minute","second","millisecond"],Jc=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],Gc=["year","ordinal","hour","minute","second","millisecond"];function Kc(t){const e={year:"year",years:"year",month:"month",months:"month",day:"day",days:"day",hour:"hour",hours:"hour",minute:"minute",minutes:"minute",quarter:"quarter",quarters:"quarter",second:"second",seconds:"second",millisecond:"millisecond",milliseconds:"millisecond",weekday:"weekday",weekdays:"weekday",weeknumber:"weekNumber",weeksnumber:"weekNumber",weeknumbers:"weekNumber",weekyear:"weekYear",weekyears:"weekYear",ordinal:"ordinal"}[t.toLowerCase()];if(!e)throw new ys(t);return e}function Wr(t){switch(t.toLowerCase()){case"localweekday":case"localweekdays":return"localWeekday";case"localweeknumber":case"localweeknumbers":return"localWeekNumber";case"localweekyear":case"localweekyears":return"localWeekYear";default:return Kc(t)}}function Xc(t){return At[t]||(_t===void 0&&(_t=M.now()),At[t]=t.offset(_t)),At[t]}function qr(t,e){const n=de(e.zone,M.defaultZone);if(!n.isValid)return S.invalid(Ke(n));const s=x.fromObject(e);let r,i;if(k(t.year))r=M.now();else{for(const c of Pr)k(t[c])&&(t[c]=Ur[c]);const o=er(t)||tr(t);if(o)return S.invalid(o);const a=Xc(n);[r,i]=vt(t,a,n)}return new S({ts:r,zone:n,loc:s,o:i})}function Hr(t,e,n){const s=k(n.round)?!0:n.round,r=(o,a)=>(o=hn(o,s||n.calendary?0:2,!0),e.loc.clone(n).relFormatter(n).format(o,a)),i=o=>n.calendary?e.hasSame(t,o)?0:e.startOf(o).diff(t.startOf(o),o).get(o):e.diff(t,o).get(o);if(n.unit)return r(i(n.unit),n.unit);for(const o of n.units){const a=i(o);if(Math.abs(a)>=1)return r(a,o)}return r(t>e?-0:0,n.units[n.units.length-1])}function zr(t){let e={},n;return t.length>0&&typeof t[t.length-1]=="object"?(e=t[t.length-1],n=Array.from(t).slice(0,t.length-1)):n=Array.from(t),[e,n]}let _t,At={};class S{constructor(e){const n=e.zone||M.defaultZone;let s=e.invalid||(Number.isNaN(e.ts)?new te("invalid input"):null)||(n.isValid?null:Ke(n));this.ts=k(e.ts)?M.now():e.ts;let r=null,i=null;if(!s)if(e.old&&e.old.ts===this.ts&&e.old.zone.equals(n))[r,i]=[e.old.c,e.old.o];else{const a=me(e.o)&&!e.old?e.o:n.offset(this.ts);r=Ct(this.ts,a),s=Number.isNaN(r.year)?new te("invalid input"):null,r=s?null:r,i=s?null:a}this._zone=n,this.loc=e.loc||x.create(),this.invalid=s,this.weekData=null,this.localWeekData=null,this.c=r,this.o=i,this.isLuxonDateTime=!0}static now(){return new S({})}static local(){const[e,n]=zr(arguments),[s,r,i,o,a,c,l]=n;return qr({year:s,month:r,day:i,hour:o,minute:a,second:c,millisecond:l},e)}static utc(){const[e,n]=zr(arguments),[s,r,i,o,a,c,l]=n;return e.zone=H.utcInstance,qr({year:s,month:r,day:i,hour:o,minute:a,second:c,millisecond:l},e)}static fromJSDate(e,n={}){const s=_a(e)?e.valueOf():NaN;if(Number.isNaN(s))return S.invalid("invalid input");const r=de(n.zone,M.defaultZone);return r.isValid?new S({ts:s,zone:r,loc:x.fromObject(n)}):S.invalid(Ke(r))}static fromMillis(e,n={}){if(me(e))return e<-Vr||e>Vr?S.invalid("Timestamp out of range"):new S({ts:e,zone:de(n.zone,M.defaultZone),loc:x.fromObject(n)});throw new P(`fromMillis requires a numerical input, but received a ${typeof e} with value ${e}`)}static fromSeconds(e,n={}){if(me(e))return new S({ts:e*1e3,zone:de(n.zone,M.defaultZone),loc:x.fromObject(n)});throw new P("fromSeconds requires a numerical input")}static fromObject(e,n={}){e=e||{};const s=de(n.zone,M.defaultZone);if(!s.isValid)return S.invalid(Ke(s));const r=x.fromObject(n),i=Tt(e,Wr),{minDaysInFirstWeek:o,startOfWeek:a}=Qs(i,r),c=M.now(),l=k(n.specificOffset)?s.offset(c):n.specificOffset,f=!k(i.ordinal),d=!k(i.year),g=!k(i.month)||!k(i.day),p=d||g,m=i.weekYear||i.weekNumber;if((p||f)&&m)throw new Ce("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(g&&f)throw new Ce("Can't mix ordinal dates with month/day");const w=m||i.weekday&&!p;let O,A,I=Ct(c,l);w?(O=Jc,A=jc,I=gt(I,o,a)):f?(O=Gc,A=Yc,I=ln(I)):(O=Pr,A=Ur);let q=!1;for(const $ of O){const V=i[$];k(V)?q?i[$]=A[$]:i[$]=I[$]:q=!0}const tt=w?Ca(i,o,a):f?va(i):er(i),nt=tt||tr(i);if(nt)return S.invalid(nt);const Vn=w?Ks(i,o,a):f?Xs(i):i,[E,T]=vt(Vn,l,s),_=new S({ts:E,zone:s,o:T,loc:r});return i.weekday&&p&&e.weekday!==_.weekday?S.invalid("mismatched weekday",`you can't specify both a weekday of ${i.weekday} and a date of ${_.toISO()}`):_.isValid?_:S.invalid(_.invalid)}static fromISO(e,n={}){const[s,r]=wc(e);return Fe(s,r,n,"ISO 8601",e)}static fromRFC2822(e,n={}){const[s,r]=Ec(e);return Fe(s,r,n,"RFC 2822",e)}static fromHTTP(e,n={}){const[s,r]=kc(e);return Fe(s,r,n,"HTTP",n)}static fromFormat(e,n,s={}){if(k(e)||k(n))throw new P("fromFormat requires an input string and a format");const{locale:r=null,numberingSystem:i=null}=s,o=x.fromOpts({locale:r,numberingSystem:i,defaultToEN:!0}),[a,c,l,f]=Zc(o,e,n);return f?S.invalid(f):Fe(a,c,s,`format ${n}`,e,l)}static fromString(e,n,s={}){return S.fromFormat(e,n,s)}static fromSQL(e,n={}){const[s,r]=vc(e);return Fe(s,r,n,"SQL",e)}static invalid(e,n=null){if(!e)throw new P("need to specify a reason the DateTime is invalid");const s=e instanceof te?e:new te(e,n);if(M.throwOnInvalid)throw new Qo(s);return new S({invalid:s})}static isDateTime(e){return e&&e.isLuxonDateTime||!1}static parseFormatForOpts(e,n={}){const s=Lr(e,x.fromObject(n));return s?s.map(r=>r?r.val:null).join(""):null}static expandFormat(e,n={}){return Dr(W.parseFormat(e),x.fromObject(n)).map(r=>r.val).join("")}static resetCache(){_t=void 0,At={}}get(e){return this[e]}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}get outputCalendar(){return this.isValid?this.loc.outputCalendar:null}get zone(){return this._zone}get zoneName(){return this.isValid?this.zone.name:null}get year(){return this.isValid?this.c.year:NaN}get quarter(){return this.isValid?Math.ceil(this.c.month/3):NaN}get month(){return this.isValid?this.c.month:NaN}get day(){return this.isValid?this.c.day:NaN}get hour(){return this.isValid?this.c.hour:NaN}get minute(){return this.isValid?this.c.minute:NaN}get second(){return this.isValid?this.c.second:NaN}get millisecond(){return this.isValid?this.c.millisecond:NaN}get weekYear(){return this.isValid?En(this).weekYear:NaN}get weekNumber(){return this.isValid?En(this).weekNumber:NaN}get weekday(){return this.isValid?En(this).weekday:NaN}get isWeekend(){return this.isValid&&this.loc.getWeekendDays().includes(this.weekday)}get localWeekday(){return this.isValid?kn(this).weekday:NaN}get localWeekNumber(){return this.isValid?kn(this).weekNumber:NaN}get localWeekYear(){return this.isValid?kn(this).weekYear:NaN}get ordinal(){return this.isValid?ln(this.c).ordinal:NaN}get monthShort(){return this.isValid?Ot.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?Ot.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?Ot.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?Ot.weekdays("long",{locObj:this.loc})[this.weekday-1]:null}get offset(){return this.isValid?+this.o:NaN}get offsetNameShort(){return this.isValid?this.zone.offsetName(this.ts,{format:"short",locale:this.locale}):null}get offsetNameLong(){return this.isValid?this.zone.offsetName(this.ts,{format:"long",locale:this.locale}):null}get isOffsetFixed(){return this.isValid?this.zone.isUniversal:null}get isInDST(){return this.isOffsetFixed?!1:this.offset>this.set({month:1,day:1}).offset||this.offset>this.set({month:5}).offset}getPossibleOffsets(){if(!this.isValid||this.isOffsetFixed)return[this];const e=864e5,n=6e4,s=kt(this.c),r=this.zone.offset(s-e),i=this.zone.offset(s+e),o=this.zone.offset(s-r*n),a=this.zone.offset(s-i*n);if(o===a)return[this];const c=s-o*n,l=s-a*n,f=Ct(c,o),d=Ct(l,a);return f.hour===d.hour&&f.minute===d.minute&&f.second===d.second&&f.millisecond===d.millisecond?[Se(this,{ts:c}),Se(this,{ts:l})]:[this]}get isInLeapYear(){return Ze(this.year)}get daysInMonth(){return Et(this.year,this.month)}get daysInYear(){return this.isValid?_e(this.year):NaN}get weeksInWeekYear(){return this.isValid?je(this.weekYear):NaN}get weeksInLocalWeekYear(){return this.isValid?je(this.localWeekYear,this.loc.getMinDaysInFirstWeek(),this.loc.getStartOfWeek()):NaN}resolvedLocaleOptions(e={}){const{locale:n,numberingSystem:s,calendar:r}=W.create(this.loc.clone(e),e).resolvedOptions(this);return{locale:n,numberingSystem:s,outputCalendar:r}}toUTC(e=0,n={}){return this.setZone(H.instance(e),n)}toLocal(){return this.setZone(M.defaultZone)}setZone(e,{keepLocalTime:n=!1,keepCalendarTime:s=!1}={}){if(e=de(e,M.defaultZone),e.equals(this.zone))return this;if(e.isValid){let r=this.ts;if(n||s){const i=e.offset(this.ts),o=this.toObject();[r]=vt(o,i,e)}return Se(this,{ts:r,zone:e})}else return S.invalid(Ke(e))}reconfigure({locale:e,numberingSystem:n,outputCalendar:s}={}){const r=this.loc.clone({locale:e,numberingSystem:n,outputCalendar:s});return Se(this,{loc:r})}setLocale(e){return this.reconfigure({locale:e})}set(e){if(!this.isValid)return this;const n=Tt(e,Wr),{minDaysInFirstWeek:s,startOfWeek:r}=Qs(n,this.loc),i=!k(n.weekYear)||!k(n.weekNumber)||!k(n.weekday),o=!k(n.ordinal),a=!k(n.year),c=!k(n.month)||!k(n.day),l=a||c,f=n.weekYear||n.weekNumber;if((l||o)&&f)throw new Ce("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(c&&o)throw new Ce("Can't mix ordinal dates with month/day");let d;i?d=Ks({...gt(this.c,s,r),...n},s,r):k(n.ordinal)?(d={...this.toObject(),...n},k(n.day)&&(d.day=Math.min(Et(d.year,d.month),d.day))):d=Xs({...ln(this.c),...n});const[g,p]=vt(d,this.o,this.zone);return Se(this,{ts:g,o:p})}plus(e){if(!this.isValid)return this;const n=C.fromDurationLike(e);return Se(this,Br(this,n))}minus(e){if(!this.isValid)return this;const n=C.fromDurationLike(e).negate();return Se(this,Br(this,n))}startOf(e,{useLocaleWeeks:n=!1}={}){if(!this.isValid)return this;const s={},r=C.normalizeUnit(e);switch(r){case"years":s.month=1;case"quarters":case"months":s.day=1;case"weeks":case"days":s.hour=0;case"hours":s.minute=0;case"minutes":s.second=0;case"seconds":s.millisecond=0;break}if(r==="weeks")if(n){const i=this.loc.getStartOfWeek(),{weekday:o}=this;o<i&&(s.weekNumber=this.weekNumber-1),s.weekday=i}else s.weekday=1;if(r==="quarters"){const i=Math.ceil(this.month/3);s.month=(i-1)*3+1}return this.set(s)}endOf(e,n){return this.isValid?this.plus({[e]:1}).startOf(e,n).minus(1):this}toFormat(e,n={}){return this.isValid?W.create(this.loc.redefaultToEN(n)).formatDateTimeFromString(this,e):wn}toLocaleString(e=ht,n={}){return this.isValid?W.create(this.loc.clone(n),e).formatDateTime(this):wn}toLocaleParts(e={}){return this.isValid?W.create(this.loc.clone(e),e).formatDateTimeParts(this):[]}toISO({format:e="extended",suppressSeconds:n=!1,suppressMilliseconds:s=!1,includeOffset:r=!0,extendedZone:i=!1}={}){if(!this.isValid)return null;const o=e==="extended";let a=Sn(this,o);return a+="T",a+=$r(this,o,n,s,r,i),a}toISODate({format:e="extended"}={}){return this.isValid?Sn(this,e==="extended"):null}toISOWeekDate(){return xt(this,"kkkk-'W'WW-c")}toISOTime({suppressMilliseconds:e=!1,suppressSeconds:n=!1,includeOffset:s=!0,includePrefix:r=!1,extendedZone:i=!1,format:o="extended"}={}){return this.isValid?(r?"T":"")+$r(this,o==="extended",n,e,s,i):null}toRFC2822(){return xt(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)}toHTTP(){return xt(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")}toSQLDate(){return this.isValid?Sn(this,!0):null}toSQLTime({includeOffset:e=!0,includeZone:n=!1,includeOffsetSpace:s=!0}={}){let r="HH:mm:ss.SSS";return(n||e)&&(s&&(r+=" "),n?r+="z":e&&(r+="ZZ")),xt(this,r,!0)}toSQL(e={}){return this.isValid?`${this.toSQLDate()} ${this.toSQLTime(e)}`:null}toString(){return this.isValid?this.toISO():wn}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`DateTime { ts: ${this.toISO()}, zone: ${this.zone.name}, locale: ${this.locale} }`:`DateTime { Invalid, reason: ${this.invalidReason} }`}valueOf(){return this.toMillis()}toMillis(){return this.isValid?this.ts:NaN}toSeconds(){return this.isValid?this.ts/1e3:NaN}toUnixInteger(){return this.isValid?Math.floor(this.ts/1e3):NaN}toJSON(){return this.toISO()}toBSON(){return this.toJSDate()}toObject(e={}){if(!this.isValid)return{};const n={...this.c};return e.includeConfig&&(n.outputCalendar=this.outputCalendar,n.numberingSystem=this.loc.numberingSystem,n.locale=this.loc.locale),n}toJSDate(){return new Date(this.isValid?this.ts:NaN)}diff(e,n="milliseconds",s={}){if(!this.isValid||!e.isValid)return C.invalid("created by diffing an invalid DateTime");const r={locale:this.locale,numberingSystem:this.numberingSystem,...s},i=Aa(n).map(C.normalizeUnit),o=e.valueOf()>this.valueOf(),a=o?this:e,c=o?e:this,l=Rc(a,c,i,r);return o?l.negate():l}diffNow(e="milliseconds",n={}){return this.diff(S.now(),e,n)}until(e){return this.isValid?D.fromDateTimes(this,e):this}hasSame(e,n,s){if(!this.isValid)return!1;const r=e.valueOf(),i=this.setZone(e.zone,{keepLocalTime:!0});return i.startOf(n,s)<=r&&r<=i.endOf(n,s)}equals(e){return this.isValid&&e.isValid&&this.valueOf()===e.valueOf()&&this.zone.equals(e.zone)&&this.loc.equals(e.loc)}toRelative(e={}){if(!this.isValid)return null;const n=e.base||S.fromObject({},{zone:this.zone}),s=e.padding?this<n?-e.padding:e.padding:0;let r=["years","months","days","hours","minutes","seconds"],i=e.unit;return Array.isArray(e.unit)&&(r=e.unit,i=void 0),Hr(n,this.plus(s),{...e,numeric:"always",units:r,unit:i})}toRelativeCalendar(e={}){return this.isValid?Hr(e.base||S.fromObject({},{zone:this.zone}),this,{...e,numeric:"auto",units:["years","months","days"],calendary:!0}):null}static min(...e){if(!e.every(S.isDateTime))throw new P("min requires all arguments be DateTimes");return rr(e,n=>n.valueOf(),Math.min)}static max(...e){if(!e.every(S.isDateTime))throw new P("max requires all arguments be DateTimes");return rr(e,n=>n.valueOf(),Math.max)}static fromFormatExplain(e,n,s={}){const{locale:r=null,numberingSystem:i=null}=s,o=x.fromOpts({locale:r,numberingSystem:i,defaultToEN:!0});return Rr(o,e,n)}static fromStringExplain(e,n,s={}){return S.fromFormatExplain(e,n,s)}static buildFormatParser(e,n={}){const{locale:s=null,numberingSystem:r=null}=n,i=x.fromOpts({locale:s,numberingSystem:r,defaultToEN:!0});return new Ir(i,e)}static fromFormatParser(e,n,s={}){if(k(e)||k(n))throw new P("fromFormatParser requires an input string and a format parser");const{locale:r=null,numberingSystem:i=null}=s,o=x.fromOpts({locale:r,numberingSystem:i,defaultToEN:!0});if(!o.equals(n.locale))throw new P(`fromFormatParser called with a locale of ${o}, but the format parser was created for ${n.locale}`);const{result:a,zone:c,specificOffset:l,invalidReason:f}=n.explainFromTokens(e);return f?S.invalid(f):Fe(a,c,s,`format ${n.format}`,e,l)}static get DATE_SHORT(){return ht}static get DATE_MED(){return gs}static get DATE_MED_WITH_WEEKDAY(){return na}static get DATE_FULL(){return ws}static get DATE_HUGE(){return Es}static get TIME_SIMPLE(){return ks}static get TIME_WITH_SECONDS(){return Ss}static get TIME_WITH_SHORT_OFFSET(){return Ts}static get TIME_WITH_LONG_OFFSET(){return bs}static get TIME_24_SIMPLE(){return Os}static get TIME_24_WITH_SECONDS(){return Ns}static get TIME_24_WITH_SHORT_OFFSET(){return Cs}static get TIME_24_WITH_LONG_OFFSET(){return vs}static get DATETIME_SHORT(){return xs}static get DATETIME_SHORT_WITH_SECONDS(){return _s}static get DATETIME_MED(){return As}static get DATETIME_MED_WITH_SECONDS(){return Ms}static get DATETIME_MED_WITH_WEEKDAY(){return sa}static get DATETIME_FULL(){return Ds}static get DATETIME_FULL_WITH_SECONDS(){return Is}static get DATETIME_HUGE(){return Rs}static get DATETIME_HUGE_WITH_SECONDS(){return Ls}}function Xe(t){if(S.isDateTime(t))return t;if(t&&t.valueOf&&me(t.valueOf()))return S.fromJSDate(t);if(t&&typeof t=="object")return S.fromObject(t);throw new P(`Unknown datetime argument: ${t}, of type ${typeof t}`)}const Qc={},el={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},tl=[u.createElementVNode("path",{fill:"rgb(248 113 113)",d:"M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zm0-384c13.3 0 24 10.7 24 24V264c0 13.3-10.7 24-24 24s-24-10.7-24-24V152c0-13.3 10.7-24 24-24zM224 352a32 32 0 1 1 64 0 32 32 0 1 1 -64 0z"},null,-1)];function nl(t,e){return u.openBlock(),u.createElementBlock("svg",el,tl)}const sl=X(Qc,[["render",nl]]),rl={class:"messages-container-list"},il={class:"message-container"},ol={key:0,class:"btn-container-widget"},al=["onClick"],cl={class:"chat-message"},ll=["innerHTML"],ul={class:"detail-message flex justify-content-between"},fl={key:0,class:"mr-5"},hl={key:1,class:"mr-5"},dl=X(u.defineComponent({__name:"MessageList",props:{messages:{type:Array,default:()=>[]},canLoadMoreMessages:{type:Boolean,default:!1}},emits:["loadMore","retry"],setup(t,{emit:e}){const n=t,s=u.ref(),{pause:r,resume:i}=Xo(s,([{isIntersecting:c}])=>{c&&e("loadMore")});u.onBeforeMount(()=>{n.canLoadMoreMessages||r()}),u.watch(()=>n.canLoadMoreMessages,c=>{if(c){i();return}r()});const o={BOLD:{regex:/\*(.+?)\*(?!\*)/g,tag:"<strong--custom-tag>{val}</strong--custom-tag>"},ITALIC:{regex:/_(.+?)_/,tag:"<i--custom-tag>{val}</i--custom-tag>"},CROSSED_OUT:{regex:/~(.+?)~(?!~)/g,tag:"<del--custom-tag>{val}</del--custom-tag>"},URL:{regex:/(http?s?:\/\/[^\s]+)/g,tag:'<a--custom-tag href="{val}" target="_blank">{val}</a--custom-tag>'}};function a(c){const l=Object.values(o);return!l||Array.isArray(l)&&l.length===0?c:l.reduce((d,g)=>d.replace(g.regex,(p,m)=>/--custom-tag/.test(p)?p:g.tag.replace(/{val}/g,m)),c).replace(/--custom-tag/g,"")}return(c,l)=>(u.openBlock(),u.createElementBlock(u.Fragment,null,[u.createElementVNode("div",{ref_key:"target",ref:s,class:"target"},null,512),u.createElementVNode("div",rl,[(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(n.messages,f=>{var d,g;return u.openBlock(),u.createElementBlock("div",{key:f.id,class:u.normalizeClass(["message",f.esCliente?"message-right":"message-left"])},[u.createElementVNode("div",il,[f.error&&f.esCliente?(u.openBlock(),u.createElementBlock("div",ol,[u.createElementVNode("button",{text:"",rounded:"",class:"btn-danger",icon:"fa-solid fa-circle-exclamation","aria-label":"Cancel",onClick:p=>e("retry",f)},[u.createVNode(sl)],8,al)])):u.createCommentVNode("",!0),u.createElementVNode("div",cl,[u.createElementVNode("div",{class:u.normalizeClass(["bubble",f.esCliente?"right":"left"])},[u.createElementVNode("div",{class:u.normalizeClass(f.esCliente?"content-right":"content-left")},[u.createElementVNode("div",{class:"message-text",style:{"white-space":"pre-line"},innerHTML:a(f.message)},null,8,ll),u.createElementVNode("div",ul,[(d=f.sender)!=null&&d.nombreCompleto?(u.openBlock(),u.createElementBlock("span",fl,u.toDisplayString(f.esCliente?(g=f.sender)==null?void 0:g.nombreCompleto:"ECOSISTEMA JL"),1)):(u.openBlock(),u.createElementBlock("span",hl)),u.createElementVNode("span",null,u.toDisplayString(u.unref(S).fromISO(f.createdAt).toFormat("dd-MM-yyyy HH:mm")),1)])],2)],2)])])],2)}),128))])],64))}}),[["__scopeId","data-v-509c8cf2"]]),ml={},Zr=t=>(u.pushScopeId("data-v-d9a6b2b7"),t=t(),u.popScopeId(),t),pl={viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",style:{width:"28px",height:"28px"}},yl=[Zr(()=>u.createElementVNode("path",{d:"M12,1A11,11,0,1,0,23,12,11,11,0,0,0,12,1Zm0,19a8,8,0,1,1,8-8A8,8,0,0,1,12,20Z",opacity:".25"},null,-1)),Zr(()=>u.createElementVNode("path",{d:"M10.14,1.16a11,11,0,0,0-9,8.92A1.59,1.59,0,0,0,2.46,12,1.52,1.52,0,0,0,4.11,10.7a8,8,0,0,1,6.66-6.61A1.42,1.42,0,0,0,12,2.69h0A1.57,1.57,0,0,0,10.14,1.16Z",class:"spinner_ajPY"},null,-1))];function gl(t,e){return u.openBlock(),u.createElementBlock("svg",pl,yl)}const wl=X(ml,[["render",gl],["__scopeId","data-v-d9a6b2b7"]]);function El(t,e,n){for(let s=t.length-1;s>=0;s--)if(t[s][e]===n)return s;return-1}const ae=Object.create(null);ae.open="0",ae.close="1",ae.ping="2",ae.pong="3",ae.message="4",ae.upgrade="5",ae.noop="6";const Mt=Object.create(null);Object.keys(ae).forEach(t=>{Mt[ae[t]]=t});const Tn={type:"error",data:"parser error"},jr=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",Yr=typeof ArrayBuffer=="function",Jr=t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t&&t.buffer instanceof ArrayBuffer,bn=({type:t,data:e},n,s)=>jr&&e instanceof Blob?n?s(e):Gr(e,s):Yr&&(e instanceof ArrayBuffer||Jr(e))?n?s(e):Gr(new Blob([e]),s):s(ae[t]+(e||"")),Gr=(t,e)=>{const n=new FileReader;return n.onload=function(){const s=n.result.split(",")[1];e("b"+(s||""))},n.readAsDataURL(t)};function Kr(t){return t instanceof Uint8Array?t:t instanceof ArrayBuffer?new Uint8Array(t):new Uint8Array(t.buffer,t.byteOffset,t.byteLength)}let On;function kl(t,e){if(jr&&t.data instanceof Blob)return t.data.arrayBuffer().then(Kr).then(e);if(Yr&&(t.data instanceof ArrayBuffer||Jr(t.data)))return e(Kr(t.data));bn(t,!1,n=>{On||(On=new TextEncoder),e(On.encode(n))})}const Xr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Qe=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let t=0;t<Xr.length;t++)Qe[Xr.charCodeAt(t)]=t;const Sl=t=>{let e=t.length*.75,n=t.length,s,r=0,i,o,a,c;t[t.length-1]==="="&&(e--,t[t.length-2]==="="&&e--);const l=new ArrayBuffer(e),f=new Uint8Array(l);for(s=0;s<n;s+=4)i=Qe[t.charCodeAt(s)],o=Qe[t.charCodeAt(s+1)],a=Qe[t.charCodeAt(s+2)],c=Qe[t.charCodeAt(s+3)],f[r++]=i<<2|o>>4,f[r++]=(o&15)<<4|a>>2,f[r++]=(a&3)<<6|c&63;return l},Tl=typeof ArrayBuffer=="function",Nn=(t,e)=>{if(typeof t!="string")return{type:"message",data:Qr(t,e)};const n=t.charAt(0);return n==="b"?{type:"message",data:bl(t.substring(1),e)}:Mt[n]?t.length>1?{type:Mt[n],data:t.substring(1)}:{type:Mt[n]}:Tn},bl=(t,e)=>{if(Tl){const n=Sl(t);return Qr(n,e)}else return{base64:!0,data:t}},Qr=(t,e)=>{switch(e){case"blob":return t instanceof Blob?t:new Blob([t]);case"arraybuffer":default:return t instanceof ArrayBuffer?t:t.buffer}},ei="",Ol=(t,e)=>{const n=t.length,s=new Array(n);let r=0;t.forEach((i,o)=>{bn(i,!1,a=>{s[o]=a,++r===n&&e(s.join(ei))})})},Nl=(t,e)=>{const n=t.split(ei),s=[];for(let r=0;r<n.length;r++){const i=Nn(n[r],e);if(s.push(i),i.type==="error")break}return s};function Cl(){return new TransformStream({transform(t,e){kl(t,n=>{const s=n.length;let r;if(s<126)r=new Uint8Array(1),new DataView(r.buffer).setUint8(0,s);else if(s<65536){r=new Uint8Array(3);const i=new DataView(r.buffer);i.setUint8(0,126),i.setUint16(1,s)}else{r=new Uint8Array(9);const i=new DataView(r.buffer);i.setUint8(0,127),i.setBigUint64(1,BigInt(s))}t.data&&typeof t.data!="string"&&(r[0]|=128),e.enqueue(r),e.enqueue(n)})}})}let Cn;function Dt(t){return t.reduce((e,n)=>e+n.length,0)}function It(t,e){if(t[0].length===e)return t.shift();const n=new Uint8Array(e);let s=0;for(let r=0;r<e;r++)n[r]=t[0][s++],s===t[0].length&&(t.shift(),s=0);return t.length&&s<t[0].length&&(t[0]=t[0].slice(s)),n}function vl(t,e){Cn||(Cn=new TextDecoder);const n=[];let s=0,r=-1,i=!1;return new TransformStream({transform(o,a){for(n.push(o);;){if(s===0){if(Dt(n)<1)break;const c=It(n,1);i=(c[0]&128)===128,r=c[0]&127,r<126?s=3:r===126?s=1:s=2}else if(s===1){if(Dt(n)<2)break;const c=It(n,2);r=new DataView(c.buffer,c.byteOffset,c.length).getUint16(0),s=3}else if(s===2){if(Dt(n)<8)break;const c=It(n,8),l=new DataView(c.buffer,c.byteOffset,c.length),f=l.getUint32(0);if(f>Math.pow(2,21)-1){a.enqueue(Tn);break}r=f*Math.pow(2,32)+l.getUint32(4),s=3}else{if(Dt(n)<r)break;const c=It(n,r);a.enqueue(Nn(i?c:Cn.decode(c),e)),s=0}if(r===0||r>t){a.enqueue(Tn);break}}}})}const ti=4;function L(t){if(t)return xl(t)}function xl(t){for(var e in L.prototype)t[e]=L.prototype[e];return t}L.prototype.on=L.prototype.addEventListener=function(t,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(e),this},L.prototype.once=function(t,e){function n(){this.off(t,n),e.apply(this,arguments)}return n.fn=e,this.on(t,n),this},L.prototype.off=L.prototype.removeListener=L.prototype.removeAllListeners=L.prototype.removeEventListener=function(t,e){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var n=this._callbacks["$"+t];if(!n)return this;if(arguments.length==1)return delete this._callbacks["$"+t],this;for(var s,r=0;r<n.length;r++)if(s=n[r],s===e||s.fn===e){n.splice(r,1);break}return n.length===0&&delete this._callbacks["$"+t],this},L.prototype.emit=function(t){this._callbacks=this._callbacks||{};for(var e=new Array(arguments.length-1),n=this._callbacks["$"+t],s=1;s<arguments.length;s++)e[s-1]=arguments[s];if(n){n=n.slice(0);for(var s=0,r=n.length;s<r;++s)n[s].apply(this,e)}return this},L.prototype.emitReserved=L.prototype.emit,L.prototype.listeners=function(t){return this._callbacks=this._callbacks||{},this._callbacks["$"+t]||[]},L.prototype.hasListeners=function(t){return!!this.listeners(t).length};const K=typeof self<"u"?self:typeof window<"u"?window:Function("return this")();function ni(t,...e){return e.reduce((n,s)=>(t.hasOwnProperty(s)&&(n[s]=t[s]),n),{})}const _l=K.setTimeout,Al=K.clearTimeout;function Rt(t,e){e.useNativeTimers?(t.setTimeoutFn=_l.bind(K),t.clearTimeoutFn=Al.bind(K)):(t.setTimeoutFn=K.setTimeout.bind(K),t.clearTimeoutFn=K.clearTimeout.bind(K))}const Ml=1.33;function Dl(t){return typeof t=="string"?Il(t):Math.ceil((t.byteLength||t.size)*Ml)}function Il(t){let e=0,n=0;for(let s=0,r=t.length;s<r;s++)e=t.charCodeAt(s),e<128?n+=1:e<2048?n+=2:e<55296||e>=57344?n+=3:(s++,n+=4);return n}function Rl(t){let e="";for(let n in t)t.hasOwnProperty(n)&&(e.length&&(e+="&"),e+=encodeURIComponent(n)+"="+encodeURIComponent(t[n]));return e}function Ll(t){let e={},n=t.split("&");for(let s=0,r=n.length;s<r;s++){let i=n[s].split("=");e[decodeURIComponent(i[0])]=decodeURIComponent(i[1])}return e}class Vl extends Error{constructor(e,n,s){super(e),this.description=n,this.context=s,this.type="TransportError"}}class vn extends L{constructor(e){super(),this.writable=!1,Rt(this,e),this.opts=e,this.query=e.query,this.socket=e.socket}onError(e,n,s){return super.emitReserved("error",new Vl(e,n,s)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(e){this.readyState==="open"&&this.write(e)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(e){const n=Nn(e,this.socket.binaryType);this.onPacket(n)}onPacket(e){super.emitReserved("packet",e)}onClose(e){this.readyState="closed",super.emitReserved("close",e)}pause(e){}createUri(e,n={}){return e+"://"+this._hostname()+this._port()+this.opts.path+this._query(n)}_hostname(){const e=this.opts.hostname;return e.indexOf(":")===-1?e:"["+e+"]"}_port(){return this.opts.port&&(this.opts.secure&&+(this.opts.port!==443)||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(e){const n=Rl(e);return n.length?"?"+n:""}}const si="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),xn=64,Fl={};let ri=0,Lt=0,ii;function oi(t){let e="";do e=si[t%xn]+e,t=Math.floor(t/xn);while(t>0);return e}function ai(){const t=oi(+new Date);return t!==ii?(ri=0,ii=t):t+"."+oi(ri++)}for(;Lt<xn;Lt++)Fl[si[Lt]]=Lt;let ci=!1;try{ci=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const Bl=ci;function li(t){const e=t.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!e||Bl))return new XMLHttpRequest}catch{}if(!e)try{return new K[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}function af(){}function $l(){}const Ul=function(){return new li({xdomain:!1}).responseType!=null}();class Pl extends vn{constructor(e){if(super(e),this.polling=!1,typeof location<"u"){const s=location.protocol==="https:";let r=location.port;r||(r=s?"443":"80"),this.xd=typeof location<"u"&&e.hostname!==location.hostname||r!==e.port}const n=e&&e.forceBase64;this.supportsBinary=Ul&&!n,this.opts.withCredentials&&(this.cookieJar=void 0)}get name(){return"polling"}doOpen(){this.poll()}pause(e){this.readyState="pausing";const n=()=>{this.readyState="paused",e()};if(this.polling||!this.writable){let s=0;this.polling&&(s++,this.once("pollComplete",function(){--s||n()})),this.writable||(s++,this.once("drain",function(){--s||n()}))}else n()}poll(){this.polling=!0,this.doPoll(),this.emitReserved("poll")}onData(e){const n=s=>{if(this.readyState==="opening"&&s.type==="open"&&this.onOpen(),s.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(s)};Nl(e,this.socket.binaryType).forEach(n),this.readyState!=="closed"&&(this.polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this.poll())}doClose(){const e=()=>{this.write([{type:"close"}])};this.readyState==="open"?e():this.once("open",e)}write(e){this.writable=!1,Ol(e,n=>{this.doWrite(n,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const e=this.opts.secure?"https":"http",n=this.query||{};return this.opts.timestampRequests!==!1&&(n[this.opts.timestampParam]=ai()),!this.supportsBinary&&!n.sid&&(n.b64=1),this.createUri(e,n)}request(e={}){return Object.assign(e,{xd:this.xd,cookieJar:this.cookieJar},this.opts),new ce(this.uri(),e)}doWrite(e,n){const s=this.request({method:"POST",data:e});s.on("success",n),s.on("error",(r,i)=>{this.onError("xhr post error",r,i)})}doPoll(){const e=this.request();e.on("data",this.onData.bind(this)),e.on("error",(n,s)=>{this.onError("xhr poll error",n,s)}),this.pollXhr=e}}class ce extends L{constructor(e,n){super(),Rt(this,n),this.opts=n,this.method=n.method||"GET",this.uri=e,this.data=n.data!==void 0?n.data:null,this.create()}create(){var e;const n=ni(this.opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");n.xdomain=!!this.opts.xd;const s=this.xhr=new li(n);try{s.open(this.method,this.uri,!0);try{if(this.opts.extraHeaders){s.setDisableHeaderCheck&&s.setDisableHeaderCheck(!0);for(let r in this.opts.extraHeaders)this.opts.extraHeaders.hasOwnProperty(r)&&s.setRequestHeader(r,this.opts.extraHeaders[r])}}catch{}if(this.method==="POST")try{s.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{s.setRequestHeader("Accept","*/*")}catch{}(e=this.opts.cookieJar)===null||e===void 0||e.addCookies(s),"withCredentials"in s&&(s.withCredentials=this.opts.withCredentials),this.opts.requestTimeout&&(s.timeout=this.opts.requestTimeout),s.onreadystatechange=()=>{var r;s.readyState===3&&((r=this.opts.cookieJar)===null||r===void 0||r.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(r){this.setTimeoutFn(()=>{this.onError(r)},0);return}typeof document<"u"&&(this.index=ce.requestsCount++,ce.requests[this.index]=this)}onError(e){this.emitReserved("error",e,this.xhr),this.cleanup(!0)}cleanup(e){if(!(typeof this.xhr>"u"||this.xhr===null)){if(this.xhr.onreadystatechange=$l,e)try{this.xhr.abort()}catch{}typeof document<"u"&&delete ce.requests[this.index],this.xhr=null}}onLoad(){const e=this.xhr.responseText;e!==null&&(this.emitReserved("data",e),this.emitReserved("success"),this.cleanup())}abort(){this.cleanup()}}if(ce.requestsCount=0,ce.requests={},typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",ui);else if(typeof addEventListener=="function"){const t="onpagehide"in K?"pagehide":"unload";addEventListener(t,ui,!1)}}function ui(){for(let t in ce.requests)ce.requests.hasOwnProperty(t)&&ce.requests[t].abort()}const _n=typeof Promise=="function"&&typeof Promise.resolve=="function"?e=>Promise.resolve().then(e):(e,n)=>n(e,0),Vt=K.WebSocket||K.MozWebSocket,fi=!0,Wl="arraybuffer",hi=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class ql extends vn{constructor(e){super(e),this.supportsBinary=!e.forceBase64}get name(){return"websocket"}doOpen(){if(!this.check())return;const e=this.uri(),n=this.opts.protocols,s=hi?{}:ni(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=fi&&!hi?n?new Vt(e,n):new Vt(e):new Vt(e,n,s)}catch(r){return this.emitReserved("error",r)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=e=>this.onClose({description:"websocket connection closed",context:e}),this.ws.onmessage=e=>this.onData(e.data),this.ws.onerror=e=>this.onError("websocket error",e)}write(e){this.writable=!1;for(let n=0;n<e.length;n++){const s=e[n],r=n===e.length-1;bn(s,this.supportsBinary,i=>{const o={};try{fi&&this.ws.send(i)}catch{}r&&_n(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.close(),this.ws=null)}uri(){const e=this.opts.secure?"wss":"ws",n=this.query||{};return this.opts.timestampRequests&&(n[this.opts.timestampParam]=ai()),this.supportsBinary||(n.b64=1),this.createUri(e,n)}check(){return!!Vt}}class Hl extends vn{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(e=>{this.onError("webtransport error",e)}),this.transport.ready.then(()=>{this.transport.createBidirectionalStream().then(e=>{const n=vl(Number.MAX_SAFE_INTEGER,this.socket.binaryType),s=e.readable.pipeThrough(n).getReader(),r=Cl();r.readable.pipeTo(e.writable),this.writer=r.writable.getWriter();const i=()=>{s.read().then(({done:a,value:c})=>{a||(this.onPacket(c),i())}).catch(a=>{})};i();const o={type:"open"};this.query.sid&&(o.data=`{"sid":"${this.query.sid}"}`),this.writer.write(o).then(()=>this.onOpen())})}))}write(e){this.writable=!1;for(let n=0;n<e.length;n++){const s=e[n],r=n===e.length-1;this.writer.write(s).then(()=>{r&&_n(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var e;(e=this.transport)===null||e===void 0||e.close()}}const zl={websocket:ql,webtransport:Hl,polling:Pl},Zl=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,jl=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function An(t){const e=t,n=t.indexOf("["),s=t.indexOf("]");n!=-1&&s!=-1&&(t=t.substring(0,n)+t.substring(n,s).replace(/:/g,";")+t.substring(s,t.length));let r=Zl.exec(t||""),i={},o=14;for(;o--;)i[jl[o]]=r[o]||"";return n!=-1&&s!=-1&&(i.source=e,i.host=i.host.substring(1,i.host.length-1).replace(/;/g,":"),i.authority=i.authority.replace("[","").replace("]","").replace(/;/g,":"),i.ipv6uri=!0),i.pathNames=Yl(i,i.path),i.queryKey=Jl(i,i.query),i}function Yl(t,e){const n=/\/{2,9}/g,s=e.replace(n,"/").split("/");return(e.slice(0,1)=="/"||e.length===0)&&s.splice(0,1),e.slice(-1)=="/"&&s.splice(s.length-1,1),s}function Jl(t,e){const n={};return e.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(s,r,i){r&&(n[r]=i)}),n}let di=class $e extends L{constructor(e,n={}){super(),this.binaryType=Wl,this.writeBuffer=[],e&&typeof e=="object"&&(n=e,e=null),e?(e=An(e),n.hostname=e.host,n.secure=e.protocol==="https"||e.protocol==="wss",n.port=e.port,e.query&&(n.query=e.query)):n.host&&(n.hostname=An(n.host).host),Rt(this,n),this.secure=n.secure!=null?n.secure:typeof location<"u"&&location.protocol==="https:",n.hostname&&!n.port&&(n.port=this.secure?"443":"80"),this.hostname=n.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=n.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=n.transports||["polling","websocket","webtransport"],this.writeBuffer=[],this.prevBufferLen=0,this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},n),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=Ll(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(e){const n=Object.assign({},this.opts.query);n.EIO=ti,n.transport=e,this.id&&(n.sid=this.id);const s=Object.assign({},this.opts,{query:n,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[e]);return new zl[e](s)}open(){let e;if(this.opts.rememberUpgrade&&$e.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1)e="websocket";else if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}else e=this.transports[0];this.readyState="opening";try{e=this.createTransport(e)}catch{this.transports.shift(),this.open();return}e.open(),this.setTransport(e)}setTransport(e){this.transport&&this.transport.removeAllListeners(),this.transport=e,e.on("drain",this.onDrain.bind(this)).on("packet",this.onPacket.bind(this)).on("error",this.onError.bind(this)).on("close",n=>this.onClose("transport close",n))}probe(e){let n=this.createTransport(e),s=!1;$e.priorWebsocketSuccess=!1;const r=()=>{s||(n.send([{type:"ping",data:"probe"}]),n.once("packet",d=>{if(!s)if(d.type==="pong"&&d.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;$e.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{s||this.readyState!=="closed"&&(f(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{const g=new Error("probe error");g.transport=n.name,this.emitReserved("upgradeError",g)}}))};function i(){s||(s=!0,f(),n.close(),n=null)}const o=d=>{const g=new Error("probe error: "+d);g.transport=n.name,i(),this.emitReserved("upgradeError",g)};function a(){o("transport closed")}function c(){o("socket closed")}function l(d){n&&d.name!==n.name&&i()}const f=()=>{n.removeListener("open",r),n.removeListener("error",o),n.removeListener("close",a),this.off("close",c),this.off("upgrading",l)};n.once("open",r),n.once("error",o),n.once("close",a),this.once("close",c),this.once("upgrading",l),this.upgrades.indexOf("webtransport")!==-1&&e!=="webtransport"?this.setTimeoutFn(()=>{s||n.open()},200):n.open()}onOpen(){if(this.readyState="open",$e.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush(),this.readyState==="open"&&this.opts.upgrade){let e=0;const n=this.upgrades.length;for(;e<n;e++)this.probe(this.upgrades[e])}}onPacket(e){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",e),this.emitReserved("heartbeat"),this.resetPingTimeout(),e.type){case"open":this.onHandshake(JSON.parse(e.data));break;case"ping":this.sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong");break;case"error":const n=new Error("server error");n.code=e.data,this.onError(n);break;case"message":this.emitReserved("data",e.data),this.emitReserved("message",e.data);break}}onHandshake(e){this.emitReserved("handshake",e),this.id=e.sid,this.transport.query.sid=e.sid,this.upgrades=this.filterUpgrades(e.upgrades),this.pingInterval=e.pingInterval,this.pingTimeout=e.pingTimeout,this.maxPayload=e.maxPayload,this.onOpen(),this.readyState!=="closed"&&this.resetPingTimeout()}resetPingTimeout(){this.clearTimeoutFn(this.pingTimeoutTimer),this.pingTimeoutTimer=this.setTimeoutFn(()=>{this.onClose("ping timeout")},this.pingInterval+this.pingTimeout),this.opts.autoUnref&&this.pingTimeoutTimer.unref()}onDrain(){this.writeBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const e=this.getWritablePackets();this.transport.send(e),this.prevBufferLen=e.length,this.emitReserved("flush")}}getWritablePackets(){if(!(this.maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let n=1;for(let s=0;s<this.writeBuffer.length;s++){const r=this.writeBuffer[s].data;if(r&&(n+=Dl(r)),s>0&&n>this.maxPayload)return this.writeBuffer.slice(0,s);n+=2}return this.writeBuffer}write(e,n,s){return this.sendPacket("message",e,n,s),this}send(e,n,s){return this.sendPacket("message",e,n,s),this}sendPacket(e,n,s,r){if(typeof n=="function"&&(r=n,n=void 0),typeof s=="function"&&(r=s,s=null),this.readyState==="closing"||this.readyState==="closed")return;s=s||{},s.compress=s.compress!==!1;const i={type:e,data:n,options:s};this.emitReserved("packetCreate",i),this.writeBuffer.push(i),r&&this.once("flush",r),this.flush()}close(){const e=()=>{this.onClose("forced close"),this.transport.close()},n=()=>{this.off("upgrade",n),this.off("upgradeError",n),e()},s=()=>{this.once("upgrade",n),this.once("upgradeError",n)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?s():e()}):this.upgrading?s():e()),this}onError(e){$e.priorWebsocketSuccess=!1,this.emitReserved("error",e),this.onClose("transport error",e)}onClose(e,n){(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")&&(this.clearTimeoutFn(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),typeof removeEventListener=="function"&&(removeEventListener("beforeunload",this.beforeunloadEventListener,!1),removeEventListener("offline",this.offlineEventListener,!1)),this.readyState="closed",this.id=null,this.emitReserved("close",e,n),this.writeBuffer=[],this.prevBufferLen=0)}filterUpgrades(e){const n=[];let s=0;const r=e.length;for(;s<r;s++)~this.transports.indexOf(e[s])&&n.push(e[s]);return n}};di.protocol=ti;function Gl(t,e="",n){let s=t;n=n||typeof location<"u"&&location,t==null&&(t=n.protocol+"//"+n.host),typeof t=="string"&&(t.charAt(0)==="/"&&(t.charAt(1)==="/"?t=n.protocol+t:t=n.host+t),/^(https?|wss?):\/\//.test(t)||(typeof n<"u"?t=n.protocol+"//"+t:t="https://"+t),s=An(t)),s.port||(/^(http|ws)$/.test(s.protocol)?s.port="80":/^(http|ws)s$/.test(s.protocol)&&(s.port="443")),s.path=s.path||"/";const i=s.host.indexOf(":")!==-1?"["+s.host+"]":s.host;return s.id=s.protocol+"://"+i+":"+s.port+e,s.href=s.protocol+"://"+i+(n&&n.port===s.port?"":":"+s.port),s}const Kl=typeof ArrayBuffer=="function",Xl=t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t.buffer instanceof ArrayBuffer,mi=Object.prototype.toString,Ql=typeof Blob=="function"||typeof Blob<"u"&&mi.call(Blob)==="[object BlobConstructor]",eu=typeof File=="function"||typeof File<"u"&&mi.call(File)==="[object FileConstructor]";function Mn(t){return Kl&&(t instanceof ArrayBuffer||Xl(t))||Ql&&t instanceof Blob||eu&&t instanceof File}function Ft(t,e){if(!t||typeof t!="object")return!1;if(Array.isArray(t)){for(let n=0,s=t.length;n<s;n++)if(Ft(t[n]))return!0;return!1}if(Mn(t))return!0;if(t.toJSON&&typeof t.toJSON=="function"&&arguments.length===1)return Ft(t.toJSON(),!0);for(const n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&Ft(t[n]))return!0;return!1}function tu(t){const e=[],n=t.data,s=t;return s.data=Dn(n,e),s.attachments=e.length,{packet:s,buffers:e}}function Dn(t,e){if(!t)return t;if(Mn(t)){const n={_placeholder:!0,num:e.length};return e.push(t),n}else if(Array.isArray(t)){const n=new Array(t.length);for(let s=0;s<t.length;s++)n[s]=Dn(t[s],e);return n}else if(typeof t=="object"&&!(t instanceof Date)){const n={};for(const s in t)Object.prototype.hasOwnProperty.call(t,s)&&(n[s]=Dn(t[s],e));return n}return t}function nu(t,e){return t.data=In(t.data,e),delete t.attachments,t}function In(t,e){if(!t)return t;if(t&&t._placeholder===!0){if(typeof t.num=="number"&&t.num>=0&&t.num<e.length)return e[t.num];throw new Error("illegal attachments")}else if(Array.isArray(t))for(let n=0;n<t.length;n++)t[n]=In(t[n],e);else if(typeof t=="object")for(const n in t)Object.prototype.hasOwnProperty.call(t,n)&&(t[n]=In(t[n],e));return t}const su=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],ru=5;var b;(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"})(b||(b={}));class iu{constructor(e){this.replacer=e}encode(e){return(e.type===b.EVENT||e.type===b.ACK)&&Ft(e)?this.encodeAsBinary({type:e.type===b.EVENT?b.BINARY_EVENT:b.BINARY_ACK,nsp:e.nsp,data:e.data,id:e.id}):[this.encodeAsString(e)]}encodeAsString(e){let n=""+e.type;return(e.type===b.BINARY_EVENT||e.type===b.BINARY_ACK)&&(n+=e.attachments+"-"),e.nsp&&e.nsp!=="/"&&(n+=e.nsp+","),e.id!=null&&(n+=e.id),e.data!=null&&(n+=JSON.stringify(e.data,this.replacer)),n}encodeAsBinary(e){const n=tu(e),s=this.encodeAsString(n.packet),r=n.buffers;return r.unshift(s),r}}function pi(t){return Object.prototype.toString.call(t)==="[object Object]"}class Rn extends L{constructor(e){super(),this.reviver=e}add(e){let n;if(typeof e=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");n=this.decodeString(e);const s=n.type===b.BINARY_EVENT;s||n.type===b.BINARY_ACK?(n.type=s?b.EVENT:b.ACK,this.reconstructor=new ou(n),n.attachments===0&&super.emitReserved("decoded",n)):super.emitReserved("decoded",n)}else if(Mn(e)||e.base64)if(this.reconstructor)n=this.reconstructor.takeBinaryData(e),n&&(this.reconstructor=null,super.emitReserved("decoded",n));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+e)}decodeString(e){let n=0;const s={type:Number(e.charAt(0))};if(b[s.type]===void 0)throw new Error("unknown packet type "+s.type);if(s.type===b.BINARY_EVENT||s.type===b.BINARY_ACK){const i=n+1;for(;e.charAt(++n)!=="-"&&n!=e.length;);const o=e.substring(i,n);if(o!=Number(o)||e.charAt(n)!=="-")throw new Error("Illegal attachments");s.attachments=Number(o)}if(e.charAt(n+1)==="/"){const i=n+1;for(;++n&&!(e.charAt(n)===","||n===e.length););s.nsp=e.substring(i,n)}else s.nsp="/";const r=e.charAt(n+1);if(r!==""&&Number(r)==r){const i=n+1;for(;++n;){const o=e.charAt(n);if(o==null||Number(o)!=o){--n;break}if(n===e.length)break}s.id=Number(e.substring(i,n+1))}if(e.charAt(++n)){const i=this.tryParse(e.substr(n));if(Rn.isPayloadValid(s.type,i))s.data=i;else throw new Error("invalid payload")}return s}tryParse(e){try{return JSON.parse(e,this.reviver)}catch{return!1}}static isPayloadValid(e,n){switch(e){case b.CONNECT:return pi(n);case b.DISCONNECT:return n===void 0;case b.CONNECT_ERROR:return typeof n=="string"||pi(n);case b.EVENT:case b.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&su.indexOf(n[0])===-1);case b.ACK:case b.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class ou{constructor(e){this.packet=e,this.buffers=[],this.reconPack=e}takeBinaryData(e){if(this.buffers.push(e),this.buffers.length===this.reconPack.attachments){const n=nu(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const au=Object.freeze(Object.defineProperty({__proto__:null,Decoder:Rn,Encoder:iu,get PacketType(){return b},protocol:ru},Symbol.toStringTag,{value:"Module"}));function se(t,e,n){return t.on(e,n),function(){t.off(e,n)}}const cu=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class yi extends L{constructor(e,n,s){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=e,this.nsp=n,s&&s.auth&&(this.auth=s.auth),this._opts=Object.assign({},s),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const e=this.io;this.subs=[se(e,"open",this.onopen.bind(this)),se(e,"packet",this.onpacket.bind(this)),se(e,"error",this.onerror.bind(this)),se(e,"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(...e){return e.unshift("message"),this.emit.apply(this,e),this}emit(e,...n){if(cu.hasOwnProperty(e))throw new Error('"'+e.toString()+'" is a reserved event name');if(n.unshift(e),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(n),this;const s={type:b.EVENT,data:n};if(s.options={},s.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){const o=this.ids++,a=n.pop();this._registerAckCallback(o,a),s.id=o}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(s),this.packet(s)):this.sendBuffer.push(s)),this.flags={},this}_registerAckCallback(e,n){var s;const r=(s=this.flags.timeout)!==null&&s!==void 0?s:this._opts.ackTimeout;if(r===void 0){this.acks[e]=n;return}const i=this.io.setTimeoutFn(()=>{delete this.acks[e];for(let o=0;o<this.sendBuffer.length;o++)this.sendBuffer[o].id===e&&this.sendBuffer.splice(o,1);n.call(this,new Error("operation has timed out"))},r);this.acks[e]=(...o)=>{this.io.clearTimeoutFn(i),n.apply(this,[null,...o])}}emitWithAck(e,...n){const s=this.flags.timeout!==void 0||this._opts.ackTimeout!==void 0;return new Promise((r,i)=>{n.push((o,a)=>s?o?i(o):r(a):r(o)),this.emit(e,...n)})}_addToQueue(e){let n;typeof e[e.length-1]=="function"&&(n=e.pop());const s={id:this._queueSeq++,tryCount:0,pending:!1,args:e,flags:Object.assign({fromQueue:!0},this.flags)};e.push((r,...i)=>s!==this._queue[0]?void 0:(r!==null?s.tryCount>this._opts.retries&&(this._queue.shift(),n&&n(r)):(this._queue.shift(),n&&n(null,...i)),s.pending=!1,this._drainQueue())),this._queue.push(s),this._drainQueue()}_drainQueue(e=!1){if(!this.connected||this._queue.length===0)return;const n=this._queue[0];n.pending&&!e||(n.pending=!0,n.tryCount++,this.flags=n.flags,this.emit.apply(this,n.args))}packet(e){e.nsp=this.nsp,this.io._packet(e)}onopen(){typeof this.auth=="function"?this.auth(e=>{this._sendConnectPacket(e)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(e){this.packet({type:b.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},e):e})}onerror(e){this.connected||this.emitReserved("connect_error",e)}onclose(e,n){this.connected=!1,delete this.id,this.emitReserved("disconnect",e,n)}onpacket(e){if(e.nsp===this.nsp)switch(e.type){case b.CONNECT:e.data&&e.data.sid?this.onconnect(e.data.sid,e.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 b.EVENT:case b.BINARY_EVENT:this.onevent(e);break;case b.ACK:case b.BINARY_ACK:this.onack(e);break;case b.DISCONNECT:this.ondisconnect();break;case b.CONNECT_ERROR:this.destroy();const s=new Error(e.data.message);s.data=e.data.data,this.emitReserved("connect_error",s);break}}onevent(e){const n=e.data||[];e.id!=null&&n.push(this.ack(e.id)),this.connected?this.emitEvent(n):this.receiveBuffer.push(Object.freeze(n))}emitEvent(e){if(this._anyListeners&&this._anyListeners.length){const n=this._anyListeners.slice();for(const s of n)s.apply(this,e)}super.emit.apply(this,e),this._pid&&e.length&&typeof e[e.length-1]=="string"&&(this._lastOffset=e[e.length-1])}ack(e){const n=this;let s=!1;return function(...r){s||(s=!0,n.packet({type:b.ACK,id:e,data:r}))}}onack(e){const n=this.acks[e.id];typeof n=="function"&&(n.apply(this,e.data),delete this.acks[e.id])}onconnect(e,n){this.id=e,this.recovered=n&&this._pid===n,this._pid=n,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach(e=>this.emitEvent(e)),this.receiveBuffer=[],this.sendBuffer.forEach(e=>{this.notifyOutgoingListeners(e),this.packet(e)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(e=>e()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:b.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(e){return this.flags.compress=e,this}get volatile(){return this.flags.volatile=!0,this}timeout(e){return this.flags.timeout=e,this}onAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(e),this}prependAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(e),this}offAny(e){if(!this._anyListeners)return this;if(e){const n=this._anyListeners;for(let s=0;s<n.length;s++)if(e===n[s])return n.splice(s,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(e),this}prependAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(e),this}offAnyOutgoing(e){if(!this._anyOutgoingListeners)return this;if(e){const n=this._anyOutgoingListeners;for(let s=0;s<n.length;s++)if(e===n[s])return n.splice(s,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(e){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const n=this._anyOutgoingListeners.slice();for(const s of n)s.apply(this,e.data)}}}function Be(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}Be.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=Math.floor(e*10)&1?t+n:t-n}return Math.min(t,this.max)|0},Be.prototype.reset=function(){this.attempts=0},Be.prototype.setMin=function(t){this.ms=t},Be.prototype.setMax=function(t){this.max=t},Be.prototype.setJitter=function(t){this.jitter=t};class Ln extends L{constructor(e,n){var s;super(),this.nsps={},this.subs=[],e&&typeof e=="object"&&(n=e,e=void 0),n=n||{},n.path=n.path||"/socket.io",this.opts=n,Rt(this,n),this.reconnection(n.reconnection!==!1),this.reconnectionAttempts(n.reconnectionAttempts||1/0),this.reconnectionDelay(n.reconnectionDelay||1e3),this.reconnectionDelayMax(n.reconnectionDelayMax||5e3),this.randomizationFactor((s=n.randomizationFactor)!==null&&s!==void 0?s:.5),this.backoff=new Be({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(n.timeout==null?2e4:n.timeout),this._readyState="closed",this.uri=e;const r=n.parser||au;this.encoder=new r.Encoder,this.decoder=new r.Decoder,this._autoConnect=n.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(e){return arguments.length?(this._reconnection=!!e,this):this._reconnection}reconnectionAttempts(e){return e===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=e,this)}reconnectionDelay(e){var n;return e===void 0?this._reconnectionDelay:(this._reconnectionDelay=e,(n=this.backoff)===null||n===void 0||n.setMin(e),this)}randomizationFactor(e){var n;return e===void 0?this._randomizationFactor:(this._randomizationFactor=e,(n=this.backoff)===null||n===void 0||n.setJitter(e),this)}reconnectionDelayMax(e){var n;return e===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=e,(n=this.backoff)===null||n===void 0||n.setMax(e),this)}timeout(e){return arguments.length?(this._timeout=e,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(e){if(~this._readyState.indexOf("open"))return this;this.engine=new di(this.uri,this.opts);const n=this.engine,s=this;this._readyState="opening",this.skipReconnect=!1;const r=se(n,"open",function(){s.onopen(),e&&e()}),i=a=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",a),e?e(a):this.maybeReconnectOnOpen()},o=se(n,"error",i);if(this._timeout!==!1){const a=this._timeout,c=this.setTimeoutFn(()=>{r(),i(new Error("timeout")),n.close()},a);this.opts.autoUnref&&c.unref(),this.subs.push(()=>{this.clearTimeoutFn(c)})}return this.subs.push(r),this.subs.push(o),this}connect(e){return this.open(e)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const e=this.engine;this.subs.push(se(e,"ping",this.onping.bind(this)),se(e,"data",this.ondata.bind(this)),se(e,"error",this.onerror.bind(this)),se(e,"close",this.onclose.bind(this)),se(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(e){try{this.decoder.add(e)}catch(n){this.onclose("parse error",n)}}ondecoded(e){_n(()=>{this.emitReserved("packet",e)},this.setTimeoutFn)}onerror(e){this.emitReserved("error",e)}socket(e,n){let s=this.nsps[e];return s?this._autoConnect&&!s.active&&s.connect():(s=new yi(this,e,n),this.nsps[e]=s),s}_destroy(e){const n=Object.keys(this.nsps);for(const s of n)if(this.nsps[s].active)return;this._close()}_packet(e){const n=this.encoder.encode(e);for(let s=0;s<n.length;s++)this.engine.write(n[s],e.options)}cleanup(){this.subs.forEach(e=>e()),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(e,n){this.cleanup(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",e,n),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const e=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const n=this.backoff.duration();this._reconnecting=!0;const s=this.setTimeoutFn(()=>{e.skipReconnect||(this.emitReserved("reconnect_attempt",e.backoff.attempts),!e.skipReconnect&&e.open(r=>{r?(e._reconnecting=!1,e.reconnect(),this.emitReserved("reconnect_error",r)):e.onreconnect()}))},n);this.opts.autoUnref&&s.unref(),this.subs.push(()=>{this.clearTimeoutFn(s)})}}onreconnect(){const e=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",e)}}const et={};function Bt(t,e){typeof t=="object"&&(e=t,t=void 0),e=e||{};const n=Gl(t,e.path||"/socket.io"),s=n.source,r=n.id,i=n.path,o=et[r]&&i in et[r].nsps,a=e.forceNew||e["force new connection"]||e.multiplex===!1||o;let c;return a?c=new Ln(s,e):(et[r]||(et[r]=new Ln(s,e)),c=et[r]),n.query&&!e.query&&(e.query=n.queryKey),c.socket(n.path,e)}Object.assign(Bt,{Manager:Ln,Socket:yi,io:Bt,connect:Bt});var gi=(t=>(t.WEBCHAT="webchat",t.CENTRAL="central",t.WHATSAPP="whatsapp",t.TELEGRAM="telegram",t.SMS="sms",t))(gi||{});const lu={class:"widget"},uu={class:"header-widget"},fu={class:"title-chat"},hu={key:0,class:"loader"},du={class:"w-full"},mu=["onSubmit"],pu={class:"form-message"},yu={class:"jl-inputgroup-chat"},gu=["onKeyup"],wu={type:"submit",class:"pointer btn-primary"},Eu=14,ku=X(u.defineComponent({__name:"Chat",props:{titlePrincipal:{type:String,default:"Comunicación en linea para consultas"},toggleChat:{type:Function,required:!0},tokenAuth:{type:String,required:!0},user:{type:Object,required:!0},visible:{type:Boolean,required:!0}},emits:["show-toast","show-confirm","new-message","clear-new-messages","not-viewed-total"],setup(t,{emit:e}){const n=t,s=u.ref(""),r=u.ref(0),i=u.ref({data:[],canLoadMoreMessages:!1}),o=u.ref(""),a=u.ref(!1),c=u.ref(null);u.watch(()=>n.visible,async E=>{if(!E||(e("clear-new-messages"),m(),r.value>0&&ms(o.value,n.tokenAuth),o.value))return;const T=await ds(n.tokenAuth);T&&(o.value=T.appChat.id)});function l(E){var T;if(nt.value){A();return}if(E.key==="Enter"&&E.shiftKey){const _=((T=E.target)==null?void 0:T.value)||"";E.target.value=_+`
4
- `,A();return}f()}const f=async E=>{var $,V,F;if((($=s.value)==null?void 0:$.length)>300){e("show-toast",{severity:"warn",summary:"Error",detail:"El mensaje no puede superar los 300 caracteres",life:5e3});return}if(!s.value.trim()){e("show-toast",{severity:"warn",summary:"Error",detail:"Por favor ingrese un mensaje",life:5e3});return}const T={id:Ti(),chatId:(F=(V=q.value)==null?void 0:V.chat)==null?void 0:F.id,message:s.value,visto:!0,multimedia:!1,esCliente:!0,appChatId:o.value,createdAt:new Date().toISOString(),updatedAt:new Date().toISOString(),sender:{nombreCompleto:n.user.nombreCompleto,ci:n.user.ci,msPersonaId:n.user.msPersonaId}},_=i.value.data.push(T)-1;d(s.value,o.value).then(re=>{var Te,wi;if(!re)i.value.data[_].error={error:!0,id:T.id},e("show-toast",{severity:"error",summary:"Error",detail:"Ocurrio un error al enviar el mensaje, intente nuevamente",life:5e3});else{i.value.data[_]=re;const Zu={...re,chatId:T.chatId};(wi=I.value)==null||wi.emit("sendMessage",{roomId:(Te=q==null?void 0:q.value)==null?void 0:Te.appChat.id,message:Zu},ju=>{console.log("🚀 ~ socketService.value.emit ~ response:",ju)})}}),s.value="",m(),O.value&&(O.value.style.height="20px")},d=async(E,T)=>zo({esCliente:!0,message:E,appChatId:T},n.tokenAuth),g=async()=>{var $,V,F;const E=($=i.value.data[0])==null?void 0:$.id,T={lastMessagesId:E,appChatId:o.value,limit:10};a.value=!0;const _=await Ho({body:T,token:n.tokenAuth});a.value=!1,i.value.data.unshift(..._.data.sort((re,Te)=>-Te.createdAt.localeCompare(re.createdAt))),i.value.canLoadMoreMessages=_.pagination.total>_.pagination.size,E&&((V=c.value)!=null&&V.scrollHeight)&&w((F=c.value)==null?void 0:F.scrollHeight),E||m()},p=async E=>{e("show-confirm",async()=>{var _,$,V;if(!((_=E.error)!=null&&_.id))return;const T=await d(E.message,o.value);if(!T)e("show-toast",{severity:"error",summary:"Error",detail:"Ocurrio un error al enviar el mensaje, intente nuevamente",life:5e3});else{const F=El(i.value.data,"id",E.error.id);i.value.data[F]={...T,error:void 0},(V=I.value)==null||V.emit("sendMessage",{roomId:($=q==null?void 0:q.value)==null?void 0:$.appChat.id,message:E})}m()})},m=()=>{u.nextTick(()=>{c.value&&(c.value.scrollTop=c.value.scrollHeight)})},w=E=>{u.nextTick(()=>{const T=c.value;T&&(T.scrollTop=T.scrollHeight-E)})},O=u.ref();function A(){O.value&&(O.value.style.height=O.value.scrollHeight-Eu+"px",O.value.scrollHeight!==O.value.clientHeight&&(O.value.style.height=O.value.scrollHeight+"px"))}const I=u.ref(),q=u.ref();function tt(E,T=gi.WEBCHAT){var _,$;if(!E)throw new Error("user chat is required");I.value=Bt(window.VITE_SOCKET_URI,{query:{usuarioId:`${($=(_=E==null?void 0:E.chat)==null?void 0:_.persona)==null?void 0:$.funcionarioId}`,aplicacion:T},extraHeaders:{Authorization:n.tokenAuth}}),I.value.removeAllListeners(),I.value.on("connect",()=>{var V,F;console.log("Conectado al servidor de sockets"),(F=I.value)==null||F.emit("joinRoom",`${(V=E==null?void 0:E.appChat)==null?void 0:V.id}`)}),I.value.on("disconnect",()=>{console.log("Desconectado del servidor de sockets")}),I.value.on("receiveMessage",V=>{var F,re;console.log("Mensaje recibido:",V.message,E),V.message.sender.msPersonaId!==((re=(F=E==null?void 0:E.chat)==null?void 0:F.persona)==null?void 0:re.msPersonaId)&&(i.value.data.push(V.message),ms(V.message.appChatId,n.tokenAuth),m(),!n.visible&&e("new-message"))})}const nt=u.computed(()=>["Android","iPhone"].includes(Vn()));function Vn(){var re,Te;const E=window.navigator.userAgent,T=((Te=(re=window.navigator)==null?void 0:re.userAgentData)==null?void 0:Te.platform)||window.navigator.platform,_=["macOS","Macintosh","MacIntel","MacPPC","Mac68K"],$=["Win32","Win64","Windows","WinCE"],V=["iPhone","iPad","iPod"];let F=null;return _.indexOf(T)!==-1?F="Mac OS":V.indexOf(T)!==-1?F="iPhone":$.indexOf(T)!==-1?F="Windows":/Android/.test(E)?F="Android":/Linux/.test(T)&&(F="Linux"),F}return u.onMounted(async()=>{if(o.value)return;const E=await ds(n.tokenAuth);E&&(q.value=E,o.value=E.appChat.id,r.value=E.appChat.totalNoVistosCliente,tt(E),g(),e("not-viewed-total",E.appChat.totalNoVistosCliente))}),u.onUnmounted(()=>{var E;(E=I.value)==null||E.off()}),(E,T)=>(u.openBlock(),u.createElementBlock("div",lu,[u.createElementVNode("div",uu,[u.createElementVNode("h4",fu,u.toDisplayString(t.titlePrincipal),1),u.createElementVNode("button",{onClick:T[0]||(T[0]=()=>t.toggleChat()),class:"btn-close"},[u.createVNode(vi,{class:"pointer"})])]),u.createElementVNode("div",{class:"messages-container",ref_key:"messageContainerRef",ref:c},[a.value?(u.openBlock(),u.createElementBlock("div",hu,[u.createVNode(wl)])):u.createCommentVNode("",!0),u.createVNode(dl,{messages:i.value.data,canLoadMoreMessages:i.value.canLoadMoreMessages,onLoadMore:g,onRetry:p},null,8,["messages","canLoadMoreMessages"])],512),u.createElementVNode("div",du,[u.createElementVNode("form",{class:"message-send",onSubmit:u.withModifiers(f,["prevent"])},[u.createElementVNode("div",pu,[u.createElementVNode("div",yu,[u.withDirectives(u.createElementVNode("textarea",{"onUpdate:modelValue":T[1]||(T[1]=_=>s.value=_),class:"jl2-input-chat",required:"",ref_key:"textAreaRef",ref:O,onInput:T[2]||(T[2]=()=>A()),onKeydown:T[3]||(T[3]=u.withKeys(_=>{!nt.value&&_.preventDefault()},["enter"])),onKeyup:u.withKeys(l,["enter"])},null,40,gu),[[u.vModelText,s.value]]),u.createElementVNode("button",wu,[u.createVNode(Di,{style:{width:"20px",height:"20px"}})])])])],40,mu)])]))}}),[["__scopeId","data-v-3a9aeee0"]]),Su={},Tu={width:"87",height:"87",viewBox:"0 0 87 87",fill:"none",xmlns:"http://www.w3.org/2000/svg"},bu=[u.createStaticVNode('<g filter="url(#filter0_d_4007_3488)"><path d="M43.5 77C64.2107 77 81 60.2107 81 39.5C81 18.7893 64.2107 2 43.5 2C22.7893 2 6 18.7893 6 39.5C6 60.2107 22.7893 77 43.5 77Z" fill="white" stroke="#F28B0C" stroke-width="3" stroke-miterlimit="10"></path><path d="M39.705 38.885C40.6908 38.885 41.49 38.0858 41.49 37.1C41.49 36.1142 40.6908 35.315 39.705 35.315C38.7192 35.315 37.92 36.1142 37.92 37.1C37.92 38.0858 38.7192 38.885 39.705 38.885Z" fill="#F28B0C"></path><path d="M45.075 38.885C46.0608 38.885 46.86 38.0858 46.86 37.1C46.86 36.1142 46.0608 35.315 45.075 35.315C44.0892 35.315 43.29 36.1142 43.29 37.1C43.29 38.0858 44.0892 38.885 45.075 38.885Z" fill="#F28B0C"></path><path d="M50.445 38.885C51.4308 38.885 52.23 38.0858 52.23 37.1C52.23 36.1142 51.4308 35.315 50.445 35.315C49.4592 35.315 48.66 36.1142 48.66 37.1C48.66 38.0858 49.4592 38.885 50.445 38.885Z" fill="#F28B0C"></path><path d="M63.27 58.235L58.755 47.78C61.125 44.765 62.415 40.97 62.415 37.175C62.415 26.435 52.665 18.185 41.925 20.12C39.99 19.325 37.98 18.905 35.835 18.905C26.955 18.905 19.785 26.135 19.785 34.955C19.785 38.54 21 41.975 23.145 44.765L18.99 54.44C18.84 54.8 18.915 55.235 19.2 55.445C19.485 55.73 19.92 55.73 20.205 55.595L30.6 50.15C31.89 50.585 33.255 50.87 34.68 50.945C39.48 54.53 45.57 55.25 50.655 53.45L61.905 59.33C62.265 59.48 62.625 59.48 62.91 59.18C63.345 58.97 63.405 58.61 63.27 58.25V58.235ZM51.24 51.71C51.03 51.56 50.745 51.56 50.52 51.635C48.795 52.28 46.935 52.64 45.15 52.64C36.69 52.64 29.61 45.755 29.61 37.1C29.61 29.72 34.845 23.345 42.075 21.845C51.75 19.91 60.705 27.29 60.705 37.1C60.705 40.685 59.415 44.27 57.12 46.985C56.91 47.27 56.835 47.63 56.97 47.915L60.69 56.585L51.24 51.71Z" fill="#F28B0C"></path></g><defs><filter id="filter0_d_4007_3488" x="0.5" y="0.5" width="86" height="86" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="4"></feOffset><feGaussianBlur stdDeviation="2"></feGaussianBlur><feComposite in2="hardAlpha" operator="out"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"></feColorMatrix><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_4007_3488"></feBlend><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_4007_3488" result="shape"></feBlend></filter></defs>',2)];function Ou(t,e){return u.openBlock(),u.createElementBlock("svg",Tu,bu)}const Nu=X(Su,[["render",Ou]]),Cu={},vu={viewBox:"0 0 256 256",version:"1.1",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",preserveAspectRatio:"xMidYMid"},xu=[u.createElementVNode("g",null,[u.createElementVNode("path",{d:"M128,0 C57.307,0 0,57.307 0,128 L0,128 C0,198.693 57.307,256 128,256 L128,256 C198.693,256 256,198.693 256,128 L256,128 C256,57.307 198.693,0 128,0 L128,0 Z",fill:"#40B3E0"}),u.createElementVNode("path",{d:"M190.2826,73.6308 L167.4206,188.8978 C167.4206,188.8978 164.2236,196.8918 155.4306,193.0548 L102.6726,152.6068 L83.4886,143.3348 L51.1946,132.4628 C51.1946,132.4628 46.2386,130.7048 45.7586,126.8678 C45.2796,123.0308 51.3546,120.9528 51.3546,120.9528 L179.7306,70.5928 C179.7306,70.5928 190.2826,65.9568 190.2826,73.6308",fill:"#FFFFFF"}),u.createElementVNode("path",{d:"M98.6178,187.6035 C98.6178,187.6035 97.0778,187.4595 95.1588,181.3835 C93.2408,175.3085 83.4888,143.3345 83.4888,143.3345 L161.0258,94.0945 C161.0258,94.0945 165.5028,91.3765 165.3428,94.0945 C165.3428,94.0945 166.1418,94.5735 163.7438,96.8115 C161.3458,99.0505 102.8328,151.6475 102.8328,151.6475",fill:"#D2E5F1"}),u.createElementVNode("path",{d:"M122.9015,168.1154 L102.0335,187.1414 C102.0335,187.1414 100.4025,188.3794 98.6175,187.6034 L102.6135,152.2624",fill:"#B5CFE4"})],-1)];function _u(t,e){return u.openBlock(),u.createElementBlock("svg",vu,xu)}const Au=X(Cu,[["render",_u]]),Mu={},Du={version:"1.1",id:"Capa_1",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 455.731 455.731","xml:space":"preserve"},Iu=[u.createElementVNode("g",null,[u.createElementVNode("rect",{x:"0",y:"0",style:{fill:"#1bd741"},width:"455.731",height:"455.731"}),u.createElementVNode("g",null,[u.createElementVNode("path",{style:{fill:"#ffffff"},d:`M68.494,387.41l22.323-79.284c-14.355-24.387-21.913-52.134-21.913-80.638
1
+ (function(fe,u){typeof exports=="object"&&typeof module<"u"?u(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],u):(fe=typeof globalThis<"u"?globalThis:fe||self,u(fe["vue-wiguet-chatweb"]={},fe.Vue))})(this,function(fe,u){"use strict";let it;const Ci=new Uint8Array(16);function vi(){if(!it&&(it=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!it))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return it(Ci)}const U=[];for(let t=0;t<256;++t)U.push((t+256).toString(16).slice(1));function xi(t,e=0){return U[t[e+0]]+U[t[e+1]]+U[t[e+2]]+U[t[e+3]]+"-"+U[t[e+4]]+U[t[e+5]]+"-"+U[t[e+6]]+U[t[e+7]]+"-"+U[t[e+8]]+U[t[e+9]]+"-"+U[t[e+10]]+U[t[e+11]]+U[t[e+12]]+U[t[e+13]]+U[t[e+14]]+U[t[e+15]]}const Un={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function _i(t,e,n){if(Un.randomUUID&&!e&&!t)return Un.randomUUID();t=t||{};const s=t.random||(t.rng||vi)();return s[6]=s[6]&15|64,s[8]=s[8]&63|128,xi(s)}const X=(t,e)=>{const n=t.__vccOpts||t;for(const[s,r]of e)n[s]=r;return n},Ai={},Mi={width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Ii=[u.createElementVNode("path",{d:"M16 31C24.2843 31 31 24.2843 31 16C31 7.71573 24.2843 1 16 1C7.71573 1 1 7.71573 1 16C1 24.2843 7.71573 31 16 31Z",stroke:"#B3B3B3","stroke-miterlimit":"10"},null,-1),u.createElementVNode("path",{d:"M19.78 22.3L15.98 16.63H15.9601L12.2001 22.3H11.0701L15.37 15.8899L11.25 9.69995H12.38L15.98 15.08H16L19.67 9.69995H20.8L16.55 15.82L20.92 22.3H19.77H19.78Z",fill:"#B3B3B3"},null,-1)];function Di(t,e){return u.openBlock(),u.createElementBlock("svg",Mi,Ii)}const Ri=X(Ai,[["render",Di]]),Li={},Vi={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},Fi=[u.createElementVNode("path",{fill:"#F28B0C",d:"M16.1 260.2c-22.6 12.9-20.5 47.3 3.6 57.3L160 376V479.3c0 18.1 14.6 32.7 32.7 32.7c9.7 0 18.9-4.3 25.1-11.8l62-74.3 123.9 51.6c18.9 7.9 40.8-4.5 43.9-24.7l64-416c1.9-12.1-3.4-24.3-13.5-31.2s-23.3-7.5-34-1.4l-448 256zm52.1 25.5L409.7 90.6 190.1 336l1.2 1L68.2 285.7zM403.3 425.4L236.7 355.9 450.8 116.6 403.3 425.4z"},null,-1)];function Bi(t,e){return u.openBlock(),u.createElementBlock("svg",Vi,Fi)}const $i=X(Li,[["render",Bi]]);function Wn(t,e){return function(){return t.apply(e,arguments)}}const{toString:Pi}=Object.prototype,{getPrototypeOf:Wt}=Object,ot=(t=>e=>{const n=Pi.call(e);return t[n]||(t[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),ie=t=>(t=t.toLowerCase(),e=>ot(e)===t),at=t=>e=>typeof e===t,{isArray:Te}=Array,Pe=at("undefined");function Ui(t){return t!==null&&!Pe(t)&&t.constructor!==null&&!Pe(t.constructor)&&j(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const qn=ie("ArrayBuffer");function Wi(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&qn(t.buffer),e}const qi=at("string"),j=at("function"),Hn=at("number"),ct=t=>t!==null&&typeof t=="object",Hi=t=>t===!0||t===!1,lt=t=>{if(ot(t)!=="object")return!1;const e=Wt(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)},zi=ie("Date"),Zi=ie("File"),ji=ie("Blob"),Yi=ie("FileList"),Ji=t=>ct(t)&&j(t.pipe),Gi=t=>{let e;return t&&(typeof FormData=="function"&&t instanceof FormData||j(t.append)&&((e=ot(t))==="formdata"||e==="object"&&j(t.toString)&&t.toString()==="[object FormData]"))},Ki=ie("URLSearchParams"),Qi=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Ue(t,e,{allOwnKeys:n=!1}={}){if(t===null||typeof t>"u")return;let s,r;if(typeof t!="object"&&(t=[t]),Te(t))for(s=0,r=t.length;s<r;s++)e.call(null,t[s],s,t);else{const i=n?Object.getOwnPropertyNames(t):Object.keys(t),o=i.length;let a;for(s=0;s<o;s++)a=i[s],e.call(null,t[a],a,t)}}function zn(t,e){e=e.toLowerCase();const n=Object.keys(t);let s=n.length,r;for(;s-- >0;)if(r=n[s],e===r.toLowerCase())return r;return null}const Zn=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,jn=t=>!Pe(t)&&t!==Zn;function qt(){const{caseless:t}=jn(this)&&this||{},e={},n=(s,r)=>{const i=t&&zn(e,r)||r;lt(e[i])&&lt(s)?e[i]=qt(e[i],s):lt(s)?e[i]=qt({},s):Te(s)?e[i]=s.slice():e[i]=s};for(let s=0,r=arguments.length;s<r;s++)arguments[s]&&Ue(arguments[s],n);return e}const Xi=(t,e,n,{allOwnKeys:s}={})=>(Ue(e,(r,i)=>{n&&j(r)?t[i]=Wn(r,n):t[i]=r},{allOwnKeys:s}),t),eo=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),to=(t,e,n,s)=>{t.prototype=Object.create(e.prototype,s),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),n&&Object.assign(t.prototype,n)},no=(t,e,n,s)=>{let r,i,o;const a={};if(e=e||{},t==null)return e;do{for(r=Object.getOwnPropertyNames(t),i=r.length;i-- >0;)o=r[i],(!s||s(o,t,e))&&!a[o]&&(e[o]=t[o],a[o]=!0);t=n!==!1&&Wt(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},so=(t,e,n)=>{t=String(t),(n===void 0||n>t.length)&&(n=t.length),n-=e.length;const s=t.indexOf(e,n);return s!==-1&&s===n},ro=t=>{if(!t)return null;if(Te(t))return t;let e=t.length;if(!Hn(e))return null;const n=new Array(e);for(;e-- >0;)n[e]=t[e];return n},io=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&Wt(Uint8Array)),oo=(t,e)=>{const s=(t&&t[Symbol.iterator]).call(t);let r;for(;(r=s.next())&&!r.done;){const i=r.value;e.call(t,i[0],i[1])}},ao=(t,e)=>{let n;const s=[];for(;(n=t.exec(e))!==null;)s.push(n);return s},co=ie("HTMLFormElement"),lo=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,s,r){return s.toUpperCase()+r}),Yn=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),uo=ie("RegExp"),Jn=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),s={};Ue(n,(r,i)=>{e(r,i,t)!==!1&&(s[i]=r)}),Object.defineProperties(t,s)},fo=t=>{Jn(t,(e,n)=>{if(j(t)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const s=t[n];if(j(s)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},ho=(t,e)=>{const n={},s=r=>{r.forEach(i=>{n[i]=!0})};return Te(t)?s(t):s(String(t).split(e)),n},mo=()=>{},po=(t,e)=>(t=+t,Number.isFinite(t)?t:e),Ht="abcdefghijklmnopqrstuvwxyz",Gn="0123456789",Kn={DIGIT:Gn,ALPHA:Ht,ALPHA_DIGIT:Ht+Ht.toUpperCase()+Gn},yo=(t=16,e=Kn.ALPHA_DIGIT)=>{let n="";const{length:s}=e;for(;t--;)n+=e[Math.random()*s|0];return n};function go(t){return!!(t&&j(t.append)&&t[Symbol.toStringTag]==="FormData"&&t[Symbol.iterator])}const wo=t=>{const e=new Array(10),n=(s,r)=>{if(ct(s)){if(e.indexOf(s)>=0)return;if(!("toJSON"in s)){e[r]=s;const i=Te(s)?[]:{};return Ue(s,(o,a)=>{const c=n(o,r+1);!Pe(c)&&(i[a]=c)}),e[r]=void 0,i}}return s};return n(t,0)},Eo=ie("AsyncFunction"),h={isArray:Te,isArrayBuffer:qn,isBuffer:Ui,isFormData:Gi,isArrayBufferView:Wi,isString:qi,isNumber:Hn,isBoolean:Hi,isObject:ct,isPlainObject:lt,isUndefined:Pe,isDate:zi,isFile:Zi,isBlob:ji,isRegExp:uo,isFunction:j,isStream:Ji,isURLSearchParams:Ki,isTypedArray:io,isFileList:Yi,forEach:Ue,merge:qt,extend:Xi,trim:Qi,stripBOM:eo,inherits:to,toFlatObject:no,kindOf:ot,kindOfTest:ie,endsWith:so,toArray:ro,forEachEntry:oo,matchAll:ao,isHTMLForm:co,hasOwnProperty:Yn,hasOwnProp:Yn,reduceDescriptors:Jn,freezeMethods:fo,toObjectSet:ho,toCamelCase:lo,noop:mo,toFiniteNumber:po,findKey:zn,global:Zn,isContextDefined:jn,ALPHABET:Kn,generateString:yo,isSpecCompliantForm:go,toJSONObject:wo,isAsyncFn:Eo,isThenable:t=>t&&(ct(t)||j(t))&&j(t.then)&&j(t.catch)};function N(t,e,n,s,r){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),s&&(this.request=s),r&&(this.response=r)}h.inherits(N,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:h.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const Qn=N.prototype,Xn={};["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=>{Xn[t]={value:t}}),Object.defineProperties(N,Xn),Object.defineProperty(Qn,"isAxiosError",{value:!0}),N.from=(t,e,n,s,r,i)=>{const o=Object.create(Qn);return h.toFlatObject(t,o,function(c){return c!==Error.prototype},a=>a!=="isAxiosError"),N.call(o,t.message,e,n,s,r),o.cause=t,o.name=t.name,i&&Object.assign(o,i),o};const ko=null;function zt(t){return h.isPlainObject(t)||h.isArray(t)}function es(t){return h.endsWith(t,"[]")?t.slice(0,-2):t}function ts(t,e,n){return t?t.concat(e).map(function(r,i){return r=es(r),!n&&i?"["+r+"]":r}).join(n?".":""):e}function So(t){return h.isArray(t)&&!t.some(zt)}const bo=h.toFlatObject(h,{},null,function(e){return/^is[A-Z]/.test(e)});function ut(t,e,n){if(!h.isObject(t))throw new TypeError("target must be an object");e=e||new FormData,n=h.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(E,O){return!h.isUndefined(O[E])});const s=n.metaTokens,r=n.visitor||f,i=n.dots,o=n.indexes,c=(n.Blob||typeof Blob<"u"&&Blob)&&h.isSpecCompliantForm(e);if(!h.isFunction(r))throw new TypeError("visitor must be a function");function l(m){if(m===null)return"";if(h.isDate(m))return m.toISOString();if(!c&&h.isBlob(m))throw new N("Blob is not supported. Use a Buffer instead.");return h.isArrayBuffer(m)||h.isTypedArray(m)?c&&typeof Blob=="function"?new Blob([m]):Buffer.from(m):m}function f(m,E,O){let A=m;if(m&&!O&&typeof m=="object"){if(h.endsWith(E,"{}"))E=s?E:E.slice(0,-2),m=JSON.stringify(m);else if(h.isArray(m)&&So(m)||(h.isFileList(m)||h.endsWith(E,"[]"))&&(A=h.toArray(m)))return E=es(E),A.forEach(function(P,nt){!(h.isUndefined(P)||P===null)&&e.append(o===!0?ts([E],nt,i):o===null?E:E+"[]",l(P))}),!1}return zt(m)?!0:(e.append(ts(O,E,i),l(m)),!1)}const d=[],g=Object.assign(bo,{defaultVisitor:f,convertValue:l,isVisitable:zt});function p(m,E){if(!h.isUndefined(m)){if(d.indexOf(m)!==-1)throw Error("Circular reference detected in "+E.join("."));d.push(m),h.forEach(m,function(A,M){(!(h.isUndefined(A)||A===null)&&r.call(e,A,h.isString(M)?M.trim():M,E,g))===!0&&p(A,E?E.concat(M):[M])}),d.pop()}}if(!h.isObject(t))throw new TypeError("data must be an object");return p(t),e}function ns(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(s){return e[s]})}function Zt(t,e){this._pairs=[],t&&ut(t,this,e)}const ss=Zt.prototype;ss.append=function(e,n){this._pairs.push([e,n])},ss.toString=function(e){const n=e?function(s){return e.call(this,s,ns)}:ns;return this._pairs.map(function(r){return n(r[0])+"="+n(r[1])},"").join("&")};function To(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function rs(t,e,n){if(!e)return t;const s=n&&n.encode||To,r=n&&n.serialize;let i;if(r?i=r(e,n):i=h.isURLSearchParams(e)?e.toString():new Zt(e,n).toString(s),i){const o=t.indexOf("#");o!==-1&&(t=t.slice(0,o)),t+=(t.indexOf("?")===-1?"?":"&")+i}return t}class is{constructor(){this.handlers=[]}use(e,n,s){return this.handlers.push({fulfilled:e,rejected:n,synchronous:s?s.synchronous:!1,runWhen:s?s.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){h.forEach(this.handlers,function(s){s!==null&&e(s)})}}const os={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Oo=typeof URLSearchParams<"u"?URLSearchParams:Zt,No=typeof FormData<"u"?FormData:null,Co=typeof Blob<"u"?Blob:null,vo=(()=>{let t;return typeof navigator<"u"&&((t=navigator.product)==="ReactNative"||t==="NativeScript"||t==="NS")?!1:typeof window<"u"&&typeof document<"u"})(),xo=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",oe={isBrowser:!0,classes:{URLSearchParams:Oo,FormData:No,Blob:Co},isStandardBrowserEnv:vo,isStandardBrowserWebWorkerEnv:xo,protocols:["http","https","file","blob","url","data"]};function _o(t,e){return ut(t,new oe.classes.URLSearchParams,Object.assign({visitor:function(n,s,r,i){return oe.isNode&&h.isBuffer(n)?(this.append(s,n.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)}},e))}function Ao(t){return h.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function Mo(t){const e={},n=Object.keys(t);let s;const r=n.length;let i;for(s=0;s<r;s++)i=n[s],e[i]=t[i];return e}function as(t){function e(n,s,r,i){let o=n[i++];const a=Number.isFinite(+o),c=i>=n.length;return o=!o&&h.isArray(r)?r.length:o,c?(h.hasOwnProp(r,o)?r[o]=[r[o],s]:r[o]=s,!a):((!r[o]||!h.isObject(r[o]))&&(r[o]=[]),e(n,s,r[o],i)&&h.isArray(r[o])&&(r[o]=Mo(r[o])),!a)}if(h.isFormData(t)&&h.isFunction(t.entries)){const n={};return h.forEachEntry(t,(s,r)=>{e(Ao(s),r,n,0)}),n}return null}const Io={"Content-Type":void 0};function Do(t,e,n){if(h.isString(t))try{return(e||JSON.parse)(t),h.trim(t)}catch(s){if(s.name!=="SyntaxError")throw s}return(n||JSON.stringify)(t)}const Oe={transitional:os,adapter:["xhr","http"],transformRequest:[function(e,n){const s=n.getContentType()||"",r=s.indexOf("application/json")>-1,i=h.isObject(e);if(i&&h.isHTMLForm(e)&&(e=new FormData(e)),h.isFormData(e))return r&&r?JSON.stringify(as(e)):e;if(h.isArrayBuffer(e)||h.isBuffer(e)||h.isStream(e)||h.isFile(e)||h.isBlob(e))return e;if(h.isArrayBufferView(e))return e.buffer;if(h.isURLSearchParams(e))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let a;if(i){if(s.indexOf("application/x-www-form-urlencoded")>-1)return _o(e,this.formSerializer).toString();if((a=h.isFileList(e))||s.indexOf("multipart/form-data")>-1){const c=this.env&&this.env.FormData;return ut(a?{"files[]":e}:e,c&&new c,this.formSerializer)}}return i||r?(n.setContentType("application/json",!1),Do(e)):e}],transformResponse:[function(e){const n=this.transitional||Oe.transitional,s=n&&n.forcedJSONParsing,r=this.responseType==="json";if(e&&h.isString(e)&&(s&&!this.responseType||r)){const o=!(n&&n.silentJSONParsing)&&r;try{return JSON.parse(e)}catch(a){if(o)throw a.name==="SyntaxError"?N.from(a,N.ERR_BAD_RESPONSE,this,null,this.response):a}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:oe.classes.FormData,Blob:oe.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};h.forEach(["delete","get","head"],function(e){Oe.headers[e]={}}),h.forEach(["post","put","patch"],function(e){Oe.headers[e]=h.merge(Io)});const Ro=h.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"]),Lo=t=>{const e={};let n,s,r;return t&&t.split(`
2
+ `).forEach(function(o){r=o.indexOf(":"),n=o.substring(0,r).trim().toLowerCase(),s=o.substring(r+1).trim(),!(!n||e[n]&&Ro[n])&&(n==="set-cookie"?e[n]?e[n].push(s):e[n]=[s]:e[n]=e[n]?e[n]+", "+s:s)}),e},cs=Symbol("internals");function We(t){return t&&String(t).trim().toLowerCase()}function ft(t){return t===!1||t==null?t:h.isArray(t)?t.map(ft):String(t)}function Vo(t){const e=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let s;for(;s=n.exec(t);)e[s[1]]=s[2];return e}const Fo=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function jt(t,e,n,s,r){if(h.isFunction(s))return s.call(this,e,n);if(r&&(e=n),!!h.isString(e)){if(h.isString(s))return e.indexOf(s)!==-1;if(h.isRegExp(s))return s.test(e)}}function Bo(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,n,s)=>n.toUpperCase()+s)}function $o(t,e){const n=h.toCamelCase(" "+e);["get","set","has"].forEach(s=>{Object.defineProperty(t,s+n,{value:function(r,i,o){return this[s].call(this,e,r,i,o)},configurable:!0})})}class Y{constructor(e){e&&this.set(e)}set(e,n,s){const r=this;function i(a,c,l){const f=We(c);if(!f)throw new Error("header name must be a non-empty string");const d=h.findKey(r,f);(!d||r[d]===void 0||l===!0||l===void 0&&r[d]!==!1)&&(r[d||c]=ft(a))}const o=(a,c)=>h.forEach(a,(l,f)=>i(l,f,c));return h.isPlainObject(e)||e instanceof this.constructor?o(e,n):h.isString(e)&&(e=e.trim())&&!Fo(e)?o(Lo(e),n):e!=null&&i(n,e,s),this}get(e,n){if(e=We(e),e){const s=h.findKey(this,e);if(s){const r=this[s];if(!n)return r;if(n===!0)return Vo(r);if(h.isFunction(n))return n.call(this,r,s);if(h.isRegExp(n))return n.exec(r);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,n){if(e=We(e),e){const s=h.findKey(this,e);return!!(s&&this[s]!==void 0&&(!n||jt(this,this[s],s,n)))}return!1}delete(e,n){const s=this;let r=!1;function i(o){if(o=We(o),o){const a=h.findKey(s,o);a&&(!n||jt(s,s[a],a,n))&&(delete s[a],r=!0)}}return h.isArray(e)?e.forEach(i):i(e),r}clear(e){const n=Object.keys(this);let s=n.length,r=!1;for(;s--;){const i=n[s];(!e||jt(this,this[i],i,e,!0))&&(delete this[i],r=!0)}return r}normalize(e){const n=this,s={};return h.forEach(this,(r,i)=>{const o=h.findKey(s,i);if(o){n[o]=ft(r),delete n[i];return}const a=e?Bo(i):String(i).trim();a!==i&&delete n[i],n[a]=ft(r),s[a]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const n=Object.create(null);return h.forEach(this,(s,r)=>{s!=null&&s!==!1&&(n[r]=e&&h.isArray(s)?s.join(", "):s)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,n])=>e+": "+n).join(`
3
+ `)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...n){const s=new this(e);return n.forEach(r=>s.set(r)),s}static accessor(e){const s=(this[cs]=this[cs]={accessors:{}}).accessors,r=this.prototype;function i(o){const a=We(o);s[a]||($o(r,o),s[a]=!0)}return h.isArray(e)?e.forEach(i):i(e),this}}Y.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),h.freezeMethods(Y.prototype),h.freezeMethods(Y);function Yt(t,e){const n=this||Oe,s=e||n,r=Y.from(s.headers);let i=s.data;return h.forEach(t,function(a){i=a.call(n,i,r.normalize(),e?e.status:void 0)}),r.normalize(),i}function ls(t){return!!(t&&t.__CANCEL__)}function qe(t,e,n){N.call(this,t??"canceled",N.ERR_CANCELED,e,n),this.name="CanceledError"}h.inherits(qe,N,{__CANCEL__:!0});function Po(t,e,n){const s=n.config.validateStatus;!n.status||!s||s(n.status)?t(n):e(new N("Request failed with status code "+n.status,[N.ERR_BAD_REQUEST,N.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}const Uo=oe.isStandardBrowserEnv?function(){return{write:function(n,s,r,i,o,a){const c=[];c.push(n+"="+encodeURIComponent(s)),h.isNumber(r)&&c.push("expires="+new Date(r).toGMTString()),h.isString(i)&&c.push("path="+i),h.isString(o)&&c.push("domain="+o),a===!0&&c.push("secure"),document.cookie=c.join("; ")},read:function(n){const s=document.cookie.match(new RegExp("(^|;\\s*)("+n+")=([^;]*)"));return s?decodeURIComponent(s[3]):null},remove:function(n){this.write(n,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}();function Wo(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function qo(t,e){return e?t.replace(/\/+$/,"")+"/"+e.replace(/^\/+/,""):t}function us(t,e){return t&&!Wo(e)?qo(t,e):e}const Ho=oe.isStandardBrowserEnv?function(){const e=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");let s;function r(i){let o=i;return e&&(n.setAttribute("href",o),o=n.href),n.setAttribute("href",o),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return s=r(window.location.href),function(o){const a=h.isString(o)?r(o):o;return a.protocol===s.protocol&&a.host===s.host}}():function(){return function(){return!0}}();function zo(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function Zo(t,e){t=t||10;const n=new Array(t),s=new Array(t);let r=0,i=0,o;return e=e!==void 0?e:1e3,function(c){const l=Date.now(),f=s[i];o||(o=l),n[r]=c,s[r]=l;let d=i,g=0;for(;d!==r;)g+=n[d++],d=d%t;if(r=(r+1)%t,r===i&&(i=(i+1)%t),l-o<e)return;const p=f&&l-f;return p?Math.round(g*1e3/p):void 0}}function fs(t,e){let n=0;const s=Zo(50,250);return r=>{const i=r.loaded,o=r.lengthComputable?r.total:void 0,a=i-n,c=s(a),l=i<=o;n=i;const f={loaded:i,total:o,progress:o?i/o:void 0,bytes:a,rate:c||void 0,estimated:c&&o&&l?(o-i)/c:void 0,event:r};f[e?"download":"upload"]=!0,t(f)}}const ht={http:ko,xhr:typeof XMLHttpRequest<"u"&&function(t){return new Promise(function(n,s){let r=t.data;const i=Y.from(t.headers).normalize(),o=t.responseType;let a;function c(){t.cancelToken&&t.cancelToken.unsubscribe(a),t.signal&&t.signal.removeEventListener("abort",a)}h.isFormData(r)&&(oe.isStandardBrowserEnv||oe.isStandardBrowserWebWorkerEnv?i.setContentType(!1):i.setContentType("multipart/form-data;",!1));let l=new XMLHttpRequest;if(t.auth){const p=t.auth.username||"",m=t.auth.password?unescape(encodeURIComponent(t.auth.password)):"";i.set("Authorization","Basic "+btoa(p+":"+m))}const f=us(t.baseURL,t.url);l.open(t.method.toUpperCase(),rs(f,t.params,t.paramsSerializer),!0),l.timeout=t.timeout;function d(){if(!l)return;const p=Y.from("getAllResponseHeaders"in l&&l.getAllResponseHeaders()),E={data:!o||o==="text"||o==="json"?l.responseText:l.response,status:l.status,statusText:l.statusText,headers:p,config:t,request:l};Po(function(A){n(A),c()},function(A){s(A),c()},E),l=null}if("onloadend"in l?l.onloadend=d:l.onreadystatechange=function(){!l||l.readyState!==4||l.status===0&&!(l.responseURL&&l.responseURL.indexOf("file:")===0)||setTimeout(d)},l.onabort=function(){l&&(s(new N("Request aborted",N.ECONNABORTED,t,l)),l=null)},l.onerror=function(){s(new N("Network Error",N.ERR_NETWORK,t,l)),l=null},l.ontimeout=function(){let m=t.timeout?"timeout of "+t.timeout+"ms exceeded":"timeout exceeded";const E=t.transitional||os;t.timeoutErrorMessage&&(m=t.timeoutErrorMessage),s(new N(m,E.clarifyTimeoutError?N.ETIMEDOUT:N.ECONNABORTED,t,l)),l=null},oe.isStandardBrowserEnv){const p=(t.withCredentials||Ho(f))&&t.xsrfCookieName&&Uo.read(t.xsrfCookieName);p&&i.set(t.xsrfHeaderName,p)}r===void 0&&i.setContentType(null),"setRequestHeader"in l&&h.forEach(i.toJSON(),function(m,E){l.setRequestHeader(E,m)}),h.isUndefined(t.withCredentials)||(l.withCredentials=!!t.withCredentials),o&&o!=="json"&&(l.responseType=t.responseType),typeof t.onDownloadProgress=="function"&&l.addEventListener("progress",fs(t.onDownloadProgress,!0)),typeof t.onUploadProgress=="function"&&l.upload&&l.upload.addEventListener("progress",fs(t.onUploadProgress)),(t.cancelToken||t.signal)&&(a=p=>{l&&(s(!p||p.type?new qe(null,t,l):p),l.abort(),l=null)},t.cancelToken&&t.cancelToken.subscribe(a),t.signal&&(t.signal.aborted?a():t.signal.addEventListener("abort",a)));const g=zo(f);if(g&&oe.protocols.indexOf(g)===-1){s(new N("Unsupported protocol "+g+":",N.ERR_BAD_REQUEST,t));return}l.send(r||null)})}};h.forEach(ht,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch{}Object.defineProperty(t,"adapterName",{value:e})}});const jo={getAdapter:t=>{t=h.isArray(t)?t:[t];const{length:e}=t;let n,s;for(let r=0;r<e&&(n=t[r],!(s=h.isString(n)?ht[n.toLowerCase()]:n));r++);if(!s)throw s===!1?new N(`Adapter ${n} is not supported by the environment`,"ERR_NOT_SUPPORT"):new Error(h.hasOwnProp(ht,n)?`Adapter '${n}' is not available in the build`:`Unknown adapter '${n}'`);if(!h.isFunction(s))throw new TypeError("adapter is not a function");return s},adapters:ht};function Jt(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new qe(null,t)}function hs(t){return Jt(t),t.headers=Y.from(t.headers),t.data=Yt.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),jo.getAdapter(t.adapter||Oe.adapter)(t).then(function(s){return Jt(t),s.data=Yt.call(t,t.transformResponse,s),s.headers=Y.from(s.headers),s},function(s){return ls(s)||(Jt(t),s&&s.response&&(s.response.data=Yt.call(t,t.transformResponse,s.response),s.response.headers=Y.from(s.response.headers))),Promise.reject(s)})}const ds=t=>t instanceof Y?t.toJSON():t;function Ne(t,e){e=e||{};const n={};function s(l,f,d){return h.isPlainObject(l)&&h.isPlainObject(f)?h.merge.call({caseless:d},l,f):h.isPlainObject(f)?h.merge({},f):h.isArray(f)?f.slice():f}function r(l,f,d){if(h.isUndefined(f)){if(!h.isUndefined(l))return s(void 0,l,d)}else return s(l,f,d)}function i(l,f){if(!h.isUndefined(f))return s(void 0,f)}function o(l,f){if(h.isUndefined(f)){if(!h.isUndefined(l))return s(void 0,l)}else return s(void 0,f)}function a(l,f,d){if(d in e)return s(l,f);if(d in t)return s(void 0,l)}const c={url:i,method:i,data:i,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:a,headers:(l,f)=>r(ds(l),ds(f),!0)};return h.forEach(Object.keys(Object.assign({},t,e)),function(f){const d=c[f]||r,g=d(t[f],e[f],f);h.isUndefined(g)&&d!==a||(n[f]=g)}),n}const ms="1.4.0",Gt={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{Gt[t]=function(s){return typeof s===t||"a"+(e<1?"n ":" ")+t}});const ps={};Gt.transitional=function(e,n,s){function r(i,o){return"[Axios v"+ms+"] Transitional option '"+i+"'"+o+(s?". "+s:"")}return(i,o,a)=>{if(e===!1)throw new N(r(o," has been removed"+(n?" in "+n:"")),N.ERR_DEPRECATED);return n&&!ps[o]&&(ps[o]=!0,console.warn(r(o," has been deprecated since v"+n+" and will be removed in the near future"))),e?e(i,o,a):!0}};function Yo(t,e,n){if(typeof t!="object")throw new N("options must be an object",N.ERR_BAD_OPTION_VALUE);const s=Object.keys(t);let r=s.length;for(;r-- >0;){const i=s[r],o=e[i];if(o){const a=t[i],c=a===void 0||o(a,i,t);if(c!==!0)throw new N("option "+i+" must be "+c,N.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new N("Unknown option "+i,N.ERR_BAD_OPTION)}}const Kt={assertOptions:Yo,validators:Gt},he=Kt.validators;class we{constructor(e){this.defaults=e,this.interceptors={request:new is,response:new is}}request(e,n){typeof e=="string"?(n=n||{},n.url=e):n=e||{},n=Ne(this.defaults,n);const{transitional:s,paramsSerializer:r,headers:i}=n;s!==void 0&&Kt.assertOptions(s,{silentJSONParsing:he.transitional(he.boolean),forcedJSONParsing:he.transitional(he.boolean),clarifyTimeoutError:he.transitional(he.boolean)},!1),r!=null&&(h.isFunction(r)?n.paramsSerializer={serialize:r}:Kt.assertOptions(r,{encode:he.function,serialize:he.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let o;o=i&&h.merge(i.common,i[n.method]),o&&h.forEach(["delete","get","head","post","put","patch","common"],m=>{delete i[m]}),n.headers=Y.concat(o,i);const a=[];let c=!0;this.interceptors.request.forEach(function(E){typeof E.runWhen=="function"&&E.runWhen(n)===!1||(c=c&&E.synchronous,a.unshift(E.fulfilled,E.rejected))});const l=[];this.interceptors.response.forEach(function(E){l.push(E.fulfilled,E.rejected)});let f,d=0,g;if(!c){const m=[hs.bind(this),void 0];for(m.unshift.apply(m,a),m.push.apply(m,l),g=m.length,f=Promise.resolve(n);d<g;)f=f.then(m[d++],m[d++]);return f}g=a.length;let p=n;for(d=0;d<g;){const m=a[d++],E=a[d++];try{p=m(p)}catch(O){E.call(this,O);break}}try{f=hs.call(this,p)}catch(m){return Promise.reject(m)}for(d=0,g=l.length;d<g;)f=f.then(l[d++],l[d++]);return f}getUri(e){e=Ne(this.defaults,e);const n=us(e.baseURL,e.url);return rs(n,e.params,e.paramsSerializer)}}h.forEach(["delete","get","head","options"],function(e){we.prototype[e]=function(n,s){return this.request(Ne(s||{},{method:e,url:n,data:(s||{}).data}))}}),h.forEach(["post","put","patch"],function(e){function n(s){return function(i,o,a){return this.request(Ne(a||{},{method:e,headers:s?{"Content-Type":"multipart/form-data"}:{},url:i,data:o}))}}we.prototype[e]=n(),we.prototype[e+"Form"]=n(!0)});class Qt{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(i){n=i});const s=this;this.promise.then(r=>{if(!s._listeners)return;let i=s._listeners.length;for(;i-- >0;)s._listeners[i](r);s._listeners=null}),this.promise.then=r=>{let i;const o=new Promise(a=>{s.subscribe(a),i=a}).then(r);return o.cancel=function(){s.unsubscribe(i)},o},e(function(i,o,a){s.reason||(s.reason=new qe(i,o,a),n(s.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 Qt(function(r){e=r}),cancel:e}}}function Jo(t){return function(n){return t.apply(null,n)}}function Go(t){return h.isObject(t)&&t.isAxiosError===!0}const Xt={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(Xt).forEach(([t,e])=>{Xt[e]=t});function ys(t){const e=new we(t),n=Wn(we.prototype.request,e);return h.extend(n,we.prototype,e,{allOwnKeys:!0}),h.extend(n,e,null,{allOwnKeys:!0}),n.create=function(r){return ys(Ne(t,r))},n}const $=ys(Oe);$.Axios=we,$.CanceledError=qe,$.CancelToken=Qt,$.isCancel=ls,$.VERSION=ms,$.toFormData=ut,$.AxiosError=N,$.Cancel=$.CanceledError,$.all=function(e){return Promise.all(e)},$.spread=Jo,$.isAxiosError=Go,$.mergeConfig=Ne,$.AxiosHeaders=Y,$.formToJSON=t=>as(h.isHTMLForm(t)?new FormData(t):t),$.HttpStatusCode=Xt,$.default=$;const He=async function(t){const e=t,n=window.VITE_BACKEND_URL?window.VITE_BACKEND_URL:"http://127.0.0.1:3000",s={method:e.method,url:`${n}${e.url}`,headers:{Authorization:`Bearer ${t.token}`,"Content-Type":"application/json; charset=utf-8",...e.headers},data:e.data};return await $(s).then(async function(r){return await r.data}).catch(async function(r){console.error(r);const i=await r.response.data;if(i.statusCode==401&&i.message=="Unauthorized")localStorage.clear();else throw i})};async function Ko(t){const e={url:"/v1/message/list-messages",method:"post",data:t.body,token:t.token},n=await He(e).catch(r=>(console.error(r),null)),s=n==null?void 0:n.response;return s!=null&&s.data?{data:s.data,pagination:s.pagination}:{data:[],pagination:{total:0,limit:0,size:0}}}async function Qo(t,e){var r;const s=await He({url:"/v1/message/send-message",method:"POST",data:t,token:e}).catch(i=>(console.error(i),null));return(r=s==null?void 0:s.response)==null?void 0:r.data}async function gs(t){var s;const n=await He({url:"/v1/app-chats/web-chat",method:"get",token:t}).catch(r=>(console.error(r),null));return(s=n==null?void 0:n.response)==null?void 0:s.data}async function ws(t,e){var i;const n={esCliente:!0,totalNoVistos:0,totalNoVistosCliente:0},s={url:`/v1/app-chats/update-vistos/${t}`,method:"PATCH",data:n,token:e},r=await He(s).catch(o=>(console.error(o),null));return(i=r==null?void 0:r.response)==null?void 0:i.data}async function Xo(t,e,n){var i;const s={url:`/v1/message/${t}/calificacion`,method:"PATCH",data:e,token:n},r=await He(s).catch(o=>(console.error(o),null));return(i=r==null?void 0:r.response)==null?void 0:i.data}function ea(t){return u.getCurrentScope()?(u.onScopeDispose(t),!0):!1}function Es(t){return typeof t=="function"?t():u.unref(t)}const ta=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const na=t=>t!=null,en=()=>{};function tn(t){var e;const n=Es(t);return(e=n==null?void 0:n.$el)!=null?e:n}const sa=ta?window:void 0;function ra(){const t=u.ref(!1),e=u.getCurrentInstance();return e&&u.onMounted(()=>{t.value=!0},e),t}function ia(t){const e=ra();return u.computed(()=>(e.value,!!t()))}function oa(t,e,n={}){const{root:s,rootMargin:r="0px",threshold:i=.1,window:o=sa,immediate:a=!0}=n,c=ia(()=>o&&"IntersectionObserver"in o),l=u.computed(()=>{const m=Es(t);return(Array.isArray(m)?m:[m]).map(tn).filter(na)});let f=en;const d=u.ref(a),g=c.value?u.watch(()=>[l.value,tn(s),d.value],([m,E])=>{if(f(),!d.value||!m.length)return;const O=new IntersectionObserver(e,{root:tn(E),rootMargin:r,threshold:i});m.forEach(A=>A&&O.observe(A)),f=()=>{O.disconnect(),f=en}},{immediate:a,flush:"post"}):en,p=()=>{f(),g(),d.value=!1};return ea(p),{isSupported:c,isActive:d,pause(){f(),d.value=!1},resume(){d.value=!0},stop:p}}class Ee extends Error{}class aa extends Ee{constructor(e){super(`Invalid DateTime: ${e.toMessage()}`)}}class ca extends Ee{constructor(e){super(`Invalid Interval: ${e.toMessage()}`)}}class la extends Ee{constructor(e){super(`Invalid Duration: ${e.toMessage()}`)}}class Ce extends Ee{}class ks extends Ee{constructor(e){super(`Invalid unit ${e}`)}}class W extends Ee{}class de extends Ee{constructor(){super("Zone is an abstract class")}}const y="numeric",ee="short",Z="long",dt={year:y,month:y,day:y},Ss={year:y,month:ee,day:y},ua={year:y,month:ee,day:y,weekday:ee},bs={year:y,month:Z,day:y},Ts={year:y,month:Z,day:y,weekday:Z},Os={hour:y,minute:y},Ns={hour:y,minute:y,second:y},Cs={hour:y,minute:y,second:y,timeZoneName:ee},vs={hour:y,minute:y,second:y,timeZoneName:Z},xs={hour:y,minute:y,hourCycle:"h23"},_s={hour:y,minute:y,second:y,hourCycle:"h23"},As={hour:y,minute:y,second:y,hourCycle:"h23",timeZoneName:ee},Ms={hour:y,minute:y,second:y,hourCycle:"h23",timeZoneName:Z},Is={year:y,month:y,day:y,hour:y,minute:y},Ds={year:y,month:y,day:y,hour:y,minute:y,second:y},Rs={year:y,month:ee,day:y,hour:y,minute:y},Ls={year:y,month:ee,day:y,hour:y,minute:y,second:y},fa={year:y,month:ee,day:y,weekday:ee,hour:y,minute:y},Vs={year:y,month:Z,day:y,hour:y,minute:y,timeZoneName:ee},Fs={year:y,month:Z,day:y,hour:y,minute:y,second:y,timeZoneName:ee},Bs={year:y,month:Z,day:y,weekday:Z,hour:y,minute:y,timeZoneName:Z},$s={year:y,month:Z,day:y,weekday:Z,hour:y,minute:y,second:y,timeZoneName:Z};class ze{get type(){throw new de}get name(){throw new de}get ianaName(){return this.name}get isUniversal(){throw new de}offsetName(e,n){throw new de}formatOffset(e,n){throw new de}offset(e){throw new de}equals(e){throw new de}get isValid(){throw new de}}let nn=null;class mt extends ze{static get instance(){return nn===null&&(nn=new mt),nn}get type(){return"system"}get name(){return new Intl.DateTimeFormat().resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(e,{format:n,locale:s}){return ur(e,n,s)}formatOffset(e,n){return Je(this.offset(e),n)}offset(e){return-new Date(e).getTimezoneOffset()}equals(e){return e.type==="system"}get isValid(){return!0}}let pt={};function ha(t){return pt[t]||(pt[t]=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:t,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",era:"short"})),pt[t]}const da={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};function ma(t,e){const n=t.format(e).replace(/\u200E/g,""),s=/(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(n),[,r,i,o,a,c,l,f]=s;return[o,r,i,a,c,l,f]}function pa(t,e){const n=t.formatToParts(e),s=[];for(let r=0;r<n.length;r++){const{type:i,value:o}=n[r],a=da[i];i==="era"?s[a]=o:S(a)||(s[a]=parseInt(o,10))}return s}let yt={};class ue extends ze{static create(e){return yt[e]||(yt[e]=new ue(e)),yt[e]}static resetCache(){yt={},pt={}}static isValidSpecifier(e){return this.isValidZone(e)}static isValidZone(e){if(!e)return!1;try{return new Intl.DateTimeFormat("en-US",{timeZone:e}).format(),!0}catch{return!1}}constructor(e){super(),this.zoneName=e,this.valid=ue.isValidZone(e)}get type(){return"iana"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(e,{format:n,locale:s}){return ur(e,n,s,this.name)}formatOffset(e,n){return Je(this.offset(e),n)}offset(e){const n=new Date(e);if(isNaN(n))return NaN;const s=ha(this.name);let[r,i,o,a,c,l,f]=s.formatToParts?pa(s,n):ma(s,n);a==="BC"&&(r=-Math.abs(r)+1);const g=St({year:r,month:i,day:o,hour:c===24?0:c,minute:l,second:f,millisecond:0});let p=+n;const m=p%1e3;return p-=m>=0?m:1e3+m,(g-p)/(60*1e3)}equals(e){return e.type==="iana"&&e.name===this.name}get isValid(){return this.valid}}let Ps={};function ya(t,e={}){const n=JSON.stringify([t,e]);let s=Ps[n];return s||(s=new Intl.ListFormat(t,e),Ps[n]=s),s}let sn={};function rn(t,e={}){const n=JSON.stringify([t,e]);let s=sn[n];return s||(s=new Intl.DateTimeFormat(t,e),sn[n]=s),s}let on={};function ga(t,e={}){const n=JSON.stringify([t,e]);let s=on[n];return s||(s=new Intl.NumberFormat(t,e),on[n]=s),s}let an={};function wa(t,e={}){const{base:n,...s}=e,r=JSON.stringify([t,s]);let i=an[r];return i||(i=new Intl.RelativeTimeFormat(t,e),an[r]=i),i}let Ze=null;function Ea(){return Ze||(Ze=new Intl.DateTimeFormat().resolvedOptions().locale,Ze)}let Us={};function ka(t){let e=Us[t];if(!e){const n=new Intl.Locale(t);e="getWeekInfo"in n?n.getWeekInfo():n.weekInfo,Us[t]=e}return e}function Sa(t){const e=t.indexOf("-x-");e!==-1&&(t=t.substring(0,e));const n=t.indexOf("-u-");if(n===-1)return[t];{let s,r;try{s=rn(t).resolvedOptions(),r=t}catch{const c=t.substring(0,n);s=rn(c).resolvedOptions(),r=c}const{numberingSystem:i,calendar:o}=s;return[r,i,o]}}function ba(t,e,n){return(n||e)&&(t.includes("-u-")||(t+="-u"),n&&(t+=`-ca-${n}`),e&&(t+=`-nu-${e}`)),t}function Ta(t){const e=[];for(let n=1;n<=12;n++){const s=b.utc(2009,n,1);e.push(t(s))}return e}function Oa(t){const e=[];for(let n=1;n<=7;n++){const s=b.utc(2016,11,13+n);e.push(t(s))}return e}function gt(t,e,n,s){const r=t.listingMode();return r==="error"?null:r==="en"?n(e):s(e)}function Na(t){return t.numberingSystem&&t.numberingSystem!=="latn"?!1:t.numberingSystem==="latn"||!t.locale||t.locale.startsWith("en")||new Intl.DateTimeFormat(t.intl).resolvedOptions().numberingSystem==="latn"}class Ca{constructor(e,n,s){this.padTo=s.padTo||0,this.floor=s.floor||!1;const{padTo:r,floor:i,...o}=s;if(!n||Object.keys(o).length>0){const a={useGrouping:!1,...s};s.padTo>0&&(a.minimumIntegerDigits=s.padTo),this.inf=ga(e,a)}}format(e){if(this.inf){const n=this.floor?Math.floor(e):e;return this.inf.format(n)}else{const n=this.floor?Math.floor(e):pn(e,3);return V(n,this.padTo)}}}class va{constructor(e,n,s){this.opts=s,this.originalZone=void 0;let r;if(this.opts.timeZone)this.dt=e;else if(e.zone.type==="fixed"){const o=-1*(e.offset/60),a=o>=0?`Etc/GMT+${o}`:`Etc/GMT${o}`;e.offset!==0&&ue.create(a).valid?(r=a,this.dt=e):(r="UTC",this.dt=e.offset===0?e:e.setZone("UTC").plus({minutes:e.offset}),this.originalZone=e.zone)}else e.zone.type==="system"?this.dt=e:e.zone.type==="iana"?(this.dt=e,r=e.zone.name):(r="UTC",this.dt=e.setZone("UTC").plus({minutes:e.offset}),this.originalZone=e.zone);const i={...this.opts};i.timeZone=i.timeZone||r,this.dtf=rn(n,i)}format(){return this.originalZone?this.formatToParts().map(({value:e})=>e).join(""):this.dtf.format(this.dt.toJSDate())}formatToParts(){const e=this.dtf.formatToParts(this.dt.toJSDate());return this.originalZone?e.map(n=>{if(n.type==="timeZoneName"){const s=this.originalZone.offsetName(this.dt.ts,{locale:this.dt.locale,format:this.opts.timeZoneName});return{...n,value:s}}else return n}):e}resolvedOptions(){return this.dtf.resolvedOptions()}}class xa{constructor(e,n,s){this.opts={style:"long",...s},!n&&or()&&(this.rtf=wa(e,s))}format(e,n){return this.rtf?this.rtf.format(e,n):Ka(n,e,this.opts.numeric,this.opts.style!=="long")}formatToParts(e,n){return this.rtf?this.rtf.formatToParts(e,n):[]}}const _a={firstDay:1,minimalDays:4,weekend:[6,7]};class x{static fromOpts(e){return x.create(e.locale,e.numberingSystem,e.outputCalendar,e.weekSettings,e.defaultToEN)}static create(e,n,s,r,i=!1){const o=e||I.defaultLocale,a=o||(i?"en-US":Ea()),c=n||I.defaultNumberingSystem,l=s||I.defaultOutputCalendar,f=dn(r)||I.defaultWeekSettings;return new x(a,c,l,f,o)}static resetCache(){Ze=null,sn={},on={},an={}}static fromObject({locale:e,numberingSystem:n,outputCalendar:s,weekSettings:r}={}){return x.create(e,n,s,r)}constructor(e,n,s,r,i){const[o,a,c]=Sa(e);this.locale=o,this.numberingSystem=n||a||null,this.outputCalendar=s||c||null,this.weekSettings=r,this.intl=ba(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=i,this.fastNumbersCached=null}get fastNumbers(){return this.fastNumbersCached==null&&(this.fastNumbersCached=Na(this)),this.fastNumbersCached}listingMode(){const e=this.isEnglish(),n=(this.numberingSystem===null||this.numberingSystem==="latn")&&(this.outputCalendar===null||this.outputCalendar==="gregory");return e&&n?"en":"intl"}clone(e){return!e||Object.getOwnPropertyNames(e).length===0?this:x.create(e.locale||this.specifiedLocale,e.numberingSystem||this.numberingSystem,e.outputCalendar||this.outputCalendar,dn(e.weekSettings)||this.weekSettings,e.defaultToEN||!1)}redefaultToEN(e={}){return this.clone({...e,defaultToEN:!0})}redefaultToSystem(e={}){return this.clone({...e,defaultToEN:!1})}months(e,n=!1){return gt(this,e,dr,()=>{const s=n?{month:e,day:"numeric"}:{month:e},r=n?"format":"standalone";return this.monthsCache[r][e]||(this.monthsCache[r][e]=Ta(i=>this.extract(i,s,"month"))),this.monthsCache[r][e]})}weekdays(e,n=!1){return gt(this,e,yr,()=>{const s=n?{weekday:e,year:"numeric",month:"long",day:"numeric"}:{weekday:e},r=n?"format":"standalone";return this.weekdaysCache[r][e]||(this.weekdaysCache[r][e]=Oa(i=>this.extract(i,s,"weekday"))),this.weekdaysCache[r][e]})}meridiems(){return gt(this,void 0,()=>gr,()=>{if(!this.meridiemCache){const e={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[b.utc(2016,11,13,9),b.utc(2016,11,13,19)].map(n=>this.extract(n,e,"dayperiod"))}return this.meridiemCache})}eras(e){return gt(this,e,wr,()=>{const n={era:e};return this.eraCache[e]||(this.eraCache[e]=[b.utc(-40,1,1),b.utc(2017,1,1)].map(s=>this.extract(s,n,"era"))),this.eraCache[e]})}extract(e,n,s){const r=this.dtFormatter(e,n),i=r.formatToParts(),o=i.find(a=>a.type.toLowerCase()===s);return o?o.value:null}numberFormatter(e={}){return new Ca(this.intl,e.forceSimple||this.fastNumbers,e)}dtFormatter(e,n={}){return new va(e,this.intl,n)}relFormatter(e={}){return new xa(this.intl,this.isEnglish(),e)}listFormatter(e={}){return ya(this.intl,e)}isEnglish(){return this.locale==="en"||this.locale.toLowerCase()==="en-us"||new Intl.DateTimeFormat(this.intl).resolvedOptions().locale.startsWith("en-us")}getWeekSettings(){return this.weekSettings?this.weekSettings:ar()?ka(this.locale):_a}getStartOfWeek(){return this.getWeekSettings().firstDay}getMinDaysInFirstWeek(){return this.getWeekSettings().minimalDays}getWeekendDays(){return this.getWeekSettings().weekend}equals(e){return this.locale===e.locale&&this.numberingSystem===e.numberingSystem&&this.outputCalendar===e.outputCalendar}toString(){return`Locale(${this.locale}, ${this.numberingSystem}, ${this.outputCalendar})`}}let cn=null;class H extends ze{static get utcInstance(){return cn===null&&(cn=new H(0)),cn}static instance(e){return e===0?H.utcInstance:new H(e)}static parseSpecifier(e){if(e){const n=e.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(n)return new H(bt(n[1],n[2]))}return null}constructor(e){super(),this.fixed=e}get type(){return"fixed"}get name(){return this.fixed===0?"UTC":`UTC${Je(this.fixed,"narrow")}`}get ianaName(){return this.fixed===0?"Etc/UTC":`Etc/GMT${Je(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(e,n){return Je(this.fixed,n)}get isUniversal(){return!0}offset(){return this.fixed}equals(e){return e.type==="fixed"&&e.fixed===this.fixed}get isValid(){return!0}}class Aa extends ze{constructor(e){super(),this.zoneName=e}get type(){return"invalid"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(){return null}formatOffset(){return""}offset(){return NaN}equals(){return!1}get isValid(){return!1}}function me(t,e){if(S(t)||t===null)return e;if(t instanceof ze)return t;if(Va(t)){const n=t.toLowerCase();return n==="default"?e:n==="local"||n==="system"?mt.instance:n==="utc"||n==="gmt"?H.utcInstance:H.parseSpecifier(n)||ue.create(t)}else return pe(t)?H.instance(t):typeof t=="object"&&"offset"in t&&typeof t.offset=="function"?t:new Aa(t)}const ln={arab:"[٠-٩]",arabext:"[۰-۹]",bali:"[᭐-᭙]",beng:"[০-৯]",deva:"[०-९]",fullwide:"[0-9]",gujr:"[૦-૯]",hanidec:"[〇|一|二|三|四|五|六|七|八|九]",khmr:"[០-៩]",knda:"[೦-೯]",laoo:"[໐-໙]",limb:"[᥆-᥏]",mlym:"[൦-൯]",mong:"[᠐-᠙]",mymr:"[၀-၉]",orya:"[୦-୯]",tamldec:"[௦-௯]",telu:"[౦-౯]",thai:"[๐-๙]",tibt:"[༠-༩]",latn:"\\d"},Ws={arab:[1632,1641],arabext:[1776,1785],bali:[6992,7001],beng:[2534,2543],deva:[2406,2415],fullwide:[65296,65303],gujr:[2790,2799],khmr:[6112,6121],knda:[3302,3311],laoo:[3792,3801],limb:[6470,6479],mlym:[3430,3439],mong:[6160,6169],mymr:[4160,4169],orya:[2918,2927],tamldec:[3046,3055],telu:[3174,3183],thai:[3664,3673],tibt:[3872,3881]},Ma=ln.hanidec.replace(/[\[|\]]/g,"").split("");function Ia(t){let e=parseInt(t,10);if(isNaN(e)){e="";for(let n=0;n<t.length;n++){const s=t.charCodeAt(n);if(t[n].search(ln.hanidec)!==-1)e+=Ma.indexOf(t[n]);else for(const r in Ws){const[i,o]=Ws[r];s>=i&&s<=o&&(e+=s-i)}}return parseInt(e,10)}else return e}let ve={};function Da(){ve={}}function te({numberingSystem:t},e=""){const n=t||"latn";return ve[n]||(ve[n]={}),ve[n][e]||(ve[n][e]=new RegExp(`${ln[n]}${e}`)),ve[n][e]}let qs=()=>Date.now(),Hs="system",zs=null,Zs=null,js=null,Ys=60,Js,Gs=null;class I{static get now(){return qs}static set now(e){qs=e}static set defaultZone(e){Hs=e}static get defaultZone(){return me(Hs,mt.instance)}static get defaultLocale(){return zs}static set defaultLocale(e){zs=e}static get defaultNumberingSystem(){return Zs}static set defaultNumberingSystem(e){Zs=e}static get defaultOutputCalendar(){return js}static set defaultOutputCalendar(e){js=e}static get defaultWeekSettings(){return Gs}static set defaultWeekSettings(e){Gs=dn(e)}static get twoDigitCutoffYear(){return Ys}static set twoDigitCutoffYear(e){Ys=e%100}static get throwOnInvalid(){return Js}static set throwOnInvalid(e){Js=e}static resetCaches(){x.resetCache(),ue.resetCache(),b.resetCache(),Da()}}class ne{constructor(e,n){this.reason=e,this.explanation=n}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}}const Ks=[0,31,59,90,120,151,181,212,243,273,304,334],Qs=[0,31,60,91,121,152,182,213,244,274,305,335];function J(t,e){return new ne("unit out of range",`you specified ${e} (of type ${typeof e}) as a ${t}, which is invalid`)}function un(t,e,n){const s=new Date(Date.UTC(t,e-1,n));t<100&&t>=0&&s.setUTCFullYear(s.getUTCFullYear()-1900);const r=s.getUTCDay();return r===0?7:r}function Xs(t,e,n){return n+(je(t)?Qs:Ks)[e-1]}function er(t,e){const n=je(t)?Qs:Ks,s=n.findIndex(i=>i<e),r=e-n[s];return{month:s+1,day:r}}function fn(t,e){return(t-e+7)%7+1}function wt(t,e=4,n=1){const{year:s,month:r,day:i}=t,o=Xs(s,r,i),a=fn(un(s,r,i),n);let c=Math.floor((o-a+14-e)/7),l;return c<1?(l=s-1,c=Ye(l,e,n)):c>Ye(s,e,n)?(l=s+1,c=1):l=s,{weekYear:l,weekNumber:c,weekday:a,...Ot(t)}}function tr(t,e=4,n=1){const{weekYear:s,weekNumber:r,weekday:i}=t,o=fn(un(s,1,e),n),a=_e(s);let c=r*7+i-o-7+e,l;c<1?(l=s-1,c+=_e(l)):c>a?(l=s+1,c-=_e(s)):l=s;const{month:f,day:d}=er(l,c);return{year:l,month:f,day:d,...Ot(t)}}function hn(t){const{year:e,month:n,day:s}=t,r=Xs(e,n,s);return{year:e,ordinal:r,...Ot(t)}}function nr(t){const{year:e,ordinal:n}=t,{month:s,day:r}=er(e,n);return{year:e,month:s,day:r,...Ot(t)}}function sr(t,e){if(!S(t.localWeekday)||!S(t.localWeekNumber)||!S(t.localWeekYear)){if(!S(t.weekday)||!S(t.weekNumber)||!S(t.weekYear))throw new Ce("Cannot mix locale-based week fields with ISO-based week fields");return S(t.localWeekday)||(t.weekday=t.localWeekday),S(t.localWeekNumber)||(t.weekNumber=t.localWeekNumber),S(t.localWeekYear)||(t.weekYear=t.localWeekYear),delete t.localWeekday,delete t.localWeekNumber,delete t.localWeekYear,{minDaysInFirstWeek:e.getMinDaysInFirstWeek(),startOfWeek:e.getStartOfWeek()}}else return{minDaysInFirstWeek:4,startOfWeek:1}}function Ra(t,e=4,n=1){const s=Et(t.weekYear),r=G(t.weekNumber,1,Ye(t.weekYear,e,n)),i=G(t.weekday,1,7);return s?r?i?!1:J("weekday",t.weekday):J("week",t.weekNumber):J("weekYear",t.weekYear)}function La(t){const e=Et(t.year),n=G(t.ordinal,1,_e(t.year));return e?n?!1:J("ordinal",t.ordinal):J("year",t.year)}function rr(t){const e=Et(t.year),n=G(t.month,1,12),s=G(t.day,1,kt(t.year,t.month));return e?n?s?!1:J("day",t.day):J("month",t.month):J("year",t.year)}function ir(t){const{hour:e,minute:n,second:s,millisecond:r}=t,i=G(e,0,23)||e===24&&n===0&&s===0&&r===0,o=G(n,0,59),a=G(s,0,59),c=G(r,0,999);return i?o?a?c?!1:J("millisecond",r):J("second",s):J("minute",n):J("hour",e)}function S(t){return typeof t>"u"}function pe(t){return typeof t=="number"}function Et(t){return typeof t=="number"&&t%1===0}function Va(t){return typeof t=="string"}function Fa(t){return Object.prototype.toString.call(t)==="[object Date]"}function or(){try{return typeof Intl<"u"&&!!Intl.RelativeTimeFormat}catch{return!1}}function ar(){try{return typeof Intl<"u"&&!!Intl.Locale&&("weekInfo"in Intl.Locale.prototype||"getWeekInfo"in Intl.Locale.prototype)}catch{return!1}}function Ba(t){return Array.isArray(t)?t:[t]}function cr(t,e,n){if(t.length!==0)return t.reduce((s,r)=>{const i=[e(r),r];return s&&n(s[0],i[0])===s[0]?s:i},null)[1]}function $a(t,e){return e.reduce((n,s)=>(n[s]=t[s],n),{})}function xe(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function dn(t){if(t==null)return null;if(typeof t!="object")throw new W("Week settings must be an object");if(!G(t.firstDay,1,7)||!G(t.minimalDays,1,7)||!Array.isArray(t.weekend)||t.weekend.some(e=>!G(e,1,7)))throw new W("Invalid week settings");return{firstDay:t.firstDay,minimalDays:t.minimalDays,weekend:Array.from(t.weekend)}}function G(t,e,n){return Et(t)&&t>=e&&t<=n}function Pa(t,e){return t-e*Math.floor(t/e)}function V(t,e=2){const n=t<0;let s;return n?s="-"+(""+-t).padStart(e,"0"):s=(""+t).padStart(e,"0"),s}function ye(t){if(!(S(t)||t===null||t===""))return parseInt(t,10)}function ke(t){if(!(S(t)||t===null||t===""))return parseFloat(t)}function mn(t){if(!(S(t)||t===null||t==="")){const e=parseFloat("0."+t)*1e3;return Math.floor(e)}}function pn(t,e,n=!1){const s=10**e;return(n?Math.trunc:Math.round)(t*s)/s}function je(t){return t%4===0&&(t%100!==0||t%400===0)}function _e(t){return je(t)?366:365}function kt(t,e){const n=Pa(e-1,12)+1,s=t+(e-n)/12;return n===2?je(s)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][n-1]}function St(t){let e=Date.UTC(t.year,t.month-1,t.day,t.hour,t.minute,t.second,t.millisecond);return t.year<100&&t.year>=0&&(e=new Date(e),e.setUTCFullYear(t.year,t.month-1,t.day)),+e}function lr(t,e,n){return-fn(un(t,1,e),n)+e-1}function Ye(t,e=4,n=1){const s=lr(t,e,n),r=lr(t+1,e,n);return(_e(t)-s+r)/7}function yn(t){return t>99?t:t>I.twoDigitCutoffYear?1900+t:2e3+t}function ur(t,e,n,s=null){const r=new Date(t),i={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};s&&(i.timeZone=s);const o={timeZoneName:e,...i},a=new Intl.DateTimeFormat(n,o).formatToParts(r).find(c=>c.type.toLowerCase()==="timezonename");return a?a.value:null}function bt(t,e){let n=parseInt(t,10);Number.isNaN(n)&&(n=0);const s=parseInt(e,10)||0,r=n<0||Object.is(n,-0)?-s:s;return n*60+r}function fr(t){const e=Number(t);if(typeof t=="boolean"||t===""||Number.isNaN(e))throw new W(`Invalid unit value ${t}`);return e}function Tt(t,e){const n={};for(const s in t)if(xe(t,s)){const r=t[s];if(r==null)continue;n[e(s)]=fr(r)}return n}function Je(t,e){const n=Math.trunc(Math.abs(t/60)),s=Math.trunc(Math.abs(t%60)),r=t>=0?"+":"-";switch(e){case"short":return`${r}${V(n,2)}:${V(s,2)}`;case"narrow":return`${r}${n}${s>0?`:${s}`:""}`;case"techie":return`${r}${V(n,2)}${V(s,2)}`;default:throw new RangeError(`Value format ${e} is out of range for property format`)}}function Ot(t){return $a(t,["hour","minute","second","millisecond"])}const Ua=["January","February","March","April","May","June","July","August","September","October","November","December"],hr=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],Wa=["J","F","M","A","M","J","J","A","S","O","N","D"];function dr(t){switch(t){case"narrow":return[...Wa];case"short":return[...hr];case"long":return[...Ua];case"numeric":return["1","2","3","4","5","6","7","8","9","10","11","12"];case"2-digit":return["01","02","03","04","05","06","07","08","09","10","11","12"];default:return null}}const mr=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],pr=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],qa=["M","T","W","T","F","S","S"];function yr(t){switch(t){case"narrow":return[...qa];case"short":return[...pr];case"long":return[...mr];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}const gr=["AM","PM"],Ha=["Before Christ","Anno Domini"],za=["BC","AD"],Za=["B","A"];function wr(t){switch(t){case"narrow":return[...Za];case"short":return[...za];case"long":return[...Ha];default:return null}}function ja(t){return gr[t.hour<12?0:1]}function Ya(t,e){return yr(e)[t.weekday-1]}function Ja(t,e){return dr(e)[t.month-1]}function Ga(t,e){return wr(e)[t.year<0?0:1]}function Ka(t,e,n="always",s=!1){const r={years:["year","yr."],quarters:["quarter","qtr."],months:["month","mo."],weeks:["week","wk."],days:["day","day","days"],hours:["hour","hr."],minutes:["minute","min."],seconds:["second","sec."]},i=["hours","minutes","seconds"].indexOf(t)===-1;if(n==="auto"&&i){const d=t==="days";switch(e){case 1:return d?"tomorrow":`next ${r[t][0]}`;case-1:return d?"yesterday":`last ${r[t][0]}`;case 0:return d?"today":`this ${r[t][0]}`}}const o=Object.is(e,-0)||e<0,a=Math.abs(e),c=a===1,l=r[t],f=s?c?l[1]:l[2]||l[1]:c?r[t][0]:t;return o?`${a} ${f} ago`:`in ${a} ${f}`}function Er(t,e){let n="";for(const s of t)s.literal?n+=s.val:n+=e(s.val);return n}const Qa={D:dt,DD:Ss,DDD:bs,DDDD:Ts,t:Os,tt:Ns,ttt:Cs,tttt:vs,T:xs,TT:_s,TTT:As,TTTT:Ms,f:Is,ff:Rs,fff:Vs,ffff:Bs,F:Ds,FF:Ls,FFF:Fs,FFFF:$s};class q{static create(e,n={}){return new q(e,n)}static parseFormat(e){let n=null,s="",r=!1;const i=[];for(let o=0;o<e.length;o++){const a=e.charAt(o);a==="'"?(s.length>0&&i.push({literal:r||/^\s+$/.test(s),val:s}),n=null,s="",r=!r):r||a===n?s+=a:(s.length>0&&i.push({literal:/^\s+$/.test(s),val:s}),s=a,n=a)}return s.length>0&&i.push({literal:r||/^\s+$/.test(s),val:s}),i}static macroTokenToFormatOpts(e){return Qa[e]}constructor(e,n){this.opts=n,this.loc=e,this.systemLoc=null}formatWithSystemDefault(e,n){return this.systemLoc===null&&(this.systemLoc=this.loc.redefaultToSystem()),this.systemLoc.dtFormatter(e,{...this.opts,...n}).format()}dtFormatter(e,n={}){return this.loc.dtFormatter(e,{...this.opts,...n})}formatDateTime(e,n){return this.dtFormatter(e,n).format()}formatDateTimeParts(e,n){return this.dtFormatter(e,n).formatToParts()}formatInterval(e,n){return this.dtFormatter(e.start,n).dtf.formatRange(e.start.toJSDate(),e.end.toJSDate())}resolvedOptions(e,n){return this.dtFormatter(e,n).resolvedOptions()}num(e,n=0){if(this.opts.forceSimple)return V(e,n);const s={...this.opts};return n>0&&(s.padTo=n),this.loc.numberFormatter(s).format(e)}formatDateTimeFromString(e,n){const s=this.loc.listingMode()==="en",r=this.loc.outputCalendar&&this.loc.outputCalendar!=="gregory",i=(p,m)=>this.loc.extract(e,p,m),o=p=>e.isOffsetFixed&&e.offset===0&&p.allowZ?"Z":e.isValid?e.zone.formatOffset(e.ts,p.format):"",a=()=>s?ja(e):i({hour:"numeric",hourCycle:"h12"},"dayperiod"),c=(p,m)=>s?Ja(e,p):i(m?{month:p}:{month:p,day:"numeric"},"month"),l=(p,m)=>s?Ya(e,p):i(m?{weekday:p}:{weekday:p,month:"long",day:"numeric"},"weekday"),f=p=>{const m=q.macroTokenToFormatOpts(p);return m?this.formatWithSystemDefault(e,m):p},d=p=>s?Ga(e,p):i({era:p},"era"),g=p=>{switch(p){case"S":return this.num(e.millisecond);case"u":case"SSS":return this.num(e.millisecond,3);case"s":return this.num(e.second);case"ss":return this.num(e.second,2);case"uu":return this.num(Math.floor(e.millisecond/10),2);case"uuu":return this.num(Math.floor(e.millisecond/100));case"m":return this.num(e.minute);case"mm":return this.num(e.minute,2);case"h":return this.num(e.hour%12===0?12:e.hour%12);case"hh":return this.num(e.hour%12===0?12:e.hour%12,2);case"H":return this.num(e.hour);case"HH":return this.num(e.hour,2);case"Z":return o({format:"narrow",allowZ:this.opts.allowZ});case"ZZ":return o({format:"short",allowZ:this.opts.allowZ});case"ZZZ":return o({format:"techie",allowZ:this.opts.allowZ});case"ZZZZ":return e.zone.offsetName(e.ts,{format:"short",locale:this.loc.locale});case"ZZZZZ":return e.zone.offsetName(e.ts,{format:"long",locale:this.loc.locale});case"z":return e.zoneName;case"a":return a();case"d":return r?i({day:"numeric"},"day"):this.num(e.day);case"dd":return r?i({day:"2-digit"},"day"):this.num(e.day,2);case"c":return this.num(e.weekday);case"ccc":return l("short",!0);case"cccc":return l("long",!0);case"ccccc":return l("narrow",!0);case"E":return this.num(e.weekday);case"EEE":return l("short",!1);case"EEEE":return l("long",!1);case"EEEEE":return l("narrow",!1);case"L":return r?i({month:"numeric",day:"numeric"},"month"):this.num(e.month);case"LL":return r?i({month:"2-digit",day:"numeric"},"month"):this.num(e.month,2);case"LLL":return c("short",!0);case"LLLL":return c("long",!0);case"LLLLL":return c("narrow",!0);case"M":return r?i({month:"numeric"},"month"):this.num(e.month);case"MM":return r?i({month:"2-digit"},"month"):this.num(e.month,2);case"MMM":return c("short",!1);case"MMMM":return c("long",!1);case"MMMMM":return c("narrow",!1);case"y":return r?i({year:"numeric"},"year"):this.num(e.year);case"yy":return r?i({year:"2-digit"},"year"):this.num(e.year.toString().slice(-2),2);case"yyyy":return r?i({year:"numeric"},"year"):this.num(e.year,4);case"yyyyyy":return r?i({year:"numeric"},"year"):this.num(e.year,6);case"G":return d("short");case"GG":return d("long");case"GGGGG":return d("narrow");case"kk":return this.num(e.weekYear.toString().slice(-2),2);case"kkkk":return this.num(e.weekYear,4);case"W":return this.num(e.weekNumber);case"WW":return this.num(e.weekNumber,2);case"n":return this.num(e.localWeekNumber);case"nn":return this.num(e.localWeekNumber,2);case"ii":return this.num(e.localWeekYear.toString().slice(-2),2);case"iiii":return this.num(e.localWeekYear,4);case"o":return this.num(e.ordinal);case"ooo":return this.num(e.ordinal,3);case"q":return this.num(e.quarter);case"qq":return this.num(e.quarter,2);case"X":return this.num(Math.floor(e.ts/1e3));case"x":return this.num(e.ts);default:return f(p)}};return Er(q.parseFormat(n),g)}formatDurationFromString(e,n){const s=c=>{switch(c[0]){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":return"hour";case"d":return"day";case"w":return"week";case"M":return"month";case"y":return"year";default:return null}},r=c=>l=>{const f=s(l);return f?this.num(c.get(f),l.length):l},i=q.parseFormat(n),o=i.reduce((c,{literal:l,val:f})=>l?c:c.concat(f),[]),a=e.shiftTo(...o.map(s).filter(c=>c));return Er(i,r(a))}}const kr=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;function Ae(...t){const e=t.reduce((n,s)=>n+s.source,"");return RegExp(`^${e}$`)}function Me(...t){return e=>t.reduce(([n,s,r],i)=>{const[o,a,c]=i(e,r);return[{...n,...o},a||s,c]},[{},null,1]).slice(0,2)}function Ie(t,...e){if(t==null)return[null,null];for(const[n,s]of e){const r=n.exec(t);if(r)return s(r)}return[null,null]}function Sr(...t){return(e,n)=>{const s={};let r;for(r=0;r<t.length;r++)s[t[r]]=ye(e[n+r]);return[s,null,n+r]}}const br=/(?:(Z)|([+-]\d\d)(?::?(\d\d))?)/,Xa=`(?:${br.source}?(?:\\[(${kr.source})\\])?)?`,gn=/(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/,Tr=RegExp(`${gn.source}${Xa}`),wn=RegExp(`(?:T${Tr.source})?`),ec=/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,tc=/(\d{4})-?W(\d\d)(?:-?(\d))?/,nc=/(\d{4})-?(\d{3})/,sc=Sr("weekYear","weekNumber","weekDay"),rc=Sr("year","ordinal"),ic=/(\d{4})-(\d\d)-(\d\d)/,Or=RegExp(`${gn.source} ?(?:${br.source}|(${kr.source}))?`),oc=RegExp(`(?: ${Or.source})?`);function De(t,e,n){const s=t[e];return S(s)?n:ye(s)}function ac(t,e){return[{year:De(t,e),month:De(t,e+1,1),day:De(t,e+2,1)},null,e+3]}function Re(t,e){return[{hours:De(t,e,0),minutes:De(t,e+1,0),seconds:De(t,e+2,0),milliseconds:mn(t[e+3])},null,e+4]}function Ge(t,e){const n=!t[e]&&!t[e+1],s=bt(t[e+1],t[e+2]),r=n?null:H.instance(s);return[{},r,e+3]}function Ke(t,e){const n=t[e]?ue.create(t[e]):null;return[{},n,e+1]}const cc=RegExp(`^T?${gn.source}$`),lc=/^-?P(?:(?:(-?\d{1,20}(?:\.\d{1,20})?)Y)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20}(?:\.\d{1,20})?)W)?(?:(-?\d{1,20}(?:\.\d{1,20})?)D)?(?:T(?:(-?\d{1,20}(?:\.\d{1,20})?)H)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20})(?:[.,](-?\d{1,20}))?S)?)?)$/;function uc(t){const[e,n,s,r,i,o,a,c,l]=t,f=e[0]==="-",d=c&&c[0]==="-",g=(p,m=!1)=>p!==void 0&&(m||p&&f)?-p:p;return[{years:g(ke(n)),months:g(ke(s)),weeks:g(ke(r)),days:g(ke(i)),hours:g(ke(o)),minutes:g(ke(a)),seconds:g(ke(c),c==="-0"),milliseconds:g(mn(l),d)}]}const fc={GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function En(t,e,n,s,r,i,o){const a={year:e.length===2?yn(ye(e)):ye(e),month:hr.indexOf(n)+1,day:ye(s),hour:ye(r),minute:ye(i)};return o&&(a.second=ye(o)),t&&(a.weekday=t.length>3?mr.indexOf(t)+1:pr.indexOf(t)+1),a}const hc=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\d\d)(\d\d)))$/;function dc(t){const[,e,n,s,r,i,o,a,c,l,f,d]=t,g=En(e,r,s,n,i,o,a);let p;return c?p=fc[c]:l?p=0:p=bt(f,d),[g,new H(p)]}function mc(t){return t.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}const pc=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/,yc=/^(Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/,gc=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/;function Nr(t){const[,e,n,s,r,i,o,a]=t;return[En(e,r,s,n,i,o,a),H.utcInstance]}function wc(t){const[,e,n,s,r,i,o,a]=t;return[En(e,a,n,s,r,i,o),H.utcInstance]}const Ec=Ae(ec,wn),kc=Ae(tc,wn),Sc=Ae(nc,wn),bc=Ae(Tr),Cr=Me(ac,Re,Ge,Ke),Tc=Me(sc,Re,Ge,Ke),Oc=Me(rc,Re,Ge,Ke),Nc=Me(Re,Ge,Ke);function Cc(t){return Ie(t,[Ec,Cr],[kc,Tc],[Sc,Oc],[bc,Nc])}function vc(t){return Ie(mc(t),[hc,dc])}function xc(t){return Ie(t,[pc,Nr],[yc,Nr],[gc,wc])}function _c(t){return Ie(t,[lc,uc])}const Ac=Me(Re);function Mc(t){return Ie(t,[cc,Ac])}const Ic=Ae(ic,oc),Dc=Ae(Or),Rc=Me(Re,Ge,Ke);function Lc(t){return Ie(t,[Ic,Cr],[Dc,Rc])}const vr="Invalid Duration",xr={weeks:{days:7,hours:7*24,minutes:7*24*60,seconds:7*24*60*60,milliseconds:7*24*60*60*1e3},days:{hours:24,minutes:24*60,seconds:24*60*60,milliseconds:24*60*60*1e3},hours:{minutes:60,seconds:60*60,milliseconds:60*60*1e3},minutes:{seconds:60,milliseconds:60*1e3},seconds:{milliseconds:1e3}},Vc={years:{quarters:4,months:12,weeks:52,days:365,hours:365*24,minutes:365*24*60,seconds:365*24*60*60,milliseconds:365*24*60*60*1e3},quarters:{months:3,weeks:13,days:91,hours:91*24,minutes:91*24*60,seconds:91*24*60*60,milliseconds:91*24*60*60*1e3},months:{weeks:4,days:30,hours:30*24,minutes:30*24*60,seconds:30*24*60*60,milliseconds:30*24*60*60*1e3},...xr},K=146097/400,Le=146097/4800,Fc={years:{quarters:4,months:12,weeks:K/7,days:K,hours:K*24,minutes:K*24*60,seconds:K*24*60*60,milliseconds:K*24*60*60*1e3},quarters:{months:3,weeks:K/28,days:K/4,hours:K*24/4,minutes:K*24*60/4,seconds:K*24*60*60/4,milliseconds:K*24*60*60*1e3/4},months:{weeks:Le/7,days:Le,hours:Le*24,minutes:Le*24*60,seconds:Le*24*60*60,milliseconds:Le*24*60*60*1e3},...xr},Se=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],Bc=Se.slice(0).reverse();function ge(t,e,n=!1){const s={values:n?e.values:{...t.values,...e.values||{}},loc:t.loc.clone(e.loc),conversionAccuracy:e.conversionAccuracy||t.conversionAccuracy,matrix:e.matrix||t.matrix};return new C(s)}function _r(t,e){let n=e.milliseconds??0;for(const s of Bc.slice(1))e[s]&&(n+=e[s]*t[s].milliseconds);return n}function Ar(t,e){const n=_r(t,e)<0?-1:1;Se.reduceRight((s,r)=>{if(S(e[r]))return s;if(s){const i=e[s]*n,o=t[r][s],a=Math.floor(i/o);e[r]+=a*n,e[s]-=a*o*n}return r},null),Se.reduce((s,r)=>{if(S(e[r]))return s;if(s){const i=e[s]%1;e[s]-=i,e[r]+=i*t[s][r]}return r},null)}function $c(t){const e={};for(const[n,s]of Object.entries(t))s!==0&&(e[n]=s);return e}class C{constructor(e){const n=e.conversionAccuracy==="longterm"||!1;let s=n?Fc:Vc;e.matrix&&(s=e.matrix),this.values=e.values,this.loc=e.loc||x.create(),this.conversionAccuracy=n?"longterm":"casual",this.invalid=e.invalid||null,this.matrix=s,this.isLuxonDuration=!0}static fromMillis(e,n){return C.fromObject({milliseconds:e},n)}static fromObject(e,n={}){if(e==null||typeof e!="object")throw new W(`Duration.fromObject: argument expected to be an object, got ${e===null?"null":typeof e}`);return new C({values:Tt(e,C.normalizeUnit),loc:x.fromObject(n),conversionAccuracy:n.conversionAccuracy,matrix:n.matrix})}static fromDurationLike(e){if(pe(e))return C.fromMillis(e);if(C.isDuration(e))return e;if(typeof e=="object")return C.fromObject(e);throw new W(`Unknown duration argument ${e} of type ${typeof e}`)}static fromISO(e,n){const[s]=_c(e);return s?C.fromObject(s,n):C.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static fromISOTime(e,n){const[s]=Mc(e);return s?C.fromObject(s,n):C.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static invalid(e,n=null){if(!e)throw new W("need to specify a reason the Duration is invalid");const s=e instanceof ne?e:new ne(e,n);if(I.throwOnInvalid)throw new la(s);return new C({invalid:s})}static normalizeUnit(e){const n={year:"years",years:"years",quarter:"quarters",quarters:"quarters",month:"months",months:"months",week:"weeks",weeks:"weeks",day:"days",days:"days",hour:"hours",hours:"hours",minute:"minutes",minutes:"minutes",second:"seconds",seconds:"seconds",millisecond:"milliseconds",milliseconds:"milliseconds"}[e&&e.toLowerCase()];if(!n)throw new ks(e);return n}static isDuration(e){return e&&e.isLuxonDuration||!1}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}toFormat(e,n={}){const s={...n,floor:n.round!==!1&&n.floor!==!1};return this.isValid?q.create(this.loc,s).formatDurationFromString(this,e):vr}toHuman(e={}){if(!this.isValid)return vr;const n=Se.map(s=>{const r=this.values[s];return S(r)?null:this.loc.numberFormatter({style:"unit",unitDisplay:"long",...e,unit:s.slice(0,-1)}).format(r)}).filter(s=>s);return this.loc.listFormatter({type:"conjunction",style:e.listStyle||"narrow",...e}).format(n)}toObject(){return this.isValid?{...this.values}:{}}toISO(){if(!this.isValid)return null;let e="P";return this.years!==0&&(e+=this.years+"Y"),(this.months!==0||this.quarters!==0)&&(e+=this.months+this.quarters*3+"M"),this.weeks!==0&&(e+=this.weeks+"W"),this.days!==0&&(e+=this.days+"D"),(this.hours!==0||this.minutes!==0||this.seconds!==0||this.milliseconds!==0)&&(e+="T"),this.hours!==0&&(e+=this.hours+"H"),this.minutes!==0&&(e+=this.minutes+"M"),(this.seconds!==0||this.milliseconds!==0)&&(e+=pn(this.seconds+this.milliseconds/1e3,3)+"S"),e==="P"&&(e+="T0S"),e}toISOTime(e={}){if(!this.isValid)return null;const n=this.toMillis();return n<0||n>=864e5?null:(e={suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended",...e,includeOffset:!1},b.fromMillis(n,{zone:"UTC"}).toISOTime(e))}toJSON(){return this.toISO()}toString(){return this.toISO()}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Duration { values: ${JSON.stringify(this.values)} }`:`Duration { Invalid, reason: ${this.invalidReason} }`}toMillis(){return this.isValid?_r(this.matrix,this.values):NaN}valueOf(){return this.toMillis()}plus(e){if(!this.isValid)return this;const n=C.fromDurationLike(e),s={};for(const r of Se)(xe(n.values,r)||xe(this.values,r))&&(s[r]=n.get(r)+this.get(r));return ge(this,{values:s},!0)}minus(e){if(!this.isValid)return this;const n=C.fromDurationLike(e);return this.plus(n.negate())}mapUnits(e){if(!this.isValid)return this;const n={};for(const s of Object.keys(this.values))n[s]=fr(e(this.values[s],s));return ge(this,{values:n},!0)}get(e){return this[C.normalizeUnit(e)]}set(e){if(!this.isValid)return this;const n={...this.values,...Tt(e,C.normalizeUnit)};return ge(this,{values:n})}reconfigure({locale:e,numberingSystem:n,conversionAccuracy:s,matrix:r}={}){const o={loc:this.loc.clone({locale:e,numberingSystem:n}),matrix:r,conversionAccuracy:s};return ge(this,o)}as(e){return this.isValid?this.shiftTo(e).get(e):NaN}normalize(){if(!this.isValid)return this;const e=this.toObject();return Ar(this.matrix,e),ge(this,{values:e},!0)}rescale(){if(!this.isValid)return this;const e=$c(this.normalize().shiftToAll().toObject());return ge(this,{values:e},!0)}shiftTo(...e){if(!this.isValid)return this;if(e.length===0)return this;e=e.map(o=>C.normalizeUnit(o));const n={},s={},r=this.toObject();let i;for(const o of Se)if(e.indexOf(o)>=0){i=o;let a=0;for(const l in s)a+=this.matrix[l][o]*s[l],s[l]=0;pe(r[o])&&(a+=r[o]);const c=Math.trunc(a);n[o]=c,s[o]=(a*1e3-c*1e3)/1e3}else pe(r[o])&&(s[o]=r[o]);for(const o in s)s[o]!==0&&(n[i]+=o===i?s[o]:s[o]/this.matrix[i][o]);return Ar(this.matrix,n),ge(this,{values:n},!0)}shiftToAll(){return this.isValid?this.shiftTo("years","months","weeks","days","hours","minutes","seconds","milliseconds"):this}negate(){if(!this.isValid)return this;const e={};for(const n of Object.keys(this.values))e[n]=this.values[n]===0?0:-this.values[n];return ge(this,{values:e},!0)}get years(){return this.isValid?this.values.years||0:NaN}get quarters(){return this.isValid?this.values.quarters||0:NaN}get months(){return this.isValid?this.values.months||0:NaN}get weeks(){return this.isValid?this.values.weeks||0:NaN}get days(){return this.isValid?this.values.days||0:NaN}get hours(){return this.isValid?this.values.hours||0:NaN}get minutes(){return this.isValid?this.values.minutes||0:NaN}get seconds(){return this.isValid?this.values.seconds||0:NaN}get milliseconds(){return this.isValid?this.values.milliseconds||0:NaN}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}equals(e){if(!this.isValid||!e.isValid||!this.loc.equals(e.loc))return!1;function n(s,r){return s===void 0||s===0?r===void 0||r===0:s===r}for(const s of Se)if(!n(this.values[s],e.values[s]))return!1;return!0}}const Ve="Invalid Interval";function Pc(t,e){return!t||!t.isValid?D.invalid("missing or invalid start"):!e||!e.isValid?D.invalid("missing or invalid end"):e<t?D.invalid("end before start",`The end of an interval must be after its start, but you had start=${t.toISO()} and end=${e.toISO()}`):null}class D{constructor(e){this.s=e.start,this.e=e.end,this.invalid=e.invalid||null,this.isLuxonInterval=!0}static invalid(e,n=null){if(!e)throw new W("need to specify a reason the Interval is invalid");const s=e instanceof ne?e:new ne(e,n);if(I.throwOnInvalid)throw new ca(s);return new D({invalid:s})}static fromDateTimes(e,n){const s=Xe(e),r=Xe(n),i=Pc(s,r);return i??new D({start:s,end:r})}static after(e,n){const s=C.fromDurationLike(n),r=Xe(e);return D.fromDateTimes(r,r.plus(s))}static before(e,n){const s=C.fromDurationLike(n),r=Xe(e);return D.fromDateTimes(r.minus(s),r)}static fromISO(e,n){const[s,r]=(e||"").split("/",2);if(s&&r){let i,o;try{i=b.fromISO(s,n),o=i.isValid}catch{o=!1}let a,c;try{a=b.fromISO(r,n),c=a.isValid}catch{c=!1}if(o&&c)return D.fromDateTimes(i,a);if(o){const l=C.fromISO(r,n);if(l.isValid)return D.after(i,l)}else if(c){const l=C.fromISO(s,n);if(l.isValid)return D.before(a,l)}}return D.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static isInterval(e){return e&&e.isLuxonInterval||!1}get start(){return this.isValid?this.s:null}get end(){return this.isValid?this.e:null}get isValid(){return this.invalidReason===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}length(e="milliseconds"){return this.isValid?this.toDuration(e).get(e):NaN}count(e="milliseconds",n){if(!this.isValid)return NaN;const s=this.start.startOf(e,n);let r;return n!=null&&n.useLocaleWeeks?r=this.end.reconfigure({locale:s.locale}):r=this.end,r=r.startOf(e,n),Math.floor(r.diff(s,e).get(e))+(r.valueOf()!==this.end.valueOf())}hasSame(e){return this.isValid?this.isEmpty()||this.e.minus(1).hasSame(this.s,e):!1}isEmpty(){return this.s.valueOf()===this.e.valueOf()}isAfter(e){return this.isValid?this.s>e:!1}isBefore(e){return this.isValid?this.e<=e:!1}contains(e){return this.isValid?this.s<=e&&this.e>e:!1}set({start:e,end:n}={}){return this.isValid?D.fromDateTimes(e||this.s,n||this.e):this}splitAt(...e){if(!this.isValid)return[];const n=e.map(Xe).filter(o=>this.contains(o)).sort((o,a)=>o.toMillis()-a.toMillis()),s=[];let{s:r}=this,i=0;for(;r<this.e;){const o=n[i]||this.e,a=+o>+this.e?this.e:o;s.push(D.fromDateTimes(r,a)),r=a,i+=1}return s}splitBy(e){const n=C.fromDurationLike(e);if(!this.isValid||!n.isValid||n.as("milliseconds")===0)return[];let{s}=this,r=1,i;const o=[];for(;s<this.e;){const a=this.start.plus(n.mapUnits(c=>c*r));i=+a>+this.e?this.e:a,o.push(D.fromDateTimes(s,i)),s=i,r+=1}return o}divideEqually(e){return this.isValid?this.splitBy(this.length()/e).slice(0,e):[]}overlaps(e){return this.e>e.s&&this.s<e.e}abutsStart(e){return this.isValid?+this.e==+e.s:!1}abutsEnd(e){return this.isValid?+e.e==+this.s:!1}engulfs(e){return this.isValid?this.s<=e.s&&this.e>=e.e:!1}equals(e){return!this.isValid||!e.isValid?!1:this.s.equals(e.s)&&this.e.equals(e.e)}intersection(e){if(!this.isValid)return this;const n=this.s>e.s?this.s:e.s,s=this.e<e.e?this.e:e.e;return n>=s?null:D.fromDateTimes(n,s)}union(e){if(!this.isValid)return this;const n=this.s<e.s?this.s:e.s,s=this.e>e.e?this.e:e.e;return D.fromDateTimes(n,s)}static merge(e){const[n,s]=e.sort((r,i)=>r.s-i.s).reduce(([r,i],o)=>i?i.overlaps(o)||i.abutsStart(o)?[r,i.union(o)]:[r.concat([i]),o]:[r,o],[[],null]);return s&&n.push(s),n}static xor(e){let n=null,s=0;const r=[],i=e.map(c=>[{time:c.s,type:"s"},{time:c.e,type:"e"}]),o=Array.prototype.concat(...i),a=o.sort((c,l)=>c.time-l.time);for(const c of a)s+=c.type==="s"?1:-1,s===1?n=c.time:(n&&+n!=+c.time&&r.push(D.fromDateTimes(n,c.time)),n=null);return D.merge(r)}difference(...e){return D.xor([this].concat(e)).map(n=>this.intersection(n)).filter(n=>n&&!n.isEmpty())}toString(){return this.isValid?`[${this.s.toISO()} – ${this.e.toISO()})`:Ve}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Interval { start: ${this.s.toISO()}, end: ${this.e.toISO()} }`:`Interval { Invalid, reason: ${this.invalidReason} }`}toLocaleString(e=dt,n={}){return this.isValid?q.create(this.s.loc.clone(n),e).formatInterval(this):Ve}toISO(e){return this.isValid?`${this.s.toISO(e)}/${this.e.toISO(e)}`:Ve}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:Ve}toISOTime(e){return this.isValid?`${this.s.toISOTime(e)}/${this.e.toISOTime(e)}`:Ve}toFormat(e,{separator:n=" – "}={}){return this.isValid?`${this.s.toFormat(e)}${n}${this.e.toFormat(e)}`:Ve}toDuration(e,n){return this.isValid?this.e.diff(this.s,e,n):C.invalid(this.invalidReason)}mapEndpoints(e){return D.fromDateTimes(e(this.s),e(this.e))}}class Nt{static hasDST(e=I.defaultZone){const n=b.now().setZone(e).set({month:12});return!e.isUniversal&&n.offset!==n.set({month:6}).offset}static isValidIANAZone(e){return ue.isValidZone(e)}static normalizeZone(e){return me(e,I.defaultZone)}static getStartOfWeek({locale:e=null,locObj:n=null}={}){return(n||x.create(e)).getStartOfWeek()}static getMinimumDaysInFirstWeek({locale:e=null,locObj:n=null}={}){return(n||x.create(e)).getMinDaysInFirstWeek()}static getWeekendWeekdays({locale:e=null,locObj:n=null}={}){return(n||x.create(e)).getWeekendDays().slice()}static months(e="long",{locale:n=null,numberingSystem:s=null,locObj:r=null,outputCalendar:i="gregory"}={}){return(r||x.create(n,s,i)).months(e)}static monthsFormat(e="long",{locale:n=null,numberingSystem:s=null,locObj:r=null,outputCalendar:i="gregory"}={}){return(r||x.create(n,s,i)).months(e,!0)}static weekdays(e="long",{locale:n=null,numberingSystem:s=null,locObj:r=null}={}){return(r||x.create(n,s,null)).weekdays(e)}static weekdaysFormat(e="long",{locale:n=null,numberingSystem:s=null,locObj:r=null}={}){return(r||x.create(n,s,null)).weekdays(e,!0)}static meridiems({locale:e=null}={}){return x.create(e).meridiems()}static eras(e="short",{locale:n=null}={}){return x.create(n,null,"gregory").eras(e)}static features(){return{relative:or(),localeWeek:ar()}}}function Mr(t,e){const n=r=>r.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),s=n(e)-n(t);return Math.floor(C.fromMillis(s).as("days"))}function Uc(t,e,n){const s=[["years",(c,l)=>l.year-c.year],["quarters",(c,l)=>l.quarter-c.quarter+(l.year-c.year)*4],["months",(c,l)=>l.month-c.month+(l.year-c.year)*12],["weeks",(c,l)=>{const f=Mr(c,l);return(f-f%7)/7}],["days",Mr]],r={},i=t;let o,a;for(const[c,l]of s)n.indexOf(c)>=0&&(o=c,r[c]=l(t,e),a=i.plus(r),a>e?(r[c]--,t=i.plus(r),t>e&&(a=t,r[c]--,t=i.plus(r))):t=a);return[t,r,a,o]}function Wc(t,e,n,s){let[r,i,o,a]=Uc(t,e,n);const c=e-r,l=n.filter(d=>["hours","minutes","seconds","milliseconds"].indexOf(d)>=0);l.length===0&&(o<e&&(o=r.plus({[a]:1})),o!==r&&(i[a]=(i[a]||0)+c/(o-r)));const f=C.fromObject(i,s);return l.length>0?C.fromMillis(c,s).shiftTo(...l).plus(f):f}const qc="missing Intl.DateTimeFormat.formatToParts support";function v(t,e=n=>n){return{regex:t,deser:([n])=>e(Ia(n))}}const Ir="[  ]",Dr=new RegExp(Ir,"g");function Hc(t){return t.replace(/\./g,"\\.?").replace(Dr,Ir)}function Rr(t){return t.replace(/\./g,"").replace(Dr," ").toLowerCase()}function se(t,e){return t===null?null:{regex:RegExp(t.map(Hc).join("|")),deser:([n])=>t.findIndex(s=>Rr(n)===Rr(s))+e}}function Lr(t,e){return{regex:t,deser:([,n,s])=>bt(n,s),groups:e}}function Ct(t){return{regex:t,deser:([e])=>e}}function zc(t){return t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function Zc(t,e){const n=te(e),s=te(e,"{2}"),r=te(e,"{3}"),i=te(e,"{4}"),o=te(e,"{6}"),a=te(e,"{1,2}"),c=te(e,"{1,3}"),l=te(e,"{1,6}"),f=te(e,"{1,9}"),d=te(e,"{2,4}"),g=te(e,"{4,6}"),p=O=>({regex:RegExp(zc(O.val)),deser:([A])=>A,literal:!0}),E=(O=>{if(t.literal)return p(O);switch(O.val){case"G":return se(e.eras("short"),0);case"GG":return se(e.eras("long"),0);case"y":return v(l);case"yy":return v(d,yn);case"yyyy":return v(i);case"yyyyy":return v(g);case"yyyyyy":return v(o);case"M":return v(a);case"MM":return v(s);case"MMM":return se(e.months("short",!0),1);case"MMMM":return se(e.months("long",!0),1);case"L":return v(a);case"LL":return v(s);case"LLL":return se(e.months("short",!1),1);case"LLLL":return se(e.months("long",!1),1);case"d":return v(a);case"dd":return v(s);case"o":return v(c);case"ooo":return v(r);case"HH":return v(s);case"H":return v(a);case"hh":return v(s);case"h":return v(a);case"mm":return v(s);case"m":return v(a);case"q":return v(a);case"qq":return v(s);case"s":return v(a);case"ss":return v(s);case"S":return v(c);case"SSS":return v(r);case"u":return Ct(f);case"uu":return Ct(a);case"uuu":return v(n);case"a":return se(e.meridiems(),0);case"kkkk":return v(i);case"kk":return v(d,yn);case"W":return v(a);case"WW":return v(s);case"E":case"c":return v(n);case"EEE":return se(e.weekdays("short",!1),1);case"EEEE":return se(e.weekdays("long",!1),1);case"ccc":return se(e.weekdays("short",!0),1);case"cccc":return se(e.weekdays("long",!0),1);case"Z":case"ZZ":return Lr(new RegExp(`([+-]${a.source})(?::(${s.source}))?`),2);case"ZZZ":return Lr(new RegExp(`([+-]${a.source})(${s.source})?`),2);case"z":return Ct(/[a-z_+-/]{1,256}?/i);case" ":return Ct(/[^\S\n\r]/);default:return p(O)}})(t)||{invalidReason:qc};return E.token=t,E}const jc={year:{"2-digit":"yy",numeric:"yyyyy"},month:{numeric:"M","2-digit":"MM",short:"MMM",long:"MMMM"},day:{numeric:"d","2-digit":"dd"},weekday:{short:"EEE",long:"EEEE"},dayperiod:"a",dayPeriod:"a",hour12:{numeric:"h","2-digit":"hh"},hour24:{numeric:"H","2-digit":"HH"},minute:{numeric:"m","2-digit":"mm"},second:{numeric:"s","2-digit":"ss"},timeZoneName:{long:"ZZZZZ",short:"ZZZ"}};function Yc(t,e,n){const{type:s,value:r}=t;if(s==="literal"){const c=/^\s+$/.test(r);return{literal:!c,val:c?" ":r}}const i=e[s];let o=s;s==="hour"&&(e.hour12!=null?o=e.hour12?"hour12":"hour24":e.hourCycle!=null?e.hourCycle==="h11"||e.hourCycle==="h12"?o="hour12":o="hour24":o=n.hour12?"hour12":"hour24");let a=jc[o];if(typeof a=="object"&&(a=a[i]),a)return{literal:!1,val:a}}function Jc(t){return[`^${t.map(n=>n.regex).reduce((n,s)=>`${n}(${s.source})`,"")}$`,t]}function Gc(t,e,n){const s=t.match(e);if(s){const r={};let i=1;for(const o in n)if(xe(n,o)){const a=n[o],c=a.groups?a.groups+1:1;!a.literal&&a.token&&(r[a.token.val[0]]=a.deser(s.slice(i,i+c))),i+=c}return[s,r]}else return[s,{}]}function Kc(t){const e=i=>{switch(i){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":case"H":return"hour";case"d":return"day";case"o":return"ordinal";case"L":case"M":return"month";case"y":return"year";case"E":case"c":return"weekday";case"W":return"weekNumber";case"k":return"weekYear";case"q":return"quarter";default:return null}};let n=null,s;return S(t.z)||(n=ue.create(t.z)),S(t.Z)||(n||(n=new H(t.Z)),s=t.Z),S(t.q)||(t.M=(t.q-1)*3+1),S(t.h)||(t.h<12&&t.a===1?t.h+=12:t.h===12&&t.a===0&&(t.h=0)),t.G===0&&t.y&&(t.y=-t.y),S(t.u)||(t.S=mn(t.u)),[Object.keys(t).reduce((i,o)=>{const a=e(o);return a&&(i[a]=t[o]),i},{}),n,s]}let kn=null;function Qc(){return kn||(kn=b.fromMillis(1555555555555)),kn}function Xc(t,e){if(t.literal)return t;const n=q.macroTokenToFormatOpts(t.val),s=$r(n,e);return s==null||s.includes(void 0)?t:s}function Vr(t,e){return Array.prototype.concat(...t.map(n=>Xc(n,e)))}class Fr{constructor(e,n){if(this.locale=e,this.format=n,this.tokens=Vr(q.parseFormat(n),e),this.units=this.tokens.map(s=>Zc(s,e)),this.disqualifyingUnit=this.units.find(s=>s.invalidReason),!this.disqualifyingUnit){const[s,r]=Jc(this.units);this.regex=RegExp(s,"i"),this.handlers=r}}explainFromTokens(e){if(this.isValid){const[n,s]=Gc(e,this.regex,this.handlers),[r,i,o]=s?Kc(s):[null,null,void 0];if(xe(s,"a")&&xe(s,"H"))throw new Ce("Can't include meridiem when specifying 24-hour format");return{input:e,tokens:this.tokens,regex:this.regex,rawMatches:n,matches:s,result:r,zone:i,specificOffset:o}}else return{input:e,tokens:this.tokens,invalidReason:this.invalidReason}}get isValid(){return!this.disqualifyingUnit}get invalidReason(){return this.disqualifyingUnit?this.disqualifyingUnit.invalidReason:null}}function Br(t,e,n){return new Fr(t,n).explainFromTokens(e)}function el(t,e,n){const{result:s,zone:r,specificOffset:i,invalidReason:o}=Br(t,e,n);return[s,r,i,o]}function $r(t,e){if(!t)return null;const s=q.create(e,t).dtFormatter(Qc()),r=s.formatToParts(),i=s.resolvedOptions();return r.map(o=>Yc(o,t,i))}const Sn="Invalid DateTime",Pr=864e13;function Qe(t){return new ne("unsupported zone",`the zone "${t.name}" is not supported`)}function bn(t){return t.weekData===null&&(t.weekData=wt(t.c)),t.weekData}function Tn(t){return t.localWeekData===null&&(t.localWeekData=wt(t.c,t.loc.getMinDaysInFirstWeek(),t.loc.getStartOfWeek())),t.localWeekData}function be(t,e){const n={ts:t.ts,zone:t.zone,c:t.c,o:t.o,loc:t.loc,invalid:t.invalid};return new b({...n,...e,old:n})}function Ur(t,e,n){let s=t-e*60*1e3;const r=n.offset(s);if(e===r)return[s,e];s-=(r-e)*60*1e3;const i=n.offset(s);return r===i?[s,r]:[t-Math.min(r,i)*60*1e3,Math.max(r,i)]}function vt(t,e){t+=e*60*1e3;const n=new Date(t);return{year:n.getUTCFullYear(),month:n.getUTCMonth()+1,day:n.getUTCDate(),hour:n.getUTCHours(),minute:n.getUTCMinutes(),second:n.getUTCSeconds(),millisecond:n.getUTCMilliseconds()}}function xt(t,e,n){return Ur(St(t),e,n)}function Wr(t,e){const n=t.o,s=t.c.year+Math.trunc(e.years),r=t.c.month+Math.trunc(e.months)+Math.trunc(e.quarters)*3,i={...t.c,year:s,month:r,day:Math.min(t.c.day,kt(s,r))+Math.trunc(e.days)+Math.trunc(e.weeks)*7},o=C.fromObject({years:e.years-Math.trunc(e.years),quarters:e.quarters-Math.trunc(e.quarters),months:e.months-Math.trunc(e.months),weeks:e.weeks-Math.trunc(e.weeks),days:e.days-Math.trunc(e.days),hours:e.hours,minutes:e.minutes,seconds:e.seconds,milliseconds:e.milliseconds}).as("milliseconds"),a=St(i);let[c,l]=Ur(a,n,t.zone);return o!==0&&(c+=o,l=t.zone.offset(c)),{ts:c,o:l}}function Fe(t,e,n,s,r,i){const{setZone:o,zone:a}=n;if(t&&Object.keys(t).length!==0||e){const c=e||a,l=b.fromObject(t,{...n,zone:c,specificOffset:i});return o?l:l.setZone(a)}else return b.invalid(new ne("unparsable",`the input "${r}" can't be parsed as ${s}`))}function _t(t,e,n=!0){return t.isValid?q.create(x.create("en-US"),{allowZ:n,forceSimple:!0}).formatDateTimeFromString(t,e):null}function On(t,e){const n=t.c.year>9999||t.c.year<0;let s="";return n&&t.c.year>=0&&(s+="+"),s+=V(t.c.year,n?6:4),e?(s+="-",s+=V(t.c.month),s+="-",s+=V(t.c.day)):(s+=V(t.c.month),s+=V(t.c.day)),s}function qr(t,e,n,s,r,i){let o=V(t.c.hour);return e?(o+=":",o+=V(t.c.minute),(t.c.millisecond!==0||t.c.second!==0||!n)&&(o+=":")):o+=V(t.c.minute),(t.c.millisecond!==0||t.c.second!==0||!n)&&(o+=V(t.c.second),(t.c.millisecond!==0||!s)&&(o+=".",o+=V(t.c.millisecond,3))),r&&(t.isOffsetFixed&&t.offset===0&&!i?o+="Z":t.o<0?(o+="-",o+=V(Math.trunc(-t.o/60)),o+=":",o+=V(Math.trunc(-t.o%60))):(o+="+",o+=V(Math.trunc(t.o/60)),o+=":",o+=V(Math.trunc(t.o%60)))),i&&(o+="["+t.zone.ianaName+"]"),o}const Hr={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},tl={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},nl={ordinal:1,hour:0,minute:0,second:0,millisecond:0},zr=["year","month","day","hour","minute","second","millisecond"],sl=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],rl=["year","ordinal","hour","minute","second","millisecond"];function il(t){const e={year:"year",years:"year",month:"month",months:"month",day:"day",days:"day",hour:"hour",hours:"hour",minute:"minute",minutes:"minute",quarter:"quarter",quarters:"quarter",second:"second",seconds:"second",millisecond:"millisecond",milliseconds:"millisecond",weekday:"weekday",weekdays:"weekday",weeknumber:"weekNumber",weeksnumber:"weekNumber",weeknumbers:"weekNumber",weekyear:"weekYear",weekyears:"weekYear",ordinal:"ordinal"}[t.toLowerCase()];if(!e)throw new ks(t);return e}function Zr(t){switch(t.toLowerCase()){case"localweekday":case"localweekdays":return"localWeekday";case"localweeknumber":case"localweeknumbers":return"localWeekNumber";case"localweekyear":case"localweekyears":return"localWeekYear";default:return il(t)}}function ol(t){return Mt[t]||(At===void 0&&(At=I.now()),Mt[t]=t.offset(At)),Mt[t]}function jr(t,e){const n=me(e.zone,I.defaultZone);if(!n.isValid)return b.invalid(Qe(n));const s=x.fromObject(e);let r,i;if(S(t.year))r=I.now();else{for(const c of zr)S(t[c])&&(t[c]=Hr[c]);const o=rr(t)||ir(t);if(o)return b.invalid(o);const a=ol(n);[r,i]=xt(t,a,n)}return new b({ts:r,zone:n,loc:s,o:i})}function Yr(t,e,n){const s=S(n.round)?!0:n.round,r=(o,a)=>(o=pn(o,s||n.calendary?0:2,!0),e.loc.clone(n).relFormatter(n).format(o,a)),i=o=>n.calendary?e.hasSame(t,o)?0:e.startOf(o).diff(t.startOf(o),o).get(o):e.diff(t,o).get(o);if(n.unit)return r(i(n.unit),n.unit);for(const o of n.units){const a=i(o);if(Math.abs(a)>=1)return r(a,o)}return r(t>e?-0:0,n.units[n.units.length-1])}function Jr(t){let e={},n;return t.length>0&&typeof t[t.length-1]=="object"?(e=t[t.length-1],n=Array.from(t).slice(0,t.length-1)):n=Array.from(t),[e,n]}let At,Mt={};class b{constructor(e){const n=e.zone||I.defaultZone;let s=e.invalid||(Number.isNaN(e.ts)?new ne("invalid input"):null)||(n.isValid?null:Qe(n));this.ts=S(e.ts)?I.now():e.ts;let r=null,i=null;if(!s)if(e.old&&e.old.ts===this.ts&&e.old.zone.equals(n))[r,i]=[e.old.c,e.old.o];else{const a=pe(e.o)&&!e.old?e.o:n.offset(this.ts);r=vt(this.ts,a),s=Number.isNaN(r.year)?new ne("invalid input"):null,r=s?null:r,i=s?null:a}this._zone=n,this.loc=e.loc||x.create(),this.invalid=s,this.weekData=null,this.localWeekData=null,this.c=r,this.o=i,this.isLuxonDateTime=!0}static now(){return new b({})}static local(){const[e,n]=Jr(arguments),[s,r,i,o,a,c,l]=n;return jr({year:s,month:r,day:i,hour:o,minute:a,second:c,millisecond:l},e)}static utc(){const[e,n]=Jr(arguments),[s,r,i,o,a,c,l]=n;return e.zone=H.utcInstance,jr({year:s,month:r,day:i,hour:o,minute:a,second:c,millisecond:l},e)}static fromJSDate(e,n={}){const s=Fa(e)?e.valueOf():NaN;if(Number.isNaN(s))return b.invalid("invalid input");const r=me(n.zone,I.defaultZone);return r.isValid?new b({ts:s,zone:r,loc:x.fromObject(n)}):b.invalid(Qe(r))}static fromMillis(e,n={}){if(pe(e))return e<-Pr||e>Pr?b.invalid("Timestamp out of range"):new b({ts:e,zone:me(n.zone,I.defaultZone),loc:x.fromObject(n)});throw new W(`fromMillis requires a numerical input, but received a ${typeof e} with value ${e}`)}static fromSeconds(e,n={}){if(pe(e))return new b({ts:e*1e3,zone:me(n.zone,I.defaultZone),loc:x.fromObject(n)});throw new W("fromSeconds requires a numerical input")}static fromObject(e,n={}){e=e||{};const s=me(n.zone,I.defaultZone);if(!s.isValid)return b.invalid(Qe(s));const r=x.fromObject(n),i=Tt(e,Zr),{minDaysInFirstWeek:o,startOfWeek:a}=sr(i,r),c=I.now(),l=S(n.specificOffset)?s.offset(c):n.specificOffset,f=!S(i.ordinal),d=!S(i.year),g=!S(i.month)||!S(i.day),p=d||g,m=i.weekYear||i.weekNumber;if((p||f)&&m)throw new Ce("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(g&&f)throw new Ce("Can't mix ordinal dates with month/day");const E=m||i.weekday&&!p;let O,A,M=vt(c,l);E?(O=sl,A=tl,M=wt(M,o,a)):f?(O=rl,A=nl,M=hn(M)):(O=zr,A=Hr);let P=!1;for(const _ of O){const R=i[_];S(R)?P?i[_]=A[_]:i[_]=M[_]:P=!0}const nt=E?Ra(i,o,a):f?La(i):rr(i),st=nt||ir(i);if(st)return b.invalid(st);const $n=E?tr(i,o,a):f?nr(i):i,[Pn,w]=xt($n,l,s),k=new b({ts:Pn,zone:s,o:w,loc:r});return i.weekday&&p&&e.weekday!==k.weekday?b.invalid("mismatched weekday",`you can't specify both a weekday of ${i.weekday} and a date of ${k.toISO()}`):k.isValid?k:b.invalid(k.invalid)}static fromISO(e,n={}){const[s,r]=Cc(e);return Fe(s,r,n,"ISO 8601",e)}static fromRFC2822(e,n={}){const[s,r]=vc(e);return Fe(s,r,n,"RFC 2822",e)}static fromHTTP(e,n={}){const[s,r]=xc(e);return Fe(s,r,n,"HTTP",n)}static fromFormat(e,n,s={}){if(S(e)||S(n))throw new W("fromFormat requires an input string and a format");const{locale:r=null,numberingSystem:i=null}=s,o=x.fromOpts({locale:r,numberingSystem:i,defaultToEN:!0}),[a,c,l,f]=el(o,e,n);return f?b.invalid(f):Fe(a,c,s,`format ${n}`,e,l)}static fromString(e,n,s={}){return b.fromFormat(e,n,s)}static fromSQL(e,n={}){const[s,r]=Lc(e);return Fe(s,r,n,"SQL",e)}static invalid(e,n=null){if(!e)throw new W("need to specify a reason the DateTime is invalid");const s=e instanceof ne?e:new ne(e,n);if(I.throwOnInvalid)throw new aa(s);return new b({invalid:s})}static isDateTime(e){return e&&e.isLuxonDateTime||!1}static parseFormatForOpts(e,n={}){const s=$r(e,x.fromObject(n));return s?s.map(r=>r?r.val:null).join(""):null}static expandFormat(e,n={}){return Vr(q.parseFormat(e),x.fromObject(n)).map(r=>r.val).join("")}static resetCache(){At=void 0,Mt={}}get(e){return this[e]}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}get outputCalendar(){return this.isValid?this.loc.outputCalendar:null}get zone(){return this._zone}get zoneName(){return this.isValid?this.zone.name:null}get year(){return this.isValid?this.c.year:NaN}get quarter(){return this.isValid?Math.ceil(this.c.month/3):NaN}get month(){return this.isValid?this.c.month:NaN}get day(){return this.isValid?this.c.day:NaN}get hour(){return this.isValid?this.c.hour:NaN}get minute(){return this.isValid?this.c.minute:NaN}get second(){return this.isValid?this.c.second:NaN}get millisecond(){return this.isValid?this.c.millisecond:NaN}get weekYear(){return this.isValid?bn(this).weekYear:NaN}get weekNumber(){return this.isValid?bn(this).weekNumber:NaN}get weekday(){return this.isValid?bn(this).weekday:NaN}get isWeekend(){return this.isValid&&this.loc.getWeekendDays().includes(this.weekday)}get localWeekday(){return this.isValid?Tn(this).weekday:NaN}get localWeekNumber(){return this.isValid?Tn(this).weekNumber:NaN}get localWeekYear(){return this.isValid?Tn(this).weekYear:NaN}get ordinal(){return this.isValid?hn(this.c).ordinal:NaN}get monthShort(){return this.isValid?Nt.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?Nt.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?Nt.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?Nt.weekdays("long",{locObj:this.loc})[this.weekday-1]:null}get offset(){return this.isValid?+this.o:NaN}get offsetNameShort(){return this.isValid?this.zone.offsetName(this.ts,{format:"short",locale:this.locale}):null}get offsetNameLong(){return this.isValid?this.zone.offsetName(this.ts,{format:"long",locale:this.locale}):null}get isOffsetFixed(){return this.isValid?this.zone.isUniversal:null}get isInDST(){return this.isOffsetFixed?!1:this.offset>this.set({month:1,day:1}).offset||this.offset>this.set({month:5}).offset}getPossibleOffsets(){if(!this.isValid||this.isOffsetFixed)return[this];const e=864e5,n=6e4,s=St(this.c),r=this.zone.offset(s-e),i=this.zone.offset(s+e),o=this.zone.offset(s-r*n),a=this.zone.offset(s-i*n);if(o===a)return[this];const c=s-o*n,l=s-a*n,f=vt(c,o),d=vt(l,a);return f.hour===d.hour&&f.minute===d.minute&&f.second===d.second&&f.millisecond===d.millisecond?[be(this,{ts:c}),be(this,{ts:l})]:[this]}get isInLeapYear(){return je(this.year)}get daysInMonth(){return kt(this.year,this.month)}get daysInYear(){return this.isValid?_e(this.year):NaN}get weeksInWeekYear(){return this.isValid?Ye(this.weekYear):NaN}get weeksInLocalWeekYear(){return this.isValid?Ye(this.localWeekYear,this.loc.getMinDaysInFirstWeek(),this.loc.getStartOfWeek()):NaN}resolvedLocaleOptions(e={}){const{locale:n,numberingSystem:s,calendar:r}=q.create(this.loc.clone(e),e).resolvedOptions(this);return{locale:n,numberingSystem:s,outputCalendar:r}}toUTC(e=0,n={}){return this.setZone(H.instance(e),n)}toLocal(){return this.setZone(I.defaultZone)}setZone(e,{keepLocalTime:n=!1,keepCalendarTime:s=!1}={}){if(e=me(e,I.defaultZone),e.equals(this.zone))return this;if(e.isValid){let r=this.ts;if(n||s){const i=e.offset(this.ts),o=this.toObject();[r]=xt(o,i,e)}return be(this,{ts:r,zone:e})}else return b.invalid(Qe(e))}reconfigure({locale:e,numberingSystem:n,outputCalendar:s}={}){const r=this.loc.clone({locale:e,numberingSystem:n,outputCalendar:s});return be(this,{loc:r})}setLocale(e){return this.reconfigure({locale:e})}set(e){if(!this.isValid)return this;const n=Tt(e,Zr),{minDaysInFirstWeek:s,startOfWeek:r}=sr(n,this.loc),i=!S(n.weekYear)||!S(n.weekNumber)||!S(n.weekday),o=!S(n.ordinal),a=!S(n.year),c=!S(n.month)||!S(n.day),l=a||c,f=n.weekYear||n.weekNumber;if((l||o)&&f)throw new Ce("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(c&&o)throw new Ce("Can't mix ordinal dates with month/day");let d;i?d=tr({...wt(this.c,s,r),...n},s,r):S(n.ordinal)?(d={...this.toObject(),...n},S(n.day)&&(d.day=Math.min(kt(d.year,d.month),d.day))):d=nr({...hn(this.c),...n});const[g,p]=xt(d,this.o,this.zone);return be(this,{ts:g,o:p})}plus(e){if(!this.isValid)return this;const n=C.fromDurationLike(e);return be(this,Wr(this,n))}minus(e){if(!this.isValid)return this;const n=C.fromDurationLike(e).negate();return be(this,Wr(this,n))}startOf(e,{useLocaleWeeks:n=!1}={}){if(!this.isValid)return this;const s={},r=C.normalizeUnit(e);switch(r){case"years":s.month=1;case"quarters":case"months":s.day=1;case"weeks":case"days":s.hour=0;case"hours":s.minute=0;case"minutes":s.second=0;case"seconds":s.millisecond=0;break}if(r==="weeks")if(n){const i=this.loc.getStartOfWeek(),{weekday:o}=this;o<i&&(s.weekNumber=this.weekNumber-1),s.weekday=i}else s.weekday=1;if(r==="quarters"){const i=Math.ceil(this.month/3);s.month=(i-1)*3+1}return this.set(s)}endOf(e,n){return this.isValid?this.plus({[e]:1}).startOf(e,n).minus(1):this}toFormat(e,n={}){return this.isValid?q.create(this.loc.redefaultToEN(n)).formatDateTimeFromString(this,e):Sn}toLocaleString(e=dt,n={}){return this.isValid?q.create(this.loc.clone(n),e).formatDateTime(this):Sn}toLocaleParts(e={}){return this.isValid?q.create(this.loc.clone(e),e).formatDateTimeParts(this):[]}toISO({format:e="extended",suppressSeconds:n=!1,suppressMilliseconds:s=!1,includeOffset:r=!0,extendedZone:i=!1}={}){if(!this.isValid)return null;const o=e==="extended";let a=On(this,o);return a+="T",a+=qr(this,o,n,s,r,i),a}toISODate({format:e="extended"}={}){return this.isValid?On(this,e==="extended"):null}toISOWeekDate(){return _t(this,"kkkk-'W'WW-c")}toISOTime({suppressMilliseconds:e=!1,suppressSeconds:n=!1,includeOffset:s=!0,includePrefix:r=!1,extendedZone:i=!1,format:o="extended"}={}){return this.isValid?(r?"T":"")+qr(this,o==="extended",n,e,s,i):null}toRFC2822(){return _t(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)}toHTTP(){return _t(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")}toSQLDate(){return this.isValid?On(this,!0):null}toSQLTime({includeOffset:e=!0,includeZone:n=!1,includeOffsetSpace:s=!0}={}){let r="HH:mm:ss.SSS";return(n||e)&&(s&&(r+=" "),n?r+="z":e&&(r+="ZZ")),_t(this,r,!0)}toSQL(e={}){return this.isValid?`${this.toSQLDate()} ${this.toSQLTime(e)}`:null}toString(){return this.isValid?this.toISO():Sn}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`DateTime { ts: ${this.toISO()}, zone: ${this.zone.name}, locale: ${this.locale} }`:`DateTime { Invalid, reason: ${this.invalidReason} }`}valueOf(){return this.toMillis()}toMillis(){return this.isValid?this.ts:NaN}toSeconds(){return this.isValid?this.ts/1e3:NaN}toUnixInteger(){return this.isValid?Math.floor(this.ts/1e3):NaN}toJSON(){return this.toISO()}toBSON(){return this.toJSDate()}toObject(e={}){if(!this.isValid)return{};const n={...this.c};return e.includeConfig&&(n.outputCalendar=this.outputCalendar,n.numberingSystem=this.loc.numberingSystem,n.locale=this.loc.locale),n}toJSDate(){return new Date(this.isValid?this.ts:NaN)}diff(e,n="milliseconds",s={}){if(!this.isValid||!e.isValid)return C.invalid("created by diffing an invalid DateTime");const r={locale:this.locale,numberingSystem:this.numberingSystem,...s},i=Ba(n).map(C.normalizeUnit),o=e.valueOf()>this.valueOf(),a=o?this:e,c=o?e:this,l=Wc(a,c,i,r);return o?l.negate():l}diffNow(e="milliseconds",n={}){return this.diff(b.now(),e,n)}until(e){return this.isValid?D.fromDateTimes(this,e):this}hasSame(e,n,s){if(!this.isValid)return!1;const r=e.valueOf(),i=this.setZone(e.zone,{keepLocalTime:!0});return i.startOf(n,s)<=r&&r<=i.endOf(n,s)}equals(e){return this.isValid&&e.isValid&&this.valueOf()===e.valueOf()&&this.zone.equals(e.zone)&&this.loc.equals(e.loc)}toRelative(e={}){if(!this.isValid)return null;const n=e.base||b.fromObject({},{zone:this.zone}),s=e.padding?this<n?-e.padding:e.padding:0;let r=["years","months","days","hours","minutes","seconds"],i=e.unit;return Array.isArray(e.unit)&&(r=e.unit,i=void 0),Yr(n,this.plus(s),{...e,numeric:"always",units:r,unit:i})}toRelativeCalendar(e={}){return this.isValid?Yr(e.base||b.fromObject({},{zone:this.zone}),this,{...e,numeric:"auto",units:["years","months","days"],calendary:!0}):null}static min(...e){if(!e.every(b.isDateTime))throw new W("min requires all arguments be DateTimes");return cr(e,n=>n.valueOf(),Math.min)}static max(...e){if(!e.every(b.isDateTime))throw new W("max requires all arguments be DateTimes");return cr(e,n=>n.valueOf(),Math.max)}static fromFormatExplain(e,n,s={}){const{locale:r=null,numberingSystem:i=null}=s,o=x.fromOpts({locale:r,numberingSystem:i,defaultToEN:!0});return Br(o,e,n)}static fromStringExplain(e,n,s={}){return b.fromFormatExplain(e,n,s)}static buildFormatParser(e,n={}){const{locale:s=null,numberingSystem:r=null}=n,i=x.fromOpts({locale:s,numberingSystem:r,defaultToEN:!0});return new Fr(i,e)}static fromFormatParser(e,n,s={}){if(S(e)||S(n))throw new W("fromFormatParser requires an input string and a format parser");const{locale:r=null,numberingSystem:i=null}=s,o=x.fromOpts({locale:r,numberingSystem:i,defaultToEN:!0});if(!o.equals(n.locale))throw new W(`fromFormatParser called with a locale of ${o}, but the format parser was created for ${n.locale}`);const{result:a,zone:c,specificOffset:l,invalidReason:f}=n.explainFromTokens(e);return f?b.invalid(f):Fe(a,c,s,`format ${n.format}`,e,l)}static get DATE_SHORT(){return dt}static get DATE_MED(){return Ss}static get DATE_MED_WITH_WEEKDAY(){return ua}static get DATE_FULL(){return bs}static get DATE_HUGE(){return Ts}static get TIME_SIMPLE(){return Os}static get TIME_WITH_SECONDS(){return Ns}static get TIME_WITH_SHORT_OFFSET(){return Cs}static get TIME_WITH_LONG_OFFSET(){return vs}static get TIME_24_SIMPLE(){return xs}static get TIME_24_WITH_SECONDS(){return _s}static get TIME_24_WITH_SHORT_OFFSET(){return As}static get TIME_24_WITH_LONG_OFFSET(){return Ms}static get DATETIME_SHORT(){return Is}static get DATETIME_SHORT_WITH_SECONDS(){return Ds}static get DATETIME_MED(){return Rs}static get DATETIME_MED_WITH_SECONDS(){return Ls}static get DATETIME_MED_WITH_WEEKDAY(){return fa}static get DATETIME_FULL(){return Vs}static get DATETIME_FULL_WITH_SECONDS(){return Fs}static get DATETIME_HUGE(){return Bs}static get DATETIME_HUGE_WITH_SECONDS(){return $s}}function Xe(t){if(b.isDateTime(t))return t;if(t&&t.valueOf&&pe(t.valueOf()))return b.fromJSDate(t);if(t&&typeof t=="object")return b.fromObject(t);throw new W(`Unknown datetime argument: ${t}, of type ${typeof t}`)}const al={},cl={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},ll=[u.createElementVNode("path",{fill:"rgb(248 113 113)",d:"M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zm0-384c13.3 0 24 10.7 24 24V264c0 13.3-10.7 24-24 24s-24-10.7-24-24V152c0-13.3 10.7-24 24-24zM224 352a32 32 0 1 1 64 0 32 32 0 1 1 -64 0z"},null,-1)];function ul(t,e){return u.openBlock(),u.createElementBlock("svg",cl,ll)}const fl=X(al,[["render",ul]]),hl=t=>(u.pushScopeId("data-v-492c3d62"),t=t(),u.popScopeId(),t),dl={class:"messages-container-list"},ml={class:"message-container"},pl={key:0,class:"btn-container-widget"},yl=["onClick"],gl={class:"chat-message"},wl={key:0,class:"flex gap-2"},El=hl(()=>u.createElementVNode("div",null,[u.createElementVNode("strong",{style:{display:"block","margin-bottom":"0.5rem"}},"Ayúdanos a mejorar nuestro servicio."),u.createElementVNode("span",null,"Que le pareció la atención:")],-1)),kl=["onClick"],Sl={class:"flex flex-col items-center"},bl={class:"icon"},Tl=["innerHTML"],Ol={class:"detail-message flex justify-content-between"},Nl={key:0,class:"mr-5"},Cl={key:1,class:"mr-5"},vl=X(u.defineComponent({__name:"MessageList",props:{messages:{type:Array,default:()=>[]},canLoadMoreMessages:{type:Boolean,default:!1}},emits:["loadMore","retry","onQualifying"],setup(t,{emit:e}){const n=t,s=u.ref(),{pause:r,resume:i}=oa(s,([{isIntersecting:l}])=>{l&&e("loadMore")});u.onBeforeMount(()=>{n.canLoadMoreMessages||r()}),u.watch(()=>n.canLoadMoreMessages,l=>{if(l){i();return}r()});const o={BOLD:{regex:/\*(.+?)\*(?!\*)/g,tag:"<strong--custom-tag>{val}</strong--custom-tag>"},ITALIC:{regex:/_(.+?)_/,tag:"<i--custom-tag>{val}</i--custom-tag>"},CROSSED_OUT:{regex:/~(.+?)~(?!~)/g,tag:"<del--custom-tag>{val}</del--custom-tag>"},URL:{regex:/(http?s?:\/\/[^\s]+)/g,tag:'<a--custom-tag href="{val}" target="_blank">{val}</a--custom-tag>'}};function a(l){const f=Object.values(o);return!f||Array.isArray(f)&&f.length===0?l:f.reduce((g,p)=>g.replace(p.regex,(m,E)=>/--custom-tag/.test(m)?m:p.tag.replace(/{val}/g,E)),l).replace(/--custom-tag/g,"")}const c=[{label:"Excelente",value:1,icon:"😊"},{label:"Buena",value:2,icon:"😄"},{label:"Aceptable",value:3,icon:"🙂"},{label:"Mala",value:4,icon:"😐"},{label:"Muy Mala",value:5,icon:"🙁"}];return(l,f)=>(u.openBlock(),u.createElementBlock(u.Fragment,null,[u.createElementVNode("div",{ref_key:"target",ref:s,class:"target"},null,512),u.createElementVNode("div",dl,[(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(n.messages,d=>{var g,p;return u.openBlock(),u.createElementBlock("div",{key:d.id,class:u.normalizeClass(["message",d.esCliente?"message-right":"message-left"])},[u.createElementVNode("div",ml,[d.error&&d.esCliente?(u.openBlock(),u.createElementBlock("div",pl,[u.createElementVNode("button",{text:"",rounded:"",class:"btn-danger",icon:"fa-solid fa-circle-exclamation","aria-label":"Cancel",onClick:m=>e("retry",d)},[u.createVNode(fl)],8,yl)])):u.createCommentVNode("",!0),u.createElementVNode("div",gl,[u.createElementVNode("div",{class:u.normalizeClass(["bubble",d.esCliente?"right":"left"])},[u.createElementVNode("div",{class:u.normalizeClass(d.esCliente?"content-right":"content-left")},[d.message==="😊😄🙂😐🙁"?(u.openBlock(),u.createElementBlock("div",wl,[El,(u.openBlock(),u.createElementBlock(u.Fragment,null,u.renderList(c,m=>u.createElementVNode("a",{href:"javascript:",class:"btn-icon",key:m.value,onClick:E=>e("onQualifying",{message:d,emoji:m})},[u.createElementVNode("div",Sl,[u.createElementVNode("div",bl,u.toDisplayString(m.icon),1),u.createElementVNode("span",null,u.toDisplayString(m.label),1)])],8,kl)),64))])):(u.openBlock(),u.createElementBlock("div",{key:1,class:"message-text",style:{"white-space":"pre-line"},innerHTML:a(d.message)},null,8,Tl)),u.createElementVNode("div",Ol,[(g=d.sender)!=null&&g.nombreCompleto?(u.openBlock(),u.createElementBlock("span",Nl,u.toDisplayString(d.esCliente?(p=d.sender)==null?void 0:p.nombreCompleto:"ECOSISTEMA JL"),1)):(u.openBlock(),u.createElementBlock("span",Cl)),u.createElementVNode("span",null,u.toDisplayString(u.unref(b).fromISO(d.createdAt).toFormat("dd-MM-yyyy HH:mm")),1)])],2)],2)])])],2)}),128))])],64))}}),[["__scopeId","data-v-492c3d62"]]),xl={},Gr=t=>(u.pushScopeId("data-v-d9a6b2b7"),t=t(),u.popScopeId(),t),_l={viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",style:{width:"28px",height:"28px"}},Al=[Gr(()=>u.createElementVNode("path",{d:"M12,1A11,11,0,1,0,23,12,11,11,0,0,0,12,1Zm0,19a8,8,0,1,1,8-8A8,8,0,0,1,12,20Z",opacity:".25"},null,-1)),Gr(()=>u.createElementVNode("path",{d:"M10.14,1.16a11,11,0,0,0-9,8.92A1.59,1.59,0,0,0,2.46,12,1.52,1.52,0,0,0,4.11,10.7a8,8,0,0,1,6.66-6.61A1.42,1.42,0,0,0,12,2.69h0A1.57,1.57,0,0,0,10.14,1.16Z",class:"spinner_ajPY"},null,-1))];function Ml(t,e){return u.openBlock(),u.createElementBlock("svg",_l,Al)}const Il=X(xl,[["render",Ml],["__scopeId","data-v-d9a6b2b7"]]);function Kr(t,e,n){for(let s=t.length-1;s>=0;s--)if(t[s][e]===n)return s;return-1}const ae=Object.create(null);ae.open="0",ae.close="1",ae.ping="2",ae.pong="3",ae.message="4",ae.upgrade="5",ae.noop="6";const It=Object.create(null);Object.keys(ae).forEach(t=>{It[ae[t]]=t});const Nn={type:"error",data:"parser error"},Qr=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",Xr=typeof ArrayBuffer=="function",ei=t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t&&t.buffer instanceof ArrayBuffer,Cn=({type:t,data:e},n,s)=>Qr&&e instanceof Blob?n?s(e):ti(e,s):Xr&&(e instanceof ArrayBuffer||ei(e))?n?s(e):ti(new Blob([e]),s):s(ae[t]+(e||"")),ti=(t,e)=>{const n=new FileReader;return n.onload=function(){const s=n.result.split(",")[1];e("b"+(s||""))},n.readAsDataURL(t)};function ni(t){return t instanceof Uint8Array?t:t instanceof ArrayBuffer?new Uint8Array(t):new Uint8Array(t.buffer,t.byteOffset,t.byteLength)}let vn;function Dl(t,e){if(Qr&&t.data instanceof Blob)return t.data.arrayBuffer().then(ni).then(e);if(Xr&&(t.data instanceof ArrayBuffer||ei(t.data)))return e(ni(t.data));Cn(t,!1,n=>{vn||(vn=new TextEncoder),e(vn.encode(n))})}const si="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",et=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let t=0;t<si.length;t++)et[si.charCodeAt(t)]=t;const Rl=t=>{let e=t.length*.75,n=t.length,s,r=0,i,o,a,c;t[t.length-1]==="="&&(e--,t[t.length-2]==="="&&e--);const l=new ArrayBuffer(e),f=new Uint8Array(l);for(s=0;s<n;s+=4)i=et[t.charCodeAt(s)],o=et[t.charCodeAt(s+1)],a=et[t.charCodeAt(s+2)],c=et[t.charCodeAt(s+3)],f[r++]=i<<2|o>>4,f[r++]=(o&15)<<4|a>>2,f[r++]=(a&3)<<6|c&63;return l},Ll=typeof ArrayBuffer=="function",xn=(t,e)=>{if(typeof t!="string")return{type:"message",data:ri(t,e)};const n=t.charAt(0);return n==="b"?{type:"message",data:Vl(t.substring(1),e)}:It[n]?t.length>1?{type:It[n],data:t.substring(1)}:{type:It[n]}:Nn},Vl=(t,e)=>{if(Ll){const n=Rl(t);return ri(n,e)}else return{base64:!0,data:t}},ri=(t,e)=>{switch(e){case"blob":return t instanceof Blob?t:new Blob([t]);case"arraybuffer":default:return t instanceof ArrayBuffer?t:t.buffer}},ii="",Fl=(t,e)=>{const n=t.length,s=new Array(n);let r=0;t.forEach((i,o)=>{Cn(i,!1,a=>{s[o]=a,++r===n&&e(s.join(ii))})})},Bl=(t,e)=>{const n=t.split(ii),s=[];for(let r=0;r<n.length;r++){const i=xn(n[r],e);if(s.push(i),i.type==="error")break}return s};function $l(){return new TransformStream({transform(t,e){Dl(t,n=>{const s=n.length;let r;if(s<126)r=new Uint8Array(1),new DataView(r.buffer).setUint8(0,s);else if(s<65536){r=new Uint8Array(3);const i=new DataView(r.buffer);i.setUint8(0,126),i.setUint16(1,s)}else{r=new Uint8Array(9);const i=new DataView(r.buffer);i.setUint8(0,127),i.setBigUint64(1,BigInt(s))}t.data&&typeof t.data!="string"&&(r[0]|=128),e.enqueue(r),e.enqueue(n)})}})}let _n;function Dt(t){return t.reduce((e,n)=>e+n.length,0)}function Rt(t,e){if(t[0].length===e)return t.shift();const n=new Uint8Array(e);let s=0;for(let r=0;r<e;r++)n[r]=t[0][s++],s===t[0].length&&(t.shift(),s=0);return t.length&&s<t[0].length&&(t[0]=t[0].slice(s)),n}function Pl(t,e){_n||(_n=new TextDecoder);const n=[];let s=0,r=-1,i=!1;return new TransformStream({transform(o,a){for(n.push(o);;){if(s===0){if(Dt(n)<1)break;const c=Rt(n,1);i=(c[0]&128)===128,r=c[0]&127,r<126?s=3:r===126?s=1:s=2}else if(s===1){if(Dt(n)<2)break;const c=Rt(n,2);r=new DataView(c.buffer,c.byteOffset,c.length).getUint16(0),s=3}else if(s===2){if(Dt(n)<8)break;const c=Rt(n,8),l=new DataView(c.buffer,c.byteOffset,c.length),f=l.getUint32(0);if(f>Math.pow(2,21)-1){a.enqueue(Nn);break}r=f*Math.pow(2,32)+l.getUint32(4),s=3}else{if(Dt(n)<r)break;const c=Rt(n,r);a.enqueue(xn(i?c:_n.decode(c),e)),s=0}if(r===0||r>t){a.enqueue(Nn);break}}}})}const oi=4;function F(t){if(t)return Ul(t)}function Ul(t){for(var e in F.prototype)t[e]=F.prototype[e];return t}F.prototype.on=F.prototype.addEventListener=function(t,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(e),this},F.prototype.once=function(t,e){function n(){this.off(t,n),e.apply(this,arguments)}return n.fn=e,this.on(t,n),this},F.prototype.off=F.prototype.removeListener=F.prototype.removeAllListeners=F.prototype.removeEventListener=function(t,e){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var n=this._callbacks["$"+t];if(!n)return this;if(arguments.length==1)return delete this._callbacks["$"+t],this;for(var s,r=0;r<n.length;r++)if(s=n[r],s===e||s.fn===e){n.splice(r,1);break}return n.length===0&&delete this._callbacks["$"+t],this},F.prototype.emit=function(t){this._callbacks=this._callbacks||{};for(var e=new Array(arguments.length-1),n=this._callbacks["$"+t],s=1;s<arguments.length;s++)e[s-1]=arguments[s];if(n){n=n.slice(0);for(var s=0,r=n.length;s<r;++s)n[s].apply(this,e)}return this},F.prototype.emitReserved=F.prototype.emit,F.prototype.listeners=function(t){return this._callbacks=this._callbacks||{},this._callbacks["$"+t]||[]},F.prototype.hasListeners=function(t){return!!this.listeners(t).length};const Q=typeof self<"u"?self:typeof window<"u"?window:Function("return this")();function ai(t,...e){return e.reduce((n,s)=>(t.hasOwnProperty(s)&&(n[s]=t[s]),n),{})}const Wl=Q.setTimeout,ql=Q.clearTimeout;function Lt(t,e){e.useNativeTimers?(t.setTimeoutFn=Wl.bind(Q),t.clearTimeoutFn=ql.bind(Q)):(t.setTimeoutFn=Q.setTimeout.bind(Q),t.clearTimeoutFn=Q.clearTimeout.bind(Q))}const Hl=1.33;function zl(t){return typeof t=="string"?Zl(t):Math.ceil((t.byteLength||t.size)*Hl)}function Zl(t){let e=0,n=0;for(let s=0,r=t.length;s<r;s++)e=t.charCodeAt(s),e<128?n+=1:e<2048?n+=2:e<55296||e>=57344?n+=3:(s++,n+=4);return n}function jl(t){let e="";for(let n in t)t.hasOwnProperty(n)&&(e.length&&(e+="&"),e+=encodeURIComponent(n)+"="+encodeURIComponent(t[n]));return e}function Yl(t){let e={},n=t.split("&");for(let s=0,r=n.length;s<r;s++){let i=n[s].split("=");e[decodeURIComponent(i[0])]=decodeURIComponent(i[1])}return e}class Jl extends Error{constructor(e,n,s){super(e),this.description=n,this.context=s,this.type="TransportError"}}class An extends F{constructor(e){super(),this.writable=!1,Lt(this,e),this.opts=e,this.query=e.query,this.socket=e.socket}onError(e,n,s){return super.emitReserved("error",new Jl(e,n,s)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(e){this.readyState==="open"&&this.write(e)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(e){const n=xn(e,this.socket.binaryType);this.onPacket(n)}onPacket(e){super.emitReserved("packet",e)}onClose(e){this.readyState="closed",super.emitReserved("close",e)}pause(e){}createUri(e,n={}){return e+"://"+this._hostname()+this._port()+this.opts.path+this._query(n)}_hostname(){const e=this.opts.hostname;return e.indexOf(":")===-1?e:"["+e+"]"}_port(){return this.opts.port&&(this.opts.secure&&+(this.opts.port!==443)||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(e){const n=jl(e);return n.length?"?"+n:""}}const ci="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),Mn=64,Gl={};let li=0,Vt=0,ui;function fi(t){let e="";do e=ci[t%Mn]+e,t=Math.floor(t/Mn);while(t>0);return e}function hi(){const t=fi(+new Date);return t!==ui?(li=0,ui=t):t+"."+fi(li++)}for(;Vt<Mn;Vt++)Gl[ci[Vt]]=Vt;let di=!1;try{di=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const Kl=di;function mi(t){const e=t.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!e||Kl))return new XMLHttpRequest}catch{}if(!e)try{return new Q[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}function wf(){}function Ql(){}const Xl=function(){return new mi({xdomain:!1}).responseType!=null}();class eu extends An{constructor(e){if(super(e),this.polling=!1,typeof location<"u"){const s=location.protocol==="https:";let r=location.port;r||(r=s?"443":"80"),this.xd=typeof location<"u"&&e.hostname!==location.hostname||r!==e.port}const n=e&&e.forceBase64;this.supportsBinary=Xl&&!n,this.opts.withCredentials&&(this.cookieJar=void 0)}get name(){return"polling"}doOpen(){this.poll()}pause(e){this.readyState="pausing";const n=()=>{this.readyState="paused",e()};if(this.polling||!this.writable){let s=0;this.polling&&(s++,this.once("pollComplete",function(){--s||n()})),this.writable||(s++,this.once("drain",function(){--s||n()}))}else n()}poll(){this.polling=!0,this.doPoll(),this.emitReserved("poll")}onData(e){const n=s=>{if(this.readyState==="opening"&&s.type==="open"&&this.onOpen(),s.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(s)};Bl(e,this.socket.binaryType).forEach(n),this.readyState!=="closed"&&(this.polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this.poll())}doClose(){const e=()=>{this.write([{type:"close"}])};this.readyState==="open"?e():this.once("open",e)}write(e){this.writable=!1,Fl(e,n=>{this.doWrite(n,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const e=this.opts.secure?"https":"http",n=this.query||{};return this.opts.timestampRequests!==!1&&(n[this.opts.timestampParam]=hi()),!this.supportsBinary&&!n.sid&&(n.b64=1),this.createUri(e,n)}request(e={}){return Object.assign(e,{xd:this.xd,cookieJar:this.cookieJar},this.opts),new ce(this.uri(),e)}doWrite(e,n){const s=this.request({method:"POST",data:e});s.on("success",n),s.on("error",(r,i)=>{this.onError("xhr post error",r,i)})}doPoll(){const e=this.request();e.on("data",this.onData.bind(this)),e.on("error",(n,s)=>{this.onError("xhr poll error",n,s)}),this.pollXhr=e}}class ce extends F{constructor(e,n){super(),Lt(this,n),this.opts=n,this.method=n.method||"GET",this.uri=e,this.data=n.data!==void 0?n.data:null,this.create()}create(){var e;const n=ai(this.opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");n.xdomain=!!this.opts.xd;const s=this.xhr=new mi(n);try{s.open(this.method,this.uri,!0);try{if(this.opts.extraHeaders){s.setDisableHeaderCheck&&s.setDisableHeaderCheck(!0);for(let r in this.opts.extraHeaders)this.opts.extraHeaders.hasOwnProperty(r)&&s.setRequestHeader(r,this.opts.extraHeaders[r])}}catch{}if(this.method==="POST")try{s.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{s.setRequestHeader("Accept","*/*")}catch{}(e=this.opts.cookieJar)===null||e===void 0||e.addCookies(s),"withCredentials"in s&&(s.withCredentials=this.opts.withCredentials),this.opts.requestTimeout&&(s.timeout=this.opts.requestTimeout),s.onreadystatechange=()=>{var r;s.readyState===3&&((r=this.opts.cookieJar)===null||r===void 0||r.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(r){this.setTimeoutFn(()=>{this.onError(r)},0);return}typeof document<"u"&&(this.index=ce.requestsCount++,ce.requests[this.index]=this)}onError(e){this.emitReserved("error",e,this.xhr),this.cleanup(!0)}cleanup(e){if(!(typeof this.xhr>"u"||this.xhr===null)){if(this.xhr.onreadystatechange=Ql,e)try{this.xhr.abort()}catch{}typeof document<"u"&&delete ce.requests[this.index],this.xhr=null}}onLoad(){const e=this.xhr.responseText;e!==null&&(this.emitReserved("data",e),this.emitReserved("success"),this.cleanup())}abort(){this.cleanup()}}if(ce.requestsCount=0,ce.requests={},typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",pi);else if(typeof addEventListener=="function"){const t="onpagehide"in Q?"pagehide":"unload";addEventListener(t,pi,!1)}}function pi(){for(let t in ce.requests)ce.requests.hasOwnProperty(t)&&ce.requests[t].abort()}const In=typeof Promise=="function"&&typeof Promise.resolve=="function"?e=>Promise.resolve().then(e):(e,n)=>n(e,0),Ft=Q.WebSocket||Q.MozWebSocket,yi=!0,tu="arraybuffer",gi=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class nu extends An{constructor(e){super(e),this.supportsBinary=!e.forceBase64}get name(){return"websocket"}doOpen(){if(!this.check())return;const e=this.uri(),n=this.opts.protocols,s=gi?{}:ai(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=yi&&!gi?n?new Ft(e,n):new Ft(e):new Ft(e,n,s)}catch(r){return this.emitReserved("error",r)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=e=>this.onClose({description:"websocket connection closed",context:e}),this.ws.onmessage=e=>this.onData(e.data),this.ws.onerror=e=>this.onError("websocket error",e)}write(e){this.writable=!1;for(let n=0;n<e.length;n++){const s=e[n],r=n===e.length-1;Cn(s,this.supportsBinary,i=>{const o={};try{yi&&this.ws.send(i)}catch{}r&&In(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.close(),this.ws=null)}uri(){const e=this.opts.secure?"wss":"ws",n=this.query||{};return this.opts.timestampRequests&&(n[this.opts.timestampParam]=hi()),this.supportsBinary||(n.b64=1),this.createUri(e,n)}check(){return!!Ft}}class su extends An{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(e=>{this.onError("webtransport error",e)}),this.transport.ready.then(()=>{this.transport.createBidirectionalStream().then(e=>{const n=Pl(Number.MAX_SAFE_INTEGER,this.socket.binaryType),s=e.readable.pipeThrough(n).getReader(),r=$l();r.readable.pipeTo(e.writable),this.writer=r.writable.getWriter();const i=()=>{s.read().then(({done:a,value:c})=>{a||(this.onPacket(c),i())}).catch(a=>{})};i();const o={type:"open"};this.query.sid&&(o.data=`{"sid":"${this.query.sid}"}`),this.writer.write(o).then(()=>this.onOpen())})}))}write(e){this.writable=!1;for(let n=0;n<e.length;n++){const s=e[n],r=n===e.length-1;this.writer.write(s).then(()=>{r&&In(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var e;(e=this.transport)===null||e===void 0||e.close()}}const ru={websocket:nu,webtransport:su,polling:eu},iu=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,ou=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function Dn(t){const e=t,n=t.indexOf("["),s=t.indexOf("]");n!=-1&&s!=-1&&(t=t.substring(0,n)+t.substring(n,s).replace(/:/g,";")+t.substring(s,t.length));let r=iu.exec(t||""),i={},o=14;for(;o--;)i[ou[o]]=r[o]||"";return n!=-1&&s!=-1&&(i.source=e,i.host=i.host.substring(1,i.host.length-1).replace(/;/g,":"),i.authority=i.authority.replace("[","").replace("]","").replace(/;/g,":"),i.ipv6uri=!0),i.pathNames=au(i,i.path),i.queryKey=cu(i,i.query),i}function au(t,e){const n=/\/{2,9}/g,s=e.replace(n,"/").split("/");return(e.slice(0,1)=="/"||e.length===0)&&s.splice(0,1),e.slice(-1)=="/"&&s.splice(s.length-1,1),s}function cu(t,e){const n={};return e.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(s,r,i){r&&(n[r]=i)}),n}let wi=class $e extends F{constructor(e,n={}){super(),this.binaryType=tu,this.writeBuffer=[],e&&typeof e=="object"&&(n=e,e=null),e?(e=Dn(e),n.hostname=e.host,n.secure=e.protocol==="https"||e.protocol==="wss",n.port=e.port,e.query&&(n.query=e.query)):n.host&&(n.hostname=Dn(n.host).host),Lt(this,n),this.secure=n.secure!=null?n.secure:typeof location<"u"&&location.protocol==="https:",n.hostname&&!n.port&&(n.port=this.secure?"443":"80"),this.hostname=n.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=n.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=n.transports||["polling","websocket","webtransport"],this.writeBuffer=[],this.prevBufferLen=0,this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},n),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=Yl(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(e){const n=Object.assign({},this.opts.query);n.EIO=oi,n.transport=e,this.id&&(n.sid=this.id);const s=Object.assign({},this.opts,{query:n,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[e]);return new ru[e](s)}open(){let e;if(this.opts.rememberUpgrade&&$e.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1)e="websocket";else if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}else e=this.transports[0];this.readyState="opening";try{e=this.createTransport(e)}catch{this.transports.shift(),this.open();return}e.open(),this.setTransport(e)}setTransport(e){this.transport&&this.transport.removeAllListeners(),this.transport=e,e.on("drain",this.onDrain.bind(this)).on("packet",this.onPacket.bind(this)).on("error",this.onError.bind(this)).on("close",n=>this.onClose("transport close",n))}probe(e){let n=this.createTransport(e),s=!1;$e.priorWebsocketSuccess=!1;const r=()=>{s||(n.send([{type:"ping",data:"probe"}]),n.once("packet",d=>{if(!s)if(d.type==="pong"&&d.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;$e.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{s||this.readyState!=="closed"&&(f(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{const g=new Error("probe error");g.transport=n.name,this.emitReserved("upgradeError",g)}}))};function i(){s||(s=!0,f(),n.close(),n=null)}const o=d=>{const g=new Error("probe error: "+d);g.transport=n.name,i(),this.emitReserved("upgradeError",g)};function a(){o("transport closed")}function c(){o("socket closed")}function l(d){n&&d.name!==n.name&&i()}const f=()=>{n.removeListener("open",r),n.removeListener("error",o),n.removeListener("close",a),this.off("close",c),this.off("upgrading",l)};n.once("open",r),n.once("error",o),n.once("close",a),this.once("close",c),this.once("upgrading",l),this.upgrades.indexOf("webtransport")!==-1&&e!=="webtransport"?this.setTimeoutFn(()=>{s||n.open()},200):n.open()}onOpen(){if(this.readyState="open",$e.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush(),this.readyState==="open"&&this.opts.upgrade){let e=0;const n=this.upgrades.length;for(;e<n;e++)this.probe(this.upgrades[e])}}onPacket(e){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",e),this.emitReserved("heartbeat"),this.resetPingTimeout(),e.type){case"open":this.onHandshake(JSON.parse(e.data));break;case"ping":this.sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong");break;case"error":const n=new Error("server error");n.code=e.data,this.onError(n);break;case"message":this.emitReserved("data",e.data),this.emitReserved("message",e.data);break}}onHandshake(e){this.emitReserved("handshake",e),this.id=e.sid,this.transport.query.sid=e.sid,this.upgrades=this.filterUpgrades(e.upgrades),this.pingInterval=e.pingInterval,this.pingTimeout=e.pingTimeout,this.maxPayload=e.maxPayload,this.onOpen(),this.readyState!=="closed"&&this.resetPingTimeout()}resetPingTimeout(){this.clearTimeoutFn(this.pingTimeoutTimer),this.pingTimeoutTimer=this.setTimeoutFn(()=>{this.onClose("ping timeout")},this.pingInterval+this.pingTimeout),this.opts.autoUnref&&this.pingTimeoutTimer.unref()}onDrain(){this.writeBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const e=this.getWritablePackets();this.transport.send(e),this.prevBufferLen=e.length,this.emitReserved("flush")}}getWritablePackets(){if(!(this.maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let n=1;for(let s=0;s<this.writeBuffer.length;s++){const r=this.writeBuffer[s].data;if(r&&(n+=zl(r)),s>0&&n>this.maxPayload)return this.writeBuffer.slice(0,s);n+=2}return this.writeBuffer}write(e,n,s){return this.sendPacket("message",e,n,s),this}send(e,n,s){return this.sendPacket("message",e,n,s),this}sendPacket(e,n,s,r){if(typeof n=="function"&&(r=n,n=void 0),typeof s=="function"&&(r=s,s=null),this.readyState==="closing"||this.readyState==="closed")return;s=s||{},s.compress=s.compress!==!1;const i={type:e,data:n,options:s};this.emitReserved("packetCreate",i),this.writeBuffer.push(i),r&&this.once("flush",r),this.flush()}close(){const e=()=>{this.onClose("forced close"),this.transport.close()},n=()=>{this.off("upgrade",n),this.off("upgradeError",n),e()},s=()=>{this.once("upgrade",n),this.once("upgradeError",n)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?s():e()}):this.upgrading?s():e()),this}onError(e){$e.priorWebsocketSuccess=!1,this.emitReserved("error",e),this.onClose("transport error",e)}onClose(e,n){(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")&&(this.clearTimeoutFn(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),typeof removeEventListener=="function"&&(removeEventListener("beforeunload",this.beforeunloadEventListener,!1),removeEventListener("offline",this.offlineEventListener,!1)),this.readyState="closed",this.id=null,this.emitReserved("close",e,n),this.writeBuffer=[],this.prevBufferLen=0)}filterUpgrades(e){const n=[];let s=0;const r=e.length;for(;s<r;s++)~this.transports.indexOf(e[s])&&n.push(e[s]);return n}};wi.protocol=oi;function lu(t,e="",n){let s=t;n=n||typeof location<"u"&&location,t==null&&(t=n.protocol+"//"+n.host),typeof t=="string"&&(t.charAt(0)==="/"&&(t.charAt(1)==="/"?t=n.protocol+t:t=n.host+t),/^(https?|wss?):\/\//.test(t)||(typeof n<"u"?t=n.protocol+"//"+t:t="https://"+t),s=Dn(t)),s.port||(/^(http|ws)$/.test(s.protocol)?s.port="80":/^(http|ws)s$/.test(s.protocol)&&(s.port="443")),s.path=s.path||"/";const i=s.host.indexOf(":")!==-1?"["+s.host+"]":s.host;return s.id=s.protocol+"://"+i+":"+s.port+e,s.href=s.protocol+"://"+i+(n&&n.port===s.port?"":":"+s.port),s}const uu=typeof ArrayBuffer=="function",fu=t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t.buffer instanceof ArrayBuffer,Ei=Object.prototype.toString,hu=typeof Blob=="function"||typeof Blob<"u"&&Ei.call(Blob)==="[object BlobConstructor]",du=typeof File=="function"||typeof File<"u"&&Ei.call(File)==="[object FileConstructor]";function Rn(t){return uu&&(t instanceof ArrayBuffer||fu(t))||hu&&t instanceof Blob||du&&t instanceof File}function Bt(t,e){if(!t||typeof t!="object")return!1;if(Array.isArray(t)){for(let n=0,s=t.length;n<s;n++)if(Bt(t[n]))return!0;return!1}if(Rn(t))return!0;if(t.toJSON&&typeof t.toJSON=="function"&&arguments.length===1)return Bt(t.toJSON(),!0);for(const n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&Bt(t[n]))return!0;return!1}function mu(t){const e=[],n=t.data,s=t;return s.data=Ln(n,e),s.attachments=e.length,{packet:s,buffers:e}}function Ln(t,e){if(!t)return t;if(Rn(t)){const n={_placeholder:!0,num:e.length};return e.push(t),n}else if(Array.isArray(t)){const n=new Array(t.length);for(let s=0;s<t.length;s++)n[s]=Ln(t[s],e);return n}else if(typeof t=="object"&&!(t instanceof Date)){const n={};for(const s in t)Object.prototype.hasOwnProperty.call(t,s)&&(n[s]=Ln(t[s],e));return n}return t}function pu(t,e){return t.data=Vn(t.data,e),delete t.attachments,t}function Vn(t,e){if(!t)return t;if(t&&t._placeholder===!0){if(typeof t.num=="number"&&t.num>=0&&t.num<e.length)return e[t.num];throw new Error("illegal attachments")}else if(Array.isArray(t))for(let n=0;n<t.length;n++)t[n]=Vn(t[n],e);else if(typeof t=="object")for(const n in t)Object.prototype.hasOwnProperty.call(t,n)&&(t[n]=Vn(t[n],e));return t}const yu=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],gu=5;var T;(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"})(T||(T={}));class wu{constructor(e){this.replacer=e}encode(e){return(e.type===T.EVENT||e.type===T.ACK)&&Bt(e)?this.encodeAsBinary({type:e.type===T.EVENT?T.BINARY_EVENT:T.BINARY_ACK,nsp:e.nsp,data:e.data,id:e.id}):[this.encodeAsString(e)]}encodeAsString(e){let n=""+e.type;return(e.type===T.BINARY_EVENT||e.type===T.BINARY_ACK)&&(n+=e.attachments+"-"),e.nsp&&e.nsp!=="/"&&(n+=e.nsp+","),e.id!=null&&(n+=e.id),e.data!=null&&(n+=JSON.stringify(e.data,this.replacer)),n}encodeAsBinary(e){const n=mu(e),s=this.encodeAsString(n.packet),r=n.buffers;return r.unshift(s),r}}function ki(t){return Object.prototype.toString.call(t)==="[object Object]"}class Fn extends F{constructor(e){super(),this.reviver=e}add(e){let n;if(typeof e=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");n=this.decodeString(e);const s=n.type===T.BINARY_EVENT;s||n.type===T.BINARY_ACK?(n.type=s?T.EVENT:T.ACK,this.reconstructor=new Eu(n),n.attachments===0&&super.emitReserved("decoded",n)):super.emitReserved("decoded",n)}else if(Rn(e)||e.base64)if(this.reconstructor)n=this.reconstructor.takeBinaryData(e),n&&(this.reconstructor=null,super.emitReserved("decoded",n));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+e)}decodeString(e){let n=0;const s={type:Number(e.charAt(0))};if(T[s.type]===void 0)throw new Error("unknown packet type "+s.type);if(s.type===T.BINARY_EVENT||s.type===T.BINARY_ACK){const i=n+1;for(;e.charAt(++n)!=="-"&&n!=e.length;);const o=e.substring(i,n);if(o!=Number(o)||e.charAt(n)!=="-")throw new Error("Illegal attachments");s.attachments=Number(o)}if(e.charAt(n+1)==="/"){const i=n+1;for(;++n&&!(e.charAt(n)===","||n===e.length););s.nsp=e.substring(i,n)}else s.nsp="/";const r=e.charAt(n+1);if(r!==""&&Number(r)==r){const i=n+1;for(;++n;){const o=e.charAt(n);if(o==null||Number(o)!=o){--n;break}if(n===e.length)break}s.id=Number(e.substring(i,n+1))}if(e.charAt(++n)){const i=this.tryParse(e.substr(n));if(Fn.isPayloadValid(s.type,i))s.data=i;else throw new Error("invalid payload")}return s}tryParse(e){try{return JSON.parse(e,this.reviver)}catch{return!1}}static isPayloadValid(e,n){switch(e){case T.CONNECT:return ki(n);case T.DISCONNECT:return n===void 0;case T.CONNECT_ERROR:return typeof n=="string"||ki(n);case T.EVENT:case T.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&yu.indexOf(n[0])===-1);case T.ACK:case T.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class Eu{constructor(e){this.packet=e,this.buffers=[],this.reconPack=e}takeBinaryData(e){if(this.buffers.push(e),this.buffers.length===this.reconPack.attachments){const n=pu(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const ku=Object.freeze(Object.defineProperty({__proto__:null,Decoder:Fn,Encoder:wu,get PacketType(){return T},protocol:gu},Symbol.toStringTag,{value:"Module"}));function re(t,e,n){return t.on(e,n),function(){t.off(e,n)}}const Su=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class Si extends F{constructor(e,n,s){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=e,this.nsp=n,s&&s.auth&&(this.auth=s.auth),this._opts=Object.assign({},s),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const e=this.io;this.subs=[re(e,"open",this.onopen.bind(this)),re(e,"packet",this.onpacket.bind(this)),re(e,"error",this.onerror.bind(this)),re(e,"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(...e){return e.unshift("message"),this.emit.apply(this,e),this}emit(e,...n){if(Su.hasOwnProperty(e))throw new Error('"'+e.toString()+'" is a reserved event name');if(n.unshift(e),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(n),this;const s={type:T.EVENT,data:n};if(s.options={},s.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){const o=this.ids++,a=n.pop();this._registerAckCallback(o,a),s.id=o}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(s),this.packet(s)):this.sendBuffer.push(s)),this.flags={},this}_registerAckCallback(e,n){var s;const r=(s=this.flags.timeout)!==null&&s!==void 0?s:this._opts.ackTimeout;if(r===void 0){this.acks[e]=n;return}const i=this.io.setTimeoutFn(()=>{delete this.acks[e];for(let o=0;o<this.sendBuffer.length;o++)this.sendBuffer[o].id===e&&this.sendBuffer.splice(o,1);n.call(this,new Error("operation has timed out"))},r);this.acks[e]=(...o)=>{this.io.clearTimeoutFn(i),n.apply(this,[null,...o])}}emitWithAck(e,...n){const s=this.flags.timeout!==void 0||this._opts.ackTimeout!==void 0;return new Promise((r,i)=>{n.push((o,a)=>s?o?i(o):r(a):r(o)),this.emit(e,...n)})}_addToQueue(e){let n;typeof e[e.length-1]=="function"&&(n=e.pop());const s={id:this._queueSeq++,tryCount:0,pending:!1,args:e,flags:Object.assign({fromQueue:!0},this.flags)};e.push((r,...i)=>s!==this._queue[0]?void 0:(r!==null?s.tryCount>this._opts.retries&&(this._queue.shift(),n&&n(r)):(this._queue.shift(),n&&n(null,...i)),s.pending=!1,this._drainQueue())),this._queue.push(s),this._drainQueue()}_drainQueue(e=!1){if(!this.connected||this._queue.length===0)return;const n=this._queue[0];n.pending&&!e||(n.pending=!0,n.tryCount++,this.flags=n.flags,this.emit.apply(this,n.args))}packet(e){e.nsp=this.nsp,this.io._packet(e)}onopen(){typeof this.auth=="function"?this.auth(e=>{this._sendConnectPacket(e)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(e){this.packet({type:T.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},e):e})}onerror(e){this.connected||this.emitReserved("connect_error",e)}onclose(e,n){this.connected=!1,delete this.id,this.emitReserved("disconnect",e,n)}onpacket(e){if(e.nsp===this.nsp)switch(e.type){case T.CONNECT:e.data&&e.data.sid?this.onconnect(e.data.sid,e.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 T.EVENT:case T.BINARY_EVENT:this.onevent(e);break;case T.ACK:case T.BINARY_ACK:this.onack(e);break;case T.DISCONNECT:this.ondisconnect();break;case T.CONNECT_ERROR:this.destroy();const s=new Error(e.data.message);s.data=e.data.data,this.emitReserved("connect_error",s);break}}onevent(e){const n=e.data||[];e.id!=null&&n.push(this.ack(e.id)),this.connected?this.emitEvent(n):this.receiveBuffer.push(Object.freeze(n))}emitEvent(e){if(this._anyListeners&&this._anyListeners.length){const n=this._anyListeners.slice();for(const s of n)s.apply(this,e)}super.emit.apply(this,e),this._pid&&e.length&&typeof e[e.length-1]=="string"&&(this._lastOffset=e[e.length-1])}ack(e){const n=this;let s=!1;return function(...r){s||(s=!0,n.packet({type:T.ACK,id:e,data:r}))}}onack(e){const n=this.acks[e.id];typeof n=="function"&&(n.apply(this,e.data),delete this.acks[e.id])}onconnect(e,n){this.id=e,this.recovered=n&&this._pid===n,this._pid=n,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach(e=>this.emitEvent(e)),this.receiveBuffer=[],this.sendBuffer.forEach(e=>{this.notifyOutgoingListeners(e),this.packet(e)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(e=>e()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:T.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(e){return this.flags.compress=e,this}get volatile(){return this.flags.volatile=!0,this}timeout(e){return this.flags.timeout=e,this}onAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(e),this}prependAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(e),this}offAny(e){if(!this._anyListeners)return this;if(e){const n=this._anyListeners;for(let s=0;s<n.length;s++)if(e===n[s])return n.splice(s,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(e),this}prependAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(e),this}offAnyOutgoing(e){if(!this._anyOutgoingListeners)return this;if(e){const n=this._anyOutgoingListeners;for(let s=0;s<n.length;s++)if(e===n[s])return n.splice(s,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(e){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const n=this._anyOutgoingListeners.slice();for(const s of n)s.apply(this,e.data)}}}function Be(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}Be.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=Math.floor(e*10)&1?t+n:t-n}return Math.min(t,this.max)|0},Be.prototype.reset=function(){this.attempts=0},Be.prototype.setMin=function(t){this.ms=t},Be.prototype.setMax=function(t){this.max=t},Be.prototype.setJitter=function(t){this.jitter=t};class Bn extends F{constructor(e,n){var s;super(),this.nsps={},this.subs=[],e&&typeof e=="object"&&(n=e,e=void 0),n=n||{},n.path=n.path||"/socket.io",this.opts=n,Lt(this,n),this.reconnection(n.reconnection!==!1),this.reconnectionAttempts(n.reconnectionAttempts||1/0),this.reconnectionDelay(n.reconnectionDelay||1e3),this.reconnectionDelayMax(n.reconnectionDelayMax||5e3),this.randomizationFactor((s=n.randomizationFactor)!==null&&s!==void 0?s:.5),this.backoff=new Be({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(n.timeout==null?2e4:n.timeout),this._readyState="closed",this.uri=e;const r=n.parser||ku;this.encoder=new r.Encoder,this.decoder=new r.Decoder,this._autoConnect=n.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(e){return arguments.length?(this._reconnection=!!e,this):this._reconnection}reconnectionAttempts(e){return e===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=e,this)}reconnectionDelay(e){var n;return e===void 0?this._reconnectionDelay:(this._reconnectionDelay=e,(n=this.backoff)===null||n===void 0||n.setMin(e),this)}randomizationFactor(e){var n;return e===void 0?this._randomizationFactor:(this._randomizationFactor=e,(n=this.backoff)===null||n===void 0||n.setJitter(e),this)}reconnectionDelayMax(e){var n;return e===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=e,(n=this.backoff)===null||n===void 0||n.setMax(e),this)}timeout(e){return arguments.length?(this._timeout=e,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(e){if(~this._readyState.indexOf("open"))return this;this.engine=new wi(this.uri,this.opts);const n=this.engine,s=this;this._readyState="opening",this.skipReconnect=!1;const r=re(n,"open",function(){s.onopen(),e&&e()}),i=a=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",a),e?e(a):this.maybeReconnectOnOpen()},o=re(n,"error",i);if(this._timeout!==!1){const a=this._timeout,c=this.setTimeoutFn(()=>{r(),i(new Error("timeout")),n.close()},a);this.opts.autoUnref&&c.unref(),this.subs.push(()=>{this.clearTimeoutFn(c)})}return this.subs.push(r),this.subs.push(o),this}connect(e){return this.open(e)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const e=this.engine;this.subs.push(re(e,"ping",this.onping.bind(this)),re(e,"data",this.ondata.bind(this)),re(e,"error",this.onerror.bind(this)),re(e,"close",this.onclose.bind(this)),re(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(e){try{this.decoder.add(e)}catch(n){this.onclose("parse error",n)}}ondecoded(e){In(()=>{this.emitReserved("packet",e)},this.setTimeoutFn)}onerror(e){this.emitReserved("error",e)}socket(e,n){let s=this.nsps[e];return s?this._autoConnect&&!s.active&&s.connect():(s=new Si(this,e,n),this.nsps[e]=s),s}_destroy(e){const n=Object.keys(this.nsps);for(const s of n)if(this.nsps[s].active)return;this._close()}_packet(e){const n=this.encoder.encode(e);for(let s=0;s<n.length;s++)this.engine.write(n[s],e.options)}cleanup(){this.subs.forEach(e=>e()),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(e,n){this.cleanup(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",e,n),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const e=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const n=this.backoff.duration();this._reconnecting=!0;const s=this.setTimeoutFn(()=>{e.skipReconnect||(this.emitReserved("reconnect_attempt",e.backoff.attempts),!e.skipReconnect&&e.open(r=>{r?(e._reconnecting=!1,e.reconnect(),this.emitReserved("reconnect_error",r)):e.onreconnect()}))},n);this.opts.autoUnref&&s.unref(),this.subs.push(()=>{this.clearTimeoutFn(s)})}}onreconnect(){const e=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",e)}}const tt={};function $t(t,e){typeof t=="object"&&(e=t,t=void 0),e=e||{};const n=lu(t,e.path||"/socket.io"),s=n.source,r=n.id,i=n.path,o=tt[r]&&i in tt[r].nsps,a=e.forceNew||e["force new connection"]||e.multiplex===!1||o;let c;return a?c=new Bn(s,e):(tt[r]||(tt[r]=new Bn(s,e)),c=tt[r]),n.query&&!e.query&&(e.query=n.queryKey),c.socket(n.path,e)}Object.assign($t,{Manager:Bn,Socket:Si,io:$t,connect:$t});var bi=(t=>(t.WEBCHAT="webchat",t.CENTRAL="central",t.WHATSAPP="whatsapp",t.TELEGRAM="telegram",t.SMS="sms",t))(bi||{});const bu={class:"widget"},Tu={class:"header-widget"},Ou={class:"title-chat"},Nu={key:0,class:"loader"},Cu={class:"w-full"},vu=["onSubmit"],xu={class:"form-message"},_u={class:"jl-inputgroup-chat"},Au=["onKeyup"],Mu={type:"submit",class:"pointer btn-primary"},Iu=14,Du=X(u.defineComponent({__name:"Chat",props:{titlePrincipal:{type:String,default:"Comunicación en linea para consultas"},toggleChat:{type:Function,required:!0},tokenAuth:{type:String,required:!0},user:{type:Object,required:!0},visible:{type:Boolean,required:!0}},emits:["show-toast","show-confirm","new-message","clear-new-messages","not-viewed-total","onQualifying"],setup(t,{emit:e}){const n=t,s=u.ref(""),r=u.ref(0),i=u.ref({data:[],canLoadMoreMessages:!1}),o=u.ref(""),a=u.ref(!1),c=u.ref(null);u.watch(()=>n.visible,async w=>{if(!w||(e("clear-new-messages"),m(),r.value>0&&ws(o.value,n.tokenAuth),o.value))return;const k=await gs(n.tokenAuth);k&&(o.value=k.appChat.id)});function l(w){var k;if(st.value){A();return}if(w.key==="Enter"&&w.shiftKey){const _=((k=w.target)==null?void 0:k.value)||"";w.target.value=_+`
4
+ `,A();return}f()}const f=async w=>{var R,B,L;if(((R=s.value)==null?void 0:R.length)>300){e("show-toast",{severity:"warn",summary:"Error",detail:"El mensaje no puede superar los 300 caracteres",life:5e3});return}if(!s.value.trim()){e("show-toast",{severity:"warn",summary:"Error",detail:"Por favor ingrese un mensaje",life:5e3});return}const k={id:_i(),chatId:(L=(B=P.value)==null?void 0:B.chat)==null?void 0:L.id,message:s.value,visto:!0,multimedia:!1,esCliente:!0,appChatId:o.value,createdAt:new Date().toISOString(),updatedAt:new Date().toISOString(),sender:{nombreCompleto:n.user.nombreCompleto,ci:n.user.ci,msPersonaId:n.user.msPersonaId}},_=i.value.data.push(k)-1;d(s.value,o.value).then(z=>{var le,rt;if(!z)i.value.data[_].error={error:!0,id:k.id},e("show-toast",{severity:"error",summary:"Error",detail:"Ocurrio un error al enviar el mensaje, intente nuevamente",life:5e3});else{i.value.data[_]=z;const Pt={...z,chatId:k.chatId};(rt=M.value)==null||rt.emit("sendMessage",{roomId:(le=P==null?void 0:P.value)==null?void 0:le.appChat.id,message:Pt},Ut=>{console.log("🚀 ~ socketService.value.emit ~ response:",Ut)})}}),s.value="",m(),O.value&&(O.value.style.height="20px")},d=async(w,k)=>Qo({esCliente:!0,message:w,appChatId:k},n.tokenAuth),g=async()=>{var R,B,L;const w=(R=i.value.data[0])==null?void 0:R.id,k={lastMessagesId:w,appChatId:o.value,limit:10};a.value=!0;const _=await Ko({body:k,token:n.tokenAuth});a.value=!1,i.value.data.unshift(..._.data.sort((z,le)=>-le.createdAt.localeCompare(z.createdAt))),i.value.canLoadMoreMessages=_.pagination.total>_.pagination.size,w&&((B=c.value)!=null&&B.scrollHeight)&&E((L=c.value)==null?void 0:L.scrollHeight),w||m()},p=async w=>{e("show-confirm",async()=>{var _,R,B;if(!((_=w.error)!=null&&_.id))return;const k=await d(w.message,o.value);if(!k)e("show-toast",{severity:"error",summary:"Error",detail:"Ocurrio un error al enviar el mensaje, intente nuevamente",life:5e3});else{const L=Kr(i.value.data,"id",w.error.id);i.value.data[L]={...k,error:void 0},(B=M.value)==null||B.emit("sendMessage",{roomId:(R=P==null?void 0:P.value)==null?void 0:R.appChat.id,message:w})}m()})},m=()=>{u.nextTick(()=>{c.value&&(c.value.scrollTop=c.value.scrollHeight)})},E=w=>{u.nextTick(()=>{const k=c.value;k&&(k.scrollTop=k.scrollHeight-w)})},O=u.ref();function A(){O.value&&(O.value.style.height=O.value.scrollHeight-Iu+"px",O.value.scrollHeight!==O.value.clientHeight&&(O.value.style.height=O.value.scrollHeight+"px"))}const M=u.ref(),P=u.ref();function nt(w,k=bi.WEBCHAT){var _,R;if(!w)throw new Error("user chat is required");M.value=$t(window.VITE_SOCKET_URI,{query:{usuarioId:`${(R=(_=w==null?void 0:w.chat)==null?void 0:_.persona)==null?void 0:R.funcionarioId}`,aplicacion:k},extraHeaders:{Authorization:n.tokenAuth}}),M.value.removeAllListeners(),M.value.on("connect",()=>{var B,L;console.log("Conectado al servidor de sockets"),(L=M.value)==null||L.emit("joinRoom",`${(B=w==null?void 0:w.appChat)==null?void 0:B.id}`)}),M.value.on("disconnect",()=>{console.log("Desconectado del servidor de sockets")}),M.value.on("receiveMessage",B=>{var L,z;console.log("Mensaje recibido:",B.message,w),B.message.sender.msPersonaId!==((z=(L=w==null?void 0:w.chat)==null?void 0:L.persona)==null?void 0:z.msPersonaId)&&(i.value.data.push(B.message),ws(B.message.appChatId,n.tokenAuth),m(),!n.visible&&e("new-message"))})}const st=u.computed(()=>["Android","iPhone"].includes($n()));function $n(){var z,le;const w=window.navigator.userAgent,k=((le=(z=window.navigator)==null?void 0:z.userAgentData)==null?void 0:le.platform)||window.navigator.platform,_=["macOS","Macintosh","MacIntel","MacPPC","Mac68K"],R=["Win32","Win64","Windows","WinCE"],B=["iPhone","iPad","iPod"];let L=null;return _.indexOf(k)!==-1?L="Mac OS":B.indexOf(k)!==-1?L="iPhone":R.indexOf(k)!==-1?L="Windows":/Android/.test(w)?L="Android":/Linux/.test(k)&&(L="Linux"),L}function Pn({message:w,emoji:k}){e("onQualifying",async()=>{var z,le,rt,Pt,Ut,Ti,Oi,Ni;if(!w.id||!k)return;const R=Kr(i.value.data,"id",w.id);let B=(le=(z=i.value)==null?void 0:z.data)==null?void 0:le[R].message;if((Pt=(rt=i.value)==null?void 0:rt.data)!=null&&Pt[R]&&(i.value.data[R].message=k.icon),!await Xo(w.id,{message:k.icon,tipoCalificacionId:k.value},n.tokenAuth)){(Ti=(Ut=i.value)==null?void 0:Ut.data)!=null&&Ti[R]&&(i.value.data[R].message=B),e("show-toast",{severity:"error",summary:"Error",detail:"Ocurrio un error al enviar el mensaje, intente nuevamente",life:5e3});return}(Ni=M.value)==null||Ni.emit("sendMessage",{roomId:(Oi=P==null?void 0:P.value)==null?void 0:Oi.appChat.id,message:w})})}return u.onMounted(async()=>{if(o.value)return;const w=await gs(n.tokenAuth);w&&(P.value=w,o.value=w.appChat.id,r.value=w.appChat.totalNoVistosCliente,nt(w),g(),e("not-viewed-total",w.appChat.totalNoVistosCliente))}),u.onUnmounted(()=>{var w;(w=M.value)==null||w.off()}),(w,k)=>(u.openBlock(),u.createElementBlock("div",bu,[u.createElementVNode("div",Tu,[u.createElementVNode("h4",Ou,u.toDisplayString(t.titlePrincipal),1),u.createElementVNode("button",{onClick:k[0]||(k[0]=()=>t.toggleChat()),class:"btn-close"},[u.createVNode(Ri,{class:"pointer"})])]),u.createElementVNode("div",{class:"messages-container",ref_key:"messageContainerRef",ref:c},[a.value?(u.openBlock(),u.createElementBlock("div",Nu,[u.createVNode(Il)])):u.createCommentVNode("",!0),u.createVNode(vl,{messages:i.value.data,canLoadMoreMessages:i.value.canLoadMoreMessages,onLoadMore:g,onRetry:p,onOnQualifying:k[1]||(k[1]=_=>Pn(_))},null,8,["messages","canLoadMoreMessages"])],512),u.createElementVNode("div",Cu,[u.createElementVNode("form",{class:"message-send",onSubmit:u.withModifiers(f,["prevent"])},[u.createElementVNode("div",xu,[u.createElementVNode("div",_u,[u.withDirectives(u.createElementVNode("textarea",{"onUpdate:modelValue":k[2]||(k[2]=_=>s.value=_),class:"jl2-input-chat",required:"",ref_key:"textAreaRef",ref:O,onInput:k[3]||(k[3]=()=>A()),onKeydown:k[4]||(k[4]=u.withKeys(_=>{!st.value&&_.preventDefault()},["enter"])),onKeyup:u.withKeys(l,["enter"])},null,40,Au),[[u.vModelText,s.value]]),u.createElementVNode("button",Mu,[u.createVNode($i,{style:{width:"20px",height:"20px"}})])])])],40,vu)])]))}}),[["__scopeId","data-v-d28d6b2a"]]),Ru={},Lu={width:"87",height:"87",viewBox:"0 0 87 87",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Vu=[u.createStaticVNode('<g filter="url(#filter0_d_4007_3488)"><path d="M43.5 77C64.2107 77 81 60.2107 81 39.5C81 18.7893 64.2107 2 43.5 2C22.7893 2 6 18.7893 6 39.5C6 60.2107 22.7893 77 43.5 77Z" fill="white" stroke="#F28B0C" stroke-width="3" stroke-miterlimit="10"></path><path d="M39.705 38.885C40.6908 38.885 41.49 38.0858 41.49 37.1C41.49 36.1142 40.6908 35.315 39.705 35.315C38.7192 35.315 37.92 36.1142 37.92 37.1C37.92 38.0858 38.7192 38.885 39.705 38.885Z" fill="#F28B0C"></path><path d="M45.075 38.885C46.0608 38.885 46.86 38.0858 46.86 37.1C46.86 36.1142 46.0608 35.315 45.075 35.315C44.0892 35.315 43.29 36.1142 43.29 37.1C43.29 38.0858 44.0892 38.885 45.075 38.885Z" fill="#F28B0C"></path><path d="M50.445 38.885C51.4308 38.885 52.23 38.0858 52.23 37.1C52.23 36.1142 51.4308 35.315 50.445 35.315C49.4592 35.315 48.66 36.1142 48.66 37.1C48.66 38.0858 49.4592 38.885 50.445 38.885Z" fill="#F28B0C"></path><path d="M63.27 58.235L58.755 47.78C61.125 44.765 62.415 40.97 62.415 37.175C62.415 26.435 52.665 18.185 41.925 20.12C39.99 19.325 37.98 18.905 35.835 18.905C26.955 18.905 19.785 26.135 19.785 34.955C19.785 38.54 21 41.975 23.145 44.765L18.99 54.44C18.84 54.8 18.915 55.235 19.2 55.445C19.485 55.73 19.92 55.73 20.205 55.595L30.6 50.15C31.89 50.585 33.255 50.87 34.68 50.945C39.48 54.53 45.57 55.25 50.655 53.45L61.905 59.33C62.265 59.48 62.625 59.48 62.91 59.18C63.345 58.97 63.405 58.61 63.27 58.25V58.235ZM51.24 51.71C51.03 51.56 50.745 51.56 50.52 51.635C48.795 52.28 46.935 52.64 45.15 52.64C36.69 52.64 29.61 45.755 29.61 37.1C29.61 29.72 34.845 23.345 42.075 21.845C51.75 19.91 60.705 27.29 60.705 37.1C60.705 40.685 59.415 44.27 57.12 46.985C56.91 47.27 56.835 47.63 56.97 47.915L60.69 56.585L51.24 51.71Z" fill="#F28B0C"></path></g><defs><filter id="filter0_d_4007_3488" x="0.5" y="0.5" width="86" height="86" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="4"></feOffset><feGaussianBlur stdDeviation="2"></feGaussianBlur><feComposite in2="hardAlpha" operator="out"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"></feColorMatrix><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_4007_3488"></feBlend><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_4007_3488" result="shape"></feBlend></filter></defs>',2)];function Fu(t,e){return u.openBlock(),u.createElementBlock("svg",Lu,Vu)}const Bu=X(Ru,[["render",Fu]]),$u={},Pu={viewBox:"0 0 256 256",version:"1.1",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",preserveAspectRatio:"xMidYMid"},Uu=[u.createElementVNode("g",null,[u.createElementVNode("path",{d:"M128,0 C57.307,0 0,57.307 0,128 L0,128 C0,198.693 57.307,256 128,256 L128,256 C198.693,256 256,198.693 256,128 L256,128 C256,57.307 198.693,0 128,0 L128,0 Z",fill:"#40B3E0"}),u.createElementVNode("path",{d:"M190.2826,73.6308 L167.4206,188.8978 C167.4206,188.8978 164.2236,196.8918 155.4306,193.0548 L102.6726,152.6068 L83.4886,143.3348 L51.1946,132.4628 C51.1946,132.4628 46.2386,130.7048 45.7586,126.8678 C45.2796,123.0308 51.3546,120.9528 51.3546,120.9528 L179.7306,70.5928 C179.7306,70.5928 190.2826,65.9568 190.2826,73.6308",fill:"#FFFFFF"}),u.createElementVNode("path",{d:"M98.6178,187.6035 C98.6178,187.6035 97.0778,187.4595 95.1588,181.3835 C93.2408,175.3085 83.4888,143.3345 83.4888,143.3345 L161.0258,94.0945 C161.0258,94.0945 165.5028,91.3765 165.3428,94.0945 C165.3428,94.0945 166.1418,94.5735 163.7438,96.8115 C161.3458,99.0505 102.8328,151.6475 102.8328,151.6475",fill:"#D2E5F1"}),u.createElementVNode("path",{d:"M122.9015,168.1154 L102.0335,187.1414 C102.0335,187.1414 100.4025,188.3794 98.6175,187.6034 L102.6135,152.2624",fill:"#B5CFE4"})],-1)];function Wu(t,e){return u.openBlock(),u.createElementBlock("svg",Pu,Uu)}const qu=X($u,[["render",Wu]]),Hu={},zu={version:"1.1",id:"Capa_1",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 455.731 455.731","xml:space":"preserve"},Zu=[u.createElementVNode("g",null,[u.createElementVNode("rect",{x:"0",y:"0",style:{fill:"#1bd741"},width:"455.731",height:"455.731"}),u.createElementVNode("g",null,[u.createElementVNode("path",{style:{fill:"#ffffff"},d:`M68.494,387.41l22.323-79.284c-14.355-24.387-21.913-52.134-21.913-80.638
5
5
  c0-87.765,71.402-159.167,159.167-159.167s159.166,71.402,159.166,159.167c0,87.765-71.401,159.167-159.166,159.167
6
6
  c-27.347,0-54.125-7-77.814-20.292L68.494,387.41z M154.437,337.406l4.872,2.975c20.654,12.609,44.432,19.274,68.762,19.274
7
7
  c72.877,0,132.166-59.29,132.166-132.167S300.948,95.321,228.071,95.321S95.904,154.611,95.904,227.488
@@ -10,7 +10,7 @@
10
10
  c15.575,4.404,27.827,1.435,37.28-4.612c7.487-4.789,12.648-12.476,14.508-21.166l1.649-7.702c0.524-2.448-0.719-4.932-2.993-5.98
11
11
  l-34.905-16.089c-2.266-1.044-4.953-0.384-6.477,1.591l-13.703,17.764c-1.035,1.342-2.807,1.874-4.407,1.312
12
12
  c-9.384-3.298-40.818-16.463-58.066-49.687c-0.748-1.441-0.562-3.19,0.499-4.419l13.096-15.15
13
- c1.338-1.547,1.676-3.722,0.872-5.602l-15.046-35.201C187.187,154.774,185.392,153.518,183.359,153.407z`})])],-1)];function Ru(t,e){return u.openBlock(),u.createElementBlock("svg",Du,Iu)}const Lu=X(Mu,[["render",Ru]]),Vu={},Fu={version:"1.1",id:"Capa_1",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"-10 -10 78 78","xml:space":"preserve"},Bu=[u.createElementVNode("g",null,[u.createElementVNode("path",{style:{fill:"orange"},d:`M29,1.5c-16.016,0-29,11.641-29,26c0,5.292,1.768,10.211,4.796,14.318
13
+ c1.338-1.547,1.676-3.722,0.872-5.602l-15.046-35.201C187.187,154.774,185.392,153.518,183.359,153.407z`})])],-1)];function ju(t,e){return u.openBlock(),u.createElementBlock("svg",zu,Zu)}const Yu=X(Hu,[["render",ju]]),Ju={},Gu={version:"1.1",id:"Capa_1",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"-10 -10 78 78","xml:space":"preserve"},Ku=[u.createElementVNode("g",null,[u.createElementVNode("path",{style:{fill:"orange"},d:`M29,1.5c-16.016,0-29,11.641-29,26c0,5.292,1.768,10.211,4.796,14.318
14
14
  C4.398,46.563,3.254,53.246,0,56.5c0,0,9.943-1.395,16.677-5.462c0.007,0.003,0.015,0.006,0.022,0.009
15
15
  c2.764-1.801,5.532-3.656,6.105-4.126c0.3-0.421,0.879-0.548,1.33-0.277c0.296,0.178,0.483,0.503,0.489,0.848
16
- c0.01,0.622-0.005,0.784-5.585,4.421C22.146,52.933,25.498,53.5,29,53.5c16.016,0,29-11.641,29-26S45.016,1.5,29,1.5z`}),u.createElementVNode("circle",{style:{fill:"#ffffff"},cx:"15",cy:"27.5",r:"3"}),u.createElementVNode("circle",{style:{fill:"#ffffff"},cx:"29",cy:"27.5",r:"3"}),u.createElementVNode("circle",{style:{fill:"#ffffff"},cx:"43",cy:"27.5",r:"3"})],-1)];function $u(t,e){return u.openBlock(),u.createElementBlock("svg",Fu,Bu)}const Uu=X(Vu,[["render",$u]]),Pu={key:0,id:"chat-circle",class:"widget-container"},Wu={key:0,class:"new-message-badge"},qu={class:"chat-box"},Hu=X(u.defineComponent({__name:"Widget",props:{tokenAuth:{type:String,required:!0},titlePrincipal:{type:String},user:{type:Object,required:!0},isDarkMode:{type:Boolean,default:!1}},emits:["show-toast","show-confirm"],setup(t,{emit:e}){const n=t;function s(c){var d;const l=((d=window.VITE_CELLPHONE_NUMBERS)==null?void 0:d.split(","))??[];if(l.length===0){console.warn("not found cellphone numbers");return}o.value=!1;const f=Math.floor(Math.random()*l.length);if(c===0){window.open("https://wa.me/"+l[f],"WhatsApp","noopener");return}window.open("https://t.me/+"+l[f],"Telegram","noopener")}const r=u.ref(!1),i=u.ref(0),o=u.ref(!1),a=()=>{r.value=!r.value};return(c,l)=>(u.openBlock(),u.createElementBlock("div",{class:u.normalizeClass(["widget-css-reset widget-container",t.isDarkMode?"chat-dark-mode":""])},[n.tokenAuth.length>10?u.withDirectives((u.openBlock(),u.createElementBlock("div",Pu,[u.createElementVNode("div",{class:u.normalizeClass(["container-buttons-chat",{active:o.value}])},[u.createElementVNode("a",{href:"javascript:;",class:"button whatsapp",onClick:l[0]||(l[0]=f=>s(0))},[u.createVNode(Lu)]),u.createElementVNode("a",{href:"javascript:;",class:"button telegram",onClick:l[1]||(l[1]=f=>s(1))},[u.createVNode(Au)]),u.createElementVNode("a",{href:"javascript:;",class:u.normalizeClass(["button webchat",{disabled:n.tokenAuth.length<10}]),title:"Debe estar autenticado",onClick:l[2]||(l[2]=f=>o.value&&n.tokenAuth.length>10&&a())},[u.createVNode(Uu)],2)],2),i.value?(u.openBlock(),u.createElementBlock("div",Wu,u.toDisplayString(i.value>9?"9+":i.value),1)):u.createCommentVNode("",!0),u.createElementVNode("a",{href:"javascript:;",onClick:l[3]||(l[3]=f=>n.tokenAuth.length>10&&a())},[u.createVNode(Nu)])],512)),[[u.vShow,!r.value]]):u.createCommentVNode("",!0),u.withDirectives(u.createElementVNode("div",qu,[t.tokenAuth?(u.openBlock(),u.createBlock(ku,{key:0,visible:r.value,titlePrincipal:t.titlePrincipal,toggleChat:a,tokenAuth:t.tokenAuth,user:t.user,onShowToast:l[4]||(l[4]=f=>e("show-toast",f)),onShowConfirm:l[5]||(l[5]=f=>e("show-confirm",f)),onClearNewMessages:l[6]||(l[6]=f=>i.value=0),onNewMessage:l[7]||(l[7]=()=>i.value++),onNotViewedTotal:l[8]||(l[8]=f=>i.value=f)},null,8,["visible","titlePrincipal","tokenAuth","user"])):u.createCommentVNode("",!0)],512),[[u.vShow,r.value]])],2))}}),[["__scopeId","data-v-f9d10772"]]),zu={install(t,e){window.VITE_BACKEND_URL=e.VITE_BACKEND_URL,window.VITE_SOCKET_URI=e.VITE_SOCKET_URI,window.VITE_CELLPHONE_NUMBERS=e.VITE_CELLPHONE_NUMBERS}};ue.Widget=Hu,ue.default=zu,Object.defineProperties(ue,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
16
+ c0.01,0.622-0.005,0.784-5.585,4.421C22.146,52.933,25.498,53.5,29,53.5c16.016,0,29-11.641,29-26S45.016,1.5,29,1.5z`}),u.createElementVNode("circle",{style:{fill:"#ffffff"},cx:"15",cy:"27.5",r:"3"}),u.createElementVNode("circle",{style:{fill:"#ffffff"},cx:"29",cy:"27.5",r:"3"}),u.createElementVNode("circle",{style:{fill:"#ffffff"},cx:"43",cy:"27.5",r:"3"})],-1)];function Qu(t,e){return u.openBlock(),u.createElementBlock("svg",Gu,Ku)}const Xu=X(Ju,[["render",Qu]]),ef={key:0,id:"chat-circle",class:"widget-container"},tf={key:0,class:"new-message-badge"},nf={class:"chat-box"},sf=X(u.defineComponent({__name:"Widget",props:{tokenAuth:{type:String,required:!0},titlePrincipal:{type:String},user:{type:Object,required:!0},isDarkMode:{type:Boolean,default:!1}},emits:["show-toast","show-confirm","onQualifying"],setup(t,{emit:e}){const n=t;function s(c){var d;const l=((d=window.VITE_CELLPHONE_NUMBERS)==null?void 0:d.split(","))??[];if(l.length===0){console.warn("not found cellphone numbers");return}o.value=!1;const f=Math.floor(Math.random()*l.length);if(c===0){window.open("https://wa.me/"+l[f],"WhatsApp","noopener");return}window.open("https://t.me/+"+l[f],"Telegram","noopener")}const r=u.ref(!1),i=u.ref(0),o=u.ref(!1),a=()=>{r.value=!r.value};return(c,l)=>(u.openBlock(),u.createElementBlock("div",{class:u.normalizeClass(["widget-css-reset widget-container",t.isDarkMode?"chat-dark-mode":""])},[n.tokenAuth.length>10?u.withDirectives((u.openBlock(),u.createElementBlock("div",ef,[u.createElementVNode("div",{class:u.normalizeClass(["container-buttons-chat",{active:o.value}])},[u.createElementVNode("a",{href:"javascript:;",class:"button whatsapp",onClick:l[0]||(l[0]=f=>s(0))},[u.createVNode(Yu)]),u.createElementVNode("a",{href:"javascript:;",class:"button telegram",onClick:l[1]||(l[1]=f=>s(1))},[u.createVNode(qu)]),u.createElementVNode("a",{href:"javascript:;",class:u.normalizeClass(["button webchat",{disabled:n.tokenAuth.length<10}]),title:"Debe estar autenticado",onClick:l[2]||(l[2]=f=>o.value&&n.tokenAuth.length>10&&a())},[u.createVNode(Xu)],2)],2),i.value?(u.openBlock(),u.createElementBlock("div",tf,u.toDisplayString(i.value>9?"9+":i.value),1)):u.createCommentVNode("",!0),u.createElementVNode("a",{href:"javascript:;",onClick:l[3]||(l[3]=f=>n.tokenAuth.length>10&&a())},[u.createVNode(Bu)])],512)),[[u.vShow,!r.value]]):u.createCommentVNode("",!0),u.withDirectives(u.createElementVNode("div",nf,[t.tokenAuth?(u.openBlock(),u.createBlock(Du,{key:0,visible:r.value,titlePrincipal:t.titlePrincipal,toggleChat:a,tokenAuth:t.tokenAuth,user:t.user,onShowToast:l[4]||(l[4]=f=>e("show-toast",f)),onShowConfirm:l[5]||(l[5]=f=>e("show-confirm",f)),onClearNewMessages:l[6]||(l[6]=f=>i.value=0),onNewMessage:l[7]||(l[7]=()=>i.value++),onNotViewedTotal:l[8]||(l[8]=f=>i.value=f),onOnQualifying:l[9]||(l[9]=f=>e("onQualifying",f))},null,8,["visible","titlePrincipal","tokenAuth","user"])):u.createCommentVNode("",!0)],512),[[u.vShow,r.value]])],2))}}),[["__scopeId","data-v-c7da0c7e"]]),rf={install(t,e){window.VITE_BACKEND_URL=e.VITE_BACKEND_URL,window.VITE_SOCKET_URI=e.VITE_SOCKET_URI,window.VITE_CELLPHONE_NUMBERS=e.VITE_CELLPHONE_NUMBERS}};fe.Widget=sf,fe.default=rf,Object.defineProperties(fe,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});