@assembled-brands/frontend 0.3.18 → 0.3.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (28) hide show
  1. package/dist/pages/account-recovery-complete/index.js +4 -4
  2. package/dist/pages/account-recovery-complete/index.js.map +2 -2
  3. package/dist/pages/account-recovery-initiate/index.js +6 -6
  4. package/dist/pages/account-recovery-initiate/index.js.map +2 -2
  5. package/dist/pages/account-setup-finish-verification/index.js +6 -6
  6. package/dist/pages/account-setup-finish-verification/index.js.map +2 -2
  7. package/dist/pages/claim-account/index.js.map +1 -1
  8. package/dist/pages/cold-lead-register/index.js +6 -6
  9. package/dist/pages/cold-lead-register/index.js.map +2 -2
  10. package/dist/pages/finance-docs-accounts-inventory/index.js +1 -1
  11. package/dist/pages/finance-docs-accounts-inventory/index.js.map +2 -2
  12. package/dist/pages/finance-docs-ecommerce-performance/index.js +5 -5
  13. package/dist/pages/finance-docs-ecommerce-performance/index.js.map +2 -2
  14. package/dist/pages/finance-docs-financial-reports/index.js +1 -1
  15. package/dist/pages/finance-docs-financial-reports/index.js.map +2 -2
  16. package/dist/pages/finance-docs-team-ownership/index.js +1 -1
  17. package/dist/pages/finance-docs-team-ownership/index.js.map +2 -2
  18. package/dist/pages/financial-company-profile/index.js +5 -5
  19. package/dist/pages/financial-company-profile/index.js.map +2 -2
  20. package/dist/pages/financial-financial-overview/index.js +1 -1
  21. package/dist/pages/financial-financial-overview/index.js.map +2 -2
  22. package/dist/pages/login/index.js +7 -7
  23. package/dist/pages/login/index.js.map +2 -2
  24. package/dist/pages/onboarding-wizard/index.js +5 -5
  25. package/dist/pages/onboarding-wizard/index.js.map +1 -1
  26. package/dist/pages/team-members/index.js +6 -6
  27. package/dist/pages/team-members/index.js.map +2 -2
  28. package/package.json +1 -1
@@ -1,6 +1,6 @@
1
- var hr=Object.defineProperty;var gr=(e,t)=>{for(var r in t)hr(e,r,{get:t[r],enumerable:!0})};function te(e,t){return function(){return e.apply(t,arguments)}}var{toString:yr}=Object.prototype,{getPrototypeOf:Fe}=Object,{iterator:ye,toStringTag:dt}=Symbol,xe=(e=>t=>{let r=yr.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),_=e=>(e=e.toLowerCase(),t=>xe(t)===e),be=e=>t=>typeof t===e,{isArray:J}=Array,V=be("undefined");function re(e){return e!==null&&!V(e)&&e.constructor!==null&&!V(e.constructor)&&O(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}var ft=_("ArrayBuffer");function xr(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&ft(e.buffer),t}var br=be("string"),O=be("function"),mt=be("number"),oe=e=>e!==null&&typeof e=="object",Er=e=>e===!0||e===!1,ge=e=>{if(xe(e)!=="object")return!1;let t=Fe(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(dt in e)&&!(ye in e)},Rr=e=>{if(!oe(e)||re(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},Ar=_("Date"),wr=_("File"),vr=_("Blob"),Sr=_("FileList"),Tr=e=>oe(e)&&O(e.pipe),Cr=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||O(e.append)&&((t=xe(e))==="formdata"||t==="object"&&O(e.toString)&&e.toString()==="[object FormData]"))},Or=_("URLSearchParams"),[Lr,Dr,Pr,_r]=["ReadableStream","Request","Response","Headers"].map(_),Ur=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function ne(e,t,{allOwnKeys:r=!1}={}){if(e===null||typeof e>"u")return;let o,n;if(typeof e!="object"&&(e=[e]),J(e))for(o=0,n=e.length;o<n;o++)t.call(null,e[o],o,e);else{if(re(e))return;let s=r?Object.getOwnPropertyNames(e):Object.keys(e),i=s.length,c;for(o=0;o<i;o++)c=s[o],t.call(null,e[c],c,e)}}function ht(e,t){if(re(e))return null;t=t.toLowerCase();let r=Object.keys(e),o=r.length,n;for(;o-- >0;)if(n=r[o],t===n.toLowerCase())return n;return null}var z=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,gt=e=>!V(e)&&e!==z;function Ue(){let{caseless:e,skipUndefined:t}=gt(this)&&this||{},r={},o=(n,s)=>{let i=e&&ht(r,s)||s;ge(r[i])&&ge(n)?r[i]=Ue(r[i],n):ge(n)?r[i]=Ue({},n):J(n)?r[i]=n.slice():(!t||!V(n))&&(r[i]=n)};for(let n=0,s=arguments.length;n<s;n++)arguments[n]&&ne(arguments[n],o);return r}var Fr=(e,t,r,{allOwnKeys:o}={})=>(ne(t,(n,s)=>{r&&O(n)?e[s]=te(n,r):e[s]=n},{allOwnKeys:o}),e),Br=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Nr=(e,t,r,o)=>{e.prototype=Object.create(t.prototype,o),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),r&&Object.assign(e.prototype,r)},kr=(e,t,r,o)=>{let n,s,i,c={};if(t=t||{},e==null)return t;do{for(n=Object.getOwnPropertyNames(e),s=n.length;s-- >0;)i=n[s],(!o||o(i,e,t))&&!c[i]&&(t[i]=e[i],c[i]=!0);e=r!==!1&&Fe(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},Mr=(e,t,r)=>{e=String(e),(r===void 0||r>e.length)&&(r=e.length),r-=t.length;let o=e.indexOf(t,r);return o!==-1&&o===r},Ir=e=>{if(!e)return null;if(J(e))return e;let t=e.length;if(!mt(t))return null;let r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},Hr=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Fe(Uint8Array)),Wr=(e,t)=>{let o=(e&&e[ye]).call(e),n;for(;(n=o.next())&&!n.done;){let s=n.value;t.call(e,s[0],s[1])}},qr=(e,t)=>{let r,o=[];for(;(r=e.exec(t))!==null;)o.push(r);return o},jr=_("HTMLFormElement"),zr=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,o,n){return o.toUpperCase()+n}),pt=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),$r=_("RegExp"),yt=(e,t)=>{let r=Object.getOwnPropertyDescriptors(e),o={};ne(r,(n,s)=>{let i;(i=t(n,s,e))!==!1&&(o[s]=i||n)}),Object.defineProperties(e,o)},Gr=e=>{yt(e,(t,r)=>{if(O(e)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;let o=e[r];if(O(o)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},Vr=(e,t)=>{let r={},o=n=>{n.forEach(s=>{r[s]=!0})};return J(e)?o(e):o(String(e).split(t)),r},Jr=()=>{},Kr=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function Xr(e){return!!(e&&O(e.append)&&e[dt]==="FormData"&&e[ye])}var Qr=e=>{let t=new Array(10),r=(o,n)=>{if(oe(o)){if(t.indexOf(o)>=0)return;if(re(o))return o;if(!("toJSON"in o)){t[n]=o;let s=J(o)?[]:{};return ne(o,(i,c)=>{let d=r(i,n+1);!V(d)&&(s[c]=d)}),t[n]=void 0,s}}return o};return r(e,0)},Yr=_("AsyncFunction"),Zr=e=>e&&(oe(e)||O(e))&&O(e.then)&&O(e.catch),xt=((e,t)=>e?setImmediate:t?((r,o)=>(z.addEventListener("message",({source:n,data:s})=>{n===z&&s===r&&o.length&&o.shift()()},!1),n=>{o.push(n),z.postMessage(r,"*")}))(`axios@${Math.random()}`,[]):r=>setTimeout(r))(typeof setImmediate=="function",O(z.postMessage)),eo=typeof queueMicrotask<"u"?queueMicrotask.bind(z):typeof process<"u"&&process.nextTick||xt,to=e=>e!=null&&O(e[ye]),a={isArray:J,isArrayBuffer:ft,isBuffer:re,isFormData:Cr,isArrayBufferView:xr,isString:br,isNumber:mt,isBoolean:Er,isObject:oe,isPlainObject:ge,isEmptyObject:Rr,isReadableStream:Lr,isRequest:Dr,isResponse:Pr,isHeaders:_r,isUndefined:V,isDate:Ar,isFile:wr,isBlob:vr,isRegExp:$r,isFunction:O,isStream:Tr,isURLSearchParams:Or,isTypedArray:Hr,isFileList:Sr,forEach:ne,merge:Ue,extend:Fr,trim:Ur,stripBOM:Br,inherits:Nr,toFlatObject:kr,kindOf:xe,kindOfTest:_,endsWith:Mr,toArray:Ir,forEachEntry:Wr,matchAll:qr,isHTMLForm:jr,hasOwnProperty:pt,hasOwnProp:pt,reduceDescriptors:yt,freezeMethods:Gr,toObjectSet:Vr,toCamelCase:zr,noop:Jr,toFiniteNumber:Kr,findKey:ht,global:z,isContextDefined:gt,isSpecCompliantForm:Xr,toJSONObject:Qr,isAsyncFn:Yr,isThenable:Zr,setImmediate:xt,asap:eo,isIterable:to};function K(e,t,r,o,n){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),r&&(this.config=r),o&&(this.request=o),n&&(this.response=n,this.status=n.status?n.status:null)}a.inherits(K,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:a.toJSONObject(this.config),code:this.code,status:this.status}}});var bt=K.prototype,Et={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{Et[e]={value:e}});Object.defineProperties(K,Et);Object.defineProperty(bt,"isAxiosError",{value:!0});K.from=(e,t,r,o,n,s)=>{let i=Object.create(bt);a.toFlatObject(e,i,function(u){return u!==Error.prototype},p=>p!=="isAxiosError");let c=e&&e.message?e.message:"Error",d=t==null&&e?e.code:t;return K.call(i,c,d,r,o,n),e&&i.cause==null&&Object.defineProperty(i,"cause",{value:e,configurable:!0}),i.name=e&&e.name||"Error",s&&Object.assign(i,s),i};var g=K;var Ee=null;function Be(e){return a.isPlainObject(e)||a.isArray(e)}function At(e){return a.endsWith(e,"[]")?e.slice(0,-2):e}function Rt(e,t,r){return e?e.concat(t).map(function(n,s){return n=At(n),!r&&s?"["+n+"]":n}).join(r?".":""):t}function ro(e){return a.isArray(e)&&!e.some(Be)}var oo=a.toFlatObject(a,{},null,function(t){return/^is[A-Z]/.test(t)});function no(e,t,r){if(!a.isObject(e))throw new TypeError("target must be an object");t=t||new(Ee||FormData),r=a.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(m,f){return!a.isUndefined(f[m])});let o=r.metaTokens,n=r.visitor||u,s=r.dots,i=r.indexes,d=(r.Blob||typeof Blob<"u"&&Blob)&&a.isSpecCompliantForm(t);if(!a.isFunction(n))throw new TypeError("visitor must be a function");function p(l){if(l===null)return"";if(a.isDate(l))return l.toISOString();if(a.isBoolean(l))return l.toString();if(!d&&a.isBlob(l))throw new g("Blob is not supported. Use a Buffer instead.");return a.isArrayBuffer(l)||a.isTypedArray(l)?d&&typeof Blob=="function"?new Blob([l]):Buffer.from(l):l}function u(l,m,f){let x=l;if(l&&!f&&typeof l=="object"){if(a.endsWith(m,"{}"))m=o?m:m.slice(0,-2),l=JSON.stringify(l);else if(a.isArray(l)&&ro(l)||(a.isFileList(l)||a.endsWith(m,"[]"))&&(x=a.toArray(l)))return m=At(m),x.forEach(function(b,T){!(a.isUndefined(b)||b===null)&&t.append(i===!0?Rt([m],T,s):i===null?m:m+"[]",p(b))}),!1}return Be(l)?!0:(t.append(Rt(f,m,s),p(l)),!1)}let h=[],y=Object.assign(oo,{defaultVisitor:u,convertValue:p,isVisitable:Be});function S(l,m){if(!a.isUndefined(l)){if(h.indexOf(l)!==-1)throw Error("Circular reference detected in "+m.join("."));h.push(l),a.forEach(l,function(x,E){(!(a.isUndefined(x)||x===null)&&n.call(t,x,a.isString(E)?E.trim():E,m,y))===!0&&S(x,m?m.concat(E):[E])}),h.pop()}}if(!a.isObject(e))throw new TypeError("data must be an object");return S(e),t}var q=no;function wt(e){let t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(o){return t[o]})}function vt(e,t){this._pairs=[],e&&q(e,this,t)}var St=vt.prototype;St.append=function(t,r){this._pairs.push([t,r])};St.toString=function(t){let r=t?function(o){return t.call(this,o,wt)}:wt;return this._pairs.map(function(n){return r(n[0])+"="+r(n[1])},"").join("&")};var Re=vt;function so(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function se(e,t,r){if(!t)return e;let o=r&&r.encode||so;a.isFunction(r)&&(r={serialize:r});let n=r&&r.serialize,s;if(n?s=n(t,r):s=a.isURLSearchParams(t)?t.toString():new Re(t,r).toString(o),s){let i=e.indexOf("#");i!==-1&&(e=e.slice(0,i)),e+=(e.indexOf("?")===-1?"?":"&")+s}return e}var Ne=class{constructor(){this.handlers=[]}use(t,r,o){return this.handlers.push({fulfilled:t,rejected:r,synchronous:o?o.synchronous:!1,runWhen:o?o.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){a.forEach(this.handlers,function(o){o!==null&&t(o)})}},ke=Ne;var Ae={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1};var Tt=typeof URLSearchParams<"u"?URLSearchParams:Re;var Ct=typeof FormData<"u"?FormData:null;var Ot=typeof Blob<"u"?Blob:null;var Lt={isBrowser:!0,classes:{URLSearchParams:Tt,FormData:Ct,Blob:Ot},protocols:["http","https","file","blob","url","data"]};var He={};gr(He,{hasBrowserEnv:()=>Ie,hasStandardBrowserEnv:()=>io,hasStandardBrowserWebWorkerEnv:()=>ao,navigator:()=>Me,origin:()=>co});var Ie=typeof window<"u"&&typeof document<"u",Me=typeof navigator=="object"&&navigator||void 0,io=Ie&&(!Me||["ReactNative","NativeScript","NS"].indexOf(Me.product)<0),ao=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",co=Ie&&window.location.href||"http://localhost";var R={...He,...Lt};function We(e,t){return q(e,new R.classes.URLSearchParams,{visitor:function(r,o,n,s){return R.isNode&&a.isBuffer(r)?(this.append(o,r.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)},...t})}function lo(e){return a.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function uo(e){let t={},r=Object.keys(e),o,n=r.length,s;for(o=0;o<n;o++)s=r[o],t[s]=e[s];return t}function po(e){function t(r,o,n,s){let i=r[s++];if(i==="__proto__")return!0;let c=Number.isFinite(+i),d=s>=r.length;return i=!i&&a.isArray(n)?n.length:i,d?(a.hasOwnProp(n,i)?n[i]=[n[i],o]:n[i]=o,!c):((!n[i]||!a.isObject(n[i]))&&(n[i]=[]),t(r,o,n[i],s)&&a.isArray(n[i])&&(n[i]=uo(n[i])),!c)}if(a.isFormData(e)&&a.isFunction(e.entries)){let r={};return a.forEachEntry(e,(o,n)=>{t(lo(o),n,r,0)}),r}return null}var we=po;function fo(e,t,r){if(a.isString(e))try{return(t||JSON.parse)(e),a.trim(e)}catch(o){if(o.name!=="SyntaxError")throw o}return(r||JSON.stringify)(e)}var qe={transitional:Ae,adapter:["xhr","http","fetch"],transformRequest:[function(t,r){let o=r.getContentType()||"",n=o.indexOf("application/json")>-1,s=a.isObject(t);if(s&&a.isHTMLForm(t)&&(t=new FormData(t)),a.isFormData(t))return n?JSON.stringify(we(t)):t;if(a.isArrayBuffer(t)||a.isBuffer(t)||a.isStream(t)||a.isFile(t)||a.isBlob(t)||a.isReadableStream(t))return t;if(a.isArrayBufferView(t))return t.buffer;if(a.isURLSearchParams(t))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let c;if(s){if(o.indexOf("application/x-www-form-urlencoded")>-1)return We(t,this.formSerializer).toString();if((c=a.isFileList(t))||o.indexOf("multipart/form-data")>-1){let d=this.env&&this.env.FormData;return q(c?{"files[]":t}:t,d&&new d,this.formSerializer)}}return s||n?(r.setContentType("application/json",!1),fo(t)):t}],transformResponse:[function(t){let r=this.transitional||qe.transitional,o=r&&r.forcedJSONParsing,n=this.responseType==="json";if(a.isResponse(t)||a.isReadableStream(t))return t;if(t&&a.isString(t)&&(o&&!this.responseType||n)){let i=!(r&&r.silentJSONParsing)&&n;try{return JSON.parse(t,this.parseReviver)}catch(c){if(i)throw c.name==="SyntaxError"?g.from(c,g.ERR_BAD_RESPONSE,this,null,this.response):c}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:R.classes.FormData,Blob:R.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};a.forEach(["delete","get","head","post","put","patch"],e=>{qe.headers[e]={}});var X=qe;var mo=a.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Dt=e=>{let t={},r,o,n;return e&&e.split(`
2
- `).forEach(function(i){n=i.indexOf(":"),r=i.substring(0,n).trim().toLowerCase(),o=i.substring(n+1).trim(),!(!r||t[r]&&mo[r])&&(r==="set-cookie"?t[r]?t[r].push(o):t[r]=[o]:t[r]=t[r]?t[r]+", "+o:o)}),t};var Pt=Symbol("internals");function ie(e){return e&&String(e).trim().toLowerCase()}function ve(e){return e===!1||e==null?e:a.isArray(e)?e.map(ve):String(e)}function ho(e){let t=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g,o;for(;o=r.exec(e);)t[o[1]]=o[2];return t}var go=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function je(e,t,r,o,n){if(a.isFunction(o))return o.call(this,t,r);if(n&&(t=r),!!a.isString(t)){if(a.isString(o))return t.indexOf(o)!==-1;if(a.isRegExp(o))return o.test(t)}}function yo(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,r,o)=>r.toUpperCase()+o)}function xo(e,t){let r=a.toCamelCase(" "+t);["get","set","has"].forEach(o=>{Object.defineProperty(e,o+r,{value:function(n,s,i){return this[o].call(this,t,n,s,i)},configurable:!0})})}var Q=class{constructor(t){t&&this.set(t)}set(t,r,o){let n=this;function s(c,d,p){let u=ie(d);if(!u)throw new Error("header name must be a non-empty string");let h=a.findKey(n,u);(!h||n[h]===void 0||p===!0||p===void 0&&n[h]!==!1)&&(n[h||d]=ve(c))}let i=(c,d)=>a.forEach(c,(p,u)=>s(p,u,d));if(a.isPlainObject(t)||t instanceof this.constructor)i(t,r);else if(a.isString(t)&&(t=t.trim())&&!go(t))i(Dt(t),r);else if(a.isObject(t)&&a.isIterable(t)){let c={},d,p;for(let u of t){if(!a.isArray(u))throw TypeError("Object iterator must return a key-value pair");c[p=u[0]]=(d=c[p])?a.isArray(d)?[...d,u[1]]:[d,u[1]]:u[1]}i(c,r)}else t!=null&&s(r,t,o);return this}get(t,r){if(t=ie(t),t){let o=a.findKey(this,t);if(o){let n=this[o];if(!r)return n;if(r===!0)return ho(n);if(a.isFunction(r))return r.call(this,n,o);if(a.isRegExp(r))return r.exec(n);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,r){if(t=ie(t),t){let o=a.findKey(this,t);return!!(o&&this[o]!==void 0&&(!r||je(this,this[o],o,r)))}return!1}delete(t,r){let o=this,n=!1;function s(i){if(i=ie(i),i){let c=a.findKey(o,i);c&&(!r||je(o,o[c],c,r))&&(delete o[c],n=!0)}}return a.isArray(t)?t.forEach(s):s(t),n}clear(t){let r=Object.keys(this),o=r.length,n=!1;for(;o--;){let s=r[o];(!t||je(this,this[s],s,t,!0))&&(delete this[s],n=!0)}return n}normalize(t){let r=this,o={};return a.forEach(this,(n,s)=>{let i=a.findKey(o,s);if(i){r[i]=ve(n),delete r[s];return}let c=t?yo(s):String(s).trim();c!==s&&delete r[s],r[c]=ve(n),o[c]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){let r=Object.create(null);return a.forEach(this,(o,n)=>{o!=null&&o!==!1&&(r[n]=t&&a.isArray(o)?o.join(", "):o)}),r}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,r])=>t+": "+r).join(`
3
- `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...r){let o=new this(t);return r.forEach(n=>o.set(n)),o}static accessor(t){let o=(this[Pt]=this[Pt]={accessors:{}}).accessors,n=this.prototype;function s(i){let c=ie(i);o[c]||(xo(n,i),o[c]=!0)}return a.isArray(t)?t.forEach(s):s(t),this}};Q.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);a.reduceDescriptors(Q.prototype,({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(o){this[r]=o}}});a.freezeMethods(Q);var v=Q;function ae(e,t){let r=this||X,o=t||r,n=v.from(o.headers),s=o.data;return a.forEach(e,function(c){s=c.call(r,s,n.normalize(),t?t.status:void 0)}),n.normalize(),s}function ce(e){return!!(e&&e.__CANCEL__)}function _t(e,t,r){g.call(this,e??"canceled",g.ERR_CANCELED,t,r),this.name="CanceledError"}a.inherits(_t,g,{__CANCEL__:!0});var N=_t;function le(e,t,r){let o=r.config.validateStatus;!r.status||!o||o(r.status)?e(r):t(new g("Request failed with status code "+r.status,[g.ERR_BAD_REQUEST,g.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}function ze(e){let t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function bo(e,t){e=e||10;let r=new Array(e),o=new Array(e),n=0,s=0,i;return t=t!==void 0?t:1e3,function(d){let p=Date.now(),u=o[s];i||(i=p),r[n]=d,o[n]=p;let h=s,y=0;for(;h!==n;)y+=r[h++],h=h%e;if(n=(n+1)%e,n===s&&(s=(s+1)%e),p-i<t)return;let S=u&&p-u;return S?Math.round(y*1e3/S):void 0}}var Ut=bo;function Eo(e,t){let r=0,o=1e3/t,n,s,i=(p,u=Date.now())=>{r=u,n=null,s&&(clearTimeout(s),s=null),e(...p)};return[(...p)=>{let u=Date.now(),h=u-r;h>=o?i(p,u):(n=p,s||(s=setTimeout(()=>{s=null,i(n)},o-h)))},()=>n&&i(n)]}var Ft=Eo;var Y=(e,t,r=3)=>{let o=0,n=Ut(50,250);return Ft(s=>{let i=s.loaded,c=s.lengthComputable?s.total:void 0,d=i-o,p=n(d),u=i<=c;o=i;let h={loaded:i,total:c,progress:c?i/c:void 0,bytes:d,rate:p||void 0,estimated:p&&c&&u?(c-i)/p:void 0,event:s,lengthComputable:c!=null,[t?"download":"upload"]:!0};e(h)},r)},$e=(e,t)=>{let r=e!=null;return[o=>t[0]({lengthComputable:r,total:e,loaded:o}),t[1]]},Ge=e=>(...t)=>a.asap(()=>e(...t));var Bt=R.hasStandardBrowserEnv?((e,t)=>r=>(r=new URL(r,R.origin),e.protocol===r.protocol&&e.host===r.host&&(t||e.port===r.port)))(new URL(R.origin),R.navigator&&/(msie|trident)/i.test(R.navigator.userAgent)):()=>!0;var Nt=R.hasStandardBrowserEnv?{write(e,t,r,o,n,s,i){if(typeof document>"u")return;let c=[`${e}=${encodeURIComponent(t)}`];a.isNumber(r)&&c.push(`expires=${new Date(r).toUTCString()}`),a.isString(o)&&c.push(`path=${o}`),a.isString(n)&&c.push(`domain=${n}`),s===!0&&c.push("secure"),a.isString(i)&&c.push(`SameSite=${i}`),document.cookie=c.join("; ")},read(e){if(typeof document>"u")return null;let t=document.cookie.match(new RegExp("(?:^|; )"+e+"=([^;]*)"));return t?decodeURIComponent(t[1]):null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function Ve(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Je(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function ue(e,t,r){let o=!Ve(t);return e&&(o||r==!1)?Je(e,t):t}var kt=e=>e instanceof v?{...e}:e;function U(e,t){t=t||{};let r={};function o(p,u,h,y){return a.isPlainObject(p)&&a.isPlainObject(u)?a.merge.call({caseless:y},p,u):a.isPlainObject(u)?a.merge({},u):a.isArray(u)?u.slice():u}function n(p,u,h,y){if(a.isUndefined(u)){if(!a.isUndefined(p))return o(void 0,p,h,y)}else return o(p,u,h,y)}function s(p,u){if(!a.isUndefined(u))return o(void 0,u)}function i(p,u){if(a.isUndefined(u)){if(!a.isUndefined(p))return o(void 0,p)}else return o(void 0,u)}function c(p,u,h){if(h in t)return o(p,u);if(h in e)return o(void 0,p)}let d={url:s,method:s,data:s,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,withXSRFToken:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,responseEncoding:i,validateStatus:c,headers:(p,u,h)=>n(kt(p),kt(u),h,!0)};return a.forEach(Object.keys({...e,...t}),function(u){let h=d[u]||n,y=h(e[u],t[u],u);a.isUndefined(y)&&h!==c||(r[u]=y)}),r}var Se=e=>{let t=U({},e),{data:r,withXSRFToken:o,xsrfHeaderName:n,xsrfCookieName:s,headers:i,auth:c}=t;if(t.headers=i=v.from(i),t.url=se(ue(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),c&&i.set("Authorization","Basic "+btoa((c.username||"")+":"+(c.password?unescape(encodeURIComponent(c.password)):""))),a.isFormData(r)){if(R.hasStandardBrowserEnv||R.hasStandardBrowserWebWorkerEnv)i.setContentType(void 0);else if(a.isFunction(r.getHeaders)){let d=r.getHeaders(),p=["content-type","content-length"];Object.entries(d).forEach(([u,h])=>{p.includes(u.toLowerCase())&&i.set(u,h)})}}if(R.hasStandardBrowserEnv&&(o&&a.isFunction(o)&&(o=o(t)),o||o!==!1&&Bt(t.url))){let d=n&&s&&Nt.read(s);d&&i.set(n,d)}return t};var Ro=typeof XMLHttpRequest<"u",Mt=Ro&&function(e){return new Promise(function(r,o){let n=Se(e),s=n.data,i=v.from(n.headers).normalize(),{responseType:c,onUploadProgress:d,onDownloadProgress:p}=n,u,h,y,S,l;function m(){S&&S(),l&&l(),n.cancelToken&&n.cancelToken.unsubscribe(u),n.signal&&n.signal.removeEventListener("abort",u)}let f=new XMLHttpRequest;f.open(n.method.toUpperCase(),n.url,!0),f.timeout=n.timeout;function x(){if(!f)return;let b=v.from("getAllResponseHeaders"in f&&f.getAllResponseHeaders()),L={data:!c||c==="text"||c==="json"?f.responseText:f.response,status:f.status,statusText:f.statusText,headers:b,config:e,request:f};le(function(C){r(C),m()},function(C){o(C),m()},L),f=null}"onloadend"in f?f.onloadend=x:f.onreadystatechange=function(){!f||f.readyState!==4||f.status===0&&!(f.responseURL&&f.responseURL.indexOf("file:")===0)||setTimeout(x)},f.onabort=function(){f&&(o(new g("Request aborted",g.ECONNABORTED,e,f)),f=null)},f.onerror=function(T){let L=T&&T.message?T.message:"Network Error",I=new g(L,g.ERR_NETWORK,e,f);I.event=T||null,o(I),f=null},f.ontimeout=function(){let T=n.timeout?"timeout of "+n.timeout+"ms exceeded":"timeout exceeded",L=n.transitional||Ae;n.timeoutErrorMessage&&(T=n.timeoutErrorMessage),o(new g(T,L.clarifyTimeoutError?g.ETIMEDOUT:g.ECONNABORTED,e,f)),f=null},s===void 0&&i.setContentType(null),"setRequestHeader"in f&&a.forEach(i.toJSON(),function(T,L){f.setRequestHeader(L,T)}),a.isUndefined(n.withCredentials)||(f.withCredentials=!!n.withCredentials),c&&c!=="json"&&(f.responseType=n.responseType),p&&([y,l]=Y(p,!0),f.addEventListener("progress",y)),d&&f.upload&&([h,S]=Y(d),f.upload.addEventListener("progress",h),f.upload.addEventListener("loadend",S)),(n.cancelToken||n.signal)&&(u=b=>{f&&(o(!b||b.type?new N(null,e,f):b),f.abort(),f=null)},n.cancelToken&&n.cancelToken.subscribe(u),n.signal&&(n.signal.aborted?u():n.signal.addEventListener("abort",u)));let E=ze(n.url);if(E&&R.protocols.indexOf(E)===-1){o(new g("Unsupported protocol "+E+":",g.ERR_BAD_REQUEST,e));return}f.send(s||null)})};var Ao=(e,t)=>{let{length:r}=e=e?e.filter(Boolean):[];if(t||r){let o=new AbortController,n,s=function(p){if(!n){n=!0,c();let u=p instanceof Error?p:this.reason;o.abort(u instanceof g?u:new N(u instanceof Error?u.message:u))}},i=t&&setTimeout(()=>{i=null,s(new g(`timeout ${t} of ms exceeded`,g.ETIMEDOUT))},t),c=()=>{e&&(i&&clearTimeout(i),i=null,e.forEach(p=>{p.unsubscribe?p.unsubscribe(s):p.removeEventListener("abort",s)}),e=null)};e.forEach(p=>p.addEventListener("abort",s));let{signal:d}=o;return d.unsubscribe=()=>a.asap(c),d}},It=Ao;var wo=function*(e,t){let r=e.byteLength;if(!t||r<t){yield e;return}let o=0,n;for(;o<r;)n=o+t,yield e.slice(o,n),o=n},vo=async function*(e,t){for await(let r of So(e))yield*wo(r,t)},So=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}let t=e.getReader();try{for(;;){let{done:r,value:o}=await t.read();if(r)break;yield o}}finally{await t.cancel()}},Ke=(e,t,r,o)=>{let n=vo(e,t),s=0,i,c=d=>{i||(i=!0,o&&o(d))};return new ReadableStream({async pull(d){try{let{done:p,value:u}=await n.next();if(p){c(),d.close();return}let h=u.byteLength;if(r){let y=s+=h;r(y)}d.enqueue(new Uint8Array(u))}catch(p){throw c(p),p}},cancel(d){return c(d),n.return()}},{highWaterMark:2})};var Ht=64*1024,{isFunction:Te}=a,To=(({Request:e,Response:t})=>({Request:e,Response:t}))(a.global),{ReadableStream:Wt,TextEncoder:qt}=a.global,jt=(e,...t)=>{try{return!!e(...t)}catch{return!1}},Co=e=>{e=a.merge.call({skipUndefined:!0},To,e);let{fetch:t,Request:r,Response:o}=e,n=t?Te(t):typeof fetch=="function",s=Te(r),i=Te(o);if(!n)return!1;let c=n&&Te(Wt),d=n&&(typeof qt=="function"?(l=>m=>l.encode(m))(new qt):async l=>new Uint8Array(await new r(l).arrayBuffer())),p=s&&c&&jt(()=>{let l=!1,m=new r(R.origin,{body:new Wt,method:"POST",get duplex(){return l=!0,"half"}}).headers.has("Content-Type");return l&&!m}),u=i&&c&&jt(()=>a.isReadableStream(new o("").body)),h={stream:u&&(l=>l.body)};n&&["text","arrayBuffer","blob","formData","stream"].forEach(l=>{!h[l]&&(h[l]=(m,f)=>{let x=m&&m[l];if(x)return x.call(m);throw new g(`Response type '${l}' is not supported`,g.ERR_NOT_SUPPORT,f)})});let y=async l=>{if(l==null)return 0;if(a.isBlob(l))return l.size;if(a.isSpecCompliantForm(l))return(await new r(R.origin,{method:"POST",body:l}).arrayBuffer()).byteLength;if(a.isArrayBufferView(l)||a.isArrayBuffer(l))return l.byteLength;if(a.isURLSearchParams(l)&&(l=l+""),a.isString(l))return(await d(l)).byteLength},S=async(l,m)=>{let f=a.toFiniteNumber(l.getContentLength());return f??y(m)};return async l=>{let{url:m,method:f,data:x,signal:E,cancelToken:b,timeout:T,onDownloadProgress:L,onUploadProgress:I,responseType:C,headers:D,withCredentials:F="same-origin",fetchOptions:fe}=Se(l),it=t||fetch;C=C?(C+"").toLowerCase():"text";let me=It([E,b&&b.toAbortSignal()],T),ee=null,j=me&&me.unsubscribe&&(()=>{me.unsubscribe()}),at;try{if(I&&p&&f!=="get"&&f!=="head"&&(at=await S(D,x))!==0){let W=new r(m,{method:"POST",body:x,duplex:"half"}),G;if(a.isFormData(x)&&(G=W.headers.get("content-type"))&&D.setContentType(G),W.body){let[_e,he]=$e(at,Y(Ge(I)));x=Ke(W.body,Ht,_e,he)}}a.isString(F)||(F=F?"include":"omit");let B=s&&"credentials"in r.prototype,ct={...fe,signal:me,method:f.toUpperCase(),headers:D.normalize().toJSON(),body:x,duplex:"half",credentials:B?F:void 0};ee=s&&new r(m,ct);let H=await(s?it(ee,fe):it(m,ct)),lt=u&&(C==="stream"||C==="response");if(u&&(L||lt&&j)){let W={};["status","statusText","headers"].forEach(ut=>{W[ut]=H[ut]});let G=a.toFiniteNumber(H.headers.get("content-length")),[_e,he]=L&&$e(G,Y(Ge(L),!0))||[];H=new o(Ke(H.body,Ht,_e,()=>{he&&he(),j&&j()}),W)}C=C||"text";let mr=await h[a.findKey(h,C)||"text"](H,l);return!lt&&j&&j(),await new Promise((W,G)=>{le(W,G,{data:mr,headers:v.from(H.headers),status:H.status,statusText:H.statusText,config:l,request:ee})})}catch(B){throw j&&j(),B&&B.name==="TypeError"&&/Load failed|fetch/i.test(B.message)?Object.assign(new g("Network Error",g.ERR_NETWORK,l,ee),{cause:B.cause||B}):g.from(B,B&&B.code,l,ee)}}},Oo=new Map,Xe=e=>{let t=e&&e.env||{},{fetch:r,Request:o,Response:n}=t,s=[o,n,r],i=s.length,c=i,d,p,u=Oo;for(;c--;)d=s[c],p=u.get(d),p===void 0&&u.set(d,p=c?new Map:Co(t)),u=p;return p},Ks=Xe();var Qe={http:Ee,xhr:Mt,fetch:{get:Xe}};a.forEach(Qe,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});var zt=e=>`- ${e}`,Do=e=>a.isFunction(e)||e===null||e===!1;function Po(e,t){e=a.isArray(e)?e:[e];let{length:r}=e,o,n,s={};for(let i=0;i<r;i++){o=e[i];let c;if(n=o,!Do(o)&&(n=Qe[(c=String(o)).toLowerCase()],n===void 0))throw new g(`Unknown adapter '${c}'`);if(n&&(a.isFunction(n)||(n=n.get(t))))break;s[c||"#"+i]=n}if(!n){let i=Object.entries(s).map(([d,p])=>`adapter ${d} `+(p===!1?"is not supported by the environment":"is not available in the build")),c=r?i.length>1?`since :
1
+ var hr=Object.defineProperty;var gr=(e,t)=>{for(var r in t)hr(e,r,{get:t[r],enumerable:!0})};function te(e,t){return function(){return e.apply(t,arguments)}}var{toString:yr}=Object.prototype,{getPrototypeOf:Fe}=Object,{iterator:ye,toStringTag:dt}=Symbol,xe=(e=>t=>{let r=yr.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),_=e=>(e=e.toLowerCase(),t=>xe(t)===e),be=e=>t=>typeof t===e,{isArray:J}=Array,V=be("undefined");function re(e){return e!==null&&!V(e)&&e.constructor!==null&&!V(e.constructor)&&O(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}var ft=_("ArrayBuffer");function xr(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&ft(e.buffer),t}var br=be("string"),O=be("function"),mt=be("number"),oe=e=>e!==null&&typeof e=="object",Er=e=>e===!0||e===!1,ge=e=>{if(xe(e)!=="object")return!1;let t=Fe(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(dt in e)&&!(ye in e)},Rr=e=>{if(!oe(e)||re(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},Ar=_("Date"),vr=_("File"),wr=_("Blob"),Sr=_("FileList"),Tr=e=>oe(e)&&O(e.pipe),Cr=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||O(e.append)&&((t=xe(e))==="formdata"||t==="object"&&O(e.toString)&&e.toString()==="[object FormData]"))},Or=_("URLSearchParams"),[Lr,Dr,Pr,_r]=["ReadableStream","Request","Response","Headers"].map(_),Ur=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function ne(e,t,{allOwnKeys:r=!1}={}){if(e===null||typeof e>"u")return;let o,n;if(typeof e!="object"&&(e=[e]),J(e))for(o=0,n=e.length;o<n;o++)t.call(null,e[o],o,e);else{if(re(e))return;let s=r?Object.getOwnPropertyNames(e):Object.keys(e),i=s.length,c;for(o=0;o<i;o++)c=s[o],t.call(null,e[c],c,e)}}function ht(e,t){if(re(e))return null;t=t.toLowerCase();let r=Object.keys(e),o=r.length,n;for(;o-- >0;)if(n=r[o],t===n.toLowerCase())return n;return null}var z=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,gt=e=>!V(e)&&e!==z;function Ue(){let{caseless:e,skipUndefined:t}=gt(this)&&this||{},r={},o=(n,s)=>{let i=e&&ht(r,s)||s;ge(r[i])&&ge(n)?r[i]=Ue(r[i],n):ge(n)?r[i]=Ue({},n):J(n)?r[i]=n.slice():(!t||!V(n))&&(r[i]=n)};for(let n=0,s=arguments.length;n<s;n++)arguments[n]&&ne(arguments[n],o);return r}var Fr=(e,t,r,{allOwnKeys:o}={})=>(ne(t,(n,s)=>{r&&O(n)?e[s]=te(n,r):e[s]=n},{allOwnKeys:o}),e),Br=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Nr=(e,t,r,o)=>{e.prototype=Object.create(t.prototype,o),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),r&&Object.assign(e.prototype,r)},kr=(e,t,r,o)=>{let n,s,i,c={};if(t=t||{},e==null)return t;do{for(n=Object.getOwnPropertyNames(e),s=n.length;s-- >0;)i=n[s],(!o||o(i,e,t))&&!c[i]&&(t[i]=e[i],c[i]=!0);e=r!==!1&&Fe(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},Mr=(e,t,r)=>{e=String(e),(r===void 0||r>e.length)&&(r=e.length),r-=t.length;let o=e.indexOf(t,r);return o!==-1&&o===r},Ir=e=>{if(!e)return null;if(J(e))return e;let t=e.length;if(!mt(t))return null;let r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},Hr=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Fe(Uint8Array)),Wr=(e,t)=>{let o=(e&&e[ye]).call(e),n;for(;(n=o.next())&&!n.done;){let s=n.value;t.call(e,s[0],s[1])}},qr=(e,t)=>{let r,o=[];for(;(r=e.exec(t))!==null;)o.push(r);return o},jr=_("HTMLFormElement"),zr=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,o,n){return o.toUpperCase()+n}),pt=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),$r=_("RegExp"),yt=(e,t)=>{let r=Object.getOwnPropertyDescriptors(e),o={};ne(r,(n,s)=>{let i;(i=t(n,s,e))!==!1&&(o[s]=i||n)}),Object.defineProperties(e,o)},Gr=e=>{yt(e,(t,r)=>{if(O(e)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;let o=e[r];if(O(o)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},Vr=(e,t)=>{let r={},o=n=>{n.forEach(s=>{r[s]=!0})};return J(e)?o(e):o(String(e).split(t)),r},Jr=()=>{},Kr=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function Xr(e){return!!(e&&O(e.append)&&e[dt]==="FormData"&&e[ye])}var Qr=e=>{let t=new Array(10),r=(o,n)=>{if(oe(o)){if(t.indexOf(o)>=0)return;if(re(o))return o;if(!("toJSON"in o)){t[n]=o;let s=J(o)?[]:{};return ne(o,(i,c)=>{let d=r(i,n+1);!V(d)&&(s[c]=d)}),t[n]=void 0,s}}return o};return r(e,0)},Yr=_("AsyncFunction"),Zr=e=>e&&(oe(e)||O(e))&&O(e.then)&&O(e.catch),xt=((e,t)=>e?setImmediate:t?((r,o)=>(z.addEventListener("message",({source:n,data:s})=>{n===z&&s===r&&o.length&&o.shift()()},!1),n=>{o.push(n),z.postMessage(r,"*")}))(`axios@${Math.random()}`,[]):r=>setTimeout(r))(typeof setImmediate=="function",O(z.postMessage)),eo=typeof queueMicrotask<"u"?queueMicrotask.bind(z):typeof process<"u"&&process.nextTick||xt,to=e=>e!=null&&O(e[ye]),a={isArray:J,isArrayBuffer:ft,isBuffer:re,isFormData:Cr,isArrayBufferView:xr,isString:br,isNumber:mt,isBoolean:Er,isObject:oe,isPlainObject:ge,isEmptyObject:Rr,isReadableStream:Lr,isRequest:Dr,isResponse:Pr,isHeaders:_r,isUndefined:V,isDate:Ar,isFile:vr,isBlob:wr,isRegExp:$r,isFunction:O,isStream:Tr,isURLSearchParams:Or,isTypedArray:Hr,isFileList:Sr,forEach:ne,merge:Ue,extend:Fr,trim:Ur,stripBOM:Br,inherits:Nr,toFlatObject:kr,kindOf:xe,kindOfTest:_,endsWith:Mr,toArray:Ir,forEachEntry:Wr,matchAll:qr,isHTMLForm:jr,hasOwnProperty:pt,hasOwnProp:pt,reduceDescriptors:yt,freezeMethods:Gr,toObjectSet:Vr,toCamelCase:zr,noop:Jr,toFiniteNumber:Kr,findKey:ht,global:z,isContextDefined:gt,isSpecCompliantForm:Xr,toJSONObject:Qr,isAsyncFn:Yr,isThenable:Zr,setImmediate:xt,asap:eo,isIterable:to};function K(e,t,r,o,n){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),r&&(this.config=r),o&&(this.request=o),n&&(this.response=n,this.status=n.status?n.status:null)}a.inherits(K,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:a.toJSONObject(this.config),code:this.code,status:this.status}}});var bt=K.prototype,Et={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{Et[e]={value:e}});Object.defineProperties(K,Et);Object.defineProperty(bt,"isAxiosError",{value:!0});K.from=(e,t,r,o,n,s)=>{let i=Object.create(bt);a.toFlatObject(e,i,function(u){return u!==Error.prototype},p=>p!=="isAxiosError");let c=e&&e.message?e.message:"Error",d=t==null&&e?e.code:t;return K.call(i,c,d,r,o,n),e&&i.cause==null&&Object.defineProperty(i,"cause",{value:e,configurable:!0}),i.name=e&&e.name||"Error",s&&Object.assign(i,s),i};var g=K;var Ee=null;function Be(e){return a.isPlainObject(e)||a.isArray(e)}function At(e){return a.endsWith(e,"[]")?e.slice(0,-2):e}function Rt(e,t,r){return e?e.concat(t).map(function(n,s){return n=At(n),!r&&s?"["+n+"]":n}).join(r?".":""):t}function ro(e){return a.isArray(e)&&!e.some(Be)}var oo=a.toFlatObject(a,{},null,function(t){return/^is[A-Z]/.test(t)});function no(e,t,r){if(!a.isObject(e))throw new TypeError("target must be an object");t=t||new(Ee||FormData),r=a.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(m,f){return!a.isUndefined(f[m])});let o=r.metaTokens,n=r.visitor||u,s=r.dots,i=r.indexes,d=(r.Blob||typeof Blob<"u"&&Blob)&&a.isSpecCompliantForm(t);if(!a.isFunction(n))throw new TypeError("visitor must be a function");function p(l){if(l===null)return"";if(a.isDate(l))return l.toISOString();if(a.isBoolean(l))return l.toString();if(!d&&a.isBlob(l))throw new g("Blob is not supported. Use a Buffer instead.");return a.isArrayBuffer(l)||a.isTypedArray(l)?d&&typeof Blob=="function"?new Blob([l]):Buffer.from(l):l}function u(l,m,f){let x=l;if(l&&!f&&typeof l=="object"){if(a.endsWith(m,"{}"))m=o?m:m.slice(0,-2),l=JSON.stringify(l);else if(a.isArray(l)&&ro(l)||(a.isFileList(l)||a.endsWith(m,"[]"))&&(x=a.toArray(l)))return m=At(m),x.forEach(function(b,T){!(a.isUndefined(b)||b===null)&&t.append(i===!0?Rt([m],T,s):i===null?m:m+"[]",p(b))}),!1}return Be(l)?!0:(t.append(Rt(f,m,s),p(l)),!1)}let h=[],y=Object.assign(oo,{defaultVisitor:u,convertValue:p,isVisitable:Be});function S(l,m){if(!a.isUndefined(l)){if(h.indexOf(l)!==-1)throw Error("Circular reference detected in "+m.join("."));h.push(l),a.forEach(l,function(x,E){(!(a.isUndefined(x)||x===null)&&n.call(t,x,a.isString(E)?E.trim():E,m,y))===!0&&S(x,m?m.concat(E):[E])}),h.pop()}}if(!a.isObject(e))throw new TypeError("data must be an object");return S(e),t}var q=no;function vt(e){let t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(o){return t[o]})}function wt(e,t){this._pairs=[],e&&q(e,this,t)}var St=wt.prototype;St.append=function(t,r){this._pairs.push([t,r])};St.toString=function(t){let r=t?function(o){return t.call(this,o,vt)}:vt;return this._pairs.map(function(n){return r(n[0])+"="+r(n[1])},"").join("&")};var Re=wt;function so(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function se(e,t,r){if(!t)return e;let o=r&&r.encode||so;a.isFunction(r)&&(r={serialize:r});let n=r&&r.serialize,s;if(n?s=n(t,r):s=a.isURLSearchParams(t)?t.toString():new Re(t,r).toString(o),s){let i=e.indexOf("#");i!==-1&&(e=e.slice(0,i)),e+=(e.indexOf("?")===-1?"?":"&")+s}return e}var Ne=class{constructor(){this.handlers=[]}use(t,r,o){return this.handlers.push({fulfilled:t,rejected:r,synchronous:o?o.synchronous:!1,runWhen:o?o.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){a.forEach(this.handlers,function(o){o!==null&&t(o)})}},ke=Ne;var Ae={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1};var Tt=typeof URLSearchParams<"u"?URLSearchParams:Re;var Ct=typeof FormData<"u"?FormData:null;var Ot=typeof Blob<"u"?Blob:null;var Lt={isBrowser:!0,classes:{URLSearchParams:Tt,FormData:Ct,Blob:Ot},protocols:["http","https","file","blob","url","data"]};var He={};gr(He,{hasBrowserEnv:()=>Ie,hasStandardBrowserEnv:()=>io,hasStandardBrowserWebWorkerEnv:()=>ao,navigator:()=>Me,origin:()=>co});var Ie=typeof window<"u"&&typeof document<"u",Me=typeof navigator=="object"&&navigator||void 0,io=Ie&&(!Me||["ReactNative","NativeScript","NS"].indexOf(Me.product)<0),ao=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",co=Ie&&window.location.href||"http://localhost";var R={...He,...Lt};function We(e,t){return q(e,new R.classes.URLSearchParams,{visitor:function(r,o,n,s){return R.isNode&&a.isBuffer(r)?(this.append(o,r.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)},...t})}function lo(e){return a.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function uo(e){let t={},r=Object.keys(e),o,n=r.length,s;for(o=0;o<n;o++)s=r[o],t[s]=e[s];return t}function po(e){function t(r,o,n,s){let i=r[s++];if(i==="__proto__")return!0;let c=Number.isFinite(+i),d=s>=r.length;return i=!i&&a.isArray(n)?n.length:i,d?(a.hasOwnProp(n,i)?n[i]=[n[i],o]:n[i]=o,!c):((!n[i]||!a.isObject(n[i]))&&(n[i]=[]),t(r,o,n[i],s)&&a.isArray(n[i])&&(n[i]=uo(n[i])),!c)}if(a.isFormData(e)&&a.isFunction(e.entries)){let r={};return a.forEachEntry(e,(o,n)=>{t(lo(o),n,r,0)}),r}return null}var ve=po;function fo(e,t,r){if(a.isString(e))try{return(t||JSON.parse)(e),a.trim(e)}catch(o){if(o.name!=="SyntaxError")throw o}return(r||JSON.stringify)(e)}var qe={transitional:Ae,adapter:["xhr","http","fetch"],transformRequest:[function(t,r){let o=r.getContentType()||"",n=o.indexOf("application/json")>-1,s=a.isObject(t);if(s&&a.isHTMLForm(t)&&(t=new FormData(t)),a.isFormData(t))return n?JSON.stringify(ve(t)):t;if(a.isArrayBuffer(t)||a.isBuffer(t)||a.isStream(t)||a.isFile(t)||a.isBlob(t)||a.isReadableStream(t))return t;if(a.isArrayBufferView(t))return t.buffer;if(a.isURLSearchParams(t))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let c;if(s){if(o.indexOf("application/x-www-form-urlencoded")>-1)return We(t,this.formSerializer).toString();if((c=a.isFileList(t))||o.indexOf("multipart/form-data")>-1){let d=this.env&&this.env.FormData;return q(c?{"files[]":t}:t,d&&new d,this.formSerializer)}}return s||n?(r.setContentType("application/json",!1),fo(t)):t}],transformResponse:[function(t){let r=this.transitional||qe.transitional,o=r&&r.forcedJSONParsing,n=this.responseType==="json";if(a.isResponse(t)||a.isReadableStream(t))return t;if(t&&a.isString(t)&&(o&&!this.responseType||n)){let i=!(r&&r.silentJSONParsing)&&n;try{return JSON.parse(t,this.parseReviver)}catch(c){if(i)throw c.name==="SyntaxError"?g.from(c,g.ERR_BAD_RESPONSE,this,null,this.response):c}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:R.classes.FormData,Blob:R.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};a.forEach(["delete","get","head","post","put","patch"],e=>{qe.headers[e]={}});var X=qe;var mo=a.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Dt=e=>{let t={},r,o,n;return e&&e.split(`
2
+ `).forEach(function(i){n=i.indexOf(":"),r=i.substring(0,n).trim().toLowerCase(),o=i.substring(n+1).trim(),!(!r||t[r]&&mo[r])&&(r==="set-cookie"?t[r]?t[r].push(o):t[r]=[o]:t[r]=t[r]?t[r]+", "+o:o)}),t};var Pt=Symbol("internals");function ie(e){return e&&String(e).trim().toLowerCase()}function we(e){return e===!1||e==null?e:a.isArray(e)?e.map(we):String(e)}function ho(e){let t=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g,o;for(;o=r.exec(e);)t[o[1]]=o[2];return t}var go=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function je(e,t,r,o,n){if(a.isFunction(o))return o.call(this,t,r);if(n&&(t=r),!!a.isString(t)){if(a.isString(o))return t.indexOf(o)!==-1;if(a.isRegExp(o))return o.test(t)}}function yo(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,r,o)=>r.toUpperCase()+o)}function xo(e,t){let r=a.toCamelCase(" "+t);["get","set","has"].forEach(o=>{Object.defineProperty(e,o+r,{value:function(n,s,i){return this[o].call(this,t,n,s,i)},configurable:!0})})}var Q=class{constructor(t){t&&this.set(t)}set(t,r,o){let n=this;function s(c,d,p){let u=ie(d);if(!u)throw new Error("header name must be a non-empty string");let h=a.findKey(n,u);(!h||n[h]===void 0||p===!0||p===void 0&&n[h]!==!1)&&(n[h||d]=we(c))}let i=(c,d)=>a.forEach(c,(p,u)=>s(p,u,d));if(a.isPlainObject(t)||t instanceof this.constructor)i(t,r);else if(a.isString(t)&&(t=t.trim())&&!go(t))i(Dt(t),r);else if(a.isObject(t)&&a.isIterable(t)){let c={},d,p;for(let u of t){if(!a.isArray(u))throw TypeError("Object iterator must return a key-value pair");c[p=u[0]]=(d=c[p])?a.isArray(d)?[...d,u[1]]:[d,u[1]]:u[1]}i(c,r)}else t!=null&&s(r,t,o);return this}get(t,r){if(t=ie(t),t){let o=a.findKey(this,t);if(o){let n=this[o];if(!r)return n;if(r===!0)return ho(n);if(a.isFunction(r))return r.call(this,n,o);if(a.isRegExp(r))return r.exec(n);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,r){if(t=ie(t),t){let o=a.findKey(this,t);return!!(o&&this[o]!==void 0&&(!r||je(this,this[o],o,r)))}return!1}delete(t,r){let o=this,n=!1;function s(i){if(i=ie(i),i){let c=a.findKey(o,i);c&&(!r||je(o,o[c],c,r))&&(delete o[c],n=!0)}}return a.isArray(t)?t.forEach(s):s(t),n}clear(t){let r=Object.keys(this),o=r.length,n=!1;for(;o--;){let s=r[o];(!t||je(this,this[s],s,t,!0))&&(delete this[s],n=!0)}return n}normalize(t){let r=this,o={};return a.forEach(this,(n,s)=>{let i=a.findKey(o,s);if(i){r[i]=we(n),delete r[s];return}let c=t?yo(s):String(s).trim();c!==s&&delete r[s],r[c]=we(n),o[c]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){let r=Object.create(null);return a.forEach(this,(o,n)=>{o!=null&&o!==!1&&(r[n]=t&&a.isArray(o)?o.join(", "):o)}),r}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,r])=>t+": "+r).join(`
3
+ `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...r){let o=new this(t);return r.forEach(n=>o.set(n)),o}static accessor(t){let o=(this[Pt]=this[Pt]={accessors:{}}).accessors,n=this.prototype;function s(i){let c=ie(i);o[c]||(xo(n,i),o[c]=!0)}return a.isArray(t)?t.forEach(s):s(t),this}};Q.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);a.reduceDescriptors(Q.prototype,({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(o){this[r]=o}}});a.freezeMethods(Q);var w=Q;function ae(e,t){let r=this||X,o=t||r,n=w.from(o.headers),s=o.data;return a.forEach(e,function(c){s=c.call(r,s,n.normalize(),t?t.status:void 0)}),n.normalize(),s}function ce(e){return!!(e&&e.__CANCEL__)}function _t(e,t,r){g.call(this,e??"canceled",g.ERR_CANCELED,t,r),this.name="CanceledError"}a.inherits(_t,g,{__CANCEL__:!0});var N=_t;function le(e,t,r){let o=r.config.validateStatus;!r.status||!o||o(r.status)?e(r):t(new g("Request failed with status code "+r.status,[g.ERR_BAD_REQUEST,g.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}function ze(e){let t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function bo(e,t){e=e||10;let r=new Array(e),o=new Array(e),n=0,s=0,i;return t=t!==void 0?t:1e3,function(d){let p=Date.now(),u=o[s];i||(i=p),r[n]=d,o[n]=p;let h=s,y=0;for(;h!==n;)y+=r[h++],h=h%e;if(n=(n+1)%e,n===s&&(s=(s+1)%e),p-i<t)return;let S=u&&p-u;return S?Math.round(y*1e3/S):void 0}}var Ut=bo;function Eo(e,t){let r=0,o=1e3/t,n,s,i=(p,u=Date.now())=>{r=u,n=null,s&&(clearTimeout(s),s=null),e(...p)};return[(...p)=>{let u=Date.now(),h=u-r;h>=o?i(p,u):(n=p,s||(s=setTimeout(()=>{s=null,i(n)},o-h)))},()=>n&&i(n)]}var Ft=Eo;var Y=(e,t,r=3)=>{let o=0,n=Ut(50,250);return Ft(s=>{let i=s.loaded,c=s.lengthComputable?s.total:void 0,d=i-o,p=n(d),u=i<=c;o=i;let h={loaded:i,total:c,progress:c?i/c:void 0,bytes:d,rate:p||void 0,estimated:p&&c&&u?(c-i)/p:void 0,event:s,lengthComputable:c!=null,[t?"download":"upload"]:!0};e(h)},r)},$e=(e,t)=>{let r=e!=null;return[o=>t[0]({lengthComputable:r,total:e,loaded:o}),t[1]]},Ge=e=>(...t)=>a.asap(()=>e(...t));var Bt=R.hasStandardBrowserEnv?((e,t)=>r=>(r=new URL(r,R.origin),e.protocol===r.protocol&&e.host===r.host&&(t||e.port===r.port)))(new URL(R.origin),R.navigator&&/(msie|trident)/i.test(R.navigator.userAgent)):()=>!0;var Nt=R.hasStandardBrowserEnv?{write(e,t,r,o,n,s,i){if(typeof document>"u")return;let c=[`${e}=${encodeURIComponent(t)}`];a.isNumber(r)&&c.push(`expires=${new Date(r).toUTCString()}`),a.isString(o)&&c.push(`path=${o}`),a.isString(n)&&c.push(`domain=${n}`),s===!0&&c.push("secure"),a.isString(i)&&c.push(`SameSite=${i}`),document.cookie=c.join("; ")},read(e){if(typeof document>"u")return null;let t=document.cookie.match(new RegExp("(?:^|; )"+e+"=([^;]*)"));return t?decodeURIComponent(t[1]):null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function Ve(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Je(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function ue(e,t,r){let o=!Ve(t);return e&&(o||r==!1)?Je(e,t):t}var kt=e=>e instanceof w?{...e}:e;function U(e,t){t=t||{};let r={};function o(p,u,h,y){return a.isPlainObject(p)&&a.isPlainObject(u)?a.merge.call({caseless:y},p,u):a.isPlainObject(u)?a.merge({},u):a.isArray(u)?u.slice():u}function n(p,u,h,y){if(a.isUndefined(u)){if(!a.isUndefined(p))return o(void 0,p,h,y)}else return o(p,u,h,y)}function s(p,u){if(!a.isUndefined(u))return o(void 0,u)}function i(p,u){if(a.isUndefined(u)){if(!a.isUndefined(p))return o(void 0,p)}else return o(void 0,u)}function c(p,u,h){if(h in t)return o(p,u);if(h in e)return o(void 0,p)}let d={url:s,method:s,data:s,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,withXSRFToken:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,responseEncoding:i,validateStatus:c,headers:(p,u,h)=>n(kt(p),kt(u),h,!0)};return a.forEach(Object.keys({...e,...t}),function(u){let h=d[u]||n,y=h(e[u],t[u],u);a.isUndefined(y)&&h!==c||(r[u]=y)}),r}var Se=e=>{let t=U({},e),{data:r,withXSRFToken:o,xsrfHeaderName:n,xsrfCookieName:s,headers:i,auth:c}=t;if(t.headers=i=w.from(i),t.url=se(ue(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),c&&i.set("Authorization","Basic "+btoa((c.username||"")+":"+(c.password?unescape(encodeURIComponent(c.password)):""))),a.isFormData(r)){if(R.hasStandardBrowserEnv||R.hasStandardBrowserWebWorkerEnv)i.setContentType(void 0);else if(a.isFunction(r.getHeaders)){let d=r.getHeaders(),p=["content-type","content-length"];Object.entries(d).forEach(([u,h])=>{p.includes(u.toLowerCase())&&i.set(u,h)})}}if(R.hasStandardBrowserEnv&&(o&&a.isFunction(o)&&(o=o(t)),o||o!==!1&&Bt(t.url))){let d=n&&s&&Nt.read(s);d&&i.set(n,d)}return t};var Ro=typeof XMLHttpRequest<"u",Mt=Ro&&function(e){return new Promise(function(r,o){let n=Se(e),s=n.data,i=w.from(n.headers).normalize(),{responseType:c,onUploadProgress:d,onDownloadProgress:p}=n,u,h,y,S,l;function m(){S&&S(),l&&l(),n.cancelToken&&n.cancelToken.unsubscribe(u),n.signal&&n.signal.removeEventListener("abort",u)}let f=new XMLHttpRequest;f.open(n.method.toUpperCase(),n.url,!0),f.timeout=n.timeout;function x(){if(!f)return;let b=w.from("getAllResponseHeaders"in f&&f.getAllResponseHeaders()),L={data:!c||c==="text"||c==="json"?f.responseText:f.response,status:f.status,statusText:f.statusText,headers:b,config:e,request:f};le(function(C){r(C),m()},function(C){o(C),m()},L),f=null}"onloadend"in f?f.onloadend=x:f.onreadystatechange=function(){!f||f.readyState!==4||f.status===0&&!(f.responseURL&&f.responseURL.indexOf("file:")===0)||setTimeout(x)},f.onabort=function(){f&&(o(new g("Request aborted",g.ECONNABORTED,e,f)),f=null)},f.onerror=function(T){let L=T&&T.message?T.message:"Network Error",I=new g(L,g.ERR_NETWORK,e,f);I.event=T||null,o(I),f=null},f.ontimeout=function(){let T=n.timeout?"timeout of "+n.timeout+"ms exceeded":"timeout exceeded",L=n.transitional||Ae;n.timeoutErrorMessage&&(T=n.timeoutErrorMessage),o(new g(T,L.clarifyTimeoutError?g.ETIMEDOUT:g.ECONNABORTED,e,f)),f=null},s===void 0&&i.setContentType(null),"setRequestHeader"in f&&a.forEach(i.toJSON(),function(T,L){f.setRequestHeader(L,T)}),a.isUndefined(n.withCredentials)||(f.withCredentials=!!n.withCredentials),c&&c!=="json"&&(f.responseType=n.responseType),p&&([y,l]=Y(p,!0),f.addEventListener("progress",y)),d&&f.upload&&([h,S]=Y(d),f.upload.addEventListener("progress",h),f.upload.addEventListener("loadend",S)),(n.cancelToken||n.signal)&&(u=b=>{f&&(o(!b||b.type?new N(null,e,f):b),f.abort(),f=null)},n.cancelToken&&n.cancelToken.subscribe(u),n.signal&&(n.signal.aborted?u():n.signal.addEventListener("abort",u)));let E=ze(n.url);if(E&&R.protocols.indexOf(E)===-1){o(new g("Unsupported protocol "+E+":",g.ERR_BAD_REQUEST,e));return}f.send(s||null)})};var Ao=(e,t)=>{let{length:r}=e=e?e.filter(Boolean):[];if(t||r){let o=new AbortController,n,s=function(p){if(!n){n=!0,c();let u=p instanceof Error?p:this.reason;o.abort(u instanceof g?u:new N(u instanceof Error?u.message:u))}},i=t&&setTimeout(()=>{i=null,s(new g(`timeout ${t} of ms exceeded`,g.ETIMEDOUT))},t),c=()=>{e&&(i&&clearTimeout(i),i=null,e.forEach(p=>{p.unsubscribe?p.unsubscribe(s):p.removeEventListener("abort",s)}),e=null)};e.forEach(p=>p.addEventListener("abort",s));let{signal:d}=o;return d.unsubscribe=()=>a.asap(c),d}},It=Ao;var vo=function*(e,t){let r=e.byteLength;if(!t||r<t){yield e;return}let o=0,n;for(;o<r;)n=o+t,yield e.slice(o,n),o=n},wo=async function*(e,t){for await(let r of So(e))yield*vo(r,t)},So=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}let t=e.getReader();try{for(;;){let{done:r,value:o}=await t.read();if(r)break;yield o}}finally{await t.cancel()}},Ke=(e,t,r,o)=>{let n=wo(e,t),s=0,i,c=d=>{i||(i=!0,o&&o(d))};return new ReadableStream({async pull(d){try{let{done:p,value:u}=await n.next();if(p){c(),d.close();return}let h=u.byteLength;if(r){let y=s+=h;r(y)}d.enqueue(new Uint8Array(u))}catch(p){throw c(p),p}},cancel(d){return c(d),n.return()}},{highWaterMark:2})};var Ht=64*1024,{isFunction:Te}=a,To=(({Request:e,Response:t})=>({Request:e,Response:t}))(a.global),{ReadableStream:Wt,TextEncoder:qt}=a.global,jt=(e,...t)=>{try{return!!e(...t)}catch{return!1}},Co=e=>{e=a.merge.call({skipUndefined:!0},To,e);let{fetch:t,Request:r,Response:o}=e,n=t?Te(t):typeof fetch=="function",s=Te(r),i=Te(o);if(!n)return!1;let c=n&&Te(Wt),d=n&&(typeof qt=="function"?(l=>m=>l.encode(m))(new qt):async l=>new Uint8Array(await new r(l).arrayBuffer())),p=s&&c&&jt(()=>{let l=!1,m=new r(R.origin,{body:new Wt,method:"POST",get duplex(){return l=!0,"half"}}).headers.has("Content-Type");return l&&!m}),u=i&&c&&jt(()=>a.isReadableStream(new o("").body)),h={stream:u&&(l=>l.body)};n&&["text","arrayBuffer","blob","formData","stream"].forEach(l=>{!h[l]&&(h[l]=(m,f)=>{let x=m&&m[l];if(x)return x.call(m);throw new g(`Response type '${l}' is not supported`,g.ERR_NOT_SUPPORT,f)})});let y=async l=>{if(l==null)return 0;if(a.isBlob(l))return l.size;if(a.isSpecCompliantForm(l))return(await new r(R.origin,{method:"POST",body:l}).arrayBuffer()).byteLength;if(a.isArrayBufferView(l)||a.isArrayBuffer(l))return l.byteLength;if(a.isURLSearchParams(l)&&(l=l+""),a.isString(l))return(await d(l)).byteLength},S=async(l,m)=>{let f=a.toFiniteNumber(l.getContentLength());return f??y(m)};return async l=>{let{url:m,method:f,data:x,signal:E,cancelToken:b,timeout:T,onDownloadProgress:L,onUploadProgress:I,responseType:C,headers:D,withCredentials:F="same-origin",fetchOptions:fe}=Se(l),it=t||fetch;C=C?(C+"").toLowerCase():"text";let me=It([E,b&&b.toAbortSignal()],T),ee=null,j=me&&me.unsubscribe&&(()=>{me.unsubscribe()}),at;try{if(I&&p&&f!=="get"&&f!=="head"&&(at=await S(D,x))!==0){let W=new r(m,{method:"POST",body:x,duplex:"half"}),G;if(a.isFormData(x)&&(G=W.headers.get("content-type"))&&D.setContentType(G),W.body){let[_e,he]=$e(at,Y(Ge(I)));x=Ke(W.body,Ht,_e,he)}}a.isString(F)||(F=F?"include":"omit");let B=s&&"credentials"in r.prototype,ct={...fe,signal:me,method:f.toUpperCase(),headers:D.normalize().toJSON(),body:x,duplex:"half",credentials:B?F:void 0};ee=s&&new r(m,ct);let H=await(s?it(ee,fe):it(m,ct)),lt=u&&(C==="stream"||C==="response");if(u&&(L||lt&&j)){let W={};["status","statusText","headers"].forEach(ut=>{W[ut]=H[ut]});let G=a.toFiniteNumber(H.headers.get("content-length")),[_e,he]=L&&$e(G,Y(Ge(L),!0))||[];H=new o(Ke(H.body,Ht,_e,()=>{he&&he(),j&&j()}),W)}C=C||"text";let mr=await h[a.findKey(h,C)||"text"](H,l);return!lt&&j&&j(),await new Promise((W,G)=>{le(W,G,{data:mr,headers:w.from(H.headers),status:H.status,statusText:H.statusText,config:l,request:ee})})}catch(B){throw j&&j(),B&&B.name==="TypeError"&&/Load failed|fetch/i.test(B.message)?Object.assign(new g("Network Error",g.ERR_NETWORK,l,ee),{cause:B.cause||B}):g.from(B,B&&B.code,l,ee)}}},Oo=new Map,Xe=e=>{let t=e&&e.env||{},{fetch:r,Request:o,Response:n}=t,s=[o,n,r],i=s.length,c=i,d,p,u=Oo;for(;c--;)d=s[c],p=u.get(d),p===void 0&&u.set(d,p=c?new Map:Co(t)),u=p;return p},Ks=Xe();var Qe={http:Ee,xhr:Mt,fetch:{get:Xe}};a.forEach(Qe,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});var zt=e=>`- ${e}`,Do=e=>a.isFunction(e)||e===null||e===!1;function Po(e,t){e=a.isArray(e)?e:[e];let{length:r}=e,o,n,s={};for(let i=0;i<r;i++){o=e[i];let c;if(n=o,!Do(o)&&(n=Qe[(c=String(o)).toLowerCase()],n===void 0))throw new g(`Unknown adapter '${c}'`);if(n&&(a.isFunction(n)||(n=n.get(t))))break;s[c||"#"+i]=n}if(!n){let i=Object.entries(s).map(([d,p])=>`adapter ${d} `+(p===!1?"is not supported by the environment":"is not available in the build")),c=r?i.length>1?`since :
4
4
  `+i.map(zt).join(`
5
- `):" "+zt(i[0]):"as no adapter specified";throw new g("There is no suitable adapter to dispatch the request "+c,"ERR_NOT_SUPPORT")}return n}var Ce={getAdapter:Po,adapters:Qe};function Ye(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new N(null,e)}function Oe(e){return Ye(e),e.headers=v.from(e.headers),e.data=ae.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Ce.getAdapter(e.adapter||X.adapter,e)(e).then(function(o){return Ye(e),o.data=ae.call(e,e.transformResponse,o),o.headers=v.from(o.headers),o},function(o){return ce(o)||(Ye(e),o&&o.response&&(o.response.data=ae.call(e,e.transformResponse,o.response),o.response.headers=v.from(o.response.headers))),Promise.reject(o)})}var Le="1.13.2";var De={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{De[e]=function(o){return typeof o===e||"a"+(t<1?"n ":" ")+e}});var $t={};De.transitional=function(t,r,o){function n(s,i){return"[Axios v"+Le+"] Transitional option '"+s+"'"+i+(o?". "+o:"")}return(s,i,c)=>{if(t===!1)throw new g(n(i," has been removed"+(r?" in "+r:"")),g.ERR_DEPRECATED);return r&&!$t[i]&&($t[i]=!0,console.warn(n(i," has been deprecated since v"+r+" and will be removed in the near future"))),t?t(s,i,c):!0}};De.spelling=function(t){return(r,o)=>(console.warn(`${o} is likely a misspelling of ${t}`),!0)};function _o(e,t,r){if(typeof e!="object")throw new g("options must be an object",g.ERR_BAD_OPTION_VALUE);let o=Object.keys(e),n=o.length;for(;n-- >0;){let s=o[n],i=t[s];if(i){let c=e[s],d=c===void 0||i(c,s,e);if(d!==!0)throw new g("option "+s+" must be "+d,g.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new g("Unknown option "+s,g.ERR_BAD_OPTION)}}var pe={assertOptions:_o,validators:De};var k=pe.validators,Z=class{constructor(t){this.defaults=t||{},this.interceptors={request:new ke,response:new ke}}async request(t,r){try{return await this._request(t,r)}catch(o){if(o instanceof Error){let n={};Error.captureStackTrace?Error.captureStackTrace(n):n=new Error;let s=n.stack?n.stack.replace(/^.+\n/,""):"";try{o.stack?s&&!String(o.stack).endsWith(s.replace(/^.+\n.+\n/,""))&&(o.stack+=`
6
- `+s):o.stack=s}catch{}}throw o}}_request(t,r){typeof t=="string"?(r=r||{},r.url=t):r=t||{},r=U(this.defaults,r);let{transitional:o,paramsSerializer:n,headers:s}=r;o!==void 0&&pe.assertOptions(o,{silentJSONParsing:k.transitional(k.boolean),forcedJSONParsing:k.transitional(k.boolean),clarifyTimeoutError:k.transitional(k.boolean)},!1),n!=null&&(a.isFunction(n)?r.paramsSerializer={serialize:n}:pe.assertOptions(n,{encode:k.function,serialize:k.function},!0)),r.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?r.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:r.allowAbsoluteUrls=!0),pe.assertOptions(r,{baseUrl:k.spelling("baseURL"),withXsrfToken:k.spelling("withXSRFToken")},!0),r.method=(r.method||this.defaults.method||"get").toLowerCase();let i=s&&a.merge(s.common,s[r.method]);s&&a.forEach(["delete","get","head","post","put","patch","common"],l=>{delete s[l]}),r.headers=v.concat(i,s);let c=[],d=!0;this.interceptors.request.forEach(function(m){typeof m.runWhen=="function"&&m.runWhen(r)===!1||(d=d&&m.synchronous,c.unshift(m.fulfilled,m.rejected))});let p=[];this.interceptors.response.forEach(function(m){p.push(m.fulfilled,m.rejected)});let u,h=0,y;if(!d){let l=[Oe.bind(this),void 0];for(l.unshift(...c),l.push(...p),y=l.length,u=Promise.resolve(r);h<y;)u=u.then(l[h++],l[h++]);return u}y=c.length;let S=r;for(;h<y;){let l=c[h++],m=c[h++];try{S=l(S)}catch(f){m.call(this,f);break}}try{u=Oe.call(this,S)}catch(l){return Promise.reject(l)}for(h=0,y=p.length;h<y;)u=u.then(p[h++],p[h++]);return u}getUri(t){t=U(this.defaults,t);let r=ue(t.baseURL,t.url,t.allowAbsoluteUrls);return se(r,t.params,t.paramsSerializer)}};a.forEach(["delete","get","head","options"],function(t){Z.prototype[t]=function(r,o){return this.request(U(o||{},{method:t,url:r,data:(o||{}).data}))}});a.forEach(["post","put","patch"],function(t){function r(o){return function(s,i,c){return this.request(U(c||{},{method:t,headers:o?{"Content-Type":"multipart/form-data"}:{},url:s,data:i}))}}Z.prototype[t]=r(),Z.prototype[t+"Form"]=r(!0)});var de=Z;var Ze=class e{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let r;this.promise=new Promise(function(s){r=s});let o=this;this.promise.then(n=>{if(!o._listeners)return;let s=o._listeners.length;for(;s-- >0;)o._listeners[s](n);o._listeners=null}),this.promise.then=n=>{let s,i=new Promise(c=>{o.subscribe(c),s=c}).then(n);return i.cancel=function(){o.unsubscribe(s)},i},t(function(s,i,c){o.reason||(o.reason=new N(s,i,c),r(o.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;let r=this._listeners.indexOf(t);r!==-1&&this._listeners.splice(r,1)}toAbortSignal(){let t=new AbortController,r=o=>{t.abort(o)};return this.subscribe(r),t.signal.unsubscribe=()=>this.unsubscribe(r),t.signal}static source(){let t;return{token:new e(function(n){t=n}),cancel:t}}},Gt=Ze;function et(e){return function(r){return e.apply(null,r)}}function tt(e){return a.isObject(e)&&e.isAxiosError===!0}var rt={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(rt).forEach(([e,t])=>{rt[t]=e});var Vt=rt;function Jt(e){let t=new de(e),r=te(de.prototype.request,t);return a.extend(r,de.prototype,t,{allOwnKeys:!0}),a.extend(r,t,null,{allOwnKeys:!0}),r.create=function(n){return Jt(U(e,n))},r}var A=Jt(X);A.Axios=de;A.CanceledError=N;A.CancelToken=Gt;A.isCancel=ce;A.VERSION=Le;A.toFormData=q;A.AxiosError=g;A.Cancel=A.CanceledError;A.all=function(t){return Promise.all(t)};A.spread=et;A.isAxiosError=tt;A.mergeConfig=U;A.AxiosHeaders=v;A.formToJSON=e=>we(a.isHTMLForm(e)?new FormData(e):e);A.getAdapter=Ce.getAdapter;A.HttpStatusCode=Vt;A.default=A;var Pe=A;var{Axios:Gi,AxiosError:Vi,CanceledError:Ji,isCancel:Ki,CancelToken:Xi,VERSION:Qi,all:Yi,Cancel:Zi,isAxiosError:ea,spread:ta,toFormData:ra,AxiosHeaders:oa,HttpStatusCode:na,formToJSON:sa,getAdapter:ia,mergeConfig:aa}=Pe;var Uo=localStorage.getItem("api-mode"),Fo="http://127.0.0.1:8787",Bo="https://assembled-brands-dev.crystal-e8a.workers.dev",M={apiBaseUrl:Uo==="local"?Fo:Bo,apiVersion:"/api/v1",accessTokenPersistStrategy:"cookie",TOKEN_NAME_IN_STORAGE:"accessToken",TOKEN_TYPE:"Bearer",REQUEST_HEADER_AUTH_KEY:"Authorization"},$=e=>{if(!e){console.error("navigateToPath: path is empty or undefined");return}let t=e.replace(/^\/+/,""),r=t;r=`dev/${t}`;let o=`${window.location.origin}/${r}`;window.location.assign(o)};var No=(e,t,r)=>{let o=new Date;o.setTime(o.getTime()+r*24*60*60*1e3);let n="expires="+o.toUTCString();document.cookie=`${e}=${encodeURIComponent(t)}; ${n}; path=/`},ot=e=>{let t=document.cookie.split("; ");for(let r of t){let[o,n]=r.split("=");if(o===e)return decodeURIComponent(n)}return null},nt=e=>{No(e,"",-1)},Kt=()=>{let e=ot("accessToken");return e||$("/login?error=unauthorized"),e},Xt=()=>{nt("accessToken"),localStorage.removeItem("x-team-id"),$("/login?error=logged-out")},ko=()=>{let e=localStorage.getItem("user"),t=e&&JSON.parse(e);return t&&t?.role},Qt=()=>ko()==="admin";var Mo=e=>{let t=M.accessTokenPersistStrategy;if(t==="localStorage"||t==="sessionStorage"||t==="cookie"){let o="";t==="localStorage"&&(o=localStorage.getItem(M.TOKEN_NAME_IN_STORAGE)||""),t==="sessionStorage"&&(o=sessionStorage.getItem(M.TOKEN_NAME_IN_STORAGE)||""),t==="cookie"&&(o=ot(M.TOKEN_NAME_IN_STORAGE)||""),o&&(e.headers[M.REQUEST_HEADER_AUTH_KEY]=`${M.TOKEN_TYPE} ${o}`)}let r=localStorage.getItem("x-team-id");return r&&(e.headers["X-Team-Id"]=r),e},Yt=Mo;var Io=[401,419,440],Ho=e=>{let{response:t}=e;if(window.location.pathname.includes("/login"))return Promise.reject(e);t&&Io.includes(t.status)&&(nt("accessToken"),$("/login?error=unauthorized"))},Zt=Ho;var st=Pe.create({timeout:6e4,baseURL:M.apiBaseUrl+M.apiVersion});st.interceptors.request.use(e=>Yt(e),e=>Promise.reject(e));st.interceptors.response.use(e=>e,e=>(Zt(e),Promise.reject(e)));var er=st;var Wo={fetchDataWithAxios(e){return new Promise((t,r)=>{er(e).then(o=>{t(o.data)}).catch(o=>{let n="An unknown error occurred";if(o.response&&o.response.data){let s=o.response.data;typeof s.message=="string"?n=s.message:typeof s.error=="string"?n=s.error:n=JSON.stringify(s)}else o.message&&(n=o.message);r({...o,message:n})})})}},P=Wo;var tr=e=>P.fetchDataWithAxios({url:"/asset",method:"post",data:e});var rr=e=>P.fetchDataWithAxios({url:"/financial-wizard/document",method:"post",data:e}),or=e=>P.fetchDataWithAxios({url:"/financial-wizard/progress",method:"get",params:e?{user_id:e}:void 0});var nr=()=>P.fetchDataWithAxios({url:"/financial-wizard/applications",method:"get"});async function sr(){return P.fetchDataWithAxios({url:"/user/me",method:"get"})}var ir=()=>P.fetchDataWithAxios({url:"/onboarding-wizard/progress",method:"get"});var ar=()=>P.fetchDataWithAxios({url:"/team/my-teams",method:"get"});var w=(e,t=document)=>t.querySelector(e),cr=(e,t=document)=>{let r=t.querySelectorAll(e);return[...Array.from(r)]};var qo=async e=>{let[t,r,o,n]=await Promise.all([or(e),sr(),ar(),ir()]);return{financialProgress:t,user:r,teams:o,onboardingProgress:n}},lr=async e=>{try{let{financialProgress:t,user:r,teams:o,onboardingProgress:n}=await qo(e),s=t?.percentage||0,i=w('[dev-target="progress-percentage-fill"]'),c=cr('[dev-target="progress-percentage-label"]'),d=w('[dev-target="user-name"]'),p=w('[dev-target="user-email"]'),u=w('[dev-target="logout"]');if(!i||!c||!u||!d||!p){console.error('Ensure [dev-target="progress-percentage-fill"], [dev-target="progress-percentage-label"], [dev-target="user-name"], [dev-target="user-email"], and [dev-target="logout"] are present.');return}return i.style.width=`${s}%`,c[0].textContent=`Progress ${s}%`,c[1].textContent=`${s}%`,u.addEventListener("click",()=>{Xt()}),d.innerText=t.business?.legal_name||(r.first_name||"Full")+" "+(r.last_name||"Name"),p.innerText=t.business?.email||r.email||"hello@company.com",{financialProgress:t,user:r,teams:o,onboardingProgress:n}}catch(t){console.error("Failed to load financial wizard progress:",t)}},ur=()=>{if(!w('[dev-target="sidebar-menu"]')){console.error('Ensure [dev-target="sidebar-menu"] is present.');return}let t=window.location.pathname,o={"/dev/finance-company-profile":{nav_attr:"nav-company-profile-link",nav_class:"is-active"},"/finance-company-profile":{nav_attr:"nav-company-profile-link",nav_class:"is-active"},"/dev/finance-financial-overview":{nav_attr:"nav-financial-overview-link",nav_class:"is-active"},"/finance-financial-overview":{nav_attr:"nav-financial-overview-link",nav_class:"is-active"},"/dev/finance-docs-financial-reports":{nav_attr:"nav-financial-reports-link",nav_class:"is-active-financial"},"/finance-docs-financial-reports":{nav_attr:"nav-financial-reports-link",nav_class:"is-active-financial"},"/dev/finance-docs-accounts-and-inventory":{nav_attr:"nav-accounts-inventory-link",nav_class:"is-active-financial"},"/finance-docs-accounts-and-inventory":{nav_attr:"nav-accounts-inventory-link",nav_class:"is-active-financial"},"/dev/finance-docs-ecommerce-performance":{nav_attr:"nav-eccomerce-performance-link",nav_class:"is-active-financial"},"/finance-docs-ecommerce-performance":{nav_attr:"nav-eccomerce-performance-link",nav_class:"is-active-financial"},"/dev/finance-docs-team-and-ownership":{nav_attr:"nav-team-ownership-link",nav_class:"is-active-financial"},"/finance-docs-team-and-ownership":{nav_attr:"nav-team-ownership-link",nav_class:"is-active-financial"},"/team-members":{nav_attr:"nav-team-ownership-link",nav_class:"is-active-financial"}}[t],n=document.querySelectorAll('[dev-attr="nav"]');if(o){n.forEach(i=>{i.classList.remove("is-active"),i.classList.remove("is-active-financial")});let s=w(`[dev-target="${o.nav_attr}"]`);s&&s.classList.add(o.nav_class)}else n.forEach(s=>{s.classList.remove("is-active"),s.classList.remove("is-active-financial")})},pr=async e=>{if(Qt()){let r=w('[dev-target="admin-select-wrapper"]'),o=w('[dev-target="admin-select"]');if(r?.classList.remove("hide"),!r||!o){console.error('Ensure [dev-target="admin-select"] and [dev-target="admin-select-wrapper"] is present.');return}let n=await nr();o.innerHTML="",n.forEach(s=>{let i=s.first_name||""+s.last_name||"",c=document.createElement("option");c.value=s.id.toString(),c.textContent=`${i||s.email}`,o.appendChild(c)}),o.addEventListener("change",async s=>{let i=s.target,{value:c}=i;e&&await e(c)})}},dr=e=>new Promise((t,r)=>{let o=new FileReader;o.onload=()=>{let s=o.result.split(",");t(s.length>1?s[1]:s[0])},o.onerror=()=>r(new Error("Failed to read file as base64")),o.readAsDataURL(e)}),fr=()=>{let e=w('[dev-target="sidebar-menu"]'),t=e?.querySelector(".sidebar"),r=w('[dev-target="collapsible-trigger"]');if(!e||!t||!r){console.error('Ensure [dev-target="sidebar-menu"] and [dev-target="collapsible-trigger"] and [dev-target="sidebar-inner"] are present.');return}let o=!1,n=()=>{o=!o;let s=document.querySelectorAll('[sidebar="collapsible-content"], [dev-target="collapsible-content"]'),i=w('[dev-target="sidebar-logo-text-wrapper"]'),c=e.querySelector('[dev-target="sidebar-bottom-collapsed"]'),d=e.querySelector('[dev-target="sidenav-close"]'),p=e.querySelector('[dev-target="sidebar-bottom"]'),u=e.querySelector(".user-profile_wrapper"),h=u?.querySelector(".flex-horizontal_auth.gap-15");o?(e.classList.add("collapsed"),t?.classList.add("mobile"),i?.classList.add("hide"),u?.classList.add("image-overlay"),h?.classList.add("overlay"),p?.classList.add("hide"),c?.classList.remove("hide"),d?.classList.add("is-collapsed"),s.forEach(y=>{y.style.opacity="0",y.style.transition="opacity 0.2s ease",setTimeout(()=>{y.classList.add("hide")},200)}),e.style.width="80px",e.style.width="auto"):(e.classList.remove("collapsed"),t?.classList.remove("mobile"),i?.classList.remove("hide"),u?.classList.remove("image-overlay"),h?.classList.remove("overlay"),p?.classList.remove("hide"),c?.classList.add("hide"),d?.classList.remove("is-collapsed"),s.forEach(y=>{y.classList.remove("hide"),setTimeout(()=>{y.style.opacity="1"},10)}))};r.addEventListener("click",n),e.style.transition="width 0.3s ease"};var jo=async()=>{ur(),Kt(),fr();let e=["application/vnd.ms-excel","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],t=document.querySelector('[dev-target="ecommerce-performance-form"]');if(!t){console.error('E-Commerce Performance form not found. Element: [dev-target="ecommerce-performance-form"] not found');return}let r=w('[dev-target="shopify-repeat-upload-box"]',t),o=w('[dev-target="shopify-repeat-input"]',t),n=w('[dev-target="shopify-repeat-helper"]',t),s=w('[dev-target="shopify-monthly-upload-box"]',t),i=w('[dev-target="shopify-monthly-input"]',t),c=w('[dev-target="shopify-monthly-helper"]',t),d=w('[dev-target="submit-button"]',t);if(!r||!o||!n){console.error('Ensure [dev-target="shopify-repeat-upload-box"] and [dev-target="shopify-repeat-input"] and [dev-target="shopify-repeat-helper"] are present.');return}if(!s||!i||!c){console.error('Ensure [dev-target="shopify-monthly-upload-box"] and [dev-target="shopify-monthly-input"] and [dev-target="shopify-monthly-helper"] are present.');return}if(!d){console.error('Ensure [dev-target="submit-button"] is present.');return}let p=l=>{if(l?.ecommerce_performance){let m=l.ecommerce_performance.find(x=>x.document_type==="shopify_repeat_customers");m?n.textContent=m.asset_name||"Supported formats: sheets. xcel":n.textContent="Supported formats: sheets. xcel";let f=l.ecommerce_performance.find(x=>x.document_type==="shopify_monthly_sales");f?c.textContent=f.asset_name||"Supported formats: sheets. xcel":c.textContent="Supported formats: sheets. xcel"}else n.textContent="Supported formats: sheets. xcel",c.textContent="Supported formats: sheets. xcel"},u,h=async l=>{u=(await lr(l))?.financialProgress,p(u)};await h(),pr(h);let y=(l,m)=>{if(l.files&&l.files.length>0){let f=l.files[0];if(!e.includes(f.type)){l.value="",m.textContent="Invalid file type. Please upload Excel (.xls or .xlsx) files only",m.classList.add("is-error");return}m.textContent=f.name,m.classList.remove("is-error")}else m.textContent="",m.classList.remove("is-error")};r&&o&&n&&(r.addEventListener("click",()=>o.click()),r.addEventListener("dragover",l=>{l.preventDefault(),r.classList.add("drag")}),r.addEventListener("dragleave",()=>{r.classList.remove("drag")}),r.addEventListener("drop",l=>{l.preventDefault(),r.classList.remove("drag"),l.dataTransfer&&l.dataTransfer.files.length>0&&(o.files=l.dataTransfer.files,y(o,n),o.dispatchEvent(new Event("change",{bubbles:!0})))}),o.addEventListener("change",()=>{y(o,n)})),s&&i&&c&&(s.addEventListener("click",()=>i.click()),s.addEventListener("dragover",l=>{l.preventDefault(),s.classList.add("drag")}),s.addEventListener("dragleave",()=>{s.classList.remove("drag")}),s.addEventListener("drop",l=>{l.preventDefault(),s.classList.remove("drag"),l.dataTransfer&&l.dataTransfer.files.length>0&&(i.files=l.dataTransfer.files,y(i,c),i.dispatchEvent(new Event("change",{bubbles:!0})))}),i.addEventListener("change",()=>{y(i,c)}));let S=async(l,m)=>{if(!e.includes(l.type))throw new Error("Invalid file type. Please upload Excel (.xls or .xlsx) files only");let f={fileName:l.name,contentType:l.type,assetType:"document",fileSize:l.size,duration:0},x=await tr(f),E=x.asset.id,{presignedUrl:b}=x;if(!b)throw new Error("Presigned URL not received from server");await new Promise((I,C)=>{let D=new XMLHttpRequest;D.upload.addEventListener("progress",F=>{if(F.lengthComputable){let fe=Math.round(F.loaded/F.total*100);console.log(`Upload progress: ${fe}%`)}}),D.addEventListener("load",()=>{D.status>=200&&D.status<300?I():C(new Error("Failed to upload file to S3"))}),D.addEventListener("error",F=>{console.error(F),C(new Error("Network error during upload"))}),D.open("PUT",b),D.setRequestHeader("Content-Type",l.type),D.send(l)});let T=await dr(l),L={page:"ecommerce-performance",document_type:m,asset_id:E,file_data:T,file_name:l.name,file_mime_type:l.type};await rr(L)};t.addEventListener("submit",async l=>{l.preventDefault(),l.stopPropagation();let m=()=>{r?.classList.remove("is-error"),s?.classList.remove("is-error"),n?.classList.remove("is-error"),c?.classList.remove("is-error"),d.classList.remove("is-error"),d.value="UPLOAD DOCUMENTS"};o?.addEventListener("change",m,{once:!0}),i?.addEventListener("change",m,{once:!0});let f=[];if(o?.files&&o.files[0]){let E=o.files[0];e.includes(E.type)?f.push({file:E,documentType:"shopify_repeat_customers"}):n?.classList.add("is-error")}if(i?.files&&i.files[0]){let E=i.files[0];e.includes(E.type)?f.push({file:E,documentType:"shopify_monthly_sales"}):c?.classList.add("is-error")}if(o?.files&&o.files[0]&&!e.includes(o.files[0].type)||i?.files&&i.files[0]&&!e.includes(i.files[0].type)){d.classList.add("is-error"),d.value="Please upload only Excel (.xls or .xlsx) files";return}if(f.length===0){d.classList.add("is-error"),d.value="Please select at least one file to upload";return}try{d.disabled=!0,d.value="Uploading...",await Promise.all(f.map(({file:E,documentType:b})=>S(E,b))),d.classList.add("is-success"),d.value="Documents uploaded successfully!",o&&(o.value=""),i&&(i.value=""),n&&(n.textContent="",n.classList.remove("is-error")),c&&(c.textContent="",c.classList.remove("is-error")),setTimeout(()=>{d.classList.remove("is-success"),d.value="UPLOAD DOCUMENTS",d.disabled=!1,$("/finance-docs-team-and-ownership")},900)}catch(E){let{message:b}=E;console.error(b),d.classList.add("is-error"),d.value=b||"There was a problem uploading the documents",d.disabled=!1}})};window.Webflow||(window.Webflow=[]);window.Webflow.push(()=>{try{jo()}catch(e){console.error(e)}});
5
+ `):" "+zt(i[0]):"as no adapter specified";throw new g("There is no suitable adapter to dispatch the request "+c,"ERR_NOT_SUPPORT")}return n}var Ce={getAdapter:Po,adapters:Qe};function Ye(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new N(null,e)}function Oe(e){return Ye(e),e.headers=w.from(e.headers),e.data=ae.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Ce.getAdapter(e.adapter||X.adapter,e)(e).then(function(o){return Ye(e),o.data=ae.call(e,e.transformResponse,o),o.headers=w.from(o.headers),o},function(o){return ce(o)||(Ye(e),o&&o.response&&(o.response.data=ae.call(e,e.transformResponse,o.response),o.response.headers=w.from(o.response.headers))),Promise.reject(o)})}var Le="1.13.2";var De={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{De[e]=function(o){return typeof o===e||"a"+(t<1?"n ":" ")+e}});var $t={};De.transitional=function(t,r,o){function n(s,i){return"[Axios v"+Le+"] Transitional option '"+s+"'"+i+(o?". "+o:"")}return(s,i,c)=>{if(t===!1)throw new g(n(i," has been removed"+(r?" in "+r:"")),g.ERR_DEPRECATED);return r&&!$t[i]&&($t[i]=!0,console.warn(n(i," has been deprecated since v"+r+" and will be removed in the near future"))),t?t(s,i,c):!0}};De.spelling=function(t){return(r,o)=>(console.warn(`${o} is likely a misspelling of ${t}`),!0)};function _o(e,t,r){if(typeof e!="object")throw new g("options must be an object",g.ERR_BAD_OPTION_VALUE);let o=Object.keys(e),n=o.length;for(;n-- >0;){let s=o[n],i=t[s];if(i){let c=e[s],d=c===void 0||i(c,s,e);if(d!==!0)throw new g("option "+s+" must be "+d,g.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new g("Unknown option "+s,g.ERR_BAD_OPTION)}}var pe={assertOptions:_o,validators:De};var k=pe.validators,Z=class{constructor(t){this.defaults=t||{},this.interceptors={request:new ke,response:new ke}}async request(t,r){try{return await this._request(t,r)}catch(o){if(o instanceof Error){let n={};Error.captureStackTrace?Error.captureStackTrace(n):n=new Error;let s=n.stack?n.stack.replace(/^.+\n/,""):"";try{o.stack?s&&!String(o.stack).endsWith(s.replace(/^.+\n.+\n/,""))&&(o.stack+=`
6
+ `+s):o.stack=s}catch{}}throw o}}_request(t,r){typeof t=="string"?(r=r||{},r.url=t):r=t||{},r=U(this.defaults,r);let{transitional:o,paramsSerializer:n,headers:s}=r;o!==void 0&&pe.assertOptions(o,{silentJSONParsing:k.transitional(k.boolean),forcedJSONParsing:k.transitional(k.boolean),clarifyTimeoutError:k.transitional(k.boolean)},!1),n!=null&&(a.isFunction(n)?r.paramsSerializer={serialize:n}:pe.assertOptions(n,{encode:k.function,serialize:k.function},!0)),r.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?r.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:r.allowAbsoluteUrls=!0),pe.assertOptions(r,{baseUrl:k.spelling("baseURL"),withXsrfToken:k.spelling("withXSRFToken")},!0),r.method=(r.method||this.defaults.method||"get").toLowerCase();let i=s&&a.merge(s.common,s[r.method]);s&&a.forEach(["delete","get","head","post","put","patch","common"],l=>{delete s[l]}),r.headers=w.concat(i,s);let c=[],d=!0;this.interceptors.request.forEach(function(m){typeof m.runWhen=="function"&&m.runWhen(r)===!1||(d=d&&m.synchronous,c.unshift(m.fulfilled,m.rejected))});let p=[];this.interceptors.response.forEach(function(m){p.push(m.fulfilled,m.rejected)});let u,h=0,y;if(!d){let l=[Oe.bind(this),void 0];for(l.unshift(...c),l.push(...p),y=l.length,u=Promise.resolve(r);h<y;)u=u.then(l[h++],l[h++]);return u}y=c.length;let S=r;for(;h<y;){let l=c[h++],m=c[h++];try{S=l(S)}catch(f){m.call(this,f);break}}try{u=Oe.call(this,S)}catch(l){return Promise.reject(l)}for(h=0,y=p.length;h<y;)u=u.then(p[h++],p[h++]);return u}getUri(t){t=U(this.defaults,t);let r=ue(t.baseURL,t.url,t.allowAbsoluteUrls);return se(r,t.params,t.paramsSerializer)}};a.forEach(["delete","get","head","options"],function(t){Z.prototype[t]=function(r,o){return this.request(U(o||{},{method:t,url:r,data:(o||{}).data}))}});a.forEach(["post","put","patch"],function(t){function r(o){return function(s,i,c){return this.request(U(c||{},{method:t,headers:o?{"Content-Type":"multipart/form-data"}:{},url:s,data:i}))}}Z.prototype[t]=r(),Z.prototype[t+"Form"]=r(!0)});var de=Z;var Ze=class e{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let r;this.promise=new Promise(function(s){r=s});let o=this;this.promise.then(n=>{if(!o._listeners)return;let s=o._listeners.length;for(;s-- >0;)o._listeners[s](n);o._listeners=null}),this.promise.then=n=>{let s,i=new Promise(c=>{o.subscribe(c),s=c}).then(n);return i.cancel=function(){o.unsubscribe(s)},i},t(function(s,i,c){o.reason||(o.reason=new N(s,i,c),r(o.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;let r=this._listeners.indexOf(t);r!==-1&&this._listeners.splice(r,1)}toAbortSignal(){let t=new AbortController,r=o=>{t.abort(o)};return this.subscribe(r),t.signal.unsubscribe=()=>this.unsubscribe(r),t.signal}static source(){let t;return{token:new e(function(n){t=n}),cancel:t}}},Gt=Ze;function et(e){return function(r){return e.apply(null,r)}}function tt(e){return a.isObject(e)&&e.isAxiosError===!0}var rt={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(rt).forEach(([e,t])=>{rt[t]=e});var Vt=rt;function Jt(e){let t=new de(e),r=te(de.prototype.request,t);return a.extend(r,de.prototype,t,{allOwnKeys:!0}),a.extend(r,t,null,{allOwnKeys:!0}),r.create=function(n){return Jt(U(e,n))},r}var A=Jt(X);A.Axios=de;A.CanceledError=N;A.CancelToken=Gt;A.isCancel=ce;A.VERSION=Le;A.toFormData=q;A.AxiosError=g;A.Cancel=A.CanceledError;A.all=function(t){return Promise.all(t)};A.spread=et;A.isAxiosError=tt;A.mergeConfig=U;A.AxiosHeaders=w;A.formToJSON=e=>ve(a.isHTMLForm(e)?new FormData(e):e);A.getAdapter=Ce.getAdapter;A.HttpStatusCode=Vt;A.default=A;var Pe=A;var{Axios:Gi,AxiosError:Vi,CanceledError:Ji,isCancel:Ki,CancelToken:Xi,VERSION:Qi,all:Yi,Cancel:Zi,isAxiosError:ea,spread:ta,toFormData:ra,AxiosHeaders:oa,HttpStatusCode:na,formToJSON:sa,getAdapter:ia,mergeConfig:aa}=Pe;var Uo=localStorage.getItem("api-mode"),Fo="http://127.0.0.1:8787",Bo="https://assembled-brands-dev.crystal-e8a.workers.dev",M={apiBaseUrl:Uo==="local"?Fo:Bo,apiVersion:"/api/v1",accessTokenPersistStrategy:"cookie",TOKEN_NAME_IN_STORAGE:"accessToken",TOKEN_TYPE:"Bearer",REQUEST_HEADER_AUTH_KEY:"Authorization"},$=e=>{if(!e){console.error("navigateToPath: path is empty or undefined");return}let t=e.replace(/^\/+/,""),r=t;r=`dev/${t}`;let o=`${window.location.origin}/${r}`;window.location.assign(o)};var No=(e,t,r)=>{let o=new Date;o.setTime(o.getTime()+r*24*60*60*1e3);let n="expires="+o.toUTCString();document.cookie=`${e}=${encodeURIComponent(t)}; ${n}; path=/`},ot=e=>{let t=document.cookie.split("; ");for(let r of t){let[o,n]=r.split("=");if(o===e)return decodeURIComponent(n)}return null},nt=e=>{No(e,"",-1)},Kt=()=>{let e=ot("accessToken");return e||$("/login?error=unauthorized"),e},Xt=()=>{nt("accessToken"),localStorage.removeItem("x-team-id"),$("/login?error=logged-out")},ko=()=>{let e=localStorage.getItem("user"),t=e&&JSON.parse(e);return t&&t?.role},Qt=()=>ko()==="admin";var Mo=e=>{let t=M.accessTokenPersistStrategy;if(t==="localStorage"||t==="sessionStorage"||t==="cookie"){let o="";t==="localStorage"&&(o=localStorage.getItem(M.TOKEN_NAME_IN_STORAGE)||""),t==="sessionStorage"&&(o=sessionStorage.getItem(M.TOKEN_NAME_IN_STORAGE)||""),t==="cookie"&&(o=ot(M.TOKEN_NAME_IN_STORAGE)||""),o&&(e.headers[M.REQUEST_HEADER_AUTH_KEY]=`${M.TOKEN_TYPE} ${o}`)}let r=localStorage.getItem("x-team-id");return r&&(e.headers["X-Team-Id"]=r),e},Yt=Mo;var Io=[401,419,440],Ho=e=>{let{response:t}=e;if(window.location.pathname.includes("/login"))return Promise.reject(e);t&&Io.includes(t.status)&&(nt("accessToken"),$("/login?error=unauthorized"))},Zt=Ho;var st=Pe.create({timeout:6e4,baseURL:M.apiBaseUrl+M.apiVersion});st.interceptors.request.use(e=>Yt(e),e=>Promise.reject(e));st.interceptors.response.use(e=>e,e=>(Zt(e),Promise.reject(e)));var er=st;var Wo={fetchDataWithAxios(e){return new Promise((t,r)=>{er(e).then(o=>{t(o.data)}).catch(o=>{let n="An unknown error occurred";if(o.response&&o.response.data){let s=o.response.data;typeof s.message=="string"?n=s.message:typeof s.error=="string"?n=s.error:n=JSON.stringify(s)}else o.message&&(n=o.message);r({...o,message:n})})})}},P=Wo;var tr=e=>P.fetchDataWithAxios({url:"/asset",method:"post",data:e});var rr=e=>P.fetchDataWithAxios({url:"/financial-wizard/document",method:"post",data:e}),or=e=>P.fetchDataWithAxios({url:"/financial-wizard/progress",method:"get",params:e?{user_id:e}:void 0});var nr=()=>P.fetchDataWithAxios({url:"/financial-wizard/applications",method:"get"});async function sr(){return P.fetchDataWithAxios({url:"/user/me",method:"get"})}var ir=()=>P.fetchDataWithAxios({url:"/onboarding-wizard/progress",method:"get"});var ar=()=>P.fetchDataWithAxios({url:"/team/my-teams",method:"get"});var v=(e,t=document)=>t.querySelector(e),cr=(e,t=document)=>{let r=t.querySelectorAll(e);return[...Array.from(r)]};var qo=async e=>{let[t,r,o,n]=await Promise.all([or(e),sr(),ar(),ir()]);return{financialProgress:t,user:r,teams:o,onboardingProgress:n}},lr=async e=>{try{let{financialProgress:t,user:r,teams:o,onboardingProgress:n}=await qo(e),s=t?.percentage||0,i=v('[dev-target="progress-percentage-fill"]'),c=cr('[dev-target="progress-percentage-label"]'),d=v('[dev-target="user-name"]'),p=v('[dev-target="user-email"]'),u=v('[dev-target="logout"]');if(!i||!c||!u||!d||!p){console.error('Ensure [dev-target="progress-percentage-fill"], [dev-target="progress-percentage-label"], [dev-target="user-name"], [dev-target="user-email"], and [dev-target="logout"] are present.');return}return i.style.width=`${s}%`,c[0].textContent=`Progress ${s}%`,c[1].textContent=`${s}%`,u.addEventListener("click",()=>{Xt()}),d.innerText=t.business?.legal_name||(r.first_name||"Full")+" "+(r.last_name||"Name"),p.innerText=t.business?.email||r.email||"hello@company.com",{financialProgress:t,user:r,teams:o,onboardingProgress:n}}catch(t){console.error("Failed to load financial wizard progress:",t)}},ur=()=>{if(!v('[dev-target="sidebar-menu"]')){console.error('Ensure [dev-target="sidebar-menu"] is present.');return}let t=window.location.pathname,o={"/dev/finance-company-profile":{nav_attr:"nav-company-profile-link",nav_class:"is-active"},"/finance-company-profile":{nav_attr:"nav-company-profile-link",nav_class:"is-active"},"/dev/finance-financial-overview":{nav_attr:"nav-financial-overview-link",nav_class:"is-active"},"/finance-financial-overview":{nav_attr:"nav-financial-overview-link",nav_class:"is-active"},"/dev/finance-docs-financial-reports":{nav_attr:"nav-financial-reports-link",nav_class:"is-active-financial"},"/finance-docs-financial-reports":{nav_attr:"nav-financial-reports-link",nav_class:"is-active-financial"},"/dev/finance-docs-accounts-and-inventory":{nav_attr:"nav-accounts-inventory-link",nav_class:"is-active-financial"},"/finance-docs-accounts-and-inventory":{nav_attr:"nav-accounts-inventory-link",nav_class:"is-active-financial"},"/dev/finance-docs-ecommerce-performance":{nav_attr:"nav-eccomerce-performance-link",nav_class:"is-active-financial"},"/finance-docs-ecommerce-performance":{nav_attr:"nav-eccomerce-performance-link",nav_class:"is-active-financial"},"/dev/finance-docs-team-and-ownership":{nav_attr:"nav-team-ownership-link",nav_class:"is-active-financial"},"/finance-docs-team-and-ownership":{nav_attr:"nav-team-ownership-link",nav_class:"is-active-financial"},"/invite-team-members":{nav_attr:"nav-team-member-link",nav_class:"is-active-financial"},"/dev/invite-team-members":{nav_attr:"nav-team-member-link",nav_class:"is-active-financial"}}[t],n=document.querySelectorAll('[dev-attr="nav"]');if(o){n.forEach(i=>{i.classList.remove("is-active"),i.classList.remove("is-active-financial")});let s=v(`[dev-target="${o.nav_attr}"]`);s&&s.classList.add(o.nav_class)}else n.forEach(s=>{s.classList.remove("is-active"),s.classList.remove("is-active-financial")})},pr=async e=>{if(Qt()){let r=v('[dev-target="admin-select-wrapper"]'),o=v('[dev-target="admin-select"]');if(r?.classList.remove("hide"),!r||!o){console.error('Ensure [dev-target="admin-select"] and [dev-target="admin-select-wrapper"] is present.');return}let n=await nr();o.innerHTML="",n.forEach(s=>{let i=s.first_name||""+s.last_name||"",c=document.createElement("option");c.value=s.id.toString(),c.textContent=`${i||s.email}`,o.appendChild(c)}),o.addEventListener("change",async s=>{let i=s.target,{value:c}=i;e&&await e(c)})}},dr=e=>new Promise((t,r)=>{let o=new FileReader;o.onload=()=>{let s=o.result.split(",");t(s.length>1?s[1]:s[0])},o.onerror=()=>r(new Error("Failed to read file as base64")),o.readAsDataURL(e)}),fr=()=>{let e=v('[dev-target="sidebar-menu"]'),t=e?.querySelector(".sidebar"),r=v('[dev-target="collapsible-trigger"]');if(!e||!t||!r){console.error('Ensure [dev-target="sidebar-menu"] and [dev-target="collapsible-trigger"] and [dev-target="sidebar-inner"] are present.');return}let o=!1,n=()=>{o=!o;let s=document.querySelectorAll('[sidebar="collapsible-content"], [dev-target="collapsible-content"]'),i=v('[dev-target="sidebar-logo-text-wrapper"]'),c=e.querySelector('[dev-target="sidebar-bottom-collapsed"]'),d=e.querySelector('[dev-target="sidenav-close"]'),p=e.querySelector('[dev-target="sidebar-bottom"]'),u=e.querySelector(".user-profile_wrapper"),h=u?.querySelector(".flex-horizontal_auth.gap-15");o?(e.classList.add("collapsed"),t?.classList.add("mobile"),i?.classList.add("hide"),u?.classList.add("image-overlay"),h?.classList.add("overlay"),p?.classList.add("hide"),c?.classList.remove("hide"),d?.classList.add("is-collapsed"),s.forEach(y=>{y.style.opacity="0",y.style.transition="opacity 0.2s ease",setTimeout(()=>{y.classList.add("hide")},200)}),e.style.width="80px",e.style.width="auto"):(e.classList.remove("collapsed"),t?.classList.remove("mobile"),i?.classList.remove("hide"),u?.classList.remove("image-overlay"),h?.classList.remove("overlay"),p?.classList.remove("hide"),c?.classList.add("hide"),d?.classList.remove("is-collapsed"),s.forEach(y=>{y.classList.remove("hide"),setTimeout(()=>{y.style.opacity="1"},10)}))};r.addEventListener("click",n),e.style.transition="width 0.3s ease"};var jo=async()=>{ur(),Kt(),fr();let e=["application/vnd.ms-excel","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],t=document.querySelector('[dev-target="ecommerce-performance-form"]');if(!t){console.error('E-Commerce Performance form not found. Element: [dev-target="ecommerce-performance-form"] not found');return}let r=v('[dev-target="shopify-repeat-upload-box"]',t),o=v('[dev-target="shopify-repeat-input"]',t),n=v('[dev-target="shopify-repeat-helper"]',t),s=v('[dev-target="shopify-monthly-upload-box"]',t),i=v('[dev-target="shopify-monthly-input"]',t),c=v('[dev-target="shopify-monthly-helper"]',t),d=v('[dev-target="submit-button"]',t);if(!r||!o||!n){console.error('Ensure [dev-target="shopify-repeat-upload-box"] and [dev-target="shopify-repeat-input"] and [dev-target="shopify-repeat-helper"] are present.');return}if(!s||!i||!c){console.error('Ensure [dev-target="shopify-monthly-upload-box"] and [dev-target="shopify-monthly-input"] and [dev-target="shopify-monthly-helper"] are present.');return}if(!d){console.error('Ensure [dev-target="submit-button"] is present.');return}let p=l=>{if(l?.ecommerce_performance){let m=l.ecommerce_performance.find(x=>x.document_type==="shopify_repeat_customers");m?n.textContent=m.asset_name||"Supported formats: sheets. xcel":n.textContent="Supported formats: sheets. xcel";let f=l.ecommerce_performance.find(x=>x.document_type==="shopify_monthly_sales");f?c.textContent=f.asset_name||"Supported formats: sheets. xcel":c.textContent="Supported formats: sheets. xcel"}else n.textContent="Supported formats: sheets. xcel",c.textContent="Supported formats: sheets. xcel"},u,h=async l=>{u=(await lr(l))?.financialProgress,p(u)};await h(),pr(h);let y=(l,m)=>{if(l.files&&l.files.length>0){let f=l.files[0];if(!e.includes(f.type)){l.value="",m.textContent="Invalid file type. Please upload Excel (.xls or .xlsx) files only",m.classList.add("is-error");return}m.textContent=f.name,m.classList.remove("is-error")}else m.textContent="",m.classList.remove("is-error")};r&&o&&n&&(r.addEventListener("click",()=>o.click()),r.addEventListener("dragover",l=>{l.preventDefault(),r.classList.add("drag")}),r.addEventListener("dragleave",()=>{r.classList.remove("drag")}),r.addEventListener("drop",l=>{l.preventDefault(),r.classList.remove("drag"),l.dataTransfer&&l.dataTransfer.files.length>0&&(o.files=l.dataTransfer.files,y(o,n),o.dispatchEvent(new Event("change",{bubbles:!0})))}),o.addEventListener("change",()=>{y(o,n)})),s&&i&&c&&(s.addEventListener("click",()=>i.click()),s.addEventListener("dragover",l=>{l.preventDefault(),s.classList.add("drag")}),s.addEventListener("dragleave",()=>{s.classList.remove("drag")}),s.addEventListener("drop",l=>{l.preventDefault(),s.classList.remove("drag"),l.dataTransfer&&l.dataTransfer.files.length>0&&(i.files=l.dataTransfer.files,y(i,c),i.dispatchEvent(new Event("change",{bubbles:!0})))}),i.addEventListener("change",()=>{y(i,c)}));let S=async(l,m)=>{if(!e.includes(l.type))throw new Error("Invalid file type. Please upload Excel (.xls or .xlsx) files only");let f={fileName:l.name,contentType:l.type,assetType:"document",fileSize:l.size,duration:0},x=await tr(f),E=x.asset.id,{presignedUrl:b}=x;if(!b)throw new Error("Presigned URL not received from server");await new Promise((I,C)=>{let D=new XMLHttpRequest;D.upload.addEventListener("progress",F=>{if(F.lengthComputable){let fe=Math.round(F.loaded/F.total*100);console.log(`Upload progress: ${fe}%`)}}),D.addEventListener("load",()=>{D.status>=200&&D.status<300?I():C(new Error("Failed to upload file to S3"))}),D.addEventListener("error",F=>{console.error(F),C(new Error("Network error during upload"))}),D.open("PUT",b),D.setRequestHeader("Content-Type",l.type),D.send(l)});let T=await dr(l),L={page:"ecommerce-performance",document_type:m,asset_id:E,file_data:T,file_name:l.name,file_mime_type:l.type};await rr(L)};t.addEventListener("submit",async l=>{l.preventDefault(),l.stopPropagation();let m=()=>{r?.classList.remove("is-error"),s?.classList.remove("is-error"),n?.classList.remove("is-error"),c?.classList.remove("is-error"),d.classList.remove("is-error"),d.value="UPLOAD DOCUMENTS"};o?.addEventListener("change",m,{once:!0}),i?.addEventListener("change",m,{once:!0});let f=[];if(o?.files&&o.files[0]){let E=o.files[0];e.includes(E.type)?f.push({file:E,documentType:"shopify_repeat_customers"}):n?.classList.add("is-error")}if(i?.files&&i.files[0]){let E=i.files[0];e.includes(E.type)?f.push({file:E,documentType:"shopify_monthly_sales"}):c?.classList.add("is-error")}if(o?.files&&o.files[0]&&!e.includes(o.files[0].type)||i?.files&&i.files[0]&&!e.includes(i.files[0].type)){d.classList.add("is-error"),d.value="Please upload only Excel (.xls or .xlsx) files";return}if(f.length===0){d.classList.add("is-error"),d.value="Please select at least one file to upload";return}try{d.disabled=!0,d.value="Uploading...",await Promise.all(f.map(({file:E,documentType:b})=>S(E,b))),d.classList.add("is-success"),d.value="Documents uploaded successfully!",o&&(o.value=""),i&&(i.value=""),n&&(n.textContent="",n.classList.remove("is-error")),c&&(c.textContent="",c.classList.remove("is-error")),setTimeout(()=>{d.classList.remove("is-success"),d.value="UPLOAD DOCUMENTS",d.disabled=!1,$("/finance-docs-team-and-ownership")},900)}catch(E){let{message:b}=E;console.error(b),d.classList.add("is-error"),d.value=b||"There was a problem uploading the documents",d.disabled=!1}})};window.Webflow||(window.Webflow=[]);window.Webflow.push(()=>{try{jo()}catch(e){console.error(e)}});