function li(e,t){return function(){return e.apply(t,arguments)}}const{toString:rc}=Object.prototype,{getPrototypeOf:Ln}=Object,Et=(e=>t=>{const n=rc.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),ae=e=>(e=e.toLowerCase(),t=>Et(t)===e),Tt=e=>t=>typeof t===e,{isArray:Ne}=Array,Ve=Tt("undefined");function ic(e){return e!==null&&!Ve(e)&&e.constructor!==null&&!Ve(e.constructor)&&Z(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const hi=ae("ArrayBuffer");function sc(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&hi(e.buffer),t}const oc=Tt("string"),Z=Tt("function"),fi=Tt("number"),At=e=>e!==null&&typeof e=="object",ac=e=>e===!0||e===!1,gt=e=>{if(Et(e)!=="object")return!1;const t=Ln(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},cc=ae("Date"),uc=ae("File"),lc=ae("Blob"),hc=ae("FileList"),fc=e=>At(e)&&Z(e.pipe),dc=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||Z(e.append)&&((t=Et(e))==="formdata"||t==="object"&&Z(e.toString)&&e.toString()==="[object FormData]"))},pc=ae("URLSearchParams"),gc=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Ye(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,s;if(typeof e!="object"&&(e=[e]),Ne(e))for(r=0,s=e.length;r0;)if(s=n[r],t===s.toLowerCase())return s;return null}const pi=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,gi=e=>!Ve(e)&&e!==pi;function an(){const{caseless:e}=gi(this)&&this||{},t={},n=(r,s)=>{const o=e&&di(t,s)||s;gt(t[o])&>(r)?t[o]=an(t[o],r):gt(r)?t[o]=an({},r):Ne(r)?t[o]=r.slice():t[o]=r};for(let r=0,s=arguments.length;r(Ye(t,(s,o)=>{n&&Z(s)?e[o]=li(s,n):e[o]=s},{allOwnKeys:r}),e),_c=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),yc=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},vc=(e,t,n,r)=>{let s,o,u;const h={};if(t=t||{},e==null)return t;do{for(s=Object.getOwnPropertyNames(e),o=s.length;o-- >0;)u=s[o],(!r||r(u,e,t))&&!h[u]&&(t[u]=e[u],h[u]=!0);e=n!==!1&&Ln(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},bc=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},wc=e=>{if(!e)return null;if(Ne(e))return e;let t=e.length;if(!fi(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},Sc=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Ln(Uint8Array)),xc=(e,t)=>{const r=(e&&e[Symbol.iterator]).call(e);let s;for(;(s=r.next())&&!s.done;){const o=s.value;t.call(e,o[0],o[1])}},Cc=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},kc=ae("HTMLFormElement"),Ec=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,s){return r.toUpperCase()+s}),Mr=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),Tc=ae("RegExp"),mi=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};Ye(n,(s,o)=>{let u;(u=t(s,o,e))!==!1&&(r[o]=u||s)}),Object.defineProperties(e,r)},Ac=e=>{mi(e,(t,n)=>{if(Z(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(Z(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},Oc=(e,t)=>{const n={},r=s=>{s.forEach(o=>{n[o]=!0})};return Ne(e)?r(e):r(String(e).split(t)),n},Pc=()=>{},Rc=(e,t)=>(e=+e,Number.isFinite(e)?e:t),Yt="abcdefghijklmnopqrstuvwxyz",Dr="0123456789",_i={DIGIT:Dr,ALPHA:Yt,ALPHA_DIGIT:Yt+Yt.toUpperCase()+Dr},Lc=(e=16,t=_i.ALPHA_DIGIT)=>{let n="";const{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n};function Ic(e){return!!(e&&Z(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const Nc=e=>{const t=new Array(10),n=(r,s)=>{if(At(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[s]=r;const o=Ne(r)?[]:{};return Ye(r,(u,h)=>{const d=n(u,s+1);!Ve(d)&&(o[h]=d)}),t[s]=void 0,o}}return r};return n(e,0)},jc=ae("AsyncFunction"),Mc=e=>e&&(At(e)||Z(e))&&Z(e.then)&&Z(e.catch),v={isArray:Ne,isArrayBuffer:hi,isBuffer:ic,isFormData:dc,isArrayBufferView:sc,isString:oc,isNumber:fi,isBoolean:ac,isObject:At,isPlainObject:gt,isUndefined:Ve,isDate:cc,isFile:uc,isBlob:lc,isRegExp:Tc,isFunction:Z,isStream:fc,isURLSearchParams:pc,isTypedArray:Sc,isFileList:hc,forEach:Ye,merge:an,extend:mc,trim:gc,stripBOM:_c,inherits:yc,toFlatObject:vc,kindOf:Et,kindOfTest:ae,endsWith:bc,toArray:wc,forEachEntry:xc,matchAll:Cc,isHTMLForm:kc,hasOwnProperty:Mr,hasOwnProp:Mr,reduceDescriptors:mi,freezeMethods:Ac,toObjectSet:Oc,toCamelCase:Ec,noop:Pc,toFiniteNumber:Rc,findKey:di,global:pi,isContextDefined:gi,ALPHABET:_i,generateString:Lc,isSpecCompliantForm:Ic,toJSONObject:Nc,isAsyncFn:jc,isThenable:Mc};function R(e,t,n,r,s){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),s&&(this.response=s)}v.inherits(R,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:v.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const yi=R.prototype,vi={};["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(e=>{vi[e]={value:e}});Object.defineProperties(R,vi);Object.defineProperty(yi,"isAxiosError",{value:!0});R.from=(e,t,n,r,s,o)=>{const u=Object.create(yi);return v.toFlatObject(e,u,function(d){return d!==Error.prototype},h=>h!=="isAxiosError"),R.call(u,e.message,t,n,r,s),u.cause=e,u.name=e.name,o&&Object.assign(u,o),u};const Dc=null;function cn(e){return v.isPlainObject(e)||v.isArray(e)}function bi(e){return v.endsWith(e,"[]")?e.slice(0,-2):e}function Fr(e,t,n){return e?e.concat(t).map(function(s,o){return s=bi(s),!n&&o?"["+s+"]":s}).join(n?".":""):t}function Fc(e){return v.isArray(e)&&!e.some(cn)}const Uc=v.toFlatObject(v,{},null,function(t){return/^is[A-Z]/.test(t)});function Ot(e,t,n){if(!v.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=v.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(w,g){return!v.isUndefined(g[w])});const r=n.metaTokens,s=n.visitor||m,o=n.dots,u=n.indexes,d=(n.Blob||typeof Blob<"u"&&Blob)&&v.isSpecCompliantForm(t);if(!v.isFunction(s))throw new TypeError("visitor must be a function");function _(x){if(x===null)return"";if(v.isDate(x))return x.toISOString();if(!d&&v.isBlob(x))throw new R("Blob is not supported. Use a Buffer instead.");return v.isArrayBuffer(x)||v.isTypedArray(x)?d&&typeof Blob=="function"?new Blob([x]):Buffer.from(x):x}function m(x,w,g){let b=x;if(x&&!g&&typeof x=="object"){if(v.endsWith(w,"{}"))w=r?w:w.slice(0,-2),x=JSON.stringify(x);else if(v.isArray(x)&&Fc(x)||(v.isFileList(x)||v.endsWith(w,"[]"))&&(b=v.toArray(x)))return w=bi(w),b.forEach(function(A,I){!(v.isUndefined(A)||A===null)&&t.append(u===!0?Fr([w],I,o):u===null?w:w+"[]",_(A))}),!1}return cn(x)?!0:(t.append(Fr(g,w,o),_(x)),!1)}const p=[],S=Object.assign(Uc,{defaultVisitor:m,convertValue:_,isVisitable:cn});function E(x,w){if(!v.isUndefined(x)){if(p.indexOf(x)!==-1)throw Error("Circular reference detected in "+w.join("."));p.push(x),v.forEach(x,function(b,k){(!(v.isUndefined(b)||b===null)&&s.call(t,b,v.isString(k)?k.trim():k,w,S))===!0&&E(b,w?w.concat(k):[k])}),p.pop()}}if(!v.isObject(e))throw new TypeError("data must be an object");return E(e),t}function Ur(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function In(e,t){this._pairs=[],e&&Ot(e,this,t)}const wi=In.prototype;wi.append=function(t,n){this._pairs.push([t,n])};wi.toString=function(t){const n=t?function(r){return t.call(this,r,Ur)}:Ur;return this._pairs.map(function(s){return n(s[0])+"="+n(s[1])},"").join("&")};function Bc(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Si(e,t,n){if(!t)return e;const r=n&&n.encode||Bc,s=n&&n.serialize;let o;if(s?o=s(t,n):o=v.isURLSearchParams(t)?t.toString():new In(t,n).toString(r),o){const u=e.indexOf("#");u!==-1&&(e=e.slice(0,u)),e+=(e.indexOf("?")===-1?"?":"&")+o}return e}class Br{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){v.forEach(this.handlers,function(r){r!==null&&t(r)})}}const xi={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Hc=typeof URLSearchParams<"u"?URLSearchParams:In,qc=typeof FormData<"u"?FormData:null,zc=typeof Blob<"u"?Blob:null,$c={isBrowser:!0,classes:{URLSearchParams:Hc,FormData:qc,Blob:zc},protocols:["http","https","file","blob","url","data"]},Ci=typeof window<"u"&&typeof document<"u",Jc=(e=>Ci&&["ReactNative","NativeScript","NS"].indexOf(e)<0)(typeof navigator<"u"&&navigator.product),Wc=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Kc=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Ci,hasStandardBrowserEnv:Jc,hasStandardBrowserWebWorkerEnv:Wc},Symbol.toStringTag,{value:"Module"})),oe={...Kc,...$c};function Xc(e,t){return Ot(e,new oe.classes.URLSearchParams,Object.assign({visitor:function(n,r,s,o){return oe.isNode&&v.isBuffer(n)?(this.append(r,n.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)}},t))}function Vc(e){return v.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function Gc(e){const t={},n=Object.keys(e);let r;const s=n.length;let o;for(r=0;r=n.length;return u=!u&&v.isArray(s)?s.length:u,d?(v.hasOwnProp(s,u)?s[u]=[s[u],r]:s[u]=r,!h):((!s[u]||!v.isObject(s[u]))&&(s[u]=[]),t(n,r,s[u],o)&&v.isArray(s[u])&&(s[u]=Gc(s[u])),!h)}if(v.isFormData(e)&&v.isFunction(e.entries)){const n={};return v.forEachEntry(e,(r,s)=>{t(Vc(r),s,n,0)}),n}return null}function Qc(e,t,n){if(v.isString(e))try{return(t||JSON.parse)(e),v.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const Nn={transitional:xi,adapter:["xhr","http"],transformRequest:[function(t,n){const r=n.getContentType()||"",s=r.indexOf("application/json")>-1,o=v.isObject(t);if(o&&v.isHTMLForm(t)&&(t=new FormData(t)),v.isFormData(t))return s?JSON.stringify(ki(t)):t;if(v.isArrayBuffer(t)||v.isBuffer(t)||v.isStream(t)||v.isFile(t)||v.isBlob(t))return t;if(v.isArrayBufferView(t))return t.buffer;if(v.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let h;if(o){if(r.indexOf("application/x-www-form-urlencoded")>-1)return Xc(t,this.formSerializer).toString();if((h=v.isFileList(t))||r.indexOf("multipart/form-data")>-1){const d=this.env&&this.env.FormData;return Ot(h?{"files[]":t}:t,d&&new d,this.formSerializer)}}return o||s?(n.setContentType("application/json",!1),Qc(t)):t}],transformResponse:[function(t){const n=this.transitional||Nn.transitional,r=n&&n.forcedJSONParsing,s=this.responseType==="json";if(t&&v.isString(t)&&(r&&!this.responseType||s)){const u=!(n&&n.silentJSONParsing)&&s;try{return JSON.parse(t)}catch(h){if(u)throw h.name==="SyntaxError"?R.from(h,R.ERR_BAD_RESPONSE,this,null,this.response):h}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:oe.classes.FormData,Blob:oe.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};v.forEach(["delete","get","head","post","put","patch"],e=>{Nn.headers[e]={}});const jn=Nn,Yc=v.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"]),Zc=e=>{const t={};let n,r,s;return e&&e.split(` `).forEach(function(u){s=u.indexOf(":"),n=u.substring(0,s).trim().toLowerCase(),r=u.substring(s+1).trim(),!(!n||t[n]&&Yc[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},Hr=Symbol("internals");function qe(e){return e&&String(e).trim().toLowerCase()}function mt(e){return e===!1||e==null?e:v.isArray(e)?e.map(mt):String(e)}function eu(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const tu=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Zt(e,t,n,r,s){if(v.isFunction(r))return r.call(this,t,n);if(s&&(t=n),!!v.isString(t)){if(v.isString(r))return t.indexOf(r)!==-1;if(v.isRegExp(r))return r.test(t)}}function nu(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function ru(e,t){const n=v.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(s,o,u){return this[r].call(this,t,s,o,u)},configurable:!0})})}class Pt{constructor(t){t&&this.set(t)}set(t,n,r){const s=this;function o(h,d,_){const m=qe(d);if(!m)throw new Error("header name must be a non-empty string");const p=v.findKey(s,m);(!p||s[p]===void 0||_===!0||_===void 0&&s[p]!==!1)&&(s[p||d]=mt(h))}const u=(h,d)=>v.forEach(h,(_,m)=>o(_,m,d));return v.isPlainObject(t)||t instanceof this.constructor?u(t,n):v.isString(t)&&(t=t.trim())&&!tu(t)?u(Zc(t),n):t!=null&&o(n,t,r),this}get(t,n){if(t=qe(t),t){const r=v.findKey(this,t);if(r){const s=this[r];if(!n)return s;if(n===!0)return eu(s);if(v.isFunction(n))return n.call(this,s,r);if(v.isRegExp(n))return n.exec(s);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=qe(t),t){const r=v.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||Zt(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let s=!1;function o(u){if(u=qe(u),u){const h=v.findKey(r,u);h&&(!n||Zt(r,r[h],h,n))&&(delete r[h],s=!0)}}return v.isArray(t)?t.forEach(o):o(t),s}clear(t){const n=Object.keys(this);let r=n.length,s=!1;for(;r--;){const o=n[r];(!t||Zt(this,this[o],o,t,!0))&&(delete this[o],s=!0)}return s}normalize(t){const n=this,r={};return v.forEach(this,(s,o)=>{const u=v.findKey(r,o);if(u){n[u]=mt(s),delete n[o];return}const h=t?nu(o):String(o).trim();h!==o&&delete n[o],n[h]=mt(s),r[h]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return v.forEach(this,(r,s)=>{r!=null&&r!==!1&&(n[s]=t&&v.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(` `)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(s=>r.set(s)),r}static accessor(t){const r=(this[Hr]=this[Hr]={accessors:{}}).accessors,s=this.prototype;function o(u){const h=qe(u);r[h]||(ru(s,u),r[h]=!0)}return v.isArray(t)?t.forEach(o):o(t),this}}Pt.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);v.reduceDescriptors(Pt.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});v.freezeMethods(Pt);const he=Pt;function en(e,t){const n=this||jn,r=t||n,s=he.from(r.headers);let o=r.data;return v.forEach(e,function(h){o=h.call(n,o,s.normalize(),t?t.status:void 0)}),s.normalize(),o}function Ei(e){return!!(e&&e.__CANCEL__)}function Ze(e,t,n){R.call(this,e??"canceled",R.ERR_CANCELED,t,n),this.name="CanceledError"}v.inherits(Ze,R,{__CANCEL__:!0});function iu(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new R("Request failed with status code "+n.status,[R.ERR_BAD_REQUEST,R.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}const su=oe.hasStandardBrowserEnv?{write(e,t,n,r,s,o){const u=[e+"="+encodeURIComponent(t)];v.isNumber(n)&&u.push("expires="+new Date(n).toGMTString()),v.isString(r)&&u.push("path="+r),v.isString(s)&&u.push("domain="+s),o===!0&&u.push("secure"),document.cookie=u.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function ou(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function au(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function Ti(e,t){return e&&!ou(t)?au(e,t):t}const cu=oe.hasStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");let r;function s(o){let u=o;return t&&(n.setAttribute("href",u),u=n.href),n.setAttribute("href",u),{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 r=s(window.location.href),function(u){const h=v.isString(u)?s(u):u;return h.protocol===r.protocol&&h.host===r.host}}():function(){return function(){return!0}}();function uu(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function lu(e,t){e=e||10;const n=new Array(e),r=new Array(e);let s=0,o=0,u;return t=t!==void 0?t:1e3,function(d){const _=Date.now(),m=r[o];u||(u=_),n[s]=d,r[s]=_;let p=o,S=0;for(;p!==s;)S+=n[p++],p=p%e;if(s=(s+1)%e,s===o&&(o=(o+1)%e),_-u{const o=s.loaded,u=s.lengthComputable?s.total:void 0,h=o-n,d=r(h),_=o<=u;n=o;const m={loaded:o,total:u,progress:u?o/u:void 0,bytes:h,rate:d||void 0,estimated:d&&u&&_?(u-o)/d:void 0,event:s};m[t?"download":"upload"]=!0,e(m)}}const hu=typeof XMLHttpRequest<"u",fu=hu&&function(e){return new Promise(function(n,r){let s=e.data;const o=he.from(e.headers).normalize();let{responseType:u,withXSRFToken:h}=e,d;function _(){e.cancelToken&&e.cancelToken.unsubscribe(d),e.signal&&e.signal.removeEventListener("abort",d)}let m;if(v.isFormData(s)){if(oe.hasStandardBrowserEnv||oe.hasStandardBrowserWebWorkerEnv)o.setContentType(!1);else if((m=o.getContentType())!==!1){const[w,...g]=m?m.split(";").map(b=>b.trim()).filter(Boolean):[];o.setContentType([w||"multipart/form-data",...g].join("; "))}}let p=new XMLHttpRequest;if(e.auth){const w=e.auth.username||"",g=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";o.set("Authorization","Basic "+btoa(w+":"+g))}const S=Ti(e.baseURL,e.url);p.open(e.method.toUpperCase(),Si(S,e.params,e.paramsSerializer),!0),p.timeout=e.timeout;function E(){if(!p)return;const w=he.from("getAllResponseHeaders"in p&&p.getAllResponseHeaders()),b={data:!u||u==="text"||u==="json"?p.responseText:p.response,status:p.status,statusText:p.statusText,headers:w,config:e,request:p};iu(function(A){n(A),_()},function(A){r(A),_()},b),p=null}if("onloadend"in p?p.onloadend=E:p.onreadystatechange=function(){!p||p.readyState!==4||p.status===0&&!(p.responseURL&&p.responseURL.indexOf("file:")===0)||setTimeout(E)},p.onabort=function(){p&&(r(new R("Request aborted",R.ECONNABORTED,e,p)),p=null)},p.onerror=function(){r(new R("Network Error",R.ERR_NETWORK,e,p)),p=null},p.ontimeout=function(){let g=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const b=e.transitional||xi;e.timeoutErrorMessage&&(g=e.timeoutErrorMessage),r(new R(g,b.clarifyTimeoutError?R.ETIMEDOUT:R.ECONNABORTED,e,p)),p=null},oe.hasStandardBrowserEnv&&(h&&v.isFunction(h)&&(h=h(e)),h||h!==!1&&cu(S))){const w=e.xsrfHeaderName&&e.xsrfCookieName&&su.read(e.xsrfCookieName);w&&o.set(e.xsrfHeaderName,w)}s===void 0&&o.setContentType(null),"setRequestHeader"in p&&v.forEach(o.toJSON(),function(g,b){p.setRequestHeader(b,g)}),v.isUndefined(e.withCredentials)||(p.withCredentials=!!e.withCredentials),u&&u!=="json"&&(p.responseType=e.responseType),typeof e.onDownloadProgress=="function"&&p.addEventListener("progress",qr(e.onDownloadProgress,!0)),typeof e.onUploadProgress=="function"&&p.upload&&p.upload.addEventListener("progress",qr(e.onUploadProgress)),(e.cancelToken||e.signal)&&(d=w=>{p&&(r(!w||w.type?new Ze(null,e,p):w),p.abort(),p=null)},e.cancelToken&&e.cancelToken.subscribe(d),e.signal&&(e.signal.aborted?d():e.signal.addEventListener("abort",d)));const x=uu(S);if(x&&oe.protocols.indexOf(x)===-1){r(new R("Unsupported protocol "+x+":",R.ERR_BAD_REQUEST,e));return}p.send(s||null)})},un={http:Dc,xhr:fu};v.forEach(un,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const zr=e=>`- ${e}`,du=e=>v.isFunction(e)||e===null||e===!1,Ai={getAdapter:e=>{e=v.isArray(e)?e:[e];const{length:t}=e;let n,r;const s={};for(let o=0;o`adapter ${h} `+(d===!1?"is not supported by the environment":"is not available in the build"));let u=t?o.length>1?`since : `+o.map(zr).join(` `):" "+zr(o[0]):"as no adapter specified";throw new R("There is no suitable adapter to dispatch the request "+u,"ERR_NOT_SUPPORT")}return r},adapters:un};function tn(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Ze(null,e)}function $r(e){return tn(e),e.headers=he.from(e.headers),e.data=en.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Ai.getAdapter(e.adapter||jn.adapter)(e).then(function(r){return tn(e),r.data=en.call(e,e.transformResponse,r),r.headers=he.from(r.headers),r},function(r){return Ei(r)||(tn(e),r&&r.response&&(r.response.data=en.call(e,e.transformResponse,r.response),r.response.headers=he.from(r.response.headers))),Promise.reject(r)})}const Jr=e=>e instanceof he?{...e}:e;function Re(e,t){t=t||{};const n={};function r(_,m,p){return v.isPlainObject(_)&&v.isPlainObject(m)?v.merge.call({caseless:p},_,m):v.isPlainObject(m)?v.merge({},m):v.isArray(m)?m.slice():m}function s(_,m,p){if(v.isUndefined(m)){if(!v.isUndefined(_))return r(void 0,_,p)}else return r(_,m,p)}function o(_,m){if(!v.isUndefined(m))return r(void 0,m)}function u(_,m){if(v.isUndefined(m)){if(!v.isUndefined(_))return r(void 0,_)}else return r(void 0,m)}function h(_,m,p){if(p in t)return r(_,m);if(p in e)return r(void 0,_)}const d={url:o,method:o,data:o,baseURL:u,transformRequest:u,transformResponse:u,paramsSerializer:u,timeout:u,timeoutMessage:u,withCredentials:u,withXSRFToken:u,adapter:u,responseType:u,xsrfCookieName:u,xsrfHeaderName:u,onUploadProgress:u,onDownloadProgress:u,decompress:u,maxContentLength:u,maxBodyLength:u,beforeRedirect:u,transport:u,httpAgent:u,httpsAgent:u,cancelToken:u,socketPath:u,responseEncoding:u,validateStatus:h,headers:(_,m)=>s(Jr(_),Jr(m),!0)};return v.forEach(Object.keys(Object.assign({},e,t)),function(m){const p=d[m]||s,S=p(e[m],t[m],m);v.isUndefined(S)&&p!==h||(n[m]=S)}),n}const Oi="1.6.8",Mn={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Mn[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const Wr={};Mn.transitional=function(t,n,r){function s(o,u){return"[Axios v"+Oi+"] Transitional option '"+o+"'"+u+(r?". "+r:"")}return(o,u,h)=>{if(t===!1)throw new R(s(u," has been removed"+(n?" in "+n:"")),R.ERR_DEPRECATED);return n&&!Wr[u]&&(Wr[u]=!0,console.warn(s(u," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(o,u,h):!0}};function pu(e,t,n){if(typeof e!="object")throw new R("options must be an object",R.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let s=r.length;for(;s-- >0;){const o=r[s],u=t[o];if(u){const h=e[o],d=h===void 0||u(h,o,e);if(d!==!0)throw new R("option "+o+" must be "+d,R.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new R("Unknown option "+o,R.ERR_BAD_OPTION)}}const ln={assertOptions:pu,validators:Mn},de=ln.validators;class bt{constructor(t){this.defaults=t,this.interceptors={request:new Br,response:new Br}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let s;Error.captureStackTrace?Error.captureStackTrace(s={}):s=new Error;const o=s.stack?s.stack.replace(/^.+\n/,""):"";r.stack?o&&!String(r.stack).endsWith(o.replace(/^.+\n.+\n/,""))&&(r.stack+=` `+o):r.stack=o}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Re(this.defaults,n);const{transitional:r,paramsSerializer:s,headers:o}=n;r!==void 0&&ln.assertOptions(r,{silentJSONParsing:de.transitional(de.boolean),forcedJSONParsing:de.transitional(de.boolean),clarifyTimeoutError:de.transitional(de.boolean)},!1),s!=null&&(v.isFunction(s)?n.paramsSerializer={serialize:s}:ln.assertOptions(s,{encode:de.function,serialize:de.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let u=o&&v.merge(o.common,o[n.method]);o&&v.forEach(["delete","get","head","post","put","patch","common"],x=>{delete o[x]}),n.headers=he.concat(u,o);const h=[];let d=!0;this.interceptors.request.forEach(function(w){typeof w.runWhen=="function"&&w.runWhen(n)===!1||(d=d&&w.synchronous,h.unshift(w.fulfilled,w.rejected))});const _=[];this.interceptors.response.forEach(function(w){_.push(w.fulfilled,w.rejected)});let m,p=0,S;if(!d){const x=[$r.bind(this),void 0];for(x.unshift.apply(x,h),x.push.apply(x,_),S=x.length,m=Promise.resolve(n);p{if(!r._listeners)return;let o=r._listeners.length;for(;o-- >0;)r._listeners[o](s);r._listeners=null}),this.promise.then=s=>{let o;const u=new Promise(h=>{r.subscribe(h),o=h}).then(s);return u.cancel=function(){r.unsubscribe(o)},u},t(function(o,u,h){r.reason||(r.reason=new Ze(o,u,h),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}static source(){let t;return{token:new Dn(function(s){t=s}),cancel:t}}}const gu=Dn;function mu(e){return function(n){return e.apply(null,n)}}function _u(e){return v.isObject(e)&&e.isAxiosError===!0}const hn={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(hn).forEach(([e,t])=>{hn[t]=e});const yu=hn;function Pi(e){const t=new _t(e),n=li(_t.prototype.request,t);return v.extend(n,_t.prototype,t,{allOwnKeys:!0}),v.extend(n,t,null,{allOwnKeys:!0}),n.create=function(s){return Pi(Re(e,s))},n}const U=Pi(jn);U.Axios=_t;U.CanceledError=Ze;U.CancelToken=gu;U.isCancel=Ei;U.VERSION=Oi;U.toFormData=Ot;U.AxiosError=R;U.Cancel=U.CanceledError;U.all=function(t){return Promise.all(t)};U.spread=mu;U.isAxiosError=_u;U.mergeConfig=Re;U.AxiosHeaders=he;U.formToJSON=e=>ki(v.isHTMLForm(e)?new FormData(e):e);U.getAdapter=Ai.getAdapter;U.HttpStatusCode=yu;U.default=U;const vu=U;function fn(e){"@babel/helpers - typeof";return fn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},fn(e)}function $(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Kr(e,t){for(var n=0;n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function wu(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Su(e,t){if(t&&(typeof t=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return wu(e)}function Q(e){var t=bu();return function(){var r=wt(e),s;if(t){var o=wt(this).constructor;s=Reflect.construct(r,arguments,o)}else s=r.apply(this,arguments);return Su(this,s)}}var Fn=function(){function e(){$(this,e)}return J(e,[{key:"listenForWhisper",value:function(n,r){return this.listen(".client-"+n,r)}},{key:"notification",value:function(n){return this.listen(".Illuminate\\Notifications\\Events\\BroadcastNotificationCreated",n)}},{key:"stopListeningForWhisper",value:function(n,r){return this.stopListening(".client-"+n,r)}}]),e}(),Ri=function(){function e(t){$(this,e),this.namespace=t}return J(e,[{key:"format",value:function(n){return n.charAt(0)==="."||n.charAt(0)==="\\"?n.substr(1):(this.namespace&&(n=this.namespace+"."+n),n.replace(/\./g,"\\"))}},{key:"setNamespace",value:function(n){this.namespace=n}}]),e}(),Rt=function(e){G(n,e);var t=Q(n);function n(r,s,o){var u;return $(this,n),u=t.call(this),u.name=s,u.pusher=r,u.options=o,u.eventFormatter=new Ri(u.options.namespace),u.subscribe(),u}return J(n,[{key:"subscribe",value:function(){this.subscription=this.pusher.subscribe(this.name)}},{key:"unsubscribe",value:function(){this.pusher.unsubscribe(this.name)}},{key:"listen",value:function(s,o){return this.on(this.eventFormatter.format(s),o),this}},{key:"listenToAll",value:function(s){var o=this;return this.subscription.bind_global(function(u,h){if(!u.startsWith("pusher:")){var d=o.options.namespace.replace(/\./g,"\\"),_=u.startsWith(d)?u.substring(d.length+1):"."+u;s(_,h)}}),this}},{key:"stopListening",value:function(s,o){return o?this.subscription.unbind(this.eventFormatter.format(s),o):this.subscription.unbind(this.eventFormatter.format(s)),this}},{key:"stopListeningToAll",value:function(s){return s?this.subscription.unbind_global(s):this.subscription.unbind_global(),this}},{key:"subscribed",value:function(s){return this.on("pusher:subscription_succeeded",function(){s()}),this}},{key:"error",value:function(s){return this.on("pusher:subscription_error",function(o){s(o)}),this}},{key:"on",value:function(s,o){return this.subscription.bind(s,o),this}}]),n}(Fn),xu=function(e){G(n,e);var t=Q(n);function n(){return $(this,n),t.apply(this,arguments)}return J(n,[{key:"whisper",value:function(s,o){return this.pusher.channels.channels[this.name].trigger("client-".concat(s),o),this}}]),n}(Rt),Cu=function(e){G(n,e);var t=Q(n);function n(){return $(this,n),t.apply(this,arguments)}return J(n,[{key:"whisper",value:function(s,o){return this.pusher.channels.channels[this.name].trigger("client-".concat(s),o),this}}]),n}(Rt),ku=function(e){G(n,e);var t=Q(n);function n(){return $(this,n),t.apply(this,arguments)}return J(n,[{key:"here",value:function(s){return this.on("pusher:subscription_succeeded",function(o){s(Object.keys(o.members).map(function(u){return o.members[u]}))}),this}},{key:"joining",value:function(s){return this.on("pusher:member_added",function(o){s(o.info)}),this}},{key:"whisper",value:function(s,o){return this.pusher.channels.channels[this.name].trigger("client-".concat(s),o),this}},{key:"leaving",value:function(s){return this.on("pusher:member_removed",function(o){s(o.info)}),this}}]),n}(Rt),Li=function(e){G(n,e);var t=Q(n);function n(r,s,o){var u;return $(this,n),u=t.call(this),u.events={},u.listeners={},u.name=s,u.socket=r,u.options=o,u.eventFormatter=new Ri(u.options.namespace),u.subscribe(),u}return J(n,[{key:"subscribe",value:function(){this.socket.emit("subscribe",{channel:this.name,auth:this.options.auth||{}})}},{key:"unsubscribe",value:function(){this.unbind(),this.socket.emit("unsubscribe",{channel:this.name,auth:this.options.auth||{}})}},{key:"listen",value:function(s,o){return this.on(this.eventFormatter.format(s),o),this}},{key:"stopListening",value:function(s,o){return this.unbindEvent(this.eventFormatter.format(s),o),this}},{key:"subscribed",value:function(s){return this.on("connect",function(o){s(o)}),this}},{key:"error",value:function(s){return this}},{key:"on",value:function(s,o){var u=this;return this.listeners[s]=this.listeners[s]||[],this.events[s]||(this.events[s]=function(h,d){u.name===h&&u.listeners[s]&&u.listeners[s].forEach(function(_){return _(d)})},this.socket.on(s,this.events[s])),this.listeners[s].push(o),this}},{key:"unbind",value:function(){var s=this;Object.keys(this.events).forEach(function(o){s.unbindEvent(o)})}},{key:"unbindEvent",value:function(s,o){this.listeners[s]=this.listeners[s]||[],o&&(this.listeners[s]=this.listeners[s].filter(function(u){return u!==o})),(!o||this.listeners[s].length===0)&&(this.events[s]&&(this.socket.removeListener(s,this.events[s]),delete this.events[s]),delete this.listeners[s])}}]),n}(Fn),Ii=function(e){G(n,e);var t=Q(n);function n(){return $(this,n),t.apply(this,arguments)}return J(n,[{key:"whisper",value:function(s,o){return this.socket.emit("client event",{channel:this.name,event:"client-".concat(s),data:o}),this}}]),n}(Li),Eu=function(e){G(n,e);var t=Q(n);function n(){return $(this,n),t.apply(this,arguments)}return J(n,[{key:"here",value:function(s){return this.on("presence:subscribed",function(o){s(o.map(function(u){return u.user_info}))}),this}},{key:"joining",value:function(s){return this.on("presence:joining",function(o){return s(o.user_info)}),this}},{key:"whisper",value:function(s,o){return this.socket.emit("client event",{channel:this.name,event:"client-".concat(s),data:o}),this}},{key:"leaving",value:function(s){return this.on("presence:leaving",function(o){return s(o.user_info)}),this}}]),n}(Ii),St=function(e){G(n,e);var t=Q(n);function n(){return $(this,n),t.apply(this,arguments)}return J(n,[{key:"subscribe",value:function(){}},{key:"unsubscribe",value:function(){}},{key:"listen",value:function(s,o){return this}},{key:"listenToAll",value:function(s){return this}},{key:"stopListening",value:function(s,o){return this}},{key:"subscribed",value:function(s){return this}},{key:"error",value:function(s){return this}},{key:"on",value:function(s,o){return this}}]),n}(Fn),Xr=function(e){G(n,e);var t=Q(n);function n(){return $(this,n),t.apply(this,arguments)}return J(n,[{key:"whisper",value:function(s,o){return this}}]),n}(St),Tu=function(e){G(n,e);var t=Q(n);function n(){return $(this,n),t.apply(this,arguments)}return J(n,[{key:"here",value:function(s){return this}},{key:"joining",value:function(s){return this}},{key:"whisper",value:function(s,o){return this}},{key:"leaving",value:function(s){return this}}]),n}(St),Un=function(){function e(t){$(this,e),this._defaultOptions={auth:{headers:{}},authEndpoint:"/broadcasting/auth",userAuthentication:{endpoint:"/broadcasting/user-auth",headers:{}},broadcaster:"pusher",csrfToken:null,bearerToken:null,host:null,key:null,namespace:"App.Events"},this.setOptions(t),this.connect()}return J(e,[{key:"setOptions",value:function(n){this.options=Ge(this._defaultOptions,n);var r=this.csrfToken();return r&&(this.options.auth.headers["X-CSRF-TOKEN"]=r,this.options.userAuthentication.headers["X-CSRF-TOKEN"]=r),r=this.options.bearerToken,r&&(this.options.auth.headers.Authorization="Bearer "+r,this.options.userAuthentication.headers.Authorization="Bearer "+r),n}},{key:"csrfToken",value:function(){var n;return typeof window<"u"&&window.Laravel&&window.Laravel.csrfToken?window.Laravel.csrfToken:this.options.csrfToken?this.options.csrfToken:typeof document<"u"&&typeof document.querySelector=="function"&&(n=document.querySelector('meta[name="csrf-token"]'))?n.getAttribute("content"):null}}]),e}(),Vr=function(e){G(n,e);var t=Q(n);function n(){var r;return $(this,n),r=t.apply(this,arguments),r.channels={},r}return J(n,[{key:"connect",value:function(){typeof this.options.client<"u"?this.pusher=this.options.client:this.options.Pusher?this.pusher=new this.options.Pusher(this.options.key,this.options):this.pusher=new Pusher(this.options.key,this.options)}},{key:"signin",value:function(){this.pusher.signin()}},{key:"listen",value:function(s,o,u){return this.channel(s).listen(o,u)}},{key:"channel",value:function(s){return this.channels[s]||(this.channels[s]=new Rt(this.pusher,s,this.options)),this.channels[s]}},{key:"privateChannel",value:function(s){return this.channels["private-"+s]||(this.channels["private-"+s]=new xu(this.pusher,"private-"+s,this.options)),this.channels["private-"+s]}},{key:"encryptedPrivateChannel",value:function(s){return this.channels["private-encrypted-"+s]||(this.channels["private-encrypted-"+s]=new Cu(this.pusher,"private-encrypted-"+s,this.options)),this.channels["private-encrypted-"+s]}},{key:"presenceChannel",value:function(s){return this.channels["presence-"+s]||(this.channels["presence-"+s]=new ku(this.pusher,"presence-"+s,this.options)),this.channels["presence-"+s]}},{key:"leave",value:function(s){var o=this,u=[s,"private-"+s,"private-encrypted-"+s,"presence-"+s];u.forEach(function(h,d){o.leaveChannel(h)})}},{key:"leaveChannel",value:function(s){this.channels[s]&&(this.channels[s].unsubscribe(),delete this.channels[s])}},{key:"socketId",value:function(){return this.pusher.connection.socket_id}},{key:"disconnect",value:function(){this.pusher.disconnect()}}]),n}(Un),Au=function(e){G(n,e);var t=Q(n);function n(){var r;return $(this,n),r=t.apply(this,arguments),r.channels={},r}return J(n,[{key:"connect",value:function(){var s=this,o=this.getSocketIO();return this.socket=o(this.options.host,this.options),this.socket.on("reconnect",function(){Object.values(s.channels).forEach(function(u){u.subscribe()})}),this.socket}},{key:"getSocketIO",value:function(){if(typeof this.options.client<"u")return this.options.client;if(typeof io<"u")return io;throw new Error("Socket.io client not found. Should be globally available or passed via options.client")}},{key:"listen",value:function(s,o,u){return this.channel(s).listen(o,u)}},{key:"channel",value:function(s){return this.channels[s]||(this.channels[s]=new Li(this.socket,s,this.options)),this.channels[s]}},{key:"privateChannel",value:function(s){return this.channels["private-"+s]||(this.channels["private-"+s]=new Ii(this.socket,"private-"+s,this.options)),this.channels["private-"+s]}},{key:"presenceChannel",value:function(s){return this.channels["presence-"+s]||(this.channels["presence-"+s]=new Eu(this.socket,"presence-"+s,this.options)),this.channels["presence-"+s]}},{key:"leave",value:function(s){var o=this,u=[s,"private-"+s,"presence-"+s];u.forEach(function(h){o.leaveChannel(h)})}},{key:"leaveChannel",value:function(s){this.channels[s]&&(this.channels[s].unsubscribe(),delete this.channels[s])}},{key:"socketId",value:function(){return this.socket.id}},{key:"disconnect",value:function(){this.socket.disconnect()}}]),n}(Un),Ou=function(e){G(n,e);var t=Q(n);function n(){var r;return $(this,n),r=t.apply(this,arguments),r.channels={},r}return J(n,[{key:"connect",value:function(){}},{key:"listen",value:function(s,o,u){return new St}},{key:"channel",value:function(s){return new St}},{key:"privateChannel",value:function(s){return new Xr}},{key:"encryptedPrivateChannel",value:function(s){return new Xr}},{key:"presenceChannel",value:function(s){return new Tu}},{key:"leave",value:function(s){}},{key:"leaveChannel",value:function(s){}},{key:"socketId",value:function(){return"fake-socket-id"}},{key:"disconnect",value:function(){}}]),n}(Un),Pu=function(){function e(t){$(this,e),this.options=t,this.connect(),this.options.withoutInterceptors||this.registerInterceptors()}return J(e,[{key:"channel",value:function(n){return this.connector.channel(n)}},{key:"connect",value:function(){this.options.broadcaster=="reverb"?this.connector=new Vr(Ge(Ge({},this.options),{cluster:""})):this.options.broadcaster=="pusher"?this.connector=new Vr(this.options):this.options.broadcaster=="socket.io"?this.connector=new Au(this.options):this.options.broadcaster=="null"?this.connector=new Ou(this.options):typeof this.options.broadcaster=="function"&&(this.connector=new this.options.broadcaster(this.options))}},{key:"disconnect",value:function(){this.connector.disconnect()}},{key:"join",value:function(n){return this.connector.presenceChannel(n)}},{key:"leave",value:function(n){this.connector.leave(n)}},{key:"leaveChannel",value:function(n){this.connector.leaveChannel(n)}},{key:"leaveAllChannels",value:function(){for(var n in this.connector.channels)this.leaveChannel(n)}},{key:"listen",value:function(n,r,s){return this.connector.listen(n,r,s)}},{key:"private",value:function(n){return this.connector.privateChannel(n)}},{key:"encryptedPrivate",value:function(n){return this.connector.encryptedPrivateChannel(n)}},{key:"socketId",value:function(){return this.connector.socketId()}},{key:"registerInterceptors",value:function(){typeof Vue=="function"&&Vue.http&&this.registerVueRequestInterceptor(),typeof axios=="function"&&this.registerAxiosRequestInterceptor(),typeof jQuery=="function"&&this.registerjQueryAjaxSetup(),(typeof Turbo>"u"?"undefined":fn(Turbo))==="object"&&this.registerTurboRequestInterceptor()}},{key:"registerVueRequestInterceptor",value:function(){var n=this;Vue.http.interceptors.push(function(r,s){n.socketId()&&r.headers.set("X-Socket-ID",n.socketId()),s()})}},{key:"registerAxiosRequestInterceptor",value:function(){var n=this;axios.interceptors.request.use(function(r){return n.socketId()&&(r.headers["X-Socket-Id"]=n.socketId()),r})}},{key:"registerjQueryAjaxSetup",value:function(){var n=this;typeof jQuery.ajax<"u"&&jQuery.ajaxPrefilter(function(r,s,o){n.socketId()&&o.setRequestHeader("X-Socket-Id",n.socketId())})}},{key:"registerTurboRequestInterceptor",value:function(){var n=this;document.addEventListener("turbo:before-fetch-request",function(r){r.detail.fetchOptions.headers["X-Socket-Id"]=n.socketId()})}}]),e}();function Ru(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ni={exports:{}};/*! * Pusher JavaScript Library v8.4.0-rc2 * https://pusher.com/ * * Copyright 2020, Pusher * Released under the MIT licence. */(function(e,t){(function(r,s){e.exports=s()})(window,function(){return function(n){var r={};function s(o){if(r[o])return r[o].exports;var u=r[o]={i:o,l:!1,exports:{}};return n[o].call(u.exports,u,u.exports,s),u.l=!0,u.exports}return s.m=n,s.c=r,s.d=function(o,u,h){s.o(o,u)||Object.defineProperty(o,u,{enumerable:!0,get:h})},s.r=function(o){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(o,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(o,"__esModule",{value:!0})},s.t=function(o,u){if(u&1&&(o=s(o)),u&8||u&4&&typeof o=="object"&&o&&o.__esModule)return o;var h=Object.create(null);if(s.r(h),Object.defineProperty(h,"default",{enumerable:!0,value:o}),u&2&&typeof o!="string")for(var d in o)s.d(h,d,(function(_){return o[_]}).bind(null,d));return h},s.n=function(o){var u=o&&o.__esModule?function(){return o.default}:function(){return o};return s.d(u,"a",u),u},s.o=function(o,u){return Object.prototype.hasOwnProperty.call(o,u)},s.p="",s(s.s=2)}([function(n,r,s){var o=this&&this.__extends||function(){var w=function(g,b){return w=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(k,A){k.__proto__=A}||function(k,A){for(var I in A)A.hasOwnProperty(I)&&(k[I]=A[I])},w(g,b)};return function(g,b){w(g,b);function k(){this.constructor=g}g.prototype=b===null?Object.create(b):(k.prototype=b.prototype,new k)}}();Object.defineProperty(r,"__esModule",{value:!0});var u=256,h=function(){function w(g){g===void 0&&(g="="),this._paddingCharacter=g}return w.prototype.encodedLength=function(g){return this._paddingCharacter?(g+2)/3*4|0:(g*8+5)/6|0},w.prototype.encode=function(g){for(var b="",k=0;k>>3*6&63),b+=this._encodeByte(A>>>2*6&63),b+=this._encodeByte(A>>>1*6&63),b+=this._encodeByte(A>>>0*6&63)}var I=g.length-k;if(I>0){var A=g[k]<<16|(I===2?g[k+1]<<8:0);b+=this._encodeByte(A>>>3*6&63),b+=this._encodeByte(A>>>2*6&63),I===2?b+=this._encodeByte(A>>>1*6&63):b+=this._paddingCharacter||"",b+=this._paddingCharacter||""}return b},w.prototype.maxDecodedLength=function(g){return this._paddingCharacter?g/4*3|0:(g*6+7)/8|0},w.prototype.decodedLength=function(g){return this.maxDecodedLength(g.length-this._getPaddingLength(g))},w.prototype.decode=function(g){if(g.length===0)return new Uint8Array(0);for(var b=this._getPaddingLength(g),k=g.length-b,A=new Uint8Array(this.maxDecodedLength(k)),I=0,M=0,q=0,Y=0,X=0,ee=0,ie=0;M>>4,A[I++]=X<<4|ee>>>2,A[I++]=ee<<6|ie,q|=Y&u,q|=X&u,q|=ee&u,q|=ie&u;if(M>>4,q|=Y&u,q|=X&u),M>>2,q|=ee&u),M>>8&6,b+=51-g>>>8&-75,b+=61-g>>>8&-15,b+=62-g>>>8&3,String.fromCharCode(b)},w.prototype._decodeChar=function(g){var b=u;return b+=(42-g&g-44)>>>8&-u+g-43+62,b+=(46-g&g-48)>>>8&-u+g-47+63,b+=(47-g&g-58)>>>8&-u+g-48+52,b+=(64-g&g-91)>>>8&-u+g-65+0,b+=(96-g&g-123)>>>8&-u+g-97+26,b},w.prototype._getPaddingLength=function(g){var b=0;if(this._paddingCharacter){for(var k=g.length-1;k>=0&&g[k]===this._paddingCharacter;k--)b++;if(g.length<4||b>2)throw new Error("Base64Coder: incorrect padding")}return b},w}();r.Coder=h;var d=new h;function _(w){return d.encode(w)}r.encode=_;function m(w){return d.decode(w)}r.decode=m;var p=function(w){o(g,w);function g(){return w!==null&&w.apply(this,arguments)||this}return g.prototype._encodeByte=function(b){var k=b;return k+=65,k+=25-b>>>8&6,k+=51-b>>>8&-75,k+=61-b>>>8&-13,k+=62-b>>>8&49,String.fromCharCode(k)},g.prototype._decodeChar=function(b){var k=u;return k+=(44-b&b-46)>>>8&-u+b-45+62,k+=(94-b&b-96)>>>8&-u+b-95+63,k+=(47-b&b-58)>>>8&-u+b-48+52,k+=(64-b&b-91)>>>8&-u+b-65+0,k+=(96-b&b-123)>>>8&-u+b-97+26,k},g}(h);r.URLSafeCoder=p;var S=new p;function E(w){return S.encode(w)}r.encodeURLSafe=E;function x(w){return S.decode(w)}r.decodeURLSafe=x,r.encodedLength=function(w){return d.encodedLength(w)},r.maxDecodedLength=function(w){return d.maxDecodedLength(w)},r.decodedLength=function(w){return d.decodedLength(w)}},function(n,r,s){Object.defineProperty(r,"__esModule",{value:!0});var o="utf8: invalid string",u="utf8: invalid source encoding";function h(m){for(var p=new Uint8Array(d(m)),S=0,E=0;E>6,p[S++]=128|x&63):x<55296?(p[S++]=224|x>>12,p[S++]=128|x>>6&63,p[S++]=128|x&63):(E++,x=(x&1023)<<10,x|=m.charCodeAt(E)&1023,x+=65536,p[S++]=240|x>>18,p[S++]=128|x>>12&63,p[S++]=128|x>>6&63,p[S++]=128|x&63)}return p}r.encode=h;function d(m){for(var p=0,S=0;S=m.length-1)throw new Error(o);S++,p+=4}else throw new Error(o)}return p}r.encodedLength=d;function _(m){for(var p=[],S=0;S=m.length)throw new Error(u);var w=m[++S];if((w&192)!==128)throw new Error(u);E=(E&31)<<6|w&63,x=128}else if(E<240){if(S>=m.length-1)throw new Error(u);var w=m[++S],g=m[++S];if((w&192)!==128||(g&192)!==128)throw new Error(u);E=(E&15)<<12|(w&63)<<6|g&63,x=2048}else if(E<248){if(S>=m.length-2)throw new Error(u);var w=m[++S],g=m[++S],b=m[++S];if((w&192)!==128||(g&192)!==128||(b&192)!==128)throw new Error(u);E=(E&15)<<18|(w&63)<<12|(g&63)<<6|b&63,x=65536}else throw new Error(u);if(E=55296&&E<=57343)throw new Error(u);if(E>=65536){if(E>1114111)throw new Error(u);E-=65536,p.push(String.fromCharCode(55296|E>>10)),E=56320|E&1023}}p.push(String.fromCharCode(E))}return p.join("")}r.decode=_},function(n,r,s){n.exports=s(3).default},function(n,r,s){s.r(r);class o{constructor(i,a){this.lastId=0,this.prefix=i,this.name=a}create(i){this.lastId++;var a=this.lastId,l=this.prefix+a,f=this.name+"["+a+"]",y=!1,C=function(){y||(i.apply(null,arguments),y=!0)};return this[a]=C,{number:a,id:l,name:f,callback:C}}remove(i){delete this[i.number]}}var u=new o("_pusher_script_","Pusher.ScriptReceivers"),h={VERSION:"8.4.0-rc2",PROTOCOL:7,wsPort:80,wssPort:443,wsPath:"",httpHost:"sockjs.pusher.com",httpPort:80,httpsPort:443,httpPath:"/pusher",stats_host:"stats.pusher.com",authEndpoint:"/pusher/auth",authTransport:"ajax",activityTimeout:12e4,pongTimeout:3e4,unavailableTimeout:1e4,userAuthentication:{endpoint:"/pusher/user-auth",transport:"ajax"},channelAuthorization:{endpoint:"/pusher/auth",transport:"ajax"},cdn_http:"http://js.pusher.com",cdn_https:"https://js.pusher.com",dependency_suffix:""},d=h;class _{constructor(i){this.options=i,this.receivers=i.receivers||u,this.loading={}}load(i,a,l){var f=this;if(f.loading[i]&&f.loading[i].length>0)f.loading[i].push(l);else{f.loading[i]=[l];var y=P.createScriptRequest(f.getPath(i,a)),C=f.receivers.create(function(T){if(f.receivers.remove(C),f.loading[i]){var O=f.loading[i];delete f.loading[i];for(var L=function(F){F||y.cleanup()},N=0;N>>6)+Fe(128|i&63):Fe(224|i>>>12&15)+Fe(128|i>>>6&63)+Fe(128|i&63)},Xs=function(c){return c.replace(/[^\x00-\x7F]/g,Ks)},Vs=function(c){var i=[0,2,1][c.length%3],a=c.charCodeAt(0)<<16|(c.length>1?c.charCodeAt(1):0)<<8|(c.length>2?c.charCodeAt(2):0),l=[it.charAt(a>>>18),it.charAt(a>>>12&63),i>=2?"=":it.charAt(a>>>6&63),i>=1?"=":it.charAt(a&63)];return l.join("")},Gs=window.btoa||function(c){return c.replace(/[\s\S]{1,3}/g,Vs)};class Qs{constructor(i,a,l,f){this.clear=a,this.timer=i(()=>{this.timer&&(this.timer=f(this.timer))},l)}isRunning(){return this.timer!==null}ensureAborted(){this.timer&&(this.clear(this.timer),this.timer=null)}}var ar=Qs;function Ys(c){window.clearTimeout(c)}function Zs(c){window.clearInterval(c)}class ye extends ar{constructor(i,a){super(setTimeout,Ys,i,function(l){return a(),null})}}class eo extends ar{constructor(i,a){super(setInterval,Zs,i,function(l){return a(),l})}}var to={now(){return Date.now?Date.now():new Date().valueOf()},defer(c){return new ye(0,c)},method(c,...i){var a=Array.prototype.slice.call(arguments,1);return function(l){return l[c].apply(l,a.concat(arguments))}}},W=to;function V(c,...i){for(var a=0;a{window.console&&window.console.log&&window.console.log(i)}}debug(...i){this.log(this.globalLog,i)}warn(...i){this.log(this.globalLogWarn,i)}error(...i){this.log(this.globalLogError,i)}globalLogWarn(i){window.console&&window.console.warn?window.console.warn(i):this.globalLog(i)}globalLogError(i){window.console&&window.console.error?window.console.error(i):this.globalLogWarn(i)}log(i,...a){var l=no.apply(this,arguments);Vt.log?Vt.log(l):Vt.logToConsole&&i.bind(this)(l)}}var D=new ho,fo=function(c,i,a,l,f){(a.headers!==void 0||a.headersProvider!=null)&&D.warn(`To send headers with the ${l.toString()} request, you must use AJAX, rather than JSONP.`);var y=c.nextAuthCallbackID.toString();c.nextAuthCallbackID++;var C=c.getDocument(),T=C.createElement("script");c.auth_callbacks[y]=function(N){f(null,N)};var O="Pusher.auth_callbacks['"+y+"']";T.src=a.endpoint+"?callback="+encodeURIComponent(O)+"&"+i;var L=C.getElementsByTagName("head")[0]||C.documentElement;L.insertBefore(T,L.firstChild)},po=fo;class go{constructor(i){this.src=i}send(i){var a=this,l="Error loading "+a.src;a.script=document.createElement("script"),a.script.id=i.id,a.script.src=a.src,a.script.type="text/javascript",a.script.charset="UTF-8",a.script.addEventListener?(a.script.onerror=function(){i.callback(l)},a.script.onload=function(){i.callback(null)}):a.script.onreadystatechange=function(){(a.script.readyState==="loaded"||a.script.readyState==="complete")&&i.callback(null)},a.script.async===void 0&&document.attachEvent&&/opera/i.test(navigator.userAgent)?(a.errorScript=document.createElement("script"),a.errorScript.id=i.id+"_error",a.errorScript.text=i.name+"('"+l+"');",a.script.async=a.errorScript.async=!1):a.script.async=!0;var f=document.getElementsByTagName("head")[0];f.insertBefore(a.script,f.firstChild),a.errorScript&&f.insertBefore(a.errorScript,a.script.nextSibling)}cleanup(){this.script&&(this.script.onload=this.script.onerror=null,this.script.onreadystatechange=null),this.script&&this.script.parentNode&&this.script.parentNode.removeChild(this.script),this.errorScript&&this.errorScript.parentNode&&this.errorScript.parentNode.removeChild(this.errorScript),this.script=null,this.errorScript=null}}class mo{constructor(i,a){this.url=i,this.data=a}send(i){if(!this.request){var a=uo(this.data),l=this.url+"/"+i.number+"?"+a;this.request=P.createScriptRequest(l),this.request.send(i)}}cleanup(){this.request&&this.request.cleanup()}}var _o=function(c,i){return function(a,l){var f="http"+(i?"s":"")+"://",y=f+(c.host||c.options.host)+c.options.path,C=P.createJSONPRequest(y,a),T=P.ScriptReceivers.create(function(O,L){u.remove(T),C.cleanup(),L&&L.host&&(c.host=L.host),l&&l(O,L)});C.send(T)}},yo={name:"jsonp",getAgent:_o},vo=yo;function Ut(c,i,a){var l=c+(i.useTLS?"s":""),f=i.useTLS?i.hostTLS:i.hostNonTLS;return l+"://"+f+a}function Bt(c,i){var a="/app/"+c,l="?protocol="+d.PROTOCOL+"&client=js&version="+d.VERSION+(i?"&"+i:"");return a+l}var bo={getInitial:function(c,i){var a=(i.httpPath||"")+Bt(c,"flash=false");return Ut("ws",i,a)}},wo={getInitial:function(c,i){var a=(i.httpPath||"/pusher")+Bt(c);return Ut("http",i,a)}},So={getInitial:function(c,i){return Ut("http",i,i.httpPath||"/pusher")},getPath:function(c,i){return Bt(c)}};class xo{constructor(){this._callbacks={}}get(i){return this._callbacks[Ht(i)]}add(i,a,l){var f=Ht(i);this._callbacks[f]=this._callbacks[f]||[],this._callbacks[f].push({fn:a,context:l})}remove(i,a,l){if(!i&&!a&&!l){this._callbacks={};return}var f=i?[Ht(i)]:ur(this._callbacks);a||l?this.removeCallback(f,a,l):this.removeAllCallbacks(f)}removeCallback(i,a,l){Ue(i,function(f){this._callbacks[f]=hr(this._callbacks[f]||[],function(y){return a&&a!==y.fn||l&&l!==y.context}),this._callbacks[f].length===0&&delete this._callbacks[f]},this)}removeAllCallbacks(i){Ue(i,function(a){delete this._callbacks[a]},this)}}function Ht(c){return"_"+c}class ue{constructor(i){this.callbacks=new xo,this.global_callbacks=[],this.failThrough=i}bind(i,a,l){return this.callbacks.add(i,a,l),this}bind_global(i){return this.global_callbacks.push(i),this}unbind(i,a,l){return this.callbacks.remove(i,a,l),this}unbind_global(i){return i?(this.global_callbacks=hr(this.global_callbacks||[],a=>a!==i),this):(this.global_callbacks=[],this)}unbind_all(){return this.unbind(),this.unbind_global(),this}emit(i,a,l){for(var f=0;f0)for(var f=0;f{this.onError(a),this.changeState("closed")}),!1}return this.bindListeners(),D.debug("Connecting",{transport:this.name,url:i}),this.changeState("connecting"),!0}close(){return this.socket?(this.socket.close(),!0):!1}send(i){return this.state==="open"?(W.defer(()=>{this.socket&&this.socket.send(i)}),!0):!1}ping(){this.state==="open"&&this.supportsPing()&&this.socket.ping()}onOpen(){this.hooks.beforeOpen&&this.hooks.beforeOpen(this.socket,this.hooks.urls.getPath(this.key,this.options)),this.changeState("open"),this.socket.onopen=void 0}onError(i){this.emit("error",{type:"WebSocketError",error:i}),this.timeline.error(this.buildTimelineMessage({error:i.toString()}))}onClose(i){i?this.changeState("closed",{code:i.code,reason:i.reason,wasClean:i.wasClean}):this.changeState("closed"),this.unbindListeners(),this.socket=void 0}onMessage(i){this.emit("message",i)}onActivity(){this.emit("activity")}bindListeners(){this.socket.onopen=()=>{this.onOpen()},this.socket.onerror=i=>{this.onError(i)},this.socket.onclose=i=>{this.onClose(i)},this.socket.onmessage=i=>{this.onMessage(i)},this.supportsPing()&&(this.socket.onactivity=()=>{this.onActivity()})}unbindListeners(){this.socket&&(this.socket.onopen=void 0,this.socket.onerror=void 0,this.socket.onclose=void 0,this.socket.onmessage=void 0,this.supportsPing()&&(this.socket.onactivity=void 0))}changeState(i,a){this.state=i,this.timeline.info(this.buildTimelineMessage({state:i,params:a})),this.emit(i,a)}buildTimelineMessage(i){return V({cid:this.id},i)}}class Pe{constructor(i){this.hooks=i}isSupported(i){return this.hooks.isSupported(i)}createConnection(i,a,l,f){return new Co(this.hooks,i,a,l,f)}}var ko=new Pe({urls:bo,handlesActivityChecks:!1,supportsPing:!1,isInitialized:function(){return!!P.getWebSocketAPI()},isSupported:function(){return!!P.getWebSocketAPI()},getSocket:function(c){return P.createWebSocket(c)}}),pr={urls:wo,handlesActivityChecks:!1,supportsPing:!0,isInitialized:function(){return!0}},gr=V({getSocket:function(c){return P.HTTPFactory.createStreamingSocket(c)}},pr),mr=V({getSocket:function(c){return P.HTTPFactory.createPollingSocket(c)}},pr),_r={isSupported:function(){return P.isXHRSupported()}},Eo=new Pe(V({},gr,_r)),To=new Pe(V({},mr,_r)),Ao={ws:ko,xhr_streaming:Eo,xhr_polling:To},ot=Ao,Oo=new Pe({file:"sockjs",urls:So,handlesActivityChecks:!0,supportsPing:!1,isSupported:function(){return!0},isInitialized:function(){return window.SockJS!==void 0},getSocket:function(c,i){return new window.SockJS(c,null,{js_path:p.getPath("sockjs",{useTLS:i.useTLS}),ignore_null_origin:i.ignoreNullOrigin})},beforeOpen:function(c,i){c.send(JSON.stringify({path:i}))}}),yr={isSupported:function(c){var i=P.isXDRSupported(c.useTLS);return i}},Po=new Pe(V({},gr,yr)),Ro=new Pe(V({},mr,yr));ot.xdr_streaming=Po,ot.xdr_polling=Ro,ot.sockjs=Oo;var Lo=ot;class Io extends ue{constructor(){super();var i=this;window.addEventListener!==void 0&&(window.addEventListener("online",function(){i.emit("online")},!1),window.addEventListener("offline",function(){i.emit("offline")},!1))}isOnline(){return window.navigator.onLine===void 0?!0:window.navigator.onLine}}var No=new Io;class jo{constructor(i,a,l){this.manager=i,this.transport=a,this.minPingDelay=l.minPingDelay,this.maxPingDelay=l.maxPingDelay,this.pingDelay=void 0}createConnection(i,a,l,f){f=V({},f,{activityTimeout:this.pingDelay});var y=this.transport.createConnection(i,a,l,f),C=null,T=function(){y.unbind("open",T),y.bind("closed",O),C=W.now()},O=L=>{if(y.unbind("closed",O),L.code===1002||L.code===1003)this.manager.reportDeath();else if(!L.wasClean&&C){var N=W.now()-C;N<2*this.maxPingDelay&&(this.manager.reportDeath(),this.pingDelay=Math.max(N/2,this.minPingDelay))}};return y.bind("open",T),y}isSupported(i){return this.manager.isAlive()&&this.transport.isSupported(i)}}const vr={decodeMessage:function(c){try{var i=JSON.parse(c.data),a=i.data;if(typeof a=="string")try{a=JSON.parse(i.data)}catch{}var l={event:i.event,channel:i.channel,data:a};return i.user_id&&(l.user_id=i.user_id),l}catch(f){throw{type:"MessageParseError",error:f,data:c.data}}},encodeMessage:function(c){return JSON.stringify(c)},processHandshake:function(c){var i=vr.decodeMessage(c);if(i.event==="pusher:connection_established"){if(!i.data.activity_timeout)throw"No activity timeout specified in handshake";return{action:"connected",id:i.data.socket_id,activityTimeout:i.data.activity_timeout*1e3}}else{if(i.event==="pusher:error")return{action:this.getCloseAction(i.data),error:this.getCloseError(i.data)};throw"Invalid handshake"}},getCloseAction:function(c){return c.code<4e3?c.code>=1002&&c.code<=1004?"backoff":null:c.code===4e3?"tls_only":c.code<4100?"refused":c.code<4200?"backoff":c.code<4300?"retry":"refused"},getCloseError:function(c){return c.code!==1e3&&c.code!==1001?{type:"PusherError",data:{code:c.code,message:c.reason||c.message}}:null}};var ve=vr;class Mo extends ue{constructor(i,a){super(),this.id=i,this.transport=a,this.activityTimeout=a.activityTimeout,this.bindListeners()}handlesActivityChecks(){return this.transport.handlesActivityChecks()}send(i){return this.transport.send(i)}send_event(i,a,l){var f={event:i,data:a};return l&&(f.channel=l),D.debug("Event sent",f),this.send(ve.encodeMessage(f))}ping(){this.transport.supportsPing()?this.transport.ping():this.send_event("pusher:ping",{})}close(){this.transport.close()}bindListeners(){var i={message:l=>{var f;try{f=ve.decodeMessage(l)}catch(y){this.emit("error",{type:"MessageParseError",error:y,data:l.data})}if(f!==void 0){switch(D.debug("Event recd",f),f.event){case"pusher:error":this.emit("error",{type:"PusherError",data:f.data});break;case"pusher:ping":this.emit("ping");break;case"pusher:pong":this.emit("pong");break}this.emit("message",f)}},activity:()=>{this.emit("activity")},error:l=>{this.emit("error",l)},closed:l=>{a(),l&&l.code&&this.handleCloseEvent(l),this.transport=null,this.emit("closed")}},a=()=>{ce(i,(l,f)=>{this.transport.unbind(f,l)})};ce(i,(l,f)=>{this.transport.bind(f,l)})}handleCloseEvent(i){var a=ve.getCloseAction(i),l=ve.getCloseError(i);l&&this.emit("error",l),a&&this.emit(a,{action:a,error:l})}}class Do{constructor(i,a){this.transport=i,this.callback=a,this.bindListeners()}close(){this.unbindListeners(),this.transport.close()}bindListeners(){this.onMessage=i=>{this.unbindListeners();var a;try{a=ve.processHandshake(i)}catch(l){this.finish("error",{error:l}),this.transport.close();return}a.action==="connected"?this.finish("connected",{connection:new Mo(a.id,this.transport),activityTimeout:a.activityTimeout}):(this.finish(a.action,{error:a.error}),this.transport.close())},this.onClosed=i=>{this.unbindListeners();var a=ve.getCloseAction(i)||"backoff",l=ve.getCloseError(i);this.finish(a,{error:l})},this.transport.bind("message",this.onMessage),this.transport.bind("closed",this.onClosed)}unbindListeners(){this.transport.unbind("message",this.onMessage),this.transport.unbind("closed",this.onClosed)}finish(i,a){this.callback(V({transport:this.transport,action:i},a))}}class Fo{constructor(i,a){this.timeline=i,this.options=a||{}}send(i,a){this.timeline.isEmpty()||this.timeline.send(P.TimelineTransport.getAgent(this,i),a)}}class qt extends ue{constructor(i,a){super(function(l,f){D.debug("No callbacks on "+i+" for "+l)}),this.name=i,this.pusher=a,this.subscribed=!1,this.subscriptionPending=!1,this.subscriptionCancelled=!1}authorize(i,a){return a(null,{auth:""})}trigger(i,a){if(i.indexOf("client-")!==0)throw new g("Event '"+i+"' does not start with 'client-'");if(!this.subscribed){var l=x.buildLogSuffix("triggeringClientEvents");D.warn(`Client event triggered before channel 'subscription_succeeded' event . ${l}`)}return this.pusher.send_event(i,a,this.name)}disconnect(){this.subscribed=!1,this.subscriptionPending=!1}handleEvent(i){var a=i.event,l=i.data;if(a==="pusher_internal:subscription_succeeded")this.handleSubscriptionSucceededEvent(i);else if(a==="pusher_internal:subscription_count")this.handleSubscriptionCountEvent(i);else if(a.indexOf("pusher_internal:")!==0){var f={};this.emit(a,l,f)}}handleSubscriptionSucceededEvent(i){this.subscriptionPending=!1,this.subscribed=!0,this.subscriptionCancelled?this.pusher.unsubscribe(this.name):this.emit("pusher:subscription_succeeded",i.data)}handleSubscriptionCountEvent(i){i.data.subscription_count&&(this.subscriptionCount=i.data.subscription_count),this.emit("pusher:subscription_count",i.data)}subscribe(){this.subscribed||(this.subscriptionPending=!0,this.subscriptionCancelled=!1,this.authorize(this.pusher.connection.socket_id,(i,a)=>{i?(this.subscriptionPending=!1,D.error(i.toString()),this.emit("pusher:subscription_error",Object.assign({},{type:"AuthError",error:i.message},i instanceof X?{status:i.status}:{}))):this.pusher.send_event("pusher:subscribe",{auth:a.auth,channel_data:a.channel_data,channel:this.name})}))}unsubscribe(){this.subscribed=!1,this.pusher.send_event("pusher:unsubscribe",{channel:this.name})}cancelSubscription(){this.subscriptionCancelled=!0}reinstateSubscription(){this.subscriptionCancelled=!1}}class zt extends qt{authorize(i,a){return this.pusher.config.channelAuthorizer({channelName:this.name,socketId:i},a)}}class Uo{constructor(){this.reset()}get(i){return Object.prototype.hasOwnProperty.call(this.members,i)?{id:i,info:this.members[i]}:null}each(i){ce(this.members,(a,l)=>{i(this.get(l))})}setMyID(i){this.myID=i}onSubscription(i){this.members=i.presence.hash,this.count=i.presence.count,this.me=this.get(this.myID)}addMember(i){return this.get(i.user_id)===null&&this.count++,this.members[i.user_id]=i.user_info,this.get(i.user_id)}removeMember(i){var a=this.get(i.user_id);return a&&(delete this.members[i.user_id],this.count--),a}reset(){this.members={},this.count=0,this.myID=null,this.me=null}}var Bo=function(c,i,a,l){function f(y){return y instanceof a?y:new a(function(C){C(y)})}return new(a||(a=Promise))(function(y,C){function T(N){try{L(l.next(N))}catch(F){C(F)}}function O(N){try{L(l.throw(N))}catch(F){C(F)}}function L(N){N.done?y(N.value):f(N.value).then(T,O)}L((l=l.apply(c,i||[])).next())})};class Ho extends zt{constructor(i,a){super(i,a),this.members=new Uo}authorize(i,a){super.authorize(i,(l,f)=>Bo(this,void 0,void 0,function*(){if(!l)if(f=f,f.channel_data!=null){var y=JSON.parse(f.channel_data);this.members.setMyID(y.user_id)}else if(yield this.pusher.user.signinDonePromise,this.pusher.user.user_data!=null)this.members.setMyID(this.pusher.user.user_data.id);else{let C=x.buildLogSuffix("authorizationEndpoint");D.error(`Invalid auth response for channel '${this.name}', expected 'channel_data' field. ${C}, or the user should be signed in.`),a("Invalid auth response");return}a(l,f)}))}handleEvent(i){var a=i.event;if(a.indexOf("pusher_internal:")===0)this.handleInternalEvent(i);else{var l=i.data,f={};i.user_id&&(f.user_id=i.user_id),this.emit(a,l,f)}}handleInternalEvent(i){var a=i.event,l=i.data;switch(a){case"pusher_internal:subscription_succeeded":this.handleSubscriptionSucceededEvent(i);break;case"pusher_internal:subscription_count":this.handleSubscriptionCountEvent(i);break;case"pusher_internal:member_added":var f=this.members.addMember(l);this.emit("pusher:member_added",f);break;case"pusher_internal:member_removed":var y=this.members.removeMember(l);y&&this.emit("pusher:member_removed",y);break}}handleSubscriptionSucceededEvent(i){this.subscriptionPending=!1,this.subscribed=!0,this.subscriptionCancelled?this.pusher.unsubscribe(this.name):(this.members.onSubscription(i.data),this.emit("pusher:subscription_succeeded",this.members))}disconnect(){this.members.reset(),super.disconnect()}}var qo=s(1),$t=s(0);class zo extends zt{constructor(i,a,l){super(i,a),this.key=null,this.nacl=l}authorize(i,a){super.authorize(i,(l,f)=>{if(l){a(l,f);return}let y=f.shared_secret;if(!y){a(new Error(`No shared_secret key in auth payload for encrypted channel: ${this.name}`),null);return}this.key=Object($t.decode)(y),delete f.shared_secret,a(null,f)})}trigger(i,a){throw new M("Client events are not currently supported for encrypted channels")}handleEvent(i){var a=i.event,l=i.data;if(a.indexOf("pusher_internal:")===0||a.indexOf("pusher:")===0){super.handleEvent(i);return}this.handleEncryptedEvent(a,l)}handleEncryptedEvent(i,a){if(!this.key){D.debug("Received encrypted event before key has been retrieved from the authEndpoint");return}if(!a.ciphertext||!a.nonce){D.error("Unexpected format for encrypted event, expected object with `ciphertext` and `nonce` fields, got: "+a);return}let l=Object($t.decode)(a.ciphertext);if(l.length{if(C){D.error(`Failed to make a request to the authEndpoint: ${T}. Unable to fetch new key, so dropping encrypted event`);return}if(y=this.nacl.secretbox.open(l,f,this.key),y===null){D.error("Failed to decrypt event with new key. Dropping encrypted event");return}this.emit(i,this.getDataToEmit(y))});return}this.emit(i,this.getDataToEmit(y))}getDataToEmit(i){let a=Object(qo.decode)(i);try{return JSON.parse(a)}catch{return a}}}class $o extends ue{constructor(i,a){super(),this.state="initialized",this.connection=null,this.key=i,this.options=a,this.timeline=this.options.timeline,this.usingTLS=this.options.useTLS,this.errorCallbacks=this.buildErrorCallbacks(),this.connectionCallbacks=this.buildConnectionCallbacks(this.errorCallbacks),this.handshakeCallbacks=this.buildHandshakeCallbacks(this.errorCallbacks);var l=P.getNetwork();l.bind("online",()=>{this.timeline.info({netinfo:"online"}),(this.state==="connecting"||this.state==="unavailable")&&this.retryIn(0)}),l.bind("offline",()=>{this.timeline.info({netinfo:"offline"}),this.connection&&this.sendActivityCheck()}),this.updateStrategy()}switchCluster(i){this.key=i,this.updateStrategy(),this.retryIn(0)}connect(){if(!(this.connection||this.runner)){if(!this.strategy.isSupported()){this.updateState("failed");return}this.updateState("connecting"),this.startConnecting(),this.setUnavailableTimer()}}send(i){return this.connection?this.connection.send(i):!1}send_event(i,a,l){return this.connection?this.connection.send_event(i,a,l):!1}disconnect(){this.disconnectInternally(),this.updateState("disconnected")}isUsingTLS(){return this.usingTLS}startConnecting(){var i=(a,l)=>{a?this.runner=this.strategy.connect(0,i):l.action==="error"?(this.emit("error",{type:"HandshakeError",error:l.error}),this.timeline.error({handshakeError:l.error})):(this.abortConnecting(),this.handshakeCallbacks[l.action](l))};this.runner=this.strategy.connect(0,i)}abortConnecting(){this.runner&&(this.runner.abort(),this.runner=null)}disconnectInternally(){if(this.abortConnecting(),this.clearRetryTimer(),this.clearUnavailableTimer(),this.connection){var i=this.abandonConnection();i.close()}}updateStrategy(){this.strategy=this.options.getStrategy({key:this.key,timeline:this.timeline,useTLS:this.usingTLS})}retryIn(i){this.timeline.info({action:"retry",delay:i}),i>0&&this.emit("connecting_in",Math.round(i/1e3)),this.retryTimer=new ye(i||0,()=>{this.disconnectInternally(),this.connect()})}clearRetryTimer(){this.retryTimer&&(this.retryTimer.ensureAborted(),this.retryTimer=null)}setUnavailableTimer(){this.unavailableTimer=new ye(this.options.unavailableTimeout,()=>{this.updateState("unavailable")})}clearUnavailableTimer(){this.unavailableTimer&&this.unavailableTimer.ensureAborted()}sendActivityCheck(){this.stopActivityCheck(),this.connection.ping(),this.activityTimer=new ye(this.options.pongTimeout,()=>{this.timeline.error({pong_timed_out:this.options.pongTimeout}),this.retryIn(0)})}resetActivityCheck(){this.stopActivityCheck(),this.connection&&!this.connection.handlesActivityChecks()&&(this.activityTimer=new ye(this.activityTimeout,()=>{this.sendActivityCheck()}))}stopActivityCheck(){this.activityTimer&&this.activityTimer.ensureAborted()}buildConnectionCallbacks(i){return V({},i,{message:a=>{this.resetActivityCheck(),this.emit("message",a)},ping:()=>{this.send_event("pusher:pong",{})},activity:()=>{this.resetActivityCheck()},error:a=>{this.emit("error",a)},closed:()=>{this.abandonConnection(),this.shouldRetry()&&this.retryIn(1e3)}})}buildHandshakeCallbacks(i){return V({},i,{connected:a=>{this.activityTimeout=Math.min(this.options.activityTimeout,a.activityTimeout,a.connection.activityTimeout||1/0),this.clearUnavailableTimer(),this.setConnection(a.connection),this.socket_id=this.connection.id,this.updateState("connected",{socket_id:this.socket_id})}})}buildErrorCallbacks(){let i=a=>l=>{l.error&&this.emit("error",{type:"WebSocketError",error:l.error}),a(l)};return{tls_only:i(()=>{this.usingTLS=!0,this.updateStrategy(),this.retryIn(0)}),refused:i(()=>{this.disconnect()}),backoff:i(()=>{this.retryIn(1e3)}),retry:i(()=>{this.retryIn(0)})}}setConnection(i){this.connection=i;for(var a in this.connectionCallbacks)this.connection.bind(a,this.connectionCallbacks[a]);this.resetActivityCheck()}abandonConnection(){if(this.connection){this.stopActivityCheck();for(var i in this.connectionCallbacks)this.connection.unbind(i,this.connectionCallbacks[i]);var a=this.connection;return this.connection=null,a}}updateState(i,a){var l=this.state;if(this.state=i,l!==i){var f=i;f==="connected"&&(f+=" with new socket ID "+a.socket_id),D.debug("State changed",l+" -> "+f),this.timeline.info({state:i,params:a}),this.emit("state_change",{previous:l,current:i}),this.emit(i,a)}}shouldRetry(){return this.state==="connecting"||this.state==="connected"}}class Jo{constructor(){this.channels={}}add(i,a){return this.channels[i]||(this.channels[i]=Wo(i,a)),this.channels[i]}all(){return ro(this.channels)}find(i){return this.channels[i]}remove(i){var a=this.channels[i];return delete this.channels[i],a}disconnect(){ce(this.channels,function(i){i.disconnect()})}}function Wo(c,i){if(c.indexOf("private-encrypted-")===0){if(i.config.nacl)return le.createEncryptedChannel(c,i,i.config.nacl);let a="Tried to subscribe to a private-encrypted- channel but no nacl implementation available",l=x.buildLogSuffix("encryptedChannelSupport");throw new M(`${a}. ${l}`)}else{if(c.indexOf("private-")===0)return le.createPrivateChannel(c,i);if(c.indexOf("presence-")===0)return le.createPresenceChannel(c,i);if(c.indexOf("#")===0)throw new b('Cannot create a channel with name "'+c+'".');return le.createChannel(c,i)}}var Ko={createChannels(){return new Jo},createConnectionManager(c,i){return new $o(c,i)},createChannel(c,i){return new qt(c,i)},createPrivateChannel(c,i){return new zt(c,i)},createPresenceChannel(c,i){return new Ho(c,i)},createEncryptedChannel(c,i,a){return new zo(c,i,a)},createTimelineSender(c,i){return new Fo(c,i)},createHandshake(c,i){return new Do(c,i)},createAssistantToTheTransportManager(c,i,a){return new jo(c,i,a)}},le=Ko;class br{constructor(i){this.options=i||{},this.livesLeft=this.options.lives||1/0}getAssistant(i){return le.createAssistantToTheTransportManager(this,i,{minPingDelay:this.options.minPingDelay,maxPingDelay:this.options.maxPingDelay})}isAlive(){return this.livesLeft>0}reportDeath(){this.livesLeft-=1}}class be{constructor(i,a){this.strategies=i,this.loop=!!a.loop,this.failFast=!!a.failFast,this.timeout=a.timeout,this.timeoutLimit=a.timeoutLimit}isSupported(){return dr(this.strategies,W.method("isSupported"))}connect(i,a){var l=this.strategies,f=0,y=this.timeout,C=null,T=(O,L)=>{L?a(null,L):(f=f+1,this.loop&&(f=f%l.length),f0&&(y=new ye(l.timeout,function(){C.abort(),f(!0)})),C=i.connect(a,function(T,O){T&&y&&y.isRunning()&&!l.failFast||(y&&y.ensureAborted(),f(T,O))}),{abort:function(){y&&y.ensureAborted(),C.abort()},forceMinPriority:function(T){C.forceMinPriority(T)}}}}class Jt{constructor(i){this.strategies=i}isSupported(){return dr(this.strategies,W.method("isSupported"))}connect(i,a){return Xo(this.strategies,i,function(l,f){return function(y,C){if(f[l].error=y,y){Vo(f)&&a(!0);return}Ue(f,function(T){T.forceMinPriority(C.transport.priority)}),a(null,C)}})}}function Xo(c,i,a){var l=lr(c,function(f,y,C,T){return f.connect(i,a(y,T))});return{abort:function(){Ue(l,Go)},forceMinPriority:function(f){Ue(l,function(y){y.forceMinPriority(f)})}}}function Vo(c){return ao(c,function(i){return!!i.error})}function Go(c){!c.error&&!c.aborted&&(c.abort(),c.aborted=!0)}class Qo{constructor(i,a,l){this.strategy=i,this.transports=a,this.ttl=l.ttl||1800*1e3,this.usingTLS=l.useTLS,this.timeline=l.timeline}isSupported(){return this.strategy.isSupported()}connect(i,a){var l=this.usingTLS,f=Yo(l),y=f&&f.cacheSkipCount?f.cacheSkipCount:0,C=[this.strategy];if(f&&f.timestamp+this.ttl>=W.now()){var T=this.transports[f.transport];T&&(["ws","wss"].includes(f.transport)||y>3?(this.timeline.info({cached:!0,transport:f.transport,latency:f.latency}),C.push(new be([T],{timeout:f.latency*2+1e3,failFast:!0}))):y++)}var O=W.now(),L=C.pop().connect(i,function N(F,ut){F?(wr(l),C.length>0?(O=W.now(),L=C.pop().connect(i,N)):a(F)):(Zo(l,ut.transport.name,W.now()-O,y),a(null,ut))});return{abort:function(){L.abort()},forceMinPriority:function(N){i=N,L&&L.forceMinPriority(N)}}}}function Wt(c){return"pusherTransport"+(c?"TLS":"NonTLS")}function Yo(c){var i=P.getLocalStorage();if(i)try{var a=i[Wt(c)];if(a)return JSON.parse(a)}catch{wr(c)}return null}function Zo(c,i,a,l){var f=P.getLocalStorage();if(f)try{f[Wt(c)]=st({timestamp:W.now(),transport:i,latency:a,cacheSkipCount:l})}catch{}}function wr(c){var i=P.getLocalStorage();if(i)try{delete i[Wt(c)]}catch{}}class at{constructor(i,{delay:a}){this.strategy=i,this.options={delay:a}}isSupported(){return this.strategy.isSupported()}connect(i,a){var l=this.strategy,f,y=new ye(this.options.delay,function(){f=l.connect(i,a)});return{abort:function(){y.ensureAborted(),f&&f.abort()},forceMinPriority:function(C){i=C,f&&f.forceMinPriority(C)}}}}class Be{constructor(i,a,l){this.test=i,this.trueBranch=a,this.falseBranch=l}isSupported(){var i=this.test()?this.trueBranch:this.falseBranch;return i.isSupported()}connect(i,a){var l=this.test()?this.trueBranch:this.falseBranch;return l.connect(i,a)}}class ea{constructor(i){this.strategy=i}isSupported(){return this.strategy.isSupported()}connect(i,a){var l=this.strategy.connect(i,function(f,y){y&&l.abort(),a(f,y)});return l}}function He(c){return function(){return c.isSupported()}}var ta=function(c,i,a){var l={};function f(Nr,Za,ec,tc,nc){var jr=a(c,Nr,Za,ec,tc,nc);return l[Nr]=jr,jr}var y=Object.assign({},i,{hostNonTLS:c.wsHost+":"+c.wsPort,hostTLS:c.wsHost+":"+c.wssPort,httpPath:c.wsPath}),C=Object.assign({},y,{useTLS:!0}),T=Object.assign({},i,{hostNonTLS:c.httpHost+":"+c.httpPort,hostTLS:c.httpHost+":"+c.httpsPort,httpPath:c.httpPath}),O={loop:!0,timeout:15e3,timeoutLimit:6e4},L=new br({minPingDelay:1e4,maxPingDelay:c.activityTimeout}),N=new br({lives:2,minPingDelay:1e4,maxPingDelay:c.activityTimeout}),F=f("ws","ws",3,y,L),ut=f("wss","ws",3,C,L),Xa=f("sockjs","sockjs",1,T),Ar=f("xhr_streaming","xhr_streaming",1,T,N),Va=f("xdr_streaming","xdr_streaming",1,T,N),Or=f("xhr_polling","xhr_polling",1,T),Ga=f("xdr_polling","xdr_polling",1,T),Pr=new be([F],O),Qa=new be([ut],O),Ya=new be([Xa],O),Rr=new be([new Be(He(Ar),Ar,Va)],O),Lr=new be([new Be(He(Or),Or,Ga)],O),Ir=new be([new Be(He(Rr),new Jt([Rr,new at(Lr,{delay:4e3})]),Lr)],O),Gt=new Be(He(Ir),Ir,Ya),Qt;return i.useTLS?Qt=new Jt([Pr,new at(Gt,{delay:2e3})]):Qt=new Jt([Pr,new at(Qa,{delay:2e3}),new at(Gt,{delay:5e3})]),new Qo(new ea(new Be(He(F),Qt,Gt)),l,{ttl:18e5,timeline:i.timeline,useTLS:i.useTLS})},na=ta,ra=function(){var c=this;c.timeline.info(c.buildTimelineMessage({transport:c.name+(c.options.useTLS?"s":"")})),c.hooks.isInitialized()?c.changeState("initialized"):c.hooks.file?(c.changeState("initializing"),p.load(c.hooks.file,{useTLS:c.options.useTLS},function(i,a){c.hooks.isInitialized()?(c.changeState("initialized"),a(!0)):(i&&c.onError(i),c.onClose(),a(!1))})):c.onClose()},ia={getRequest:function(c){var i=new window.XDomainRequest;return i.ontimeout=function(){c.emit("error",new k),c.close()},i.onerror=function(a){c.emit("error",a),c.close()},i.onprogress=function(){i.responseText&&i.responseText.length>0&&c.onChunk(200,i.responseText)},i.onload=function(){i.responseText&&i.responseText.length>0&&c.onChunk(200,i.responseText),c.emit("finished",200),c.close()},i},abortRequest:function(c){c.ontimeout=c.onerror=c.onprogress=c.onload=null,c.abort()}},sa=ia;const oa=256*1024;class aa extends ue{constructor(i,a,l){super(),this.hooks=i,this.method=a,this.url=l}start(i){this.position=0,this.xhr=this.hooks.getRequest(this),this.unloader=()=>{this.close()},P.addUnloadListener(this.unloader),this.xhr.open(this.method,this.url,!0),this.xhr.setRequestHeader&&this.xhr.setRequestHeader("Content-Type","application/json"),this.xhr.send(i)}close(){this.unloader&&(P.removeUnloadListener(this.unloader),this.unloader=null),this.xhr&&(this.hooks.abortRequest(this.xhr),this.xhr=null)}onChunk(i,a){for(;;){var l=this.advanceBuffer(a);if(l)this.emit("chunk",{status:i,data:l});else break}this.isBufferTooLong(a)&&this.emit("buffer_too_long")}advanceBuffer(i){var a=i.slice(this.position),l=a.indexOf(` `);return l!==-1?(this.position+=l+1,a.slice(0,l)):null}isBufferTooLong(i){return this.position===i.length&&i.length>oa}}var Kt;(function(c){c[c.CONNECTING=0]="CONNECTING",c[c.OPEN=1]="OPEN",c[c.CLOSED=3]="CLOSED"})(Kt||(Kt={}));var we=Kt,ca=1;class ua{constructor(i,a){this.hooks=i,this.session=xr(1e3)+"/"+da(8),this.location=la(a),this.readyState=we.CONNECTING,this.openStream()}send(i){return this.sendRaw(JSON.stringify([i]))}ping(){this.hooks.sendHeartbeat(this)}close(i,a){this.onClose(i,a,!0)}sendRaw(i){if(this.readyState===we.OPEN)try{return P.createSocketRequest("POST",Sr(ha(this.location,this.session))).start(i),!0}catch{return!1}else return!1}reconnect(){this.closeStream(),this.openStream()}onClose(i,a,l){this.closeStream(),this.readyState=we.CLOSED,this.onclose&&this.onclose({code:i,reason:a,wasClean:l})}onChunk(i){if(i.status===200){this.readyState===we.OPEN&&this.onActivity();var a,l=i.data.slice(0,1);switch(l){case"o":a=JSON.parse(i.data.slice(1)||"{}"),this.onOpen(a);break;case"a":a=JSON.parse(i.data.slice(1)||"[]");for(var f=0;f{this.onChunk(i)}),this.stream.bind("finished",i=>{this.hooks.onFinished(this,i)}),this.stream.bind("buffer_too_long",()=>{this.reconnect()});try{this.stream.start()}catch(i){W.defer(()=>{this.onError(i),this.onClose(1006,"Could not start streaming",!1)})}}closeStream(){this.stream&&(this.stream.unbind_all(),this.stream.close(),this.stream=null)}}function la(c){var i=/([^\?]*)\/*(\??.*)/.exec(c);return{base:i[1],queryString:i[2]}}function ha(c,i){return c.base+"/"+i+"/xhr_send"}function Sr(c){var i=c.indexOf("?")===-1?"?":"&";return c+i+"t="+ +new Date+"&n="+ca++}function fa(c,i){var a=/(https?:\/\/)([^\/:]+)((\/|:)?.*)/.exec(c);return a[1]+i+a[3]}function xr(c){return P.randomInt(c)}function da(c){for(var i=[],a=0;a0&&c.onChunk(a.status,a.responseText);break;case 4:a.responseText&&a.responseText.length>0&&c.onChunk(a.status,a.responseText),c.emit("finished",a.status),c.close();break}},a},abortRequest:function(c){c.onreadystatechange=null,c.abort()}},ba=va,wa={createStreamingSocket(c){return this.createSocket(ma,c)},createPollingSocket(c){return this.createSocket(ya,c)},createSocket(c,i){return new pa(c,i)},createXHR(c,i){return this.createRequest(ba,c,i)},createRequest(c,i,a){return new aa(c,i,a)}},Cr=wa;Cr.createXDR=function(c,i){return this.createRequest(sa,c,i)};var Sa=Cr,xa={nextAuthCallbackID:1,auth_callbacks:{},ScriptReceivers:u,DependenciesReceivers:m,getDefaultStrategy:na,Transports:Lo,transportConnectionInitializer:ra,HTTPFactory:Sa,TimelineTransport:vo,getXHRAPI(){return window.XMLHttpRequest},getWebSocketAPI(){return window.WebSocket||window.MozWebSocket},setup(c){window.Pusher=c;var i=()=>{this.onDocumentBody(c.ready)};window.JSON?i():p.load("json2",{},i)},getDocument(){return document},getProtocol(){return this.getDocument().location.protocol},getAuthorizers(){return{ajax:ie,jsonp:po}},onDocumentBody(c){document.body?c():setTimeout(()=>{this.onDocumentBody(c)},0)},createJSONPRequest(c,i){return new mo(c,i)},createScriptRequest(c){return new go(c)},getLocalStorage(){try{return window.localStorage}catch{return}},createXHR(){return this.getXHRAPI()?this.createXMLHttpRequest():this.createMicrosoftXHR()},createXMLHttpRequest(){var c=this.getXHRAPI();return new c},createMicrosoftXHR(){return new ActiveXObject("Microsoft.XMLHTTP")},getNetwork(){return No},createWebSocket(c){var i=this.getWebSocketAPI();return new i(c)},createSocketRequest(c,i){if(this.isXHRSupported())return this.HTTPFactory.createXHR(c,i);if(this.isXDRSupported(i.indexOf("https:")===0))return this.HTTPFactory.createXDR(c,i);throw"Cross-origin HTTP requests are not supported"},isXHRSupported(){var c=this.getXHRAPI();return!!c&&new c().withCredentials!==void 0},isXDRSupported(c){var i=c?"https:":"http:",a=this.getProtocol();return!!window.XDomainRequest&&a===i},addUnloadListener(c){window.addEventListener!==void 0?window.addEventListener("unload",c,!1):window.attachEvent!==void 0&&window.attachEvent("onunload",c)},removeUnloadListener(c){window.addEventListener!==void 0?window.removeEventListener("unload",c,!1):window.detachEvent!==void 0&&window.detachEvent("onunload",c)},randomInt(c){return Math.floor(function(){return(window.crypto||window.msCrypto).getRandomValues(new Uint32Array(1))[0]/Math.pow(2,32)}()*c)}},P=xa,Xt;(function(c){c[c.ERROR=3]="ERROR",c[c.INFO=6]="INFO",c[c.DEBUG=7]="DEBUG"})(Xt||(Xt={}));var ct=Xt;class Ca{constructor(i,a,l){this.key=i,this.session=a,this.events=[],this.options=l||{},this.sent=0,this.uniqueID=0}log(i,a){i<=this.options.level&&(this.events.push(V({},a,{timestamp:W.now()})),this.options.limit&&this.events.length>this.options.limit&&this.events.shift())}error(i){this.log(ct.ERROR,i)}info(i){this.log(ct.INFO,i)}debug(i){this.log(ct.DEBUG,i)}isEmpty(){return this.events.length===0}send(i,a){var l=V({session:this.session,bundle:this.sent+1,key:this.key,lib:"js",version:this.options.version,cluster:this.options.cluster,features:this.options.features,timeline:this.events},this.options.params);return this.events=[],i(l,(f,y)=>{f||this.sent++,a&&a(f,y)}),!0}generateUniqueID(){return this.uniqueID++,this.uniqueID}}class ka{constructor(i,a,l,f){this.name=i,this.priority=a,this.transport=l,this.options=f||{}}isSupported(){return this.transport.isSupported({useTLS:this.options.useTLS})}connect(i,a){if(this.isSupported()){if(this.priority{l||(N(),y?y.close():f.close())},forceMinPriority:F=>{l||this.priority{var a="socket_id="+encodeURIComponent(c.socketId);for(var l in i.params)a+="&"+encodeURIComponent(l)+"="+encodeURIComponent(i.params[l]);if(i.paramsProvider!=null){let f=i.paramsProvider();for(var l in f)a+="&"+encodeURIComponent(l)+"="+encodeURIComponent(f[l])}return a};var Ra=c=>{if(typeof P.getAuthorizers()[c.transport]>"u")throw`'${c.transport}' is not a recognized auth transport`;return(i,a)=>{const l=Pa(i,c);P.getAuthorizers()[c.transport](P,l,c,w.UserAuthentication,a)}};const La=(c,i)=>{var a="socket_id="+encodeURIComponent(c.socketId);a+="&channel_name="+encodeURIComponent(c.channelName);for(var l in i.params)a+="&"+encodeURIComponent(l)+"="+encodeURIComponent(i.params[l]);if(i.paramsProvider!=null){let f=i.paramsProvider();for(var l in f)a+="&"+encodeURIComponent(l)+"="+encodeURIComponent(f[l])}return a};var Ia=c=>{if(typeof P.getAuthorizers()[c.transport]>"u")throw`'${c.transport}' is not a recognized auth transport`;return(i,a)=>{const l=La(i,c);P.getAuthorizers()[c.transport](P,l,c,w.ChannelAuthorization,a)}};const Na=(c,i,a)=>{const l={authTransport:i.transport,authEndpoint:i.endpoint,auth:{params:i.params,headers:i.headers}};return(f,y)=>{const C=c.channel(f.channelName);a(C,l).authorize(f.socketId,y)}};function Er(c,i){let a={activityTimeout:c.activityTimeout||d.activityTimeout,cluster:c.cluster,httpPath:c.httpPath||d.httpPath,httpPort:c.httpPort||d.httpPort,httpsPort:c.httpsPort||d.httpsPort,pongTimeout:c.pongTimeout||d.pongTimeout,statsHost:c.statsHost||d.stats_host,unavailableTimeout:c.unavailableTimeout||d.unavailableTimeout,wsPath:c.wsPath||d.wsPath,wsPort:c.wsPort||d.wsPort,wssPort:c.wssPort||d.wssPort,enableStats:Ua(c),httpHost:ja(c),useTLS:Fa(c),wsHost:Ma(c),userAuthenticator:Ba(c),channelAuthorizer:qa(c,i)};return"disabledTransports"in c&&(a.disabledTransports=c.disabledTransports),"enabledTransports"in c&&(a.enabledTransports=c.enabledTransports),"ignoreNullOrigin"in c&&(a.ignoreNullOrigin=c.ignoreNullOrigin),"timelineParams"in c&&(a.timelineParams=c.timelineParams),"nacl"in c&&(a.nacl=c.nacl),a}function ja(c){return c.httpHost?c.httpHost:c.cluster?`sockjs-${c.cluster}.pusher.com`:d.httpHost}function Ma(c){return c.wsHost?c.wsHost:Da(c.cluster)}function Da(c){return`ws-${c}.pusher.com`}function Fa(c){return P.getProtocol()==="https:"?!0:c.forceTLS!==!1}function Ua(c){return"enableStats"in c?c.enableStats:"disableStats"in c?!c.disableStats:!1}const Tr=c=>"customHandler"in c&&c.customHandler!=null;function Ba(c){const i=Object.assign(Object.assign({},d.userAuthentication),c.userAuthentication);return Tr(i)?i.customHandler:Ra(i)}function Ha(c,i){let a;if("channelAuthorization"in c)a=Object.assign(Object.assign({},d.channelAuthorization),c.channelAuthorization);else if(a={transport:c.authTransport||d.authTransport,endpoint:c.authEndpoint||d.authEndpoint},"auth"in c&&("params"in c.auth&&(a.params=c.auth.params),"headers"in c.auth&&(a.headers=c.auth.headers)),"authorizer"in c)return{customHandler:Na(i,a,c.authorizer)};return a}function qa(c,i){const a=Ha(c,i);return Tr(a)?a.customHandler:Ia(a)}class za extends ue{constructor(i){super(function(a,l){D.debug(`No callbacks on watchlist events for ${a}`)}),this.pusher=i,this.bindWatchlistInternalEvent()}handleEvent(i){i.data.events.forEach(a=>{this.emit(a.name,a)})}bindWatchlistInternalEvent(){this.pusher.connection.bind("message",i=>{var a=i.event;a==="pusher_internal:watchlist_events"&&this.handleEvent(i)})}}function $a(){let c,i;return{promise:new Promise((l,f)=>{c=l,i=f}),resolve:c,reject:i}}var Ja=$a;class Wa extends ue{constructor(i){super(function(a,l){D.debug("No callbacks on user for "+a)}),this.signin_requested=!1,this.user_data=null,this.serverToUserChannel=null,this.signinDonePromise=null,this._signinDoneResolve=null,this._onAuthorize=(a,l)=>{if(a){D.warn(`Error during signin: ${a}`),this._cleanup();return}this.pusher.send_event("pusher:signin",{auth:l.auth,user_data:l.user_data})},this.pusher=i,this.pusher.connection.bind("state_change",({previous:a,current:l})=>{a!=="connected"&&l==="connected"&&this._signin(),a==="connected"&&l!=="connected"&&(this._cleanup(),this._newSigninPromiseIfNeeded())}),this.watchlist=new za(i),this.pusher.connection.bind("message",a=>{var l=a.event;l==="pusher:signin_success"&&this._onSigninSuccess(a.data),this.serverToUserChannel&&this.serverToUserChannel.name===a.channel&&this.serverToUserChannel.handleEvent(a)})}signin(){this.signin_requested||(this.signin_requested=!0,this._signin())}_signin(){this.signin_requested&&(this._newSigninPromiseIfNeeded(),this.pusher.connection.state==="connected"&&this.pusher.config.userAuthenticator({socketId:this.pusher.connection.socket_id},this._onAuthorize))}_onSigninSuccess(i){try{this.user_data=JSON.parse(i.user_data)}catch{D.error(`Failed parsing user data after signin: ${i.user_data}`),this._cleanup();return}if(typeof this.user_data.id!="string"||this.user_data.id===""){D.error(`user_data doesn't contain an id. user_data: ${this.user_data}`),this._cleanup();return}this._signinDoneResolve(),this._subscribeChannels()}_subscribeChannels(){const i=a=>{a.subscriptionPending&&a.subscriptionCancelled?a.reinstateSubscription():!a.subscriptionPending&&this.pusher.connection.state==="connected"&&a.subscribe()};this.serverToUserChannel=new qt(`#server-to-user-${this.user_data.id}`,this.pusher),this.serverToUserChannel.bind_global((a,l)=>{a.indexOf("pusher_internal:")===0||a.indexOf("pusher:")===0||this.emit(a,l)}),i(this.serverToUserChannel)}_cleanup(){this.user_data=null,this.serverToUserChannel&&(this.serverToUserChannel.unbind_all(),this.serverToUserChannel.disconnect(),this.serverToUserChannel=null),this.signin_requested&&this._signinDoneResolve()}_newSigninPromiseIfNeeded(){if(!this.signin_requested||this.signinDonePromise&&!this.signinDonePromise.done)return;const{promise:i,resolve:a,reject:l}=Ja();i.done=!1;const f=()=>{i.done=!0};i.then(f).catch(f),this.signinDonePromise=i,this._signinDoneResolve=a}}class z{static ready(){z.isReady=!0;for(var i=0,a=z.instances.length;iP.getDefaultStrategy(this.config,f,Ta);this.connection=le.createConnectionManager(this.key,{getStrategy:l,timeline:this.timeline,activityTimeout:this.config.activityTimeout,pongTimeout:this.config.pongTimeout,unavailableTimeout:this.config.unavailableTimeout,useTLS:!!this.config.useTLS}),this.connection.bind("connected",()=>{this.subscribeAll(),this.timelineSender&&this.timelineSender.send(this.connection.isUsingTLS())}),this.connection.bind("message",f=>{var y=f.event,C=y.indexOf("pusher_internal:")===0;if(f.channel){var T=this.channel(f.channel);T&&T.handleEvent(f)}C||this.global_emitter.emit(f.event,f.data)}),this.connection.bind("connecting",()=>{this.channels.disconnect()}),this.connection.bind("disconnected",()=>{this.channels.disconnect()}),this.connection.bind("error",f=>{D.warn(f)}),z.instances.push(this),this.timeline.info({instances:z.instances.length}),this.user=new Wa(this),z.isReady&&this.connect()}switchCluster(i){const{appKey:a,cluster:l}=i;this.key=a,this.options=Object.assign(Object.assign({},this.options),{cluster:l}),this.config=Er(this.options,this),this.connection.switchCluster(this.key)}channel(i){return this.channels.find(i)}allChannels(){return this.channels.all()}connect(){if(this.connection.connect(),this.timelineSender&&!this.timelineSenderTimer){var i=this.connection.isUsingTLS(),a=this.timelineSender;this.timelineSenderTimer=new eo(6e4,function(){a.send(i)})}}disconnect(){this.connection.disconnect(),this.timelineSenderTimer&&(this.timelineSenderTimer.ensureAborted(),this.timelineSenderTimer=null)}bind(i,a,l){return this.global_emitter.bind(i,a,l),this}unbind(i,a,l){return this.global_emitter.unbind(i,a,l),this}bind_global(i){return this.global_emitter.bind_global(i),this}unbind_global(i){return this.global_emitter.unbind_global(i),this}unbind_all(i){return this.global_emitter.unbind_all(),this}subscribeAll(){var i;for(i in this.channels.channels)this.channels.channels.hasOwnProperty(i)&&this.subscribe(i)}subscribe(i){var a=this.channels.add(i,this);return a.subscriptionPending&&a.subscriptionCancelled?a.reinstateSubscription():!a.subscriptionPending&&this.connection.state==="connected"&&a.subscribe(),a}unsubscribe(i){var a=this.channels.find(i);a&&a.subscriptionPending?a.cancelSubscription():(a=this.channels.remove(i),a&&a.subscribed&&a.unsubscribe())}send_event(i,a,l){return this.connection.send_event(i,a,l)}shouldUseTLS(){return this.config.useTLS}signin(){this.user.signin()}}z.instances=[],z.isReady=!1,z.logToConsole=!1,z.Runtime=P,z.ScriptReceivers=P.ScriptReceivers,z.DependenciesReceivers=P.DependenciesReceivers,z.auth_callbacks=P.auth_callbacks;var Vt=r.default=z;function Ka(c){if(c==null)throw"You must pass your app key when you instantiate Pusher."}P.setup(z)}])})})(Ni);var Lu=Ni.exports;const Iu=Ru(Lu);window.Pusher=Iu;window.Echo=new Pu({broadcaster:"reverb",key:"zlno4t94kysjzmtwlmux",wsHost:"localhost",wsPort:"8080",wssPort:"8080",forceTLS:!1,enabledTransports:["ws","wss"]});window.axios=vu;window.axios.defaults.headers.common["X-Requested-With"]="XMLHttpRequest";var pn=!1,gn=!1,Ce=[],mn=-1;function Nu(e){ju(e)}function ju(e){Ce.includes(e)||Ce.push(e),Mu()}function ji(e){let t=Ce.indexOf(e);t!==-1&&t>mn&&Ce.splice(t,1)}function Mu(){!gn&&!pn&&(pn=!0,queueMicrotask(Du))}function Du(){pn=!1,gn=!0;for(let e=0;ee.effect(t,{scheduler:n=>{_n?Nu(n):n()}}),Mi=e.raw}function Gr(e){Ae=e}function Bu(e){let t=()=>{};return[r=>{let s=Ae(r);return e._x_effects||(e._x_effects=new Set,e._x_runEffects=()=>{e._x_effects.forEach(o=>o())}),e._x_effects.add(s),t=()=>{s!==void 0&&(e._x_effects.delete(s),Me(s))},s},()=>{t()}]}function Di(e,t){let n=!0,r,s=Ae(()=>{let o=e();JSON.stringify(o),n?r=o:queueMicrotask(()=>{t(o,r),r=o}),n=!1});return()=>Me(s)}function Ke(e,t,n={}){e.dispatchEvent(new CustomEvent(t,{detail:n,bubbles:!0,composed:!0,cancelable:!0}))}function ge(e,t){if(typeof ShadowRoot=="function"&&e instanceof ShadowRoot){Array.from(e.children).forEach(s=>ge(s,t));return}let n=!1;if(t(e,()=>n=!0),n)return;let r=e.firstElementChild;for(;r;)ge(r,t),r=r.nextElementSibling}function te(e,...t){console.warn(`Alpine Warning: ${e}`,...t)}var Qr=!1;function Hu(){Qr&&te("Alpine has already been initialized on this page. Calling Alpine.start() more than once can cause problems."),Qr=!0,document.body||te("Unable to initialize. Trying to load Alpine before `` is available. Did you forget to add `defer` in Alpine's `