1import{dY as K,e4 as Je}from"./inertia-CqvOxjk8.js";import{r as Wo}from"./browser-Bt-u65KX.js";function Jo(c,h){for(var a=0;a<h.length;a++){const u=h[a];if(typeof u!="string"&&!Array.isArray(u)){for(const y in u)if(y!=="default"&&!(y in c)){const g=Object.getOwnPropertyDescriptor(u,y);g&&Object.defineProperty(c,y,g.get?g:{enumerable:!0,get:()=>u[y]})}}}return Object.freeze(Object.defineProperty(c,Symbol.toStringTag,{value:"Module"}))}var nr={},Nt={},at={};var ir,Fn;function Vo(){if(Fn)return ir;Fn=1;function c(e,t){return function(){return e.apply(t,arguments)}}const{toString:h}=Object.prototype,{getPrototypeOf:a}=Object,{iterator:u,toStringTag:y}=Symbol,g=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),f=e=>typeof e=="string"&&(e==="__proto__"||e==="constructor"||e==="prototype"),d=(e,t,r)=>e===Object.prototype||!r&&t===null,p=e=>{if(!Object.isExtensible(e))return!1;const t=Object.getOwnPropertyNames(e);return Object.getOwnPropertySymbols&&t.push(...Object.getOwnPropertySymbols(e)),t.every(r=>{if(f(r))return!1;const n=Object.getOwnPropertyDescriptor(e,r);return!!n&&n.configurable&&n.writable===!0})},s=(e,t)=>{let r=e;const n=[];for(;r!=null;){if(n.indexOf(r)!==-1)return!1;n.push(r);const i=a(r);if(d(r,i,r===e))return!1;if(g(r,t))return!0;r=i}return!1},o=(e,t)=>e!=null&&s(e,t)?e[t]:void 0,E=e=>{if(e==null||typeof e!="object"&&typeof e!="function")return e;const t=a(e);if(t===null&&p(e))return e;const r=Object.create(null),n=Object.create(null),i=[];let l=e;for(;l!=null&&i.indexOf(l)===-1;){i.push(l);const _=l===e?t:a(l);if(d(l,_,l===e))break;const w=Object.getOwnPropertyNames(l);Object.getOwnPropertySymbols&&w.push(...Object.getOwnPropertySymbols(l));for(const R of w)f(R)||g(n,R)||(r[R]=e[R],n[R]=!0);l=_}return r},b=(e=>t=>{const r=h.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),S=e=>(e=e.toLowerCase(),t=>b(t)===e),m=e=>t=>typeof t===e,{isArray:x}=Array,q=m("undefined");function A(e){return e!==null&&!q(e)&&e.constructor!==null&&!q(e.constructor)&&M(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const B=S("ArrayBuffer");function X(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&B(e.buffer),t}const T=m("string"),M=m("function"),J=m("number"),Z=e=>e!==null&&typeof e=="object",_e=e=>e===!0||e===!1,Oe=e=>{if(!Z(e))return!1;const t=a(e);return(t===null||t===Object.prototype||a(t)===null)&&!s(e,y)&&!s(e,u)},De=e=>{if(!Z(e)||A(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},qe=S("Date"),Ce=S("File"),He=e=>!!(e&&typeof e.uri<"u"),Ge=e=>e&&typeof e.getParts<"u",Ye=S("Blob"),Dt=S("FileList"),Ze=S("Set"),qt=e=>Z(e)&&M(e.pipe);function It(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof K<"u"?K:{}}const bt=It(),F=typeof bt.FormData<"u"?bt.FormData:void 0,O=e=>{if(!e)return!1;if(F&&e instanceof F)return!0;const t=a(e);if(!t||t===Object.prototype||!M(e.append))return!1;const r=b(e);return r==="formdata"||r==="object"&&M(e.toString)&&e.toString()==="[object FormData]"},P=S("URLSearchParams"),[j,H,ne,re]=["ReadableStream","Request","Response","Headers"].map(S),I=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function ie(e,t,{allOwnKeys:r=!1}={}){if(e===null||typeof e>"u")return;let n,i;if(typeof e!="object"&&(e=[e]),x(e))for(n=0,i=e.length;n<i;n++)t.call(null,e[n],n,e);else{if(A(e))return;const l=r?Object.getOwnPropertyNames(e):Object.keys(e),_=l.length;let w;for(n=0;n<_;n++)w=l[n],t.call(null,e[w],w,e)}}function te(e,t){if(A(e))return null;t=t.toLowerCase();const r=Object.keys(e);let n=r.length,i;for(;n-- >0;)if(i=r[n],t===i.toLowerCase())return i;return null}const ae=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:K,Vr=e=>!q(e)&&e!==ae;function jt(...e){const{caseless:t,skipUndefined:r}=Vr(this)&&this||{},n={},i=(l,_)=>{if(_==="__proto__"||_==="constructor"||_==="prototype")return;const w=t&&typeof _=="string"&&te(n,_)||_,R=g(n,w)?n[w]:void 0;Oe(R)&&Oe(l)?n[w]=jt(R,l):Oe(l)?n[w]=jt({},l):x(l)?n[w]=l.slice():(!r||!q(l))&&(n[w]=l)};for(let l=0,_=e.length;l<_;l++){const w=e[l];
vendor: 3,845 bytes, line 1
1if(!w||A(w)||(ie(w,i),typeof w!="object"||x(w)))continue;const R=Object.getOwnPropertySymbols(w);for(let N=0;N<R.length;N++){const k=R[N];ps.call(w,k)&&i(w[k],k)}}return n}const ns=(e,t,r,{allOwnKeys:n}={})=>(ie(t,(i,l)=>{r&&M(i)?Object.defineProperty(e,l,{__proto__:null,value:c(i,r),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,l,{__proto__:null,value:i,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:n}),e),is=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),ss=(e,t,r,n)=>{e.prototype=Object.create(t.prototype,n),Object.defineProperty(e.prototype,"constructor",{__proto__:null,value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{__proto__:null,value:t.prototype}),r&&Object.assign(e.prototype,r)},os=(e,t,r,n)=>{let i,l,_;const w={};if(t=t||{},e==null)return t;do{for(i=Object.getOwnPropertyNames(e),l=i.length;l-- >0;)_=i[l],(!n||n(_,e,t))&&!w[_]&&(t[_]=e[_],w[_]=!0);e=r!==!1&&a(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},as=(e,t,r)=>{e=String(e),(r===void 0||r>e.length)&&(r=e.length),r-=t.length;const n=e.indexOf(t,r);return n!==-1&&n===r},us=e=>{if(!e)return null;if(x(e))return e;let t=e.length;if(!J(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},cs=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&a(Uint8Array)),ls=(e,t)=>{const n=(e&&e[u]).call(e);let i;for(;(i=n.next())&&!i.done;){const l=i.value;t.call(e,l[0],l[1])}},fs=(e,t)=>{let r;const n=[];for(;(r=e.exec(t))!==null;)n.push(r);return n},ds=S("HTMLFormElement"),hs=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,n,i){return n.toUpperCase()+i}),{propertyIsEnumerable:ps}=Object.prototype,gs=S("RegExp"),Xr=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),n={};ie(r,(i,l)=>{let _;(_=t(i,l,e))!==!1&&(n[l]=_||i)}),Object.defineProperties(e,n)},_s=e=>{Xr(e,(t,r)=>{if(M(e)&&["arguments","caller","callee"].includes(r))return!1;const n=e[r];if(M(n)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},ms=(e,t)=>{const r={},n=i=>{i.forEach(l=>{r[l]=!0})};return x(e)?n(e):n(String(e).split(t)),r},vs=()=>{},ys=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function bs(e){return!!(e&&M(e.append)&&e[y]==="FormData"&&e[u])}const ws=e=>{const t=new WeakSet,r=n=>{if(Z(n)){if(t.has(n))return;if(A(n))return n;if(!("toJSON"in n)){t.add(n);let i;if(Ze(n)){i=[];for(const l of n){const _=r(l);!q(_)&&i.push(_)}}else i=x(n)?[]:{},ie(n,(l,_)=>{const w=r(l);!q(w)&&(i[_]=w)});return t.delete(n),i}}return n};return r(e)},Es=S("AsyncFunction"),Ss=e=>e&&(Z(e)||M(e))&&M(e.then)&&M(e.catch),Kr=((e,t)=>e?setImmediate:t?((r,n)=>(ae.addEventListener("message",({source:i,data:l})=>{i===ae&&l===r&&n.length&&n.shift()()},!1),i=>{n.push(i),ae.postMessage(r,"*")}))(`axios@${Math.random()}`,[]):r=>setTimeout(r))(typeof setImmediate=="function",M(ae.postMessage)),Os=typeof queueMicrotask<"u"?queueMicrotask.bind(ae):typeof process<"u"&&process.nextTick||Kr,Gr=e=>e!=null&&M(e[u]);var v={isArray:x,isArrayBuffer:B,isBuffer:A,isFormData:O,isArrayBufferView:X,isString:T,isNumber:J,isBoolean:_e,isObject:Z,isPlainObject:Oe,isEmptyObject:De,isReadableStream:j,isRequest:H,isResponse:ne,isHeaders:re,isUndefined:q,isDate:qe,isFile:Ce,isReactNativeBlob:He,isReactNative:Ge,isBlob:Ye,isRegExp:gs,isFunction:M,isStream:qt,isURLSearchParams:P,isTypedArray:cs,isFileList:Dt,forEach:ie,merge:jt,extend:ns,trim:I,stripBOM:is,inherits:ss,toFlatObject:os,kindOf:b,kindOfTest:S,endsWith:as,toArray:us,forEachEntry:ls,matchAll:fs,isHTMLForm:ds,hasOwnProperty:g,hasOwnProp:g,hasOwnInPrototypeChain:s,getSafeProp:o,toSafeFlatObject:E,reduceDescriptors:Xr,freezeMethods:_s,toObjectSet:ms,toCamelCase:hs,noop:vs,toFiniteNumber:ys,findKey:te,global:ae,isContextDefined:Vr,isSpecCompliantForm:bs,toJSONObject:ws,isA
1syncFn:Es,isThenable:Ss,setImmediate:Kr,asap:Os,isIterable:Gr,isSafeIterable:e=>e!=null&&s(e,u)&&Gr(e)};const Rs=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"]);var Ts=e=>{const t={};let r,n,i;return e&&e.split(` 2`).forEach(function(_){i=_.indexOf(":"),r=_.substring(0,i).trim().toLowerCase(),n=_.substring(i+1).trim();const w=v.hasOwnProp(t,r);!r||w&&v.hasOwnProp(Rs,r)||(r==="set-cookie"?w?t[r].push(n):t[r]=[n]:t[r]=w?t[r]+", "+n:n)}),t};function As(e){let t=0,r=e.length;for(;t<r;){const n=e.charCodeAt(t);if(n!==9&&n!==32)break;t+=1}for(;r>t;){const n=e.charCodeAt(r-1);if(n!==9&&n!==32)break;r-=1}return t===0&&r===e.length?e:e.slice(t,r)}const Cs=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),Ps=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function Lt(e,t){return v.isArray(e)?e.map(r=>Lt(r,t)):As(String(e).replace(t,""))}const ks=e=>Lt(e,Cs),xs=e=>Lt(e,Ps);function Yr(e){const t=Object.create(null);return v.forEach(e.toJSON(),(r,n)=>{t[n]=xs(r)}),t}const Zr=Symbol("internals");function Qe(e){return e&&String(e).trim().toLowerCase()}function wt(e){return e===!1||e==null?e:v.isArray(e)?e.map(wt):ks(String(e))}function Ns(e){const t=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=r.exec(e);)t[n[1]]=n[2];return t}const Us=/^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/;function Ft(e){let t=0,r=e.length;for(;t<r;){const n=e.charCodeAt(t);if(n!==9&&n!==32)break;t+=1}for(;r>t;){const n=e.charCodeAt(r-1);if(n!==9&&n!==32)break;r-=1}return t===0&&r===e.length?e:e.slice(t,r)}function Ds(e){const t=e.length-1;if(t<1||e.charCodeAt(0)!==34||e.charCodeAt(t)!==34)return e;let r="";for(let n=1;n<t;n++){const i=e.charCodeAt(n);if(i===34||i===92&&(n+=1,n>=t))return e;r+=e[n]}return r}function qs(e){const t=Object.create(null),r=String(e);let n=0,i=!1,l=!1;function _(w){const R=Ft(r.slice(n,w)),N=R.indexOf("=");if(N<1)return;const k=Ft(R.slice(0,N));if(!Us.test(k))return;const U=k.toLowerCase();if(U==="__proto__"||U==="constructor"||U==="prototype")return;const $=Ft(R.slice(N+1));t[U]=Ds($)}for(let w=0;w<r.length;w++){const R=r.charCodeAt(w);i?l?l=!1:R===92?l=!0:R===34&&(i=!1):R===34?i=!0:(R===44||R===59)&&(_(w),n=w+1)}return _(r.length),t}const Is=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Mt(e,t,r,n,i){if(v.isFunction(n))return n.call(this,t,r);if(i&&(t=r),!!v.isString(t)){if(v.isString(n))return t.indexOf(n)!==-1;if(v.isRegExp(n))return n.test(t)}}function js(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,r,n)=>r.toUpperCase()+n)}function Ls(e,t){const r=v.toCamelCase(" "+t);["get","set","has"].forEach(n=>{Object.defineProperty(e,n+r,{__proto__:null,value:function(i,l,_){return this[n].call(this,t,i,l,_)},configurable:!0})})}class de{constructor(t){t&&this.set(t)}set(t,r,n){const i=this;function l(w,R,N){const k=Qe(R);if(!k)return;const U=v.findKey(i,k);(!U||i[U]===void 0||N===!0||N===void 0&&i[U]!==!1)&&(i[U||R]=wt(w))}const _=(w,R)=>v.forEach(w,(N,k)=>l(N,k,R));if(v.isPlainObject(t)||t instanceof this.constructor)_(t,r);else if(v.isString(t)&&(t=t.trim())&&!Is(t))_(Ts(t),r);else if(v.isObject(t)&&v.isSafeIterable(t)){let w=Object.create(null),R,N;for(const k of t){if(!v.isArray(k))throw new TypeError("Object iterator must return a key-value pair");N=k[0],v.hasOwnProp(w,N)?(R=w[N],w[N]=v.isArray(R)?[...R,k[1]]:[R,k[1]]):w[N]=k[1]}_(w,r)}else t!=null&&l(r,t,n);return this}get(t,r){if(t=Qe(t),t){const n=v.findKey(this,t);if(n){const i=this[n];if(!r)return i;if(r===!0)return Ns(i);if(v.isFunction(r))return r.call(this,i,n);if(v.isRegExp(r))return r.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,r){if(t=Qe(t),t){const n=v.findKey(this,t);return!!(n&&this[n]!==void 0&&(!r||Mt(this,this[n],n,r)))}return!1}delete(t,r){const n=this;let i=!1;function l(_){if(_=Qe(_),_){const w=v.findKey(n,_);w&&(!r||Mt(n,n[w],w,r))&&(delete n[w],i=!0)}}return v.isArray(t)?t.forEach(l):l(t),i}clear(t){const r=Object.keys(this);let n=r.length,i=!1;for(;n--;){const l=r[n];(!t||Mt(this,this[l],l,t,!0))&&(delete this[l],i=!0)}return i}normalize(t){const r=this,n={};return v.forEach(this,(i,l)=>{const _=v.findKey(n,l);if(_){r[_]=wt(i),delete r[l];return}const w=t?js(l):String(l).trim();w!==l&&delete r[l],r[w]=wt(i),n[w]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const r=Object.create(null);return v.forEach(this,(n,i)=>
2{n!=null&&n!==!1&&(r[i]=t&&v.isArray(n)?n.join(", "):n)}),r}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,r])=>t+": "+r).join(` 3`)}getSetCookie(){const t=this.get("set-cookie");return v.isArray(t)?t:t==null||t===!1?[]:[t]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static parseParameters(t){return qs(t)}static concat(t,...r){const n=new this(t);return r.forEach(i=>n.set(i)),n}static accessor(t){const n=(this[Zr]=this[Zr]={accessors:{}}).accessors,i=this.prototype;function l(_){const w=Qe(_);n[w]||(Ls(i,_),n[w]=!0)}return v.isArray(t)?t.forEach(l):l(t),this}}de.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),v.reduceDescriptors(de.prototype,({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(n){this[r]=n}}}),v.freezeMethods(de);const Et="[REDACTED ****]";function Fs(e){if(v.hasOwnProp(e,"toJSON"))return!0;let t=Object.getPrototypeOf(e);for(;t&&t!==Object.prototype;){if(v.hasOwnProp(t,"toJSON"))return!0;t=Object.getPrototypeOf(t)}return!1}function Ms(e,t){const r=new Set(t.map(l=>String(l).toLowerCase())),n=[],i=l=>{if(l===null||typeof l!="object"||v.isBuffer(l))return l;if(n.indexOf(l)!==-1)return;l instanceof de&&(l=l.toJSON()),n.push(l);let _;if(v.isArray(l))_=[],l.forEach((w,R)=>{const N=i(w);v.isUndefined(N)||(_[R]=N)});else{if(!v.isPlainObject(l)&&Fs(l))return n.pop(),l;_=Object.create(null);for(const[w,R]of Object.entries(l)){const N=r.has(w.toLowerCase())?Et:i(R);v.isUndefined(N)||(_[w]=N)}}return n.pop(),_};return i(e)}function Qr(e){try{return String(e)}catch{return""}}function Bs(e){return e.errors.map(r=>{try{return r&&r.message?Qr(r.message):Qr(r)}catch{return""}}).filter(Boolean).join("; ")||e.name||"AggregateError"}class D extends Error{static from(t,r,n,i,l,_){let w=t.message;!w&&v.isArray(t.errors)&&t.errors.length&&(w=Bs(t));const R=new D(w,r||t.code,n,i,l);return Object.defineProperty(R,"cause",{__proto__:null,value:t,writable:!0,enumerable:!1,configurable:!0}),R.name=t.name,t.status!=null&&R.status==null&&(R.status=t.status),_&&Object.assign(R,_),R}constructor(t,r,n,i,l){super(t),Object.defineProperty(this,"message",{__proto__:null,value:t,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,r&&(this.code=r),n&&(this.config=n),i&&(this.request=i),l&&(this.response=l,this.status=l.status)}toJSON(){const t=this.config,r=t&&v.hasOwnProp(t,"redact")?t.redact:void 0,n=v.isArray(r)&&r.length>0?Ms(t,r):v.toJSONObject(t);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:n,code:this.code,status:this.status}}}D.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE",D.ERR_BAD_OPTION="ERR_BAD_OPTION",D.ECONNABORTED="ECONNABORTED",D.ETIMEDOUT="ETIMEDOUT",D.ECONNREFUSED="ECONNREFUSED",D.ERR_NETWORK="ERR_NETWORK",D.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS",D.ERR_DEPRECATED="ERR_DEPRECATED",D.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE",D.ERR_BAD_REQUEST="ERR_BAD_REQUEST",D.ERR_CANCELED="ERR_CANCELED",D.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT",D.ERR_INVALID_URL="ERR_INVALID_URL",D.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";var $s=null;const en=100;function Bt(e){return v.isPlainObject(e)||v.isArray(e)}function tn(e){return v.endsWith(e,"[]")?e.slice(0,-2):e}function $t(e,t,r){return e?e.concat(t).map(function(i,l){return i=tn(i),!r&&l?"["+i+"]":i}).join(r?".":""):t}function Hs(e){return v.isArray(e)&&!e.some(Bt)}const zs=v.toFlatObject(v,{},null,function(t){return/^is[A-Z]/.test(t)});function St(e,t,r){if(!v.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const n=(L,V)=>{const z=v.getSafeProp(r,L);return v.isUndefined(z)?V:z},i=n("metaTokens",!0),l=n("visitor")||ee,_=n("dots",!1),w=n("indexes",!1),R=n("Blob")||typeof Blob<"u"&&Blob,N=n("maxDepth",en),k=R&&v.isSpecCompliantForm(t),U=[];if(!v.isFunction(l))throw new TypeError("visitor must be a function");function $(L){if(L===null)return"";if(v.isDate(L))return L.toISOString();if(v.isBoolean(L))return L.toString();if(!k&&v.isBlob(L))throw new D("Blob is not supported. Use a Buffer instead.");if(v.isArrayBuffer(L)||v.isTypedArray(L)){if(k&&typeof R=="function")return new R([L]);throw new D("Blob is not supported. Use a Buffer instead.",D.ERR_NOT_SUPPORT)}return L}function G(L){if(L>N)throw new D("Object is too deeply nested ("+L+" levels). Max depth: "+N,D.ERR_FORM_DATA_DEPTH_EXCEEDED)}function Y(L,V){if(N===1/0)return JSON.stringify(L);const z=[];return JSON.stringify(L,function(pe,se){if(!v.isObject(se))return se;for(;z.length&&z[z.length-1]!==this;)z.pop();return z.push(se),G(V+z.length-1),se})}function ee(L,V,z){let le=L;if(v.isReactNative(t)&&v.isReactNativeBlob(L))return t.append($t(z,V,_),$(L)),!1;if(L&&!z&&typeof L=="object"){if(v.endsWith(V,"{}"))V=i?V:V.slice(0,-2),L=Y(L,1);else if(v.isArray(L)&&Hs(L)||(v.isFileList(L)||v.endsWith(V,"[]"))&&(le=v.toArray(L))
3)return V=tn(V),le.forEach(function(se,Ee){!(v.isUndefined(se)||se===null)&&t.append(w===!0?$t([V],Ee,_):w===null?V:V+"[]",$(se))}),!1}return Bt(L)?!0:(t.append($t(z,V,_),$(L)),!1)}const ce=Object.assign(zs,{defaultVisitor:ee,convertValue:$,isVisitable:Bt});function C(L,V,z=0){if(!v.isUndefined(L)){if(G(z),U.indexOf(L)!==-1)throw new Error("Circular reference detected in "+V.join("."));U.push(L),v.forEach(L,function(pe,se){(!(v.isUndefined(pe)||pe===null)&&l.call(t,pe,v.isString(se)?se.trim():se,V,ce))===!0&&C(pe,V?V.concat(se):[se],z+1)}),U.pop()}}if(!v.isObject(e))throw new TypeError("data must be an object");return C(e),t}function rn(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(e).replace(/[!'()~]|%20/g,function(n){return t[n]})}function Ht(e,t){this._pairs=[],e&&St(e,this,t)}const nn=Ht.prototype;nn.append=function(t,r){this._pairs.push([t,r])},nn.toString=function(t){const r=t?n=>t.call(this,n,rn):rn;return this._pairs.map(function(i){return r(i[0])+"="+r(i[1])},"").join("&")};function Ws(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function sn(e,t,r){if(!t)return e;e=e||"";const n=v.isFunction(r)?{serialize:r}:r,i=v.getSafeProp(n,"encode")||Ws,l=v.getSafeProp(n,"serialize");let _;if(l?_=l(t,n):_=v.isURLSearchParams(t)?t.toString():new Ht(t,n).toString(i),_){const w=e.indexOf("#");w!==-1&&(e=e.slice(0,w)),e+=(e.indexOf("?")===-1?"?":"&")+_}return e}const et=Symbol("internals");function on(e){return e?e.length:0}function an(e){if(e)for(;e.length&&e[e.length-1]===null;)e.pop()}function tt(e,t){const r=e.handlers,n=on(r);r!==t.handlersRef?(t.handlersRef=r,t.handlerEntries.clear()):n!==t.handlersLength&&(n?t.handlerEntries.forEach(function(l,_){r[l.index]!==l.handler&&t.handlerEntries.delete(_)}):t.handlerEntries.clear()),t.handlersLength=n}class un{constructor(){this.handlers=[],this[et]={handlersRef:this.handlers,handlersLength:this.handlers.length,handlerEntries:new Map,iterationDepth:0,nextId:0}}use(t,r,n){const i={fulfilled:t,rejected:r,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null},l=this[et];this.handlers==null&&(this.handlers=[]),tt(this,l);const _=l.nextId++;return this.handlers.push(i),l.handlerEntries.set(_,{handler:i,index:this.handlers.length-1}),l.handlersLength=this.handlers.length,_}eject(t){const r=this[et];tt(this,r);const n=r.handlerEntries.get(t);if(n){if(r.handlerEntries.delete(t),this.handlers[n.index]!==n.handler)return;this.handlers[n.index]=null,r.iterationDepth||(an(this.handlers),r.handlersLength=this.handlers.length)}}clear(){this.handlers&&(this.handlers=[],tt(this,this[et]))}forEach(t){const r=this[et];tt(this,r),r.iterationDepth++;try{v.forEach(this.handlers,function(i){i!==null&&t(i)})}finally{--r.iterationDepth||(tt(this,r),an(this.handlers),r.handlersLength=on(this.handlers))}}}var zt={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1,validateStatusUndefinedResolves:!0},Js=typeof URLSearchParams<"u"?URLSearchParams:Ht,Vs=typeof FormData<"u"?FormData:null,Xs=typeof Blob<"u"?Blob:null,Ks={isBrowser:!0,classes:{URLSearchParams:Js,FormData:Vs,Blob:Xs},protocols:["http","https","file","blob","url","data"]};const Wt=typeof window<"u"&&typeof document<"u",Jt=typeof navigator=="object"&&navigator||void 0,Gs=Wt&&(!Jt||["ReactNative","NativeScript","NS"].indexOf(Jt.product)<0),Ys=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Zs=Wt&&window.location.href||"http://localhost";var Qs=Object.freeze({__proto__:null,hasBrowserEnv:Wt,hasStandardBrowserEnv:Gs,hasStandardBrowserWebWorkerEnv:Ys,navigator:Jt,origin:Zs}),ue={...Qs,...Ks};function eo(e,t){return St(e,new ue.classes.URLSearchParams,{visitor:function(r,n,i,l){return ue.isNode&&v.isBuffer(r)?(this.append(n,r.toString("base64")),!1):l.defaultVisitor.apply(this,arguments)},...t})}const cn=en;function ln(e){if(e>cn)throw new D("FormData field is too deeply nested ("+e+" levels). Max depth: "+cn,D.ERR_FORM_DATA_DEPTH_EXCEEDED)}function to(e){const t=[],r=/[^.[\]]+|\[([^.[\]]*)]/g;let n;for(;(n=r.exec(e))!==null;)ln(t.length),t.push(n[0]==="[]"?"":n[1]||n[0]);return t}function ro(e){const t={},r=Object.keys(e);let n;const i=r.length;let l;for(n=0;n<i;n++)l=r[n],t[l]=e[l];return t}function fn(e){function t(r,n,i,l){ln(l);let _=r[l++];if(_==="__proto__")return!0;const w=Number.isFinite(+_),R=l>=r.length;return _=!_&&v.isArray(i)?i.length:_,R?(v.hasOwnProp(i,_)?i[_]=v.isArray(i[_])?i[_].concat(n):[i[_],n]:i[_]=n,!w):((!v.hasOwnProp(i,_)||!v.isObject(i[_]))&&(i[_]=[]),t(r,n,i[_],l)&&v.isArray(i[_])&&(i[_]=ro(i[_])),!w)}if(v.isFormData(e)&&v.isFunction(e.entries)){const r={};return v.forEachEntry(e,(n,i)=>{t(to(n),i,r,0)}),r}return null}const dn=Object.freeze(["get","delete","head","options","post","put","patch","purge","link","unlink","query"]),ze=(e,t)=>
3e!=null&&v.hasOwnProp(e,t)?e[t]:void 0;function no(e,t,r){if(v.isString(e))try{return(t||JSON.parse)(e),v.trim(e)}catch(n){if(n.name!=="SyntaxError")throw n}return(r||JSON.stringify)(e)}const rt={transitional:zt,adapter:["xhr","http","fetch"],transformRequest:[function(t,r){const n=r.getContentType()||"",i=n.indexOf("application/json")>-1,l=v.isObject(t);if(l&&v.isHTMLForm(t)&&(t=new FormData(t)),v.isFormData(t))return i?JSON.stringify(fn(t)):t;if(v.isArrayBuffer(t)||v.isBuffer(t)||v.isStream(t)||v.isFile(t)||v.isBlob(t)||v.isReadableStream(t))return t;if(v.isArrayBufferView(t))return t.buffer;if(v.isURLSearchParams(t))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let w;if(l){const R=ze(this,"formSerializer");if(n.indexOf("application/x-www-form-urlencoded")>-1)return eo(t,R).toString();if((w=v.isFileList(t))||n.indexOf("multipart/form-data")>-1){const N=ze(this,"env"),k=N&&N.FormData;return St(w?{"files[]":t}:t,k&&new k,R)}}return l||i?(r.setContentType("application/json",!1),no(t)):t}],transformResponse:[function(t){const r=ze(this,"transitional")||rt.transitional,n=r&&r.forcedJSONParsing,i=ze(this,"responseType"),l=i==="json";if(v.isResponse(t)||v.isReadableStream(t))return t;if(t&&v.isString(t)&&(n&&!i||l)){const w=!(r&&r.silentJSONParsing)&&l;try{return JSON.parse(t,ze(this,"parseReviver"))}catch(R){if(w)throw R.name==="SyntaxError"?D.from(R,D.ERR_BAD_RESPONSE,this,null,ze(this,"response")):R}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:ue.classes.FormData,Blob:ue.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};v.forEach(dn,e=>{rt.headers[e]={}});function Vt(e,t){const r=this||rt,n=t||r,i=de.from(n.headers);let l=n.data;return v.forEach(e,function(w){l=w.call(r,l,i.normalize(),t?t.status:void 0)}),i.normalize(),l}function hn(e){return!!(e&&e.__CANCEL__)}class nt extends D{constructor(t,r,n){super(t??"canceled",D.ERR_CANCELED,r,n),this.name="CanceledError",this.__CANCEL__=!0}}function pn(e,t,r){const n=r.config.validateStatus;!r.status||!n||n(r.status)?e(r):t(new D("Request failed with status code "+r.status,r.status>=400&&r.status<500?D.ERR_BAD_REQUEST:D.ERR_BAD_RESPONSE,r.config,r.request,r))}const io=/[\t\n\r]/g;function gn(e){if(typeof e!="string")return e;let t=0;for(;t<e.length&&e.charCodeAt(t)<=32;)t++;return e.slice(t).replace(io,"")}function Xt(e){const t=/^([-+\w]{1,25}):(?:\/\/)?/.exec(e);return t&&t[1]||""}function so(e,t){e=e||10;const r=new Array(e),n=new Array(e);let i=0,l=0,_;return t=t!==void 0?t:1e3,function(R){const N=Date.now(),k=n[l];_||(_=N),r[i]=R,n[i]=N;let U=l,$=0;for(;U!==i;)$+=r[U++],U=U%e;if(i=(i+1)%e,i===l&&(l=(l+1)%e),N-_<t)return;const G=k&&N-k;return G?Math.round($*1e3/G):void 0}}function oo(e,t){let r=0,n=1e3/t,i,l;const _=(k,U=Date.now())=>{r=U,i=null,l&&(clearTimeout(l),l=null),e(...k)};return[(...k)=>{const U=Date.now(),$=U-r;$>=n?_(k,U):(i=k,l||(l=setTimeout(()=>{l=null,_(i)},n-$)))},()=>i&&_(i),(...k)=>_(k)]}const Ot=(e,t,r=3)=>{let n=0;const i=so(50,250);return oo(l=>{if(!l||!v.isNumber(l.loaded))return;const _=l.loaded,w=l.lengthComputable?l.total:void 0,R=Math.max(0,w!=null?Math.min(_,w):_),N=Math.max(0,R-n),k=i(N);n=Math.max(n,R);const U={loaded:R,total:w,progress:w?R/w:void 0,bytes:N,rate:k||void 0,estimated:k&&w?(w-R)/k:void 0,event:l,lengthComputable:w!=null,[t?"download":"upload"]:!0};e(U)},r)},_n=(e,t)=>{const r=e!=null;return[n=>t[0]({lengthComputable:r,total:e,loaded:n}),t[1]]},mn=(e,t=v.asap)=>(...r)=>t(()=>e(...r));var ao=ue.hasStandardBrowserEnv?((e,t)=>r=>(r=new URL(r,ue.origin),e.protocol===r.protocol&&e.host===r.host&&(t||e.port===r.port)))(new URL(ue.origin),ue.navigator&&/(msie|trident)/i.test(ue.navigator.userAgent)):()=>!0,uo=ue.hasStandardBrowserEnv?{write(e,t,r,n,i,l,_){if(typeof document>"u")return;const w=[`${e}=${encodeURIComponent(t)}`];v.isNumber(r)&&w.push(`expires=${new Date(r).toUTCString()}`),v.isString(n)&&w.push(`path=${n}`),v.isString(i)&&w.push(`domain=${i}`),l===!0&&w.push("secure"),v.isString(_)&&w.push(`SameSite=${_}`),document.cookie=w.join("; ")},read(e){if(typeof document>"u")return null;const t=document.cookie.split(";");for(let r=0;r<t.length;r++){const n=t[r].replace(/^\s+/,""),i=n.indexOf("=");if(i!==-1&&n.slice(0,i)===e)try{return decodeURIComponent(n.slice(i+1))}catch{return n.slice(i+1)}}return null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function co(e){return typeof e!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function lo(e,t){if(!t)return e;let r=e.length;for(;r>0&&e.charCodeAt(r-1)===47;)r--;return e.slice(0,r)+"/"+t.replace(/^\/+/,"")}const fo=/^https?:(?!\/\/)/i;function ho(e){return e&&e.replace(/(^|&)([^=&]*=)?[^&]+/g,(t,r,n="")=>`${r}${n}${Et}`)}function po(e){const t=e.replace(/^(https?:\/{0,2})[^/?#]*@/i,`$1${Et}@`),r=t.indexOf("#"),i=(r===-1?t:t.slice(0,r)).replace(/([?&][^=&#]*=)[^&#]*/g,`$1${Et}`);return r===-1?i:`${i}#${ho(t.slice(r+1))}`}function vn(e,t){if(typeof e=="string"){const r=gn(e);if(fo.test(r))throw new D(`Invalid URL ${JSON.stringify(po(r))}: missing "//" after protocol`,D.ERR_INVALID_URL,t)}}function yn(e,t,r,n){vn(t,n);let i=!co(t);return e&&(i||r===!1)?(vn(e,n),lo(e,t)):t}const bn=e=>e instanceof de?{...e}:e,go=e=>Object.getOwnPropertySymbols&&Object.getOwnPropertyDescriptor?Object.keys(e).concat(Object.getOwnPropertySymbols(e).filter(t=>Object.getOwnPropertyDescriptor(e,t).enumerable)):Object.keys(e);function Ie(e,t){e=e||{},t=t||{};const r=Object.create(null);Object.defineProperty(r,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function n(k,U,$,G){return v.isPlainObject(k)&&v.isPlainObject(U)?v.merge.call({caseless:G},k,U):v.isPlainObject(U)?v.merge({},U):v.isArray(U)?U.slice():U}function i(k,U,$,G){if(v.isUndefined(U)){if(!v.isUndefined(k))return n(void 0,k,$,G)}else return n(k,U,$,G)}function l(k,U){if(!v.isUndefined(U))return n(void 0,U)}function _(k,U){if(v.isUndefined(U)){if(!v.isUndefined(k))return n(void 0,k)}else return n(void 0,U)}function w(k){const U=v.hasOwnProp(t,"transitional")?t.transitional:void 0;if(!v.isUndefined(U))if(v.isPlainObject(U)){if(v.hasOwnProp(U,k))return U[k]}else return;const $=v.hasOwnProp(e,"transitional")?e.transitional:void 0;if(v.isPlainObject($)&&v.hasOwnProp($,k))return $[k]}function R(k,U,$){if(v.hasOwnProp(t,$))return n(k,U);if(v.hasOwnProp(e,$))return n(void 0,k)}const N={url:l,method:l,data:l,baseURL:_,transformRequest:_,transformResponse:_,paramsSerializer:_,timeout:_,timeoutErrorMessage:_,withCredentials:_,withXSRFToken:_,adapter:_,responseType:_,xsrfCookieName:_,xsrfHeaderName:_,onUploadProgress:_,onDownloadProgress:_,decompress:_,maxContentLength:_,maxBodyLength:_,beforeRedirect:_,transport:_,httpAgent:_,httpsAgent:_,cancelToken:_,socketPath:_,allowedSocketPaths:_,responseEncoding:_,validateStatus:R,headers:(k,U,$)=>i(bn(k),bn(U),$,!0)};return v.forEach(go({...e,...t}
3),function(U){if(U==="__proto__"||U==="constructor"||U==="prototype")return;const $=v.hasOwnProp(N,U)?N[U]:i,G=v.hasOwnProp(e,U)?e[U]:void 0,Y=v.hasOwnProp(t,U)?t[U]:void 0,ee=$(G,Y,U);v.isUndefined(ee)&&$!==R||(r[U]=ee)}),v.hasOwnProp(t,"validateStatus")&&v.isUndefined(t.validateStatus)&&w("validateStatusUndefinedResolves")===!1&&(v.hasOwnProp(e,"validateStatus")?r.validateStatus=n(void 0,e.validateStatus):delete r.validateStatus),r}const _o=["content-type","content-length"];function mo(e,t,r){if(r!=="content-only"){e.set(t);return}Object.entries(t||{}).forEach(([n,i])=>{_o.includes(n.toLowerCase())&&e.set(n,i)})}const vo=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,r)=>String.fromCharCode(parseInt(r,16)));function wn(e){const t=Ie({},e),r=$=>v.hasOwnProp(t,$)?t[$]:void 0,n=r("data");let i=r("withXSRFToken");const l=r("xsrfHeaderName"),_=r("xsrfCookieName");let w=r("headers");const R=r("auth"),N=r("baseURL"),k=r("allowAbsoluteUrls"),U=r("url");if(t.headers=w=de.from(w),t.url=sn(yn(N,U,k,t),r("params"),r("paramsSerializer")),R){const $=v.getSafeProp(R,"username")||"",G=v.getSafeProp(R,"password")||"";try{w.set("Authorization","Basic "+btoa($+":"+(G?vo(G):"")))}catch(Y){throw D.from(Y,D.ERR_BAD_OPTION_VALUE,e)}}if(v.isFormData(n)){const $=v.getSafeProp(n,"getHeaders");ue.hasStandardBrowserEnv||ue.hasStandardBrowserWebWorkerEnv||v.isReactNative(n)?w.setContentType(void 0):v.isFunction($)&&mo(w,$.call(n),r("formDataHeaderPolicy"))}if(ue.hasStandardBrowserEnv&&(v.isFunction(i)&&(i=i(t)),i===!0||i==null&&ao(t.url))){const G=l&&_&&uo.read(_);G&&w.set(l,G)}return t}var yo=typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(r,n){const i=wn(e);let l=i.data;const _=de.from(i.headers).normalize();let{responseType:w,onUploadProgress:R,onDownloadProgress:N}=i,k,U,$,G,Y,ee;function ce(){G&&G(),Y&&Y(),i.cancelToken&&i.cancelToken.unsubscribe(k),i.signal&&i.signal.removeEventListener("abort",k)}let C=new XMLHttpRequest;C.open(i.method.toUpperCase(),i.url,!0),C.timeout=i.timeout;function L(z){if(!C)return;if(C.status===0&&(Xt(gn(i.url))||Xt(ue.origin))!=="file"&&!(C.responseURL&&C.responseURL.startsWith("file:"))){n(new D("Request aborted",D.ECONNABORTED,e,C)),ce(),C=null;return}try{z?ee&&ee(z):Y&&Y()}catch(Ee){setTimeout(()=>{throw Ee})}if(!C)return;const le=de.from("getAllResponseHeaders"in C&&C.getAllResponseHeaders()),se={data:!w||w==="text"||w==="json"?C.responseText:C.response,status:C.status,statusText:C.statusText,headers:le,config:e,request:C};pn(function(Le){r(Le),ce()},function(Le){n(Le),ce()},se),C=null}"onloadend"in C?C.onloadend=L:C.onreadystatechange=function(){!C||C.readyState!==4||C.status===0&&!(C.responseURL&&C.responseURL.startsWith("file:"))||setTimeout(L)},C.onabort=function(){C&&(n(new D("Request aborted",D.ECONNABORTED,e,C)),ce(),C=null)},C.onerror=function(le){const pe=le&&le.message?le.message:"Network Error",se=new D(pe,D.ERR_NETWORK,e,C);se.event=le||null,n(se),ce(),C=null},C.ontimeout=function(){let le=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const pe=i.transitional||zt;i.timeoutErrorMessage&&(le=i.timeoutErrorMessage),n(new D(le,pe.clarifyTimeoutError?D.ETIMEDOUT:D.ECONNABORTED,e,C)),ce(),C=null},l===void 0&&_.setContentType(null),"setRequestHeader"in C&&v.forEach(Yr(_),function(le,pe){C.setRequestHeader(pe,le)}),v.isUndefined(i.withCredentials)||(C.withCredentials=!!i.withCredentials),w&&w!=="json"&&(C.responseType=i.responseType),N&&([$,Y,ee]=Ot(N,!0),C.addEventListener("progress",$)),R&&C.upload&&([U,G]=Ot(R),C.upload.addEventListener("progress",U),C.upload.addEventListener("loadend",G)),(i.cancelToken||i.signal)&&(k=z=>{C&&(n(!z||z.type?new nt(null,e,C):z),C.abort(),ce(),C=null)},i.cancelToken&&i.cancelToken.subscribe(k),i.signal&&(i.signal.aborted?k():i.signal.addEventListener("abort",k)));const V=Xt(i.url);if(V&&!ue.protocols.includes(V)){n(new D("Unsupported protocol "+V+":",D.ERR_BAD_REQUEST,e)),ce();return}C.send(l||null)})};const bo=(e,t)=>{if(e=e?e.filter(Boolean):[],!t&&!e.length)return;const r=new AbortController;let n=!1;const i=function(R){if(!n){n=!0,_();const N=R instanceof Error?R:this.reason;r.abort(N instanceof D?N:new nt(N instanceof Error?N.message:N))}};let l=t&&setTimeout(()=>{l=null,i(new D(`timeout of ${t}ms exceeded`,D.ETIMEDOUT))},t);const _=()=>{e&&(l&&clearTimeout(l),l=null,e.forEach(R=>{R.unsubscribe?R.unsubscribe(i):R.removeEventListener("abort",i)}),e=null)};e.forEach(R=>
3{if(!n){if(R.aborted){i.call(R);return}R.addEventListener("abort",i,{once:!0})}});const{signal:w}=r;return w.unsubscribe=()=>v.asap(_),w},wo=function*(e,t){let r=e.byteLength;if(r<t){yield e;return}let n=0,i;for(;n<r;)i=n+t,yield e.slice(n,i),n=i},Eo=async function*(e,t){for await(const r of So(e))yield*wo(r,t)},So=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:r,value:n}=await t.read();if(r)break;yield n}}finally{await t.cancel()}},En=(e,t,r,n)=>{const i=Eo(e,t);let l=0,_,w=R=>{_||(_=!0,n&&n(R))};return new ReadableStream({async pull(R){try{const{done:N,value:k}=await i.next();if(N){w(),R.close();return}let U=k.byteLength;if(r){let $=l+=U;r($)}R.enqueue(new Uint8Array(k))}catch(N){throw w(N),N}},cancel(R){return w(R),i.return()}},{highWaterMark:2})},Sn=e=>e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102,On=(e,t,r)=>t+2<r&&Sn(e.charCodeAt(t+1))&&Sn(e.charCodeAt(t+2)),Rn=e=>e<=57?e-48:(e&223)-55,Oo=e=>e>=65&&e<=90||e>=97&&e<=122||e>=48&&e<=57||e===43||e===47||e===45||e===95,Ro=e=>e===9||e===10||e===12||e===13||e===32,To=e=>{const t=Math.floor(e/4),r=e%4;return t*3+(r===2?1:r===3?2:0)},Ao=e=>{const t=e.length;let r=0;return t>0&&e.charCodeAt(t-1)===61&&(r++,t>1&&e.charCodeAt(t-2)===61&&r++),Math.floor((t-r)*3/4)},Co=e=>{const t=e.length;let r=0,n=0,i=!1;for(let l=0;l<t;l++){let _=e.charCodeAt(l);if(_===37&&On(e,l,t)&&(_=Rn(e.charCodeAt(l+1))*16+Rn(e.charCodeAt(l+2)),l+=2),!Ro(_)){if(_===61){n++;continue}if(!Oo(_)||n>0){i=!0;continue}r++}}return i||n>2||n>0&&(r+n)%4!==0||r%4===1?Ao(e):To(r)},Po=(e,t)=>{if(!e||typeof e!="string"||!e.startsWith("data:"))return 0;const r=e.indexOf(",");if(r<0)return 0;const n=e.slice(5,r),i=e.slice(r+1);if(/;base64/i.test(n))return t(i);let _=0;for(let w=0,R=i.length;w<R;w++){const N=i.charCodeAt(w);if(N===37&&On(i,w,R))_+=1,w+=2;else if(N<128)_+=1;else if(N<2048)_+=2;else if(N>=55296&&N<=56319&&w+1<R){const k=i.charCodeAt(w+1);k>=56320&&k<=57343?(_+=4,w++):_+=3}else _+=3}return _};function ko(e){const t=typeof e=="string"?e.indexOf("#"):-1;return Po(t===-1?e:e.slice(0,t),Co)}const Kt="1.20.0",Tn=64*1024,xo={cache:"default",redirect:"follow",referrer:"about:client",referrerPolicy:"",mode:"cors",integrity:"",keepalive:!1,priority:"auto",window:null},{isFunction:Rt}=v,No=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,r)=>String.fromCharCode(parseInt(r,16))),An=e=>{if(!v.isString(e))return e;try{return decodeURIComponent(e)}catch{return e}},Cn=(e,...t)=>{try{return!!e(...t)}catch{return!1}},Uo=e=>{const t=e.indexOf("://");let r=e;return t!==-1&&(r=r.slice(t+3)),r.includes("@")||r.includes(":")},Do=e=>{const t=v.global!==void 0&&v.global!==null?v.global:globalThis,{ReadableStream:r,TextEncoder:n}=t;e=v.merge.call({skipUndefined:!0},{Request:t.Request,Response:t.Response},e);const{fetch:i,Request:l,Response:_}=e,w=i?Rt(i):typeof fetch=="function",R=Rt(l),N=Rt(_);if(!w)return!1;const k=w&&Rt(r),U=w&&(typeof n=="function"?(C=>L=>C.encode(L))(new n):async C=>new Uint8Array(await new l(C).arrayBuffer())),$=R&&k&&Cn(()=>{let C=!1;const L=new l(ue.origin,{body:new r,method:"POST",get duplex(){return C=!0,"half"}}),V=L.headers.has("Content-Type");return L.body!=null&&L.body.cancel(),C&&!V}),G=N&&k&&Cn(()=>v.isReadableStream(new _("").body)),Y={stream:G&&(C=>C.body)};w&&["text","arrayBuffer","blob","formData","stream"].forEach(C=>{!Y[C]&&(Y[C]=(L,V)=>{let z=L&&L[C];if(z)return z.call(L);throw new D(`Response type '${C}' is not supported`,D.ERR_NOT_SUPPORT,V)})});const ee=async C=>{if(C==null)return 0;if(v.isBlob(C))return C.size;if(v.isSpecCompliantForm(C))return(await new l(ue.origin,{method:"POST",body:C}).arrayBuffer()).byteLength;if(v.isArrayBufferView(C)||v.isArrayBuffer(C))return C.byteLength;if(v.isURLSearchParams(C)&&(C=C+""),v.isString(C))return(await U(C)).byteLength},ce=async(C,L)=>{const V=v.toFiniteNumber(C.getContentLength());return V??ee(L)};return async C=>{let{url:L,method:V,data:z,signal:le,cancelToken:pe,timeout:se,onDownloadProgress:Ee,onUploadProgress:Le,responseType:Pe,headers:ke,withCredentials:Pt="same-origin",fetchOptions:er,maxContentLength:Se,maxBodyLength:kt,maxRedirects:Bo}=wn(C);const it=v.isNumber(Se)&&Se>-1,tr=v.isNumber(kt)&&kt>-1,$o=Q=>v.hasOwnProp(C,Q)?C[Q]:void 0;let Dn=i||fetch;Pe=Pe?(Pe+"").toLowerCase():"text";let xe=bo([le,pe&&pe.toAbortSignal()],se),fe=null;const Fe=xe&&xe.unsubscribe&&(()=>{xe.unsubscribe()});let We,st=null;const qn=()=>new D("Request body larger than maxBodyLength limit",D.ERR_BAD_REQUEST,C,fe);try{let Q;const ye=$o("auth");if(ye){const W=v.getSafeProp(ye,"username")||"",ge=v.getSafeProp(ye,"password")||"";Q={username:W,password:ge}}if(Uo(L)){const W=new URL(L,ue.origin);if(!Q&&(W.username||W.password)){const ge=An(W.username),Ne=An(W.password);Q={username:ge,password:Ne}}(W.username||W.password)&&(W.username="",W.password="",L=W.href)}if(Q&&(ke.delete("authorization"),ke.set("Authorization","Basic "+btoa(No((Q.username||"")+":"+(Q.password||""))))),it&&typeof L=="string"&&L.startsWith("data:")&&ko(L)>Se)throw new D("maxContentLength size of "+Se+" exceeded",D.ERR_BAD_RESPONSE,C,fe);if(tr&&V!=="get"&&V!=="head"){const W=await ee(z);if(typeof W=="number"&&isFinite(W)&&(We=W,W>kt))throw qn()}const xt=tr&&(v.isReadableStream(z)||v.isStream(z)),In=(W,ge,Ne)=>En(W,Tn,Me=>{if(tr&&Me>kt)throw st=qn();ge&&ge(Me)},Ne);if($&&V!=="get"&&V!=="head"&&(Le||xt)){if(We=We??await ce(ke,z),We!==0||xt){let W=new l(L,{method:"POST",body:z,duplex:"half"}),ge;if(v.isFormData(z)&&(ge=W.headers.get("content-type"))&&ke.setContentType(ge),W.body){const[Ne,Me]=Le&&_n(We,Ot(mn(Le)))||[];z=In(W.body,Ne,Me)}}}else if(xt&&!R&&k&&V!=="get"&&V!=="head")z=In(z);else if(xt&&R&&!$&&V!=="get"&&V!=="head")throw new D("Stream request bodies are not supported by the current fetch implementation",D.ERR_NOT_SUPPORT,C,fe);v.isString(Pt)||(Pt=Pt?"include":"omit");const Ho=R&&"credentials"in l.prototype;if(v.isFormData(z)){const W=ke.getContentType();W&&/^multipart\/form-data/i.test(W)&&!/boundary=/i.test(W)&&ke.delete("content-type")}ke.set("User-Agent","axios/"+Kt,!1);const be=er==null?er:Object.assign(Object.create(null),er);be&&(delete be.body,delete be.headers,delete be.method,delete be.signal,delete be.duplex,delete be.credentials);const Re=Object.assign(Object.create(null),be,{signal:xe,method:V.toUpperCase(),headers:Yr(ke.normalize()),body:z,duplex:"half",credentials:Ho?Pt:void 0});R&&(v.forEach(xo,(W,ge)=>{Re[ge]===void 0&&(Re[ge]=W)}),Re.signal===void 0&&(Re.signal=null),Re.body===void 0&&(Re.body=null)),Bo===0&&(Re.redirect="manual",be&&(be.redirect="manual")),fe=R&&new l(L,Re);let Te=await(R?Dn(fe,be):Dn(L,Re));const jn=de.from(Te.headers);if(it){const W=v.toFiniteNumber(jn.getContentLength());if(W!=null&&W>Se)throw new D("maxContentLength size of "+Se+" exceeded",D.ERR_BAD_RESPONSE,C,fe)}const rr=G&&(Pe==="stream"||Pe==="response");if(G&&Te.body&&(Ee||it||rr&&Fe)){const W={};["status","statusText","headers"].forEach(ot=>{W[ot]=Te[ot]});const ge=v.toFiniteNumber(jn.getContentLength()),[Ne,Me]=Ee&&_n(ge,Ot(mn(Ee),
vendor: 4,331 bytes, lines 3-5
3!0))||[];let Ln=0;const zo=ot=>{if(it&&(Ln=ot,Ln>Se))throw new D("maxContentLength size of "+Se+" exceeded",D.ERR_BAD_RESPONSE,C,fe);Ne&&Ne(ot)};Te=new _(En(Te.body,Tn,zo,()=>{Me&&Me(),Fe&&Fe()}),W)}Pe=Pe||"text";let Ae=await Y[v.findKey(Y,Pe)||"text"](Te,C);if(it&&!G&&!rr){let W;if(Ae!=null&&(typeof Ae.byteLength=="number"?W=Ae.byteLength:typeof Ae.size=="number"?W=Ae.size:typeof Ae=="string"&&(W=typeof n=="function"?new n().encode(Ae).byteLength:Ae.length)),typeof W=="number"&&W>Se)throw new D("maxContentLength size of "+Se+" exceeded",D.ERR_BAD_RESPONSE,C,fe)}return!rr&&Fe&&Fe(),await new Promise((W,ge)=>{pn(W,ge,{data:Ae,headers:de.from(Te.headers),status:Te.status,statusText:Te.statusText,config:C,request:fe})})}catch(Q){if(Fe&&Fe(),xe&&xe.aborted&&xe.reason instanceof D){const ye=xe.reason;throw ye.config=C,fe&&(ye.request=fe),Q!==ye&&Object.defineProperty(ye,"cause",{__proto__:null,value:Q,writable:!0,enumerable:!1,configurable:!0}),ye}if(st)throw fe&&!st.request&&(st.request=fe),st;if(Q instanceof D)throw fe&&!Q.request&&(Q.request=fe),Q;if(Q&&Q.name==="TypeError"&&/Load failed|fetch/i.test(Q.message)){const ye=new D("Network Error",D.ERR_NETWORK,C,fe,Q&&Q.response);throw Object.defineProperty(ye,"cause",{__proto__:null,value:Q.cause||Q,writable:!0,enumerable:!1,configurable:!0}),ye}throw D.from(Q,Q&&Q.code,C,fe,Q&&Q.response)}}},qo=new Map,Pn=e=>{let t=e&&e.env||{};const{fetch:r,Request:n,Response:i}=t,l=[n,i,r];let _=l.length,w=_,R,N,k=qo;for(;w--;)R=l[w],N=k.get(R),N===void 0&&k.set(R,N=w?new Map:Do(t)),k=N;return N};Pn();const Gt={http:$s,xhr:yo,fetch:{get:Pn}};v.forEach(Gt,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{__proto__:null,value:t})}catch{}Object.defineProperty(e,"adapterName",{__proto__:null,value:t})}});const kn=e=>`- ${e}`,Io=e=>v.isFunction(e)||e===null||e===!1;function jo(e,t){e=v.isArray(e)?e:[e];const{length:r}=e;let n,i;const l={};for(let _=0;_<r;_++){n=e[_];let w;if(i=n,!Io(n)&&(i=Gt[(w=String(n)).toLowerCase()],i===void 0))throw new D(`Unknown adapter '${w}'`);if(i&&(v.isFunction(i)||(i=i.get(t))))break;l[w||"#"+_]=i}if(!i){const _=Object.entries(l).map(([R,N])=>`adapter ${R} `+(N===!1?"is not supported by the environment":"is not available in the build"));let w=r?_.length>1?`since : 4`+_.map(kn).join(` 5`):" "+kn(_[0]):"as no adapter specified";throw new D("There is no suitable adapter to dispatch the request "+w,D.ERR_NOT_SUPPORT)}return i}var xn={getAdapter:jo,adapters:Gt};function Yt(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new nt(null,e)}function Zt(e){const t=v.toSafeFlatObject(e);return Yt(t),t.headers=de.from(v.getSafeProp(t,"headers")),t.data=Vt.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),xn.getAdapter(t.adapter||rt.adapter,t)(t).then(function(i){Yt(t),t.response=i;try{i.data=Vt.call(t,t.transformResponse,i)}finally{delete t.response}return i.headers=de.from(i.headers),i},function(i){if(!hn(i)&&(Yt(t),i&&i.response)){t.response=i.response;try{i.response.data=Vt.call(t,t.transformResponse,i.response)}finally{delete t.response}i.response.headers=de.from(i.response.headers)}return Promise.reject(i)})}const Tt={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Tt[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});const Nn={};Tt.transitional=function(t,r,n){function i(l,_){return"[Axios v"+Kt+"] Transitional option '"+l+"'"+_+(n?". "+n:"")}return(l,_,w)=>{if(t===!1)throw new D(i(_," has been removed"+(r?" in "+r:"")),D.ERR_DEPRECATED);return r&&!Nn[_]&&(Nn[_]=!0,console.warn(i(_," has been deprecated since v"+r+" and will be removed in the near future"))),t?t(l,_,w):!0}},Tt.spelling=function(t){return(r,n)=>(console.warn(`${n} is likely a misspelling of ${t}`),!0)};function Lo(e,t,r){if(typeof e!="object"||e===null)throw new D("options must be an object",D.ERR_BAD_OPTION_VALUE);const n=Object.keys(e);let i=n.length;for(;i-- >0;){const l=n[i],_=Object.prototype.hasOwnProperty.call(t,l)?t[l]:void 0;if(_){const w=e[l],R=w===void 0||_(w,l,e);if(R!==!0)throw new D("option "+l+" must be "+R,D.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new D("Unknown option "+l,D.ERR_BAD_OPTION)}}var At={assertOptions:Lo,validators:Tt};const he=At.validators;
5class je{constructor(t){this.defaults=t||{},this.interceptors={request:new un,response:new un}}async request(t,r){try{return await this._request(t,r)}catch(n){if(n instanceof Error)try{let i={};Error.captureStackTrace?Error.captureStackTrace(i):i=new Error;const l=i.stack;let _="";if(typeof l=="string"){const w=l.indexOf(` 6`);_=w===-1?"":l.slice(w+1)}if(!n.stack)n.stack=_;else if(_){const w=_.indexOf(` 7`),R=w===-1?-1:_.indexOf(` 8`,w+1),N=R===-1?"":_.slice(R+1);String(n.stack).endsWith(N)||(n.stack+=` 9`+_)}}catch{}throw n}}_request(t,r){typeof t=="string"?(r=r||{},r.url=t):r=t||{},r=Ie(this.defaults,r);const{transitional:n,paramsSerializer:i,headers:l}=r;n!==void 0&&At.assertOptions(n,{silentJSONParsing:he.transitional(he.boolean),forcedJSONParsing:he.transitional(he.boolean),clarifyTimeoutError:he.transitional(he.boolean),legacyInterceptorReqResOrdering:he.transitional(he.boolean),advertiseZstdAcceptEncoding:he.transitional(he.boolean),validateStatusUndefinedResolves:he.transitional(he.boolean)},!1),i!=null&&(v.isFunction(i)?r.paramsSerializer={serialize:i}:At.assertOptions(i,{encode:he.function,serialize:he.function},!0)),r.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?r.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:r.allowAbsoluteUrls=!0),At.assertOptions(r,{baseUrl:he.spelling("baseURL"),withXsrfToken:he.spelling("withXSRFToken")},!0),r.method=(v.getSafeProp(r,"method")||v.getSafeProp(this.defaults,"method")||"get").toLowerCase();let _=l&&v.merge(l.common,l[r.method]);l&&v.forEach(dn.concat("common"),Y=>{delete l[Y]}),r.headers=de.concat(_,l);const w=[];let R=!0;this.interceptors.request.forEach(function(ee){if(typeof ee.runWhen=="function"&&ee.runWhen(r)===!1)return;R=R&&ee.synchronous;const ce=r.transitional||zt;ce&&ce.legacyInterceptorReqResOrdering?w.unshift(ee.fulfilled,ee.rejected):w.push(ee.fulfilled,ee.rejected)});const N=[];this.interceptors.response.forEach(function(ee){N.push(ee.fulfilled,ee.rejected)});let k,U=0,$;if(!R){const Y=[Zt.bind(this),void 0];for(Y.unshift(...w),Y.push(...N),$=Y.length,k=Promise.resolve(r);U<$;)k=k.then(Y[U++],Y[U++]);return k}$=w.length;let G=r;for(;U<$;){const Y=w[U++],ee=w[U++];try{G=Y?Y(G):G}catch(ce){if(!ee){k=Promise.reject(ce);break}try{const C=ee.call(this,ce);v.isThenable(C)&&(k=Promise.resolve(C).then(()=>Zt.call(this,G)))}catch(C){k=Promise.reject(C)}break}}if(!k)try{k=Zt.call(this,G)}catch(Y){k=Promise.reject(Y)}for(U=0,$=N.length;U<$;)k=k.then(N[U++],N[U++]);return k}getUri(t){t=Ie(this.defaults,t);const r=yn(t.baseURL,t.url,t.allowAbsoluteUrls,t);return sn(r,t.params,t.paramsSerializer)}}v.forEach(["delete","get","head","options"],function(t){je.prototype[t]=function(r,n){return this.request(Ie(n||{},{method:t,url:r,data:n&&v.hasOwnProp(n,"data")?n.data:void 0}))}}),v.forEach(["post","put","patch","query"],function(t){function r(n){return function(l,_,w){return this.request(Ie(w||{},{method:t,headers:n?{"Content-Type":"multipart/form-data"}:{},url:l,data:_}))}}je.prototype[t]=r(),t!=="query"&&(je.prototype[t+"Form"]=r(!0))});class Qt{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let r;this.promise=new Promise(function(l){r=l});const n=this;this.promise.then(i=>{if(!n._listeners)return;let l=n._listeners.length;for(;l-- >0;)n._listeners[l](i);n._listeners=null}),this.promise.then=i=>{let l;const _=new Promise(w=>{n.subscribe(w),l=w}).then(i);return _.cancel=function(){n.unsubscribe(l)},_},t(function(l,_,w){n.reason||(n.reason=new nt(l,_,w),r(n.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 r=this._listeners.indexOf(t);r!==-1&&this._listeners.splice(r,1)}toAbortSignal(){const t=new AbortController,r=n=>{t.abort(n)};return this.subscribe(r),t.signal.unsubscribe=()=>this.unsubscribe(r),t.signal}static source(){let t;return{token:new Qt(function(i){t=i}),cancel:t}}}function Fo(e){return function(r){return e.apply(null,r)}}function Mo(e){return v.isObject(e)&&e.isAxiosError===!0}const Ct={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,Re
9setContent: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,ContentTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,UnprocessableContent: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,WebServerReturnsAnUnknownError:520,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(Ct).forEach(([e,t])=>{Ct[t]===void 0&&(Ct[t]=e)});function Un(e){const t=new je(e),r=c(je.prototype.request,t);return v.extend(r,je.prototype,t,{allOwnKeys:!0}),v.extend(r,t,null,{allOwnKeys:!0}),r.create=function(i){return Un(Ie(e,i))},r}const oe=Un(rt);return oe.Axios=je,oe.CanceledError=nt,oe.CancelToken=Qt,oe.isCancel=hn,oe.VERSION=Kt,oe.toFormData=St,oe.AxiosError=D,oe.Cancel=oe.CanceledError,oe.all=function(t){return Promise.all(t)},oe.spread=Fo,oe.isAxiosError=Mo,oe.mergeConfig=Ie,oe.AxiosHeaders=de,oe.formToJSON=e=>fn(v.isHTMLForm(e)?new FormData(e):e),oe.getAdapter=xn.getAdapter,oe.HttpStatusCode=Ct,oe.default=oe,ir=oe,ir}var sr,Mn;function Fi(){return Mn||(Mn=1,sr={VERSION:"1.4.1",BAYEUX_VERSION:"1.0",ID_LENGTH:160,JSONP_CALLBACK:"jsonpcallback",CONNECTION_TYPES:["long-polling","cross-origin-long-polling","callback-polling","websocket","eventsource","in-process"],MANDATORY_CONNECTION_TYPES:["long-polling","callback-polling","in-process"]}),sr}var or,Bn;function mt(){return Bn||(Bn=1,or=function(c){return JSON.stringify(c,function(h,a){return this[h]instanceof Array?this[h]:a})}),or}var ar,$n;function vt(){if($n)return ar;$n=1;var c=mt(),h={LOG_LEVELS:{fatal:4,error:3,warn:2,info:1,debug:0},writeLog:function(u,y){var g=h.logger||(h.wrapper||h).logger;if(g){var f=Array.prototype.slice.apply(u),d="[Faye",p=this.className,s=f.shift().replace(/\?/g,function(){try{return c(f.shift())}catch{return"[Object]"}});p&&(d+="."+p),d+="] ",typeof g[y]=="function"?g[y](d+s):typeof g=="function"&&g(d+s)}}};for(var a in h.LOG_LEVELS)(function(u){h[u]=function(){this.writeLog(arguments,u)}})(a);return ar=h,ar}var ur,Hn;function Xo(){if(Hn)return ur;Hn=1,ur=c;function c(o){h.length||a(),h[h.length]=o}var h=[],a,u=0,y=1024;function g(){for(;u<h.length;){var o=u;if(u=u+1,h[o].call(),u>y){for(var E=0,b=h.length-u;E<b;E++)h[E]=h[E+u];h.length-=u,u=0}}h.length=0,u=0}var f=typeof K<"u"?K:self,d=f.MutationObserver||f.WebKitMutationObserver;typeof d=="function"?a=p(g):a=s(g),c.requestFlush=a;function p(o){var E=1,b=new d(o),S=document.createTextNode("");return b.observe(S,{characterData:!0}),function(){E=-E,S.data=E}}function s(o){return function(){var b=setTimeout(m,0),S=setInterval(m,50);function m(){clearTimeout(b),clearInterval(S),o()}}}return c.makeRequestCallFromTimer=s,ur}var cr,zn;function Mi(){if(zn)return cr;zn=1;var c=Xo(),h=[],a=[],u=c.makeRequestCallFromTimer(y);function y(){if(a.length)throw a.shift()}cr=g;function g(d){var p;h.length?p=h.pop():p=new f,p.task=d,c(p)}function f(){this.task=null}return f.prototype.call=function(){try{this.task.call()}catch(d){g.onerror?g.onerror(d):(a.push(d),u())}finally{this.task=null,h[h.length]=this}},cr}var lr,Wn;function me(){if(Wn)return lr;Wn=1;var c=Array.prototype.forEach,h=Object.prototype.hasOwnProperty;return lr=function(a){return c.call(arguments,function(u,y){if(y!==0)for(var g in u)h.call(u,g)&&(a[g]=u[g])}),a},lr}var fr,Jn;function ve(){if(Jn)return fr;Jn=1;var c=me();return fr=function(h,a){typeof h!="function"&&(a=h,h=Object);var u=function(){return this.initialize?this.initialize.apply(this,arguments)||this:this},y=function(){};return y.prototype=h.prototype,u.prototype=new y,c(u.prototype,a),u},fr}var dr,Vn;function Ut(){if(Vn)return dr;Vn=1;var c=Mi(),h=-1,a=0,u=1,y=function(b){this._state=h,this._value=null,this._defer=[],g(this,b)};y.prototype.then=function(b,S){var m=new y,x={promise:m,onFulfilled:b,onRejected:S};return this._state===h?this._defer.push(x):f(this,x),m},y.prototype.catch=function(b){return this.then(null,b)};var g=function(b,S){if(typeof S=="function"){var m=0,x=function(A){m++===0&&d(b,A)},q=function(A){m++===0&&o(b,A)};try{S(x,q)}catch(A){q(A)}}},f=function(b,S){var m=b._state,x=b._value,q=S.promise,A=[S.onFulfilled,S.onRejected][m],B=[d,o][m];if(typeof A!="function")return B(q,x);c(function(){try{d(q,A(x))}catch(X){o(q,X)}})},d=function(b,S){if(b===S)return o(b,new TypeError("Recursive promise chain detected"));var m;try{m=p(S)}catch(x){return o(b,x)}if(!m)return s(b,S);g(b,function(x,q){m.call(S,x,q)})},p=function(b){var S=typeof b,m=(S==="object"||S==="function")&&b&&b.then;return typeof m=="function"?m:null},s=function(b,S){E(b,a,S)},o=function(b,S){E(b,u,S)},E=function(b,S,m){var x=b._defer,q=0;if(b._state=S,b._value=m,b._defer=null,x.length!==0)for(;q<x.length;)f(b,x[q++])};return y.resolve=function(b){try{if(p(b))return b}catch(S){return y.reject(S)}return new y(function(S,m){S(b)})},y.reject=function(b){return new y(function(S,m){m(b)})},y.all=function(b){return new y(function(S,m){var x=[],q=b.length,A;if(q===0)return S(x);var B=function(X,T){y.resolve(X).then(function(M){x[T]=M,--q===0&&S(x)},m)};for(A=0;A<q;A++)B(b[A],A)})},y.race=function(b){return new y(function(S,m){for(var x=0,q=b.length;x<q;x++)y.resolve(b[x]).then(S,m)})},y.deferred=function(){var b={};return b.promise=new y(function(S,m){b.resolve=S,b.reject=m}),b},dr=y,dr}var hr,Xn;function $r(){return Xn||(Xn=1,hr={commonElement:function(c,h){for(var a=0,u=c.length;a<u;a++)if(this.indexOf(h,c[a])!==-1)return c[a];return null},indexOf:function(c,h){if(c.indexOf)return c.indexOf(h);for(var a=0,u=c.length;a<u;a++)if(c[a]===h)return a;return-1},map:function(c,h,a){if(c.map)return c.map(h,a);var u=[];
9if(c instanceof Array)for(var y=0,g=c.length;y<g;y++)u.push(h.call(a||null,c[y],y));else for(var f in c)c.hasOwnProperty(f)&&u.push(h.call(a||null,f,c[f]));return u},filter:function(c,h,a){if(c.filter)return c.filter(h,a);for(var u=[],y=0,g=c.length;y<g;y++)h.call(a||null,c[y],y)&&u.push(c[y]);return u},asyncEach:function(c,h,a,u){var y=c.length,g=-1,f=0,d=!1,p=function(){if(f-=1,g+=1,g===y)return a&&a.call(u);h(c[g],o)},s=function(){if(!d){for(d=!0;f>0;)p();d=!1}},o=function(){f+=1,s()};o()}}),hr}var pr,Kn;function Hr(){if(Kn)return pr;Kn=1;var c={_registry:[],on:function(h,a,u,y){var g=function(){u.call(y)};h.addEventListener?h.addEventListener(a,g,!1):h.attachEvent("on"+a,g),this._registry.push({_element:h,_type:a,_callback:u,_context:y,_handler:g})},detach:function(h,a,u,y){for(var g=this._registry.length,f;g--;)f=this._registry[g],!(h&&h!==f._element||a&&a!==f._type||u&&u!==f._callback||y&&y!==f._context)&&(f._element.removeEventListener?f._element.removeEventListener(f._type,f._handler,!1):f._element.detachEvent("on"+f._type,f._handler),this._registry.splice(g,1),f=null)}};return pr={Event:c},pr}var gr,Gn;function Ko(){if(Gn)return gr;Gn=1;var c=$r();return gr=function(h,a){for(var u in h)if(c.indexOf(a,u)<0)throw new Error("Unrecognized option: "+u)},gr}var _r,Yn;function yt(){if(Yn)return _r;Yn=1;var c=Ut();return _r={then:function(h,a){var u=this;return this._promise||(this._promise=new c(function(y,g){u._resolve=y,u._reject=g})),arguments.length===0?this._promise:this._promise.then(h,a)},callback:function(h,a){return this.then(function(u){h.call(a,u)})},errback:function(h,a){return this.then(null,function(u){h.call(a,u)})},timeout:function(h,a){this.then();var u=this;this._timer=K.setTimeout(function(){u._reject(a)},h*1e3)},setDeferredStatus:function(h,a){this._timer&&K.clearTimeout(this._timer),this.then(),h==="succeeded"?this._resolve(a):h==="failed"?this._reject(a):delete this._promise}},_r}var mr,Zn;function Go(){if(Zn)return mr;Zn=1;var c=typeof Array.isArray=="function"?Array.isArray:function(u){return Object.prototype.toString.call(u)==="[object Array]"};function h(u,y){if(u.indexOf)return u.indexOf(y);for(var g=0;g<u.length;g++)if(y===u[g])return g;return-1}function a(){}return mr=a,a.prototype.emit=function(u){if(u==="error"&&(!this._events||!this._events.error||c(this._events.error)&&!this._events.error.length))throw arguments[1]instanceof Error?arguments[1]:new Error("Uncaught, unspecified 'error' event.");if(!this._events)return!1;var y=this._events[u];if(!y)return!1;if(typeof y=="function"){switch(arguments.length){case 1:y.call(this);break;case 2:y.call(this,arguments[1]);break;case 3:y.call(this,arguments[1],arguments[2]);break;default:var g=Array.prototype.slice.call(arguments,1);y.apply(this,g)}return!0}else if(c(y)){for(var g=Array.prototype.slice.call(arguments,1),f=y.slice(),d=0,p=f.length;d<p;d++)f[d].apply(this,g);return!0}else return!1},a.prototype.addListener=function(u,y){if(typeof y!="function")throw new Error("addListener only takes instances of Function");return this._events||(this._events={}),this.emit("newListener",u,y),this._events[u]?c(this._events[u])?this._events[u].push(y):this._events[u]=[this._events[u],y]:this._events[u]=y,this},a.prototype.on=a.prototype.addListener,a.prototype.once=function(u,y){var g=this;return g.on(u,function f(){g.removeListener(u,f),y.apply(this,arguments)}),this},a.prototype.removeListener=function(u,y){if(typeof y!="function")throw new Error("removeListener only takes instances of Function");if(!this._events||!this._events[u])return this;var g=this._events[u];if(c(g)){var f=h(g,y);if(f<0)return this;g.splice(f,1),g.length==0&&delete this._events[u]}else this._events[u]===y&&delete this._events[u];return this},a.prototype.removeAllListeners=function(u){return arguments.length===0?(this._events={},this):(u&&this._events&&this._events[u]&&(this._events[u]=null),this)},a.prototype.listeners=function(u){return this._events||(this._events={}),this._events[u]||(this._events[u]=[]),c(this._events[u])||(this._events[u]=[this._events[u]]),this._events[u]},mr}var vr,Qn;function zr(){if(Qn)return vr;Qn=1;var c=me(),h=Go(),a={countListeners:function(u){return this.listeners(u).length},bind:function(u,y,g){var f=Array.prototype.slice,d=function(){y.apply(g,f.call(arguments))};return this._listeners=this._listeners||[],this._listeners.push([u,y,g,d]),this.on(u,d)},unbind:function(u,y,g){this._listeners=this._listeners||[];for(var f=this._listeners.length,d;f--;)d=this._listeners[f],d[0]===u&&(y&&(d[1]!==y||d[2]!==g)||(this._listeners.splice(f,1),this.removeListener(u,d[3])))}};return c(a,h.prototype),a.trigger=a.emit,vr=a,vr}var yr,ei;function Bi(){return ei||(ei=1,yr={CHANNEL_NAME:/^\/(((([a-z]|[A-Z])|[0-9])|(\-|\_|\!|\~|\(|\)|\$|\@)))+(\/(((([a-z]|[A-Z])|[0-9])|(\-|\_|\!|\~|\(|\)|\$|\@)))+)*$/,CHANNEL_PATTERN:/^(\/(((([a-z]|[A-Z])|[0-9])|(\-|\_|\!|\~|\(|\)|\$|\@)))+)*\/\*{1,2}$/,ERROR:/^([0-9][0-9][0-9]:(((([a-z]|[A-Z])|[0-9])|(\-|\_|\!|\~|\(|\)|\$|\@)| |\/|\*|\.))*(,(((([a-z]|[A-Z])|[0-9])|(\-|\_|\!|\~|\(|\)|\$|\@)| |\/|\*|\.))*)*:(((([a-z]|[A-Z])|[0-9])|(\-|\_|\!|\~|\(|\)|\$|\@)| |\/|\*|\.))*|[0-9][0-9][0-9]::(((([a-z]|[A-Z])|[0-9])|(\-|\_|\!|\~|\(|\)|\$|\@)| |\/|\*|\.))*)$/,VERSION:/^([0-9])+(\.(([a-z]|[A-Z])|[0-9])(((([a-z]|[A-Z])|[0-9])|\-|\_))
9*)*$/}),yr}var br,ti;function $i(){if(ti)return br;ti=1;var c=ve(),h=me(),a=zr(),u=Bi(),y=c({initialize:function(g){this.id=this.name=g},push:function(g){this.trigger("message",g)},isUnused:function(){return this.countListeners("message")===0}});return h(y.prototype,a),h(y,{HANDSHAKE:"/meta/handshake",CONNECT:"/meta/connect",SUBSCRIBE:"/meta/subscribe",UNSUBSCRIBE:"/meta/unsubscribe",DISCONNECT:"/meta/disconnect",META:"meta",SERVICE:"service",expand:function(g){var f=this.parse(g),d=["/**",g],p=f.slice();p[p.length-1]="*",d.push(this.unparse(p));for(var s=1,o=f.length;s<o;s++)p=f.slice(0,s),p.push("**"),d.push(this.unparse(p));return d},isValid:function(g){return u.CHANNEL_NAME.test(g)||u.CHANNEL_PATTERN.test(g)},parse:function(g){return this.isValid(g)?g.split("/").slice(1):null},unparse:function(g){return"/"+g.join("/")},isMeta:function(g){var f=this.parse(g);return f?f[0]===this.META:null},isService:function(g){var f=this.parse(g);return f?f[0]===this.SERVICE:null},isSubscribable:function(g){return this.isValid(g)?!this.isMeta(g)&&!this.isService(g):null},Set:c({initialize:function(){this._channels={}},getKeys:function(){var g=[];for(var f in this._channels)g.push(f);return g},remove:function(g){delete this._channels[g]},hasSubscription:function(g){return this._channels.hasOwnProperty(g)},subscribe:function(g,f){for(var d,p=0,s=g.length;p<s;p++){d=g[p];var o=this._channels[d]=this._channels[d]||new y(d);o.bind("message",f)}},unsubscribe:function(g,f){var d=this._channels[g];return d?(d.unbind("message",f),d.isUnused()?(this.remove(g),!0):!1):!1},distributeMessage:function(g){for(var f=y.expand(g.channel),d=0,p=f.length;d<p;d++){var s=this._channels[f[d]];s&&s.trigger("message",g)}}})}),br=y,br}var wr,ri;function Ve(){return ri||(ri=1,wr={isURI:function(c){return c&&c.protocol&&c.host&&c.path},isSameOrigin:function(c){return c.protocol===location.protocol&&c.hostname===location.hostname&&c.port===location.port},parse:function(c){if(typeof c!="string")return c;var h={},a,u,y,g,f,d,p=function(s,o){c=c.replace(o,function(E){return h[s]=E,""}),h[s]=h[s]||""};for(p("protocol",/^[a-z]+\:/i),p("host",/^\/\/[^\/\?#]+/),!/^\//.test(c)&&!h.host&&(c=location.pathname.replace(/[^\/]*$/,"")+c),p("pathname",/^[^\?#]*/),p("search",/^\?[^#]*/),p("hash",/^#.*/),h.protocol=h.protocol||location.protocol,h.host?(h.host=h.host.substr(2),/@/.test(h.host)&&(h.auth=h.host.split("@")[0],h.host=h.host.split("@")[1]),a=h.host.match(/^\[([^\]]+)\]|^[^:]+/),h.hostname=a[1]||a[0],h.port=(h.host.match(/:(\d+)$/)||[])[1]||""):(h.host=location.host,h.hostname=location.hostname,h.port=location.port),h.pathname=h.pathname||"/",h.path=h.pathname+h.search,u=h.search.replace(/^\?/,""),y=u?u.split("&"):[],d={},g=0,f=y.length;g<f;g++)a=y[g].split("="),d[decodeURIComponent(a[0]||"")]=decodeURIComponent(a[1]||"");return h.query=d,h.href=this.stringify(h),h},stringify:function(c){var h=c.auth?c.auth+"@":"",a=c.protocol+"//"+h+c.host;return a+=c.pathname+this.queryString(c.query)+(c.hash||""),a},queryString:function(c){var h=[];for(var a in c)c.hasOwnProperty(a)&&h.push(encodeURIComponent(a)+"="+encodeURIComponent(c[a]));return h.length===0?"":"?"+h.join("&")}}),wr}var Er,ni;function Hi(){return ni||(ni=1,Er={}),Er}var Sr,ii;function Yo(){return ii||(ii=1,Sr={addTimeout:function(c,h,a,u){if(this._timeouts=this._timeouts||{},!this._timeouts.hasOwnProperty(c)){var y=this;this._timeouts[c]=K.setTimeout(function(){delete y._timeouts[c],a.call(u)},1e3*h)}},removeTimeout:function(c){this._timeouts=this._timeouts||{};var h=this._timeouts[c];h&&(K.clearTimeout(h),delete this._timeouts[c])},removeAllTimeouts:function(){this._timeouts=this._timeouts||{};for(var c in this._timeouts)this.removeTimeout(c)}}),Sr}var Or,si;
9function Xe(){if(si)return Or;si=1;var c={},h=ve(),a=Hi().Cookie,u=Ut(),y=$r(),g=me(),f=vt(),d=Yo(),p=$i(),s=g(h({className:"Transport",DEFAULT_PORTS:{"http:":80,"https:":443,"ws:":80,"wss:":443},MAX_DELAY:0,batching:!0,initialize:function(o,E){this._dispatcher=o,this.endpoint=E,this._outbox=[],this._proxy=g({},this._dispatcher.proxy),this._proxy.origin||(this._proxy.origin=this._findProxy())},close:function(){},encode:function(o){return""},sendMessage:function(o){return this.debug("Client ? sending message to ?: ?",this._dispatcher.clientId,this.endpoint.href,o),this.batching?(this._outbox.push(o),this._flushLargeBatch(),o.channel===p.HANDSHAKE?this._publish(.01):(o.channel===p.CONNECT&&(this._connectMessage=o),this._publish(this.MAX_DELAY))):u.resolve(this.request([o]))},_makePromise:function(){var o=this;this._requestPromise=this._requestPromise||new u(function(E){o._resolvePromise=E})},_publish:function(o){return this._makePromise(),this.addTimeout("publish",o,function(){this._flush(),delete this._requestPromise},this),this._requestPromise},_flush:function(){this.removeTimeout("publish"),this._outbox.length>1&&this._connectMessage&&(this._connectMessage.advice={timeout:0}),this._resolvePromise(this.request(this._outbox)),this._connectMessage=null,this._outbox=[]},_flushLargeBatch:function(){var o=this.encode(this._outbox);if(!(o.length<this._dispatcher.maxRequestSize)){var E=this._outbox.pop();this._makePromise(),this._flush(),E&&this._outbox.push(E)}},_receive:function(o){if(o){o=[].concat(o),this.debug("Client ? received from ? via ?: ?",this._dispatcher.clientId,this.endpoint.href,this.connectionType,o);for(var E=0,b=o.length;E<b;E++)this._dispatcher.handleResponse(o[E])}},_handleError:function(o,E){o=[].concat(o),this.debug("Client ? failed to send to ? via ?: ?",this._dispatcher.clientId,this.endpoint.href,this.connectionType,o);for(var b=0,S=o.length;b<S;b++)this._dispatcher.handleError(o[b])},_getCookies:function(){var o=this._dispatcher.cookies,E=this.endpoint.href;return o?y.map(o.getCookiesSync(E),function(b){return b.cookieString()}).join("; "):""},_storeCookies:function(o){var E=this._dispatcher.cookies,b=this.endpoint.href,S;if(!(!o||!E)){o=[].concat(o);for(var m=0,x=o.length;m<x;m++)S=a.parse(o[m]),E.setCookieSync(S,b)}},_findProxy:function(){if(!(typeof process>"u")){var o=this.endpoint.protocol;if(o){var E=o.replace(/:$/,"").toLowerCase()+"_proxy",b=E.toUpperCase(),S=c,m,x;return E==="http_proxy"&&S.REQUEST_METHOD?(m=Object.keys(S).filter(function(q){return/^http_proxy$/i.test(q)}),m.length===1?m[0]===E&&S[b]===void 0&&(x=S[E]):m.length>1&&(x=S[E]),x=x||S["CGI_"+b]):(x=S[E]||S[b],x&&!S[E]&&console.warn("The environment variable "+b+" is discouraged. Use "+E+".")),x}}}}),{get:function(o,E,b,S,m){var x=o.endpoint;y.asyncEach(this._transports,function(q,A){var B=q[0],X=q[1],T=o.endpointFor(B);if(y.indexOf(b,B)>=0)return A();if(y.indexOf(E,B)<0)return X.isUsable(o,T,function(){}),A();X.isUsable(o,T,function(M){if(!M)return A();var J=X.hasOwnProperty("create")?X.create(o,T):new X(o,T);S.call(m,J)})},function(){throw new Error("Could not find a usable connection type for "+x.href)})},register:function(o,E){this._transports.push([o,E]),E.prototype.connectionType=o},getConnectionTypes:function(){return y.map(this._transports,function(o){return o[0]})},disable:function(o){if(o==="autodisconnect")for(var E=0;E<this._transports.length;E++)this._transports[E][1]._unloaded=!1},_transports:[]});return g(s.prototype,f),g(s.prototype,d),Or=s,Or}var Rr,oi;function zi(){if(oi)return Rr;oi=1;var c=ve();return Rr=c({initialize:function(){this._index={}},add:function(h){var a=h.id!==void 0?h.id:h;return this._index.hasOwnProperty(a)?!1:(this._index[a]=h,!0)},forEach:function(h,a){for(var u in this._index)this._index.hasOwnProperty(u)&&h.call(a,this._index[u])},isEmpty:function(){for(var h in this._index)if(this._index.hasOwnProperty(h))return!1;return!0},member:function(h){for(var a in this._index)if(this._index[a]===h)return!0;return!1},remove:function(h){var a=h.id!==void 0?h.id:h,u=this._index[a];return delete this._index[a],u},toArray:function(){var h=[];return this.forEach(function(a){h.push(a)}),h}}),Rr}var Tr,ai;function Wr(){if(ai)return Tr;ai=1;var c=function(h){var a,u,y;if(h instanceof Array){for(a=[],u=h.length;u--;)a[u]=c(h[u]);return a}else if(typeof h=="object"){a=h===null?null:{};for(y in h)a[y]=c(h[y]);return a}else return h};return Tr=c,Tr}var Ar,ui;
9function Zo(){if(ui)return Ar;ui=1;var c=K.MozWebSocket||K.WebSocket;return Ar={create:function(h,a,u){return typeof c!="function"?null:new c(h)}},Ar}var Cr,ci;function Qo(){if(ci)return Cr;ci=1;var c=ve(),h=Ut(),a=zi(),u=Ve(),y=Hr(),g=Wr(),f=me(),d=mt(),p=Zo(),s=yt(),o=Xe(),E=f(c(o,{UNCONNECTED:1,CONNECTING:2,CONNECTED:3,batching:!1,isUsable:function(b,S){this.callback(function(){b.call(S,!0)}),this.errback(function(){b.call(S,!1)}),this.connect()},request:function(b){this._pending=this._pending||new a;for(var S=0,m=b.length;S<m;S++)this._pending.add(b[S]);var x=this,q=new h(function(A,B){x.callback(function(X){!X||X.readyState!==1||(X.send(d(b)),A(X))}),x.connect()});return{abort:function(){q.then(function(A){A.close()})}}},connect:function(){if(!E._unloaded&&(this._state=this._state||this.UNCONNECTED,this._state===this.UNCONNECTED)){this._state=this.CONNECTING;var b=this._createSocket();if(!b)return this.setDeferredStatus("failed");var S=this;b.onopen=function(){b.headers&&S._storeCookies(b.headers["set-cookie"]),S._socket=b,S._state=S.CONNECTED,S._everConnected=!0,S.setDeferredStatus("succeeded",b)};var m=!1;b.onclose=b.onerror=function(){if(!m){m=!0;var x=S._state===S.CONNECTED;b.onopen=b.onclose=b.onerror=b.onmessage=null,delete S._socket,S._state=S.UNCONNECTED;var q=S._pending?S._pending.toArray():[];delete S._pending,x||S._everConnected?(S.setDeferredStatus("unknown"),S._handleError(q,x)):S.setDeferredStatus("failed")}},b.onmessage=function(x){var q;try{q=JSON.parse(x.data)}catch{}if(q){q=[].concat(q);for(var A=0,B=q.length;A<B;A++)q[A].successful!==void 0&&S._pending.remove(q[A]);S._receive(q)}}}},close:function(){this._socket&&this._socket.close()},_createSocket:function(){var b=E.getSocketUrl(this.endpoint),S=this._dispatcher.headers,m=this._dispatcher.wsExtensions,x=this._getCookies(),q=this._dispatcher.tls,A={extensions:m,headers:S,proxy:this._proxy,tls:q};x!==""&&(A.headers.Cookie=x);try{return p.create(b,[],A)}catch{}}}),{PROTOCOLS:{"http:":"ws:","https:":"wss:"},create:function(b,S){var m=b.transports.websocket=b.transports.websocket||{};return m[S.href]=m[S.href]||new this(b,S),m[S.href]},getSocketUrl:function(b){return b=g(b),b.protocol=this.PROTOCOLS[b.protocol],u.stringify(b)},isUsable:function(b,S,m,x){this.create(b,S).isUsable(m,x)}});return f(E.prototype,s),y.Event&&K.onbeforeunload!==void 0&&y.Event.on(K,"beforeunload",function(){E._unloaded===void 0&&(E._unloaded=!0)}),Cr=E,Cr}var Pr,li;function Wi(){if(li)return Pr;li=1;var c=ve(),h=Ve(),a=Hr(),u=me(),y=mt(),g=Xe(),f=u(c(g,{encode:function(d){return y(d)},request:function(d){var p=this.endpoint.href,s=this,o;if(K.XMLHttpRequest)o=new XMLHttpRequest;else if(K.ActiveXObject)o=new ActiveXObject("Microsoft.XMLHTTP");else return this._handleError(d);o.open("POST",p,!0),o.setRequestHeader("Content-Type","application/json"),o.setRequestHeader("Pragma","no-cache"),o.setRequestHeader("X-Requested-With","XMLHttpRequest");var E=this._dispatcher.headers;for(var b in E)E.hasOwnProperty(b)&&o.setRequestHeader(b,E[b]);var S=function(){o.abort()};return K.onbeforeunload!==void 0&&a.Event.on(K,"beforeunload",S),o.onreadystatechange=function(){if(!(!o||o.readyState!==4)){var m=null,x=o.status,q=o.responseText,A=x>=200&&x<300||x===304||x===1223;if(K.onbeforeunload!==void 0&&a.Event.detach(K,"beforeunload",S),o.onreadystatechange=function(){},o=null,!A)return s._handleError(d);try{m=JSON.parse(q)}catch{}m?s._receive(m):s._handleError(d)}},o.send(this.encode(d)),o}}),{isUsable:function(d,p,s,o){var E=navigator.product==="ReactNative"||h.isSameOrigin(p);s.call(o,E)}});return Pr=f,Pr}var kr,fi;function ea(){if(fi)return kr;fi=1;var c=ve(),h=Ve(),a=Wr(),u=me(),y=yt(),g=Xe(),f=Wi(),d=u(c(g,{initialize:function(p,s){if(g.prototype.initialize.call(this,p,s),!K.EventSource)return this.setDeferredStatus("failed");this._xhr=new f(p,s),s=a(s),s.pathname+="/"+p.clientId;var o=new K.EventSource(h.stringify(s)),E=this;o.onopen=function(){E._everConnected=!0,E.setDeferredStatus("succeeded")},o.onerror=function(){E._everConnected?E._handleError([]):(E.setDeferredStatus("failed"),o.close())},o.onmessage=function(b){var S;try{S=JSON.parse(b.data)}catch{}S?E._receive(S):E._handleError([])},this._socket=o},close:function(){this._socket&&(this._socket.onopen=this._socket.onerror=this._socket.onmessage=null,this._socket.close(),delete this._socket)},isUsable:function(p,s){this.callback(function(){p.call(s,!0)}),this.errback(function(){p.call(s,!1)})},encode:function(p){return this._xhr.encode(p)},request:function(p){return this._xhr.request(p)}}),{isUsable:function(p,s,o,E){var b=p.clientId;if(!b)return o.call(E,!1);f.isUsable(p,s,function(S){if(!S)return o.call(E,!1);this.create(p,s).isUsable(o,E)},this)},create:function(p,s){var o=p.transports.eventsource=p.transports.eventsource||{},E=p.clientId,b=a(s);return b.pathname+="/"+(E||""),b=h.stringify(b),o[b]=o[b]||new this(p,s),o[b]}});return u(d.prototype,y),kr=d,kr}var xr,di;function ta(){if(di)return xr;di=1;var c=ve(),h=zi(),a=Ve(),u=me(),y=mt(),g=Xe(),f=u(c(g,{encode:function(d){return"message="+encodeURIComponent(y(d))},request:function(d){var p=K.XDomainRequest?XDomainRequest:XMLHttpRequest,s=new p,o=++f._id,E=this._dispatcher.headers,b=this,S;if(s.open("POST",this.endpoint.href,!0),s.withCredentials=!0,s.setRequestHeader){s.setRequestHeader("Pragma","no-cache");
9for(S in E)E.hasOwnProperty(S)&&s.setRequestHeader(S,E[S])}var m=function(){if(!s)return!1;f._pending.remove(o),s.onload=s.onerror=s.ontimeout=s.onprogress=null,s=null};return s.onload=function(){var x;try{x=JSON.parse(s.responseText)}catch{}m(),x?b._receive(x):b._handleError(d)},s.onerror=s.ontimeout=function(){m(),b._handleError(d)},s.onprogress=function(){},p===K.XDomainRequest&&f._pending.add({id:o,xhr:s}),s.send(this.encode(d)),s}}),{_id:0,_pending:new h,isUsable:function(d,p,s,o){if(a.isSameOrigin(p))return s.call(o,!1);if(K.XDomainRequest)return s.call(o,p.protocol===location.protocol);if(K.XMLHttpRequest){var E=new XMLHttpRequest;return s.call(o,E.withCredentials!==void 0)}return s.call(o,!1)}});return xr=f,xr}var Nr,hi;function ra(){if(hi)return Nr;hi=1;var c=ve(),h=Ve(),a=Wr(),u=me(),y=mt(),g=Xe(),f=u(c(g,{encode:function(d){var p=a(this.endpoint);return p.query.message=y(d),p.query.jsonp="__jsonp"+f._cbCount+"__",h.stringify(p)},request:function(d){var p=document.getElementsByTagName("head")[0],s=document.createElement("script"),o=f.getCallbackName(),E=a(this.endpoint),b=this;E.query.message=y(d),E.query.jsonp=o;var S=function(){if(!K[o])return!1;K[o]=void 0;try{delete K[o]}catch{}s.parentNode.removeChild(s)};return K[o]=function(m){S(),b._receive(m)},s.type="text/javascript",s.src=h.stringify(E),p.appendChild(s),s.onerror=function(){S(),b._handleError(d)},{abort:S}}}),{_cbCount:0,getCallbackName:function(){return this._cbCount+=1,"__jsonp"+this._cbCount+"__"},isUsable:function(d,p,s,o){s.call(o,!0)}});return Nr=f,Nr}var Ur,pi;function na(){if(pi)return Ur;pi=1;var c=Xe();return c.register("websocket",Qo()),c.register("eventsource",ea()),c.register("long-polling",Wi()),c.register("cross-origin-long-polling",ta()),c.register("callback-polling",ra()),Ur=c,Ur}var Dr,gi;function Ji(){if(gi)return Dr;gi=1;var c=me(),h=function(a,u){this.message=a,this.options=u,this.attempts=0};return c(h.prototype,{getTimeout:function(){return this.options.timeout},getInterval:function(){return this.options.interval},isDeliverable:function(){var a=this.options.attempts,u=this.attempts,y=this.options.deadline,g=new Date().getTime();return!(a!==void 0&&u>=a||y!==void 0&&g>y)},send:function(){this.attempts+=1},succeed:function(){},fail:function(){},abort:function(){}}),Dr=h,Dr}var qr,_i;function ia(){if(_i)return qr;_i=1;var c=ve(),h=Ve(),a=Hi(),u=me(),y=vt(),g=zr(),f=na(),d=Ji(),p=c({className:"Dispatcher",MAX_REQUEST_SIZE:2048,DEFAULT_RETRY:5,UP:1,DOWN:2,initialize:function(s,o,E){this._client=s,this.endpoint=h.parse(o),this._alternates=E.endpoints||{},this.cookies=a.CookieJar&&new a.CookieJar,this._disabled=[],this._envelopes={},this.headers={},this.retry=E.retry||this.DEFAULT_RETRY,this._scheduler=E.scheduler||d,this._state=0,this.transports={},this.wsExtensions=[],this.proxy=E.proxy||{},typeof this._proxy=="string"&&(this._proxy={origin:this._proxy});var b=E.websocketExtensions;if(b){b=[].concat(b);for(var S=0,m=b.length;S<m;S++)this.addWebsocketExtension(b[S])}this.tls=E.tls||{},this.tls.ca=this.tls.ca||E.ca;for(var x in this._alternates)this._alternates[x]=h.parse(this._alternates[x]);this.maxRequestSize=this.MAX_REQUEST_SIZE},endpointFor:function(s){return this._alternates[s]||this.endpoint},addWebsocketExtension:function(s){this.wsExtensions.push(s)},disable:function(s){this._disabled.push(s),f.disable(s)},setHeader:function(s,o){this.headers[s]=o},close:function(){var s=this._transport;delete this._transport,s&&s.close()},getConnectionTypes:function(){return f.getConnectionTypes()}
9,selectTransport:function(s){f.get(this,s,this._disabled,function(o){this.debug("Selected ? transport for ?",o.connectionType,o.endpoint.href),o!==this._transport&&(this._transport&&this._transport.close(),this._transport=o,this.connectionType=o.connectionType)},this)},sendMessage:function(s,o,E){E=E||{};var b=s.id,S=E.attempts,m=E.deadline&&new Date().getTime()+E.deadline*1e3,x=this._envelopes[b],q;x||(q=new this._scheduler(s,{timeout:o,interval:this.retry,attempts:S,deadline:m}),x=this._envelopes[b]={message:s,scheduler:q}),this._sendEnvelope(x)},_sendEnvelope:function(s){if(this._transport&&!(s.request||s.timer)){var o=s.message,E=s.scheduler,b=this;if(!E.isDeliverable()){E.abort(),delete this._envelopes[o.id];return}s.timer=K.setTimeout(function(){b.handleError(o)},E.getTimeout()*1e3),E.send(),s.request=this._transport.sendMessage(o)}},handleResponse:function(s){var o=this._envelopes[s.id];s.successful!==void 0&&o&&(o.scheduler.succeed(),delete this._envelopes[s.id],K.clearTimeout(o.timer)),this.trigger("message",s),this._state!==this.UP&&(this._state=this.UP,this._client.trigger("transport:up"))},handleError:function(s,o){var E=this._envelopes[s.id],b=E&&E.request,S=this;if(b){b.then(function(x){x&&x.abort&&x.abort()});var m=E.scheduler;m.fail(),K.clearTimeout(E.timer),E.request=E.timer=null,o?this._sendEnvelope(E):E.timer=K.setTimeout(function(){E.timer=null,S._sendEnvelope(E)},m.getInterval()*1e3),this._state!==this.DOWN&&(this._state=this.DOWN,this._client.trigger("transport:down"))}}});return p.create=function(s,o,E){return new p(s,o,E)},u(p.prototype,g),u(p.prototype,y),qr=p,qr}var Ir,mi;function sa(){if(mi)return Ir;mi=1;var c=ve(),h=Bi(),a=c({initialize:function(g,f,d){this.code=g,this.params=Array.prototype.slice.call(f),this.message=d},toString:function(){return this.code+":"+this.params.join(",")+":"+this.message}});a.parse=function(s){if(s=s||"",!h.ERROR.test(s))return new a(null,[],s);var f=s.split(":"),d=parseInt(f[0]),p=f[1].split(","),s=f[2];return new a(d,p,s)};var u={versionMismatch:[300,"Version mismatch"],conntypeMismatch:[301,"Connection types not supported"],extMismatch:[302,"Extension mismatch"],badRequest:[400,"Bad request"],clientUnknown:[401,"Unknown client"],parameterMissing:[402,"Missing required parameter"],channelForbidden:[403,"Forbidden channel"],channelUnknown:[404,"Unknown channel"],channelInvalid:[405,"Invalid channel"],extUnknown:[406,"Unknown extension"],publishFailed:[407,"Failed to publish"],serverError:[500,"Internal server error"]};for(var y in u)(function(g){a[g]=function(){return new a(u[g][0],arguments,u[g][1]).toString()}})(y);return Ir=a,Ir}var jr,vi;function oa(){if(vi)return jr;vi=1;var c=me(),h=vt(),a={addExtension:function(u){this._extensions=this._extensions||[],this._extensions.push(u),u.added&&u.added(this)},removeExtension:function(u){if(this._extensions)for(var y=this._extensions.length;y--;)this._extensions[y]===u&&(this._extensions.splice(y,1),u.removed&&u.removed(this))},pipeThroughExtensions:function(u,y,g,f,d){if(this.debug("Passing through ? extensions: ?",u,y),!this._extensions)return f.call(d,y);var p=this._extensions.slice(),s=function(o){if(!o)return f.call(d,o);var E=p.shift();if(!E)return f.call(d,o);var b=E[u];if(!b)return s(o);b.length>=3?E[u](o,g,s):E[u](o,s)};s(y)}};return c(a,h),jr=a,jr}var Lr,yi;function aa(){if(yi)return Lr;yi=1;var c=ve(),h=yt();return Lr=c(h),Lr}var Fr,bi;function ua(){if(bi)return Fr;bi=1;var c=ve(),h=me(),a=yt(),u=c({initialize:function(y,g,f,d){this._client=y,this._channels=g,this._callback=f,this._context=d,this._cancelled=!1},withChannel:function(y,g){return this._withChannel=[y,g],this},apply:function(y,g){var f=g[0];this._callback&&this._callback.call(this._context,f.data),this._withChannel&&this._withChannel[0].call(this._withChannel[1],f.channel,f.data)},cancel:function(){this._cancelled||(this._client.unsubscribe(this._channels,this),this._cancelled=!0)},unsubscribe:function(){this.cancel()}});return h(u.prototype,a),Fr=u,Fr}var Mr,wi;function ca(){if(wi)return Mr;wi=1;var c=Mi(),h=ve();Ut();var a=$r(),u=Hr(),y=Fi(),g=me(),f=Ko(),d=yt(),p=vt(),s=zr(),o=$i(),E=ia(),b=sa(),S=oa(),m=aa(),x=ua(),q=h({className:"Client",UNCONNECTED:1,CONNECTING:2,CONNECTED:3,DISCONNECTED:4,HANDSHAKE:"handshake",RETRY:"retry",NONE:"none",CONNECTION_TIMEOUT:60,DEFAULT_ENDPOINT:"/bayeux",INTERVAL:0,initialize:function(A,B){this.info("New client created for ?",A),B=B||{},f(B,["interval","timeout","endpoints","proxy","retry","scheduler","websocketExtensions","tls","ca"]),this._channels=new o.Set,this._dispatcher=E.create(this,A||this.DEFAULT_ENDPOINT,B),this._messageId=0,this._state=this.UNCONNECTED,this._responseCallbacks={},this._advice={reconnect:this.RETRY,interval:1e3*(B.interval||this.INTERVAL),timeout:1e3*(B.timeout||this.CONNECTION_TIMEOUT)},this._dispatcher.timeout=this._advice.timeout/1e3,this._dispatcher.bind("message",this._receiveMessage,this),u.Event&&K.onbeforeunload!==void 0&&u.Event.on(K,"beforeunload",function(){a.indexOf(this._dispatcher._disabled,"autodisconnect")<0&&this.disconnect()},this)},addWebsocketExtension:function(A){return this._dispatcher.addWebsocketExtension(A)},disable:function(A){return this._dispatcher.disable(A)},setHeader:function(A,B){return this._dispatcher.setHeader(A,B)},handshake:function(A,B){if(this._advice.reconnect!==this.NONE&&this._state===this.UNCONNECTED){this._state=this.CONNECTING;var X=this;this.info("Initiating handshake with ?",this._dispatcher.endpoint.href),this._dispatcher.selectTrans
9port(y.MANDATORY_CONNECTION_TYPES),this._sendMessage({channel:o.HANDSHAKE,version:y.BAYEUX_VERSION,supportedConnectionTypes:this._dispatcher.getConnectionTypes()},{},function(T){T.successful?(this._state=this.CONNECTED,this._dispatcher.clientId=T.clientId,this._dispatcher.selectTransport(T.supportedConnectionTypes),this.info("Handshake successful: ?",this._dispatcher.clientId),this.subscribe(this._channels.getKeys(),!0),A&&c(function(){A.call(B)})):(this.info("Handshake unsuccessful"),K.setTimeout(function(){X.handshake(A,B)},this._dispatcher.retry*1e3),this._state=this.UNCONNECTED)},this)}},connect:function(A,B){if(this._advice.reconnect!==this.NONE&&this._state!==this.DISCONNECTED){if(this._state===this.UNCONNECTED)return this.handshake(function(){this.connect(A,B)},this);this.callback(A,B),this._state===this.CONNECTED&&(this.info("Calling deferred actions for ?",this._dispatcher.clientId),this.setDeferredStatus("succeeded"),this.setDeferredStatus("unknown"),!this._connectRequest&&(this._connectRequest=!0,this.info("Initiating connection for ?",this._dispatcher.clientId),this._sendMessage({channel:o.CONNECT,clientId:this._dispatcher.clientId,connectionType:this._dispatcher.connectionType},{},this._cycleConnection,this)))}},disconnect:function(){if(this._state===this.CONNECTED){this._state=this.DISCONNECTED,this.info("Disconnecting ?",this._dispatcher.clientId);var A=new m;return this._sendMessage({channel:o.DISCONNECT,clientId:this._dispatcher.clientId},{},function(B){B.successful?(this._dispatcher.close(),A.setDeferredStatus("succeeded")):A.setDeferredStatus("failed",b.parse(B.error))},this),this.info("Clearing channel listeners for ?",this._dispatcher.clientId),this._channels=new o.Set,A}},subscribe:function(A,B,X){if(A instanceof Array)return a.map(A,function(Z){return this.subscribe(Z,B,X)},this);var T=new x(this,A,B,X),M=B===!0,J=this._channels.hasSubscription(A);return J&&!M?(this._channels.subscribe([A],T),T.setDeferredStatus("succeeded"),T):(this.connect(function(){this.info("Client ? attempting to subscribe to ?",this._dispatcher.clientId,A),M||this._channels.subscribe([A],T),this._sendMessage({channel:o.SUBSCRIBE,clientId:this._dispatcher.clientId,subscription:A},{},function(Z){if(!Z.successful)return T.setDeferredStatus("failed",b.parse(Z.error)),this._channels.unsubscribe(A,T);var _e=[].concat(Z.subscription);this.info("Subscription acknowledged for ? to ?",this._dispatcher.clientId,_e),T.setDeferredStatus("succeeded")},this)},this),T)},unsubscribe:function(A,B){if(A instanceof Array)return a.map(A,function(T){return this.unsubscribe(T,B)},this);var X=this._channels.unsubscribe(A,B);X&&this.connect(function(){this.info("Client ? attempting to unsubscribe from ?",this._dispatcher.clientId,A),this._sendMessage({channel:o.UNSUBSCRIBE,clientId:this._dispatcher.clientId,subscription:A},{},function(T){if(T.successful){var M=[].concat(T.subscription);this.info("Unsubscription acknowledged for ? from ?",this._dispatcher.clientId,M)}},this)},this)},publish:function(A,B,X){f(X||{},["attempts","deadline"]);var T=new m;return this.connect(function(){this.info("Client ? queueing published message to ?: ?",this._dispatcher.clientId,A,B),this._sendMessage({channel:A,data:B,clientId:this._dispatcher.clientId},X,function(M){M.successful?T.setDeferredStatus("succeeded"):T.setDeferredStatus("failed",b.parse(M.error))},this)},this),T},_sendMessage:function(A,B,X,T){A.id=this._generateMessageId();var M=this._advice.timeout?1.2*this._advice.timeout/1e3:1.2*this._dispatcher.retry;this.pipeThroughExtensions("outgoing",A,null,function(J){J&&(X&&(this._responseCallbacks[J.id]=[X,T]),this._dispatcher.sendMessage(J,M,B||{}))},this)},_generateMessageId:function(){return this._messageId+=1,this._messageId>=Math.pow(2,32)&&(this._messageId=0),this._messageId.toString(36)},_receiveMessage:function(A){var B=A.id,X;A.successful!==void 0&&(X=this._responseCallbacks[B],delete this._responseCallbacks[B]),this.pipeThroughExtensions("incoming",A,null,function(T){T&&(T.advice&&this._handleAdvice(T.advice),this._deliverMessage(T),X&&X[0].call(X[1],T))},this)},_handleAdvice:function(A){g(this._advice,A),this._dispatcher.timeout=this._advice.timeout/1e3,this._advice.reconnect===this.HANDSHAKE&&this._state!==this.DISCONNECTED&&(this._state=this.UNCONNECTED,this._dispatcher.clientId=null,this._cycleConnection())},_deliverMessage:function(A){!A.channel||A.data===void 0||(this.info("Client ? calling listeners for ? with ?",this._dispatcher.clientId,A.channel,A.data),this._channels.distributeMessage(A))},_cycleConnection:function(){this._connectRequest&&(this._connectRequest=null,this.info("Closed connection for ?",this._dispatcher.clientId));var A=this;K.setTimeout(function(){A.connect()},this._advice.interval)}});return g(q.prototype,d),g(q.prototype,s),g(q.prototype,p),g(q.prototype,S),Mr=q,Mr}var Br,Ei;function la(){if(Ei)return Br;Ei=1;
9var c=Fi(),h=vt(),a={VERSION:c.VERSION,Client:ca(),Scheduler:Ji()};return h.wrapper=a,Br=a,Br}var Be={},Si;function fa(){if(Si)return Be;Si=1,Object.defineProperty(Be,"__esModule",{value:!0}),Be.jwtDecode=Be.InvalidTokenError=void 0;class c extends Error{}Be.InvalidTokenError=c,c.prototype.name="InvalidTokenError";function h(y){return decodeURIComponent(atob(y).replace(/(.)/g,(g,f)=>{let d=f.charCodeAt(0).toString(16).toUpperCase();return d.length<2&&(d="0"+d),"%"+d}))}function a(y){let g=y.replace(/-/g,"+").replace(/_/g,"/");switch(g.length%4){case 0:break;case 2:g+="==";break;case 3:g+="=";break;default:throw new Error("base64 string is not of the correct length")}try{return h(g)}catch{return atob(g)}}function u(y,g){if(typeof y!="string")throw new c("Invalid token specified: must be a string");g||(g={});const f=g.header===!0?0:1,d=y.split(".")[f];if(typeof d!="string")throw new c(`Invalid token specified: missing part #${f+1}`);let p;try{p=a(d)}catch(s){throw new c(`Invalid token specified: invalid base64 for part #${f+1} (${s.message})`)}try{return JSON.parse(p)}catch(s){throw new c(`Invalid token specified: invalid json for part #${f+1} (${s.message})`)}}return Be.jwtDecode=u,Be}var ut={},Oi;function Vi(){if(Oi)return ut;Oi=1,Object.defineProperty(ut,"__esModule",{value:!0}),ut.Personalization=void 0;class c{constructor(a){this.client=a}get(a){let u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return this.client.get({url:`${a}/`,serviceName:"personalization",qs:u,token:u.token||this.client.getPersonalizationToken()})}post(a){let u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},y=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.client.post({url:`${a}/`,serviceName:"personalization",qs:u,body:y,token:this.client.getPersonalizationToken()})}delete(a){let u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return this.client.delete({url:`${a}/`,serviceName:"personalization",qs:u,token:this.client.getPersonalizationToken()})}}return ut.Personalization=c,ut}var $e={},we={},Ri;function Ke(){if(Ri)return we;Ri=1,Object.defineProperty(we,"__esModule",{value:!0}),we.StreamApiError=we.SiteError=we.MissingSchemaError=we.FeedError=void 0;const c=typeof Error.captureStackTrace=="function",h=!!new Error().stack;class a extends Error{constructor(p){super(p),this.message=p,c?Error.captureStackTrace(this,a.constructor):h?this.stack=new Error().stack:this.stack=""}}class u extends a{}we.FeedError=u;class y extends a{}we.SiteError=y;class g extends a{}we.MissingSchemaError=g;class f extends a{constructor(p,s,o){super(p),this.error=s,this.response=o}}return we.StreamApiError=f,we}var Ti;function Xi(){if(Ti)return $e;Ti=1,Object.defineProperty($e,"__esModule",{value:!0}),$e.Collections=$e.CollectionEntry=void 0;var c=Ke();function h(f,d,p){return(d=a(d))in f?Object.defineProperty(f,d,{value:p,enumerable:!0,configurable:!0,writable:!0}):f[d]=p,f}function a(f){var d=u(f,"string");return typeof d=="symbol"?d:d+""}function u(f,d){if(typeof f!="object"||!f)return f;var p=f[Symbol.toPrimitive];if(p!==void 0){var s=p.call(f,d);if(typeof s!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(d==="string"?String:Number)(f)}class y{constructor(d,p,s,o){this.collection=p,this.store=d,this.id=s,this.data=o}ref(){return`SO:${this.collection}:${this.id}`}async get(){const d=await this.store.get(this.collection,this.id);return this.data=d.data,this.full=d,d}async add(){const d=await this.store.add(this.collection,this.id,this.data);return this.data=d.data,this.full=d,d}async update(){const d=await this.store.update(this.collection,this.id,this.data);return this.data=d.data,this.full=d,d}async delete(){const d=await this.store.delete(this.collection,this.id);return this.data=null,this.full=null,d}}$e.CollectionEntry=y;class g{constructor(d,p){h(this,"buildURL",(s,o)=>{const E=`collections/${s}/`;return o===void 0?E:`${E}${o}/`}),this.client=d,this.token=p}entry(d,p,s){return new y(this,d,p,s)}async get(d,p){const s=await this.client.get({url:this.buildURL(d,p),token:this.token}),o=this.entry(s.collection,s.id,s.data);return o.full=s,o}async add(d,p,s){const o=await this.client.post({url:this.buildURL(d),body:{id:p===null?void 0:p,data:s},token:this.token}),E=this.entry(o.collection,o.id,o.data);return E.full=o,E}async update(d,p,s){const o=await this.client.put({url:this.buildURL(d,p),body:{data:s},token:this.token}),E=this.entry(o.collection,o.id,o.data);return E.full=o,E}delete(d,p){return this.client.delete({url:this.buildURL(d,p),token:this.token})}upsert(d,p){if(!this.client.usingApiSecret)throw new c.SiteError("This method can only be used server-side using your API Secret");return Array.isArray(p)||(p=[p]),this.client.post({url:"collections/",serviceName:"api",body:{data:{[d]:p}},token:this.client.getCollectionsToken()})}
9upsertMany(d){if(!this.client.usingApiSecret)throw new c.SiteError("This method can only be used server-side using your API Secret");return this.client.post({url:"collections/",serviceName:"api",body:{data:d},token:this.client.getCollectionsToken()})}select(d,p){if(!this.client.usingApiSecret)throw new c.SiteError("This method can only be used server-side using your API Secret");return Array.isArray(p)||(p=[p]),this.client.get({url:"collections/",serviceName:"api",qs:{foreign_ids:p.map(s=>`${d}:${s}`).join(",")},token:this.client.getCollectionsToken()})}deleteMany(d,p){if(!this.client.usingApiSecret)throw new c.SiteError("This method can only be used server-side using your API Secret");Array.isArray(p)||(p=[p]);const s={collection_name:d,ids:p.map(o=>o.toString()).join(",")};return this.client.delete({url:"collections/",serviceName:"api",qs:s,token:this.client.getCollectionsToken()})}}return $e.Collections=g,$e}var ct={},Ai;function Ki(){if(Ai)return ct;Ai=1,Object.defineProperty(ct,"__esModule",{value:!0}),ct.StreamFileStore=void 0;class c{constructor(a,u){this.client=a,this.token=u}upload(a,u,y,g){return this.client.upload("files/",a,u,y,g)}delete(a){return this.client.delete({url:"files/",qs:{url:a},token:this.token})}}return ct.StreamFileStore=c,ct}var lt={},Ci;function Gi(){if(Ci)return lt;Ci=1,Object.defineProperty(lt,"__esModule",{value:!0}),lt.StreamImageStore=void 0;class c{constructor(a,u){this.client=a,this.token=u}upload(a,u,y,g){return this.client.upload("images/",a,u,y,g)}delete(a){return this.client.delete({url:"images/",qs:{url:a},token:this.token})}process(a,u){const y=Object.assign(u,{url:a});return Array.isArray(y.crop)&&(y.crop=y.crop.join(",")),this.client.get({url:"images/",qs:y,token:this.token})}thumbnail(a,u,y){let g=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{crop:"center",resize:"clip"},f=g.crop,d=g.resize;return this.process(a,{w:u,h:y,crop:f,resize:d})}}return lt.StreamImageStore=c,lt}var ft={},Pi;function Yi(){if(Pi)return ft;Pi=1,Object.defineProperty(ft,"__esModule",{value:!0}),ft.StreamReaction=void 0;var c=Ke();const h=["user_id","activity_id","reaction_id"];function a(p,s){if(p==null)return{};var o,E,b=u(p,s);if(Object.getOwnPropertySymbols){var S=Object.getOwnPropertySymbols(p);for(E=0;E<S.length;E++)o=S[E],s.indexOf(o)===-1&&{}.propertyIsEnumerable.call(p,o)&&(b[o]=p[o])}return b}function u(p,s){if(p==null)return{};var o={};for(var E in p)if({}.hasOwnProperty.call(p,E)){if(s.indexOf(E)!==-1)continue;o[E]=p[E]}return o}function y(p,s,o){return(s=g(s))in p?Object.defineProperty(p,s,{value:o,enumerable:!0,configurable:!0,writable:!0}):p[s]=o,p}function g(p){var s=f(p,"string");return typeof s=="symbol"?s:s+""}function f(p,s){if(typeof p!="object"||!p)return p;var o=p[Symbol.toPrimitive];if(o!==void 0){var E=o.call(p,s);if(typeof E!="object")return E;throw new TypeError("@@toPrimitive must return a primitive value.")}return(s==="string"?String:Number)(p)}class d{constructor(s,o){y(this,"buildURL",function(){for(var E=arguments.length,b=new Array(E),S=0;S<E;S++)b[S]=arguments[S];return`${["reaction",...b].join("/")}/`}),y(this,"_convertTargetFeeds",function(){return(arguments.length>0&&arguments[0]!==void 0?arguments[0]:[]).map(b=>typeof b=="string"?b:b.id)}),this.client=s,this.token=o}add(s,o,E){let b=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},S=b.id,m=b.targetFeeds,x=m===void 0?[]:m,q=b.userId,A=b.targetFeedsExtraData;const B={id:S,activity_id:o instanceof Object?o.id:o,kind:s,data:E||{},target_feeds:this._convertTargetFeeds(x),user_id:q};return A!=null&&(B.target_feeds_extra_data=A),this.client.post({url:this.buildURL(),body:B,token:this.token})}addChild(s,o,E){let b=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},S=b.targetFeeds,m=S===void 0?[]:S,x=b.userId,q=b.targetFeedsExtraData;const A={parent:o instanceof Object?o.id:o,kind:s,data:E||{},target_feeds:this._convertTargetFeeds(m),user_id:x};return q!=null&&(A.target_feeds_extra_data=q),this.client.post({url:this.buildURL(),body:A,token:this.token})}get(s){return this.client.get({url:this.buildURL(s),token:this.token})}filter(s){const o=s.user_id,E=s.activity_id,b=s.reaction_id,S=a(s,h);if(S.limit||(S.limit=10),(o?1:0)+(E?1:0)+(b?1:0)!=1)throw new c.SiteError("Mu
9st provide exactly one value for one of these params: user_id, activity_id, reaction_id");const m=o&&"user_id"||E&&"activity_id"||b&&"reaction_id",x=o||E||b,q=s.kind?this.buildURL(m,x,s.kind):this.buildURL(m,x);return this.client.get({url:q,qs:S,token:this.token})}update(s,o){let E=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},b=E.targetFeeds,S=b===void 0?[]:b,m=E.targetFeedsExtraData;const x={data:o,target_feeds:this._convertTargetFeeds(S)};return m!=null&&(x.target_feeds_extra_data=m),this.client.put({url:this.buildURL(s),body:x,token:this.token})}delete(s){let o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return this.client.delete({url:this.buildURL(s),token:this.token,qs:o?{soft:"true"}:void 0})}restore(s){return this.client.put({url:this.buildURL(s,"restore"),token:this.token})}}return ft.StreamReaction=d,ft}var dt={},ki;function Jr(){if(ki)return dt;ki=1,Object.defineProperty(dt,"__esModule",{value:!0}),dt.StreamUser=void 0;class c{constructor(a,u,y){this.client=a,this.id=u,this.data=void 0,this.full=void 0,this.token=y,this.url=`user/${this.id}/`}ref(){return`SU:${this.id}`}delete(){return this.client.delete({url:this.url,token:this.token})}async get(a){const u=await this.client.get({url:this.url,token:this.token,qs:a});return this.full={...u},delete this.full.duration,this.data=this.full.data,this}async create(a,u){const y=await this.client.post({url:"user/",body:{id:this.id,data:a||this.data||{}},qs:u,token:this.token});return this.full={...y},delete this.full.duration,this.data=this.full.data,this}async update(a){const u=await this.client.put({url:this.url,body:{data:a||this.data||{}},token:this.token});return this.full={...u},delete this.full.duration,this.data=this.full.data,this}getOrCreate(a){return this.create(a,{get_or_create:!0})}profile(){return this.get({with_follow_counts:!0})}flag(){let a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return this.client.flagUser(this.id,a)}}return dt.StreamUser=c,dt}var ht={},xi;function Zi(){if(xi)return ht;xi=1,Object.defineProperty(ht,"__esModule",{value:!0}),ht.StreamAuditLogs=void 0;class c{constructor(a,u){this.client=a,this.token=u}buildURL(){for(var a=arguments.length,u=new Array(a),y=0;y<a;y++)u[y]=arguments[y];return`${["audit_logs",...u].join("/")}/`}async filter(a){return this.client.get({url:this.buildURL(),qs:a,token:this.token})}}return ht.StreamAuditLogs=c,ht}var pt={},Ni;function Qi(){if(Ni)return pt;Ni=1,Object.defineProperty(pt,"__esModule",{value:!0}),pt.JWTScopeToken=u,pt.JWTUserSessionToken=y;var c=h(Je);function h(g){return g&&g.__esModule?g:{default:g}}function a(g){const f=Array.isArray(g)?g:[g],d=[];for(let p=0;p<f.length;p+=1){const s=f[p].trim();if(s==="*")return s;d.push(s)}return d.join(",")}function u(g,f,d){let p=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const s=p.expireTokens?!p.expireTokens:!0,o={resource:a(f),action:a(d)};return p.feedId&&(o.feed_id=a(p.feedId)),p.userId&&(o.user_id=p.userId),c.default.sign(o,g,{algorithm:"HS256",noTimestamp:s})}function y(g,f){let d=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},p=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};if(typeof f!="string")throw new TypeError("userId should be a string");const s={user_id:f,...d},o={algorithm:"HS256",noTimestamp:!0,...p};return c.default.sign(s,g,o)}return pt}var gt={},Ui;function es(){if(Ui)return gt;Ui=1,Object.defineProperty(gt,"__esModule",{value:!0}),gt.default=void 0;var c=a(Wo()),h=Ke();function a(T){return T&&T.__esModule?T:{default:T}}function u(T,M){return p(T)||d(T,M)||g(T,M)||y()}function y(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 10In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function g(T,M){if(T){if(typeof T=="string")return f(T,M);var J={}.toString.call(T).slice(8,-1);return J==="Object"&&T.constructor&&(J=T.constructor.name),J==="Map"||J==="Set"?Array.from(T):J==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(J)?f(T,M):void 0}}function f(T,M){(M==null||M>T.length)&&(M=T.length);for(var J=0,Z=Array(M);J<M;J++)Z[J]=T[J];return Z}function d(T,M){var J=T==null?null:typeof Symbol<"u"&&T[Symbol.iterator]||T["@@iterator"];if(J!=null){var Z,_e,Oe,De,qe=[],Ce=!0,He=!1;try{if(Oe=(J=J.call(T)).next,M!==0)for(;!(Ce=(Z=Oe.call(J)).done)&&(qe.push(Z.value),qe.length!==M);Ce=!0);}catch(Ge){He=!0,_e=Ge}
10finally{try{if(!Ce&&J.return!=null&&(De=J.return(),Object(De)!==De))return}finally{if(He)throw _e}}return qe}}function p(T){if(Array.isArray(T))return T}const s=/^[\w]+$/,o=/^[\w-]+$/;function E(T){if(!s.test(T))throw new h.FeedError(`Invalid feedSlug, please use letters, numbers or _: ${T}`);return T}function b(T){if(!o.test(T))throw new h.FeedError(`Invalid userId, please use letters, numbers, - or _: ${T}`);return T}function S(T){return T.replace(/[!'()*]/g,M=>`%${M.charCodeAt(0).toString(16).toUpperCase()}`)}function m(T){return T!==null&&typeof T=="object"&&(T.readable||typeof T._read=="function")}function x(T){return T!=null&&T.constructor!=null&&typeof T.constructor.isBuffer=="function"&&T.constructor.isBuffer(T)}function q(T){return typeof window<"u"&&"File"in window&&T instanceof File}function A(T){const M=T.split(":");if(M.length!==2)throw new h.FeedError(`Invalid feedId, expected something like user:1 got ${T}`);const J=u(M,2),Z=J[0],_e=J[1];return E(Z),b(_e),T}function B(T,M,J){const Z=new c.default;return m(T)||x(T)||q(T)?M?Z.append("file",T,M):Z.append("file",T):Z.append("file",{uri:T,name:M||T.split("/").reverse()[0],type:J||void 0,contentType:J||void 0}),Z}function X(T){if(Array.isArray(T))return T.map(J=>X(J));if(Object.prototype.toString.call(T)!=="[object Object]")return T;if(typeof T.ref=="function")return T.ref();const M={};return Object.getOwnPropertyNames(T).forEach(J=>{M[J]=X(T[J])}),M}return gt.default={validateFeedId:A,validateFeedSlug:E,validateUserId:b,rfc3986:S,isReadableStream:m,addFileToFormData:B,replaceStreamObjects:X},gt}var Ue={},Di;function da(){if(Di)return Ue;Di=1,Object.defineProperty(Ue,"__esModule",{value:!0}),Ue.default=void 0,Ue.deleteActivities=c,Ue.deleteReactions=h,Ue.exportUserActivitiesAndReactionIDs=a;function c(u){return this._throwMissingApiSecret(),this.post({url:"data_privacy/delete_activities/",body:{activities:u},token:this.getOrCreateToken()})}function h(u){return this._throwMissingApiSecret(),this.post({url:"data_privacy/delete_reactions/",body:{ids:u},token:this.getOrCreateToken()})}function a(u){if(!u)throw new Error("User ID can't be null or empty");return this.get({url:`data_privacy/export_ids/${u}`,token:this.getOrCreateToken()})}return Ue.default={deleteActivities:c,deleteReactions:h,exportUserActivitiesAndReactionIDs:a},Ue}var _t={},qi;function ts(){if(qi)return _t;qi=1,Object.defineProperty(_t,"__esModule",{value:!0}),_t.StreamFeed=void 0;var c=Jr(),h=Ke(),a=u(es());function u(g){return g&&g.__esModule?g:{default:g}}class y{constructor(f,d,p,s){if(!d||!p)throw new h.FeedError('Please provide a feed slug and user id, ie client.feed("user", "1")');if(d.indexOf(":")!==-1)throw new h.FeedError('Please initialize the feed using client.feed("user", "1") not client.feed("user:1")');if(a.default.validateFeedSlug(d),a.default.validateUserId(p),!s)throw new h.FeedError("Missing token, in client side mode please provide a feed secret");this.client=f,this.slug=d,this.userId=p,this.id=`${this.slug}:${this.userId}`,this.token=s,this.feedUrl=this.id.replace(":","/"),this.feedTogether=this.id.replace(":",""),this.notificationChannel=`site-${this.client.appId}-feed-${this.feedTogether}`}addActivity(f){return f=a.default.replaceStreamObjects(f),!f.actor&&this.client.currentUser&&(f.actor=this.client.currentUser.ref()),this.client.post({url:`feed/${this.feedUrl}/`,body:f,token:this.token})}removeActivity(f){const d=f.foreignId||f.foreign_id;return this.client.delete({url:`feed/${this.feedUrl}/${d||f}/`,qs:d?{foreign_id:"1"}:{},token:this.token})}addActivities(f){return this.client.post({url:`feed/${this.feedUrl}/`,body:{activities:a.default.replaceStreamObjects(f)},token:this.token})}follow(f,d){let p=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};d instanceof c.StreamUser&&(d=d.id),a.default.validateFeedSlug(f),a.default.validateUserId(d);const s={target:`${f}:${d}`};return typeof p.limit=="number"&&(s.activity_copy_limit=p.limit),this.client.post({url:`feed/${this.feedUrl}/following/`,body:s,token:this.token})}unfollow(f,d){let p=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const s={};typeof p.keepHistory=="boolean"&&p.keepHistory&&(s.keep_history="1"),a.default.validateFeedSlug(f),a.default.validateUserId(d);const o=`${f}:${d}`;return this.client.delete({url:`feed/${this.feedUrl}/following/${o}/`,qs:s,token:this.token})}following(){let f=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const d={};return f.filter&&(d.filter=f.filter.join(",")),this.client.get({url:`feed/${this.feedUrl}/following/`,qs:{...f,...d},token:this.token})}followers(){let f=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const d={};return f.filter&&(d.filter=f.filter.join(",")),this.client.get({url:`feed/${this.feedUrl}/followers/`,qs:{...f,...d},token:this.token})}followStats(){let f=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const d={followers:this.id,following:this.id};return f.followerSlugs&&f.followerSlugs.length&&(d.followers_slugs=f.followerSlugs.join(",")),f.followingSlugs&&f.followingSlugs.length&&(d.following_slugs=f.followingSlugs.join(",")),this.client.get({url:"stats/follow/",qs:d,token:this.client.getOrCreateToken()||this.token})}get(){let f=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const d={};f.mark_read&&f.mark_read.join&&(d.mark_read=f.mark_read.join(",")),f.mark_seen&&f.mark_seen.join&&(d.mark_seen=f.mark_seen.join(",")),this.client.replaceReactionOptions(f);const p=this.client.shouldUseEnrichEndpoint(f)?"enrich/feed/":"feed/";return this.client.get({url:`${p}${this.feedUrl}/`,qs:{...f,...d},token:this.token})}getActivityDetail(f,d){return this.get({id_lte:f,id_gte:f,limit:1,...d||{}})}getFayeClient(){return this.client.getFayeClient()}subscribe(f){if(!this.client.appId)throw new h.SiteError("Missing app id, which is needed to subscribe, use var client = stream.connect(key, secret, appId);");const d=this.getFayeClient().subscribe(`/${this.notificationChannel}`,f);return this.client.subscriptions[`/${this.notificationChannel}`]={token:this.token,userId:this.notificationChannel,fayeSubscription:d},d}unsubscribe(){const f=this.client.subscriptions[`/${this.notificationChannel}`];f&&(delete this.client.subscriptions[`/${this.notificationChannel}`],f.fayeSubscription.cancel())}_validateToTargetInput(f,d,p,s,o){if(!f)throw new Error("Missing `foreign_id` parameter!");if(!d)throw new Error("Missing `time` parameter!");if(!p&&!s&&!o)throw new Error('Requires you to provide at least one parameter for `newTargets`, `addedTargets`, or `removedTargets` - example: `updateActivityToTargets("foreignID:1234", new Date(), [newTargets...], [addedTargets...], [removedTargets...])`');if(p&&(s||o))throw new Error("Can't include add_targets or removedTargets if you're also including newTargets");
10s&&o&&s.forEach(E=>{if(o.includes(E))throw new Error("Can't have the same feed ID in addedTargets and removedTargets.")})}updateActivityToTargets(f,d,p,s,o){return this._updateActivityToTargetsMany([{foreignId:f,time:d,newTargets:p,addedTargets:s,removedTargets:o}])}_updateActivityToTargetsMany(f){if(!f||f.length===0)throw new Error("At least one input is required");const d=[];for(let p=0;p<f.length;p++){const s=f[p];this._validateToTargetInput(s.foreignId,s.time,s.newTargets,s.addedTargets,s.removedTargets);const o={foreign_id:s.foreignId,time:s.time};s.newTargets&&(o.new_targets=s.newTargets),s.addedTargets&&(o.added_targets=s.addedTargets),s.removedTargets&&(o.removed_targets=s.removedTargets),d.push(o)}return this.client.post({url:`feed_targets/${this.feedUrl}/activity_to_targets/`,token:this.token,body:d.length>1?d:d[0]})}}return _t.StreamFeed=y,_t}const ha="8.15.0",pa={version:ha};var Ii;function rs(){if(Ii)return at;Ii=1;var c={};Object.defineProperty(at,"__esModule",{value:!0}),at.StreamClient=void 0;var h=_e(Je),a=_e(Je),u=_e(Vo()),y=_e(la()),g=fa(),f=Vi(),d=Xi(),p=Ki(),s=Gi(),o=Yi(),E=Jr(),b=Zi(),S=Qi(),m=Ke(),x=Z(es()),q=Z(da()),A=Z(Je),B=Z(Je),X=ts();const T=["method","token"],M=["ids","foreignIDTimes"],J=["activities"];function Z(F){return F&&F.__esModule?F:{default:F}}function _e(F,O){if(typeof WeakMap=="function")var P=new WeakMap,j=new WeakMap;return(_e=function(H,ne){if(!ne&&H&&H.__esModule)return H;var re,I,ie={__proto__:null,default:H};if(H===null||typeof H!="object"&&typeof H!="function")return ie;if(re=ne?j:P){if(re.has(H))return re.get(H);re.set(H,ie)}for(const te in H)te!=="default"&&{}.hasOwnProperty.call(H,te)&&((I=(re=Object.defineProperty)&&Object.getOwnPropertyDescriptor(H,te))&&(I.get||I.set)?re(ie,te,I):ie[te]=H[te]);return ie})(F,O)}function Oe(F,O){return Ge(F)||He(F,O)||qe(F,O)||De()}function De(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 11In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function qe(F,O){if(F){if(typeof F=="string")return Ce(F,O);var P={}.toString.call(F).slice(8,-1);return P==="Object"&&F.constructor&&(P=F.constructor.name),P==="Map"||P==="Set"?Array.from(F):P==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(P)?Ce(F,O):void 0}}function Ce(F,O){(O==null||O>F.length)&&(O=F.length);for(var P=0,j=Array(O);P<O;P++)j[P]=F[P];return j}function He(F,O){var P=F==null?null:typeof Symbol<"u"&&F[Symbol.iterator]||F["@@iterator"];if(P!=null){var j,H,ne,re,I=[],ie=!0,te=!1;try{if(ne=(P=P.call(F)).next,O!==0)for(;!(ie=(j=ne.call(P)).done)&&(I.push(j.value),I.length!==O);ie=!0);}catch(ae){te=!0,H=ae}finally{try{if(!ie&&P.return!=null&&(re=P.return(),Object(re)!==re))return}finally{if(te)throw H}}return I}}function Ge(F){if(Array.isArray(F))return F}function Ye(F,O){if(F==null)return{};var P,j,H=Dt(F,O);if(Object.getOwnPropertySymbols){var ne=Object.getOwnPropertySymbols(F);for(j=0;j<ne.length;j++)P=ne[j],O.indexOf(P)===-1&&{}.propertyIsEnumerable.call(F,P)&&(H[P]=F[P])}return H}function Dt(F,O){if(F==null)return{};var P={};for(var j in F)if({}.hasOwnProperty.call(F,j)){if(O.indexOf(j)!==-1)continue;P[j]=F[j]}return P}function Ze(F,O,P){return(O=qt(O))in F?Object.defineProperty(F,O,{value:P,enumerable:!0,configurable:!0,writable:!0}):F[O]=P,F}function qt(F){var O=It(F,"string");return typeof O=="symbol"?O:O+""}function It(F,O){if(typeof F!="object"||!F)return F;var P=F[Symbol.toPrimitive];if(P!==void 0){var j=P.call(F,O);if(typeof j!="object")return j;throw new TypeError("@@toPrimitive must return a primitive value.")}return(O==="string"?String:Number)(F)}class bt{constructor(O,P,j){let H=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};if(Ze(this,"replaceReactionOptions",I=>{I!=null&&I.reactions&&(I.reactions.own!=null&&(I.withOwnReactions=I.reactions.own),I.reactions.recent!=null&&(I.withRecentReactions=I.reactions.recent),I.reactions.ranking_vars!=null&&(typeof I.reactions.ranking_vars=="object"||typeof I.reactions.ranking_vars=="string")&&(I.rankingVars=I.reactions.ranking_vars),I.rankingVars&&typeof I.rankingVars=="object"&&(I.rankingVars=JSON.stringify(I.rankingVars)),I.reactions.score_vars!=null&&(I.withScoreVars=I.reactions.score_vars),I.reactions.counts!=null&&(I.withReactionCounts=I.reactions.counts),I.reactions.own_children!=null&&(I.withOwnChildren=I.reactions.own_children),I.reactions.kinds!=null&&(I.reactionKindsFilter=I.reactions.kinds),I.reactions.user_id!=null&&(I.withUserId=I.reactions.user_id
11),delete I.reactions)}),Ze(this,"handleResponse",I=>{if(/^2/.test(`${I.status}`))return this.send("response",null,I,I.data),I.data;throw new m.StreamApiError(`${JSON.stringify(I.data)} with HTTP status code ${I.status}`,I.data,I)}),Ze(this,"doAxiosRequest",async(I,ie)=>{this.send("request",I,ie);try{const te=await this.request(this.enrichKwargs({method:I,...ie}));return this.handleResponse(te)}catch(te){const ae=te;if(ae.response)return this.handleResponse(ae.response);throw new m.SiteError(ae.message)}}),this.baseUrl="https://api.stream-io-api.com/api/",this.baseAnalyticsUrl="https://analytics.stream-io-api.com/analytics/",this.apiKey=O,this.usingApiSecret=P!=null&&!P.includes("."),this.apiSecret=this.usingApiSecret?P:null,this.userToken=this.usingApiSecret?null:P,this.enrichByDefault=!this.usingApiSecret,this.userToken!=null){const I=(0,g.jwtDecode)(this.userToken);if(!I.user_id)throw new TypeError("user_id is missing in user token");this.userId=I.user_id,this.currentUser=this.user(this.userId)}if(this.appId=j,this.options=H,this.version=this.options.version||"v1.0",this.fayeUrl=this.options.fayeUrl||"https://faye-us-east.stream-io-api.com/faye",this.fayeClient=null,this.group=this.options.group||"unspecified",this.subscriptions={},this.expireTokens=this.options.expireTokens?this.options.expireTokens:!1,this.location=this.options.location,this.baseUrl=this.getBaseUrl(),typeof process<"u"){var ne,re;(ne=c)!==null&&ne!==void 0&&ne.LOCAL_FAYE&&(this.fayeUrl="http://localhost:9999/faye/"),(re=c)!==null&&re!==void 0&&re.STREAM_ANALYTICS_BASE_URL&&(this.baseAnalyticsUrl=c.STREAM_ANALYTICS_BASE_URL)}if(this.handlers={},this.node=typeof window>"u",this.browser=typeof this.options.browser<"u"?this.options.browser:!this.node,this.node){const I=this.options.keepAlive===void 0?!0:this.options.keepAlive,ie=this.options.keepAliveMsecs??3e3,te={keepAlive:I,keepAliveMsecs:ie};this.options.maxSockets!==void 0&&(te.maxSockets=this.options.maxSockets),this.options.maxFreeSockets!==void 0&&(te.maxFreeSockets=this.options.maxFreeSockets),this.options.scheduling!==void 0&&(te.scheduling=this.options.scheduling),this.nodeOptions={httpAgent:this.options.httpAgent??new h.Agent(te),httpsAgent:this.options.httpsAgent??new a.Agent(te)}}if(this.request=u.default.create({timeout:this.options.timeout||1e4,withCredentials:!1,...this.nodeOptions||{}}),this.personalization=new f.Personalization(this),this.browser&&this.usingApiSecret)throw new m.FeedError('You are publicly sharing your App Secret. Do not expose the App Secret in browsers, "native" mobile apps, or other non-trusted environments.');this.collections=new d.Collections(this,this.getOrCreateToken()),this.files=new p.StreamFileStore(this,this.getOrCreateToken()),this.images=new s.StreamImageStore(this,this.getOrCreateToken()),this.reactions=new o.StreamReaction(this,this.getOrCreateToken()),this.auditLogs=new b.StreamAuditLogs(this,this.getOrCreateToken()),A.default&&B.default&&q.default&&(this.addToMany=A.default.addToMany,this.followMany=A.default.followMany,this.unfollowMany=A.default.unfollowMany,this.createRedirectUrl=B.default,this.addUsers=A.default.addUsers,this.getUsers=A.default.getUsers,this.deleteUsers=A.default.deleteUsers,this.deleteActivities=q.default.deleteActivities,this.deleteReactions=q.default.deleteReactions,this.exportUserActivitiesAndReactionIDs=q.default.exportUserActivitiesAndReactionIDs)}_throwMissingApiSecret(){if(!this.usingApiSecret)throw new m.SiteError("This method can only be used server-side using your API Secret, use client = stream.connect(key, secret);")}getPersonalizationToken(){return this._personalizationToken?this._personalizationToken:(this._throwMissingApiSecret(),this._personalizationToken=(0,S.JWTScopeToken)(this.apiSecret,"personalization","*",{userId:"*",feedId:"*",expireTokens:this.expireTokens}),this._personalizationToken)}getCollectionsToken(){return this._collectionsToken?this._collectionsToken:(this._throwMissingApiSecret(),this._collectionsToken=(0,S.JWTScopeToken)(this.apiSecret,"collections","*",{feedId:"*",expireTokens:this.expireTokens}),this._collectionsToken)}getAnalyticsToken(){return this._throwMissingApiSecret(),(0,S.JWTScopeToken)(this.apiSecret,"analytics","*",{userId:"*",expireTokens:this.expireTokens})}getBaseUrl(O){var P,j;if(O||(O="api"),this.options.urlOverride&&this.options.urlOverride[O])return this.options.urlOverride[O];const H=O==="api"?"STREAM_BASE_URL":`STREAM_${O.toUpperCase()}_URL`;return typeof process<"u"&&(P=c)!==null&&P!==void 0&&P[H]?c[H]:typeof process<"u"&&(j=c)!==null&&j!==void 0&&j.LOCAL||this.options.local?`http://localhost:8000/${O}/`:this.location?`${this.options.protocol||"https"}://${this.location}-${O}.stream-io-api.com/${O}/`:O!=="api"?`https://${O}.stream-io-api.com/${O}/`:this.baseUrl}on(O,P){this.handlers[O]=P}off(O){O===void 0?this.handlers={}:delete this.handlers[O]}send(O){for(var P=arguments.length,j=new Array(P>1?P-1:0),H=1;H<P;H++)j[H-1]=arguments[H];this.handlers[O]&&this.handlers[O].apply(this,j)}userAgent(){return typeof process>
11"u"||c.PACKAGE_VERSION===void 0?`stream-javascript-client-${this.node?"node":"browser"}-${pa.version}`:`stream-javascript-client-${this.node?"node":"browser"}-${c.PACKAGE_VERSION}`}getReadOnlyToken(O,P){return x.default.validateFeedSlug(O),x.default.validateUserId(P),(0,S.JWTScopeToken)(this.apiSecret,"*","read",{feedId:`${O}${P}`,expireTokens:this.expireTokens})}getReadWriteToken(O,P){return x.default.validateFeedSlug(O),x.default.validateUserId(P),(0,S.JWTScopeToken)(this.apiSecret,"*","*",{feedId:`${O}${P}`,expireTokens:this.expireTokens})}feed(O,P,j){return P instanceof E.StreamUser&&(P=P.id),j===void 0&&(this.usingApiSecret?j=(0,S.JWTScopeToken)(this.apiSecret,"*","*",{feedId:`${O}${P}`}):j=this.userToken),new X.StreamFeed(this,O,P||this.userId,j)}enrichUrl(O,P){return`${this.getBaseUrl(P)}${this.version}/${O}`}shouldUseEnrichEndpoint(){let O=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(O.enrich!==void 0){const P=O.enrich;return delete O.enrich,P}return this.enrichByDefault||O.ownReactions!=null||O.reactionKindsFilter!=null||O.withRecentReactions!=null||O.withScoreVars!=null||O.withReactionCounts!=null||O.withOwnChildren!=null||O.withUserId!=null}enrichKwargs(O){let P=O.method,j=O.token,H=Ye(O,T);return{method:P,url:this.enrichUrl(H.url,H.serviceName),data:H.body,params:{api_key:this.apiKey,location:this.group,...H.qs||{}},headers:{"X-Stream-Client":this.userAgent(),"stream-auth-type":"jwt",Authorization:j,...H.headers||{}},...H.axiosOptions||{}}}getFayeAuthorization(){return{incoming:(O,P)=>P(O),outgoing:(O,P)=>{if(O.subscription&&this.subscriptions[O.subscription]){const j=this.subscriptions[O.subscription];O.ext={user_id:j.userId,api_key:this.apiKey,signature:j.token}}P(O)}}}getFayeClient(){let O=arguments.length>0&&arguments[0]!==void 0?arguments[0]:10;if(this.fayeClient===null){this.fayeClient=new y.Client(this.fayeUrl,{timeout:O});const P=this.getFayeAuthorization();this.fayeClient.addExtension(P)}return this.fayeClient}upload(O,P,j,H,ne){const re=x.default.addFileToFormData(P,j,H);return this.doAxiosRequest("POST",{url:O,body:re,headers:re.getHeaders?re.getHeaders():{},token:this.getOrCreateToken(),axiosOptions:{timeout:0,maxContentLength:1/0,maxBodyLength:1/0,onUploadProgress:ne}})}get(O){return this.doAxiosRequest("GET",O)}post(O){return this.doAxiosRequest("POST",O)}delete(O){return this.doAxiosRequest("DELETE",O)}put(O){return this.doAxiosRequest("PUT",O)}createUserToken(O){let P=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return this._throwMissingApiSecret(),(0,S.JWTUserSessionToken)(this.apiSecret,O,P,{noTimestamp:!this.expireTokens})}updateActivities(O){if(this._throwMissingApiSecret(),!(O instanceof Array))throw new TypeError("The activities argument should be an Array");const P=(0,S.JWTScopeToken)(this.apiSecret,"activities","*",{feedId:"*",expireTokens:this.expireTokens});return this.post({url:"activities/",body:{activities:O},token:P})}updateActivity(O){return this._throwMissingApiSecret(),this.updateActivities([O])}getActivities(O){let P=O.ids,j=O.foreignIDTimes,H=Ye(O,M);const ne={};if(P){if(!(P instanceof Array))throw new TypeError("The ids argument should be an Array");ne.ids=P.join(",")}else if(j){if(!(j instanceof Array))throw new TypeError("The foreignIDTimes argument should be an Array");const ie=[],te=[];j.forEach(ae=>{if(!(ae instanceof Object))throw new TypeError("foreignIDTimes elements should be Objects");ie.push(ae.foreign_id||ae.foreignID),te.push(ae.time)}),ne.foreign_ids=ie.join(","),ne.timestamps=te.join(",")}else throw new TypeError("Missing ids or foreignIDTimes params");let re=this.userToken;this.usingApiSecret&&(re=(0,S.JWTScopeToken)(this.apiSecret,"activities","*",{feedId:"*",expireTokens:this.expireTokens})),this.replaceReactionOptions(H);const I=this.shouldUseEnrichEndpoint(H)?"enrich/activities/":"activities/";return this.get({url:I,qs:{...H,...ne},token:re})}getOrCreateToken(){return this._getOrCreateToken||(this._getOrCreateToken=this.usingApiSecret?(0,S.JWTScopeToken)(this.apiSecret,"*","*",{feedId:"*"}):this.userToken),this._getOrCreateToken}user(O){return new E.StreamUser(this,O,this.getOrCreateToken())}async setUser(O){if(this.usingApiSecret)throw new m.SiteError("This method can only be used client-side using a user token");const P={...O};delete P.id;const j=await this.currentUser.getOrCreate(P);return this.currentUser=j,j}og(O){return this.get({url:"og/",qs:{url:O},token:this.getOrCreateToken()})}personalizedFeed(){let O=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return this.get({url:"enrich/personalization/feed/",qs:O,token:this.getOrCreateToken()})}async activityPartialUpdate(O){const P=await this.activitiesPartialUpdate([O]),j=P.activities,H=Ye(P,J);return{...Oe(j,1)[0],...H}}activitiesPartialUpdate(O){if(!(O instanceof Array))throw new TypeError("changes should be an Array");O.forEach(j=>{if(!(j instanceof Object))throw new TypeError("changeset should be and Object");
11if(j.foreignID&&(j.foreign_id=j.foreignID),j.id===void 0&&(j.foreign_id===void 0||j.time===void 0))throw new TypeError("missing id or foreign_id and time");if(j.set&&!(j.set instanceof Object))throw new TypeError("set field should be an Object");if(j.unset&&!(j.unset instanceof Array))throw new TypeError("unset field should be an Array")});let P=this.userToken;return this.usingApiSecret&&(P=(0,S.JWTScopeToken)(this.apiSecret,"activities","*",{feedId:"*",expireTokens:this.expireTokens})),this.post({url:"activity/",body:{changes:O},token:P})}flagUser(O){let P=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return this._throwMissingApiSecret(),this.post({url:"moderation/flag",body:{entity_type:"stream:user",entity_id:O,user_id:P.user_id,reason:P.reason},token:this.getOrCreateToken()})}}return at.StreamClient=bt,at}var ji;function ga(){if(ji)return Nt;ji=1;var c={};Object.defineProperty(Nt,"__esModule",{value:!0}),Nt.connect=a;var h=rs();function a(u,y,g,f){var d;if(typeof process<"u"&&(d=c)!==null&&d!==void 0&&d.STREAM_URL&&!u){const p=/https:\/\/(\w+):(\w+)@([\w-]*).*\?app_id=(\d+)/.exec(c.STREAM_URL)||[];u=p[1],y=p[2];const s=p[3];g=p[4],f===void 0&&(f={}),s!=="getstream"&&s!=="stream-io-api"&&(f.location=s)}return new h.StreamClient(u,y,g,f)}return Nt}var Li;function _a(){return Li||(Li=1,(function(c){Object.defineProperty(c,"__esModule",{value:!0});var h=ga();Object.keys(h).forEach(function(m){m==="default"||m==="__esModule"||m in c&&c[m]===h[m]||Object.defineProperty(c,m,{enumerable:!0,get:function(){return h[m]}})});var a=rs();Object.keys(a).forEach(function(m){m==="default"||m==="__esModule"||m in c&&c[m]===a[m]||Object.defineProperty(c,m,{enumerable:!0,get:function(){return a[m]}})});var u=Xi();Object.keys(u).forEach(function(m){m==="default"||m==="__esModule"||m in c&&c[m]===u[m]||Object.defineProperty(c,m,{enumerable:!0,get:function(){return u[m]}})});var y=ts();Object.keys(y).forEach(function(m){m==="default"||m==="__esModule"||m in c&&c[m]===y[m]||Object.defineProperty(c,m,{enumerable:!0,get:function(){return y[m]}})});var g=Ki();Object.keys(g).forEach(function(m){m==="default"||m==="__esModule"||m in c&&c[m]===g[m]||Object.defineProperty(c,m,{enumerable:!0,get:function(){return g[m]}})});var f=Gi();Object.keys(f).forEach(function(m){m==="default"||m==="__esModule"||m in c&&c[m]===f[m]||Object.defineProperty(c,m,{enumerable:!0,get:function(){return f[m]}})});var d=Vi();Object.keys(d).forEach(function(m){m==="default"||m==="__esModule"||m in c&&c[m]===d[m]||Object.defineProperty(c,m,{enumerable:!0,get:function(){return d[m]}})});var p=Yi();Object.keys(p).forEach(function(m){m==="default"||m==="__esModule"||m in c&&c[m]===p[m]||Object.defineProperty(c,m,{enumerable:!0,get:function(){return p[m]}})});var s=Jr();Object.keys(s).forEach(function(m){m==="default"||m==="__esModule"||m in c&&c[m]===s[m]||Object.defineProperty(c,m,{enumerable:!0,get:function(){return s[m]}})});var o=Je;Object.keys(o).forEach(function(m){m==="default"||m==="__esModule"||m in c&&c[m]===o[m]||Object.defineProperty(c,m,{enumerable:!0,get:function(){return o[m]}})});var E=Ke();
11Object.keys(E).forEach(function(m){m==="default"||m==="__esModule"||m in c&&c[m]===E[m]||Object.defineProperty(c,m,{enumerable:!0,get:function(){return E[m]}})});var b=Qi();Object.keys(b).forEach(function(m){m==="default"||m==="__esModule"||m in c&&c[m]===b[m]||Object.defineProperty(c,m,{enumerable:!0,get:function(){return b[m]}})});var S=Zi();Object.keys(S).forEach(function(m){m==="default"||m==="__esModule"||m in c&&c[m]===S[m]||Object.defineProperty(c,m,{enumerable:!0,get:function(){return S[m]}})})})(nr)),nr}var ma=_a();const Ea=Jo({__proto__:null},[ma]);export{Ea as i}; 12//# sourceMappingURL=index-BV11BhgS.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.