diff --git a/dist/assets/index-B67_PU6l.js b/dist/assets/index-B67_PU6l.js deleted file mode 100644 index 20bf1ef..0000000 --- a/dist/assets/index-B67_PU6l.js +++ /dev/null @@ -1 +0,0 @@ -(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),t.credentials=e.crossOrigin===`use-credentials`?`include`:e.crossOrigin===`anonymous`?`omit`:`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();function e(e){let t=Object.create(null);for(let n of e.split(`,`))t[n]=1;return e=>e in t}var t={},n=[],r=()=>{},i=()=>!1,a=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),o=e=>e.startsWith(`onUpdate:`),s=Object.assign,c=(e,t)=>{let n=e.indexOf(t);n>-1&&e.splice(n,1)},l=Object.prototype.hasOwnProperty,u=(e,t)=>l.call(e,t),d=Array.isArray,f=e=>x(e)===`[object Map]`,p=e=>x(e)===`[object Set]`,m=e=>x(e)===`[object Date]`,h=e=>typeof e==`function`,g=e=>typeof e==`string`,_=e=>typeof e==`symbol`,v=e=>typeof e==`object`&&!!e,y=e=>(v(e)||h(e))&&h(e.then)&&h(e.catch),b=Object.prototype.toString,x=e=>b.call(e),S=e=>x(e).slice(8,-1),C=e=>x(e)===`[object Object]`,w=e=>g(e)&&e!==`NaN`&&e[0]!==`-`&&``+parseInt(e,10)===e,ee=e(`,key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted`),te=e=>{let t=Object.create(null);return(n=>t[n]||(t[n]=e(n)))},ne=/-\w/g,T=te(e=>e.replace(ne,e=>e.slice(1).toUpperCase())),re=/\B([A-Z])/g,E=te(e=>e.replace(re,`-$1`).toLowerCase()),D=te(e=>e.charAt(0).toUpperCase()+e.slice(1)),ie=te(e=>e?`on${D(e)}`:``),O=(e,t)=>!Object.is(e,t),ae=(e,...t)=>{for(let n=0;n{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:r,value:n})},oe=e=>{let t=parseFloat(e);return isNaN(t)?e:t},se,ce=()=>se||=typeof globalThis<`u`?globalThis:typeof self<`u`?self:typeof window<`u`?window:typeof global<`u`?global:{};function le(e){if(d(e)){let t={};for(let n=0;n{if(e){let n=e.split(de);n.length>1&&(t[n[0].trim()]=n[1].trim())}}),t}function A(e){let t=``;if(g(e))t=e;else if(d(e))for(let n=0;n!!(e&&e.__v_isRef===!0),be=e=>g(e)?e:e==null?``:d(e)||v(e)&&(e.toString===b||!h(e.toString))?ye(e)?be(e.value):JSON.stringify(e,xe,2):String(e),xe=(e,t)=>ye(t)?xe(e,t.value):f(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((e,[t,n],r)=>(e[Se(t,r)+` =>`]=n,e),{})}:p(t)?{[`Set(${t.size})`]:[...t.values()].map(e=>Se(e))}:_(t)?Se(t):v(t)&&!d(t)&&!C(t)?String(t):t,Se=(e,t=``)=>_(e)?`Symbol(${e.description??t})`:e,j,Ce=class{constructor(e=!1){this.detached=e,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.__v_skip=!0,this.parent=j,!e&&j&&(this.index=(j.scopes||(j.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let e,t;if(this.scopes)for(e=0,t=this.scopes.length;e0&&--this._on===0&&(j=this.prevScope,this.prevScope=void 0)}stop(e){if(this._active){this._active=!1;let t,n;for(t=0,n=this.effects.length;t0)return;if(Ae){let e=Ae;for(Ae=void 0;e;){let t=e.next;e.next=void 0,e.flags&=-9,e=t}}let e;for(;ke;){let t=ke;for(ke=void 0;t;){let n=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(t){e||=t}t=n}}if(e)throw e}function Pe(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function Fe(e){let t,n=e.depsTail,r=n;for(;r;){let e=r.prevDep;r.version===-1?(r===n&&(n=e),Re(r),ze(r)):t=r,r.dep.activeLink=r.prevActiveLink,r.prevActiveLink=void 0,r=e}e.deps=t,e.depsTail=n}function Ie(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(Le(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function Le(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===We)||(e.globalVersion=We,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!Ie(e))))return;e.flags|=2;let t=e.dep,n=M,r=N;M=e,N=!0;try{Pe(e);let n=e.fn(e._value);(t.version===0||O(n,e._value))&&(e.flags|=128,e._value=n,t.version++)}catch(e){throw t.version++,e}finally{M=n,N=r,Fe(e),e.flags&=-3}}function Re(e,t=!1){let{dep:n,prevSub:r,nextSub:i}=e;if(r&&(r.nextSub=i,e.prevSub=void 0),i&&(i.prevSub=r,e.nextSub=void 0),n.subs===e&&(n.subs=r,!r&&n.computed)){n.computed.flags&=-5;for(let e=n.computed.deps;e;e=e.nextDep)Re(e,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function ze(e){let{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}var N=!0,Be=[];function Ve(){Be.push(N),N=!1}function He(){let e=Be.pop();N=e===void 0||e}function Ue(e){let{cleanup:t}=e;if(e.cleanup=void 0,t){let e=M;M=void 0;try{t()}finally{M=e}}}var We=0,Ge=class{constructor(e,t){this.sub=e,this.dep=t,this.version=t.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}},Ke=class{constructor(e){this.computed=e,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(e){if(!M||!N||M===this.computed)return;let t=this.activeLink;if(t===void 0||t.sub!==M)t=this.activeLink=new Ge(M,this),M.deps?(t.prevDep=M.depsTail,M.depsTail.nextDep=t,M.depsTail=t):M.deps=M.depsTail=t,qe(t);else if(t.version===-1&&(t.version=this.version,t.nextDep)){let e=t.nextDep;e.prevDep=t.prevDep,t.prevDep&&(t.prevDep.nextDep=e),t.prevDep=M.depsTail,t.nextDep=void 0,M.depsTail.nextDep=t,M.depsTail=t,M.deps===t&&(M.deps=e)}return t}trigger(e){this.version++,We++,this.notify(e)}notify(e){Me();try{for(let e=this.subs;e;e=e.prevSub)e.sub.notify()&&e.sub.dep.notify()}finally{Ne()}}};function qe(e){if(e.dep.sc++,e.sub.flags&4){let t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let e=t.deps;e;e=e.nextDep)qe(e)}let n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}var Je=new WeakMap,Ye=Symbol(``),Xe=Symbol(``),Ze=Symbol(``);function P(e,t,n){if(N&&M){let t=Je.get(e);t||Je.set(e,t=new Map);let r=t.get(n);r||(t.set(n,r=new Ke),r.map=t,r.key=n),r.track()}}function Qe(e,t,n,r,i,a){let o=Je.get(e);if(!o){We++;return}let s=e=>{e&&e.trigger()};if(Me(),t===`clear`)o.forEach(s);else{let i=d(e),a=i&&w(n);if(i&&n===`length`){let e=Number(r);o.forEach((t,n)=>{(n===`length`||n===Ze||!_(n)&&n>=e)&&s(t)})}else switch((n!==void 0||o.has(void 0))&&s(o.get(n)),a&&s(o.get(Ze)),t){case`add`:i?a&&s(o.get(`length`)):(s(o.get(Ye)),f(e)&&s(o.get(Xe)));break;case`delete`:i||(s(o.get(Ye)),f(e)&&s(o.get(Xe)));break;case`set`:f(e)&&s(o.get(Ye))}}Ne()}function $e(e){let t=I(e);return t===e?t:(P(t,`iterate`,Ze),F(e)?t:t.map(L))}function et(e){return P(e=I(e),`iterate`,Ze),e}function tt(e,t){return Rt(e)?Vt(Lt(e)?L(t):t):L(t)}var nt={__proto__:null,[Symbol.iterator](){return rt(this,Symbol.iterator,e=>tt(this,e))},concat(...e){return $e(this).concat(...e.map(e=>d(e)?$e(e):e))},entries(){return rt(this,`entries`,e=>(e[1]=tt(this,e[1]),e))},every(e,t){return at(this,`every`,e,t,void 0,arguments)},filter(e,t){return at(this,`filter`,e,t,e=>e.map(e=>tt(this,e)),arguments)},find(e,t){return at(this,`find`,e,t,e=>tt(this,e),arguments)},findIndex(e,t){return at(this,`findIndex`,e,t,void 0,arguments)},findLast(e,t){return at(this,`findLast`,e,t,e=>tt(this,e),arguments)},findLastIndex(e,t){return at(this,`findLastIndex`,e,t,void 0,arguments)},forEach(e,t){return at(this,`forEach`,e,t,void 0,arguments)},includes(...e){return st(this,`includes`,e)},indexOf(...e){return st(this,`indexOf`,e)},join(e){return $e(this).join(e)},lastIndexOf(...e){return st(this,`lastIndexOf`,e)},map(e,t){return at(this,`map`,e,t,void 0,arguments)},pop(){return ct(this,`pop`)},push(...e){return ct(this,`push`,e)},reduce(e,...t){return ot(this,`reduce`,e,t)},reduceRight(e,...t){return ot(this,`reduceRight`,e,t)},shift(){return ct(this,`shift`)},some(e,t){return at(this,`some`,e,t,void 0,arguments)},splice(...e){return ct(this,`splice`,e)},toReversed(){return $e(this).toReversed()},toSorted(e){return $e(this).toSorted(e)},toSpliced(...e){return $e(this).toSpliced(...e)},unshift(...e){return ct(this,`unshift`,e)},values(){return rt(this,`values`,e=>tt(this,e))}};function rt(e,t,n){let r=et(e),i=r[t]();return r!==e&&!F(e)&&(i._next=i.next,i.next=()=>{let e=i._next();return e.done||(e.value=n(e.value)),e}),i}var it=Array.prototype;function at(e,t,n,r,i,a){let o=et(e),s=o!==e&&!F(e),c=o[t];if(c!==it[t]){let t=c.apply(e,a);return s?L(t):t}let l=n;o!==e&&(s?l=function(t,r){return n.call(this,tt(e,t),r,e)}:n.length>2&&(l=function(t,r){return n.call(this,t,r,e)}));let u=c.call(o,l,r);return s&&i?i(u):u}function ot(e,t,n,r){let i=et(e),a=i!==e&&!F(e),o=n,s=!1;i!==e&&(a?(s=r.length===0,o=function(t,r,i){return s&&(s=!1,t=tt(e,t)),n.call(this,t,tt(e,r),i,e)}):n.length>3&&(o=function(t,r,i){return n.call(this,t,r,i,e)}));let c=i[t](o,...r);return s?tt(e,c):c}function st(e,t,n){let r=I(e);P(r,`iterate`,Ze);let i=r[t](...n);return(i===-1||i===!1)&&zt(n[0])?(n[0]=I(n[0]),r[t](...n)):i}function ct(e,t,n=[]){Ve(),Me();let r=I(e)[t].apply(e,n);return Ne(),He(),r}var lt=e(`__proto__,__v_isRef,__isVue`),ut=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!==`arguments`&&e!==`caller`).map(e=>Symbol[e]).filter(_));function dt(e){_(e)||(e=String(e));let t=I(this);return P(t,`has`,e),t.hasOwnProperty(e)}var ft=class{constructor(e=!1,t=!1){this._isReadonly=e,this._isShallow=t}get(e,t,n){if(t===`__v_skip`)return e.__v_skip;let r=this._isReadonly,i=this._isShallow;if(t===`__v_isReactive`)return!r;if(t===`__v_isReadonly`)return r;if(t===`__v_isShallow`)return i;if(t===`__v_raw`)return n===(r?i?At:kt:i?Ot:Dt).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(n)?e:void 0;let a=d(e);if(!r){let e;if(a&&(e=nt[t]))return e;if(t===`hasOwnProperty`)return dt}let o=Reflect.get(e,t,R(e)?e:n);if((_(t)?ut.has(t):lt(t))||(r||P(e,`get`,t),i))return o;if(R(o)){let e=a&&w(t)?o:o.value;return r&&v(e)?Ft(e):e}return v(o)?r?Ft(o):Nt(o):o}},pt=class extends ft{constructor(e=!1){super(!1,e)}set(e,t,n,r){let i=e[t],a=d(e)&&w(t);if(!this._isShallow){let e=Rt(i);if(!F(n)&&!Rt(n)&&(i=I(i),n=I(n)),!a&&R(i)&&!R(n))return e||(i.value=n),!0}let o=a?Number(t)e,yt=e=>Reflect.getPrototypeOf(e);function bt(e,t,n){return function(...r){let i=this.__v_raw,a=I(i),o=f(a),c=e===`entries`||e===Symbol.iterator&&o,l=e===`keys`&&o,u=i[e](...r),d=n?vt:t?Vt:L;return!t&&P(a,`iterate`,l?Xe:Ye),s(Object.create(u),{next(){let{value:e,done:t}=u.next();return t?{value:e,done:t}:{value:c?[d(e[0]),d(e[1])]:d(e),done:t}}})}}function xt(e){return function(...t){return e===`delete`?!1:e===`clear`?void 0:this}}function St(e,t){let n={get(n){let r=this.__v_raw,i=I(r),a=I(n);e||(O(n,a)&&P(i,`get`,n),P(i,`get`,a));let{has:o}=yt(i),s=t?vt:e?Vt:L;if(o.call(i,n))return s(r.get(n));if(o.call(i,a))return s(r.get(a));r!==i&&r.get(n)},get size(){let t=this.__v_raw;return!e&&P(I(t),`iterate`,Ye),t.size},has(t){let n=this.__v_raw,r=I(n),i=I(t);return e||(O(t,i)&&P(r,`has`,t),P(r,`has`,i)),t===i?n.has(t):n.has(t)||n.has(i)},forEach(n,r){let i=this,a=i.__v_raw,o=I(a),s=t?vt:e?Vt:L;return!e&&P(o,`iterate`,Ye),a.forEach((e,t)=>n.call(r,s(e),s(t),i))}};return s(n,e?{add:xt(`add`),set:xt(`set`),delete:xt(`delete`),clear:xt(`clear`)}:{add(e){let n=I(this),r=yt(n),i=I(e),a=!t&&!F(e)&&!Rt(e)?i:e;return r.has.call(n,a)||O(e,a)&&r.has.call(n,e)||O(i,a)&&r.has.call(n,i)||(n.add(a),Qe(n,`add`,a,a)),this},set(e,n){!t&&!F(n)&&!Rt(n)&&(n=I(n));let r=I(this),{has:i,get:a}=yt(r),o=i.call(r,e);o||=(e=I(e),i.call(r,e));let s=a.call(r,e);return r.set(e,n),o?O(n,s)&&Qe(r,`set`,e,n,s):Qe(r,`add`,e,n),this},delete(e){let t=I(this),{has:n,get:r}=yt(t),i=n.call(t,e);i||=(e=I(e),n.call(t,e));let a=r?r.call(t,e):void 0,o=t.delete(e);return i&&Qe(t,`delete`,e,void 0,a),o},clear(){let e=I(this),t=e.size!==0,n=e.clear();return t&&Qe(e,`clear`,void 0,void 0,void 0),n}}),[`keys`,`values`,`entries`,Symbol.iterator].forEach(r=>{n[r]=bt(r,e,t)}),n}function Ct(e,t){let n=St(e,t);return(t,r,i)=>r===`__v_isReactive`?!e:r===`__v_isReadonly`?e:r===`__v_raw`?t:Reflect.get(u(n,r)&&r in t?n:t,r,i)}var wt={get:Ct(!1,!1)},Tt={get:Ct(!1,!0)},Et={get:Ct(!0,!1)},Dt=new WeakMap,Ot=new WeakMap,kt=new WeakMap,At=new WeakMap;function jt(e){switch(e){case`Object`:case`Array`:return 1;case`Map`:case`Set`:case`WeakMap`:case`WeakSet`:return 2;default:return 0}}function Mt(e){return e.__v_skip||!Object.isExtensible(e)?0:jt(S(e))}function Nt(e){return Rt(e)?e:It(e,!1,ht,wt,Dt)}function Pt(e){return It(e,!1,_t,Tt,Ot)}function Ft(e){return It(e,!0,gt,Et,kt)}function It(e,t,n,r,i){if(!v(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;let a=Mt(e);if(a===0)return e;let o=i.get(e);if(o)return o;let s=new Proxy(e,a===2?r:n);return i.set(e,s),s}function Lt(e){return Rt(e)?Lt(e.__v_raw):!!(e&&e.__v_isReactive)}function Rt(e){return!!(e&&e.__v_isReadonly)}function F(e){return!!(e&&e.__v_isShallow)}function zt(e){return e?!!e.__v_raw:!1}function I(e){let t=e&&e.__v_raw;return t?I(t):e}function Bt(e){return!u(e,`__v_skip`)&&Object.isExtensible(e)&&k(e,`__v_skip`,!0),e}var L=e=>v(e)?Nt(e):e,Vt=e=>v(e)?Ft(e):e;function R(e){return e?e.__v_isRef===!0:!1}function Ht(e){return Wt(e,!1)}function Ut(e){return Wt(e,!0)}function Wt(e,t){return R(e)?e:new Gt(e,t)}var Gt=class{constructor(e,t){this.dep=new Ke,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=t?e:I(e),this._value=t?e:L(e),this.__v_isShallow=t}get value(){return this.dep.track(),this._value}set value(e){let t=this._rawValue,n=this.__v_isShallow||F(e)||Rt(e);e=n?e:I(e),O(e,t)&&(this._rawValue=e,this._value=n?e:L(e),this.dep.trigger())}};function Kt(e){return R(e)?e.value:e}var qt={get:(e,t,n)=>t===`__v_raw`?e:Kt(Reflect.get(e,t,n)),set:(e,t,n,r)=>{let i=e[t];return R(i)&&!R(n)?(i.value=n,!0):Reflect.set(e,t,n,r)}};function Jt(e){return Lt(e)?e:new Proxy(e,qt)}var Yt=class{constructor(e,t,n){this.fn=e,this.setter=t,this._value=void 0,this.dep=new Ke(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=We-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!t,this.isSSR=n}notify(){if(this.flags|=16,!(this.flags&8)&&M!==this)return je(this,!0),!0}get value(){let e=this.dep.track();return Le(this),e&&(e.version=this.dep.version),this._value}set value(e){this.setter&&this.setter(e)}};function Xt(e,t,n=!1){let r,i;return h(e)?r=e:(r=e.get,i=e.set),new Yt(r,i,n)}var Zt={},Qt=new WeakMap,$t=void 0;function en(e,t=!1,n=$t){if(n){let t=Qt.get(n);t||Qt.set(n,t=[]),t.push(e)}}function tn(e,n,i=t){let{immediate:a,deep:o,once:s,scheduler:l,augmentJob:u,call:f}=i,p=e=>o?e:F(e)||o===!1||o===0?nn(e,1):nn(e),m,g,_,v,y=!1,b=!1;if(R(e)?(g=()=>e.value,y=F(e)):Lt(e)?(g=()=>p(e),y=!0):d(e)?(b=!0,y=e.some(e=>Lt(e)||F(e)),g=()=>e.map(e=>{if(R(e))return e.value;if(Lt(e))return p(e);if(h(e))return f?f(e,2):e()})):g=h(e)?n?f?()=>f(e,2):e:()=>{if(_){Ve();try{_()}finally{He()}}let t=$t;$t=m;try{return f?f(e,3,[v]):e(v)}finally{$t=t}}:r,n&&o){let e=g,t=o===!0?1/0:o;g=()=>nn(e(),t)}let x=Te(),S=()=>{m.stop(),x&&x.active&&c(x.effects,m)};if(s&&n){let e=n;n=(...t)=>{e(...t),S()}}let C=b?Array(e.length).fill(Zt):Zt,w=e=>{if(!(!(m.flags&1)||!m.dirty&&!e)){if(n){let e=m.run();if(o||y||(b?e.some((e,t)=>O(e,C[t])):O(e,C))){_&&_();let t=$t;$t=m;try{let t=[e,C===Zt?void 0:b&&C[0]===Zt?[]:C,v];C=e,f?f(n,3,t):n(...t)}finally{$t=t}}}else m.run()}};return u&&u(w),m=new De(g),m.scheduler=l?()=>l(w,!1):w,v=e=>en(e,!1,m),_=m.onStop=()=>{let e=Qt.get(m);if(e){if(f)f(e,4);else for(let t of e)t();Qt.delete(m)}},n?a?w(!0):C=m.run():l?l(w.bind(null,!0),!0):m.run(),S.pause=m.pause.bind(m),S.resume=m.resume.bind(m),S.stop=S,S}function nn(e,t=1/0,n){if(t<=0||!v(e)||e.__v_skip||(n||=new Map,(n.get(e)||0)>=t))return e;if(n.set(e,t),t--,R(e))nn(e.value,t,n);else if(d(e))for(let r=0;r{nn(e,t,n)});else if(C(e)){for(let r in e)nn(e[r],t,n);for(let r of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,r)&&nn(e[r],t,n)}return e}function rn(e,t,n,r){try{return r?e(...r):e()}catch(e){on(e,t,n)}}function an(e,t,n,r){if(h(e)){let i=rn(e,t,n,r);return i&&y(i)&&i.catch(e=>{on(e,t,n)}),i}if(d(e)){let i=[];for(let a=0;a>>1,i=z[r],a=xn(i);a=xn(n)?z.push(e):z.splice(hn(t),0,e),e.flags|=1,_n()}}function _n(){pn||=fn.then(Sn)}function vn(e){d(e)?ln.push(...e):un&&e.id===-1?un.splice(dn+1,0,e):e.flags&1||(ln.push(e),e.flags|=1),_n()}function yn(e,t,n=cn+1){for(;nxn(e)-xn(t));if(ln.length=0,un){un.push(...e);return}for(un=e,dn=0;dne.id==null?e.flags&2?-1:1/0:e.id;function Sn(e){try{for(cn=0;cn{r._d&&Ni(-1);let i=wn(t),a;try{a=e(...n)}finally{wn(i),r._d&&Ni(1)}return a};return r._n=!0,r._c=!0,r._d=!0,r}function En(e,t,n,r){let i=e.dirs,a=t&&t.dirs;for(let o=0;o1)return n&&h(t)?t.call(r&&r.proxy):t}}var On=Symbol.for(`v-scx`),kn=()=>V(On);function An(e,t,n){return jn(e,t,n)}function jn(e,n,i=t){let{immediate:a,deep:o,flush:c,once:l}=i,u=s({},i),d=n&&a||!n&&c!==`post`,f;if(sa){if(c===`sync`){let e=kn();f=e.__watcherHandles||=[]}else if(!d){let e=()=>{};return e.stop=r,e.resume=r,e.pause=r,e}}let p=q;u.call=(e,t,n)=>an(e,p,t,n);let m=!1;c===`post`?u.scheduler=e=>{U(e,p&&p.suspense)}:c!==`sync`&&(m=!0,u.scheduler=(e,t)=>{t?e():gn(e)}),u.augmentJob=e=>{n&&(e.flags|=4),m&&(e.flags|=2,p&&(e.id=p.uid,e.i=p))};let h=tn(e,n,u);return sa&&(f?f.push(h):d&&h()),h}function Mn(e,t,n){let r=this.proxy,i=g(e)?e.includes(`.`)?Nn(r,e):()=>r[e]:e.bind(r,r),a;h(t)?a=t:(a=t.handler,n=t);let o=ia(this),s=jn(i,a.bind(r),n);return o(),s}function Nn(e,t){let n=t.split(`.`);return()=>{let t=e;for(let e=0;ee.__isTeleport,In=Symbol(`_leaveCb`);function Ln(e,t){e.shapeFlag&6&&e.component?(e.transition=t,Ln(e.component.subTree,t)):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function Rn(e,t){return h(e)?s({name:e.name},t,{setup:e}):e}function zn(e){e.ids=[e.ids[0]+e.ids[2]+++`-`,0,0]}function Bn(e,t){let n;return!!((n=Object.getOwnPropertyDescriptor(e,t))&&!n.configurable)}var Vn=new WeakMap;function Hn(e,n,r,a,o=!1){if(d(e)){e.forEach((e,t)=>Hn(e,n&&(d(n)?n[t]:n),r,a,o));return}if(Wn(a)&&!o){a.shapeFlag&512&&a.type.__asyncResolved&&a.component.subTree.component&&Hn(e,n,r,a.component.subTree);return}let s=a.shapeFlag&4?ma(a.component):a.el,l=o?null:s,{i:f,r:p}=e,m=n&&n.r,_=f.refs===t?f.refs={}:f.refs,v=f.setupState,y=I(v),b=v===t?i:e=>!Bn(_,e)&&u(y,e),x=(e,t)=>!(t&&Bn(_,t));if(m!=null&&m!==p){if(Un(n),g(m))_[m]=null,b(m)&&(v[m]=null);else if(R(m)){let e=n;x(m,e.k)&&(m.value=null),e.k&&(_[e.k]=null)}}if(h(p))rn(p,f,12,[l,_]);else{let t=g(p),n=R(p);if(t||n){let i=()=>{if(e.f){let n=t?b(p)?v[p]:_[p]:x(p)||!e.k?p.value:_[e.k];if(o)d(n)&&c(n,s);else if(d(n))n.includes(s)||n.push(s);else if(t)_[p]=[s],b(p)&&(v[p]=_[p]);else{let t=[s];x(p,e.k)&&(p.value=t),e.k&&(_[e.k]=t)}}else t?(_[p]=l,b(p)&&(v[p]=l)):n&&(x(p,e.k)&&(p.value=l),e.k&&(_[e.k]=l))};if(l){let t=()=>{i(),Vn.delete(e)};t.id=-1,Vn.set(e,t),U(t,r)}else Un(e),i()}}}function Un(e){let t=Vn.get(e);t&&(t.flags|=8,Vn.delete(e))}ce().requestIdleCallback,ce().cancelIdleCallback;var Wn=e=>!!e.type.__asyncLoader,Gn=e=>e.type.__isKeepAlive;function Kn(e,t){Jn(e,`a`,t)}function qn(e,t){Jn(e,`da`,t)}function Jn(e,t,n=q){let r=e.__wdc||=()=>{let t=n;for(;t;){if(t.isDeactivated)return;t=t.parent}return e()};if(Xn(t,r,n),n){let e=n.parent;for(;e&&e.parent;)Gn(e.parent.vnode)&&Yn(r,t,n,e),e=e.parent}}function Yn(e,t,n,r){let i=Xn(t,e,r,!0);rr(()=>{c(r[t],i)},n)}function Xn(e,t,n=q,r=!1){if(n){let i=n[e]||(n[e]=[]),a=t.__weh||=(...r)=>{Ve();let i=ia(n),a=an(t,n,e,r);return i(),He(),a};return r?i.unshift(a):i.push(a),a}}var Zn=e=>(t,n=q)=>{(!sa||e===`sp`)&&Xn(e,(...e)=>t(...e),n)},Qn=Zn(`bm`),$n=Zn(`m`),er=Zn(`bu`),tr=Zn(`u`),nr=Zn(`bum`),rr=Zn(`um`),ir=Zn(`sp`),ar=Zn(`rtg`),or=Zn(`rtc`);function sr(e,t=q){Xn(`ec`,e,t)}var cr=`components`;function lr(e,t){return dr(cr,e,!0,t)||e}var ur=Symbol.for(`v-ndc`);function dr(e,t,n=!0,r=!1){let i=B||q;if(i){let n=i.type;if(e===cr){let e=ha(n,!1);if(e&&(e===t||e===T(t)||e===D(T(t))))return n}let a=fr(i[e]||n[e],t)||fr(i.appContext[e],t);return!a&&r?n:a}}function fr(e,t){return e&&(e[t]||e[T(t)]||e[D(T(t))])}function pr(e,t,n,r){let i,a=n&&n[r],o=d(e);if(o||g(e)){let n=o&&Lt(e),r=!1,s=!1;n&&(r=!F(e),s=Rt(e),e=et(e)),i=Array(e.length);for(let n=0,o=e.length;nt(e,n,void 0,a&&a[n]));else{let n=Object.keys(e);i=Array(n.length);for(let r=0,o=n.length;re?oa(e)?ma(e):mr(e.parent):null,hr=s(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>mr(e.parent),$root:e=>mr(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>wr(e),$forceUpdate:e=>e.f||=()=>{gn(e.update)},$nextTick:e=>e.n||=mn.bind(e.proxy),$watch:e=>Mn.bind(e)}),gr=(e,n)=>e!==t&&!e.__isScriptSetup&&u(e,n),_r={get({_:e},n){if(n===`__v_skip`)return!0;let{ctx:r,setupState:i,data:a,props:o,accessCache:s,type:c,appContext:l}=e;if(n[0]!==`$`){let e=s[n];if(e!==void 0)switch(e){case 1:return i[n];case 2:return a[n];case 4:return r[n];case 3:return o[n]}else if(gr(i,n))return s[n]=1,i[n];else if(a!==t&&u(a,n))return s[n]=2,a[n];else if(u(o,n))return s[n]=3,o[n];else if(r!==t&&u(r,n))return s[n]=4,r[n];else yr&&(s[n]=0)}let d=hr[n],f,p;if(d)return n===`$attrs`&&P(e.attrs,`get`,``),d(e);if((f=c.__cssModules)&&(f=f[n]))return f;if(r!==t&&u(r,n))return s[n]=4,r[n];if(p=l.config.globalProperties,u(p,n))return p[n]},set({_:e},n,r){let{data:i,setupState:a,ctx:o}=e;return gr(a,n)?(a[n]=r,!0):i!==t&&u(i,n)?(i[n]=r,!0):u(e.props,n)||n[0]===`$`&&n.slice(1)in e?!1:(o[n]=r,!0)},has({_:{data:e,setupState:n,accessCache:r,ctx:i,appContext:a,props:o,type:s}},c){let l;return!!(r[c]||e!==t&&c[0]!==`$`&&u(e,c)||gr(n,c)||u(o,c)||u(i,c)||u(hr,c)||u(a.config.globalProperties,c)||(l=s.__cssModules)&&l[c])},defineProperty(e,t,n){return n.get==null?u(n,`value`)&&this.set(e,t,n.value,null):e._.accessCache[t]=0,Reflect.defineProperty(e,t,n)}};function vr(e){return d(e)?e.reduce((e,t)=>(e[t]=null,e),{}):e}var yr=!0;function br(e){let t=wr(e),n=e.proxy,i=e.ctx;yr=!1,t.beforeCreate&&Sr(t.beforeCreate,e,`bc`);let{data:a,computed:o,methods:s,watch:c,provide:l,inject:u,created:f,beforeMount:p,mounted:m,beforeUpdate:g,updated:_,activated:y,deactivated:b,beforeDestroy:x,beforeUnmount:S,destroyed:C,unmounted:w,render:ee,renderTracked:te,renderTriggered:ne,errorCaptured:T,serverPrefetch:re,expose:E,inheritAttrs:D,components:ie,directives:O,filters:ae}=t;if(u&&xr(u,i,null),s)for(let e in s){let t=s[e];h(t)&&(i[e]=t.bind(n))}if(a){let t=a.call(n,n);v(t)&&(e.data=Nt(t))}if(yr=!0,o)for(let e in o){let t=o[e],a=J({get:h(t)?t.bind(n,n):h(t.get)?t.get.bind(n,n):r,set:!h(t)&&h(t.set)?t.set.bind(n):r});Object.defineProperty(i,e,{enumerable:!0,configurable:!0,get:()=>a.value,set:e=>a.value=e})}if(c)for(let e in c)Cr(c[e],i,n,e);if(l){let e=h(l)?l.call(n):l;Reflect.ownKeys(e).forEach(t=>{Dn(t,e[t])})}f&&Sr(f,e,`c`);function k(e,t){d(t)?t.forEach(t=>e(t.bind(n))):t&&e(t.bind(n))}if(k(Qn,p),k($n,m),k(er,g),k(tr,_),k(Kn,y),k(qn,b),k(sr,T),k(or,te),k(ar,ne),k(nr,S),k(rr,w),k(ir,re),d(E)){if(E.length){let t=e.exposed||={};E.forEach(e=>{Object.defineProperty(t,e,{get:()=>n[e],set:t=>n[e]=t,enumerable:!0})})}else e.exposed||={}}ee&&e.render===r&&(e.render=ee),D!=null&&(e.inheritAttrs=D),ie&&(e.components=ie),O&&(e.directives=O),re&&zn(e)}function xr(e,t,n=r){d(e)&&(e=kr(e));for(let n in e){let r=e[n],i;i=v(r)?`default`in r?V(r.from||n,r.default,!0):V(r.from||n):V(r),R(i)?Object.defineProperty(t,n,{enumerable:!0,configurable:!0,get:()=>i.value,set:e=>i.value=e}):t[n]=i}}function Sr(e,t,n){an(d(e)?e.map(e=>e.bind(t.proxy)):e.bind(t.proxy),t,n)}function Cr(e,t,n,r){let i=r.includes(`.`)?Nn(n,r):()=>n[r];if(g(e)){let n=t[e];h(n)&&An(i,n)}else if(h(e))An(i,e.bind(n));else if(v(e)){if(d(e))e.forEach(e=>Cr(e,t,n,r));else{let r=h(e.handler)?e.handler.bind(n):t[e.handler];h(r)&&An(i,r,e)}}}function wr(e){let t=e.type,{mixins:n,extends:r}=t,{mixins:i,optionsCache:a,config:{optionMergeStrategies:o}}=e.appContext,s=a.get(t),c;return s?c=s:!i.length&&!n&&!r?c=t:(c={},i.length&&i.forEach(e=>Tr(c,e,o,!0)),Tr(c,t,o)),v(t)&&a.set(t,c),c}function Tr(e,t,n,r=!1){let{mixins:i,extends:a}=t;a&&Tr(e,a,n,!0),i&&i.forEach(t=>Tr(e,t,n,!0));for(let i in t)if(!(r&&i===`expose`)){let r=Er[i]||n&&n[i];e[i]=r?r(e[i],t[i]):t[i]}return e}var Er={data:Dr,props:jr,emits:jr,methods:Ar,computed:Ar,beforeCreate:H,created:H,beforeMount:H,mounted:H,beforeUpdate:H,updated:H,beforeDestroy:H,beforeUnmount:H,destroyed:H,unmounted:H,activated:H,deactivated:H,errorCaptured:H,serverPrefetch:H,components:Ar,directives:Ar,watch:Mr,provide:Dr,inject:Or};function Dr(e,t){return t?e?function(){return s(h(e)?e.call(this,this):e,h(t)?t.call(this,this):t)}:t:e}function Or(e,t){return Ar(kr(e),kr(t))}function kr(e){if(d(e)){let t={};for(let n=0;nt===`modelValue`||t===`model-value`?e.modelModifiers:e[`${t}Modifiers`]||e[`${T(t)}Modifiers`]||e[`${E(t)}Modifiers`];function Rr(e,n,...r){if(e.isUnmounted)return;let i=e.vnode.props||t,a=r,o=n.startsWith(`update:`),s=o&&Lr(i,n.slice(7));s&&(s.trim&&(a=r.map(e=>g(e)?e.trim():e)),s.number&&(a=r.map(oe)));let c,l=i[c=ie(n)]||i[c=ie(T(n))];!l&&o&&(l=i[c=ie(E(n))]),l&&an(l,e,6,a);let u=i[c+`Once`];if(u){if(!e.emitted)e.emitted={};else if(e.emitted[c])return;e.emitted[c]=!0,an(u,e,6,a)}}var zr=new WeakMap;function Br(e,t,n=!1){let r=n?zr:t.emitsCache,i=r.get(e);if(i!==void 0)return i;let a=e.emits,o={},c=!1;if(!h(e)){let r=e=>{let n=Br(e,t,!0);n&&(c=!0,s(o,n))};!n&&t.mixins.length&&t.mixins.forEach(r),e.extends&&r(e.extends),e.mixins&&e.mixins.forEach(r)}return!a&&!c?(v(e)&&r.set(e,null),null):(d(a)?a.forEach(e=>o[e]=null):s(o,a),v(e)&&r.set(e,o),o)}function Vr(e,t){return!e||!a(t)?!1:(t=t.slice(2).replace(/Once$/,``),u(e,t[0].toLowerCase()+t.slice(1))||u(e,E(t))||u(e,t))}function Hr(e){let{type:t,vnode:n,proxy:r,withProxy:i,propsOptions:[a],slots:s,attrs:c,emit:l,render:u,renderCache:d,props:f,data:p,setupState:m,ctx:h,inheritAttrs:g}=e,_=wn(e),v,y;try{if(n.shapeFlag&4){let e=i||r,t=e;v=qi(u.call(t,e,d,f,m,p,h)),y=c}else{let e=t;v=qi(e.length>1?e(f,{attrs:c,slots:s,emit:l}):e(f,null)),y=t.props?c:Ur(c)}}catch(t){ki.length=0,on(t,e,1),v=K(Di)}let b=v;if(y&&g!==!1){let e=Object.keys(y),{shapeFlag:t}=b;e.length&&t&7&&(a&&e.some(o)&&(y=Wr(y,a)),b=Ui(b,y,!1,!0))}return n.dirs&&(b=Ui(b,null,!1,!0),b.dirs=b.dirs?b.dirs.concat(n.dirs):n.dirs),n.transition&&Ln(b,n.transition),v=b,wn(_),v}var Ur=e=>{let t;for(let n in e)(n===`class`||n===`style`||a(n))&&((t||={})[n]=e[n]);return t},Wr=(e,t)=>{let n={};for(let r in e)(!o(r)||!(r.slice(9)in t))&&(n[r]=e[r]);return n};function Gr(e,t,n){let{props:r,children:i,component:a}=e,{props:o,children:s,patchFlag:c}=t,l=a.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&c>=0){if(c&1024)return!0;if(c&16)return r?Kr(r,o,l):!!o;if(c&8){let e=t.dynamicProps;for(let t=0;tObject.create(Yr),Zr=e=>Object.getPrototypeOf(e)===Yr;function Qr(e,t,n,r=!1){let i={},a=Xr();e.propsDefaults=Object.create(null),ei(e,t,i,a);for(let t in e.propsOptions[0])t in i||(i[t]=void 0);e.props=n?r?i:Pt(i):e.type.props?i:a,e.attrs=a}function $r(e,t,n,r){let{props:i,attrs:a,vnode:{patchFlag:o}}=e,s=I(i),[c]=e.propsOptions,l=!1;if((r||o>0)&&!(o&16)){if(o&8){let n=e.vnode.dynamicProps;for(let r=0;r{p=!0;let[t,n]=ri(e,r,!0);s(l,t),n&&f.push(...n)};!i&&r.mixins.length&&r.mixins.forEach(t),e.extends&&t(e.extends),e.mixins&&e.mixins.forEach(t)}if(!c&&!p)return v(e)&&a.set(e,n),n;if(d(c))for(let e=0;ee===`_`||e===`_ctx`||e===`$stable`,oi=e=>d(e)?e.map(qi):[qi(e)],si=(e,t,n)=>{if(t._n)return t;let r=Tn((...e)=>oi(t(...e)),n);return r._c=!1,r},ci=(e,t,n)=>{let r=e._ctx;for(let n in e){if(ai(n))continue;let i=e[n];if(h(i))t[n]=si(n,i,r);else if(i!=null){let e=oi(i);t[n]=()=>e}}},li=(e,t)=>{let n=oi(t);e.slots.default=()=>n},ui=(e,t,n)=>{for(let r in t)(n||!ai(r))&&(e[r]=t[r])},di=(e,t,n)=>{let r=e.slots=Xr();if(e.vnode.shapeFlag&32){let e=t._;e?(ui(r,t,n),n&&k(r,`_`,e,!0)):ci(t,r)}else t&&li(e,t)},fi=(e,n,r)=>{let{vnode:i,slots:a}=e,o=!0,s=t;if(i.shapeFlag&32){let e=n._;e?r&&e===1?o=!1:ui(a,n,r):(o=!n.$stable,ci(n,a)),s=n}else n&&(li(e,n),s={default:1});if(o)for(let e in a)!ai(e)&&s[e]==null&&delete a[e]},U=wi;function pi(e){return mi(e)}function mi(e,i){let a=ce();a.__VUE__=!0;let{insert:o,remove:s,patchProp:c,createElement:l,createText:u,createComment:d,setText:f,setElementText:p,parentNode:m,nextSibling:h,setScopeId:g=r,insertStaticContent:_}=e,v=(e,t,n,r=null,i=null,a=null,o=void 0,s=null,c=!!t.dynamicChildren)=>{if(e===t)return;e&&!Ri(e,t)&&(r=ve(e),A(e,i,a,!0),e=null),t.patchFlag===-2&&(c=!1,t.dynamicChildren=null);let{type:l,ref:u,shapeFlag:d}=t;switch(l){case Ei:y(e,t,n,r);break;case Di:b(e,t,n,r);break;case Oi:e??x(t,n,r,o);break;case Ti:ie(e,t,n,r,i,a,o,s,c);break;default:d&1?w(e,t,n,r,i,a,o,s,c):d&6?O(e,t,n,r,i,a,o,s,c):(d&64||d&128)&&l.process(e,t,n,r,i,a,o,s,c,xe)}u!=null&&i?Hn(u,e&&e.ref,a,t||e,!t):u==null&&e&&e.ref!=null&&Hn(e.ref,null,a,e,!0)},y=(e,t,n,r)=>{if(e==null)o(t.el=u(t.children),n,r);else{let n=t.el=e.el;t.children!==e.children&&f(n,t.children)}},b=(e,t,n,r)=>{e==null?o(t.el=d(t.children||``),n,r):t.el=e.el},x=(e,t,n,r)=>{[e.el,e.anchor]=_(e.children,t,n,r,e.el,e.anchor)},S=({el:e,anchor:t},n,r)=>{let i;for(;e&&e!==t;)i=h(e),o(e,n,r),e=i;o(t,n,r)},C=({el:e,anchor:t})=>{let n;for(;e&&e!==t;)n=h(e),s(e),e=n;s(t)},w=(e,t,n,r,i,a,o,s,c)=>{if(t.type===`svg`?o=`svg`:t.type===`math`&&(o=`mathml`),e==null)te(t,n,r,i,a,o,s,c);else{let n=e.el&&e.el._isVueCE?e.el:null;try{n&&n._beginPatch(),re(e,t,i,a,o,s,c)}finally{n&&n._endPatch()}}},te=(e,t,n,r,i,a,s,u)=>{let d,f,{props:m,shapeFlag:h,transition:g,dirs:_}=e;if(d=e.el=l(e.type,a,m&&m.is,m),h&8?p(d,e.children):h&16&&T(e.children,d,null,r,i,hi(e,a),s,u),_&&En(e,null,r,`created`),ne(d,e,e.scopeId,s,r),m){for(let e in m)e!==`value`&&!ee(e)&&c(d,e,null,m[e],a,r);`value`in m&&c(d,`value`,null,m.value,a),(f=m.onVnodeBeforeMount)&&Zi(f,r,e)}_&&En(e,null,r,`beforeMount`);let v=_i(i,g);v&&g.beforeEnter(d),o(d,t,n),((f=m&&m.onVnodeMounted)||v||_)&&U(()=>{f&&Zi(f,r,e),v&&g.enter(d),_&&En(e,null,r,`mounted`)},i)},ne=(e,t,n,r,i)=>{if(n&&g(e,n),r)for(let t=0;t{for(let l=c;l{let l=n.el=e.el,{patchFlag:u,dynamicChildren:d,dirs:f}=n;u|=e.patchFlag&16;let m=e.props||t,h=n.props||t,g;if(r&&gi(r,!1),(g=h.onVnodeBeforeUpdate)&&Zi(g,r,n,e),f&&En(n,e,r,`beforeUpdate`),r&&gi(r,!0),(m.innerHTML&&h.innerHTML==null||m.textContent&&h.textContent==null)&&p(l,``),d?E(e.dynamicChildren,d,l,r,i,hi(n,a),o):s||ue(e,n,l,null,r,i,hi(n,a),o,!1),u>0){if(u&16)D(l,m,h,r,a);else if(u&2&&m.class!==h.class&&c(l,`class`,null,h.class,a),u&4&&c(l,`style`,m.style,h.style,a),u&8){let e=n.dynamicProps;for(let t=0;t{g&&Zi(g,r,n,e),f&&En(n,e,r,`updated`)},i)},E=(e,t,n,r,i,a,o)=>{for(let s=0;s{if(n!==r){if(n!==t)for(let t in n)!ee(t)&&!(t in r)&&c(e,t,n[t],null,a,i);for(let t in r){if(ee(t))continue;let o=r[t],s=n[t];o!==s&&t!==`value`&&c(e,t,s,o,a,i)}`value`in r&&c(e,`value`,n.value,r.value,a)}},ie=(e,t,n,r,i,a,s,c,l)=>{let d=t.el=e?e.el:u(``),f=t.anchor=e?e.anchor:u(``),{patchFlag:p,dynamicChildren:m,slotScopeIds:h}=t;h&&(c=c?c.concat(h):h),e==null?(o(d,n,r),o(f,n,r),T(t.children||[],n,f,i,a,s,c,l)):p>0&&p&64&&m&&e.dynamicChildren&&e.dynamicChildren.length===m.length?(E(e.dynamicChildren,m,n,i,a,s,c),(t.key!=null||i&&t===i.subTree)&&vi(e,t,!0)):ue(e,t,n,f,i,a,s,c,l)},O=(e,t,n,r,i,a,o,s,c)=>{t.slotScopeIds=s,e==null?t.shapeFlag&512?i.ctx.activate(t,n,r,o,c):k(t,n,r,i,a,o,c):oe(e,t,c)},k=(e,t,n,r,i,a,o)=>{let s=e.component=ea(e,r,i);if(Gn(e)&&(s.ctx.renderer=xe),ca(s,!1,o),s.asyncDep){if(i&&i.registerDep(s,se,o),!e.el){let r=s.subTree=K(Di);b(null,r,t,n),e.placeholder=r.el}}else se(s,e,t,n,i,a,o)},oe=(e,t,n)=>{let r=t.component=e.component;if(Gr(e,t,n)){if(r.asyncDep&&!r.asyncResolved){le(r,t,n);return}r.next=t,r.update()}else t.el=e.el,r.vnode=t},se=(e,t,n,r,i,a,o)=>{let s=()=>{if(e.isMounted){let{next:t,bu:n,u:r,parent:s,vnode:c}=e;{let n=bi(e);if(n){t&&(t.el=c.el,le(e,t,o)),n.asyncDep.then(()=>{U(()=>{e.isUnmounted||l()},i)});return}}let u=t,d;gi(e,!1),t?(t.el=c.el,le(e,t,o)):t=c,n&&ae(n),(d=t.props&&t.props.onVnodeBeforeUpdate)&&Zi(d,s,t,c),gi(e,!0);let f=Hr(e),p=e.subTree;e.subTree=f,v(p,f,m(p.el),ve(p),e,i,a),t.el=f.el,u===null&&Jr(e,f.el),r&&U(r,i),(d=t.props&&t.props.onVnodeUpdated)&&U(()=>Zi(d,s,t,c),i)}else{let o,{el:s,props:c}=t,{bm:l,m:u,parent:d,root:f,type:p}=e,m=Wn(t);if(gi(e,!1),l&&ae(l),!m&&(o=c&&c.onVnodeBeforeMount)&&Zi(o,d,t),gi(e,!0),s&&j){let t=()=>{e.subTree=Hr(e),j(s,e.subTree,e,i,null)};m&&p.__asyncHydrate?p.__asyncHydrate(s,e,t):t()}else{f.ce&&f.ce._hasShadowRoot()&&f.ce._injectChildStyle(p,e.parent?e.parent.type:void 0);let o=e.subTree=Hr(e);v(null,o,n,r,e,i,a),t.el=o.el}if(u&&U(u,i),!m&&(o=c&&c.onVnodeMounted)){let e=t;U(()=>Zi(o,d,e),i)}(t.shapeFlag&256||d&&Wn(d.vnode)&&d.vnode.shapeFlag&256)&&e.a&&U(e.a,i),e.isMounted=!0,t=n=r=null}};e.scope.on();let c=e.effect=new De(s);e.scope.off();let l=e.update=c.run.bind(c),u=e.job=c.runIfDirty.bind(c);u.i=e,u.id=e.uid,c.scheduler=()=>gn(u),gi(e,!0),l()},le=(e,t,n)=>{t.component=e;let r=e.vnode.props;e.vnode=t,e.next=null,$r(e,t.props,r,n),fi(e,t.children,n),Ve(),yn(e),He()},ue=(e,t,n,r,i,a,o,s,c=!1)=>{let l=e&&e.children,u=e?e.shapeFlag:0,d=t.children,{patchFlag:f,shapeFlag:m}=t;if(f>0){if(f&128){fe(l,d,n,r,i,a,o,s,c);return}if(f&256){de(l,d,n,r,i,a,o,s,c);return}}m&8?(u&16&&_e(l,i,a),d!==l&&p(n,d)):u&16?m&16?fe(l,d,n,r,i,a,o,s,c):_e(l,i,a,!0):(u&8&&p(n,``),m&16&&T(d,n,r,i,a,o,s,c))},de=(e,t,r,i,a,o,s,c,l)=>{e||=n,t||=n;let u=e.length,d=t.length,f=Math.min(u,d),p;for(p=0;pd?_e(e,a,o,!0,!1,f):T(t,r,i,a,o,s,c,l,f)},fe=(e,t,r,i,a,o,s,c,l)=>{let u=0,d=t.length,f=e.length-1,p=d-1;for(;u<=f&&u<=p;){let n=e[u],i=t[u]=l?Ji(t[u]):qi(t[u]);if(Ri(n,i))v(n,i,r,null,a,o,s,c,l);else break;u++}for(;u<=f&&u<=p;){let n=e[f],i=t[p]=l?Ji(t[p]):qi(t[p]);if(Ri(n,i))v(n,i,r,null,a,o,s,c,l);else break;f--,p--}if(u>f){if(u<=p){let e=p+1,n=ep)for(;u<=f;)A(e[u],a,o,!0),u++;else{let m=u,h=u,g=new Map;for(u=h;u<=p;u++){let e=t[u]=l?Ji(t[u]):qi(t[u]);e.key!=null&&g.set(e.key,u)}let _,y=0,b=p-h+1,x=!1,S=0,C=Array(b);for(u=0;u=b){A(n,a,o,!0);continue}let i;if(n.key!=null)i=g.get(n.key);else for(_=h;_<=p;_++)if(C[_-h]===0&&Ri(n,t[_])){i=_;break}i===void 0?A(n,a,o,!0):(C[i-h]=u+1,i>=S?S=i:x=!0,v(n,t[i],r,null,a,o,s,c,l),y++)}let w=x?yi(C):n;for(_=w.length-1,u=b-1;u>=0;u--){let e=h+u,n=t[e],f=t[e+1],p=e+1{let{el:a,type:c,transition:l,children:u,shapeFlag:d}=e;if(d&6){pe(e.component.subTree,t,n,r);return}if(d&128){e.suspense.move(t,n,r);return}if(d&64){c.move(e,t,n,xe);return}if(c===Ti){o(a,t,n);for(let e=0;el.enter(a),i);else{let{leave:r,delayLeave:i,afterLeave:c}=l,u=()=>{e.ctx.isUnmounted?s(a):o(a,t,n)},d=()=>{a._isLeaving&&a[In](!0),r(a,()=>{u(),c&&c()})};i?i(a,u,d):d()}}else o(a,t,n)},A=(e,t,n,r=!1,i=!1)=>{let{type:a,props:o,ref:s,children:c,dynamicChildren:l,shapeFlag:u,patchFlag:d,dirs:f,cacheIndex:p}=e;if(d===-2&&(i=!1),s!=null&&(Ve(),Hn(s,null,n,e,!0),He()),p!=null&&(t.renderCache[p]=void 0),u&256){t.ctx.deactivate(e);return}let m=u&1&&f,h=!Wn(e),g;if(h&&(g=o&&o.onVnodeBeforeUnmount)&&Zi(g,t,e),u&6)ge(e.component,n,r);else{if(u&128){e.suspense.unmount(n,r);return}m&&En(e,null,t,`beforeUnmount`),u&64?e.type.remove(e,t,n,xe,r):l&&!l.hasOnce&&(a!==Ti||d>0&&d&64)?_e(l,t,n,!1,!0):(a===Ti&&d&384||!i&&u&16)&&_e(c,t,n),r&&me(e)}(h&&(g=o&&o.onVnodeUnmounted)||m)&&U(()=>{g&&Zi(g,t,e),m&&En(e,null,t,`unmounted`)},n)},me=e=>{let{type:t,el:n,anchor:r,transition:i}=e;if(t===Ti){he(n,r);return}if(t===Oi){C(e);return}let a=()=>{s(n),i&&!i.persisted&&i.afterLeave&&i.afterLeave()};if(e.shapeFlag&1&&i&&!i.persisted){let{leave:t,delayLeave:r}=i,o=()=>t(n,a);r?r(e.el,a,o):o()}else a()},he=(e,t)=>{let n;for(;e!==t;)n=h(e),s(e),e=n;s(t)},ge=(e,t,n)=>{let{bum:r,scope:i,job:a,subTree:o,um:s,m:c,a:l}=e;xi(c),xi(l),r&&ae(r),i.stop(),a&&(a.flags|=8,A(o,e,t,n)),s&&U(s,t),U(()=>{e.isUnmounted=!0},t)},_e=(e,t,n,r=!1,i=!1,a=0)=>{for(let o=a;o{if(e.shapeFlag&6)return ve(e.component.subTree);if(e.shapeFlag&128)return e.suspense.next();let t=h(e.anchor||e.el),n=t&&t[Pn];return n?h(n):t},ye=!1,be=(e,t,n)=>{let r;e==null?t._vnode&&(A(t._vnode,null,null,!0),r=t._vnode.component):v(t._vnode||null,e,t,null,null,null,n),t._vnode=e,ye||=(ye=!0,yn(r),bn(),!1)},xe={p:v,um:A,m:pe,r:me,mt:k,mc:T,pc:ue,pbc:E,n:ve,o:e},Se,j;return i&&([Se,j]=i(xe)),{render:be,hydrate:Se,createApp:Fr(be,Se)}}function hi({type:e,props:t},n){return n===`svg`&&e===`foreignObject`||n===`mathml`&&e===`annotation-xml`&&t&&t.encoding&&t.encoding.includes(`html`)?void 0:n}function gi({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function _i(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function vi(e,t,n=!1){let r=e.children,i=t.children;if(d(r)&&d(i))for(let e=0;e>1,e[n[s]]0&&(t[r]=n[a-1]),n[a]=r)}}for(a=n.length,o=n[a-1];a-->0;)n[a]=o,o=t[o];return n}function bi(e){let t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:bi(t)}function xi(e){if(e)for(let t=0;te.__isSuspense;function wi(e,t){t&&t.pendingBranch?d(e)?t.effects.push(...e):t.effects.push(e):vn(e)}var Ti=Symbol.for(`v-fgt`),Ei=Symbol.for(`v-txt`),Di=Symbol.for(`v-cmt`),Oi=Symbol.for(`v-stc`),ki=[],W=null;function Ai(e=!1){ki.push(W=e?null:[])}function ji(){ki.pop(),W=ki[ki.length-1]||null}var Mi=1;function Ni(e,t=!1){Mi+=e,e<0&&W&&t&&(W.hasOnce=!0)}function Pi(e){return e.dynamicChildren=Mi>0?W||n:null,ji(),Mi>0&&W&&W.push(e),e}function Fi(e,t,n,r,i,a){return Pi(G(e,t,n,r,i,a,!0))}function Ii(e,t,n,r,i){return Pi(K(e,t,n,r,i,!0))}function Li(e){return e?e.__v_isVNode===!0:!1}function Ri(e,t){return e.type===t.type&&e.key===t.key}var zi=({key:e})=>e??null,Bi=({ref:e,ref_key:t,ref_for:n})=>(typeof e==`number`&&(e=``+e),e==null?null:g(e)||R(e)||h(e)?{i:B,r:e,k:t,f:!!n}:e);function G(e,t=null,n=null,r=0,i=null,a=e===Ti?0:1,o=!1,s=!1){let c={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&zi(t),ref:t&&Bi(t),scopeId:Cn,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:a,patchFlag:r,dynamicProps:i,dynamicChildren:null,appContext:null,ctx:B};return s?(Yi(c,n),a&128&&e.normalize(c)):n&&(c.shapeFlag|=g(n)?8:16),Mi>0&&!o&&W&&(c.patchFlag>0||a&6)&&c.patchFlag!==32&&W.push(c),c}var K=Vi;function Vi(e,t=null,n=null,r=0,i=null,a=!1){if((!e||e===ur)&&(e=Di),Li(e)){let r=Ui(e,t,!0);return n&&Yi(r,n),Mi>0&&!a&&W&&(r.shapeFlag&6?W[W.indexOf(e)]=r:W.push(r)),r.patchFlag=-2,r}if(ga(e)&&(e=e.__vccOpts),t){t=Hi(t);let{class:e,style:n}=t;e&&!g(e)&&(t.class=A(e)),v(n)&&(zt(n)&&!d(n)&&(n=s({},n)),t.style=le(n))}let o=g(e)?1:Ci(e)?128:Fn(e)?64:v(e)?4:h(e)?2:0;return G(e,t,n,r,i,o,a,!0)}function Hi(e){return e?zt(e)||Zr(e)?s({},e):e:null}function Ui(e,t,n=!1,r=!1){let{props:i,ref:a,patchFlag:o,children:s,transition:c}=e,l=t?Xi(i||{},t):i,u={__v_isVNode:!0,__v_skip:!0,type:e.type,props:l,key:l&&zi(l),ref:t&&t.ref?n&&a?d(a)?a.concat(Bi(t)):[a,Bi(t)]:Bi(t):a,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:s,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==Ti?o===-1?16:o|16:o,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:c,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&Ui(e.ssContent),ssFallback:e.ssFallback&&Ui(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return c&&r&&Ln(u,c.clone(u)),u}function Wi(e=` `,t=0){return K(Ei,null,e,t)}function Gi(e,t){let n=K(Oi,null,e);return n.staticCount=t,n}function Ki(e=``,t=!1){return t?(Ai(),Ii(Di,null,e)):K(Di,null,e)}function qi(e){return e==null||typeof e==`boolean`?K(Di):d(e)?K(Ti,null,e.slice()):Li(e)?Ji(e):K(Ei,null,String(e))}function Ji(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:Ui(e)}function Yi(e,t){let n=0,{shapeFlag:r}=e;if(t==null)t=null;else if(d(t))n=16;else if(typeof t==`object`){if(r&65){let n=t.default;n&&(n._c&&(n._d=!1),Yi(e,n()),n._c&&(n._d=!0));return}{n=32;let r=t._;!r&&!Zr(t)?t._ctx=B:r===3&&B&&(B.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}}else h(t)?(t={default:t,_ctx:B},n=32):(t=String(t),r&64?(n=16,t=[Wi(t)]):n=8);e.children=t,e.shapeFlag|=n}function Xi(...e){let t={};for(let n=0;nq||B,na,ra;{let e=ce(),t=(t,n)=>{let r;return(r=e[t])||(r=e[t]=[]),r.push(n),e=>{r.length>1?r.forEach(t=>t(e)):r[0](e)}};na=t(`__VUE_INSTANCE_SETTERS__`,e=>q=e),ra=t(`__VUE_SSR_SETTERS__`,e=>sa=e)}var ia=e=>{let t=q;return na(e),e.scope.on(),()=>{e.scope.off(),na(t)}},aa=()=>{q&&q.scope.off(),na(null)};function oa(e){return e.vnode.shapeFlag&4}var sa=!1;function ca(e,t=!1,n=!1){t&&ra(t);let{props:r,children:i}=e.vnode,a=oa(e);Qr(e,r,a,t),di(e,i,n||t);let o=a?la(e,t):void 0;return t&&ra(!1),o}function la(e,t){let n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,_r);let{setup:r}=n;if(r){Ve();let n=e.setupContext=r.length>1?pa(e):null,i=ia(e),a=rn(r,e,0,[e.props,n]),o=y(a);if(He(),i(),(o||e.sp)&&!Wn(e)&&zn(e),o){if(a.then(aa,aa),t)return a.then(n=>{ua(e,n,t)}).catch(t=>{on(t,e,0)});e.asyncDep=a}else ua(e,a,t)}else da(e,t)}function ua(e,t,n){h(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:v(t)&&(e.setupState=Jt(t)),da(e,n)}function da(e,t,n){let i=e.type;e.render||=i.render||r;{let t=ia(e);Ve();try{br(e)}finally{He(),t()}}}var fa={get(e,t){return P(e,`get`,``),e[t]}};function pa(e){return{attrs:new Proxy(e.attrs,fa),slots:e.slots,emit:e.emit,expose:t=>{e.exposed=t||{}}}}function ma(e){return e.exposed?e.exposeProxy||=new Proxy(Jt(Bt(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in hr)return hr[n](e)},has(e,t){return t in e||t in hr}}):e.proxy}function ha(e,t=!0){return h(e)?e.displayName||e.name:e.name||t&&e.__name}function ga(e){return h(e)&&`__vccOpts`in e}var J=(e,t)=>Xt(e,t,sa);function _a(e,t,n){try{Ni(-1);let r=arguments.length;return r===2?v(t)&&!d(t)?Li(t)?K(e,null,[t]):K(e,t):K(e,null,t):(r>3?n=Array.prototype.slice.call(arguments,2):r===3&&Li(n)&&(n=[n]),K(e,t,n))}finally{Ni(1)}}var va=`3.5.30`,ya=void 0,ba=typeof window<`u`&&window.trustedTypes;if(ba)try{ya=ba.createPolicy(`vue`,{createHTML:e=>e})}catch{}var xa=ya?e=>ya.createHTML(e):e=>e,Sa=`http://www.w3.org/2000/svg`,Ca=`http://www.w3.org/1998/Math/MathML`,wa=typeof document<`u`?document:null,Ta=wa&&wa.createElement(`template`),Ea={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{let t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,r)=>{let i=t===`svg`?wa.createElementNS(Sa,e):t===`mathml`?wa.createElementNS(Ca,e):n?wa.createElement(e,{is:n}):wa.createElement(e);return e===`select`&&r&&r.multiple!=null&&i.setAttribute(`multiple`,r.multiple),i},createText:e=>wa.createTextNode(e),createComment:e=>wa.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>wa.querySelector(e),setScopeId(e,t){e.setAttribute(t,``)},insertStaticContent(e,t,n,r,i,a){let o=n?n.previousSibling:t.lastChild;if(i&&(i===a||i.nextSibling))for(;t.insertBefore(i.cloneNode(!0),n),!(i===a||!(i=i.nextSibling)););else{Ta.innerHTML=xa(r===`svg`?`${e}`:r===`mathml`?`${e}`:e);let i=Ta.content;if(r===`svg`||r===`mathml`){let e=i.firstChild;for(;e.firstChild;)i.appendChild(e.firstChild);i.removeChild(e)}t.insertBefore(i,n)}return[o?o.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},Da=Symbol(`_vtc`);function Oa(e,t,n){let r=e[Da];r&&(t=(t?[t,...r]:[...r]).join(` `)),t==null?e.removeAttribute(`class`):n?e.setAttribute(`class`,t):e.className=t}var ka=Symbol(`_vod`),Aa=Symbol(`_vsh`),ja=Symbol(``),Ma=/(?:^|;)\s*display\s*:/;function Na(e,t,n){let r=e.style,i=g(n),a=!1;if(n&&!i){if(t){if(g(t))for(let e of t.split(`;`)){let t=e.slice(0,e.indexOf(`:`)).trim();n[t]??Fa(r,t,``)}else for(let e in t)n[e]??Fa(r,e,``)}for(let e in n)e===`display`&&(a=!0),Fa(r,e,n[e])}else if(i){if(t!==n){let e=r[ja];e&&(n+=`;`+e),r.cssText=n,a=Ma.test(n)}}else t&&e.removeAttribute(`style`);ka in e&&(e[ka]=a?r.display:``,e[Aa]&&(r.display=`none`))}var Pa=/\s*!important$/;function Fa(e,t,n){if(d(n))n.forEach(n=>Fa(e,t,n));else if(n??=``,t.startsWith(`--`))e.setProperty(t,n);else{let r=Ra(e,t);Pa.test(n)?e.setProperty(E(r),n.replace(Pa,``),`important`):e[r]=n}}var Ia=[`Webkit`,`Moz`,`ms`],La={};function Ra(e,t){let n=La[t];if(n)return n;let r=T(t);if(r!==`filter`&&r in e)return La[t]=r;r=D(r);for(let n=0;nJa||=(Ya.then(()=>Ja=0),Date.now());function Za(e,t){let n=e=>{if(!e._vts)e._vts=Date.now();else if(e._vts<=n.attached)return;an(Qa(e,n.value),t,5,[e])};return n.value=e,n.attached=Xa(),n}function Qa(e,t){if(d(t)){let n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map(e=>t=>!t._stopped&&e&&e(t))}return t}var $a=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,eo=(e,t,n,r,i,s)=>{let c=i===`svg`;t===`class`?Oa(e,r,c):t===`style`?Na(e,n,r):a(t)?o(t)||Ga(e,t,n,r,s):(t[0]===`.`?(t=t.slice(1),!0):t[0]===`^`?(t=t.slice(1),!1):to(e,t,r,c))?(Va(e,t,r),!e.tagName.includes(`-`)&&(t===`value`||t===`checked`||t===`selected`)&&Ba(e,t,r,c,s,t!==`value`)):e._isVueCE&&(no(e,t)||e._def.__asyncLoader&&(/[A-Z]/.test(t)||!g(r)))?Va(e,T(t),r,s,t):(t===`true-value`?e._trueValue=r:t===`false-value`&&(e._falseValue=r),Ba(e,t,r,c))};function to(e,t,n,r){if(r)return!!(t===`innerHTML`||t===`textContent`||t in e&&$a(t)&&h(n));if(t===`spellcheck`||t===`draggable`||t===`translate`||t===`autocorrect`||t===`sandbox`&&e.tagName===`IFRAME`||t===`form`||t===`list`&&e.tagName===`INPUT`||t===`type`&&e.tagName===`TEXTAREA`)return!1;if(t===`width`||t===`height`){let t=e.tagName;if(t===`IMG`||t===`VIDEO`||t===`CANVAS`||t===`SOURCE`)return!1}return $a(t)&&g(n)?!1:t in e}function no(e,t){let n=e._def.props;if(!n)return!1;let r=T(t);return Array.isArray(n)?n.some(e=>T(e)===r):Object.keys(n).some(e=>T(e)===r)}var ro=[`ctrl`,`shift`,`alt`,`meta`],io={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>`button`in e&&e.button!==0,middle:e=>`button`in e&&e.button!==1,right:e=>`button`in e&&e.button!==2,exact:(e,t)=>ro.some(n=>e[`${n}Key`]&&!t.includes(n))},ao=(e,t)=>{if(!e)return e;let n=e._withMods||={},r=t.join(`.`);return n[r]||(n[r]=((n,...r)=>{for(let e=0;e{let t=co().createApp(...e),{mount:n}=t;return t.mount=e=>{let r=fo(e);if(!r)return;let i=t._component;!h(i)&&!i.render&&!i.template&&(i.template=r.innerHTML),r.nodeType===1&&(r.textContent=``);let a=n(r,!1,uo(r));return r instanceof Element&&(r.removeAttribute(`v-cloak`),r.setAttribute(`data-v-app`,``)),a},t});function uo(e){if(e instanceof SVGElement)return`svg`;if(typeof MathMLElement==`function`&&e instanceof MathMLElement)return`mathml`}function fo(e){return g(e)?document.querySelector(e):e}var po=typeof window<`u`,mo=Symbol(),ho;(function(e){e.direct=`direct`,e.patchObject=`patch object`,e.patchFunction=`patch function`})(ho||={});var go=typeof window==`object`&&window.window===window?window:typeof self==`object`&&self.self===self?self:typeof global==`object`&&global.global===global?global:typeof globalThis==`object`?globalThis:{HTMLElement:null};function _o(e,{autoBom:t=!1}={}){return t&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob([``,e],{type:e.type}):e}function vo(e,t,n){let r=new XMLHttpRequest;r.open(`GET`,e),r.responseType=`blob`,r.onload=function(){Co(r.response,t,n)},r.onerror=function(){console.error(`could not download file`)},r.send()}function yo(e){let t=new XMLHttpRequest;t.open(`HEAD`,e,!1);try{t.send()}catch{}return t.status>=200&&t.status<=299}function bo(e){try{e.dispatchEvent(new MouseEvent(`click`))}catch{let t=new MouseEvent(`click`,{bubbles:!0,cancelable:!0,view:window,detail:0,screenX:80,screenY:20,clientX:80,clientY:20,ctrlKey:!1,altKey:!1,shiftKey:!1,metaKey:!1,button:0,relatedTarget:null});e.dispatchEvent(t)}}var xo=typeof navigator==`object`?navigator:{userAgent:``},So=/Macintosh/.test(xo.userAgent)&&/AppleWebKit/.test(xo.userAgent)&&!/Safari/.test(xo.userAgent),Co=po?typeof HTMLAnchorElement<`u`&&`download`in HTMLAnchorElement.prototype&&!So?wo:`msSaveOrOpenBlob`in xo?To:Eo:()=>{};function wo(e,t=`download`,n){let r=document.createElement(`a`);r.download=t,r.rel=`noopener`,typeof e==`string`?(r.href=e,r.origin===location.origin?bo(r):yo(r.href)?vo(e,t,n):(r.target=`_blank`,bo(r))):(r.href=URL.createObjectURL(e),setTimeout(function(){URL.revokeObjectURL(r.href)},4e4),setTimeout(function(){bo(r)},0))}function To(e,t=`download`,n){if(typeof e==`string`){if(yo(e))vo(e,t,n);else{let t=document.createElement(`a`);t.href=e,t.target=`_blank`,setTimeout(function(){bo(t)})}}else navigator.msSaveOrOpenBlob(_o(e,n),t)}function Eo(e,t,n,r){if(r||=open(``,`_blank`),r&&(r.document.title=r.document.body.innerText=`downloading...`),typeof e==`string`)return vo(e,t,n);let i=e.type===`application/octet-stream`,a=/constructor/i.test(String(go.HTMLElement))||`safari`in go,o=/CriOS\/[\d]+/.test(navigator.userAgent);if((o||i&&a||So)&&typeof FileReader<`u`){let t=new FileReader;t.onloadend=function(){let e=t.result;if(typeof e!=`string`)throw r=null,Error(`Wrong reader.result type`);e=o?e:e.replace(/^data:[^;]*;/,`data:attachment/file;`),r?r.location.href=e:location.assign(e),r=null},t.readAsDataURL(e)}else{let t=URL.createObjectURL(e);r?r.location.assign(t):location.href=t,r=null,setTimeout(function(){URL.revokeObjectURL(t)},4e4)}}var{assign:Do}=Object;function Oo(){let e=we(!0),t=e.run(()=>Ht({})),n=[],r=[],i=Bt({install(e){i._a=e,e.provide(mo,i),e.config.globalProperties.$pinia=i,r.forEach(e=>n.push(e)),r=[]},use(e){return this._a?n.push(e):r.push(e),this},_p:n,_a:null,_e:e,_s:new Map,state:t});return i}var{assign:ko}=Object;function Ao(e,t){if(e==null)return;let n=e;for(let e=0;e1&&(t=jo(typeof e!=`object`||!e||!Object.prototype.hasOwnProperty.call(e,r)?Number.isInteger(Number(n[1]))?[]:{}:e[r],t,Array.prototype.slice.call(n,1))),Number.isInteger(Number(r))&&Array.isArray(e)?e.slice()[r]:Object.assign({},e,{[r]:t})}function Mo(e,t){if(e==null||t.length===0)return e;if(t.length===1){if(e==null)return e;if(Number.isInteger(t[0])&&Array.isArray(e))return Array.prototype.slice.call(e,0).splice(t[0],1);let n={};for(let t in e)n[t]=e[t];return delete n[t[0]],n}if(e[t[0]]==null){if(Number.isInteger(t[0])&&Array.isArray(e))return Array.prototype.concat.call([],e);let n={};for(let t in e)n[t]=e[t];return n}return jo(e,Mo(e[t[0]],Array.prototype.slice.call(t,1)),[t[0]])}function No(e,t){return t.map(e=>e.split(`.`)).map(t=>[t,Ao(e,t)]).filter(e=>e[1]!==void 0).reduce((e,t)=>jo(e,t[1],t[0]),{})}function Po(e,t){return t.map(e=>e.split(`.`)).reduce((e,t)=>Mo(e,t),e)}function Fo(e,{storage:t,serializer:n,key:r,debug:i,pick:a,omit:o,beforeHydrate:s,afterHydrate:c},l,u=!0){try{u&&s?.(l);let i=t.getItem(r);if(i){let t=n.deserialize(i),r=a?No(t,a):t,s=o?Po(r,o):r;e.$patch(s)}u&&c?.(l)}catch(e){i&&console.error(`[pinia-plugin-persistedstate]`,e)}}function Io(e,{storage:t,serializer:n,key:r,debug:i,pick:a,omit:o}){try{let i=a?No(e,a):e,s=o?Po(i,o):i,c=n.serialize(s);t.setItem(r,c)}catch(e){i&&console.error(`[pinia-plugin-persistedstate]`,e)}}function Lo(e,t){return typeof e==`function`?e(t):typeof e==`string`?e:t}function Ro(e,t,n){let{pinia:r,store:i,options:{persist:a=n}}=e;if(!a)return;if(!(i.$id in r.state.value)){let e=r._s.get(i.$id.replace(`__hot:`,``));e&&Promise.resolve().then(()=>e.$persist());return}let o=(Array.isArray(a)?a:a===!0?[{}]:[a]).map(t);i.$hydrate=({runHooks:t=!0}={})=>{o.forEach(n=>{Fo(i,n,e,t)})},i.$persist=()=>{o.forEach(e=>{Io(i.$state,e)})},o.forEach(t=>{Fo(i,t,e),i.$subscribe((e,n)=>Io(n,t),{detached:!0})})}function zo(e={}){return function(t){Ro(t,n=>{let r=Lo(n.key,t.store.$id);return{key:(e.key?e.key:e=>e)(r),debug:n.debug??e.debug??!1,serializer:n.serializer??e.serializer??{serialize:e=>JSON.stringify(e),deserialize:e=>JSON.parse(e)},storage:n.storage??e.storage??window.localStorage,beforeHydrate:n.beforeHydrate??e.beforeHydrate,afterHydrate:n.afterHydrate??e.afterHydrate,pick:n.pick,omit:n.omit}},e.auto??!1)}}var Bo=zo(),Vo=typeof document<`u`;function Ho(e){return typeof e==`object`||`displayName`in e||`props`in e||`__vccOpts`in e}function Uo(e){return e.__esModule||e[Symbol.toStringTag]===`Module`||e.default&&Ho(e.default)}var Y=Object.assign;function Wo(e,t){let n={};for(let r in t){let i=t[r];n[r]=X(i)?i.map(e):e(i)}return n}var Go=()=>{},X=Array.isArray;function Ko(e,t){let n={};for(let r in e)n[r]=r in t?t[r]:e[r];return n}var Z=function(e){return e[e.MATCHER_NOT_FOUND=1]=`MATCHER_NOT_FOUND`,e[e.NAVIGATION_GUARD_REDIRECT=2]=`NAVIGATION_GUARD_REDIRECT`,e[e.NAVIGATION_ABORTED=4]=`NAVIGATION_ABORTED`,e[e.NAVIGATION_CANCELLED=8]=`NAVIGATION_CANCELLED`,e[e.NAVIGATION_DUPLICATED=16]=`NAVIGATION_DUPLICATED`,e}({}),qo=Symbol(``);Z.MATCHER_NOT_FOUND,Z.NAVIGATION_GUARD_REDIRECT,Z.NAVIGATION_ABORTED,Z.NAVIGATION_CANCELLED,Z.NAVIGATION_DUPLICATED;function Jo(e,t){return Y(Error(),{type:e,[qo]:!0},t)}function Yo(e,t){return e instanceof Error&&qo in e&&(t==null||!!(e.type&t))}var Xo=Symbol(``),Zo=Symbol(``),Qo=Symbol(``),$o=Symbol(``),es=Symbol(``);function ts(){return V(Qo)}function ns(e){return V($o)}var rs=/#/g,is=/&/g,as=/\//g,os=/=/g,ss=/\?/g,cs=/\+/g,ls=/%5B/g,us=/%5D/g,ds=/%5E/g,fs=/%60/g,ps=/%7B/g,ms=/%7C/g,hs=/%7D/g,gs=/%20/g;function _s(e){return e==null?``:encodeURI(``+e).replace(ms,`|`).replace(ls,`[`).replace(us,`]`)}function vs(e){return _s(e).replace(ps,`{`).replace(hs,`}`).replace(ds,`^`)}function ys(e){return _s(e).replace(cs,`%2B`).replace(gs,`+`).replace(rs,`%23`).replace(is,`%26`).replace(fs,"`").replace(ps,`{`).replace(hs,`}`).replace(ds,`^`)}function bs(e){return ys(e).replace(os,`%3D`)}function xs(e){return _s(e).replace(rs,`%23`).replace(ss,`%3F`)}function Ss(e){return xs(e).replace(as,`%2F`)}function Cs(e){if(e==null)return null;try{return decodeURIComponent(``+e)}catch{}return``+e}var ws=/\/$/,Ts=e=>e.replace(ws,``);function Es(e,t,n=`/`){let r,i={},a=``,o=``,s=t.indexOf(`#`),c=t.indexOf(`?`);return c=s>=0&&c>s?-1:c,c>=0&&(r=t.slice(0,c),a=t.slice(c,s>0?s:t.length),i=e(a.slice(1))),s>=0&&(r||=t.slice(0,s),o=t.slice(s,t.length)),r=Ps(r??t,n),{fullPath:r+a+o,path:r,query:i,hash:Cs(o)}}function Ds(e,t){let n=t.query?e(t.query):``;return t.path+(n&&`?`)+n+(t.hash||``)}function Os(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||`/`}function ks(e,t,n){let r=t.matched.length-1,i=n.matched.length-1;return r>-1&&r===i&&As(t.matched[r],n.matched[i])&&js(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}function As(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function js(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var n in e)if(!Ms(e[n],t[n]))return!1;return!0}function Ms(e,t){return X(e)?Ns(e,t):X(t)?Ns(t,e):(e&&e.valueOf())===(t&&t.valueOf())}function Ns(e,t){return X(t)?e.length===t.length&&e.every((e,n)=>e===t[n]):e.length===1&&e[0]===t}function Ps(e,t){if(e.startsWith(`/`))return e;if(!e)return t;let n=t.split(`/`),r=e.split(`/`),i=r[r.length-1];(i===`..`||i===`.`)&&r.push(``);let a=n.length-1,o,s;for(o=0;o1&&a--;else break}return n.slice(0,a).join(`/`)+`/`+r.slice(o).join(`/`)}var Fs={path:`/`,name:void 0,params:{},query:{},hash:``,fullPath:`/`,matched:[],meta:{},redirectedFrom:void 0},Is=function(e){return e.pop=`pop`,e.push=`push`,e}({}),Ls=function(e){return e.back=`back`,e.forward=`forward`,e.unknown=``,e}({});function Rs(e){if(!e){if(Vo){let t=document.querySelector(`base`);e=t&&t.getAttribute(`href`)||`/`,e=e.replace(/^\w+:\/\/[^\/]+/,``)}else e=`/`}return e[0]!==`/`&&e[0]!==`#`&&(e=`/`+e),Ts(e)}var zs=/^[^#]+#/;function Bs(e,t){return e.replace(zs,`#`)+t}function Vs(e,t){let n=document.documentElement.getBoundingClientRect(),r=e.getBoundingClientRect();return{behavior:t.behavior,left:r.left-n.left-(t.left||0),top:r.top-n.top-(t.top||0)}}var Hs=()=>({left:window.scrollX,top:window.scrollY});function Us(e){let t;if(`el`in e){let n=e.el,r=typeof n==`string`&&n.startsWith(`#`),i=typeof n==`string`?r?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!i)return;t=Vs(i,e)}else t=e;`scrollBehavior`in document.documentElement.style?window.scrollTo(t):window.scrollTo(t.left==null?window.scrollX:t.left,t.top==null?window.scrollY:t.top)}function Ws(e,t){return(history.state?history.state.position-t:-1)+e}var Gs=new Map;function Ks(e,t){Gs.set(e,t)}function qs(e){let t=Gs.get(e);return Gs.delete(e),t}function Js(e){return typeof e==`string`||e&&typeof e==`object`}function Ys(e){return typeof e==`string`||typeof e==`symbol`}function Xs(e){let t={};if(e===``||e===`?`)return t;let n=(e[0]===`?`?e.slice(1):e).split(`&`);for(let e=0;ee&&ys(e)):[r&&ys(r)]).forEach(e=>{e!==void 0&&(t+=(t.length?`&`:``)+n,e!=null&&(t+=`=`+e))})}return t}function Qs(e){let t={};for(let n in e){let r=e[n];r!==void 0&&(t[n]=X(r)?r.map(e=>e==null?null:``+e):r==null?r:``+r)}return t}function $s(){let e=[];function t(t){return e.push(t),()=>{let n=e.indexOf(t);n>-1&&e.splice(n,1)}}function n(){e=[]}return{add:t,list:()=>e.slice(),reset:n}}function ec(e,t,n,r,i,a=e=>e()){let o=r&&(r.enterCallbacks[i]=r.enterCallbacks[i]||[]);return()=>new Promise((s,c)=>{let l=e=>{e===!1?c(Jo(Z.NAVIGATION_ABORTED,{from:n,to:t})):e instanceof Error?c(e):Js(e)?c(Jo(Z.NAVIGATION_GUARD_REDIRECT,{from:t,to:e})):(o&&r.enterCallbacks[i]===o&&typeof e==`function`&&o.push(e),s())},u=a(()=>e.call(r&&r.instances[i],t,n,l)),d=Promise.resolve(u);e.length<3&&(d=d.then(l)),d.catch(e=>c(e))})}function tc(e,t,n,r,i=e=>e()){let a=[];for(let o of e)for(let e in o.components){let s=o.components[e];if(!(t!==`beforeRouteEnter`&&!o.instances[e])){if(Ho(s)){let c=(s.__vccOpts||s)[t];c&&a.push(ec(c,n,r,o,e,i))}else{let c=s();a.push(()=>c.then(a=>{if(!a)throw Error(`Couldn't resolve component "${e}" at "${o.path}"`);let s=Uo(a)?a.default:a;o.mods[e]=a,o.components[e]=s;let c=(s.__vccOpts||s)[t];return c&&ec(c,n,r,o,e,i)()}))}}}return a}function nc(e,t){let n=[],r=[],i=[],a=Math.max(t.matched.length,e.matched.length);for(let o=0;oAs(e,a))?r.push(a):n.push(a));let s=e.matched[o];s&&(t.matched.find(e=>As(e,s))||i.push(s))}return[n,r,i]}var rc=()=>location.protocol+`//`+location.host;function ic(e,t){let{pathname:n,search:r,hash:i}=t,a=e.indexOf(`#`);if(a>-1){let t=i.includes(e.slice(a))?e.slice(a).length:1,n=i.slice(t);return n[0]!==`/`&&(n=`/`+n),Os(n,``)}return Os(n,e)+r+i}function ac(e,t,n,r){let i=[],a=[],o=null,s=({state:a})=>{let s=ic(e,location),c=n.value,l=t.value,u=0;if(a){if(n.value=s,t.value=a,o&&o===c){o=null;return}u=l?a.position-l.position:0}else r(s);i.forEach(e=>{e(n.value,c,{delta:u,type:Is.pop,direction:u?u>0?Ls.forward:Ls.back:Ls.unknown})})};function c(){o=n.value}function l(e){i.push(e);let t=()=>{let t=i.indexOf(e);t>-1&&i.splice(t,1)};return a.push(t),t}function u(){if(document.visibilityState===`hidden`){let{history:e}=window;if(!e.state)return;e.replaceState(Y({},e.state,{scroll:Hs()}),``)}}function d(){for(let e of a)e();a=[],window.removeEventListener(`popstate`,s),window.removeEventListener(`pagehide`,u),document.removeEventListener(`visibilitychange`,u)}return window.addEventListener(`popstate`,s),window.addEventListener(`pagehide`,u),document.addEventListener(`visibilitychange`,u),{pauseListeners:c,listen:l,destroy:d}}function oc(e,t,n,r=!1,i=!1){return{back:e,current:t,forward:n,replaced:r,position:window.history.length,scroll:i?Hs():null}}function sc(e){let{history:t,location:n}=window,r={value:ic(e,n)},i={value:t.state};i.value||a(r.value,{back:null,current:r.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function a(r,a,o){let s=e.indexOf(`#`),c=s>-1?(n.host&&document.querySelector(`base`)?e:e.slice(s))+r:rc()+e+r;try{t[o?`replaceState`:`pushState`](a,``,c),i.value=a}catch(e){console.error(e),n[o?`replace`:`assign`](c)}}function o(e,n){a(e,Y({},t.state,oc(i.value.back,e,i.value.forward,!0),n,{position:i.value.position}),!0),r.value=e}function s(e,n){let o=Y({},i.value,t.state,{forward:e,scroll:Hs()});a(o.current,o,!0),a(e,Y({},oc(r.value,e,null),{position:o.position+1},n),!1),r.value=e}return{location:r,state:i,push:s,replace:o}}function cc(e){e=Rs(e);let t=sc(e),n=ac(e,t.state,t.location,t.replace);function r(e,t=!0){t||n.pauseListeners(),history.go(e)}let i=Y({location:``,base:e,go:r,createHref:Bs.bind(null,e)},t,n);return Object.defineProperty(i,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(i,"state",{enumerable:!0,get:()=>t.state.value}),i}var lc=function(e){return e[e.Static=0]=`Static`,e[e.Param=1]=`Param`,e[e.Group=2]=`Group`,e}({}),Q=function(e){return e[e.Static=0]=`Static`,e[e.Param=1]=`Param`,e[e.ParamRegExp=2]=`ParamRegExp`,e[e.ParamRegExpEnd=3]=`ParamRegExpEnd`,e[e.EscapeNext=4]=`EscapeNext`,e}(Q||{}),uc={type:lc.Static,value:``},dc=/[a-zA-Z0-9_]/;function fc(e){if(!e)return[[]];if(e===`/`)return[[uc]];if(!e.startsWith(`/`))throw Error(`Invalid path "${e}"`);function t(e){throw Error(`ERR (${n})/"${l}": ${e}`)}let n=Q.Static,r=n,i=[],a;function o(){a&&i.push(a),a=[]}let s=0,c,l=``,u=``;function d(){l&&=(n===Q.Static?a.push({type:lc.Static,value:l}):n===Q.Param||n===Q.ParamRegExp||n===Q.ParamRegExpEnd?(a.length>1&&(c===`*`||c===`+`)&&t(`A repeatable param (${l}) must be alone in its segment. eg: '/:ids+.`),a.push({type:lc.Param,value:l,regexp:u,repeatable:c===`*`||c===`+`,optional:c===`*`||c===`?`})):t(`Invalid state to consume buffer`),``)}function f(){l+=c}for(;st.length?t.length===1&&t[0]===$.Static+$.Segment?1:-1:0}function vc(e,t){let n=0,r=e.score,i=t.score;for(;n0&&t[t.length-1]<0}var bc={strict:!1,end:!0,sensitive:!1};function xc(e,t,n){let r=Y(gc(fc(e.path),n),{record:e,parent:t,children:[],alias:[]});return t&&!r.record.aliasOf==!t.record.aliasOf&&t.children.push(r),r}function Sc(e,t){let n=[],r=new Map;t=Ko(bc,t);function i(e){return r.get(e)}function a(e,n,r){let i=!r,s=wc(e);s.aliasOf=r&&r.record;let l=Ko(t,e),u=[s];if(`alias`in e){let t=typeof e.alias==`string`?[e.alias]:e.alias;for(let e of t)u.push(wc(Y({},s,{components:r?r.record.components:s.components,path:e,aliasOf:r?r.record:s})))}let d,f;for(let t of u){let{path:u}=t;if(n&&u[0]!==`/`){let e=n.record.path,r=e[e.length-1]===`/`?``:`/`;t.path=n.record.path+(u&&r+u)}if(d=xc(t,n,l),r?r.alias.push(d):(f||=d,f!==d&&f.alias.push(d),i&&e.name&&!Ec(d)&&o(e.name)),Ac(d)&&c(d),s.children){let e=s.children;for(let t=0;t{o(f)}:Go}function o(e){if(Ys(e)){let t=r.get(e);t&&(r.delete(e),n.splice(n.indexOf(t),1),t.children.forEach(o),t.alias.forEach(o))}else{let t=n.indexOf(e);t>-1&&(n.splice(t,1),e.record.name&&r.delete(e.record.name),e.children.forEach(o),e.alias.forEach(o))}}function s(){return n}function c(e){let t=Oc(e,n);n.splice(t,0,e),e.record.name&&!Ec(e)&&r.set(e.record.name,e)}function l(e,t){let i,a={},o,s;if(`name`in e&&e.name){if(i=r.get(e.name),!i)throw Jo(Z.MATCHER_NOT_FOUND,{location:e});s=i.record.name,a=Y(Cc(t.params,i.keys.filter(e=>!e.optional).concat(i.parent?i.parent.keys.filter(e=>e.optional):[]).map(e=>e.name)),e.params&&Cc(e.params,i.keys.map(e=>e.name))),o=i.stringify(a)}else if(e.path!=null)o=e.path,i=n.find(e=>e.re.test(o)),i&&(a=i.parse(o),s=i.record.name);else{if(i=t.name?r.get(t.name):n.find(e=>e.re.test(t.path)),!i)throw Jo(Z.MATCHER_NOT_FOUND,{location:e,currentLocation:t});s=i.record.name,a=Y({},t.params,e.params),o=i.stringify(a)}let c=[],l=i;for(;l;)c.unshift(l.record),l=l.parent;return{name:s,path:o,params:a,matched:c,meta:Dc(c)}}e.forEach(e=>a(e));function u(){n.length=0,r.clear()}return{addRoute:a,resolve:l,removeRoute:o,clearRoutes:u,getRoutes:s,getRecordMatcher:i}}function Cc(e,t){let n={};for(let r of t)r in e&&(n[r]=e[r]);return n}function wc(e){let t={path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:e.aliasOf,beforeEnter:e.beforeEnter,props:Tc(e),children:e.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:`components`in e?e.components||null:e.component&&{default:e.component}};return Object.defineProperty(t,"mods",{value:{}}),t}function Tc(e){let t={},n=e.props||!1;if(`component`in e)t.default=n;else for(let r in e.components)t[r]=typeof n==`object`?n[r]:n;return t}function Ec(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function Dc(e){return e.reduce((e,t)=>Y(e,t.meta),{})}function Oc(e,t){let n=0,r=t.length;for(;n!==r;){let i=n+r>>1;vc(e,t[i])<0?r=i:n=i+1}let i=kc(e);return i&&(r=t.lastIndexOf(i,r-1)),r}function kc(e){let t=e;for(;t=t.parent;)if(Ac(t)&&vc(e,t)===0)return t}function Ac({record:e}){return!!(e.name||e.components&&Object.keys(e.components).length||e.redirect)}function jc(e){let t=V(Qo),n=V($o),r=J(()=>{let n=Kt(e.to);return t.resolve(n)}),i=J(()=>{let{matched:e}=r.value,{length:t}=e,i=e[t-1],a=n.matched;if(!i||!a.length)return-1;let o=a.findIndex(As.bind(null,i));if(o>-1)return o;let s=Ic(e[t-2]);return t>1&&Ic(i)===s&&a[a.length-1].path!==s?a.findIndex(As.bind(null,e[t-2])):o}),a=J(()=>i.value>-1&&Fc(n.params,r.value.params)),o=J(()=>i.value>-1&&i.value===n.matched.length-1&&js(n.params,r.value.params));function s(n={}){if(Pc(n)){let n=t[Kt(e.replace)?`replace`:`push`](Kt(e.to)).catch(Go);return e.viewTransition&&typeof document<`u`&&`startViewTransition`in document&&document.startViewTransition(()=>n),n}return Promise.resolve()}return{route:r,href:J(()=>r.value.href),isActive:a,isExactActive:o,navigate:s}}function Mc(e){return e.length===1?e[0]:e}var Nc=Rn({name:`RouterLink`,compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:`page`},viewTransition:Boolean},useLink:jc,setup(e,{slots:t}){let n=Nt(jc(e)),{options:r}=V(Qo),i=J(()=>({[Lc(e.activeClass,r.linkActiveClass,`router-link-active`)]:n.isActive,[Lc(e.exactActiveClass,r.linkExactActiveClass,`router-link-exact-active`)]:n.isExactActive}));return()=>{let r=t.default&&Mc(t.default(n));return e.custom?r:_a(`a`,{"aria-current":n.isExactActive?e.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:i.value},r)}}});function Pc(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&(e.button===void 0||e.button===0)){if(e.currentTarget&&e.currentTarget.getAttribute){let t=e.currentTarget.getAttribute(`target`);if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function Fc(e,t){for(let n in t){let r=t[n],i=e[n];if(typeof r==`string`){if(r!==i)return!1}else if(!X(i)||i.length!==r.length||r.some((e,t)=>e.valueOf()!==i[t].valueOf()))return!1}return!0}function Ic(e){return e?e.aliasOf?e.aliasOf.path:e.path:``}var Lc=(e,t,n)=>e??t??n,Rc=Rn({name:`RouterView`,inheritAttrs:!1,props:{name:{type:String,default:`default`},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:n}){let r=V(es),i=J(()=>e.route||r.value),a=V(Zo,0),o=J(()=>{let e=Kt(a),{matched:t}=i.value,n;for(;(n=t[e])&&!n.components;)e++;return e}),s=J(()=>i.value.matched[o.value]);Dn(Zo,J(()=>o.value+1)),Dn(Xo,s),Dn(es,i);let c=Ht();return An(()=>[c.value,s.value,e.name],([e,t,n],[r,i,a])=>{t&&(t.instances[n]=e,i&&i!==t&&e&&e===r&&(t.leaveGuards.size||(t.leaveGuards=i.leaveGuards),t.updateGuards.size||(t.updateGuards=i.updateGuards))),e&&t&&(!i||!As(t,i)||!r)&&(t.enterCallbacks[n]||[]).forEach(t=>t(e))},{flush:`post`}),()=>{let r=i.value,a=e.name,o=s.value,l=o&&o.components[a];if(!l)return zc(n.default,{Component:l,route:r});let u=o.props[a],d=_a(l,Y({},u?u===!0?r.params:typeof u==`function`?u(r):u:null,t,{onVnodeUnmounted:e=>{e.component.isUnmounted&&(o.instances[a]=null)},ref:c}));return zc(n.default,{Component:d,route:r})||d}}});function zc(e,t){if(!e)return null;let n=e(t);return n.length===1?n[0]:n}var Bc=Rc;function Vc(e){let t=Sc(e.routes,e),n=e.parseQuery||Xs,r=e.stringifyQuery||Zs,i=e.history,a=$s(),o=$s(),s=$s(),c=Ut(Fs),l=Fs;Vo&&e.scrollBehavior&&`scrollRestoration`in history&&(history.scrollRestoration=`manual`);let u=Wo.bind(null,e=>``+e),d=Wo.bind(null,Ss),f=Wo.bind(null,Cs);function p(e,n){let r,i;return Ys(e)?(r=t.getRecordMatcher(e),i=n):i=e,t.addRoute(i,r)}function m(e){let n=t.getRecordMatcher(e);n&&t.removeRoute(n)}function h(){return t.getRoutes().map(e=>e.record)}function g(e){return!!t.getRecordMatcher(e)}function _(e,a){if(a=Y({},a||c.value),typeof e==`string`){let r=Es(n,e,a.path),o=t.resolve({path:r.path},a),s=i.createHref(r.fullPath);return Y(r,o,{params:f(o.params),hash:Cs(r.hash),redirectedFrom:void 0,href:s})}let o;if(e.path!=null)o=Y({},e,{path:Es(n,e.path,a.path).path});else{let t=Y({},e.params);for(let e in t)t[e]??delete t[e];o=Y({},e,{params:d(t)}),a.params=d(a.params)}let s=t.resolve(o,a),l=e.hash||``;s.params=u(f(s.params));let p=Ds(r,Y({},e,{hash:vs(l),path:s.path})),m=i.createHref(p);return Y({fullPath:p,hash:l,query:r===Zs?Qs(e.query):e.query||{}},s,{redirectedFrom:void 0,href:m})}function v(e){return typeof e==`string`?Es(n,e,c.value.path):Y({},e)}function y(e,t){if(l!==e)return Jo(Z.NAVIGATION_CANCELLED,{from:t,to:e})}function b(e){return C(e)}function x(e){return b(Y(v(e),{replace:!0}))}function S(e,t){let n=e.matched[e.matched.length-1];if(n&&n.redirect){let{redirect:r}=n,i=typeof r==`function`?r(e,t):r;return typeof i==`string`&&(i=i.includes(`?`)||i.includes(`#`)?i=v(i):{path:i},i.params={}),Y({query:e.query,hash:e.hash,params:i.path==null?e.params:{}},i)}}function C(e,t){let n=l=_(e),i=c.value,a=e.state,o=e.force,s=e.replace===!0,u=S(n,i);if(u)return C(Y(v(u),{state:typeof u==`object`?Y({},a,u.state):a,force:o,replace:s}),t||n);let d=n;d.redirectedFrom=t;let f;return!o&&ks(r,i,n)&&(f=Jo(Z.NAVIGATION_DUPLICATED,{to:d,from:i}),se(i,i,!0,!1)),(f?Promise.resolve(f):te(d,i)).catch(e=>Yo(e)?Yo(e,Z.NAVIGATION_GUARD_REDIRECT)?e:oe(e):ae(e,d,i)).then(e=>{if(e){if(Yo(e,Z.NAVIGATION_GUARD_REDIRECT))return C(Y({replace:s},v(e.to),{state:typeof e.to==`object`?Y({},a,e.to.state):a,force:o}),t||d)}else e=T(d,i,!0,s,a);return ne(d,i,e),e})}function w(e,t){let n=y(e,t);return n?Promise.reject(n):Promise.resolve()}function ee(e){let t=ue.values().next().value;return t&&typeof t.runWithContext==`function`?t.runWithContext(e):e()}function te(e,t){let n,[r,i,s]=nc(e,t);n=tc(r.reverse(),`beforeRouteLeave`,e,t);for(let i of r)i.leaveGuards.forEach(r=>{n.push(ec(r,e,t))});let c=w.bind(null,e,t);return n.push(c),fe(n).then(()=>{n=[];for(let r of a.list())n.push(ec(r,e,t));return n.push(c),fe(n)}).then(()=>{n=tc(i,`beforeRouteUpdate`,e,t);for(let r of i)r.updateGuards.forEach(r=>{n.push(ec(r,e,t))});return n.push(c),fe(n)}).then(()=>{n=[];for(let r of s)if(r.beforeEnter){if(X(r.beforeEnter))for(let i of r.beforeEnter)n.push(ec(i,e,t));else n.push(ec(r.beforeEnter,e,t))}return n.push(c),fe(n)}).then(()=>(e.matched.forEach(e=>e.enterCallbacks={}),n=tc(s,`beforeRouteEnter`,e,t,ee),n.push(c),fe(n))).then(()=>{n=[];for(let r of o.list())n.push(ec(r,e,t));return n.push(c),fe(n)}).catch(e=>Yo(e,Z.NAVIGATION_CANCELLED)?e:Promise.reject(e))}function ne(e,t,n){s.list().forEach(r=>ee(()=>r(e,t,n)))}function T(e,t,n,r,a){let o=y(e,t);if(o)return o;let s=t===Fs,l=Vo?history.state:{};n&&(r||s?i.replace(e.fullPath,Y({scroll:s&&l&&l.scroll},a)):i.push(e.fullPath,a)),c.value=e,se(e,t,n,s),oe()}let re;function E(){re||=i.listen((e,t,n)=>{if(!de.listening)return;let r=_(e),a=S(r,de.currentRoute.value);if(a){C(Y(a,{replace:!0,force:!0}),r).catch(Go);return}l=r;let o=c.value;Vo&&Ks(Ws(o.fullPath,n.delta),Hs()),te(r,o).catch(e=>Yo(e,Z.NAVIGATION_ABORTED|Z.NAVIGATION_CANCELLED)?e:Yo(e,Z.NAVIGATION_GUARD_REDIRECT)?(C(Y(v(e.to),{force:!0}),r).then(e=>{Yo(e,Z.NAVIGATION_ABORTED|Z.NAVIGATION_DUPLICATED)&&!n.delta&&n.type===Is.pop&&i.go(-1,!1)}).catch(Go),Promise.reject()):(n.delta&&i.go(-n.delta,!1),ae(e,r,o))).then(e=>{e||=T(r,o,!1),e&&(n.delta&&!Yo(e,Z.NAVIGATION_CANCELLED)?i.go(-n.delta,!1):n.type===Is.pop&&Yo(e,Z.NAVIGATION_ABORTED|Z.NAVIGATION_DUPLICATED)&&i.go(-1,!1)),ne(r,o,e)}).catch(Go)})}let D=$s(),ie=$s(),O;function ae(e,t,n){oe(e);let r=ie.list();return r.length?r.forEach(r=>r(e,t,n)):console.error(e),Promise.reject(e)}function k(){return O&&c.value!==Fs?Promise.resolve():new Promise((e,t)=>{D.add([e,t])})}function oe(e){return O||(O=!e,E(),D.list().forEach(([t,n])=>e?n(e):t()),D.reset()),e}function se(t,n,r,i){let{scrollBehavior:a}=e;if(!Vo||!a)return Promise.resolve();let o=!r&&qs(Ws(t.fullPath,0))||(i||!r)&&history.state&&history.state.scroll||null;return mn().then(()=>a(t,n,o)).then(e=>e&&Us(e)).catch(e=>ae(e,t,n))}let ce=e=>i.go(e),le,ue=new Set,de={currentRoute:c,listening:!0,addRoute:p,removeRoute:m,clearRoutes:t.clearRoutes,hasRoute:g,getRoutes:h,resolve:_,options:e,push:b,replace:x,go:ce,back:()=>ce(-1),forward:()=>ce(1),beforeEach:a.add,beforeResolve:o.add,afterEach:s.add,onError:ie.add,isReady:k,install(e){e.component(`RouterLink`,Nc),e.component(`RouterView`,Bc),e.config.globalProperties.$router=de,Object.defineProperty(e.config.globalProperties,"$route",{enumerable:!0,get:()=>Kt(c)}),Vo&&!le&&c.value===Fs&&(le=!0,b(i.location).catch(e=>{}));let t={};for(let e in Fs)Object.defineProperty(t,e,{get:()=>c.value[e],enumerable:!0});e.provide(Qo,de),e.provide($o,Pt(t)),e.provide(es,c);let n=e.unmount;ue.add(e),e.unmount=function(){ue.delete(e),ue.size<1&&(l=Fs,re&&re(),re=null,c.value=Fs,le=!1,O=!1),n()}}};function fe(e){return e.reduce((e,t)=>e.then(()=>ee(t)),Promise.resolve())}return de}var Hc={key:0,class:`topbar`},Uc={class:`nav-links`,"aria-label":`主导航`},Wc=Rn({__name:`App`,setup(e){let t=ns(),n=J(()=>t.path===`/login`),r=e=>t.path===e;return(e,t)=>{let i=lr(`router-view`);return Ai(),Fi(Ti,null,[n.value?Ki(``,!0):(Ai(),Fi(`header`,Hc,[t[0]||=G(`a`,{class:`brand`,href:`#`},[G(`span`,{class:`brand-mark`},[G(`svg`,{viewBox:`0 0 24 24`,"aria-hidden":`true`},[G(`path`,{d:`M21 7.5a6.6 6.6 0 0 1-8.8 6.2L6.2 19.7a2.1 2.1 0 0 1-3-3l6-6A6.6 6.6 0 0 1 15.5 3l-2.7 2.7 1.5 1.5L17 4.5A6.6 6.6 0 0 1 21 7.5Z`})])]),G(`span`,null,`天泽汽修`)],-1),G(`nav`,Uc,[G(`a`,{class:A({active:r(`/main`)}),href:`/main`},`首页`,2),G(`a`,{class:A({active:r(`/maintenance`)}),href:`/maintenance`},`车辆保养`,2),G(`a`,{class:A({active:r(`/bill`)}),href:`/bill`},`维修服务`,2),G(`a`,{class:A({active:r(`/contact`)}),href:`/contact`},`联系我们`,2)]),t[1]||=Gi(`
泽
在线客服
`,1)])),K(i)],64)}}}),Gc=(e,t)=>{let n=e.__vccOpts||e;for(let[e,r]of t)n[e]=r;return n},Kc=Gc(Wc,[[`__scopeId`,`data-v-640de8cc`]]),qc={},Jc={class:`workshop-page`};function Yc(e,t){return Ai(),Fi(`main`,Jc,[...t[0]||=[Gi(`

专业服务 · 品质保障 · 贴心陪伴

爱车养护,就到天泽汽修 🚗

专注每一次检修,让您的每一段旅程都安心无忧。

机油更换

70天
OK

累计服务年限

15年
专业沉淀

技师团队

28位
经验丰富

客户好评率

99.2%
口碑之选

热门服务项目

为您的爱车提供全方位呵护

查看全部 →
B
常规保养

更换机油、机滤,全面检查车辆状态

热 门
A
空调清洗

深度清洁空调系统,清新车内空气

推荐
T
安全检测

刹车、轮胎、灯光等 32 项专业检查

安心
V
轮胎服务

轮胎检测、换位及动平衡服务

专业

便捷服务

轻松预约您的爱车服务

!
首次到店礼遇

新客户到店即可领取免费安全检测,提前预约还可享专属优惠。

立即预约 →
`,1)]])}var Xc=Gc(qc,[[`render`,Yc]]),Zc={class:`login-page`},Qc={class:`form-panel`},$c={class:`login-card`},el=[`disabled`],tl=Rn({__name:`index`,setup(e){let t=ts(),n=Ht({phone:``,password:``,remember:!1}),r=Ht(!1);async function i(){r.value=!0;try{await new Promise(e=>setTimeout(e,1e3)),alert(`登录成功!手机号:${n.value.phone}`),t.push(`/main`)}catch(e){console.error(`登录失败`,e)}finally{r.value=!1}}return(e,t)=>(Ai(),Fi(`main`,Zc,[t[4]||=Gi(`
天泽汽修

专业 · 安心 · 值得信赖

让每一次出发
都安心无忧

一站式汽车维修保养服务,专业技师为您的爱车提供贴心呵护。

专业技师团队原厂品质配件透明服务价格
`,1),G(`section`,Qc,[G(`div`,$c,[t[1]||=Gi(`
天泽汽修

欢迎回来

登录后即可查看您的车辆服务记录

`,2),G(`form`,{class:`login-form`,onSubmit:ao(i,[`prevent`])},[t[0]||=Gi(`
忘记密码?
`,5),G(`button`,{disabled:r.value,type:`submit`,class:`login-button`},be(r.value?`登录中...`:`登录`),9,el)],32),t[2]||=Gi(`

还没有账号?立即注册

`,2)]),t[3]||=G(`p`,{class:`copyright`},`© 2024 天泽汽修 · 用心服务每一位车主`,-1)])]))}}),nl={class:`bill-page`},rl={class:`page-header`},il={class:`bill-count`},al={class:`bill-list`,"aria-label":`账单列表`},ol={class:`bill-info`},sl={class:`bill-title`},cl={class:`bill-time`},ll={key:0,class:`list-status`},ul={key:1,class:`list-status`},dl={key:2,class:`list-status`},fl=20,pl=Gc({__name:`index`,setup(e){let t=Ht([]),n=Ht(0),r=Ht(1),i=Ht(!1),a=Ht(!1),o=Ht(null),s;async function c(e){return{list:[],total:0}}async function l(e=!1){if(!(i.value||!e&&a.value)){e&&(r.value=1,a.value=!1,t.value=[]),i.value=!0;try{let i=await c({page:r.value,pageSize:fl}),o=i?.list||[];t.value=e?o:t.value.concat(o),n.value=i?.total??t.value.length,a.value=o.length=n.value,a.value||(r.value+=1)}catch(e){console.error(`获取账单失败`,e)}finally{i.value=!1}}}function u(e){return Number(e||0).toFixed(2)}return $n(async()=>{await l(),await mn(),s=new IntersectionObserver(([e])=>e.isIntersecting&&l(),{rootMargin:`120px 0px`}),o.value&&s.observe(o.value)}),nr(()=>s?.disconnect()),(e,r)=>(Ai(),Fi(`main`,nl,[G(`header`,rl,[r[0]||=G(`h1`,null,`我的账单`,-1),G(`span`,il,`共 `+be(n.value)+` 笔`,1)]),G(`section`,al,[(Ai(!0),Fi(Ti,null,pr(t.value,e=>(Ai(),Fi(`article`,{key:e.id,class:`bill-item`},[G(`div`,{class:A([`bill-icon`,e.type])},be(e.type===`income`?`收`:`支`),3),G(`div`,ol,[G(`div`,sl,be(e.title||`账单`),1),G(`div`,cl,be(e.time),1)]),G(`div`,{class:A([`bill-amount`,e.type])},be(e.type===`income`?`+`:`-`)+be(u(e.amount)),3)]))),128)),i.value?(Ai(),Fi(`div`,ll,`正在加载...`)):t.value.length?a.value?(Ai(),Fi(`div`,dl,`没有更多账单了`)):Ki(``,!0):(Ai(),Fi(`div`,ul,`暂无账单`)),G(`div`,{ref_key:`loadMoreTarget`,ref:o,class:`load-more-target`,"aria-hidden":`true`},null,512)])]))}},[[`__scopeId`,`data-v-c010ae6f`]]),ml=Vc({history:cc(`/`),routes:[{path:`/main`,name:`main`,component:Xc},{path:`/login`,name:`login`,component:tl},{path:`/bill`,name:`bill`,component:pl},{path:`/`,redirect:`/login`},{path:`/:pathMatch(.*)*`,redirect:`/main`}]}),hl=lo(Kc),gl=Oo();gl.use(Bo),hl.use(gl),hl.use(ml),hl.mount(`#app`); \ No newline at end of file diff --git a/dist/assets/index-CSK-HUY0.js b/dist/assets/index-CSK-HUY0.js new file mode 100644 index 0000000..8889b64 --- /dev/null +++ b/dist/assets/index-CSK-HUY0.js @@ -0,0 +1,17 @@ +var e=Object.defineProperty,t=(t,n)=>{let r={};for(var i in t)e(r,i,{get:t[i],enumerable:!0});return n||e(r,Symbol.toStringTag,{value:`Module`}),r};(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),t.credentials=e.crossOrigin===`use-credentials`?`include`:e.crossOrigin===`anonymous`?`omit`:`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();function n(e){let t=Object.create(null);for(let n of e.split(`,`))t[n]=1;return e=>e in t}var r={},i=[],a=()=>{},o=()=>!1,s=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),c=e=>e.startsWith(`onUpdate:`),l=Object.assign,u=(e,t)=>{let n=e.indexOf(t);n>-1&&e.splice(n,1)},d=Object.prototype.hasOwnProperty,f=(e,t)=>d.call(e,t),p=Array.isArray,m=e=>C(e)===`[object Map]`,h=e=>C(e)===`[object Set]`,g=e=>C(e)===`[object Date]`,_=e=>typeof e==`function`,v=e=>typeof e==`string`,y=e=>typeof e==`symbol`,b=e=>typeof e==`object`&&!!e,x=e=>(b(e)||_(e))&&_(e.then)&&_(e.catch),S=Object.prototype.toString,C=e=>S.call(e),ee=e=>C(e).slice(8,-1),te=e=>C(e)===`[object Object]`,w=e=>v(e)&&e!==`NaN`&&e[0]!==`-`&&``+parseInt(e,10)===e,ne=n(`,key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted`),re=e=>{let t=Object.create(null);return(n=>t[n]||(t[n]=e(n)))},ie=/-\w/g,T=re(e=>e.replace(ie,e=>e.slice(1).toUpperCase())),ae=/\B([A-Z])/g,oe=re(e=>e.replace(ae,`-$1`).toLowerCase()),E=re(e=>e.charAt(0).toUpperCase()+e.slice(1)),D=re(e=>e?`on${E(e)}`:``),O=(e,t)=>!Object.is(e,t),se=(e,...t)=>{for(let n=0;n{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:r,value:n})},le=e=>{let t=parseFloat(e);return isNaN(t)?e:t},ue,de=()=>ue||=typeof globalThis<`u`?globalThis:typeof self<`u`?self:typeof window<`u`?window:typeof global<`u`?global:{};function fe(e){if(p(e)){let t={};for(let n=0;n{if(e){let n=e.split(me);n.length>1&&(t[n[0].trim()]=n[1].trim())}}),t}function A(e){let t=``;if(v(e))t=e;else if(p(e))for(let n=0;nbe(e,t))}var Se=e=>!!(e&&e.__v_isRef===!0),j=e=>v(e)?e:e==null?``:p(e)||b(e)&&(e.toString===S||!_(e.toString))?Se(e)?j(e.value):JSON.stringify(e,Ce,2):String(e),Ce=(e,t)=>Se(t)?Ce(e,t.value):m(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((e,[t,n],r)=>(e[we(t,r)+` =>`]=n,e),{})}:h(t)?{[`Set(${t.size})`]:[...t.values()].map(e=>we(e))}:y(t)?we(t):b(t)&&!p(t)&&!te(t)?String(t):t,we=(e,t=``)=>y(e)?`Symbol(${e.description??t})`:e,M,Te=class{constructor(e=!1){this.detached=e,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.__v_skip=!0,this.parent=M,!e&&M&&(this.index=(M.scopes||(M.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let e,t;if(this.scopes)for(e=0,t=this.scopes.length;e0&&--this._on===0&&(M=this.prevScope,this.prevScope=void 0)}stop(e){if(this._active){this._active=!1;let t,n;for(t=0,n=this.effects.length;t0)return;if(Ne){let e=Ne;for(Ne=void 0;e;){let t=e.next;e.next=void 0,e.flags&=-9,e=t}}let e;for(;Me;){let t=Me;for(Me=void 0;t;){let n=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(t){e||=t}t=n}}if(e)throw e}function Le(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function Re(e){let t,n=e.depsTail,r=n;for(;r;){let e=r.prevDep;r.version===-1?(r===n&&(n=e),Ve(r),He(r)):t=r,r.dep.activeLink=r.prevActiveLink,r.prevActiveLink=void 0,r=e}e.deps=t,e.depsTail=n}function ze(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(Be(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function Be(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===Je)||(e.globalVersion=Je,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!ze(e))))return;e.flags|=2;let t=e.dep,n=N,r=Ue;N=e,Ue=!0;try{Le(e);let n=e.fn(e._value);(t.version===0||O(n,e._value))&&(e.flags|=128,e._value=n,t.version++)}catch(e){throw t.version++,e}finally{N=n,Ue=r,Re(e),e.flags&=-3}}function Ve(e,t=!1){let{dep:n,prevSub:r,nextSub:i}=e;if(r&&(r.nextSub=i,e.prevSub=void 0),i&&(i.prevSub=r,e.nextSub=void 0),n.subs===e&&(n.subs=r,!r&&n.computed)){n.computed.flags&=-5;for(let e=n.computed.deps;e;e=e.nextDep)Ve(e,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function He(e){let{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}var Ue=!0,We=[];function Ge(){We.push(Ue),Ue=!1}function Ke(){let e=We.pop();Ue=e===void 0||e}function qe(e){let{cleanup:t}=e;if(e.cleanup=void 0,t){let e=N;N=void 0;try{t()}finally{N=e}}}var Je=0,Ye=class{constructor(e,t){this.sub=e,this.dep=t,this.version=t.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}},Xe=class{constructor(e){this.computed=e,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(e){if(!N||!Ue||N===this.computed)return;let t=this.activeLink;if(t===void 0||t.sub!==N)t=this.activeLink=new Ye(N,this),N.deps?(t.prevDep=N.depsTail,N.depsTail.nextDep=t,N.depsTail=t):N.deps=N.depsTail=t,Ze(t);else if(t.version===-1&&(t.version=this.version,t.nextDep)){let e=t.nextDep;e.prevDep=t.prevDep,t.prevDep&&(t.prevDep.nextDep=e),t.prevDep=N.depsTail,t.nextDep=void 0,N.depsTail.nextDep=t,N.depsTail=t,N.deps===t&&(N.deps=e)}return t}trigger(e){this.version++,Je++,this.notify(e)}notify(e){Fe();try{for(let e=this.subs;e;e=e.prevSub)e.sub.notify()&&e.sub.dep.notify()}finally{Ie()}}};function Ze(e){if(e.dep.sc++,e.sub.flags&4){let t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let e=t.deps;e;e=e.nextDep)Ze(e)}let n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}var Qe=new WeakMap,$e=Symbol(``),et=Symbol(``),tt=Symbol(``);function P(e,t,n){if(Ue&&N){let t=Qe.get(e);t||Qe.set(e,t=new Map);let r=t.get(n);r||(t.set(n,r=new Xe),r.map=t,r.key=n),r.track()}}function nt(e,t,n,r,i,a){let o=Qe.get(e);if(!o){Je++;return}let s=e=>{e&&e.trigger()};if(Fe(),t===`clear`)o.forEach(s);else{let i=p(e),a=i&&w(n);if(i&&n===`length`){let e=Number(r);o.forEach((t,n)=>{(n===`length`||n===tt||!y(n)&&n>=e)&&s(t)})}else switch((n!==void 0||o.has(void 0))&&s(o.get(n)),a&&s(o.get(tt)),t){case`add`:i?a&&s(o.get(`length`)):(s(o.get($e)),m(e)&&s(o.get(et)));break;case`delete`:i||(s(o.get($e)),m(e)&&s(o.get(et)));break;case`set`:m(e)&&s(o.get($e))}}Ie()}function rt(e,t){let n=Qe.get(e);return n&&n.get(t)}function it(e){let t=F(e);return t===e?t:(P(t,`iterate`,tt),Wt(e)?t:t.map(qt))}function at(e){return P(e=F(e),`iterate`,tt),e}function ot(e,t){return Ut(e)?Jt(Ht(e)?qt(t):t):qt(t)}var st={__proto__:null,[Symbol.iterator](){return ct(this,Symbol.iterator,e=>ot(this,e))},concat(...e){return it(this).concat(...e.map(e=>p(e)?it(e):e))},entries(){return ct(this,`entries`,e=>(e[1]=ot(this,e[1]),e))},every(e,t){return ut(this,`every`,e,t,void 0,arguments)},filter(e,t){return ut(this,`filter`,e,t,e=>e.map(e=>ot(this,e)),arguments)},find(e,t){return ut(this,`find`,e,t,e=>ot(this,e),arguments)},findIndex(e,t){return ut(this,`findIndex`,e,t,void 0,arguments)},findLast(e,t){return ut(this,`findLast`,e,t,e=>ot(this,e),arguments)},findLastIndex(e,t){return ut(this,`findLastIndex`,e,t,void 0,arguments)},forEach(e,t){return ut(this,`forEach`,e,t,void 0,arguments)},includes(...e){return ft(this,`includes`,e)},indexOf(...e){return ft(this,`indexOf`,e)},join(e){return it(this).join(e)},lastIndexOf(...e){return ft(this,`lastIndexOf`,e)},map(e,t){return ut(this,`map`,e,t,void 0,arguments)},pop(){return pt(this,`pop`)},push(...e){return pt(this,`push`,e)},reduce(e,...t){return dt(this,`reduce`,e,t)},reduceRight(e,...t){return dt(this,`reduceRight`,e,t)},shift(){return pt(this,`shift`)},some(e,t){return ut(this,`some`,e,t,void 0,arguments)},splice(...e){return pt(this,`splice`,e)},toReversed(){return it(this).toReversed()},toSorted(e){return it(this).toSorted(e)},toSpliced(...e){return it(this).toSpliced(...e)},unshift(...e){return pt(this,`unshift`,e)},values(){return ct(this,`values`,e=>ot(this,e))}};function ct(e,t,n){let r=at(e),i=r[t]();return r!==e&&!Wt(e)&&(i._next=i.next,i.next=()=>{let e=i._next();return e.done||(e.value=n(e.value)),e}),i}var lt=Array.prototype;function ut(e,t,n,r,i,a){let o=at(e),s=o!==e&&!Wt(e),c=o[t];if(c!==lt[t]){let t=c.apply(e,a);return s?qt(t):t}let l=n;o!==e&&(s?l=function(t,r){return n.call(this,ot(e,t),r,e)}:n.length>2&&(l=function(t,r){return n.call(this,t,r,e)}));let u=c.call(o,l,r);return s&&i?i(u):u}function dt(e,t,n,r){let i=at(e),a=i!==e&&!Wt(e),o=n,s=!1;i!==e&&(a?(s=r.length===0,o=function(t,r,i){return s&&(s=!1,t=ot(e,t)),n.call(this,t,ot(e,r),i,e)}):n.length>3&&(o=function(t,r,i){return n.call(this,t,r,i,e)}));let c=i[t](o,...r);return s?ot(e,c):c}function ft(e,t,n){let r=F(e);P(r,`iterate`,tt);let i=r[t](...n);return(i===-1||i===!1)&&Gt(n[0])?(n[0]=F(n[0]),r[t](...n)):i}function pt(e,t,n=[]){Ge(),Fe();let r=F(e)[t].apply(e,n);return Ie(),Ke(),r}var mt=n(`__proto__,__v_isRef,__isVue`),ht=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!==`arguments`&&e!==`caller`).map(e=>Symbol[e]).filter(y));function gt(e){y(e)||(e=String(e));let t=F(this);return P(t,`has`,e),t.hasOwnProperty(e)}var _t=class{constructor(e=!1,t=!1){this._isReadonly=e,this._isShallow=t}get(e,t,n){if(t===`__v_skip`)return e.__v_skip;let r=this._isReadonly,i=this._isShallow;if(t===`__v_isReactive`)return!r;if(t===`__v_isReadonly`)return r;if(t===`__v_isShallow`)return i;if(t===`__v_raw`)return n===(r?i?Ft:Pt:i?Nt:Mt).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(n)?e:void 0;let a=p(e);if(!r){let e;if(a&&(e=st[t]))return e;if(t===`hasOwnProperty`)return gt}let o=Reflect.get(e,t,I(e)?e:n);if((y(t)?ht.has(t):mt(t))||(r||P(e,`get`,t),i))return o;if(I(o)){let e=a&&w(t)?o:o.value;return r&&b(e)?Bt(e):e}return b(o)?r?Bt(o):Rt(o):o}},vt=class extends _t{constructor(e=!1){super(!1,e)}set(e,t,n,r){let i=e[t],a=p(e)&&w(t);if(!this._isShallow){let e=Ut(i);if(!Wt(n)&&!Ut(n)&&(i=F(i),n=F(n)),!a&&I(i)&&!I(n))return e||(i.value=n),!0}let o=a?Number(t)e,wt=e=>Reflect.getPrototypeOf(e);function Tt(e,t,n){return function(...r){let i=this.__v_raw,a=F(i),o=m(a),s=e===`entries`||e===Symbol.iterator&&o,c=e===`keys`&&o,u=i[e](...r),d=n?Ct:t?Jt:qt;return!t&&P(a,`iterate`,c?et:$e),l(Object.create(u),{next(){let{value:e,done:t}=u.next();return t?{value:e,done:t}:{value:s?[d(e[0]),d(e[1])]:d(e),done:t}}})}}function Et(e){return function(...t){return e===`delete`?!1:e===`clear`?void 0:this}}function Dt(e,t){let n={get(n){let r=this.__v_raw,i=F(r),a=F(n);e||(O(n,a)&&P(i,`get`,n),P(i,`get`,a));let{has:o}=wt(i),s=t?Ct:e?Jt:qt;if(o.call(i,n))return s(r.get(n));if(o.call(i,a))return s(r.get(a));r!==i&&r.get(n)},get size(){let t=this.__v_raw;return!e&&P(F(t),`iterate`,$e),t.size},has(t){let n=this.__v_raw,r=F(n),i=F(t);return e||(O(t,i)&&P(r,`has`,t),P(r,`has`,i)),t===i?n.has(t):n.has(t)||n.has(i)},forEach(n,r){let i=this,a=i.__v_raw,o=F(a),s=t?Ct:e?Jt:qt;return!e&&P(o,`iterate`,$e),a.forEach((e,t)=>n.call(r,s(e),s(t),i))}};return l(n,e?{add:Et(`add`),set:Et(`set`),delete:Et(`delete`),clear:Et(`clear`)}:{add(e){let n=F(this),r=wt(n),i=F(e),a=!t&&!Wt(e)&&!Ut(e)?i:e;return r.has.call(n,a)||O(e,a)&&r.has.call(n,e)||O(i,a)&&r.has.call(n,i)||(n.add(a),nt(n,`add`,a,a)),this},set(e,n){!t&&!Wt(n)&&!Ut(n)&&(n=F(n));let r=F(this),{has:i,get:a}=wt(r),o=i.call(r,e);o||=(e=F(e),i.call(r,e));let s=a.call(r,e);return r.set(e,n),o?O(n,s)&&nt(r,`set`,e,n,s):nt(r,`add`,e,n),this},delete(e){let t=F(this),{has:n,get:r}=wt(t),i=n.call(t,e);i||=(e=F(e),n.call(t,e));let a=r?r.call(t,e):void 0,o=t.delete(e);return i&&nt(t,`delete`,e,void 0,a),o},clear(){let e=F(this),t=e.size!==0,n=e.clear();return t&&nt(e,`clear`,void 0,void 0,void 0),n}}),[`keys`,`values`,`entries`,Symbol.iterator].forEach(r=>{n[r]=Tt(r,e,t)}),n}function Ot(e,t){let n=Dt(e,t);return(t,r,i)=>r===`__v_isReactive`?!e:r===`__v_isReadonly`?e:r===`__v_raw`?t:Reflect.get(f(n,r)&&r in t?n:t,r,i)}var kt={get:Ot(!1,!1)},At={get:Ot(!1,!0)},jt={get:Ot(!0,!1)},Mt=new WeakMap,Nt=new WeakMap,Pt=new WeakMap,Ft=new WeakMap;function It(e){switch(e){case`Object`:case`Array`:return 1;case`Map`:case`Set`:case`WeakMap`:case`WeakSet`:return 2;default:return 0}}function Lt(e){return e.__v_skip||!Object.isExtensible(e)?0:It(ee(e))}function Rt(e){return Ut(e)?e:Vt(e,!1,bt,kt,Mt)}function zt(e){return Vt(e,!1,St,At,Nt)}function Bt(e){return Vt(e,!0,xt,jt,Pt)}function Vt(e,t,n,r,i){if(!b(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;let a=Lt(e);if(a===0)return e;let o=i.get(e);if(o)return o;let s=new Proxy(e,a===2?r:n);return i.set(e,s),s}function Ht(e){return Ut(e)?Ht(e.__v_raw):!!(e&&e.__v_isReactive)}function Ut(e){return!!(e&&e.__v_isReadonly)}function Wt(e){return!!(e&&e.__v_isShallow)}function Gt(e){return e?!!e.__v_raw:!1}function F(e){let t=e&&e.__v_raw;return t?F(t):e}function Kt(e){return!f(e,`__v_skip`)&&Object.isExtensible(e)&&ce(e,`__v_skip`,!0),e}var qt=e=>b(e)?Rt(e):e,Jt=e=>b(e)?Bt(e):e;function I(e){return e?e.__v_isRef===!0:!1}function L(e){return Xt(e,!1)}function Yt(e){return Xt(e,!0)}function Xt(e,t){return I(e)?e:new Zt(e,t)}var Zt=class{constructor(e,t){this.dep=new Xe,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=t?e:F(e),this._value=t?e:qt(e),this.__v_isShallow=t}get value(){return this.dep.track(),this._value}set value(e){let t=this._rawValue,n=this.__v_isShallow||Wt(e)||Ut(e);e=n?e:F(e),O(e,t)&&(this._rawValue=e,this._value=n?e:qt(e),this.dep.trigger())}};function Qt(e){return I(e)?e.value:e}var $t={get:(e,t,n)=>t===`__v_raw`?e:Qt(Reflect.get(e,t,n)),set:(e,t,n,r)=>{let i=e[t];return I(i)&&!I(n)?(i.value=n,!0):Reflect.set(e,t,n,r)}};function en(e){return Ht(e)?e:new Proxy(e,$t)}function tn(e){let t=p(e)?Array(e.length):{};for(let n in e)t[n]=rn(e,n);return t}var nn=class{constructor(e,t,n){this._object=e,this._key=t,this._defaultValue=n,this.__v_isRef=!0,this._value=void 0,this._raw=F(e);let r=!0,i=e;if(!p(e)||!w(String(t)))do r=!Gt(i)||Wt(i);while(r&&(i=i.__v_raw));this._shallow=r}get value(){let e=this._object[this._key];return this._shallow&&(e=Qt(e)),this._value=e===void 0?this._defaultValue:e}set value(e){if(this._shallow&&I(this._raw[this._key])){let t=this._object[this._key];if(I(t)){t.value=e;return}}this._object[this._key]=e}get dep(){return rt(this._raw,this._key)}};function rn(e,t,n){return new nn(e,t,n)}var an=class{constructor(e,t,n){this.fn=e,this.setter=t,this._value=void 0,this.dep=new Xe(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=Je-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!t,this.isSSR=n}notify(){if(this.flags|=16,!(this.flags&8)&&N!==this)return Pe(this,!0),!0}get value(){let e=this.dep.track();return Be(this),e&&(e.version=this.dep.version),this._value}set value(e){this.setter&&this.setter(e)}};function on(e,t,n=!1){let r,i;return _(e)?r=e:(r=e.get,i=e.set),new an(r,i,n)}var sn={},cn=new WeakMap,ln=void 0;function un(e,t=!1,n=ln){if(n){let t=cn.get(n);t||cn.set(n,t=[]),t.push(e)}}function dn(e,t,n=r){let{immediate:i,deep:o,once:s,scheduler:c,augmentJob:l,call:d}=n,f=e=>o?e:Wt(e)||o===!1||o===0?fn(e,1):fn(e),m,h,g,v,y=!1,b=!1;if(I(e)?(h=()=>e.value,y=Wt(e)):Ht(e)?(h=()=>f(e),y=!0):p(e)?(b=!0,y=e.some(e=>Ht(e)||Wt(e)),h=()=>e.map(e=>{if(I(e))return e.value;if(Ht(e))return f(e);if(_(e))return d?d(e,2):e()})):h=_(e)?t?d?()=>d(e,2):e:()=>{if(g){Ge();try{g()}finally{Ke()}}let t=ln;ln=m;try{return d?d(e,3,[v]):e(v)}finally{ln=t}}:a,t&&o){let e=h,t=o===!0?1/0:o;h=()=>fn(e(),t)}let x=De(),S=()=>{m.stop(),x&&x.active&&u(x.effects,m)};if(s&&t){let e=t;t=(...t)=>{e(...t),S()}}let C=b?Array(e.length).fill(sn):sn,ee=e=>{if(!(!(m.flags&1)||!m.dirty&&!e)){if(t){let e=m.run();if(o||y||(b?e.some((e,t)=>O(e,C[t])):O(e,C))){g&&g();let n=ln;ln=m;try{let n=[e,C===sn?void 0:b&&C[0]===sn?[]:C,v];C=e,d?d(t,3,n):t(...n)}finally{ln=n}}}else m.run()}};return l&&l(ee),m=new Ae(h),m.scheduler=c?()=>c(ee,!1):ee,v=e=>un(e,!1,m),g=m.onStop=()=>{let e=cn.get(m);if(e){if(d)d(e,4);else for(let t of e)t();cn.delete(m)}},t?i?ee(!0):C=m.run():c?c(ee.bind(null,!0),!0):m.run(),S.pause=m.pause.bind(m),S.resume=m.resume.bind(m),S.stop=S,S}function fn(e,t=1/0,n){if(t<=0||!b(e)||e.__v_skip||(n||=new Map,(n.get(e)||0)>=t))return e;if(n.set(e,t),t--,I(e))fn(e.value,t,n);else if(p(e))for(let r=0;r{fn(e,t,n)});else if(te(e)){for(let r in e)fn(e[r],t,n);for(let r of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,r)&&fn(e[r],t,n)}return e}function pn(e,t,n,r){try{return r?e(...r):e()}catch(e){hn(e,t,n)}}function mn(e,t,n,r){if(_(e)){let i=pn(e,t,n,r);return i&&x(i)&&i.catch(e=>{hn(e,t,n)}),i}if(p(e)){let i=[];for(let a=0;a>>1,i=_n[r],a=jn(i);a=jn(n)?_n.push(e):_n.splice(Tn(t),0,e),e.flags|=1,Dn()}}function Dn(){Cn||=Sn.then(Mn)}function On(e){p(e)?yn.push(...e):bn&&e.id===-1?bn.splice(xn+1,0,e):e.flags&1||(yn.push(e),e.flags|=1),Dn()}function kn(e,t,n=vn+1){for(;n<_n.length;n++){let t=_n[n];if(t&&t.flags&2){if(e&&t.id!==e.uid)continue;_n.splice(n,1),n--,t.flags&4&&(t.flags&=-2),t(),t.flags&4||(t.flags&=-2)}}}function An(e){if(yn.length){let e=[...new Set(yn)].sort((e,t)=>jn(e)-jn(t));if(yn.length=0,bn){bn.push(...e);return}for(bn=e,xn=0;xne.id==null?e.flags&2?-1:1/0:e.id;function Mn(e){try{for(vn=0;vn<_n.length;vn++){let e=_n[vn];e&&!(e.flags&8)&&(e.flags&4&&(e.flags&=-2),pn(e,e.i,e.i?15:14),e.flags&4||(e.flags&=-2))}}finally{for(;vn<_n.length;vn++){let e=_n[vn];e&&(e.flags&=-2)}vn=-1,_n.length=0,An(e),Cn=null,(_n.length||yn.length)&&Mn(e)}}var Nn=null,Pn=null;function Fn(e){let t=Nn;return Nn=e,Pn=e&&e.type.__scopeId||null,t}function In(e,t=Nn,n){if(!t||e._n)return e;let r=(...n)=>{r._d&&qi(-1);let i=Fn(t),a;try{a=e(...n)}finally{Fn(i),r._d&&qi(1)}return a};return r._n=!0,r._c=!0,r._d=!0,r}function Ln(e,t){if(Nn===null)return e;let n=Oa(Nn),i=e.dirs||=[];for(let e=0;e1)return n&&_(t)?t.call(r&&r.proxy):t}}function Vn(){return!!(ha()||Xr)}var Hn=Symbol.for(`v-scx`),Un=()=>Bn(Hn);function Wn(e,t,n){return Gn(e,t,n)}function Gn(e,t,n=r){let{immediate:i,deep:o,flush:s,once:c}=n,u=l({},n),d=t&&i||!t&&s!==`post`,f;if(xa){if(s===`sync`){let e=Un();f=e.__watcherHandles||=[]}else if(!d){let e=()=>{};return e.stop=a,e.resume=a,e.pause=a,e}}let p=U;u.call=(e,t,n)=>mn(e,p,t,n);let m=!1;s===`post`?u.scheduler=e=>{Di(e,p&&p.suspense)}:s!==`sync`&&(m=!0,u.scheduler=(e,t)=>{t?e():En(e)}),u.augmentJob=e=>{t&&(e.flags|=4),m&&(e.flags|=2,p&&(e.id=p.uid,e.i=p))};let h=dn(e,t,u);return xa&&(f?f.push(h):d&&h()),h}function Kn(e,t,n){let r=this.proxy,i=v(e)?e.includes(`.`)?qn(r,e):()=>r[e]:e.bind(r,r),a;_(t)?a=t:(a=t.handler,n=t);let o=va(this),s=Gn(i,a.bind(r),n);return o(),s}function qn(e,t){let n=t.split(`.`);return()=>{let t=e;for(let e=0;ee.__isTeleport,Xn=Symbol(`_leaveCb`);function Zn(e,t){e.shapeFlag&6&&e.component?(e.transition=t,Zn(e.component.subTree,t)):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function Qn(e,t){return _(e)?l({name:e.name},t,{setup:e}):e}function $n(e){e.ids=[e.ids[0]+e.ids[2]+++`-`,0,0]}function er(e,t){let n;return!!((n=Object.getOwnPropertyDescriptor(e,t))&&!n.configurable)}var tr=new WeakMap;function nr(e,t,n,i,a=!1){if(p(e)){e.forEach((e,r)=>nr(e,t&&(p(t)?t[r]:t),n,i,a));return}if(ir(i)&&!a){i.shapeFlag&512&&i.type.__asyncResolved&&i.component.subTree.component&&nr(e,t,n,i.component.subTree);return}let s=i.shapeFlag&4?Oa(i.component):i.el,c=a?null:s,{i:l,r:d}=e,m=t&&t.r,h=l.refs===r?l.refs={}:l.refs,g=l.setupState,y=F(g),b=g===r?o:e=>!er(h,e)&&f(y,e),x=(e,t)=>!(t&&er(h,t));if(m!=null&&m!==d){if(rr(t),v(m))h[m]=null,b(m)&&(g[m]=null);else if(I(m)){let e=t;x(m,e.k)&&(m.value=null),e.k&&(h[e.k]=null)}}if(_(d))pn(d,l,12,[c,h]);else{let t=v(d),r=I(d);if(t||r){let i=()=>{if(e.f){let n=t?b(d)?g[d]:h[d]:x(d)||!e.k?d.value:h[e.k];if(a)p(n)&&u(n,s);else if(p(n))n.includes(s)||n.push(s);else if(t)h[d]=[s],b(d)&&(g[d]=h[d]);else{let t=[s];x(d,e.k)&&(d.value=t),e.k&&(h[e.k]=t)}}else t?(h[d]=c,b(d)&&(g[d]=c)):r&&(x(d,e.k)&&(d.value=c),e.k&&(h[e.k]=c))};if(c){let t=()=>{i(),tr.delete(e)};t.id=-1,tr.set(e,t),Di(t,n)}else rr(e),i()}}}function rr(e){let t=tr.get(e);t&&(t.flags|=8,tr.delete(e))}de().requestIdleCallback,de().cancelIdleCallback;var ir=e=>!!e.type.__asyncLoader,ar=e=>e.type.__isKeepAlive;function or(e,t){cr(e,`a`,t)}function sr(e,t){cr(e,`da`,t)}function cr(e,t,n=U){let r=e.__wdc||=()=>{let t=n;for(;t;){if(t.isDeactivated)return;t=t.parent}return e()};if(ur(t,r,n),n){let e=n.parent;for(;e&&e.parent;)ar(e.parent.vnode)&&lr(r,t,n,e),e=e.parent}}function lr(e,t,n,r){let i=ur(t,e,r,!0);_r(()=>{u(r[t],i)},n)}function ur(e,t,n=U,r=!1){if(n){let i=n[e]||(n[e]=[]),a=t.__weh||=(...r)=>{Ge();let i=va(n),a=mn(t,n,e,r);return i(),Ke(),a};return r?i.unshift(a):i.push(a),a}}var dr=e=>(t,n=U)=>{(!xa||e===`sp`)&&ur(e,(...e)=>t(...e),n)},fr=dr(`bm`),pr=dr(`m`),mr=dr(`bu`),hr=dr(`u`),gr=dr(`bum`),_r=dr(`um`),vr=dr(`sp`),yr=dr(`rtg`),br=dr(`rtc`);function xr(e,t=U){ur(`ec`,e,t)}var Sr=`components`;function Cr(e,t){return Tr(Sr,e,!0,t)||e}var wr=Symbol.for(`v-ndc`);function Tr(e,t,n=!0,r=!1){let i=Nn||U;if(i){let n=i.type;if(e===Sr){let e=ka(n,!1);if(e&&(e===t||e===T(t)||e===E(T(t))))return n}let a=Er(i[e]||n[e],t)||Er(i.appContext[e],t);return!a&&r?n:a}}function Er(e,t){return e&&(e[t]||e[T(t)]||e[E(T(t))])}function Dr(e,t,n,r){let i,a=n&&n[r],o=p(e);if(o||v(e)){let n=o&&Ht(e),r=!1,s=!1;n&&(r=!Wt(e),s=Ut(e),e=at(e)),i=Array(e.length);for(let n=0,o=e.length;nt(e,n,void 0,a&&a[n]));else{let n=Object.keys(e);i=Array(n.length);for(let r=0,o=n.length;re?ba(e)?Oa(e):Or(e.parent):null,kr=l(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>Or(e.parent),$root:e=>Or(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>Rr(e),$forceUpdate:e=>e.f||=()=>{En(e.update)},$nextTick:e=>e.n||=wn.bind(e.proxy),$watch:e=>Kn.bind(e)}),Ar=(e,t)=>e!==r&&!e.__isScriptSetup&&f(e,t),jr={get({_:e},t){if(t===`__v_skip`)return!0;let{ctx:n,setupState:i,data:a,props:o,accessCache:s,type:c,appContext:l}=e;if(t[0]!==`$`){let e=s[t];if(e!==void 0)switch(e){case 1:return i[t];case 2:return a[t];case 4:return n[t];case 3:return o[t]}else if(Ar(i,t))return s[t]=1,i[t];else if(a!==r&&f(a,t))return s[t]=2,a[t];else if(f(o,t))return s[t]=3,o[t];else if(n!==r&&f(n,t))return s[t]=4,n[t];else Nr&&(s[t]=0)}let u=kr[t],d,p;if(u)return t===`$attrs`&&P(e.attrs,`get`,``),u(e);if((d=c.__cssModules)&&(d=d[t]))return d;if(n!==r&&f(n,t))return s[t]=4,n[t];if(p=l.config.globalProperties,f(p,t))return p[t]},set({_:e},t,n){let{data:i,setupState:a,ctx:o}=e;return Ar(a,t)?(a[t]=n,!0):i!==r&&f(i,t)?(i[t]=n,!0):f(e.props,t)||t[0]===`$`&&t.slice(1)in e?!1:(o[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:i,appContext:a,props:o,type:s}},c){let l;return!!(n[c]||e!==r&&c[0]!==`$`&&f(e,c)||Ar(t,c)||f(o,c)||f(i,c)||f(kr,c)||f(a.config.globalProperties,c)||(l=s.__cssModules)&&l[c])},defineProperty(e,t,n){return n.get==null?f(n,`value`)&&this.set(e,t,n.value,null):e._.accessCache[t]=0,Reflect.defineProperty(e,t,n)}};function Mr(e){return p(e)?e.reduce((e,t)=>(e[t]=null,e),{}):e}var Nr=!0;function Pr(e){let t=Rr(e),n=e.proxy,r=e.ctx;Nr=!1,t.beforeCreate&&Ir(t.beforeCreate,e,`bc`);let{data:i,computed:o,methods:s,watch:c,provide:l,inject:u,created:d,beforeMount:f,mounted:m,beforeUpdate:h,updated:g,activated:v,deactivated:y,beforeDestroy:x,beforeUnmount:S,destroyed:C,unmounted:ee,render:te,renderTracked:w,renderTriggered:ne,errorCaptured:re,serverPrefetch:ie,expose:T,inheritAttrs:ae,components:oe,directives:E,filters:D}=t;if(u&&Fr(u,r,null),s)for(let e in s){let t=s[e];_(t)&&(r[e]=t.bind(n))}if(i){let t=i.call(n,n);b(t)&&(e.data=Rt(t))}if(Nr=!0,o)for(let e in o){let t=o[e],i=ja({get:_(t)?t.bind(n,n):_(t.get)?t.get.bind(n,n):a,set:!_(t)&&_(t.set)?t.set.bind(n):a});Object.defineProperty(r,e,{enumerable:!0,configurable:!0,get:()=>i.value,set:e=>i.value=e})}if(c)for(let e in c)Lr(c[e],r,n,e);if(l){let e=_(l)?l.call(n):l;Reflect.ownKeys(e).forEach(t=>{zn(t,e[t])})}d&&Ir(d,e,`c`);function O(e,t){p(t)?t.forEach(t=>e(t.bind(n))):t&&e(t.bind(n))}if(O(fr,f),O(pr,m),O(mr,h),O(hr,g),O(or,v),O(sr,y),O(xr,re),O(br,w),O(yr,ne),O(gr,S),O(_r,ee),O(vr,ie),p(T)){if(T.length){let t=e.exposed||={};T.forEach(e=>{Object.defineProperty(t,e,{get:()=>n[e],set:t=>n[e]=t,enumerable:!0})})}else e.exposed||={}}te&&e.render===a&&(e.render=te),ae!=null&&(e.inheritAttrs=ae),oe&&(e.components=oe),E&&(e.directives=E),ie&&$n(e)}function Fr(e,t,n=a){p(e)&&(e=Ur(e));for(let n in e){let r=e[n],i;i=b(r)?`default`in r?Bn(r.from||n,r.default,!0):Bn(r.from||n):Bn(r),I(i)?Object.defineProperty(t,n,{enumerable:!0,configurable:!0,get:()=>i.value,set:e=>i.value=e}):t[n]=i}}function Ir(e,t,n){mn(p(e)?e.map(e=>e.bind(t.proxy)):e.bind(t.proxy),t,n)}function Lr(e,t,n,r){let i=r.includes(`.`)?qn(n,r):()=>n[r];if(v(e)){let n=t[e];_(n)&&Wn(i,n)}else if(_(e))Wn(i,e.bind(n));else if(b(e)){if(p(e))e.forEach(e=>Lr(e,t,n,r));else{let r=_(e.handler)?e.handler.bind(n):t[e.handler];_(r)&&Wn(i,r,e)}}}function Rr(e){let t=e.type,{mixins:n,extends:r}=t,{mixins:i,optionsCache:a,config:{optionMergeStrategies:o}}=e.appContext,s=a.get(t),c;return s?c=s:!i.length&&!n&&!r?c=t:(c={},i.length&&i.forEach(e=>zr(c,e,o,!0)),zr(c,t,o)),b(t)&&a.set(t,c),c}function zr(e,t,n,r=!1){let{mixins:i,extends:a}=t;a&&zr(e,a,n,!0),i&&i.forEach(t=>zr(e,t,n,!0));for(let i in t)if(!(r&&i===`expose`)){let r=Br[i]||n&&n[i];e[i]=r?r(e[i],t[i]):t[i]}return e}var Br={data:Vr,props:Gr,emits:Gr,methods:Wr,computed:Wr,beforeCreate:R,created:R,beforeMount:R,mounted:R,beforeUpdate:R,updated:R,beforeDestroy:R,beforeUnmount:R,destroyed:R,unmounted:R,activated:R,deactivated:R,errorCaptured:R,serverPrefetch:R,components:Wr,directives:Wr,watch:Kr,provide:Vr,inject:Hr};function Vr(e,t){return t?e?function(){return l(_(e)?e.call(this,this):e,_(t)?t.call(this,this):t)}:t:e}function Hr(e,t){return Wr(Ur(e),Ur(t))}function Ur(e){if(p(e)){let t={};for(let n=0;nt===`modelValue`||t===`model-value`?e.modelModifiers:e[`${t}Modifiers`]||e[`${T(t)}Modifiers`]||e[`${oe(t)}Modifiers`];function Qr(e,t,...n){if(e.isUnmounted)return;let i=e.vnode.props||r,a=n,o=t.startsWith(`update:`),s=o&&Zr(i,t.slice(7));s&&(s.trim&&(a=n.map(e=>v(e)?e.trim():e)),s.number&&(a=n.map(le)));let c,l=i[c=D(t)]||i[c=D(T(t))];!l&&o&&(l=i[c=D(oe(t))]),l&&mn(l,e,6,a);let u=i[c+`Once`];if(u){if(!e.emitted)e.emitted={};else if(e.emitted[c])return;e.emitted[c]=!0,mn(u,e,6,a)}}var $r=new WeakMap;function ei(e,t,n=!1){let r=n?$r:t.emitsCache,i=r.get(e);if(i!==void 0)return i;let a=e.emits,o={},s=!1;if(!_(e)){let r=e=>{let n=ei(e,t,!0);n&&(s=!0,l(o,n))};!n&&t.mixins.length&&t.mixins.forEach(r),e.extends&&r(e.extends),e.mixins&&e.mixins.forEach(r)}return!a&&!s?(b(e)&&r.set(e,null),null):(p(a)?a.forEach(e=>o[e]=null):l(o,a),b(e)&&r.set(e,o),o)}function ti(e,t){return!e||!s(t)?!1:(t=t.slice(2).replace(/Once$/,``),f(e,t[0].toLowerCase()+t.slice(1))||f(e,oe(t))||f(e,t))}function ni(e){let{type:t,vnode:n,proxy:r,withProxy:i,propsOptions:[a],slots:o,attrs:s,emit:l,render:u,renderCache:d,props:f,data:p,setupState:m,ctx:h,inheritAttrs:g}=e,_=Fn(e),v,y;try{if(n.shapeFlag&4){let e=i||r,t=e;v=sa(u.call(t,e,d,f,m,p,h)),y=s}else{let e=t;v=sa(e.length>1?e(f,{attrs:s,slots:o,emit:l}):e(f,null)),y=t.props?s:ri(s)}}catch(t){Ui.length=0,hn(t,e,1),v=ea(Vi)}let b=v;if(y&&g!==!1){let e=Object.keys(y),{shapeFlag:t}=b;e.length&&t&7&&(a&&e.some(c)&&(y=ii(y,a)),b=ra(b,y,!1,!0))}return n.dirs&&(b=ra(b,null,!1,!0),b.dirs=b.dirs?b.dirs.concat(n.dirs):n.dirs),n.transition&&Zn(b,n.transition),v=b,Fn(_),v}var ri=e=>{let t;for(let n in e)(n===`class`||n===`style`||s(n))&&((t||={})[n]=e[n]);return t},ii=(e,t)=>{let n={};for(let r in e)(!c(r)||!(r.slice(9)in t))&&(n[r]=e[r]);return n};function ai(e,t,n){let{props:r,children:i,component:a}=e,{props:o,children:s,patchFlag:c}=t,l=a.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&c>=0){if(c&1024)return!0;if(c&16)return r?oi(r,o,l):!!o;if(c&8){let e=t.dynamicProps;for(let t=0;tObject.create(li),di=e=>Object.getPrototypeOf(e)===li;function fi(e,t,n,r=!1){let i={},a=ui();e.propsDefaults=Object.create(null),mi(e,t,i,a);for(let t in e.propsOptions[0])t in i||(i[t]=void 0);e.props=n?r?i:zt(i):e.type.props?i:a,e.attrs=a}function pi(e,t,n,r){let{props:i,attrs:a,vnode:{patchFlag:o}}=e,s=F(i),[c]=e.propsOptions,l=!1;if((r||o>0)&&!(o&16)){if(o&8){let n=e.vnode.dynamicProps;for(let r=0;r{d=!0;let[n,r]=_i(e,t,!0);l(c,n),r&&u.push(...r)};!n&&t.mixins.length&&t.mixins.forEach(r),e.extends&&r(e.extends),e.mixins&&e.mixins.forEach(r)}if(!s&&!d)return b(e)&&a.set(e,i),i;if(p(s))for(let e=0;ee===`_`||e===`_ctx`||e===`$stable`,bi=e=>p(e)?e.map(sa):[sa(e)],xi=(e,t,n)=>{if(t._n)return t;let r=In((...e)=>bi(t(...e)),n);return r._c=!1,r},Si=(e,t,n)=>{let r=e._ctx;for(let n in e){if(yi(n))continue;let i=e[n];if(_(i))t[n]=xi(n,i,r);else if(i!=null){let e=bi(i);t[n]=()=>e}}},Ci=(e,t)=>{let n=bi(t);e.slots.default=()=>n},wi=(e,t,n)=>{for(let r in t)(n||!yi(r))&&(e[r]=t[r])},Ti=(e,t,n)=>{let r=e.slots=ui();if(e.vnode.shapeFlag&32){let e=t._;e?(wi(r,t,n),n&&ce(r,`_`,e,!0)):Si(t,r)}else t&&Ci(e,t)},Ei=(e,t,n)=>{let{vnode:i,slots:a}=e,o=!0,s=r;if(i.shapeFlag&32){let e=t._;e?n&&e===1?o=!1:wi(a,t,n):(o=!t.$stable,Si(t,a)),s=t}else t&&(Ci(e,t),s={default:1});if(o)for(let e in a)!yi(e)&&s[e]==null&&delete a[e]},Di=zi;function Oi(e){return ki(e)}function ki(e,t){let n=de();n.__VUE__=!0;let{insert:o,remove:s,patchProp:c,createElement:l,createText:u,createComment:d,setText:f,setElementText:p,parentNode:m,nextSibling:h,setScopeId:g=a,insertStaticContent:_}=e,v=(e,t,n,r=null,i=null,a=null,o=void 0,s=null,c=!!t.dynamicChildren)=>{if(e===t)return;e&&!Zi(e,t)&&(r=ve(e),k(e,i,a,!0),e=null),t.patchFlag===-2&&(c=!1,t.dynamicChildren=null);let{type:l,ref:u,shapeFlag:d}=t;switch(l){case Bi:y(e,t,n,r);break;case Vi:b(e,t,n,r);break;case Hi:e??x(t,n,r,o);break;case z:oe(e,t,n,r,i,a,o,s,c);break;default:d&1?ee(e,t,n,r,i,a,o,s,c):d&6?E(e,t,n,r,i,a,o,s,c):(d&64||d&128)&&l.process(e,t,n,r,i,a,o,s,c,xe)}u!=null&&i?nr(u,e&&e.ref,a,t||e,!t):u==null&&e&&e.ref!=null&&nr(e.ref,null,a,e,!0)},y=(e,t,n,r)=>{if(e==null)o(t.el=u(t.children),n,r);else{let n=t.el=e.el;t.children!==e.children&&f(n,t.children)}},b=(e,t,n,r)=>{e==null?o(t.el=d(t.children||``),n,r):t.el=e.el},x=(e,t,n,r)=>{[e.el,e.anchor]=_(e.children,t,n,r,e.el,e.anchor)},S=({el:e,anchor:t},n,r)=>{let i;for(;e&&e!==t;)i=h(e),o(e,n,r),e=i;o(t,n,r)},C=({el:e,anchor:t})=>{let n;for(;e&&e!==t;)n=h(e),s(e),e=n;s(t)},ee=(e,t,n,r,i,a,o,s,c)=>{if(t.type===`svg`?o=`svg`:t.type===`math`&&(o=`mathml`),e==null)te(t,n,r,i,a,o,s,c);else{let n=e.el&&e.el._isVueCE?e.el:null;try{n&&n._beginPatch(),ie(e,t,i,a,o,s,c)}finally{n&&n._endPatch()}}},te=(e,t,n,r,i,a,s,u)=>{let d,f,{props:m,shapeFlag:h,transition:g,dirs:_}=e;if(d=e.el=l(e.type,a,m&&m.is,m),h&8?p(d,e.children):h&16&&re(e.children,d,null,r,i,Ai(e,a),s,u),_&&Rn(e,null,r,`created`),w(d,e,e.scopeId,s,r),m){for(let e in m)e!==`value`&&!ne(e)&&c(d,e,null,m[e],a,r);`value`in m&&c(d,`value`,null,m.value,a),(f=m.onVnodeBeforeMount)&&da(f,r,e)}_&&Rn(e,null,r,`beforeMount`);let v=Mi(i,g);v&&g.beforeEnter(d),o(d,t,n),((f=m&&m.onVnodeMounted)||v||_)&&Di(()=>{f&&da(f,r,e),v&&g.enter(d),_&&Rn(e,null,r,`mounted`)},i)},w=(e,t,n,r,i)=>{if(n&&g(e,n),r)for(let t=0;t{for(let l=c;l{let l=t.el=e.el,{patchFlag:u,dynamicChildren:d,dirs:f}=t;u|=e.patchFlag&16;let m=e.props||r,h=t.props||r,g;if(n&&ji(n,!1),(g=h.onVnodeBeforeUpdate)&&da(g,n,t,e),f&&Rn(t,e,n,`beforeUpdate`),n&&ji(n,!0),(m.innerHTML&&h.innerHTML==null||m.textContent&&h.textContent==null)&&p(l,``),d?T(e.dynamicChildren,d,l,n,i,Ai(t,a),o):s||ue(e,t,l,null,n,i,Ai(t,a),o,!1),u>0){if(u&16)ae(l,m,h,n,a);else if(u&2&&m.class!==h.class&&c(l,`class`,null,h.class,a),u&4&&c(l,`style`,m.style,h.style,a),u&8){let e=t.dynamicProps;for(let t=0;t{g&&da(g,n,t,e),f&&Rn(t,e,n,`updated`)},i)},T=(e,t,n,r,i,a,o)=>{for(let s=0;s{if(t!==n){if(t!==r)for(let r in t)!ne(r)&&!(r in n)&&c(e,r,t[r],null,a,i);for(let r in n){if(ne(r))continue;let o=n[r],s=t[r];o!==s&&r!==`value`&&c(e,r,s,o,a,i)}`value`in n&&c(e,`value`,t.value,n.value,a)}},oe=(e,t,n,r,i,a,s,c,l)=>{let d=t.el=e?e.el:u(``),f=t.anchor=e?e.anchor:u(``),{patchFlag:p,dynamicChildren:m,slotScopeIds:h}=t;h&&(c=c?c.concat(h):h),e==null?(o(d,n,r),o(f,n,r),re(t.children||[],n,f,i,a,s,c,l)):p>0&&p&64&&m&&e.dynamicChildren&&e.dynamicChildren.length===m.length?(T(e.dynamicChildren,m,n,i,a,s,c),(t.key!=null||i&&t===i.subTree)&&Ni(e,t,!0)):ue(e,t,n,f,i,a,s,c,l)},E=(e,t,n,r,i,a,o,s,c)=>{t.slotScopeIds=s,e==null?t.shapeFlag&512?i.ctx.activate(t,n,r,o,c):D(t,n,r,i,a,o,c):O(e,t,c)},D=(e,t,n,r,i,a,o)=>{let s=e.component=ma(e,r,i);if(ar(e)&&(s.ctx.renderer=xe),Sa(s,!1,o),s.asyncDep){if(i&&i.registerDep(s,ce,o),!e.el){let r=s.subTree=ea(Vi);b(null,r,t,n),e.placeholder=r.el}}else ce(s,e,t,n,i,a,o)},O=(e,t,n)=>{let r=t.component=e.component;if(ai(e,t,n)){if(r.asyncDep&&!r.asyncResolved){le(r,t,n);return}r.next=t,r.update()}else t.el=e.el,r.vnode=t},ce=(e,t,n,r,i,a,o)=>{let s=()=>{if(e.isMounted){let{next:t,bu:n,u:r,parent:s,vnode:c}=e;{let n=Fi(e);if(n){t&&(t.el=c.el,le(e,t,o)),n.asyncDep.then(()=>{Di(()=>{e.isUnmounted||l()},i)});return}}let u=t,d;ji(e,!1),t?(t.el=c.el,le(e,t,o)):t=c,n&&se(n),(d=t.props&&t.props.onVnodeBeforeUpdate)&&da(d,s,t,c),ji(e,!0);let f=ni(e),p=e.subTree;e.subTree=f,v(p,f,m(p.el),ve(p),e,i,a),t.el=f.el,u===null&&ci(e,f.el),r&&Di(r,i),(d=t.props&&t.props.onVnodeUpdated)&&Di(()=>da(d,s,t,c),i)}else{let o,{el:s,props:c}=t,{bm:l,m:u,parent:d,root:f,type:p}=e,m=ir(t);if(ji(e,!1),l&&se(l),!m&&(o=c&&c.onVnodeBeforeMount)&&da(o,d,t),ji(e,!0),s&&j){let t=()=>{e.subTree=ni(e),j(s,e.subTree,e,i,null)};m&&p.__asyncHydrate?p.__asyncHydrate(s,e,t):t()}else{f.ce&&f.ce._hasShadowRoot()&&f.ce._injectChildStyle(p,e.parent?e.parent.type:void 0);let o=e.subTree=ni(e);v(null,o,n,r,e,i,a),t.el=o.el}if(u&&Di(u,i),!m&&(o=c&&c.onVnodeMounted)){let e=t;Di(()=>da(o,d,e),i)}(t.shapeFlag&256||d&&ir(d.vnode)&&d.vnode.shapeFlag&256)&&e.a&&Di(e.a,i),e.isMounted=!0,t=n=r=null}};e.scope.on();let c=e.effect=new Ae(s);e.scope.off();let l=e.update=c.run.bind(c),u=e.job=c.runIfDirty.bind(c);u.i=e,u.id=e.uid,c.scheduler=()=>En(u),ji(e,!0),l()},le=(e,t,n)=>{t.component=e;let r=e.vnode.props;e.vnode=t,e.next=null,pi(e,t.props,r,n),Ei(e,t.children,n),Ge(),kn(e),Ke()},ue=(e,t,n,r,i,a,o,s,c=!1)=>{let l=e&&e.children,u=e?e.shapeFlag:0,d=t.children,{patchFlag:f,shapeFlag:m}=t;if(f>0){if(f&128){pe(l,d,n,r,i,a,o,s,c);return}if(f&256){fe(l,d,n,r,i,a,o,s,c);return}}m&8?(u&16&&_e(l,i,a),d!==l&&p(n,d)):u&16?m&16?pe(l,d,n,r,i,a,o,s,c):_e(l,i,a,!0):(u&8&&p(n,``),m&16&&re(d,n,r,i,a,o,s,c))},fe=(e,t,n,r,a,o,s,c,l)=>{e||=i,t||=i;let u=e.length,d=t.length,f=Math.min(u,d),p;for(p=0;pd?_e(e,a,o,!0,!1,f):re(t,n,r,a,o,s,c,l,f)},pe=(e,t,n,r,a,o,s,c,l)=>{let u=0,d=t.length,f=e.length-1,p=d-1;for(;u<=f&&u<=p;){let r=e[u],i=t[u]=l?ca(t[u]):sa(t[u]);if(Zi(r,i))v(r,i,n,null,a,o,s,c,l);else break;u++}for(;u<=f&&u<=p;){let r=e[f],i=t[p]=l?ca(t[p]):sa(t[p]);if(Zi(r,i))v(r,i,n,null,a,o,s,c,l);else break;f--,p--}if(u>f){if(u<=p){let e=p+1,i=ep)for(;u<=f;)k(e[u],a,o,!0),u++;else{let m=u,h=u,g=new Map;for(u=h;u<=p;u++){let e=t[u]=l?ca(t[u]):sa(t[u]);e.key!=null&&g.set(e.key,u)}let _,y=0,b=p-h+1,x=!1,S=0,C=Array(b);for(u=0;u=b){k(r,a,o,!0);continue}let i;if(r.key!=null)i=g.get(r.key);else for(_=h;_<=p;_++)if(C[_-h]===0&&Zi(r,t[_])){i=_;break}i===void 0?k(r,a,o,!0):(C[i-h]=u+1,i>=S?S=i:x=!0,v(r,t[i],n,null,a,o,s,c,l),y++)}let ee=x?Pi(C):i;for(_=ee.length-1,u=b-1;u>=0;u--){let e=h+u,i=t[e],f=t[e+1],p=e+1{let{el:a,type:c,transition:l,children:u,shapeFlag:d}=e;if(d&6){me(e.component.subTree,t,n,r);return}if(d&128){e.suspense.move(t,n,r);return}if(d&64){c.move(e,t,n,xe);return}if(c===z){o(a,t,n);for(let e=0;el.enter(a),i);else{let{leave:r,delayLeave:i,afterLeave:c}=l,u=()=>{e.ctx.isUnmounted?s(a):o(a,t,n)},d=()=>{a._isLeaving&&a[Xn](!0),r(a,()=>{u(),c&&c()})};i?i(a,u,d):d()}}else o(a,t,n)},k=(e,t,n,r=!1,i=!1)=>{let{type:a,props:o,ref:s,children:c,dynamicChildren:l,shapeFlag:u,patchFlag:d,dirs:f,cacheIndex:p}=e;if(d===-2&&(i=!1),s!=null&&(Ge(),nr(s,null,n,e,!0),Ke()),p!=null&&(t.renderCache[p]=void 0),u&256){t.ctx.deactivate(e);return}let m=u&1&&f,h=!ir(e),g;if(h&&(g=o&&o.onVnodeBeforeUnmount)&&da(g,t,e),u&6)ge(e.component,n,r);else{if(u&128){e.suspense.unmount(n,r);return}m&&Rn(e,null,t,`beforeUnmount`),u&64?e.type.remove(e,t,n,xe,r):l&&!l.hasOnce&&(a!==z||d>0&&d&64)?_e(l,t,n,!1,!0):(a===z&&d&384||!i&&u&16)&&_e(c,t,n),r&&he(e)}(h&&(g=o&&o.onVnodeUnmounted)||m)&&Di(()=>{g&&da(g,t,e),m&&Rn(e,null,t,`unmounted`)},n)},he=e=>{let{type:t,el:n,anchor:r,transition:i}=e;if(t===z){A(n,r);return}if(t===Hi){C(e);return}let a=()=>{s(n),i&&!i.persisted&&i.afterLeave&&i.afterLeave()};if(e.shapeFlag&1&&i&&!i.persisted){let{leave:t,delayLeave:r}=i,o=()=>t(n,a);r?r(e.el,a,o):o()}else a()},A=(e,t)=>{let n;for(;e!==t;)n=h(e),s(e),e=n;s(t)},ge=(e,t,n)=>{let{bum:r,scope:i,job:a,subTree:o,um:s,m:c,a:l}=e;Ii(c),Ii(l),r&&se(r),i.stop(),a&&(a.flags|=8,k(o,e,t,n)),s&&Di(s,t),Di(()=>{e.isUnmounted=!0},t)},_e=(e,t,n,r=!1,i=!1,a=0)=>{for(let o=a;o{if(e.shapeFlag&6)return ve(e.component.subTree);if(e.shapeFlag&128)return e.suspense.next();let t=h(e.anchor||e.el),n=t&&t[Jn];return n?h(n):t},ye=!1,be=(e,t,n)=>{let r;e==null?t._vnode&&(k(t._vnode,null,null,!0),r=t._vnode.component):v(t._vnode||null,e,t,null,null,null,n),t._vnode=e,ye||=(ye=!0,kn(r),An(),!1)},xe={p:v,um:k,m:me,r:he,mt:D,mc:re,pc:ue,pbc:T,n:ve,o:e},Se,j;return t&&([Se,j]=t(xe)),{render:be,hydrate:Se,createApp:Yr(be,Se)}}function Ai({type:e,props:t},n){return n===`svg`&&e===`foreignObject`||n===`mathml`&&e===`annotation-xml`&&t&&t.encoding&&t.encoding.includes(`html`)?void 0:n}function ji({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function Mi(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function Ni(e,t,n=!1){let r=e.children,i=t.children;if(p(r)&&p(i))for(let e=0;e>1,e[n[s]]0&&(t[r]=n[a-1]),n[a]=r)}}for(a=n.length,o=n[a-1];a-->0;)n[a]=o,o=t[o];return n}function Fi(e){let t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:Fi(t)}function Ii(e){if(e)for(let t=0;te.__isSuspense;function zi(e,t){t&&t.pendingBranch?p(e)?t.effects.push(...e):t.effects.push(e):On(e)}var z=Symbol.for(`v-fgt`),Bi=Symbol.for(`v-txt`),Vi=Symbol.for(`v-cmt`),Hi=Symbol.for(`v-stc`),Ui=[],Wi=null;function B(e=!1){Ui.push(Wi=e?null:[])}function Gi(){Ui.pop(),Wi=Ui[Ui.length-1]||null}var Ki=1;function qi(e,t=!1){Ki+=e,e<0&&Wi&&t&&(Wi.hasOnce=!0)}function Ji(e){return e.dynamicChildren=Ki>0?Wi||i:null,Gi(),Ki>0&&Wi&&Wi.push(e),e}function V(e,t,n,r,i,a){return Ji(H(e,t,n,r,i,a,!0))}function Yi(e,t,n,r,i){return Ji(ea(e,t,n,r,i,!0))}function Xi(e){return e?e.__v_isVNode===!0:!1}function Zi(e,t){return e.type===t.type&&e.key===t.key}var Qi=({key:e})=>e??null,$i=({ref:e,ref_key:t,ref_for:n})=>(typeof e==`number`&&(e=``+e),e==null?null:v(e)||I(e)||_(e)?{i:Nn,r:e,k:t,f:!!n}:e);function H(e,t=null,n=null,r=0,i=null,a=e===z?0:1,o=!1,s=!1){let c={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&Qi(t),ref:t&&$i(t),scopeId:Pn,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:a,patchFlag:r,dynamicProps:i,dynamicChildren:null,appContext:null,ctx:Nn};return s?(la(c,n),a&128&&e.normalize(c)):n&&(c.shapeFlag|=v(n)?8:16),Ki>0&&!o&&Wi&&(c.patchFlag>0||a&6)&&c.patchFlag!==32&&Wi.push(c),c}var ea=ta;function ta(e,t=null,n=null,r=0,i=null,a=!1){if((!e||e===wr)&&(e=Vi),Xi(e)){let r=ra(e,t,!0);return n&&la(r,n),Ki>0&&!a&&Wi&&(r.shapeFlag&6?Wi[Wi.indexOf(e)]=r:Wi.push(r)),r.patchFlag=-2,r}if(Aa(e)&&(e=e.__vccOpts),t){t=na(t);let{class:e,style:n}=t;e&&!v(e)&&(t.class=A(e)),b(n)&&(Gt(n)&&!p(n)&&(n=l({},n)),t.style=fe(n))}let o=v(e)?1:Ri(e)?128:Yn(e)?64:b(e)?4:_(e)?2:0;return H(e,t,n,r,i,o,a,!0)}function na(e){return e?Gt(e)||di(e)?l({},e):e:null}function ra(e,t,n=!1,r=!1){let{props:i,ref:a,patchFlag:o,children:s,transition:c}=e,l=t?ua(i||{},t):i,u={__v_isVNode:!0,__v_skip:!0,type:e.type,props:l,key:l&&Qi(l),ref:t&&t.ref?n&&a?p(a)?a.concat($i(t)):[a,$i(t)]:$i(t):a,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:s,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==z?o===-1?16:o|16:o,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:c,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&ra(e.ssContent),ssFallback:e.ssFallback&&ra(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return c&&r&&Zn(u,c.clone(u)),u}function ia(e=` `,t=0){return ea(Bi,null,e,t)}function aa(e,t){let n=ea(Hi,null,e);return n.staticCount=t,n}function oa(e=``,t=!1){return t?(B(),Yi(Vi,null,e)):ea(Vi,null,e)}function sa(e){return e==null||typeof e==`boolean`?ea(Vi):p(e)?ea(z,null,e.slice()):Xi(e)?ca(e):ea(Bi,null,String(e))}function ca(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:ra(e)}function la(e,t){let n=0,{shapeFlag:r}=e;if(t==null)t=null;else if(p(t))n=16;else if(typeof t==`object`){if(r&65){let n=t.default;n&&(n._c&&(n._d=!1),la(e,n()),n._c&&(n._d=!0));return}{n=32;let r=t._;!r&&!di(t)?t._ctx=Nn:r===3&&Nn&&(Nn.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}}else _(t)?(t={default:t,_ctx:Nn},n=32):(t=String(t),r&64?(n=16,t=[ia(t)]):n=8);e.children=t,e.shapeFlag|=n}function ua(...e){let t={};for(let n=0;nU||Nn,ga,_a;{let e=de(),t=(t,n)=>{let r;return(r=e[t])||(r=e[t]=[]),r.push(n),e=>{r.length>1?r.forEach(t=>t(e)):r[0](e)}};ga=t(`__VUE_INSTANCE_SETTERS__`,e=>U=e),_a=t(`__VUE_SSR_SETTERS__`,e=>xa=e)}var va=e=>{let t=U;return ga(e),e.scope.on(),()=>{e.scope.off(),ga(t)}},ya=()=>{U&&U.scope.off(),ga(null)};function ba(e){return e.vnode.shapeFlag&4}var xa=!1;function Sa(e,t=!1,n=!1){t&&_a(t);let{props:r,children:i}=e.vnode,a=ba(e);fi(e,r,a,t),Ti(e,i,n||t);let o=a?Ca(e,t):void 0;return t&&_a(!1),o}function Ca(e,t){let n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,jr);let{setup:r}=n;if(r){Ge();let n=e.setupContext=r.length>1?Da(e):null,i=va(e),a=pn(r,e,0,[e.props,n]),o=x(a);if(Ke(),i(),(o||e.sp)&&!ir(e)&&$n(e),o){if(a.then(ya,ya),t)return a.then(n=>{wa(e,n,t)}).catch(t=>{hn(t,e,0)});e.asyncDep=a}else wa(e,a,t)}else Ta(e,t)}function wa(e,t,n){_(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:b(t)&&(e.setupState=en(t)),Ta(e,n)}function Ta(e,t,n){let r=e.type;e.render||=r.render||a;{let t=va(e);Ge();try{Pr(e)}finally{Ke(),t()}}}var Ea={get(e,t){return P(e,`get`,``),e[t]}};function Da(e){return{attrs:new Proxy(e.attrs,Ea),slots:e.slots,emit:e.emit,expose:t=>{e.exposed=t||{}}}}function Oa(e){return e.exposed?e.exposeProxy||=new Proxy(en(Kt(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in kr)return kr[n](e)},has(e,t){return t in e||t in kr}}):e.proxy}function ka(e,t=!0){return _(e)?e.displayName||e.name:e.name||t&&e.__name}function Aa(e){return _(e)&&`__vccOpts`in e}var ja=(e,t)=>on(e,t,xa);function Ma(e,t,n){try{qi(-1);let r=arguments.length;return r===2?b(t)&&!p(t)?Xi(t)?ea(e,null,[t]):ea(e,t):ea(e,null,t):(r>3?n=Array.prototype.slice.call(arguments,2):r===3&&Xi(n)&&(n=[n]),ea(e,t,n))}finally{qi(1)}}var Na=`3.5.30`,Pa=void 0,Fa=typeof window<`u`&&window.trustedTypes;if(Fa)try{Pa=Fa.createPolicy(`vue`,{createHTML:e=>e})}catch{}var Ia=Pa?e=>Pa.createHTML(e):e=>e,La=`http://www.w3.org/2000/svg`,Ra=`http://www.w3.org/1998/Math/MathML`,za=typeof document<`u`?document:null,Ba=za&&za.createElement(`template`),Va={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{let t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,r)=>{let i=t===`svg`?za.createElementNS(La,e):t===`mathml`?za.createElementNS(Ra,e):n?za.createElement(e,{is:n}):za.createElement(e);return e===`select`&&r&&r.multiple!=null&&i.setAttribute(`multiple`,r.multiple),i},createText:e=>za.createTextNode(e),createComment:e=>za.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>za.querySelector(e),setScopeId(e,t){e.setAttribute(t,``)},insertStaticContent(e,t,n,r,i,a){let o=n?n.previousSibling:t.lastChild;if(i&&(i===a||i.nextSibling))for(;t.insertBefore(i.cloneNode(!0),n),!(i===a||!(i=i.nextSibling)););else{Ba.innerHTML=Ia(r===`svg`?`${e}`:r===`mathml`?`${e}`:e);let i=Ba.content;if(r===`svg`||r===`mathml`){let e=i.firstChild;for(;e.firstChild;)i.appendChild(e.firstChild);i.removeChild(e)}t.insertBefore(i,n)}return[o?o.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},Ha=Symbol(`_vtc`);function Ua(e,t,n){let r=e[Ha];r&&(t=(t?[t,...r]:[...r]).join(` `)),t==null?e.removeAttribute(`class`):n?e.setAttribute(`class`,t):e.className=t}var Wa=Symbol(`_vod`),Ga=Symbol(`_vsh`),Ka=Symbol(``),qa=/(?:^|;)\s*display\s*:/;function Ja(e,t,n){let r=e.style,i=v(n),a=!1;if(n&&!i){if(t){if(v(t))for(let e of t.split(`;`)){let t=e.slice(0,e.indexOf(`:`)).trim();n[t]??Xa(r,t,``)}else for(let e in t)n[e]??Xa(r,e,``)}for(let e in n)e===`display`&&(a=!0),Xa(r,e,n[e])}else if(i){if(t!==n){let e=r[Ka];e&&(n+=`;`+e),r.cssText=n,a=qa.test(n)}}else t&&e.removeAttribute(`style`);Wa in e&&(e[Wa]=a?r.display:``,e[Ga]&&(r.display=`none`))}var Ya=/\s*!important$/;function Xa(e,t,n){if(p(n))n.forEach(n=>Xa(e,t,n));else if(n??=``,t.startsWith(`--`))e.setProperty(t,n);else{let r=$a(e,t);Ya.test(n)?e.setProperty(oe(r),n.replace(Ya,``),`important`):e[r]=n}}var Za=[`Webkit`,`Moz`,`ms`],Qa={};function $a(e,t){let n=Qa[t];if(n)return n;let r=T(t);if(r!==`filter`&&r in e)return Qa[t]=r;r=E(r);for(let n=0;nlo||=(uo.then(()=>lo=0),Date.now());function po(e,t){let n=e=>{if(!e._vts)e._vts=Date.now();else if(e._vts<=n.attached)return;mn(mo(e,n.value),t,5,[e])};return n.value=e,n.attached=fo(),n}function mo(e,t){if(p(t)){let n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map(e=>t=>!t._stopped&&e&&e(t))}return t}var ho=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,go=(e,t,n,r,i,a)=>{let o=i===`svg`;t===`class`?Ua(e,r,o):t===`style`?Ja(e,n,r):s(t)?c(t)||oo(e,t,n,r,a):(t[0]===`.`?(t=t.slice(1),!0):t[0]===`^`?(t=t.slice(1),!1):_o(e,t,r,o))?(no(e,t,r),!e.tagName.includes(`-`)&&(t===`value`||t===`checked`||t===`selected`)&&to(e,t,r,o,a,t!==`value`)):e._isVueCE&&(vo(e,t)||e._def.__asyncLoader&&(/[A-Z]/.test(t)||!v(r)))?no(e,T(t),r,a,t):(t===`true-value`?e._trueValue=r:t===`false-value`&&(e._falseValue=r),to(e,t,r,o))};function _o(e,t,n,r){if(r)return!!(t===`innerHTML`||t===`textContent`||t in e&&ho(t)&&_(n));if(t===`spellcheck`||t===`draggable`||t===`translate`||t===`autocorrect`||t===`sandbox`&&e.tagName===`IFRAME`||t===`form`||t===`list`&&e.tagName===`INPUT`||t===`type`&&e.tagName===`TEXTAREA`)return!1;if(t===`width`||t===`height`){let t=e.tagName;if(t===`IMG`||t===`VIDEO`||t===`CANVAS`||t===`SOURCE`)return!1}return ho(t)&&v(n)?!1:t in e}function vo(e,t){let n=e._def.props;if(!n)return!1;let r=T(t);return Array.isArray(n)?n.some(e=>T(e)===r):Object.keys(n).some(e=>T(e)===r)}var yo=e=>{let t=e.props[`onUpdate:modelValue`]||!1;return p(t)?e=>se(t,e):t};function bo(e){e.target.composing=!0}function xo(e){let t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event(`input`)))}var So=Symbol(`_assign`);function Co(e,t,n){return t&&(e=e.trim()),n&&(e=le(e)),e}var wo={created(e,{modifiers:{lazy:t,trim:n,number:r}},i){e[So]=yo(i);let a=r||i.props&&i.props.type===`number`;ro(e,t?`change`:`input`,t=>{t.target.composing||e[So](Co(e.value,n,a))}),(n||a)&&ro(e,`change`,()=>{e.value=Co(e.value,n,a)}),t||(ro(e,`compositionstart`,bo),ro(e,`compositionend`,xo),ro(e,`change`,xo))},mounted(e,{value:t}){e.value=t??``},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:r,trim:i,number:a}},o){if(e[So]=yo(o),e.composing)return;let s=(a||e.type===`number`)&&!/^0\d/.test(e.value)?le(e.value):e.value,c=t??``;s!==c&&(document.activeElement===e&&e.type!==`range`&&(r&&t===n||i&&e.value.trim()===c)||(e.value=c))}},To={deep:!0,created(e,t,n){e[So]=yo(n),ro(e,`change`,()=>{let t=e._modelValue,n=Ao(e),r=e.checked,i=e[So];if(p(t)){let e=xe(t,n),a=e!==-1;if(r&&!a)i(t.concat(n));else if(!r&&a){let n=[...t];n.splice(e,1),i(n)}}else if(h(t)){let e=new Set(t);r?e.add(n):e.delete(n),i(e)}else i(jo(e,r))})},mounted:Eo,beforeUpdate(e,t,n){e[So]=yo(n),Eo(e,t,n)}};function Eo(e,{value:t,oldValue:n},r){e._modelValue=t;let i;if(p(t))i=xe(t,r.props.value)>-1;else if(h(t))i=t.has(r.props.value);else{if(t===n)return;i=be(t,jo(e,!0))}e.checked!==i&&(e.checked=i)}var Do={created(e,{value:t},n){e.checked=be(t,n.props.value),e[So]=yo(n),ro(e,`change`,()=>{e[So](Ao(e))})},beforeUpdate(e,{value:t,oldValue:n},r){e[So]=yo(r),t!==n&&(e.checked=be(t,r.props.value))}},Oo={deep:!0,created(e,{value:t,modifiers:{number:n}},r){let i=h(t);ro(e,`change`,()=>{let t=Array.prototype.filter.call(e.options,e=>e.selected).map(e=>n?le(Ao(e)):Ao(e));e[So](e.multiple?i?new Set(t):t:t[0]),e._assigning=!0,wn(()=>{e._assigning=!1})}),e[So]=yo(r)},mounted(e,{value:t}){ko(e,t)},beforeUpdate(e,t,n){e[So]=yo(n)},updated(e,{value:t}){e._assigning||ko(e,t)}};function ko(e,t){let n=e.multiple,r=p(t);if(!(n&&!r&&!h(t))){for(let i=0,a=e.options.length;iString(e)===String(o)):xe(t,o)>-1}else a.selected=t.has(o)}else if(be(Ao(a),t)){e.selectedIndex!==i&&(e.selectedIndex=i);return}}!n&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function Ao(e){return`_value`in e?e._value:e.value}function jo(e,t){let n=t?`_trueValue`:`_falseValue`;return n in e?e[n]:t}var Mo={created(e,t,n){Po(e,t,n,null,`created`)},mounted(e,t,n){Po(e,t,n,null,`mounted`)},beforeUpdate(e,t,n,r){Po(e,t,n,r,`beforeUpdate`)},updated(e,t,n,r){Po(e,t,n,r,`updated`)}};function No(e,t){switch(e){case`SELECT`:return Oo;case`TEXTAREA`:return wo;default:switch(t){case`checkbox`:return To;case`radio`:return Do;default:return wo}}}function Po(e,t,n,r,i){let a=No(e.tagName,n.props&&n.props.type)[i];a&&a(e,t,n,r)}var Fo=[`ctrl`,`shift`,`alt`,`meta`],Io={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>`button`in e&&e.button!==0,middle:e=>`button`in e&&e.button!==1,right:e=>`button`in e&&e.button!==2,exact:(e,t)=>Fo.some(n=>e[`${n}Key`]&&!t.includes(n))},Lo=(e,t)=>{if(!e)return e;let n=e._withMods||={},r=t.join(`.`);return n[r]||(n[r]=((n,...r)=>{for(let e=0;e{let t=Bo().createApp(...e),{mount:n}=t;return t.mount=e=>{let r=Uo(e);if(!r)return;let i=t._component;!_(i)&&!i.render&&!i.template&&(i.template=r.innerHTML),r.nodeType===1&&(r.textContent=``);let a=n(r,!1,Ho(r));return r instanceof Element&&(r.removeAttribute(`v-cloak`),r.setAttribute(`data-v-app`,``)),a},t});function Ho(e){if(e instanceof SVGElement)return`svg`;if(typeof MathMLElement==`function`&&e instanceof MathMLElement)return`mathml`}function Uo(e){return v(e)?document.querySelector(e):e}var Wo=typeof window<`u`,Go,Ko=e=>Go=e,qo=Symbol();function Jo(e){return e&&typeof e==`object`&&Object.prototype.toString.call(e)===`[object Object]`&&typeof e.toJSON!=`function`}var Yo;(function(e){e.direct=`direct`,e.patchObject=`patch object`,e.patchFunction=`patch function`})(Yo||={});var Xo=typeof window==`object`&&window.window===window?window:typeof self==`object`&&self.self===self?self:typeof global==`object`&&global.global===global?global:typeof globalThis==`object`?globalThis:{HTMLElement:null};function Zo(e,{autoBom:t=!1}={}){return t&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob([``,e],{type:e.type}):e}function Qo(e,t,n){let r=new XMLHttpRequest;r.open(`GET`,e),r.responseType=`blob`,r.onload=function(){rs(r.response,t,n)},r.onerror=function(){console.error(`could not download file`)},r.send()}function $o(e){let t=new XMLHttpRequest;t.open(`HEAD`,e,!1);try{t.send()}catch{}return t.status>=200&&t.status<=299}function es(e){try{e.dispatchEvent(new MouseEvent(`click`))}catch{let t=new MouseEvent(`click`,{bubbles:!0,cancelable:!0,view:window,detail:0,screenX:80,screenY:20,clientX:80,clientY:20,ctrlKey:!1,altKey:!1,shiftKey:!1,metaKey:!1,button:0,relatedTarget:null});e.dispatchEvent(t)}}var ts=typeof navigator==`object`?navigator:{userAgent:``},ns=/Macintosh/.test(ts.userAgent)&&/AppleWebKit/.test(ts.userAgent)&&!/Safari/.test(ts.userAgent),rs=Wo?typeof HTMLAnchorElement<`u`&&`download`in HTMLAnchorElement.prototype&&!ns?is:`msSaveOrOpenBlob`in ts?as:os:()=>{};function is(e,t=`download`,n){let r=document.createElement(`a`);r.download=t,r.rel=`noopener`,typeof e==`string`?(r.href=e,r.origin===location.origin?es(r):$o(r.href)?Qo(e,t,n):(r.target=`_blank`,es(r))):(r.href=URL.createObjectURL(e),setTimeout(function(){URL.revokeObjectURL(r.href)},4e4),setTimeout(function(){es(r)},0))}function as(e,t=`download`,n){if(typeof e==`string`){if($o(e))Qo(e,t,n);else{let t=document.createElement(`a`);t.href=e,t.target=`_blank`,setTimeout(function(){es(t)})}}else navigator.msSaveOrOpenBlob(Zo(e,n),t)}function os(e,t,n,r){if(r||=open(``,`_blank`),r&&(r.document.title=r.document.body.innerText=`downloading...`),typeof e==`string`)return Qo(e,t,n);let i=e.type===`application/octet-stream`,a=/constructor/i.test(String(Xo.HTMLElement))||`safari`in Xo,o=/CriOS\/[\d]+/.test(navigator.userAgent);if((o||i&&a||ns)&&typeof FileReader<`u`){let t=new FileReader;t.onloadend=function(){let e=t.result;if(typeof e!=`string`)throw r=null,Error(`Wrong reader.result type`);e=o?e:e.replace(/^data:[^;]*;/,`data:attachment/file;`),r?r.location.href=e:location.assign(e),r=null},t.readAsDataURL(e)}else{let t=URL.createObjectURL(e);r?r.location.assign(t):location.href=t,r=null,setTimeout(function(){URL.revokeObjectURL(t)},4e4)}}var{assign:ss}=Object;function cs(){let e=Ee(!0),t=e.run(()=>L({})),n=[],r=[],i=Kt({install(e){Ko(i),i._a=e,e.provide(qo,i),e.config.globalProperties.$pinia=i,r.forEach(e=>n.push(e)),r=[]},use(e){return this._a?n.push(e):r.push(e),this},_p:n,_a:null,_e:e,_s:new Map,state:t});return i}var ls=()=>{};function us(e,t,n,r=ls){e.add(t);let i=()=>{e.delete(t)&&r()};return!n&&De()&&Oe(i),i}function ds(e,...t){e.forEach(e=>{e(...t)})}var fs=e=>e(),ps=Symbol(),ms=Symbol();function hs(e,t){e instanceof Map&&t instanceof Map?t.forEach((t,n)=>e.set(n,t)):e instanceof Set&&t instanceof Set&&t.forEach(e.add,e);for(let n in t){if(!t.hasOwnProperty(n))continue;let r=t[n],i=e[n];e[n]=Jo(i)&&Jo(r)&&e.hasOwnProperty(n)&&!I(r)&&!Ht(r)?hs(i,r):r}return e}var gs=Symbol();function _s(e){return!Jo(e)||!Object.prototype.hasOwnProperty.call(e,gs)}var{assign:vs}=Object;function ys(e){return!!(I(e)&&e.effect)}function bs(e,t,n,r){let{state:i,actions:a,getters:o}=t,s=n.state.value[e],c;function l(){return s||(n.state.value[e]=i?i():{}),vs(tn(n.state.value[e]),a,Object.keys(o||{}).reduce((t,r)=>(t[r]=Kt(ja(()=>{Ko(n);let t=n._s.get(e);return o[r].call(t,t)})),t),{}))}return c=xs(e,l,t,n,r,!0),c}function xs(e,t,n={},r,i,a){let o,s=vs({actions:{}},n),c={deep:!0},l,u,d=new Set,f=new Set,p,m=r.state.value[e];!a&&!m&&(r.state.value[e]={});let h;function g(t){let n;l=u=!1,typeof t==`function`?(t(r.state.value[e]),n={type:Yo.patchFunction,storeId:e,events:p}):(hs(r.state.value[e],t),n={type:Yo.patchObject,payload:t,storeId:e,events:p});let i=h=Symbol();wn().then(()=>{h===i&&(l=!0)}),u=!0,ds(d,n,r.state.value[e])}let _=a?function(){let{state:e}=n,t=e?e():{};this.$patch(e=>{vs(e,t)})}:ls;function v(){o.stop(),d.clear(),f.clear(),r._s.delete(e)}let y=(t,n=``)=>{if(ps in t)return t[ms]=n,t;let i=function(){Ko(r);let n=Array.from(arguments),a=new Set,o=new Set;function s(e){a.add(e)}function c(e){o.add(e)}ds(f,{args:n,name:i[ms],store:b,after:s,onError:c});let l;try{l=t.apply(this&&this.$id===e?this:b,n)}catch(e){throw ds(o,e),e}return l instanceof Promise?l.then(e=>(ds(a,e),e)).catch(e=>(ds(o,e),Promise.reject(e))):(ds(a,l),l)};return i[ps]=!0,i[ms]=n,i},b=Rt({_p:r,$id:e,$onAction:us.bind(null,f),$patch:g,$reset:_,$subscribe(t,n={}){let i=us(d,t,n.detached,()=>a()),a=o.run(()=>Wn(()=>r.state.value[e],r=>{(n.flush===`sync`?u:l)&&t({storeId:e,type:Yo.direct,events:p},r)},vs({},c,n)));return i},$dispose:v});r._s.set(e,b);let x=(r._a&&r._a.runWithContext||fs)(()=>r._e.run(()=>(o=Ee()).run(()=>t({action:y}))));for(let t in x){let n=x[t];I(n)&&!ys(n)||Ht(n)?a||(m&&_s(n)&&(I(n)?n.value=m[t]:hs(n,m[t])),r.state.value[e][t]=n):typeof n==`function`&&(x[t]=y(n,t),s.actions[t]=n)}return vs(b,x),vs(F(b),x),Object.defineProperty(b,"$state",{get:()=>r.state.value[e],set:e=>{g(t=>{vs(t,e)})}}),r._p.forEach(e=>{vs(b,o.run(()=>e({store:b,app:r._a,pinia:r,options:s})))}),m&&a&&n.hydrate&&n.hydrate(b.$state,m),l=!0,u=!0,b}function Ss(e,t,n){let r,i=typeof t==`function`;r=i?n:t;function a(n,a){let o=Vn();return n||=o?Bn(qo,null):null,n&&Ko(n),n=Go,n._s.has(e)||(i?xs(e,t,r,n):bs(e,r,n)),n._s.get(e)}return a.$id=e,a}function Cs(e,t){if(e==null)return;let n=e;for(let e=0;e1&&(t=ws(typeof e!=`object`||!e||!Object.prototype.hasOwnProperty.call(e,r)?Number.isInteger(Number(n[1]))?[]:{}:e[r],t,Array.prototype.slice.call(n,1))),Number.isInteger(Number(r))&&Array.isArray(e)?e.slice()[r]:Object.assign({},e,{[r]:t})}function Ts(e,t){if(e==null||t.length===0)return e;if(t.length===1){if(e==null)return e;if(Number.isInteger(t[0])&&Array.isArray(e))return Array.prototype.slice.call(e,0).splice(t[0],1);let n={};for(let t in e)n[t]=e[t];return delete n[t[0]],n}if(e[t[0]]==null){if(Number.isInteger(t[0])&&Array.isArray(e))return Array.prototype.concat.call([],e);let n={};for(let t in e)n[t]=e[t];return n}return ws(e,Ts(e[t[0]],Array.prototype.slice.call(t,1)),[t[0]])}function Es(e,t){return t.map(e=>e.split(`.`)).map(t=>[t,Cs(e,t)]).filter(e=>e[1]!==void 0).reduce((e,t)=>ws(e,t[1],t[0]),{})}function Ds(e,t){return t.map(e=>e.split(`.`)).reduce((e,t)=>Ts(e,t),e)}function Os(e,{storage:t,serializer:n,key:r,debug:i,pick:a,omit:o,beforeHydrate:s,afterHydrate:c},l,u=!0){try{u&&s?.(l);let i=t.getItem(r);if(i){let t=n.deserialize(i),r=a?Es(t,a):t,s=o?Ds(r,o):r;e.$patch(s)}u&&c?.(l)}catch(e){i&&console.error(`[pinia-plugin-persistedstate]`,e)}}function ks(e,{storage:t,serializer:n,key:r,debug:i,pick:a,omit:o}){try{let i=a?Es(e,a):e,s=o?Ds(i,o):i,c=n.serialize(s);t.setItem(r,c)}catch(e){i&&console.error(`[pinia-plugin-persistedstate]`,e)}}function As(e,t){return typeof e==`function`?e(t):typeof e==`string`?e:t}function js(e,t,n){let{pinia:r,store:i,options:{persist:a=n}}=e;if(!a)return;if(!(i.$id in r.state.value)){let e=r._s.get(i.$id.replace(`__hot:`,``));e&&Promise.resolve().then(()=>e.$persist());return}let o=(Array.isArray(a)?a:a===!0?[{}]:[a]).map(t);i.$hydrate=({runHooks:t=!0}={})=>{o.forEach(n=>{Os(i,n,e,t)})},i.$persist=()=>{o.forEach(e=>{ks(i.$state,e)})},o.forEach(t=>{Os(i,t,e),i.$subscribe((e,n)=>ks(n,t),{detached:!0})})}function Ms(e={}){return function(t){js(t,n=>{let r=As(n.key,t.store.$id);return{key:(e.key?e.key:e=>e)(r),debug:n.debug??e.debug??!1,serializer:n.serializer??e.serializer??{serialize:e=>JSON.stringify(e),deserialize:e=>JSON.parse(e)},storage:n.storage??e.storage??window.localStorage,beforeHydrate:n.beforeHydrate??e.beforeHydrate,afterHydrate:n.afterHydrate??e.afterHydrate,pick:n.pick,omit:n.omit}},e.auto??!1)}}var Ns=Ms(),Ps=typeof document<`u`;function Fs(e){return typeof e==`object`||`displayName`in e||`props`in e||`__vccOpts`in e}function Is(e){return e.__esModule||e[Symbol.toStringTag]===`Module`||e.default&&Fs(e.default)}var W=Object.assign;function Ls(e,t){let n={};for(let r in t){let i=t[r];n[r]=zs(i)?i.map(e):e(i)}return n}var Rs=()=>{},zs=Array.isArray;function Bs(e,t){let n={};for(let r in e)n[r]=r in t?t[r]:e[r];return n}var G=function(e){return e[e.MATCHER_NOT_FOUND=1]=`MATCHER_NOT_FOUND`,e[e.NAVIGATION_GUARD_REDIRECT=2]=`NAVIGATION_GUARD_REDIRECT`,e[e.NAVIGATION_ABORTED=4]=`NAVIGATION_ABORTED`,e[e.NAVIGATION_CANCELLED=8]=`NAVIGATION_CANCELLED`,e[e.NAVIGATION_DUPLICATED=16]=`NAVIGATION_DUPLICATED`,e}({}),Vs=Symbol(``);G.MATCHER_NOT_FOUND,G.NAVIGATION_GUARD_REDIRECT,G.NAVIGATION_ABORTED,G.NAVIGATION_CANCELLED,G.NAVIGATION_DUPLICATED;function Hs(e,t){return W(Error(),{type:e,[Vs]:!0},t)}function Us(e,t){return e instanceof Error&&Vs in e&&(t==null||!!(e.type&t))}var Ws=Symbol(``),Gs=Symbol(``),Ks=Symbol(``),qs=Symbol(``),Js=Symbol(``);function Ys(){return Bn(Ks)}function Xs(e){return Bn(qs)}var Zs=/#/g,Qs=/&/g,$s=/\//g,ec=/=/g,tc=/\?/g,nc=/\+/g,rc=/%5B/g,ic=/%5D/g,ac=/%5E/g,oc=/%60/g,sc=/%7B/g,cc=/%7C/g,lc=/%7D/g,uc=/%20/g;function dc(e){return e==null?``:encodeURI(``+e).replace(cc,`|`).replace(rc,`[`).replace(ic,`]`)}function fc(e){return dc(e).replace(sc,`{`).replace(lc,`}`).replace(ac,`^`)}function pc(e){return dc(e).replace(nc,`%2B`).replace(uc,`+`).replace(Zs,`%23`).replace(Qs,`%26`).replace(oc,"`").replace(sc,`{`).replace(lc,`}`).replace(ac,`^`)}function mc(e){return pc(e).replace(ec,`%3D`)}function hc(e){return dc(e).replace(Zs,`%23`).replace(tc,`%3F`)}function gc(e){return hc(e).replace($s,`%2F`)}function _c(e){if(e==null)return null;try{return decodeURIComponent(``+e)}catch{}return``+e}var vc=/\/$/,yc=e=>e.replace(vc,``);function bc(e,t,n=`/`){let r,i={},a=``,o=``,s=t.indexOf(`#`),c=t.indexOf(`?`);return c=s>=0&&c>s?-1:c,c>=0&&(r=t.slice(0,c),a=t.slice(c,s>0?s:t.length),i=e(a.slice(1))),s>=0&&(r||=t.slice(0,s),o=t.slice(s,t.length)),r=Oc(r??t,n),{fullPath:r+a+o,path:r,query:i,hash:_c(o)}}function xc(e,t){let n=t.query?e(t.query):``;return t.path+(n&&`?`)+n+(t.hash||``)}function Sc(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||`/`}function Cc(e,t,n){let r=t.matched.length-1,i=n.matched.length-1;return r>-1&&r===i&&wc(t.matched[r],n.matched[i])&&Tc(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}function wc(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function Tc(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var n in e)if(!Ec(e[n],t[n]))return!1;return!0}function Ec(e,t){return zs(e)?Dc(e,t):zs(t)?Dc(t,e):(e&&e.valueOf())===(t&&t.valueOf())}function Dc(e,t){return zs(t)?e.length===t.length&&e.every((e,n)=>e===t[n]):e.length===1&&e[0]===t}function Oc(e,t){if(e.startsWith(`/`))return e;if(!e)return t;let n=t.split(`/`),r=e.split(`/`),i=r[r.length-1];(i===`..`||i===`.`)&&r.push(``);let a=n.length-1,o,s;for(o=0;o1&&a--;else break}return n.slice(0,a).join(`/`)+`/`+r.slice(o).join(`/`)}var kc={path:`/`,name:void 0,params:{},query:{},hash:``,fullPath:`/`,matched:[],meta:{},redirectedFrom:void 0},Ac=function(e){return e.pop=`pop`,e.push=`push`,e}({}),jc=function(e){return e.back=`back`,e.forward=`forward`,e.unknown=``,e}({});function Mc(e){if(!e){if(Ps){let t=document.querySelector(`base`);e=t&&t.getAttribute(`href`)||`/`,e=e.replace(/^\w+:\/\/[^\/]+/,``)}else e=`/`}return e[0]!==`/`&&e[0]!==`#`&&(e=`/`+e),yc(e)}var Nc=/^[^#]+#/;function Pc(e,t){return e.replace(Nc,`#`)+t}function Fc(e,t){let n=document.documentElement.getBoundingClientRect(),r=e.getBoundingClientRect();return{behavior:t.behavior,left:r.left-n.left-(t.left||0),top:r.top-n.top-(t.top||0)}}var Ic=()=>({left:window.scrollX,top:window.scrollY});function Lc(e){let t;if(`el`in e){let n=e.el,r=typeof n==`string`&&n.startsWith(`#`),i=typeof n==`string`?r?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!i)return;t=Fc(i,e)}else t=e;`scrollBehavior`in document.documentElement.style?window.scrollTo(t):window.scrollTo(t.left==null?window.scrollX:t.left,t.top==null?window.scrollY:t.top)}function Rc(e,t){return(history.state?history.state.position-t:-1)+e}var zc=new Map;function Bc(e,t){zc.set(e,t)}function Vc(e){let t=zc.get(e);return zc.delete(e),t}function Hc(e){return typeof e==`string`||e&&typeof e==`object`}function Uc(e){return typeof e==`string`||typeof e==`symbol`}function Wc(e){let t={};if(e===``||e===`?`)return t;let n=(e[0]===`?`?e.slice(1):e).split(`&`);for(let e=0;ee&&pc(e)):[r&&pc(r)]).forEach(e=>{e!==void 0&&(t+=(t.length?`&`:``)+n,e!=null&&(t+=`=`+e))})}return t}function Kc(e){let t={};for(let n in e){let r=e[n];r!==void 0&&(t[n]=zs(r)?r.map(e=>e==null?null:``+e):r==null?r:``+r)}return t}function qc(){let e=[];function t(t){return e.push(t),()=>{let n=e.indexOf(t);n>-1&&e.splice(n,1)}}function n(){e=[]}return{add:t,list:()=>e.slice(),reset:n}}function Jc(e,t,n,r,i,a=e=>e()){let o=r&&(r.enterCallbacks[i]=r.enterCallbacks[i]||[]);return()=>new Promise((s,c)=>{let l=e=>{e===!1?c(Hs(G.NAVIGATION_ABORTED,{from:n,to:t})):e instanceof Error?c(e):Hc(e)?c(Hs(G.NAVIGATION_GUARD_REDIRECT,{from:t,to:e})):(o&&r.enterCallbacks[i]===o&&typeof e==`function`&&o.push(e),s())},u=a(()=>e.call(r&&r.instances[i],t,n,l)),d=Promise.resolve(u);e.length<3&&(d=d.then(l)),d.catch(e=>c(e))})}function Yc(e,t,n,r,i=e=>e()){let a=[];for(let o of e)for(let e in o.components){let s=o.components[e];if(!(t!==`beforeRouteEnter`&&!o.instances[e])){if(Fs(s)){let c=(s.__vccOpts||s)[t];c&&a.push(Jc(c,n,r,o,e,i))}else{let c=s();a.push(()=>c.then(a=>{if(!a)throw Error(`Couldn't resolve component "${e}" at "${o.path}"`);let s=Is(a)?a.default:a;o.mods[e]=a,o.components[e]=s;let c=(s.__vccOpts||s)[t];return c&&Jc(c,n,r,o,e,i)()}))}}}return a}function Xc(e,t){let n=[],r=[],i=[],a=Math.max(t.matched.length,e.matched.length);for(let o=0;owc(e,a))?r.push(a):n.push(a));let s=e.matched[o];s&&(t.matched.find(e=>wc(e,s))||i.push(s))}return[n,r,i]}var Zc=()=>location.protocol+`//`+location.host;function Qc(e,t){let{pathname:n,search:r,hash:i}=t,a=e.indexOf(`#`);if(a>-1){let t=i.includes(e.slice(a))?e.slice(a).length:1,n=i.slice(t);return n[0]!==`/`&&(n=`/`+n),Sc(n,``)}return Sc(n,e)+r+i}function $c(e,t,n,r){let i=[],a=[],o=null,s=({state:a})=>{let s=Qc(e,location),c=n.value,l=t.value,u=0;if(a){if(n.value=s,t.value=a,o&&o===c){o=null;return}u=l?a.position-l.position:0}else r(s);i.forEach(e=>{e(n.value,c,{delta:u,type:Ac.pop,direction:u?u>0?jc.forward:jc.back:jc.unknown})})};function c(){o=n.value}function l(e){i.push(e);let t=()=>{let t=i.indexOf(e);t>-1&&i.splice(t,1)};return a.push(t),t}function u(){if(document.visibilityState===`hidden`){let{history:e}=window;if(!e.state)return;e.replaceState(W({},e.state,{scroll:Ic()}),``)}}function d(){for(let e of a)e();a=[],window.removeEventListener(`popstate`,s),window.removeEventListener(`pagehide`,u),document.removeEventListener(`visibilitychange`,u)}return window.addEventListener(`popstate`,s),window.addEventListener(`pagehide`,u),document.addEventListener(`visibilitychange`,u),{pauseListeners:c,listen:l,destroy:d}}function el(e,t,n,r=!1,i=!1){return{back:e,current:t,forward:n,replaced:r,position:window.history.length,scroll:i?Ic():null}}function tl(e){let{history:t,location:n}=window,r={value:Qc(e,n)},i={value:t.state};i.value||a(r.value,{back:null,current:r.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function a(r,a,o){let s=e.indexOf(`#`),c=s>-1?(n.host&&document.querySelector(`base`)?e:e.slice(s))+r:Zc()+e+r;try{t[o?`replaceState`:`pushState`](a,``,c),i.value=a}catch(e){console.error(e),n[o?`replace`:`assign`](c)}}function o(e,n){a(e,W({},t.state,el(i.value.back,e,i.value.forward,!0),n,{position:i.value.position}),!0),r.value=e}function s(e,n){let o=W({},i.value,t.state,{forward:e,scroll:Ic()});a(o.current,o,!0),a(e,W({},el(r.value,e,null),{position:o.position+1},n),!1),r.value=e}return{location:r,state:i,push:s,replace:o}}function nl(e){e=Mc(e);let t=tl(e),n=$c(e,t.state,t.location,t.replace);function r(e,t=!0){t||n.pauseListeners(),history.go(e)}let i=W({location:``,base:e,go:r,createHref:Pc.bind(null,e)},t,n);return Object.defineProperty(i,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(i,"state",{enumerable:!0,get:()=>t.state.value}),i}var rl=function(e){return e[e.Static=0]=`Static`,e[e.Param=1]=`Param`,e[e.Group=2]=`Group`,e}({}),K=function(e){return e[e.Static=0]=`Static`,e[e.Param=1]=`Param`,e[e.ParamRegExp=2]=`ParamRegExp`,e[e.ParamRegExpEnd=3]=`ParamRegExpEnd`,e[e.EscapeNext=4]=`EscapeNext`,e}(K||{}),il={type:rl.Static,value:``},al=/[a-zA-Z0-9_]/;function ol(e){if(!e)return[[]];if(e===`/`)return[[il]];if(!e.startsWith(`/`))throw Error(`Invalid path "${e}"`);function t(e){throw Error(`ERR (${n})/"${l}": ${e}`)}let n=K.Static,r=n,i=[],a;function o(){a&&i.push(a),a=[]}let s=0,c,l=``,u=``;function d(){l&&=(n===K.Static?a.push({type:rl.Static,value:l}):n===K.Param||n===K.ParamRegExp||n===K.ParamRegExpEnd?(a.length>1&&(c===`*`||c===`+`)&&t(`A repeatable param (${l}) must be alone in its segment. eg: '/:ids+.`),a.push({type:rl.Param,value:l,regexp:u,repeatable:c===`*`||c===`+`,optional:c===`*`||c===`?`})):t(`Invalid state to consume buffer`),``)}function f(){l+=c}for(;st.length?t.length===1&&t[0]===ll.Static+ll.Segment?1:-1:0}function pl(e,t){let n=0,r=e.score,i=t.score;for(;n0&&t[t.length-1]<0}var hl={strict:!1,end:!0,sensitive:!1};function gl(e,t,n){let r=W(dl(ol(e.path),n),{record:e,parent:t,children:[],alias:[]});return t&&!r.record.aliasOf==!t.record.aliasOf&&t.children.push(r),r}function _l(e,t){let n=[],r=new Map;t=Bs(hl,t);function i(e){return r.get(e)}function a(e,n,r){let i=!r,s=yl(e);s.aliasOf=r&&r.record;let l=Bs(t,e),u=[s];if(`alias`in e){let t=typeof e.alias==`string`?[e.alias]:e.alias;for(let e of t)u.push(yl(W({},s,{components:r?r.record.components:s.components,path:e,aliasOf:r?r.record:s})))}let d,f;for(let t of u){let{path:u}=t;if(n&&u[0]!==`/`){let e=n.record.path,r=e[e.length-1]===`/`?``:`/`;t.path=n.record.path+(u&&r+u)}if(d=gl(t,n,l),r?r.alias.push(d):(f||=d,f!==d&&f.alias.push(d),i&&e.name&&!xl(d)&&o(e.name)),Tl(d)&&c(d),s.children){let e=s.children;for(let t=0;t{o(f)}:Rs}function o(e){if(Uc(e)){let t=r.get(e);t&&(r.delete(e),n.splice(n.indexOf(t),1),t.children.forEach(o),t.alias.forEach(o))}else{let t=n.indexOf(e);t>-1&&(n.splice(t,1),e.record.name&&r.delete(e.record.name),e.children.forEach(o),e.alias.forEach(o))}}function s(){return n}function c(e){let t=Cl(e,n);n.splice(t,0,e),e.record.name&&!xl(e)&&r.set(e.record.name,e)}function l(e,t){let i,a={},o,s;if(`name`in e&&e.name){if(i=r.get(e.name),!i)throw Hs(G.MATCHER_NOT_FOUND,{location:e});s=i.record.name,a=W(vl(t.params,i.keys.filter(e=>!e.optional).concat(i.parent?i.parent.keys.filter(e=>e.optional):[]).map(e=>e.name)),e.params&&vl(e.params,i.keys.map(e=>e.name))),o=i.stringify(a)}else if(e.path!=null)o=e.path,i=n.find(e=>e.re.test(o)),i&&(a=i.parse(o),s=i.record.name);else{if(i=t.name?r.get(t.name):n.find(e=>e.re.test(t.path)),!i)throw Hs(G.MATCHER_NOT_FOUND,{location:e,currentLocation:t});s=i.record.name,a=W({},t.params,e.params),o=i.stringify(a)}let c=[],l=i;for(;l;)c.unshift(l.record),l=l.parent;return{name:s,path:o,params:a,matched:c,meta:Sl(c)}}e.forEach(e=>a(e));function u(){n.length=0,r.clear()}return{addRoute:a,resolve:l,removeRoute:o,clearRoutes:u,getRoutes:s,getRecordMatcher:i}}function vl(e,t){let n={};for(let r of t)r in e&&(n[r]=e[r]);return n}function yl(e){let t={path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:e.aliasOf,beforeEnter:e.beforeEnter,props:bl(e),children:e.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:`components`in e?e.components||null:e.component&&{default:e.component}};return Object.defineProperty(t,"mods",{value:{}}),t}function bl(e){let t={},n=e.props||!1;if(`component`in e)t.default=n;else for(let r in e.components)t[r]=typeof n==`object`?n[r]:n;return t}function xl(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function Sl(e){return e.reduce((e,t)=>W(e,t.meta),{})}function Cl(e,t){let n=0,r=t.length;for(;n!==r;){let i=n+r>>1;pl(e,t[i])<0?r=i:n=i+1}let i=wl(e);return i&&(r=t.lastIndexOf(i,r-1)),r}function wl(e){let t=e;for(;t=t.parent;)if(Tl(t)&&pl(e,t)===0)return t}function Tl({record:e}){return!!(e.name||e.components&&Object.keys(e.components).length||e.redirect)}function El(e){let t=Bn(Ks),n=Bn(qs),r=ja(()=>{let n=Qt(e.to);return t.resolve(n)}),i=ja(()=>{let{matched:e}=r.value,{length:t}=e,i=e[t-1],a=n.matched;if(!i||!a.length)return-1;let o=a.findIndex(wc.bind(null,i));if(o>-1)return o;let s=jl(e[t-2]);return t>1&&jl(i)===s&&a[a.length-1].path!==s?a.findIndex(wc.bind(null,e[t-2])):o}),a=ja(()=>i.value>-1&&Al(n.params,r.value.params)),o=ja(()=>i.value>-1&&i.value===n.matched.length-1&&Tc(n.params,r.value.params));function s(n={}){if(kl(n)){let n=t[Qt(e.replace)?`replace`:`push`](Qt(e.to)).catch(Rs);return e.viewTransition&&typeof document<`u`&&`startViewTransition`in document&&document.startViewTransition(()=>n),n}return Promise.resolve()}return{route:r,href:ja(()=>r.value.href),isActive:a,isExactActive:o,navigate:s}}function Dl(e){return e.length===1?e[0]:e}var Ol=Qn({name:`RouterLink`,compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:`page`},viewTransition:Boolean},useLink:El,setup(e,{slots:t}){let n=Rt(El(e)),{options:r}=Bn(Ks),i=ja(()=>({[Ml(e.activeClass,r.linkActiveClass,`router-link-active`)]:n.isActive,[Ml(e.exactActiveClass,r.linkExactActiveClass,`router-link-exact-active`)]:n.isExactActive}));return()=>{let r=t.default&&Dl(t.default(n));return e.custom?r:Ma(`a`,{"aria-current":n.isExactActive?e.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:i.value},r)}}});function kl(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&(e.button===void 0||e.button===0)){if(e.currentTarget&&e.currentTarget.getAttribute){let t=e.currentTarget.getAttribute(`target`);if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function Al(e,t){for(let n in t){let r=t[n],i=e[n];if(typeof r==`string`){if(r!==i)return!1}else if(!zs(i)||i.length!==r.length||r.some((e,t)=>e.valueOf()!==i[t].valueOf()))return!1}return!0}function jl(e){return e?e.aliasOf?e.aliasOf.path:e.path:``}var Ml=(e,t,n)=>e??t??n,Nl=Qn({name:`RouterView`,inheritAttrs:!1,props:{name:{type:String,default:`default`},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:n}){let r=Bn(Js),i=ja(()=>e.route||r.value),a=Bn(Gs,0),o=ja(()=>{let e=Qt(a),{matched:t}=i.value,n;for(;(n=t[e])&&!n.components;)e++;return e}),s=ja(()=>i.value.matched[o.value]);zn(Gs,ja(()=>o.value+1)),zn(Ws,s),zn(Js,i);let c=L();return Wn(()=>[c.value,s.value,e.name],([e,t,n],[r,i,a])=>{t&&(t.instances[n]=e,i&&i!==t&&e&&e===r&&(t.leaveGuards.size||(t.leaveGuards=i.leaveGuards),t.updateGuards.size||(t.updateGuards=i.updateGuards))),e&&t&&(!i||!wc(t,i)||!r)&&(t.enterCallbacks[n]||[]).forEach(t=>t(e))},{flush:`post`}),()=>{let r=i.value,a=e.name,o=s.value,l=o&&o.components[a];if(!l)return Pl(n.default,{Component:l,route:r});let u=o.props[a],d=Ma(l,W({},u?u===!0?r.params:typeof u==`function`?u(r):u:null,t,{onVnodeUnmounted:e=>{e.component.isUnmounted&&(o.instances[a]=null)},ref:c}));return Pl(n.default,{Component:d,route:r})||d}}});function Pl(e,t){if(!e)return null;let n=e(t);return n.length===1?n[0]:n}var Fl=Nl;function Il(e){let t=_l(e.routes,e),n=e.parseQuery||Wc,r=e.stringifyQuery||Gc,i=e.history,a=qc(),o=qc(),s=qc(),c=Yt(kc),l=kc;Ps&&e.scrollBehavior&&`scrollRestoration`in history&&(history.scrollRestoration=`manual`);let u=Ls.bind(null,e=>``+e),d=Ls.bind(null,gc),f=Ls.bind(null,_c);function p(e,n){let r,i;return Uc(e)?(r=t.getRecordMatcher(e),i=n):i=e,t.addRoute(i,r)}function m(e){let n=t.getRecordMatcher(e);n&&t.removeRoute(n)}function h(){return t.getRoutes().map(e=>e.record)}function g(e){return!!t.getRecordMatcher(e)}function _(e,a){if(a=W({},a||c.value),typeof e==`string`){let r=bc(n,e,a.path),o=t.resolve({path:r.path},a),s=i.createHref(r.fullPath);return W(r,o,{params:f(o.params),hash:_c(r.hash),redirectedFrom:void 0,href:s})}let o;if(e.path!=null)o=W({},e,{path:bc(n,e.path,a.path).path});else{let t=W({},e.params);for(let e in t)t[e]??delete t[e];o=W({},e,{params:d(t)}),a.params=d(a.params)}let s=t.resolve(o,a),l=e.hash||``;s.params=u(f(s.params));let p=xc(r,W({},e,{hash:fc(l),path:s.path})),m=i.createHref(p);return W({fullPath:p,hash:l,query:r===Gc?Kc(e.query):e.query||{}},s,{redirectedFrom:void 0,href:m})}function v(e){return typeof e==`string`?bc(n,e,c.value.path):W({},e)}function y(e,t){if(l!==e)return Hs(G.NAVIGATION_CANCELLED,{from:t,to:e})}function b(e){return C(e)}function x(e){return b(W(v(e),{replace:!0}))}function S(e,t){let n=e.matched[e.matched.length-1];if(n&&n.redirect){let{redirect:r}=n,i=typeof r==`function`?r(e,t):r;return typeof i==`string`&&(i=i.includes(`?`)||i.includes(`#`)?i=v(i):{path:i},i.params={}),W({query:e.query,hash:e.hash,params:i.path==null?e.params:{}},i)}}function C(e,t){let n=l=_(e),i=c.value,a=e.state,o=e.force,s=e.replace===!0,u=S(n,i);if(u)return C(W(v(u),{state:typeof u==`object`?W({},a,u.state):a,force:o,replace:s}),t||n);let d=n;d.redirectedFrom=t;let f;return!o&&Cc(r,i,n)&&(f=Hs(G.NAVIGATION_DUPLICATED,{to:d,from:i}),ce(i,i,!0,!1)),(f?Promise.resolve(f):w(d,i)).catch(e=>Us(e)?Us(e,G.NAVIGATION_GUARD_REDIRECT)?e:se(e):D(e,d,i)).then(e=>{if(e){if(Us(e,G.NAVIGATION_GUARD_REDIRECT))return C(W({replace:s},v(e.to),{state:typeof e.to==`object`?W({},a,e.to.state):a,force:o}),t||d)}else e=re(d,i,!0,s,a);return ne(d,i,e),e})}function ee(e,t){let n=y(e,t);return n?Promise.reject(n):Promise.resolve()}function te(e){let t=de.values().next().value;return t&&typeof t.runWithContext==`function`?t.runWithContext(e):e()}function w(e,t){let n,[r,i,s]=Xc(e,t);n=Yc(r.reverse(),`beforeRouteLeave`,e,t);for(let i of r)i.leaveGuards.forEach(r=>{n.push(Jc(r,e,t))});let c=ee.bind(null,e,t);return n.push(c),pe(n).then(()=>{n=[];for(let r of a.list())n.push(Jc(r,e,t));return n.push(c),pe(n)}).then(()=>{n=Yc(i,`beforeRouteUpdate`,e,t);for(let r of i)r.updateGuards.forEach(r=>{n.push(Jc(r,e,t))});return n.push(c),pe(n)}).then(()=>{n=[];for(let r of s)if(r.beforeEnter){if(zs(r.beforeEnter))for(let i of r.beforeEnter)n.push(Jc(i,e,t));else n.push(Jc(r.beforeEnter,e,t))}return n.push(c),pe(n)}).then(()=>(e.matched.forEach(e=>e.enterCallbacks={}),n=Yc(s,`beforeRouteEnter`,e,t,te),n.push(c),pe(n))).then(()=>{n=[];for(let r of o.list())n.push(Jc(r,e,t));return n.push(c),pe(n)}).catch(e=>Us(e,G.NAVIGATION_CANCELLED)?e:Promise.reject(e))}function ne(e,t,n){s.list().forEach(r=>te(()=>r(e,t,n)))}function re(e,t,n,r,a){let o=y(e,t);if(o)return o;let s=t===kc,l=Ps?history.state:{};n&&(r||s?i.replace(e.fullPath,W({scroll:s&&l&&l.scroll},a)):i.push(e.fullPath,a)),c.value=e,ce(e,t,n,s),se()}let ie;function T(){ie||=i.listen((e,t,n)=>{if(!fe.listening)return;let r=_(e),a=S(r,fe.currentRoute.value);if(a){C(W(a,{replace:!0,force:!0}),r).catch(Rs);return}l=r;let o=c.value;Ps&&Bc(Rc(o.fullPath,n.delta),Ic()),w(r,o).catch(e=>Us(e,G.NAVIGATION_ABORTED|G.NAVIGATION_CANCELLED)?e:Us(e,G.NAVIGATION_GUARD_REDIRECT)?(C(W(v(e.to),{force:!0}),r).then(e=>{Us(e,G.NAVIGATION_ABORTED|G.NAVIGATION_DUPLICATED)&&!n.delta&&n.type===Ac.pop&&i.go(-1,!1)}).catch(Rs),Promise.reject()):(n.delta&&i.go(-n.delta,!1),D(e,r,o))).then(e=>{e||=re(r,o,!1),e&&(n.delta&&!Us(e,G.NAVIGATION_CANCELLED)?i.go(-n.delta,!1):n.type===Ac.pop&&Us(e,G.NAVIGATION_ABORTED|G.NAVIGATION_DUPLICATED)&&i.go(-1,!1)),ne(r,o,e)}).catch(Rs)})}let ae=qc(),oe=qc(),E;function D(e,t,n){se(e);let r=oe.list();return r.length?r.forEach(r=>r(e,t,n)):console.error(e),Promise.reject(e)}function O(){return E&&c.value!==kc?Promise.resolve():new Promise((e,t)=>{ae.add([e,t])})}function se(e){return E||(E=!e,T(),ae.list().forEach(([t,n])=>e?n(e):t()),ae.reset()),e}function ce(t,n,r,i){let{scrollBehavior:a}=e;if(!Ps||!a)return Promise.resolve();let o=!r&&Vc(Rc(t.fullPath,0))||(i||!r)&&history.state&&history.state.scroll||null;return wn().then(()=>a(t,n,o)).then(e=>e&&Lc(e)).catch(e=>D(e,t,n))}let le=e=>i.go(e),ue,de=new Set,fe={currentRoute:c,listening:!0,addRoute:p,removeRoute:m,clearRoutes:t.clearRoutes,hasRoute:g,getRoutes:h,resolve:_,options:e,push:b,replace:x,go:le,back:()=>le(-1),forward:()=>le(1),beforeEach:a.add,beforeResolve:o.add,afterEach:s.add,onError:oe.add,isReady:O,install(e){e.component(`RouterLink`,Ol),e.component(`RouterView`,Fl),e.config.globalProperties.$router=fe,Object.defineProperty(e.config.globalProperties,"$route",{enumerable:!0,get:()=>Qt(c)}),Ps&&!ue&&c.value===kc&&(ue=!0,b(i.location).catch(e=>{}));let t={};for(let e in kc)Object.defineProperty(t,e,{get:()=>c.value[e],enumerable:!0});e.provide(Ks,fe),e.provide(qs,zt(t)),e.provide(Js,c);let n=e.unmount;de.add(e),e.unmount=function(){de.delete(e),de.size<1&&(l=kc,ie&&ie(),ie=null,c.value=kc,ue=!1,E=!1),n()}}};function pe(e){return e.reduce((e,t)=>e.then(()=>te(t)),Promise.resolve())}return fe}var Ll=Ss(`userInfo`,{state:()=>({userInfo:{id:``,name:``,email:``,role:``}}),actions:{setUserInfo(e){this.userInfo=e},clearUserInfo(){this.userInfo={id:``,name:``,email:``,role:``}}},persist:{key:`user-info-storage`,storage:localStorage,pick:[`userInfo`]}}),Rl={key:0,class:`topbar`},zl={class:`nav-links`,"aria-label":`主导航`},Bl={class:`topbar-actions`},Vl={key:1,class:`topbar`},Hl={class:`nav-links`,"aria-label":`主导航`},Ul={class:`topbar-actions`},Wl=Qn({__name:`App`,setup(e){let t=Xs(),n=Ys(),r=ja(()=>t.path===`/login`),i=e=>t.path===e,a=Ll(),o=ja(()=>a.userInfo.role),s=L(!1);function c(){s.value=!s.value}function l(){a.clearUserInfo(),s.value=!1,n.push(`/login`)}return(e,t)=>{let n=Cr(`router-view`);return B(),V(z,null,[!r.value&&o.value!=`admin`&&o.value?(B(),V(`header`,Rl,[t[2]||=H(`a`,{class:`brand`,href:`#`},[H(`span`,{class:`brand-mark`},[H(`svg`,{viewBox:`0 0 24 24`,"aria-hidden":`true`},[H(`path`,{d:`M21 7.5a6.6 6.6 0 0 1-8.8 6.2L6.2 19.7a2.1 2.1 0 0 1-3-3l6-6A6.6 6.6 0 0 1 15.5 3l-2.7 2.7 1.5 1.5L17 4.5A6.6 6.6 0 0 1 21 7.5Z`})])]),H(`span`,null,`天泽汽修`)],-1),H(`nav`,zl,[H(`a`,{class:A({active:i(`/main`)}),href:`/main`},`首页`,2),H(`a`,{class:A({active:i(`/maintenance`)}),href:`/maintenance`},`车辆保养`,2),H(`a`,{class:A({active:i(`/bill`)}),href:`/bill`},`维修服务`,2),H(`a`,{class:A({active:i(`/contact`)}),href:`/contact`},`联系我们`,2)]),H(`div`,Bl,[t[1]||=aa(``,2),H(`div`,{class:A([`user-menu`,{open:s.value}])},[H(`button`,{class:`user-trigger`,type:`button`,"aria-label":`打开用户菜单`,onClick:c},[...t[0]||=[H(`span`,{class:`user-avatar`},`泽`,-1),H(`span`,{class:`user-name`},`在线客服`,-1)]]),H(`button`,{class:`logout-menu`,type:`button`,onClick:l},`退出登录`)],2)])])):oa(``,!0),!r.value&&o.value==`admin`?(B(),V(`header`,Vl,[t[5]||=H(`a`,{class:`brand`,href:`#`},[H(`span`,{class:`brand-mark`},[H(`svg`,{viewBox:`0 0 24 24`,"aria-hidden":`true`},[H(`path`,{d:`M21 7.5a6.6 6.6 0 0 1-8.8 6.2L6.2 19.7a2.1 2.1 0 0 1-3-3l6-6A6.6 6.6 0 0 1 15.5 3l-2.7 2.7 1.5 1.5L17 4.5A6.6 6.6 0 0 1 21 7.5Z`})])]),H(`span`,null,`天泽汽修`)],-1),H(`nav`,Hl,[H(`a`,{class:A({active:i(`/adduser`)}),href:`/adduser`},`添加用户`,2),H(`a`,{class:A({active:i(`/search`)}),href:`/search`},`用户查询`,2),H(`a`,{class:A({active:i(`/bill`)}),href:`/bill`},`维修服务`,2),H(`a`,{class:A({active:i(`/contact`)}),href:`/contact`},`联系我们`,2)]),H(`div`,Ul,[t[4]||=aa(``,2),H(`div`,{class:A([`user-menu`,{open:s.value}])},[H(`button`,{class:`user-trigger`,type:`button`,"aria-label":`打开用户菜单`,onClick:c},[...t[3]||=[H(`span`,{class:`user-avatar`},`泽`,-1),H(`span`,{class:`user-name`},`在线客服`,-1)]]),H(`button`,{class:`logout-menu`,type:`button`,onClick:l},`退出登录`)],2)])])):oa(``,!0),ea(n)],64)}}}),Gl=(e,t)=>{let n=e.__vccOpts||e;for(let[e,r]of t)n[e]=r;return n},Kl=Gl(Wl,[[`__scopeId`,`data-v-f0574cc4`]]),ql={},Jl={class:`workshop-page`};function Yl(e,t){return B(),V(`main`,Jl,[...t[0]||=[aa(`

专业服务 · 品质保障 · 贴心陪伴

爱车养护,就到天泽汽修 🚗

专注每一次检修,让您的每一段旅程都安心无忧。

机油更换

70天
OK

累计服务年限

15年
专业沉淀

技师团队

28位
经验丰富

客户好评率

99.2%
口碑之选

热门服务项目

为您的爱车提供全方位呵护

查看全部 →
B
常规保养

更换机油、机滤,全面检查车辆状态

热 门
A
空调清洗

深度清洁空调系统,清新车内空气

推荐
T
安全检测

刹车、轮胎、灯光等 32 项专业检查

安心
V
轮胎服务

轮胎检测、换位及动平衡服务

专业

便捷服务

轻松预约您的爱车服务

!
首次到店礼遇

新客户到店即可领取免费安全检测,提前预约还可享专属优惠。

立即预约 →
`,1)]])}var Xl=Gl(ql,[[`render`,Yl]]);function Zl(e,t){return function(){return e.apply(t,arguments)}}var{toString:Ql}=Object.prototype,{getPrototypeOf:$l}=Object,{iterator:eu,toStringTag:tu}=Symbol,nu=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),ru=e=>typeof e==`string`&&(e===`__proto__`||e===`constructor`||e===`prototype`),iu=(e,t,n)=>e===Object.prototype||!n&&t===null,au=e=>{if(!Object.isExtensible(e))return!1;let t=Object.getOwnPropertyNames(e);return Object.getOwnPropertySymbols&&t.push(...Object.getOwnPropertySymbols(e)),t.every(t=>{if(ru(t))return!1;let n=Object.getOwnPropertyDescriptor(e,t);return!!n&&n.configurable&&n.writable===!0})},ou=(e,t)=>{let n=e,r=[];for(;n!=null;){if(r.indexOf(n)!==-1)return!1;r.push(n);let i=$l(n);if(iu(n,i,n===e))return!1;if(nu(n,t))return!0;n=i}return!1},su=(e,t)=>e!=null&&ou(e,t)?e[t]:void 0,cu=e=>{if(e==null||typeof e!=`object`&&typeof e!=`function`)return e;let t=$l(e);if(t===null&&au(e))return e;let n=Object.create(null),r=Object.create(null),i=[],a=e;for(;a!=null&&i.indexOf(a)===-1;){i.push(a);let o=a===e?t:$l(a);if(iu(a,o,a===e))break;let s=Object.getOwnPropertyNames(a);Object.getOwnPropertySymbols&&s.push(...Object.getOwnPropertySymbols(a));for(let t of s)ru(t)||nu(r,t)||(n[t]=e[t],r[t]=!0);a=o}return n},lu=(e=>t=>{let n=Ql.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),uu=e=>(e=e.toLowerCase(),t=>lu(t)===e),du=e=>t=>typeof t===e,{isArray:fu}=Array,pu=du(`undefined`);function mu(e){return e!==null&&!pu(e)&&e.constructor!==null&&!pu(e.constructor)&&vu(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}var hu=uu(`ArrayBuffer`);function gu(e){let t;return t=typeof ArrayBuffer<`u`&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&hu(e.buffer),t}var _u=du(`string`),vu=du(`function`),yu=du(`number`),bu=e=>typeof e==`object`&&!!e,xu=e=>e===!0||e===!1,Su=e=>{if(!bu(e))return!1;let t=$l(e);return(t===null||t===Object.prototype||$l(t)===null)&&(iu(e,t,!0)||!nu(e,tu)&&!nu(e,eu))},Cu=e=>{if(!bu(e)||mu(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},wu=uu(`Date`),Tu=uu(`File`),Eu=e=>!!(e&&e.uri!==void 0),Du=e=>e&&e.getParts!==void 0,Ou=uu(`Blob`),ku=uu(`FileList`),Au=uu(`Set`),ju=e=>bu(e)&&vu(e.pipe);function Mu(){return typeof globalThis<`u`?globalThis:typeof self<`u`?self:typeof window<`u`?window:typeof global<`u`?global:{}}var Nu=Mu(),Pu=Nu.FormData===void 0?void 0:Nu.FormData,Fu=e=>{if(!e)return!1;if(Pu&&e instanceof Pu)return!0;let t=$l(e);if(!t||t===Object.prototype||!vu(e.append))return!1;let n=lu(e);return n===`formdata`||n===`object`&&vu(e.toString)&&e.toString()===`[object FormData]`},Iu=uu(`URLSearchParams`),[Lu,Ru,zu,Bu]=[`ReadableStream`,`Request`,`Response`,`Headers`].map(uu),Vu=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,``);function Hu(e,t,{allOwnKeys:n=!1}={}){if(e==null)return;let r,i;if(typeof e!=`object`&&(e=[e]),fu(e))for(r=0,i=e.length;r0;)if(i=n[r],t===i.toLowerCase())return i;return null}var Wu=typeof globalThis<`u`?globalThis:typeof self<`u`?self:typeof window<`u`?window:global,Gu=e=>!pu(e)&&e!==Wu;function Ku(...e){let{caseless:t,skipUndefined:n}=Gu(this)&&this||{},r={},i=t?Object.create(null):null,a=(e,t)=>{if(t===`__proto__`||t===`constructor`||t===`prototype`)return;let a=t;if(i&&typeof t==`string`){let e=t.toLowerCase(),n=i[e];n!==void 0&&nu(r,n)?a=n:i[e]=t}let o=nu(r,a)?r[a]:void 0;Su(o)&&Su(e)?r[a]=Ku(o,e):Su(e)?r[a]=Ku({},e):fu(e)?r[a]=e.slice():(!n||!pu(e))&&(r[a]=e)};for(let t=0,n=e.length;t(Hu(t,(t,r)=>{n&&vu(t)?Object.defineProperty(e,r,{__proto__:null,value:Zl(t,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,r,{__proto__:null,value:t,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:r}),e),Ju=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Yu=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),Object.defineProperty(e.prototype,"constructor",{__proto__:null,value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{__proto__:null,value:t.prototype}),n&&Object.assign(e.prototype,n)},Xu=(e,t,n,r)=>{let i,a,o,s={};if(t||={},e==null)return t;do{for(i=Object.getOwnPropertyNames(e),a=i.length;a-->0;)o=i[a],(!r||r(o,e,t))&&!s[o]&&(t[o]=e[o],s[o]=!0);e=n!==!1&&$l(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},Zu=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;let r=e.indexOf(t,n);return r!==-1&&r===n},Qu=e=>{if(!e)return null;if(fu(e))return e;let t=e.length;if(!Number.isSafeInteger(t)||t<0||t>4294967295)return null;let n=new Set,r=new Set,i=e;for(;i!=null&&n.size{let r=+e;Number.isInteger(r)&&r>=0&&r0;)a[t]=e[t];return a},$u=(e=>t=>e&&t instanceof e)(typeof Uint8Array<`u`&&$l(Uint8Array)),ed=(e,t)=>{let n=(e&&e[eu]).call(e),r;for(;(r=n.next())&&!r.done;){let n=r.value;t.call(e,n[0],n[1])}},td=(e,t)=>{let n,r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},nd=uu(`HTMLFormElement`),rd=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,t,n){return t.toUpperCase()+n}),{propertyIsEnumerable:id}=Object.prototype,ad=uu(`RegExp`),od=(e,t)=>{let n=Object.getOwnPropertyDescriptors(e),r={};Hu(n,(n,i)=>{let a;(a=t(n,i,e))!==!1&&(r[i]=a||n)}),Object.defineProperties(e,r)},sd=e=>{od(e,(t,n)=>{if(vu(e)&&[`arguments`,`caller`,`callee`].includes(n))return!1;let r=e[n];if(vu(r)){if(t.enumerable=!1,`writable`in t){t.writable=!1;return}t.set||=()=>{throw Error(`Can not rewrite read-only method '`+n+`'`)}}})},cd=(e,t)=>{let n={},r=e=>{e.forEach(e=>{n[e]=!0})};return fu(e)?r(e):r(String(e).split(t)),n},ld=()=>{},ud=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function dd(e){return!!(e&&vu(e.append)&&e[tu]===`FormData`&&e[eu])}var fd=e=>{let t=new WeakSet,n=e=>{if(bu(e)){if(t.has(e))return;if(mu(e))return e;if(!(`toJSON`in e)){t.add(e);let r;if(Au(e)){r=[];for(let t of e){let e=n(t);!pu(e)&&r.push(e)}}else r=fu(e)?[]:{},Hu(e,(e,t)=>{let i=n(e);!pu(i)&&(r[t]=i)});return t.delete(e),r}}return e};return n(e)},pd=uu(`AsyncFunction`),md=e=>e&&(bu(e)||vu(e))&&vu(e.then)&&vu(e.catch),hd=((e,t)=>e?setImmediate:t?((e,t)=>(Wu.addEventListener(`message`,({source:n,data:r})=>{n===Wu&&r===e&&t.length&&t.shift()()},!1),n=>{t.push(n),Wu.postMessage(e,`*`)}))(`axios@${Math.random()}`,[]):e=>setTimeout(e))(typeof setImmediate==`function`,vu(Wu.postMessage)),gd=typeof queueMicrotask<`u`?queueMicrotask.bind(Wu):typeof process<`u`&&process.nextTick||hd,_d=e=>e!=null&&vu(e[eu]),q={isArray:fu,isArrayBuffer:hu,isBuffer:mu,isFormData:Fu,isArrayBufferView:gu,isString:_u,isNumber:yu,isBoolean:xu,isObject:bu,isPlainObject:Su,isEmptyObject:Cu,isReadableStream:Lu,isRequest:Ru,isResponse:zu,isHeaders:Bu,isUndefined:pu,isDate:wu,isFile:Tu,isReactNativeBlob:Eu,isReactNative:Du,isBlob:Ou,isRegExp:ad,isFunction:vu,isStream:ju,isURLSearchParams:Iu,isTypedArray:$u,isFileList:ku,forEach:Hu,merge:Ku,extend:qu,trim:Vu,stripBOM:Ju,inherits:Yu,toFlatObject:Xu,kindOf:lu,kindOfTest:uu,endsWith:Zu,toArray:Qu,forEachEntry:ed,matchAll:td,isHTMLForm:nd,hasOwnProperty:nu,hasOwnProp:nu,hasOwnInPrototypeChain:ou,getSafeProp:su,toSafeFlatObject:cu,reduceDescriptors:od,freezeMethods:sd,toObjectSet:cd,toCamelCase:rd,noop:ld,toFiniteNumber:ud,findKey:Uu,global:Wu,isContextDefined:Gu,isSpecCompliantForm:dd,toJSONObject:fd,isAsyncFn:pd,isThenable:md,setImmediate:hd,asap:gd,isIterable:_d,isSafeIterable:e=>e!=null&&ou(e,eu)&&_d(e)},vd=q.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`]),yd=e=>{let t=Object.create(null),n,r,i;return e&&e.split(` +`).forEach(function(e){i=e.indexOf(`:`),n=e.substring(0,i).trim().toLowerCase(),r=e.substring(i+1).trim();let a=q.hasOwnProp(t,n);!n||a&&q.hasOwnProp(vd,n)||(n===`set-cookie`?a?t[n].push(r):t[n]=[r]:t[n]=a?t[n]+`, `+r:r)}),t};function bd(e){let t=0,n=e.length;for(;tt;){let t=e.charCodeAt(n-1);if(t!==9&&t!==32)break;--n}return t===0&&n===e.length?e:e.slice(t,n)}var xd=RegExp(`[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+`,`g`),Sd=RegExp(`[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+`,`g`);function Cd(e,t){return q.isArray(e)?e.map(e=>Cd(e,t)):bd(String(e).replace(t,``))}var wd=e=>Cd(e,xd),Td=e=>Cd(e,Sd);function Ed(e){let t=Object.create(null);return q.forEach(e.toJSON(),(e,n)=>{t[n]=Td(e)}),t}var Dd=Symbol(`internals`);function Od(e){return e&&String(e).trim().toLowerCase()}function kd(e){return e===!1||e==null?e:q.isArray(e)?e.map(kd):wd(String(e))}function Ad(e){let t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g,r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}var jd=/^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/;function Md(e){let t=0,n=e.length;for(;tt;){let t=e.charCodeAt(n-1);if(t!==9&&t!==32)break;--n}return t===0&&n===e.length?e:e.slice(t,n)}function Nd(e){let t=e.length-1;if(t<1||e.charCodeAt(0)!==34||e.charCodeAt(t)!==34)return e;let n=``;for(let r=1;r=t))return e;n+=e[r]}return n}function Pd(e){let t=Object.create(null),n=String(e),r=0,i=!1,a=!1;function o(e){let i=Md(n.slice(r,e)),a=i.indexOf(`=`);if(a<1)return;let o=Md(i.slice(0,a));if(!jd.test(o))return;let s=o.toLowerCase();if(s===`__proto__`||s===`constructor`||s===`prototype`)return;let c=Md(i.slice(a+1));t[s]=Nd(c)}for(let e=0;e/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()),Id=`__Proto__`,Ld=e=>e===`__proto__`?Id:e;function Rd(e,t,n,r,i){if(q.isFunction(r))return r.call(e,t,n);if(i&&(t=n),q.isString(t)){if(q.isString(r))return t.indexOf(r)!==-1;if(q.isRegExp(r))return r.test(t)}}function zd(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,n)=>t.toUpperCase()+n)}function Bd(e,t){let n=q.toCamelCase(` `+t);[`get`,`set`,`has`].forEach(r=>{Object.defineProperty(e,r+n,{__proto__:null,value:function(e,n,i){return this[r].call(this,t,e,n,i)},configurable:!0})})}var J=class{constructor(e){e&&this.set(e)}set(e,t,n){let r=this;function i(e,t,n){let i=Od(t);if(!i)return;let a=q.findKey(r,i);(!a||r[a]===void 0||n===!0||n===void 0&&r[a]!==!1)&&(r[Ld(a||t)]=kd(e))}let a=(e,t)=>q.forEach(e,(e,n)=>i(e,n,t));if(q.isPlainObject(e)||e instanceof this.constructor)a(e,t);else if(q.isString(e)&&(e=e.trim())&&!Fd(e))a(yd(e),t);else if(q.isObject(e)&&q.isSafeIterable(e)){let n=Object.create(null),r,i;for(let t of e){if(!q.isArray(t))throw TypeError(`Object iterator must return a key-value pair`);i=t[0],q.hasOwnProp(n,i)?(r=n[i],n[i]=q.isArray(r)?[...r,t[1]]:[r,t[1]]):n[i]=t[1]}a(n,t)}else e!=null&&i(t,e,n);return this}get(e,t){if(e=Od(e),e){let n=q.findKey(this,e);if(n){let e=this[n];if(!t)return e;if(t===!0)return Ad(e);if(q.isFunction(t))return t.call(this,e,n);if(q.isRegExp(t))return t.exec(e);throw TypeError(`parser must be boolean|regexp|function`)}}}has(e,t){if(e=Od(e),e){let n=q.findKey(this,e);return!!(n&&this[n]!==void 0&&(!t||Rd(this,this[n],n,t)))}return!1}delete(e,t){let n=this,r=!1;function i(e){if(e=Od(e),e){let i=q.findKey(n,e);i&&(!t||Rd(n,n[i],i,t))&&(delete n[i],r=!0)}}return q.isArray(e)?e.forEach(i):i(e),r}clear(e){let t=Object.keys(this),n=t.length,r=!1;for(;n--;){let i=t[n];(!e||Rd(this,this[i],i,e,!0))&&(delete this[i],r=!0)}return r}normalize(e){let t=this,n=Object.create(null);return q.forEach(this,(r,i)=>{let a=q.findKey(n,i);if(a){t[a]=kd(r),delete t[i];return}let o=Ld(e?zd(i):String(i).trim());o!==i&&delete t[i],t[o]=kd(r),n[o]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){let t=Object.create(null);return q.forEach(this,(n,r)=>{n!=null&&n!==!1&&(t[r]=e&&q.isArray(n)?n.join(`, `):n)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,t])=>e+`: `+t).join(` +`)}getSetCookie(){let e=this.get(`set-cookie`);return q.isArray(e)?e:e==null||e===!1?[]:[e]}get[Symbol.toStringTag](){return`AxiosHeaders`}static from(e){return e instanceof this?e:new this(e)}static parseParameters(e){return Pd(e)}static concat(e,...t){let n=new this(e);return t.forEach(e=>n.set(e)),n}static accessor(e){let t=(this[Dd]=this[Dd]={accessors:{}}).accessors,n=this.prototype;function r(e){let r=Od(e);t[r]||(Bd(n,e),t[r]=!0)}return q.isArray(e)?e.forEach(r):r(e),this}};J.accessor([`Content-Type`,`Content-Length`,`Accept`,`Accept-Encoding`,`User-Agent`,`Authorization`]),q.reduceDescriptors(J.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[n]=e}}}),q.freezeMethods(J);var Vd=`[REDACTED ****]`;function Hd(e){if(q.hasOwnProp(e,`toJSON`))return!0;let t=Object.getPrototypeOf(e);for(;t&&t!==Object.prototype;){if(q.hasOwnProp(t,`toJSON`))return!0;t=Object.getPrototypeOf(t)}return!1}function Ud(e,t){let n=new Set(t.map(e=>String(e).toLowerCase())),r=[],i=e=>{if(typeof e!=`object`||!e||q.isBuffer(e))return e;if(r.indexOf(e)!==-1)return;e instanceof J&&(e=e.toJSON()),r.push(e);let t;if(q.isArray(e))t=[],e.forEach((e,n)=>{let r=i(e);q.isUndefined(r)||(t[n]=r)});else{if(!q.isPlainObject(e)&&Hd(e))return r.pop(),e;t=Object.create(null);for(let[r,a]of Object.entries(e)){let e=n.has(r.toLowerCase())?Vd:i(a);q.isUndefined(e)||(t[r]=e)}}return r.pop(),t};return i(e)}function Wd(e){try{return String(e)}catch{return``}}function Gd(e){return e.errors.map(e=>{try{return e&&e.message?Wd(e.message):Wd(e)}catch{return``}}).filter(Boolean).join(`; `)||e.name||`AggregateError`}var Kd=` +Caused by: `,qd=Symbol(`causeStack`);function Jd(e,t){let n=q.hasOwnProp(e,qd)&&e[qd];return n&&t.endsWith(n)?t.length-n.length:-1}function Yd(e,t){try{let n=t&&t.stack;if(typeof n!=`string`||!n)return;let r=e.stack;if(typeof r!=`string`||!r)return;let i=Kd+n;e.stack=r+i,Object.defineProperty(e,qd,{__proto__:null,value:i})}catch{}}var Y=class e extends Error{static from(t,n,r,i,a,o){let s=t.message;!s&&q.isArray(t.errors)&&t.errors.length&&(s=Gd(t));let c=new e(s,n||t.code,r,i,a);return Object.defineProperty(c,"cause",{__proto__:null,value:t,writable:!0,enumerable:!1,configurable:!0}),c.name=t.name,Yd(c,t),t.status!=null&&c.status==null&&(c.status=t.status),o&&Object.assign(c,o),c}constructor(e,t,n,r,i){super(e),Object.defineProperty(this,"message",{__proto__:null,value:e,enumerable:!0,writable:!0,configurable:!0}),this.name=`AxiosError`,this.isAxiosError=!0,t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),i&&(this.response=i,this.status=i.status)}toJSON(){let e=this.config,t=e&&q.hasOwnProp(e,`redact`)?e.redact:void 0,n=q.isArray(t)&&t.length>0?Ud(e,t):q.toJSONObject(e);return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:n,code:this.code,status:this.status}}};Y.ERR_BAD_OPTION_VALUE=`ERR_BAD_OPTION_VALUE`,Y.ERR_BAD_OPTION=`ERR_BAD_OPTION`,Y.ECONNABORTED=`ECONNABORTED`,Y.ETIMEDOUT=`ETIMEDOUT`,Y.ECONNREFUSED=`ECONNREFUSED`,Y.ERR_NETWORK=`ERR_NETWORK`,Y.ERR_FR_TOO_MANY_REDIRECTS=`ERR_FR_TOO_MANY_REDIRECTS`,Y.ERR_DEPRECATED=`ERR_DEPRECATED`,Y.ERR_BAD_RESPONSE=`ERR_BAD_RESPONSE`,Y.ERR_BAD_REQUEST=`ERR_BAD_REQUEST`,Y.ERR_CANCELED=`ERR_CANCELED`,Y.ERR_NOT_SUPPORT=`ERR_NOT_SUPPORT`,Y.ERR_INVALID_URL=`ERR_INVALID_URL`,Y.ERR_FORM_DATA_DEPTH_EXCEEDED=`ERR_FORM_DATA_DEPTH_EXCEEDED`;function Xd(e){return q.isPlainObject(e)||q.isArray(e)}function Zd(e){return q.endsWith(e,`[]`)?e.slice(0,-2):e}function Qd(e,t,n){return e?e.concat(t).map(function(e,t){return e=Zd(e),!n&&t?`[`+e+`]`:e}).join(n?`.`:``):t}function $d(e){return q.isArray(e)&&!e.some(Xd)}var ef=q.toFlatObject(q,{},null,function(e){return/^is[A-Z]/.test(e)});function tf(e,t,n){if(!q.isObject(e))throw TypeError(`target must be an object`);t||=new FormData;let r=(e,t)=>{let r=q.getSafeProp(n,e);return q.isUndefined(r)?t:r},i=r(`metaTokens`,!0),a=r(`visitor`)||h,o=r(`dots`,!1),s=r(`indexes`,!1),c=r(`Blob`)||typeof Blob<`u`&&Blob,l=r(`maxDepth`,100),u=c&&q.isSpecCompliantForm(t),d=[];if(!q.isFunction(a))throw TypeError(`visitor must be a function`);function f(e){if(e===null)return``;if(q.isDate(e))return e.toISOString();if(q.isBoolean(e))return e.toString();if(!u&&q.isBlob(e))throw new Y(`Blob is not supported. Use a Buffer instead.`);if(q.isArrayBuffer(e)||q.isTypedArray(e)){if(u&&typeof c==`function`)return new c([e]);throw new Y(`Blob is not supported. Use a Buffer instead.`,Y.ERR_NOT_SUPPORT)}return e}function p(e){if(e>l)throw new Y(`Object is too deeply nested (`+e+` levels). Max depth: `+l,Y.ERR_FORM_DATA_DEPTH_EXCEEDED)}function m(e,t){if(l===1/0)return JSON.stringify(e);let n=[];return JSON.stringify(e,function(e,r){if(!q.isObject(r))return r;for(;n.length&&n[n.length-1]!==this;)n.pop();return n.push(r),p(t+n.length-1),r})}function h(e,n,r){let a=e;if(q.isReactNative(t)&&q.isReactNativeBlob(e))return t.append(Qd(r,n,o),f(e)),!1;if(e&&!r&&typeof e==`object`){if(q.endsWith(n,`{}`))n=i?n:n.slice(0,-2),e=m(e,1);else if(q.isArray(e)&&$d(e)||(q.isFileList(e)||q.endsWith(n,`[]`))&&(a=q.toArray(e)))return n=Zd(n),a.forEach(function(e,r){!(q.isUndefined(e)||e===null)&&t.append(s===!0?Qd([n],r,o):s===null?n:n+`[]`,f(e))}),!1}return Xd(e)?!0:(t.append(Qd(r,n,o),f(e)),!1)}let g=Object.assign(ef,{defaultVisitor:h,convertValue:f,isVisitable:Xd});function _(e,n,r=0){if(!q.isUndefined(e)){if(p(r),d.indexOf(e)!==-1)throw Error(`Circular reference detected in `+n.join(`.`));d.push(e),q.forEach(e,function(e,i){(!(q.isUndefined(e)||e===null)&&a.call(t,e,q.isString(i)?i.trim():i,n,g))===!0&&_(e,n?n.concat(i):[i],r+1)}),d.pop()}}if(!q.isObject(e))throw TypeError(`data must be an object`);return _(e),t}function nf(e){let t={"!":`%21`,"'":`%27`,"(":`%28`,")":`%29`,"~":`%7E`,"%20":`+`};return encodeURIComponent(e).replace(/[!'()~]|%20/g,function(e){return t[e]})}function rf(e,t){this._pairs=[],e&&tf(e,this,t)}var af=rf.prototype;af.append=function(e,t){this._pairs.push([e,t])},af.toString=function(e){let t=e?t=>e.call(this,t,nf):nf;return this._pairs.map(function(e){return t(e[0])+`=`+t(e[1])},``).join(`&`)};function of(e){return encodeURIComponent(e).replace(/%3A/gi,`:`).replace(/%24/g,`$`).replace(/%2C/gi,`,`).replace(/%20/g,`+`)}function sf(e,t,n){if(!t)return e;e||=``;let r=q.isFunction(n)?{serialize:n}:n,i=q.getSafeProp(r,`encode`)||of,a=q.getSafeProp(r,`serialize`),o;if(o=a?a(t,r):q.isURLSearchParams(t)?t.toString():new rf(t,r).toString(i),o){let t=e.indexOf(`#`);t!==-1&&(e=e.slice(0,t)),e+=(e.indexOf(`?`)===-1?`?`:`&`)+o}return e}var cf=Symbol(`internals`);function lf(e){return e?e.length:0}function uf(e){if(e)for(;e.length&&e[e.length-1]===null;)e.pop()}function df(e){return typeof e==`string`&&e!==``&&String(Number(e))===e?Number(e):e}function ff(e,t){let n=e.handlers,r=lf(n);n===t.handlersRef?r!==t.handlersLength&&(r?t.handlerEntries.forEach(function(e,r){n[e.index]!==e.handler&&t.handlerEntries.delete(r)}):t.handlerEntries.clear()):(t.handlersRef=n,t.handlerEntries.clear()),t.handlersLength=r}var pf=class{constructor(){this.handlers=[],this[cf]={handlersRef:this.handlers,handlersLength:this.handlers.length,handlerEntries:new Map,iterationDepth:0,nextId:0}}use(e,t,n){let r={fulfilled:e,rejected:t,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null},i=this[cf];this.handlers??=[],ff(this,i);let a=i.nextId++;return this.handlers.push(r),i.handlerEntries.set(a,{handler:r,index:this.handlers.length-1}),i.handlersLength=this.handlers.length,a}eject(e){let t=this[cf];ff(this,t);let n=df(e),r=t.handlerEntries.get(n);if(r){if(t.handlerEntries.delete(n),this.handlers[r.index]!==r.handler)return;this.handlers[r.index]=null,t.iterationDepth||(uf(this.handlers),t.handlersLength=this.handlers.length)}}clear(){this.handlers&&(this.handlers=[],ff(this,this[cf]))}forEach(e){let t=this[cf];ff(this,t),t.iterationDepth++;try{q.forEach(this.handlers,function(t){t!==null&&e(t)})}finally{--t.iterationDepth||(ff(this,t),uf(this.handlers),t.handlersLength=lf(this.handlers))}}},mf={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1,validateStatusUndefinedResolves:!0,encodeBasicAuthUsername:!1},hf={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<`u`?URLSearchParams:rf,FormData:typeof FormData<`u`?FormData:null,Blob:typeof Blob<`u`?Blob:null},protocols:[`http`,`https`,`file`,`blob`,`url`,`data`]},gf=t({hasBrowserEnv:()=>_f,hasStandardBrowserEnv:()=>yf,hasStandardBrowserWebWorkerEnv:()=>bf,navigator:()=>vf,origin:()=>xf}),_f=typeof window<`u`&&typeof document<`u`,vf=typeof navigator==`object`&&navigator||void 0,yf=_f&&(!vf||[`ReactNative`,`NativeScript`,`NS`].indexOf(vf.product)<0),bf=typeof WorkerGlobalScope<`u`&&self instanceof WorkerGlobalScope&&typeof self.importScripts==`function`,xf=_f&&window.location.href||`http://localhost`,X={...gf,...hf};function Sf(e,t){return tf(e,new X.classes.URLSearchParams,{visitor:function(e,t,n,r){return X.isNode&&q.isBuffer(e)?(this.append(t,e.toString(`base64`)),!1):r.defaultVisitor.apply(this,arguments)},...t})}var Cf=100;function wf(e){if(e>Cf)throw new Y(`FormData field is too deeply nested (`+e+` levels). Max depth: `+Cf,Y.ERR_FORM_DATA_DEPTH_EXCEEDED)}function Tf(e){let t=[],n=/[^.[\]]+|\[([^.[\]]*)]/g,r;for(;(r=n.exec(e))!==null;)wf(t.length),t.push(r[0]===`[]`?``:r[1]||r[0]);return t}function Ef(e){let t={},n=Object.keys(e),r,i=n.length,a;for(r=0;re!==String(t))?Ef(e):e}function Of(e){let t=[e];for(;t.length;){let e=t.pop();Object.keys(e).forEach(n=>{let r=e[n]=Df(e[n]);(q.isArray(r)||q.isPlainObject(r))&&t.push(r)})}return e}function kf(e){function t(e,n,r,i){wf(i);let a=e[i++];if(a===`__proto__`)return!0;let o=Number.isFinite(+a),s=i>=e.length;return a=!a&&q.isArray(r)?r.length:a,s?(q.hasOwnProp(r,a)?(r[a]=Df(r[a]),r[a]=q.isArray(r[a])?r[a].concat(n):[r[a],n]):r[a]=n,!o):((!q.hasOwnProp(r,a)||!q.isObject(r[a]))&&(r[a]=[]),t(e,n,r[a],i)&&q.isArray(r[a])&&(r[a]=Ef(r[a])),!o)}if(q.isFormData(e)&&q.isFunction(e.entries)){let n={};return q.forEachEntry(e,(e,r)=>{t(Tf(e),r,n,0)}),Of(n)}return null}var Af=Object.freeze([`get`,`delete`,`head`,`options`,`post`,`put`,`patch`,`purge`,`link`,`unlink`,`query`]),jf=(e,t)=>e!=null&&q.hasOwnProp(e,t)?e[t]:void 0;function Mf(e,t,n){if(q.isString(e))try{return(t||JSON.parse)(e),q.trim(e)}catch(e){if(e.name!==`SyntaxError`)throw e}return(n||JSON.stringify)(e)}var Nf={transitional:mf,adapter:[`xhr`,`http`,`fetch`],transformRequest:[function(e,t){let n=t.getContentType()||``,r=n.indexOf(`application/json`)>-1,i=q.isObject(e);if(i&&q.isHTMLForm(e)&&(e=new FormData(e)),q.isFormData(e))return r?JSON.stringify(kf(e)):e;if(q.isArrayBuffer(e)||q.isBuffer(e)||q.isStream(e)||q.isFile(e)||q.isBlob(e)||q.isReadableStream(e))return e;if(q.isArrayBufferView(e))return e.buffer;if(q.isURLSearchParams(e))return t.setContentType(`application/x-www-form-urlencoded;charset=utf-8`,!1),e.toString();let a;if(i){let t=jf(this,`formSerializer`);if(n.indexOf(`application/x-www-form-urlencoded`)>-1)return Sf(e,t).toString();if((a=q.isFileList(e))||n.indexOf(`multipart/form-data`)>-1){let n=jf(this,`env`),r=n&&n.FormData;return tf(a?{"files[]":e}:e,r&&new r,t)}}return i||r?(t.setContentType(`application/json`,!1),Mf(e)):e}],transformResponse:[function(e){let t=jf(this,`transitional`)||Nf.transitional,n=t&&t.forcedJSONParsing,r=jf(this,`responseType`),i=r===`json`;if(q.isResponse(e)||q.isReadableStream(e))return e;if(e&&q.isString(e)&&(n&&!r||i)){let n=!(t&&t.silentJSONParsing)&&i;try{return JSON.parse(e,jf(this,`parseReviver`))}catch(e){if(n)throw e.name===`SyntaxError`?Y.from(e,Y.ERR_BAD_RESPONSE,this,null,jf(this,`response`)):e}}return e}],timeout:0,xsrfCookieName:`XSRF-TOKEN`,xsrfHeaderName:`X-XSRF-TOKEN`,maxContentLength:-1,maxBodyLength:-1,env:{FormData:X.classes.FormData,Blob:X.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:`application/json, text/plain, */*`,"Content-Type":void 0}}};q.forEach(Af,e=>{Nf.headers[e]={}});function Pf(e,t){let n=this||Nf,r=t||n,i=J.from(r.headers),a=r.data;return q.forEach(e,function(e){a=e.call(n,a,i.normalize(),t?t.status:void 0)}),i.normalize(),a}function Ff(e){return!!(e&&e.__CANCEL__)}var If=class extends Y{constructor(e,t,n){super(e??`canceled`,Y.ERR_CANCELED,t,n),this.name=`CanceledError`,this.__CANCEL__=!0}};function Lf(e,t,n){let r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new Y(`Request failed with status code `+n.status,n.status>=400&&n.status<500?Y.ERR_BAD_REQUEST:Y.ERR_BAD_RESPONSE,n.config,n.request,n))}var Rf=/[\t\n\r]/g;function zf(e){if(typeof e!=`string`)return e;let t=0;for(;t{try{return decodeURIComponent(e)}catch{return e}},Hf=X.hasStandardBrowserEnv?{write(e,t,n,r,i,a,o){if(typeof document>`u`)return;let s=[`${e}=${encodeURIComponent(t)}`];q.isNumber(n)&&s.push(`expires=${new Date(n).toUTCString()}`),q.isString(r)&&s.push(`path=${r}`),q.isString(i)&&s.push(`domain=${i}`),a===!0&&s.push(`secure`),q.isString(o)&&s.push(`SameSite=${o}`),document.cookie=s.join(`; `)},read(e){if(typeof document>`u`)return null;let t=document.cookie;if(!t)return null;let n=t.split(`;`);for(let t=0;t{n=r,i=null,a&&=(clearTimeout(a),null),e(...t)};return[(...e)=>{let t=Date.now(),s=t-n;s>=r?o(e,t):(i=e,a||=setTimeout(()=>{a=null,o(i)},r-s))},()=>i&&o(i),(...e)=>o(e)]}var Gf=(e,t,n=3)=>{let r=0,i=Uf(50,250);return Wf(n=>{if(!n||!q.isNumber(n.loaded))return;let a=n.loaded,o=n.lengthComputable?n.total:void 0,s=Math.max(0,o==null?a:Math.min(a,o)),c=Math.max(0,s-r),l=i(c);r=Math.max(r,s),e({loaded:s,total:o,progress:o?s/o:void 0,bytes:c,rate:l||void 0,estimated:l&&o?(o-s)/l:void 0,event:n,lengthComputable:o!=null,[t?`download`:`upload`]:!0})},n)},Kf=(e,t)=>{let n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},qf=(e,t=q.asap)=>(...n)=>t(()=>e(...n)),Jf=X.hasStandardBrowserEnv?(e=>t=>(t=new URL(t,document.baseURI||X.origin),e.protocol===t.protocol&&e.host===t.host&&e.port===t.port))(new URL(X.origin)):()=>!0;function Yf(e){return typeof e==`string`&&/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Xf(e,t){if(!t)return e;let n=e.length;for(;n>0&&e.charCodeAt(n-1)===47;)n--;return e.slice(0,n)+`/`+t.replace(/^\/+/,``)}var Zf=/^https?:(?!\/\/)/i;function Qf(e){return e&&e.replace(/(^|&)([^=&]*=)?[^&]+/g,(e,t,n=``)=>`${t}${n}${Vd}`)}function $f(e){let t=e.replace(/^(https?:\/{0,2})[^/?#]*@/i,`$1${Vd}@`),n=t.indexOf(`#`),r=(n===-1?t:t.slice(0,n)).replace(/([?&][^=&#]*=)[^&#]*/g,`$1${Vd}`);return n===-1?r:`${r}#${Qf(t.slice(n+1))}`}function ep(e,t){if(typeof e==`string`){let n=zf(e);if(Zf.test(n))throw new Y(`Invalid URL ${JSON.stringify($f(n))}: missing "//" after protocol`,Y.ERR_INVALID_URL,t)}}function tp(e,t,n,r){ep(t,r);let i=!Yf(t);return e&&(i||n===!1)?(ep(e,r),Xf(e,t)):t}function np(e){let t=[{value:e}],n=new WeakSet,r=new WeakSet;for(;t.length;){let{value:e,done:i}=t.pop();if(!q.isPlainObject(e)&&!q.isArray(e))continue;if(i){n.delete(e);continue}if(n.has(e))throw new Y(`Circular reference detected in params`,Y.ERR_BAD_OPTION_VALUE);if(r.has(e))continue;r.add(e),n.add(e),t.push({value:e,done:!0});let a=Object.keys(e);Object.getOwnPropertySymbols&&Object.getOwnPropertyDescriptor&&Object.getOwnPropertySymbols(e).forEach(t=>{let n=Object.getOwnPropertyDescriptor(e,t);n&&n.enumerable&&a.push(t)}),a.forEach(n=>{if(n===`__proto__`||n===`constructor`||n===`prototype`){let r=Object.getOwnPropertyDescriptor(e,n);r&&q.hasOwnProp(r,`value`)&&t.push({value:r.value})}else t.push({value:e[n]})})}}var rp=e=>e instanceof J?{...e}:e,ip=e=>Object.getOwnPropertySymbols&&Object.getOwnPropertyDescriptor?Object.keys(e).concat(Object.getOwnPropertySymbols(e).filter(t=>{let n=Object.getOwnPropertyDescriptor(e,t);return n&&n.enumerable})):Object.keys(e);function ap(e,t){let n=[],r=new WeakMap,i={};function a(e,t){if(!q.isPlainObject(t))return q.isArray(t)?t.slice():t;let a=q.isPlainObject(e)?e:i,o=r.get(t);if(o||(o=new WeakMap,r.set(t,o)),o.has(a))return o.get(a);let s={};return o.set(a,s),n.push({base:a,source:t,result:s}),s}let o=q.isUndefined(t)?a(void 0,e):a(e,t);for(;n.length;){let{base:e,source:t,result:r}=n.pop(),i=new Set(ip(e)),o=new Set(ip(t));new Set([...i,...o]).forEach(n=>{if(n===`__proto__`||n===`constructor`||n===`prototype`)return;let s=o.has(n),c=s?t[n]:void 0,l=(!s||q.isPlainObject(c))&&i.has(n)?e[n]:void 0;r[n]=s?a(l,c):a(void 0,l)})}return np(o),o}function op(e,t,n,r){return q.isPlainObject(e)&&q.isPlainObject(t)?q.merge.call({caseless:r},e,t):q.isPlainObject(t)?q.merge({},t):q.isArray(t)?t.slice():t}function sp(e,t,n,r){if(!q.isUndefined(t))return op(e,t,n,r);if(!q.isUndefined(e))return op(void 0,e,n,r)}function cp(e,t){if(!q.isUndefined(t))return op(void 0,t)}function Z(e,t){if(!q.isUndefined(t))return op(void 0,t);if(!q.isUndefined(e))return op(void 0,e)}function lp(e,t,n){let r=q.hasOwnProp(t,`transitional`)?t.transitional:void 0;if(!q.isUndefined(r)){if(q.isPlainObject(r)){if(q.hasOwnProp(r,n))return r[n]}else return}let i=q.hasOwnProp(e,`transitional`)?e.transitional:void 0;if(q.isPlainObject(i)&&q.hasOwnProp(i,n))return i[n]}function up(e,t,n,r,i){if(q.hasOwnProp(i,n))return op(e,t);if(q.hasOwnProp(r,n))return op(void 0,e)}function dp(e,t,n){return sp(rp(e),rp(t),n,!0)}var fp=Object.freeze({__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0}),pp={url:cp,method:cp,data:cp,baseURL:Z,transformRequest:Z,transformResponse:Z,params:ap,paramsSerializer:Z,timeout:Z,timeoutErrorMessage:Z,withCredentials:Z,withXSRFToken:Z,adapter:Z,responseType:Z,xsrfCookieName:Z,xsrfHeaderName:Z,onUploadProgress:Z,onDownloadProgress:Z,decompress:Z,maxContentLength:Z,maxBodyLength:Z,beforeRedirect:Z,transport:Z,httpAgent:Z,httpsAgent:Z,cancelToken:Z,socketPath:Z,allowedSocketPaths:Z,responseEncoding:Z,validateStatus:up,headers:dp};function mp(e,t){e||={},t||={};let n=Object.create(null);Object.defineProperty(n,"hasOwnProperty",fp);let r=ip({...e,...t});for(let i=0,a=r.length;i{hp.includes(t.toLowerCase())&&e.set(t,n)})}var _p=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(e,t)=>String.fromCharCode(parseInt(t,16))),vp=e=>Hf.read(e);function yp(e,t=vp){let n=mp({},e),r=e=>q.hasOwnProp(n,e)?n[e]:void 0,i=r(`data`),a=r(`withXSRFToken`),o=r(`xsrfHeaderName`),s=r(`xsrfCookieName`),c=r(`headers`),l=r(`auth`),u=r(`baseURL`),d=r(`allowAbsoluteUrls`),f=r(`url`);if(n.headers=c=J.from(c),n.url=sf(tp(u,f,d,n),r(`params`),r(`paramsSerializer`)),l){let t=q.getSafeProp(l,`username`)||``,n=q.getSafeProp(l,`password`)||``,i=r(`transitional`),a=i&&q.hasOwnProp(i,`encodeBasicAuthUsername`)&&i.encodeBasicAuthUsername===!0;try{c.set(`Authorization`,`Basic `+btoa((a?_p(t):t)+`:`+(n?_p(n):``)))}catch(t){throw Y.from(t,Y.ERR_BAD_OPTION_VALUE,e)}}if(q.isFormData(i)){let e=q.getSafeProp(i,`getHeaders`);X.hasStandardBrowserEnv||X.hasStandardBrowserWebWorkerEnv||q.isReactNative(i)?c.setContentType(void 0):q.isFunction(e)&&gp(c,e.call(i),r(`formDataHeaderPolicy`))}if(X.hasStandardBrowserEnv&&(q.isFunction(a)&&(a=a(n)),a===!0||a==null&&Jf(n.url))){let e=o&&s&&t(s);e&&c.set(o,e)}return n}var bp=typeof XMLHttpRequest<`u`&&function(e){return new Promise(function(t,n){let r;try{let e=X.hasStandardBrowserEnv&&typeof window<`u`&&window.cookieStore;r=e&&q.isFunction(e.get)}catch{}let i,a=yp(e,r?e=>(i=e,null):void 0),o=a.data,s=J.from(a.headers).normalize(),{responseType:c,onUploadProgress:l,onDownloadProgress:u}=a,d,f,p,m,h,g,_;function v(){clearTimeout(f);try{h&&h()}catch(e){setTimeout(()=>{throw e})}try{g&&g()}catch(e){setTimeout(()=>{throw e})}y&&(m&&y.removeEventListener(`progress`,m),y.upload&&(p&&y.upload.removeEventListener(`progress`,p),h&&y.upload.removeEventListener(`loadend`,h))),a.cancelToken&&a.cancelToken.unsubscribe(d),a.signal&&a.signal.removeEventListener(`abort`,d)}let y=new XMLHttpRequest;y.open(a.method.toUpperCase(),a.url,!0),y.timeout=a.timeout;function b(r){if(!y)return;if(y.status===0&&(Bf(zf(a.url))||Bf(X.origin))!==`file`&&!(y.responseURL&&y.responseURL.startsWith(`file:`))){n(new Y(`Request aborted`,Y.ECONNABORTED,e,y)),v(),y=null;return}try{r?_&&_(r):g&&g()}catch(e){setTimeout(()=>{throw e})}if(!y)return;let i=J.from(`getAllResponseHeaders`in y&&y.getAllResponseHeaders());Lf(function(e){t(e),v()},function(e){n(e),v()},{data:!c||c===`text`||c===`json`?y.responseText:y.response,status:y.status,statusText:y.statusText,headers:i,config:e,request:y}),y=null}if(`onloadend`in y?y.onloadend=b:y.onreadystatechange=function(){!y||y.readyState!==4||y.status===0&&!(y.responseURL&&y.responseURL.startsWith(`file:`))||setTimeout(b)},y.onabort=function(){y&&=(n(new Y(`Request aborted`,Y.ECONNABORTED,e,y)),v(),null)},y.onerror=function(t){let r=new Y(t&&t.message?t.message:`Network Error`,Y.ERR_NETWORK,e,y);r.event=t||null,n(r),v(),y=null},y.ontimeout=function(){if(!y)return;let t=a.timeout?`timeout of `+a.timeout+`ms exceeded`:`timeout exceeded`,r=a.transitional||mf;a.timeoutErrorMessage&&(t=a.timeoutErrorMessage),n(new Y(t,r.clarifyTimeoutError?Y.ETIMEDOUT:Y.ECONNABORTED,e,y)),v(),y=null},o===void 0&&s.setContentType(null),q.isUndefined(a.withCredentials)||(y.withCredentials=!!a.withCredentials),c&&c!==`json`&&(y.responseType=a.responseType),u&&([m,g,_]=Gf(u,!0),y.addEventListener(`progress`,m)),l&&y.upload&&([p,h]=Gf(l),y.upload.addEventListener(`progress`,p),y.upload.addEventListener(`loadend`,h)),a.cancelToken||a.signal){if(d=t=>{if(!y)return;n(!t||t.type?new If(null,e,y):t);let r=y;v(),y=null,r.abort()},a.cancelToken&&a.cancelToken.subscribe(d),!y)return;a.signal&&(a.signal.aborted?d():a.signal.addEventListener(`abort`,d))}if(!y)return;let x=Bf(a.url);if(x&&!X.protocols.includes(x)){n(new Y(`Unsupported protocol `+x+`:`,Y.ERR_BAD_REQUEST,e)),v();return}let S=()=>{y&&(`setRequestHeader`in y&&q.forEach(Ed(s),function(e,t){y.setRequestHeader(t,e)}),y.send(o||null))};if(i){let t=typeof performance<`u`&&q.isFunction(performance.now)?()=>performance.now():Date.now,r=y.timeout>0?t()+Number(y.timeout):void 0,o=()=>{if(!y)return;let e=y;e.ontimeout(),e.abort()};if(r!==void 0){let e=()=>{let n=r-t();n>0?f=setTimeout(e,Math.min(n,2147483647)):o()};e()}Hf.readAsync(i).then(e=>{if(y){if(r!==void 0&&t()>=r){o();return}if(e){let t=q.hasOwnProp(a,`xsrfHeaderName`)&&a.xsrfHeaderName;s.set(t,e)}S()}}).catch(t=>{y&&=(n(Y.from(t,null,e,y)),v(),null)})}else S()})},xp=(e,t)=>{if(e=e?e.filter(Boolean):[],!t&&!e.length)return;let n=new AbortController,r=!1,i=function(e){if(!r){r=!0,o();let t=e instanceof Error?e:this.reason;n.abort(t instanceof Y?t:new If(t instanceof Error?t.message:t))}},a=t&&setTimeout(()=>{a=null,i(new Y(`timeout of ${t}ms exceeded`,Y.ETIMEDOUT))},t),o=()=>{e&&=(a&&clearTimeout(a),a=null,e.forEach(e=>{let t=q.getSafeProp(e,`unsubscribe`);q.isFunction(t)?t.call(e,i):e.removeEventListener(`abort`,i)}),null)};e.forEach(e=>{if(!r){if(e.aborted){i.call(e);return}e.addEventListener(`abort`,i,{once:!0})}});let{signal:s}=n;return s.unsubscribe=()=>q.asap(o),s},Sp=function*(e,t){let n=e.byteLength;if(!t||n{let i=Cp(e,t),a=0,o,s=e=>{o||(o=!0,r&&r(e))};return new ReadableStream({async pull(e){try{let{done:t,value:r}=await i.next();if(t){s(),e.close();return}let o=r.byteLength;n&&n(a+=o),e.enqueue(new Uint8Array(r))}catch(e){throw s(e),e}},cancel(e){return s(e),i.return()}},{highWaterMark:2})},Ep=`\r +`,Dp=e=>String(e).replace(/\r\n|\r|\n/g,Ep),Op=e=>String(e).replace(/[\r\n"]/g,e=>e===`\r`?`%0D`:e===` +`?`%0A`:`%22`),kp=(e,t)=>{let n=0;for(let r=0;r=55296&&i<=56319&&e.charCodeAt(r+1)>=56320&&e.charCodeAt(r+1)<=57343?(n+=4,r++):n+=3}return n},Ap=class extends TypeError{constructor(e,t){super(e),this.name=`FormDataError`,this.reason=t}};function jp(e,t,n,r,i){if(!q.isFunction(t))throw new Ap(`Blob is not supported`,`blob`);if(!q.isString(i)||!/^[A-Za-z0-9'()+_,./:=? -]{1,70}$/.test(i)||/ $/.test(i))throw new Ap(`Invalid multipart boundary`,`boundary`);let a=`--`+i+`--\r +`,o=a.length,s=[],c=e=>{if(o+e>n)throw r()};c(0);for(let[t,n]of e){let e=q.isString(n),r=e?kp(n,!0):n.size;if(!Number.isFinite(r)||r<0)throw new Ap(`Unsupported FormData part size`,`part`);c(r+kp(t,!0)+(!e&&n.name?kp(n.name,!1):0)+(!e&&n.type?kp(n.type,!1):0));let a=`--`+i+`\r +Content-Disposition: form-data; name="`+Op(Dp(t))+`"`;e||(a+=`; filename="`+Op(q.isString(n.name)?n.name:`blob`)+`"\r +Content-Type: `+String(n.type||`application/octet-stream`).replace(/[\r\n]/g,``)),a+=`\r +\r +`;let l=kp(a,!1)+r+2;c(l),o+=l,s.push({header:a,value:n,isString:e})}let l=[];for(let e of s)l.push(e.header,e.isString?Dp(e.value):e.value,Ep);return l.push(a),new t(l,{type:`multipart/form-data; boundary=`+i})}function Mp(e,t,n,r,i){if(!q.isFunction(t))throw new Y(`Blob is not supported`,Y.ERR_NOT_SUPPORT);if(i===void 0){if(q.isFunction(X.generateString))i=`axios-`+X.generateString(36,`0123456789abcdef`);else{let e=q.global.crypto;if(!e||!q.isFunction(e.getRandomValues))throw new Y(`Random byte generation is not supported`,Y.ERR_NOT_SUPPORT);let t=new Uint8Array(18);e.getRandomValues(t),i=`axios-`+Array.from(t,e=>(`0`+e.toString(16)).slice(-2)).join(``)}}try{return jp(e,t,n,r,i)}catch(e){if(e instanceof Ap){let t=e.reason===`boundary`?Y.ERR_BAD_OPTION_VALUE:Y.ERR_BAD_REQUEST;throw new Y(e.message,t)}throw e}}var Np=e=>e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102,Pp=(e,t,n)=>t+2e<=57?e-48:(e&223)-55,Ip=e=>e>=65&&e<=90||e>=97&&e<=122||e>=48&&e<=57||e===43||e===47||e===45||e===95,Lp=e=>e===9||e===10||e===12||e===13||e===32,Rp=e=>{let t=Math.floor(e/4),n=e%4;return t*3+(n===2?1:n===3?2:0)},zp=e=>{let t=e.length,n=0;return t>0&&e.charCodeAt(t-1)===61&&(n++,t>1&&e.charCodeAt(t-2)===61&&n++),Math.floor((t-n)*3/4)},Bp=e=>{let t=e.length,n=0,r=0,i=!1;for(let a=0;a0){i=!0;continue}n++}}return i||r>2||r>0&&(n+r)%4!=0||n%4==1?zp(e):Rp(n)},Vp=(e,t,n)=>{if(!e||typeof e!=`string`||!/^data:/i.test(e))return 0;let r=e.indexOf(`,`);if(r<0)return 0;let i=e.slice(5,r),a=e.slice(r+1);if(n.test(i))return t(a);let o=0;for(let e=0,t=a.length;e=55296&&n<=56319&&e+1=56320&&t<=57343?(o+=4,e++):o+=3}else o+=3}return o};function Hp(e){let t=typeof e==`string`?e.indexOf(`#`):-1;return Vp(t===-1?e:e.slice(0,t),Bp,/; *base64[\t\n\f\r ]*$/i)}var Up=`1.21.1`,Wp=65536,Gp={cache:`default`,redirect:`follow`,referrer:`about:client`,referrerPolicy:``,mode:`cors`,integrity:``,keepalive:!1,priority:`auto`,window:null},{isFunction:Kp}=q,qp=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(e,t)=>String.fromCharCode(parseInt(t,16))),Jp=e=>{if(!q.isString(e))return e;try{return decodeURIComponent(e)}catch{return e}},Yp=(e,...t)=>{try{return!!e(...t)}catch{return!1}},Xp=e=>{let t=e.indexOf(`://`),n=e;return t!==-1&&(n=n.slice(t+3)),n.includes(`@`)||n.includes(`:`)},Zp=e=>{let t=q.global!==void 0&&q.global!==null?q.global:globalThis,{ReadableStream:n,TextEncoder:r}=t;e=q.merge.call({skipUndefined:!0},{Request:t.Request,Response:t.Response,Blob:t.Blob},e);let i=q.hasOwnProp(e,`fetch`)?e.fetch:void 0,{Request:a,Response:o,Blob:s}=e,c=i?Kp(i):typeof fetch==`function`,l=Kp(a),u=Kp(o);if(!c)return!1;let d=c&&Kp(n),f=c&&(typeof r==`function`?(e=>t=>e.encode(t))(new r):async e=>new Uint8Array(await new a(e).arrayBuffer())),p=l&&d&&Yp(()=>{let e=!1,t=new a(X.origin,{body:new n,method:`POST`,get duplex(){return e=!0,`half`}}),r=t.headers.has(`Content-Type`);return t.body!=null&&t.body.cancel(),e&&!r}),m=u&&d&&Yp(()=>q.isReadableStream(new o(``).body)),h=Object.assign(Object.create(null),Gp);l&&!Yp(()=>new a(X.origin,h))&&(delete h.cache,Yp(()=>new a(X.origin,h))||(h.cache=Gp.cache));let g={stream:m&&(e=>e.body)};c&&[`text`,`arrayBuffer`,`blob`,`formData`,`stream`].forEach(e=>{!g[e]&&(g[e]=(t,n)=>{let r=t&&t[e];if(r)return r.call(t);throw new Y(`Response type '${e}' is not supported`,Y.ERR_NOT_SUPPORT,n)})});let _=async e=>{if(e==null)return 0;if(q.isBlob(e))return e.size;if(q.isArrayBufferView(e)||q.isArrayBuffer(e))return e.byteLength;if(q.isURLSearchParams(e)&&(e+=``),q.isString(e))return(await f(e)).byteLength},v=async(e,t)=>q.toFiniteNumber(e.getContentLength())??_(t);return async e=>{let{url:t,method:n,data:c,signal:u,cancelToken:f,timeout:y,onDownloadProgress:b,onUploadProgress:x,responseType:S,headers:C,withCredentials:ee=`same-origin`,fetchOptions:te,maxContentLength:w,maxBodyLength:ne,maxRedirects:re}=yp(e),ie=q.isNumber(w)&&w>-1,T=q.isNumber(ne)&&ne>-1,ae=t=>q.hasOwnProp(e,t)?e[t]:void 0,oe=i||fetch;S=S?(S+``).toLowerCase():`text`;let E=xp([u,f&&f.toAbortSignal()],y),D=null,O=E&&E.unsubscribe&&(()=>{E.unsubscribe()}),se,ce=null,le=null,ue=()=>new Y(`Request body larger than maxBodyLength limit`,Y.ERR_BAD_REQUEST,e,D);try{let i,u=ae(`auth`);u&&(i={username:q.getSafeProp(u,`username`)||``,password:q.getSafeProp(u,`password`)||``});let f;if(Xp(t)&&(f=new URL(t,X.origin),!i&&(f.username||f.password)&&(i={username:Jp(f.username),password:Jp(f.password)}),(f.username||f.password)&&(f.username=``,f.password=``,t=f.href)),i&&(C.delete(`authorization`),C.set(`Authorization`,`Basic `+btoa(qp((i.username||``)+`:`+(i.password||``))))),ie&&f&&f.protocol===`data:`&&Hp(f.href)>w)throw new Y(`maxContentLength size of `+w+` exceeded`,Y.ERR_BAD_RESPONSE,e,D);let y=q.isSpecCompliantForm(c)&&J.from(ae(`headers`)).getContentType(),de;if(q.isString(y)&&/^multipart\/form-data(?:\s*;|$)/i.test(y.trim())){let e=J.parseParameters(y);q.hasOwnProp(e,`boundary`)&&(de=e.boundary)}if(q.isSpecCompliantForm(c)&&n!==`get`&&n!==`head`&&(T||x&&p||de!==void 0)&&(c=Mp(c,s,T?ne:1/0,ue,de),C.setContentType(de===void 0?c.type:y),se=c.size),T&&n!==`get`&&n!==`head`){let e=await _(c);if(typeof e==`number`&&isFinite(e)&&(se=e,e>ne))throw ue()}let fe=T&&(q.isReadableStream(c)||q.isStream(c)),pe=(e,t,n)=>Tp(e,Wp,e=>{if(T&&e>ne)throw ce=ue();t&&t(e)},n);if(p&&n!==`get`&&n!==`head`&&(x||fe)){if(se??=await v(C,c),se!==0||fe){let e=new a(t,{method:`POST`,body:c,duplex:`half`}),n;if(q.isFormData(c)&&(n=e.headers.get(`content-type`))&&C.setContentType(n),e.body){let[t,n]=x&&Kf(se,Gf(qf(x)))||[];c=pe(e.body,t,n)}}}else if(fe&&!l&&d&&n!==`get`&&n!==`head`)c=pe(c);else if(fe&&l&&!p&&n!==`get`&&n!==`head`)throw new Y(`Stream request bodies are not supported by the current fetch implementation`,Y.ERR_NOT_SUPPORT,e,D);q.isString(ee)||(ee=ee?`include`:`omit`);let me=l&&`credentials`in a.prototype;if(q.isFormData(c)){let e=C.getContentType();e&&/^multipart\/form-data/i.test(e)&&!/boundary=/i.test(e)&&C.delete(`content-type`)}C.set(`User-Agent`,`axios/`+Up,!1);let k=te==null?te:Object.assign(Object.create(null),te);k&&(delete k.body,delete k.headers,delete k.method,delete k.signal,delete k.duplex,delete k.credentials);let he=Object.assign(Object.create(null),k,{signal:E,method:n.toUpperCase(),headers:Ed(C.normalize()),body:c,duplex:`half`,credentials:me?ee:void 0});l&&(q.forEach(h,(e,t)=>{he[t]===void 0&&(he[t]=e)}),he.signal===void 0&&(he.signal=null),he.body===void 0&&(he.body=null)),re===0&&(he.redirect=`manual`,k&&(k.redirect=`manual`)),D=l&&new a(t,he);let A=await(l?oe(D,k):oe(t,he)),ge=J.from(A.headers);if(ie){let t=q.toFiniteNumber(ge.getContentLength());if(t!=null&&t>w)throw new Y(`maxContentLength size of `+w+` exceeded`,Y.ERR_BAD_RESPONSE,e,D)}let _e=m&&(S===`stream`||S===`response`);if(m&&A.body&&(b||ie||_e&&O)){let t={};[`status`,`statusText`,`headers`].forEach(e=>{t[e]=A[e]});let n=q.toFiniteNumber(ge.getContentLength()),[r,i]=b&&Kf(n,Gf(qf(b),!0))||[],a=0;A=new o(Tp(A.body,Wp,t=>{if(ie&&(a=t,a>w))throw le=new Y(`maxContentLength size of `+w+` exceeded`,Y.ERR_BAD_RESPONSE,e,D);r&&r(t)},()=>{i&&i(),O&&O()}),t)}S||=`text`;let ve=await g[q.findKey(g,S)||`text`](A,e);if(ie&&!m&&!_e){let t;if(ve!=null&&(typeof ve.byteLength==`number`?t=ve.byteLength:typeof ve.size==`number`?t=ve.size:typeof ve==`string`&&(t=typeof r==`function`?new r().encode(ve).byteLength:ve.length)),typeof t==`number`&&t>w)throw new Y(`maxContentLength size of `+w+` exceeded`,Y.ERR_BAD_RESPONSE,e,D)}return!_e&&O&&O(),await new Promise((t,n)=>{Lf(t,n,{data:ve,headers:J.from(A.headers),status:A.status,statusText:A.statusText,config:e,request:D})})}catch(t){if(O&&O(),E&&E.aborted&&E.reason instanceof Y){let n=E.reason;throw n.config=e,D&&(n.request=D),t!==n&&Object.defineProperty(n,"cause",{__proto__:null,value:t,writable:!0,enumerable:!1,configurable:!0}),n}if(ce)throw D&&!ce.request&&(ce.request=D),ce;if(le)throw le;if(t instanceof Y)throw D&&!t.request&&(t.request=D),t;if(t&&t.name===`TypeError`&&/Load failed|fetch/i.test(t.message)){let n=new Y(`Network Error`,Y.ERR_NETWORK,e,D,t&&t.response);throw Object.defineProperty(n,"cause",{__proto__:null,value:t.cause||t,writable:!0,enumerable:!1,configurable:!0}),n}throw Y.from(t,t&&t.code,e,D,t&&t.response)}}},Qp=new Map,$p=e=>{let t=Object.create(null),n=e&&q.hasOwnProp(e,`env`)&&e.env;[`fetch`,`Request`,`Response`,`Blob`].forEach(e=>{n&&q.hasOwnProp(n,e)&&(t[e]=n[e])});let{fetch:r,Request:i,Response:a,Blob:o}=t,s=[i,a,r,o],c=s.length,l,u,d=Qp;for(;c--;)l=s[c],u=d.get(l),u===void 0&&d.set(l,u=c?new Map:Zp(t)),d=u;return u};$p();var em={http:null,xhr:bp,fetch:{get:$p}};q.forEach(em,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{__proto__:null,value:t})}catch{}Object.defineProperty(e,"adapterName",{__proto__:null,value:t})}});var tm=e=>`- ${e}`,nm=e=>q.isFunction(e)||e===null||e===!1;function rm(e,t){e=q.isArray(e)?e:[e];let{length:n}=e,r,i,a={};for(let o=0;o`adapter ${e} `+(t===!1?`is not supported by the environment`:`is not available in the build`));throw new Y(`There is no suitable adapter to dispatch the request `+(n?e.length>1?`since : +`+e.map(tm).join(` +`):` `+tm(e[0]):`as no adapter specified`),Y.ERR_NOT_SUPPORT)}return i}var im={getAdapter:rm,adapters:em};function am(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new If(null,e)}function om(){return typeof performance<`u`&&q.isFunction(performance.now)?()=>performance.now():Date.now}function sm(e,t){return Math.max(0,Math.round(e()-t))}function cm(e){let t=q.toSafeFlatObject(e);am(t),t.headers=J.from(q.getSafeProp(t,`headers`)),t.data=Pf.call(t,t.transformRequest),[`post`,`put`,`patch`].indexOf(t.method)!==-1&&t.headers.setContentType(`application/x-www-form-urlencoded`,!1);let n=im.getAdapter(t.adapter||Nf.adapter,t),r=om(),i=r();return n(t).then(function(e){am(t),e.duration=sm(r,i),t.response=e;try{e.data=Pf.call(t,t.transformResponse,e)}finally{delete t.response}return e.headers=J.from(e.headers),e},function(e){if(!Ff(e)&&(am(t),e&&e.response)){e.response.duration=sm(r,i),t.response=e.response;try{e.response.data=Pf.call(t,t.transformResponse,e.response)}finally{delete t.response}e.response.headers=J.from(e.response.headers)}return Promise.reject(e)})}var lm={};[`object`,`boolean`,`number`,`function`,`string`,`symbol`].forEach((e,t)=>{lm[e]=function(n){return typeof n===e||`a`+(t<1?`n `:` `)+e}});var um={};lm.transitional=function(e,t,n){function r(e,t){return`[Axios v`+Up+`] Transitional option '`+e+`'`+t+(n?`. `+n:``)}return(n,i,a)=>{if(e===!1)throw new Y(r(i,` has been removed`+(t?` in `+t:``)),Y.ERR_DEPRECATED);return t&&!um[i]&&(um[i]=!0,console.warn(r(i,` has been deprecated since v`+t+` and will be removed in the near future`))),!e||e(n,i,a)}},lm.spelling=function(e){return(t,n)=>(console.warn(`${n} is likely a misspelling of ${e}`),!0)};function dm(e,t,n){if(typeof e!=`object`||!e)throw new Y(`options must be an object`,Y.ERR_BAD_OPTION_VALUE);let r=Object.keys(e),i=r.length;for(;i-->0;){let a=r[i],o=Object.prototype.hasOwnProperty.call(t,a)?t[a]:void 0;if(o){let t=e[a],n=t===void 0||o(t,a,e);if(n!==!0)throw new Y(`option `+a+` must be `+n,Y.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new Y(`Unknown option `+a,Y.ERR_BAD_OPTION)}}var fm={assertOptions:dm,validators:lm},Q=fm.validators,pm=e=>{if(e==null||q.isPlainObject(e)||e instanceof J)return!0;try{return q.isObject(e)&&q.getSafeProp(e,Symbol.toStringTag)===`AxiosHeaders`&&[`toJSON`,`set`,`get`,`has`,`delete`,`clear`,`normalize`,`concat`,`toString`,Symbol.iterator].every(t=>q.isFunction(q.getSafeProp(e,t)))}catch{return!1}},mm=class{constructor(e){this.defaults=e||{},this.interceptors={request:new pf,response:new pf}}async request(e,t){try{return await this._request(e,t)}catch(e){if(e instanceof Error)try{let t={};Error.captureStackTrace?Error.captureStackTrace(t):t=Error();let n=t.stack,r=``;if(typeof n==`string`){let e=n.indexOf(` +`);r=e===-1?``:n.slice(e+1)}if(!e.stack)e.stack=r;else if(r){let t=r.indexOf(` +`),n=t===-1?-1:r.indexOf(` +`,t+1),i=n===-1?r:r.slice(n+1),a=String(e.stack),o=Jd(e,a),s=o===-1?a:a.slice(0,o),c=o===-1?``:a.slice(o);s.endsWith(i)||(e.stack=s+` +`+r+c)}}catch{}throw e}}_request(e,t){typeof e==`string`?(t||={},t.url=e):t=e||{},t=mp(this.defaults,t);let{transitional:n,paramsSerializer:r,headers:i}=t;n!==void 0&&fm.assertOptions(n,{silentJSONParsing:Q.transitional(Q.boolean),forcedJSONParsing:Q.transitional(Q.boolean),clarifyTimeoutError:Q.transitional(Q.boolean),legacyInterceptorReqResOrdering:Q.transitional(Q.boolean),advertiseZstdAcceptEncoding:Q.transitional(Q.boolean),validateStatusUndefinedResolves:Q.transitional(Q.boolean),encodeBasicAuthUsername:Q.transitional(Q.boolean)},!1),r!=null&&(q.isFunction(r)?t.paramsSerializer={serialize:r}:fm.assertOptions(r,{encode:Q.function,serialize:Q.function},!0)),t.allowAbsoluteUrls!==void 0||(q.hasOwnProp(this.defaults,`allowAbsoluteUrls`)&&this.defaults.allowAbsoluteUrls!==void 0?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),fm.assertOptions(t,{baseUrl:Q.spelling(`baseURL`),withXsrfToken:Q.spelling(`withXSRFToken`)},!0),t.method=(q.getSafeProp(t,`method`)||q.getSafeProp(this.defaults,`method`)||`get`).toLowerCase();let a=q.getSafeProp(i,`common`),o=q.getSafeProp(i,t.method),s=i&&q.merge(pm(a)?a:void 0,pm(o)?o:void 0);i&&q.forEach(Af.concat(`common`),e=>{pm(q.getSafeProp(i,e))&&delete i[e]}),t.headers=J.concat(s,i);let c=[],l=!0;this.interceptors.request.forEach(function(e){if(typeof e.runWhen==`function`&&e.runWhen(t)===!1)return;l&&=e.synchronous;let n=t.transitional||mf;n&&n.legacyInterceptorReqResOrdering?c.unshift(e.fulfilled,e.rejected):c.push(e.fulfilled,e.rejected)});let u=[];this.interceptors.response.forEach(function(e){u.push(e.fulfilled,e.rejected)});let d,f=0,p;if(!l){let e=[cm.bind(this),void 0];for(e.unshift(...c),e.push(...u),p=e.length,d=Promise.resolve(t);fcm.call(this,m)))}catch(e){d=Promise.reject(e)}break}}if(!d)try{d=cm.call(this,m)}catch(e){d=Promise.reject(e)}for(f=0,p=u.length;f{if(!n._listeners)return;let t=n._listeners.length;for(;t-->0;)n._listeners[t](e);n._listeners=null}),this.promise.then=e=>{let t,r=new Promise(e=>{n.subscribe(e),t=e}).then(e);return r.cancel=function(){n.unsubscribe(t)},r},e(function(e,r,i){n.reason||(n.reason=new If(e,r,i),t(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;let t=this._listeners.indexOf(e);t!==-1&&this._listeners.splice(t,1)}toAbortSignal(){let e=new AbortController,t=t=>{e.abort(t)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let t;return{token:new e(function(e){t=e}),cancel:t}}};function gm(e){return function(t){return e.apply(null,t)}}function _m(e){return q.isObject(e)&&e.isAxiosError===!0}var vm={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,ContentTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,UnprocessableContent:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerReturnsAnUnknownError:520,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(vm).forEach(([e,t])=>{vm[t]===void 0&&(vm[t]=e)});function ym(e){let t=new mm(e),n=Zl(mm.prototype.request,t);return q.extend(n,mm.prototype,t,{allOwnKeys:!0}),q.extend(n,t,null,{allOwnKeys:!0}),n.create=function(t){return ym(mp(e,t))},n}var $=ym(Nf);$.Axios=mm,$.CanceledError=If,$.CancelToken=hm,$.isCancel=Ff,$.VERSION=Up,$.toFormData=tf,$.AxiosError=Y,$.Cancel=$.CanceledError,$.all=function(e){return Promise.all(e)},$.spread=gm,$.isAxiosError=_m,$.mergeConfig=mp,$.AxiosHeaders=J,$.formToJSON=e=>kf(q.isHTMLForm(e)?new FormData(e):e),$.getAdapter=im.getAdapter,$.HttpStatusCode=vm,$.default=$;var bm=localStorage.getItem(`token`),xm=$.create({baseURL:`http://localhost:8081`,headers:{"Content-Type":`application/json`}});bm&&(xm.defaults.headers.common.Authorization=`Bearer ${bm}`,console.log(`Token found and set in headers.`,bm));var Sm={class:`login-page`},Cm={class:`form-panel`},wm={class:`login-card`},Tm=[`disabled`],Em=Qn({__name:`index`,setup(e){let t=Ll(),n=Ys(),r=L({phone:``,password:``,remember:!1}),i=L(!1);async function a(){i.value=!0;try{await new Promise(e=>setTimeout(e,1e3)),(await new Promise(e=>{setTimeout(()=>{e({data:{code:1}})},1e3)})).data.code===1?(t.setUserInfo({id:``,name:``,email:``,role:`admin`}),alert(`登录成功!手机号:${r.value.phone}`),t.userInfo.role===`admin`?n.push(`/admin`):n.push(`/main`)):(alert(`登录失败,请检查您的车牌号和密码。`),n.push(`/main`))}catch(e){console.error(`登录失败`,e)}finally{i.value=!1}}return(e,t)=>(B(),V(`main`,Sm,[t[4]||=aa(`
天泽汽修

专业 · 安心 · 值得信赖

让每一次出发
都安心无忧

一站式汽车维修保养服务,专业技师为您的爱车提供贴心呵护。

专业技师团队原厂品质配件透明服务价格
`,1),H(`section`,Cm,[H(`div`,wm,[t[1]||=aa(`
天泽汽修

欢迎回来

登录后即可查看您的车辆服务记录

`,2),H(`form`,{class:`login-form`,onSubmit:Lo(a,[`prevent`])},[t[0]||=aa(`
忘记密码?
`,5),H(`button`,{disabled:i.value,type:`submit`,class:`login-button`},j(i.value?`登录中...`:`登录`),9,Tm)],32),t[2]||=aa(`

还没有账号?立即注册

`,2)]),t[3]||=H(`p`,{class:`copyright`},`© 2024 天泽汽修 · 用心服务每一位车主`,-1)])]))}}),Dm={class:`bill-page`},Om={class:`page-header`},km={class:`bill-count`},Am={class:`bill-list`,"aria-label":`账单列表`},jm={class:`bill-info`},Mm={class:`bill-title`},Nm={class:`bill-time`},Pm={key:0,class:`list-status`},Fm={key:1,class:`list-status`},Im={key:2,class:`list-status`},Lm=20,Rm=Gl({__name:`index`,setup(e){let t=L([]),n=L(0),r=L(1),i=L(!1),a=L(!1),o=L(null),s;async function c(e){return{list:[],total:0}}async function l(e=!1){if(!(i.value||!e&&a.value)){e&&(r.value=1,a.value=!1,t.value=[]),i.value=!0;try{let i=await c({page:r.value,pageSize:Lm}),o=i?.list||[];t.value=e?o:t.value.concat(o),n.value=i?.total??t.value.length,a.value=o.length=n.value,a.value||(r.value+=1)}catch(e){console.error(`获取账单失败`,e)}finally{i.value=!1}}}function u(e){return Number(e||0).toFixed(2)}return pr(async()=>{await l(),await wn(),s=new IntersectionObserver(([e])=>e.isIntersecting&&l(),{rootMargin:`120px 0px`}),o.value&&s.observe(o.value)}),gr(()=>s?.disconnect()),(e,r)=>(B(),V(`main`,Dm,[H(`header`,Om,[r[0]||=H(`h1`,null,`我的账单`,-1),H(`span`,km,`共 `+j(n.value)+` 笔`,1)]),H(`section`,Am,[(B(!0),V(z,null,Dr(t.value,e=>(B(),V(`article`,{key:e.id,class:`bill-item`},[H(`div`,{class:A([`bill-icon`,e.type])},j(e.type===`income`?`收`:`支`),3),H(`div`,jm,[H(`div`,Mm,j(e.title||`账单`),1),H(`div`,Nm,j(e.time),1)]),H(`div`,{class:A([`bill-amount`,e.type])},j(e.type===`income`?`+`:`-`)+j(u(e.amount)),3)]))),128)),i.value?(B(),V(`div`,Pm,`正在加载...`)):t.value.length?a.value?(B(),V(`div`,Im,`没有更多账单了`)):oa(``,!0):(B(),V(`div`,Fm,`暂无账单`)),H(`div`,{ref_key:`loadMoreTarget`,ref:o,class:`load-more-target`,"aria-hidden":`true`},null,512)])]))}},[[`__scopeId`,`data-v-c010ae6f`]]),zm={class:`bill-page`},Bm={class:`page-header`},Vm={class:`bill-count`},Hm={class:`bill-list`,"aria-label":`账单列表`},Um={class:`bill-info`},Wm={class:`bill-title`},Gm={class:`bill-time`},Km={key:0,class:`list-status`},qm={key:1,class:`list-status`},Jm={key:2,class:`list-status`},Ym=20,Xm=Gl({__name:`index`,setup(e){let t=L([]),n=L(0),r=L(1),i=L(!1),a=L(!1),o=L(null),s;async function c(e){return{list:[],total:0}}async function l(e=!1){if(!(i.value||!e&&a.value)){e&&(r.value=1,a.value=!1,t.value=[]),i.value=!0;try{let i=await c({page:r.value,pageSize:Ym}),o=i?.list||[];t.value=e?o:t.value.concat(o),n.value=i?.total??t.value.length,a.value=o.length=n.value,a.value||(r.value+=1)}catch(e){console.error(`获取账单失败`,e)}finally{i.value=!1}}}function u(e){return Number(e||0).toFixed(2)}return pr(async()=>{await l(),await wn(),s=new IntersectionObserver(([e])=>e.isIntersecting&&l(),{rootMargin:`120px 0px`}),o.value&&s.observe(o.value)}),gr(()=>s?.disconnect()),(e,r)=>(B(),V(`main`,zm,[H(`header`,Bm,[r[0]||=H(`h1`,null,`我的账单`,-1),H(`span`,Vm,`共 `+j(n.value)+` 笔`,1)]),H(`section`,Hm,[(B(!0),V(z,null,Dr(t.value,e=>(B(),V(`article`,{key:e.id,class:`bill-item`},[H(`div`,{class:A([`bill-icon`,e.type])},j(e.type===`income`?`收`:`支`),3),H(`div`,Um,[H(`div`,Wm,j(e.title||`账单`),1),H(`div`,Gm,j(e.time),1)]),H(`div`,{class:A([`bill-amount`,e.type])},j(e.type===`income`?`+`:`-`)+j(u(e.amount)),3)]))),128)),i.value?(B(),V(`div`,Km,`正在加载...`)):t.value.length?a.value?(B(),V(`div`,Jm,`没有更多账单了`)):oa(``,!0):(B(),V(`div`,qm,`暂无账单`)),H(`div`,{ref_key:`loadMoreTarget`,ref:o,class:`load-more-target`,"aria-hidden":`true`},null,512)])]))}},[[`__scopeId`,`data-v-0737fd45`]]),Zm={class:`add-user-page`},Qm={class:`add-user-card`,"aria-labelledby":`add-user-title`},$m={class:`form-item`},eh={class:`input-wrap`},th={class:`form-row`},nh={class:`form-item`},rh={class:`input-wrap`},ih={class:`form-row`},ah={class:`form-item`},oh={class:`input-wrap`},sh={class:`form-item`},ch={class:`input-wrap`},lh={class:`form-item`},uh={class:`input-wrap`},dh=[`max`],fh={class:`form-item`},ph={class:`input-wrap`},mh=`123456`,hh=Gl({__name:`index`,setup(e){let t=L(``),n=L(`正常`),r=L(`user`),i=L(``),a=L(``),o=L(``),s=L(``),c=L(!1);function l(){if(c.value=!1,s.value=``,!t.value){s.value=`请输入客户车牌号`;return}let e={plate_number:t.value,password:mh,role:r.value,status:n.value,car_model:i.value||null,car_color:a.value||null,purchase_year:o.value||null};console.log(`新增用户参数`,e),s.value=`用户 ${t.value} 添加成功,初始密码为 ${mh}`,c.value=!0}function u(){t.value=``,n.value=`正常`,r.value=`user`,i.value=``,a.value=``,o.value=``,s.value=``,c.value=!1}return(e,d)=>(B(),V(`main`,Zm,[H(`section`,Qm,[d[26]||=aa(``,1),H(`form`,{class:`user-form`,onSubmit:Lo(l,[`prevent`])},[H(`div`,$m,[d[7]||=H(`label`,{for:`license-plate`},`用户名`,-1),d[8]||=H(`p`,{class:`field-tip`},`使用客户的车牌号作为登录用户名`,-1),H(`div`,eh,[d[6]||=H(`svg`,{viewBox:`0 0 24 24`,"aria-hidden":`true`},[H(`path`,{d:`M4 16h16M6 16V9l2-3h8l2 3v7M8 16v2m8-2v2M8 11h8`})],-1),Ln(H(`input`,{id:`license-plate`,"onUpdate:modelValue":d[0]||=e=>t.value=e,type:`text`,placeholder:`请输入车牌号,如:粤B12345`,maxlength:`8`,autocomplete:`off`,required:``},null,512),[[wo,t.value,void 0,{trim:!0}]])])]),H(`div`,th,[H(`div`,nh,[d[10]||=H(`label`,{for:`status`},`车辆状态`,-1),d[11]||=H(`p`,{class:`field-tip`},`设置车辆当前服务状态`,-1),H(`div`,rh,[Ln(H(`select`,{id:`status`,"onUpdate:modelValue":d[1]||=e=>n.value=e},[...d[9]||=[H(`option`,{value:`正常`},`正常`,-1),H(`option`,{value:`维修中`},`维修中`,-1),H(`option`,{value:`停用`},`停用`,-1)]],512),[[Oo,n.value]])])]),H(`div`,ih,[H(`div`,ah,[d[12]||=H(`label`,{for:`car-model`},`车型`,-1),d[13]||=H(`p`,{class:`field-tip`},`填写车辆品牌和具体车型`,-1),H(`div`,oh,[Ln(H(`input`,{id:`car-model`,"onUpdate:modelValue":d[2]||=e=>i.value=e,type:`text`,placeholder:`如:宝马 3系 2022款 325Li`,maxlength:`50`},null,512),[[wo,i.value,void 0,{trim:!0}]])])]),H(`div`,sh,[d[14]||=H(`label`,{for:`car-color`},`车辆颜色`,-1),d[15]||=H(`p`,{class:`field-tip`},`填写车辆外观颜色`,-1),H(`div`,ch,[Ln(H(`input`,{id:`car-color`,"onUpdate:modelValue":d[3]||=e=>a.value=e,type:`text`,placeholder:`如:星光棕`,maxlength:`20`},null,512),[[wo,a.value,void 0,{trim:!0}]])])])]),H(`div`,lh,[d[16]||=H(`label`,{for:`purchase-year`},`购车年份`,-1),d[17]||=H(`p`,{class:`field-tip`},`填写车辆购买年份`,-1),H(`div`,uh,[Ln(H(`input`,{id:`purchase-year`,"onUpdate:modelValue":d[4]||=e=>o.value=e,type:`number`,min:`1900`,max:new Date().getFullYear(),placeholder:`如:2022`},null,8,dh),[[wo,o.value,void 0,{number:!0}]])])]),H(`div`,fh,[d[19]||=H(`label`,{for:`role`},`账号角色`,-1),d[20]||=H(`p`,{class:`field-tip`},`设置用户可使用的权限`,-1),H(`div`,ph,[Ln(H(`select`,{id:`role`,"onUpdate:modelValue":d[5]||=e=>r.value=e},[...d[18]||=[H(`option`,{value:`user`},`普通用户`,-1),H(`option`,{value:`admin`},`管理员`,-1)]],512),[[Oo,r.value]])])])]),H(`div`,{class:`form-item`},[d[23]||=H(`label`,null,`初始密码`,-1),d[24]||=H(`p`,{class:`field-tip`},`系统统一使用默认密码,用户登录后可自行修改`,-1),H(`div`,{class:`default-password`},[d[21]||=H(`svg`,{viewBox:`0 0 24 24`,"aria-hidden":`true`},[H(`rect`,{x:`5`,y:`10`,width:`14`,height:`10`,rx:`2`}),H(`path`,{d:`M8 10V7a4 4 0 0 1 8 0v3`})],-1),H(`strong`,null,j(mh)),d[22]||=H(`span`,null,`默认密码`,-1)])]),s.value?(B(),V(`div`,{key:0,class:A([`form-message`,{success:c.value}]),role:`status`},j(s.value),3)):oa(``,!0),H(`div`,{class:`form-actions`},[H(`button`,{type:`button`,class:`cancel-button`,onClick:u},`重置`),d[25]||=H(`button`,{type:`submit`,class:`submit-button`},`确认添加`,-1)])],32),d[27]||=H(`footer`,{class:`card-footer`},[H(`span`,{class:`footer-dot`}),ia(` 添加成功后,客户可使用车牌号和默认密码登录 `)],-1)])]))}},[[`__scopeId`,`data-v-be3f1cf0`]]),gh={class:`search-page`},_h={class:`search-card`},vh={class:`search-input`},yh={class:`result-section`,"aria-live":`polite`},bh={class:`result-heading`},xh={class:`result-count`},Sh={class:`user-list`},Ch={class:`car-avatar`},wh={class:`user-info`},Th=[`aria-label`],Eh={key:0,class:`list-state`},Dh={key:1,class:`list-state error-state`},Oh={key:2,class:`list-state`},kh={key:3,class:`list-state`},Ah=6,jh=Gl({__name:`index`,setup(e){let t=L(``),n=L([]),r=L(0),i=L(1),a=L(!1),o=L(!1),s=L(``),c=L(null),l=Ys(),u,d=Array.from({length:24},(e,t)=>{let n=[`粤B12345`,`粤B8236K`,`粤A1902M`,`粤B5618T`,`粤B7801V`,`粤C29481`,`粤A67832`,`粤B40916`];return{id:t+1,plate:n[t%n.length],updatedAt:`${t+1}分钟前更新`,status:t===7||t===16?`停用`:`正常`}});function f({page:e,pageSize:t,keyword:n}){return new Promise(r=>{window.setTimeout(()=>{let i=n.toUpperCase(),a=i?d.filter(e=>e.plate.includes(i)):d,o=(e-1)*t;r({list:a.slice(o,o+t),total:a.length})},500)})}async function p(e=!1){if(!(a.value||!e&&o.value)){e&&(i.value=1,o.value=!1,n.value=[],s.value=``),a.value=!0;try{let a=await f({page:i.value,pageSize:Ah,keyword:t.value}),s=a?.list||[];n.value=e?s:n.value.concat(s),r.value=a?.total??n.value.length,o.value=s.length=r.value,o.value||(i.value+=1)}catch(e){console.error(`获取用户失败`,e),s.value=`用户加载失败,请稍后重试`}finally{a.value=!1}}}function m(){p(!0)}function h(){t.value=``,p(!0)}function g(){l.push(`/adminusers`)}return pr(async()=>{await p(!0),await wn(),u=new IntersectionObserver(([e])=>e.isIntersecting&&p(),{rootMargin:`160px 0px`}),c.value&&u.observe(c.value)}),gr(()=>u?.disconnect()),(e,i)=>(B(),V(`main`,gh,[H(`section`,_h,[i[3]||=aa(``,1),H(`form`,{class:`search-form`,onSubmit:Lo(m,[`prevent`])},[H(`div`,vh,[i[1]||=H(`svg`,{viewBox:`0 0 24 24`,"aria-hidden":`true`},[H(`circle`,{cx:`10.8`,cy:`10.8`,r:`6.8`}),H(`path`,{d:`m16 16 5 5`})],-1),Ln(H(`input`,{"onUpdate:modelValue":i[0]||=e=>t.value=e,type:`search`,placeholder:`请输入车牌号,如:粤B12345`,"aria-label":`输入车牌号`},null,512),[[wo,t.value,void 0,{trim:!0}]]),t.value?(B(),V(`button`,{key:0,type:`button`,class:`clear-button`,"aria-label":`清空搜索`,onClick:h},`×`)):oa(``,!0)]),i[2]||=H(`button`,{class:`search-button`,type:`submit`},`查询`,-1)],32)]),H(`section`,yh,[H(`div`,bh,[H(`div`,null,[H(`h2`,null,j(t.value?`查询结果`:`最近更改的用户`),1),H(`p`,null,j(t.value?`包含“${t.value}”的用户`:`展示最近更新的客户账号`),1)]),H(`span`,xh,`共 `+j(r.value)+` 位`,1)]),H(`div`,Sh,[(B(!0),V(z,null,Dr(n.value,e=>(B(),V(`article`,{onClick:g,key:e.id,class:`user-item`},[H(`div`,Ch,j(e.plate.slice(-1)),1),H(`div`,wh,[H(`strong`,null,j(e.plate),1),H(`span`,null,`客户账号 · `+j(e.updatedAt),1)]),H(`span`,{class:A([`user-status`,e.status===`正常`?`normal`:`disabled`])},[i[4]||=H(`i`,null,null,-1),ia(j(e.status),1)],2),H(`button`,{class:`more-button`,type:`button`,"aria-label":`查看 ${e.plate} 操作`},`···`,8,Th)]))),128)),a.value?(B(),V(`div`,Eh,[...i[5]||=[H(`span`,{class:`loading-spinner`},null,-1),ia(`正在加载用户... `,-1)]])):s.value?(B(),V(`div`,Dh,[ia(j(s.value)+` `,1),H(`button`,{type:`button`,onClick:p},`重新加载`)])):n.value.length?o.value?(B(),V(`div`,kh,`已加载全部用户`)):oa(``,!0):(B(),V(`div`,Oh,`没有找到匹配的用户`)),H(`div`,{ref_key:`loadMoreTarget`,ref:c,class:`load-more-target`,"aria-hidden":`true`},null,512)])])]))}},[[`__scopeId`,`data-v-ad643977`]]),Mh={class:`user-detail-page`},Nh={class:`detail-container`},Ph={class:`profile-card`},Fh={class:`profile-avatar`},Ih={class:`profile-main`},Lh={class:`profile-title`},Rh={class:`detail-grid`},zh={class:`info-card`},Bh={class:`info-list`},Vh={key:0},Hh=[`type`],Uh=[`onClick`],Wh=[`onClick`],Gh={class:`info-card`},Kh={class:`info-list`},qh={class:`highlight`},Jh={class:`info-card repair-card`},Yh={class:`card-heading repair-heading`},Xh={class:`record-count`},Zh={class:`repair-list`},Qh={class:`repair-content`},$h={class:`repair-price`},eg={class:`modal-header`},tg=Gl({__name:`index`,setup(e){let t=Xs(),n=Ys(),r=Rt({plate:String(t.query.plate||`粤B12345`),username:String(t.query.plate||`粤B12345`),status:`正常`,carModel:`宝马 3系 2022款 325Li`,carColor:`星光棕`,purchaseYear:`2022`,oilChangedAt:`2024-05-18`,oilType:`全合成 0W-30`,oilCycle:`10,000 公里 / 6 个月`,oilDuration:6,nextOilDate:`2024-11-18`,updatedAt:`今天 10:28`}),i=[{key:`plate`,label:`车牌号`,type:`text`,suffix:``},{key:`carModel`,label:`车型`,type:`text`,suffix:``},{key:`carColor`,label:`车辆颜色`,type:`text`,suffix:``},{key:`purchaseYear`,label:`购车年份`,type:`number`,suffix:` 年`}],a=L(``),o=L(``),s=L(!1),c=Rt({type:``,duration:6}),l=L(!1),u=Rt({title:``,date:``,description:``,price:``}),d=[{id:1,date:`2024-05-18`,title:`常规保养`,description:`更换机油、机油滤清器,车辆 32 项安全检测`,price:`¥680`},{id:2,date:`2024-03-06`,title:`空调系统清洗`,description:`空调滤芯更换,蒸发箱深度清洁`,price:`¥280`},{id:3,date:`2023-12-22`,title:`刹车系统检查`,description:`前刹车片检查及刹车油液位检测`,price:`¥120`}];function f(){console.log(`showOilForm.value:`,s.value),s.value=!s.value}function p(){window.history.length>1?n.back():n.push(`/search`)}function m(){}function h(e){a.value=e,o.value=r[e]}async function g(e){o.value&&(r[e]=o.value,await y(),await b(),a.value=``)}async function _(){!c.type||!c.duration||(r.oilType=c.type,r.oilDuration=c.duration,r.oilChangedAt=new Date().toISOString().slice(0,10),r.oilCycle=`10,000 公里 / ${c.duration} 个月`,await y(),await b(),s.value=!1)}async function v(){let e={id:Date.now(),...u};d.unshift(e),await y(),await b(),Object.assign(u,{title:``,date:``,description:``,price:``}),l.value=!1}async function y(){}async function b(){}function x(e){!e.target.closest(`.editable-row`)&&!e.target.closest(`.oil-form`)&&!e.target.closest(`.oil-button`)&&(console.log(`点击了编辑区域外部,关闭编辑状态`),a.value=``,s.value=!1)}return pr(()=>document.addEventListener(`click`,x)),gr(()=>document.removeEventListener(`click`,x)),(e,t)=>(B(),V(`main`,Mh,[H(`section`,Nh,[H(`header`,{class:`page-header`},[t[13]||=H(`div`,null,[H(`p`,{class:`eyebrow`},`CUSTOMER PROFILE`),H(`h1`,null,`用户详情`),H(`p`,{class:`subtitle`},`查看客户车辆信息与维修保养记录`)],-1),H(`div`,{class:`header-actions`},[H(`button`,{class:`back-button`,type:`button`,onClick:p},[...t[12]||=[H(`span`,null,`←`,-1),ia(` 返回用户列表 `,-1)]])])]),H(`section`,Ph,[H(`div`,Fh,j(r.plate.slice(-1)),1),H(`div`,Ih,[H(`div`,Lh,[H(`h2`,null,j(r.plate),1),H(`span`,{class:A([`status`,{disabled:r.status!==`正常`}])},[t[14]||=H(`i`,null,null,-1),ia(j(r.status),1)],2)]),H(`p`,null,`用户账号:`+j(r.username),1),H(`p`,null,`最近更新:`+j(r.updatedAt),1)]),H(`button`,{class:`delete-button`,type:`button`,onClick:m},`删除用户`)]),H(`div`,Rh,[H(`section`,zh,[t[15]||=H(`div`,{class:`card-heading`},[H(`div`,{class:`heading-icon blue`},[H(`svg`,{viewBox:`0 0 24 24`,"aria-hidden":`true`},[H(`path`,{d:`M4 16h16M6 16V9l2-3h8l2 3v7M8 16v2m8-2v2M8 11h8`})])]),H(`div`,null,[H(`h3`,null,`车辆信息`),H(`p`,null,`客户爱车的基础资料`)])],-1),H(`dl`,Bh,[(B(),V(z,null,Dr(i,e=>H(`div`,{key:e.key,class:`editable-row`,onClick:t[1]||=Lo(()=>{},[`stop`])},[H(`dt`,null,j(e.label),1),a.value===e.key?Ln((B(),V(`input`,{key:1,"onUpdate:modelValue":t[0]||=e=>o.value=e,class:`inline-input`,type:e.type||`text`},null,8,Hh)),[[Mo,o.value]]):(B(),V(`dd`,Vh,j(r[e.key])+j(e.suffix),1)),a.value===e.key?(B(),V(`button`,{key:3,type:`button`,class:`save-field-button`,onClick:t=>g(e.key)},`保存`,8,Wh)):(B(),V(`button`,{key:2,type:`button`,onClick:t=>h(e.key)},`修改`,8,Uh))])),64))])]),H(`section`,Gh,[t[22]||=H(`div`,{class:`card-heading`},[H(`div`,{class:`heading-icon orange`},[H(`svg`,{viewBox:`0 0 24 24`,"aria-hidden":`true`},[H(`path`,{d:`M6 3h12v18H6zM9 7h6M9 11h6M9 15h3`})])]),H(`div`,null,[H(`h3`,null,`机油保养`),H(`p`,null,`记录最近一次机油服务`)])],-1),H(`dl`,Kh,[H(`div`,null,[t[16]||=H(`dt`,null,`上次更换日期`,-1),H(`dd`,null,j(r.oilChangedAt),1)]),H(`div`,null,[t[17]||=H(`dt`,null,`机油类型`,-1),H(`dd`,null,j(r.oilType),1)]),H(`div`,null,[t[18]||=H(`dt`,null,`建议更换周期`,-1),H(`dd`,null,j(r.oilCycle),1)]),H(`div`,null,[t[19]||=H(`dt`,null,`下次建议日期`,-1),H(`dd`,qh,j(r.nextOilDate),1)])]),H(`button`,{type:`button`,class:`oil-button`,onClick:f},j(s.value?`取消更新`:`添加 / 更新机油`),1),s.value?(B(),V(`div`,{key:0,class:`oil-form`,onClick:t[4]||=Lo(()=>{},[`stop`])},[H(`label`,null,[t[20]||=ia(`机油类型`,-1),Ln(H(`input`,{"onUpdate:modelValue":t[2]||=e=>c.type=e,type:`text`,placeholder:`如:全合成 0W-30`},null,512),[[wo,c.type,void 0,{trim:!0}]])]),H(`label`,null,[t[21]||=ia(`持续时间`,-1),Ln(H(`input`,{"onUpdate:modelValue":t[3]||=e=>c.duration=e,type:`number`,min:`1`,placeholder:`请输入持续月数`},null,512),[[wo,c.duration,void 0,{number:!0}]])]),H(`button`,{type:`button`,class:`save-field-button`,onClick:_},`保存机油信息`)])):oa(``,!0)])]),H(`section`,Jh,[H(`div`,Yh,[t[23]||=H(`div`,{class:`heading-icon green`},[H(`svg`,{viewBox:`0 0 24 24`,"aria-hidden":`true`},[H(`path`,{d:`M21 7.5a6.6 6.6 0 0 1-8.8 6.2L6.2 19.7a2.1 2.1 0 0 1-3-3l6-6A6.6 6.6 0 0 1 15.5 3l-2.7 2.7 1.5 1.5L17 4.5A6.6 6.6 0 0 1 21 7.5Z`})])],-1),t[24]||=H(`div`,null,[H(`h3`,null,`维修记录`),H(`p`,null,`车辆历史维修与服务明细`)],-1),H(`span`,Xh,`共 `+j(d.length)+` 次`,1),H(`button`,{type:`button`,class:`add-record-button`,onClick:t[5]||=e=>l.value=!0},`添加维修记录`)]),H(`div`,Zh,[(B(),V(z,null,Dr(d,e=>H(`article`,{key:e.id,class:`repair-item`},[H(`time`,null,j(e.date),1),t[25]||=H(`div`,{class:`timeline-dot`},null,-1),H(`div`,Qh,[H(`strong`,null,j(e.title),1),H(`p`,null,j(e.description),1)]),H(`span`,$h,j(e.price),1)])),64))])])]),l.value?(B(),V(`div`,{key:0,class:`modal-mask`,onClick:t[11]||=Lo(e=>l.value=!1,[`self`])},[H(`form`,{class:`repair-form`,onSubmit:Lo(v,[`prevent`])},[H(`div`,eg,[t[26]||=H(`h2`,null,`添加维修记录`,-1),H(`button`,{type:`button`,onClick:t[6]||=e=>l.value=!1},`×`)]),H(`label`,null,[t[27]||=ia(`维修项目`,-1),Ln(H(`input`,{"onUpdate:modelValue":t[7]||=e=>u.title=e,required:``,placeholder:`如:常规保养`},null,512),[[wo,u.title,void 0,{trim:!0}]])]),H(`label`,null,[t[28]||=ia(`维修日期`,-1),Ln(H(`input`,{"onUpdate:modelValue":t[8]||=e=>u.date=e,type:`date`,required:``},null,512),[[wo,u.date]])]),H(`label`,null,[t[29]||=ia(`维修描述`,-1),Ln(H(`textarea`,{"onUpdate:modelValue":t[9]||=e=>u.description=e,required:``,placeholder:`请输入维修内容`},null,512),[[wo,u.description,void 0,{trim:!0}]])]),H(`label`,null,[t[30]||=ia(`维修金额`,-1),Ln(H(`input`,{"onUpdate:modelValue":t[10]||=e=>u.price=e,required:``,placeholder:`如:¥680`},null,512),[[wo,u.price,void 0,{trim:!0}]])]),t[31]||=H(`button`,{class:`submit-record-button`,type:`submit`},`保存记录`,-1)],32)])):oa(``,!0)]))}},[[`__scopeId`,`data-v-cc319b36`]]),ng=Il({history:nl(`/`),routes:[{path:`/main`,name:`main`,component:Xl},{path:`/login`,name:`login`,component:Em},{path:`/bill`,name:`bill`,component:Rm},{path:`/admin`,name:`admin`,component:Xm},{path:`/adduser`,name:`adduser`,component:hh},{path:`/search`,name:`search`,component:jh},{path:`/adminusers`,name:`adminusers`,component:tg},{path:`/`,redirect:`/login`},{path:`/:pathMatch(.*)*`,redirect:`/main`}]}),rg=Vo(Kl),ig=cs();ig.use(Ns),rg.use(ig),rg.use(ng),rg.mount(`#app`); \ No newline at end of file diff --git a/dist/assets/index-DRwOqrfl.css b/dist/assets/index-DRwOqrfl.css new file mode 100644 index 0000000..fbc603b --- /dev/null +++ b/dist/assets/index-DRwOqrfl.css @@ -0,0 +1 @@ +.topbar[data-v-f0574cc4]{background:#fff;border-bottom:1px solid #e8edf5;align-items:center;gap:58px;height:74px;padding:0 clamp(24px,5vw,76px);animation:.55s cubic-bezier(.22,1,.36,1) both nav-slide-down-f0574cc4;display:flex;position:relative}.brand[data-v-f0574cc4]{color:#13213b;white-space:nowrap;align-items:center;gap:10px;font-size:19px;font-weight:800;text-decoration:none;transition:color .25s,transform .25s;display:flex}.brand[data-v-f0574cc4]:hover{color:#1769e0;transform:translateY(-2px)}.brand-mark[data-v-f0574cc4]{color:#fff;background:#1769e0;border-radius:10px;place-items:center;width:36px;height:36px;transition:transform .35s cubic-bezier(.22,1,.36,1),box-shadow .35s;display:grid}.brand:hover .brand-mark[data-v-f0574cc4]{transform:rotate(-8deg)scale(1.08);box-shadow:0 7px 15px #1769e14d}.brand-mark svg[data-v-f0574cc4]{fill:currentColor;width:22px}.user-menu[data-v-f0574cc4]{position:relative}.user-menu[data-v-f0574cc4]:after{content:"";width:100px;height:10px;position:absolute;top:100%;right:0}.user-trigger[data-v-f0574cc4]{color:#34415a;cursor:pointer;font:inherit;background:0 0;border:0;align-items:center;gap:8px;padding:0;display:flex}.logout-menu[data-v-f0574cc4]{z-index:3;color:#40506a;cursor:pointer;width:100px;font:inherit;opacity:0;pointer-events:none;background:#fff;border:1px solid #e8edf5;border-radius:7px;padding:10px 12px;font-size:12px;transition:opacity .2s,transform .2s;position:absolute;top:calc(100% + 10px);right:0;transform:translateY(-5px);box-shadow:0 8px 20px #29466b1c}.logout-menu[data-v-f0574cc4]:hover{color:#dc635b;background:#fff7f6}.user-menu:hover .logout-menu[data-v-f0574cc4],.user-menu.open .logout-menu[data-v-f0574cc4]{opacity:1;pointer-events:auto;transform:translateY(0)}.nav-links[data-v-f0574cc4]{align-self:stretch;gap:34px;display:flex}.nav-links a[data-v-f0574cc4]{color:#78849a;opacity:0;align-items:center;font-size:14px;text-decoration:none;transition:color .25s,transform .25s;animation:.45s cubic-bezier(.22,1,.36,1) both nav-item-in-f0574cc4;display:flex;position:relative}.nav-links a[data-v-f0574cc4]:first-child{animation-delay:.18s}.nav-links a[data-v-f0574cc4]:nth-child(2){animation-delay:.25s}.nav-links a[data-v-f0574cc4]:nth-child(3){animation-delay:.32s}.nav-links a[data-v-f0574cc4]:nth-child(4){animation-delay:.39s}.nav-links a[data-v-f0574cc4]:hover{color:#1769e0;transform:translateY(-2px)}.nav-links a.active[data-v-f0574cc4]{color:#1769e0;background:#eaf2ff;border-radius:7px;padding:8px 13px;font-weight:700}@keyframes nav-slide-down-f0574cc4{0%{opacity:0;transform:translateY(-18px)}to{opacity:1;transform:translateY(0)}}@keyframes nav-item-in-f0574cc4{0%{opacity:0;transform:translateY(-8px)}to{opacity:1;transform:translateY(0)}}@media (prefers-reduced-motion:reduce){.topbar[data-v-f0574cc4],.nav-links a[data-v-f0574cc4]{animation:none}.nav-links a[data-v-f0574cc4]{opacity:1}}@media (width<=760px){.topbar[data-v-f0574cc4]{flex-wrap:wrap;gap:0;height:auto;min-height:68px;padding:12px 18px 0}.brand[data-v-f0574cc4]{font-size:17px}.brand-mark[data-v-f0574cc4]{border-radius:9px;width:32px;height:32px}.brand-mark svg[data-v-f0574cc4]{width:20px}.nav-links[data-v-f0574cc4]{scrollbar-width:none;justify-content:space-between;align-self:auto;align-items:center;gap:4px;width:100%;height:48px;margin-top:8px;overflow-x:auto}.nav-links[data-v-f0574cc4]::-webkit-scrollbar{display:none}.nav-links a[data-v-f0574cc4]{white-space:nowrap;flex:none;min-height:32px;padding:7px 10px;font-size:12px}.nav-links a.active[data-v-f0574cc4]{padding:7px 12px}.topbar-actions[data-v-f0574cc4]{gap:8px}.topbar-actions .icon-button[data-v-f0574cc4]{width:30px}.user-name[data-v-f0574cc4]{display:none}.user-menu:hover .logout-menu[data-v-f0574cc4]{opacity:0;pointer-events:none;transform:translateY(-5px)}.user-menu.open .logout-menu[data-v-f0574cc4]{opacity:1;pointer-events:auto;transform:translateY(0)}.user-avatar[data-v-f0574cc4]{width:30px;height:30px;font-size:12px}}@media (prefers-reduced-motion:reduce){.brand[data-v-f0574cc4],.brand-mark[data-v-f0574cc4],.nav-links a[data-v-f0574cc4]{transition:none}}.workshop-page{min-height:100vh - 74px;color:#17233c;background:#f5f7fb;font-family:Inter,-apple-system,BlinkMacSystemFont,Segoe UI,Microsoft YaHei,sans-serif}.topbar-actions{align-items:center;gap:18px;margin-left:auto;display:flex}.icon-button{color:#7d899d;cursor:pointer;background:0 0;border:0;place-items:center;width:25px;height:32px;padding:0;display:grid;position:relative}.icon-button svg{fill:none;stroke:currentColor;stroke-linecap:round;stroke-linejoin:round;stroke-width:1.8px;width:20px}.notification i{background:#f15b5b;border:2px solid #fff;border-radius:50%;width:6px;height:6px;position:absolute;top:4px;right:0}.user-avatar{color:#1769e0;background:#dceaff;border-radius:50%;place-items:center;width:34px;height:34px;font-size:14px;font-weight:700;display:grid}.user-name{color:#34415a;font-size:14px}.page-content{max-width:1310px;margin:auto;padding:43px 28px 60px}.welcome-row{justify-content:space-between;align-items:center;margin-bottom:34px;display:flex}.eyebrow{color:#8d98aa;margin:0 0 10px;font-size:12px}h1{color:#17233c;letter-spacing:-.7px;margin:0 0 8px;font-size:27px}h1 span{font-size:23px}.subheading{color:#7c8799;margin:0;font-size:13px}.primary-button{color:#fff;cursor:pointer;background:#1769e0;border:0;border-radius:7px;align-items:center;gap:8px;padding:12px 19px;font-size:13px;font-weight:600;display:flex;box-shadow:0 5px 12px #1769e033}.primary-button span{font-size:20px;font-weight:300;line-height:14px}.stats-grid{grid-template-columns:repeat(4,1fr);gap:18px;margin-bottom:25px;display:grid}.stat-card{background:#fff;border:1px solid #edf0f5;border-radius:10px;align-items:center;min-height:122px;padding:22px 18px;display:flex;box-shadow:0 4px 14px #253b5d08}.stat-icon{border-radius:10px;flex:0 0 45px;place-items:center;width:45px;height:45px;margin-right:14px;display:grid}.stat-icon svg{fill:none;stroke:currentColor;stroke-linecap:round;stroke-linejoin:round;stroke-width:1.7px;width:22px}.blue{color:#216de1;background:#eaf2ff}.orange{color:#ec8b28;background:#fff3e4}.green{color:#2ba66b;background:#e7f8ef}.purple{color:#8c62dc;background:#f0eaff}.stat-card p{color:#8490a2;margin:0 0 7px;font-size:12px}.stat-card strong{color:#1b2942;font-size:25px;line-height:1}.stat-card small{color:#8994a6;margin-left:4px;font-size:11px}.trend{white-space:nowrap;border-radius:4px;align-self:flex-start;margin:3px 0 0 auto;padding:4px 7px;font-size:10px}.trend.up{color:#2ca66c;background:#eaf8f0}.trend.neutral{color:#8b63d9;background:#f0eaff}.dashboard-grid{grid-template-columns:minmax(0,1.58fr) minmax(340px,1fr);gap:20px;display:grid}.panel{background:#fff;border:1px solid #edf0f5;border-radius:10px;padding:24px 25px;box-shadow:0 4px 14px #253b5d08}.panel-heading{border-bottom:1px solid #f0f2f6;justify-content:space-between;align-items:flex-start;padding-bottom:17px;display:flex}.panel-heading h2{color:#1e2b43;margin:0 0 5px;font-size:16px}.panel-heading p{color:#98a2b1;margin:0;font-size:11px}.panel-heading a{color:#1769e0;font-size:11px;text-decoration:none}.panel-heading a span,.notice-banner a span{margin-left:4px;font-size:16px}.appointment-item{border-bottom:1px solid #f2f3f6;align-items:center;min-height:66px;display:flex}.appointment-item:last-child{border-bottom:0}.appointment-item time{color:#35425a;width:56px;font-size:13px;font-weight:700}.appointment-item time small{color:#a0a9b7;margin-top:3px;font-size:10px;font-weight:400;display:block}.car-badge{color:#286de0;background:#e5efff;border-radius:7px;place-items:center;width:31px;height:31px;margin-right:12px;font-size:12px;font-weight:800;display:grid}.car-badge.red{color:#e45656;background:#ffebeb}.car-badge.green{color:#2c9b68;background:#e4f7ed}.car-badge.dark{color:#53647b;background:#edf0f4}.appointment-info{flex:1}.appointment-info strong{color:#354158;margin-bottom:4px;font-size:12px;display:block}.appointment-info p{color:#9aa4b3;margin:0;font-size:11px}.status{border-radius:4px;padding:5px 9px;font-size:10px}.status.waiting{color:#d98627;background:#fff3e4}.status.serving{color:#216de1;background:#eaf2ff}.status.done{color:#2ca66c;background:#eaf8f0}.quick-actions{grid-template-columns:1fr 1fr;gap:12px;padding-top:17px;display:grid}.quick-actions a{border:1px solid #eef0f4;border-radius:8px;flex-direction:column;min-height:103px;padding:15px 13px;text-decoration:none;transition:border-color .2s,transform .2s;display:flex}.quick-actions a:hover{border-color:#b7d0f7;transform:translateY(-2px)}.quick-icon{border-radius:7px;place-items:center;width:30px;height:30px;margin-bottom:9px;font-size:19px;display:grid}.quick-actions strong{color:#3a465c;font-size:12px}.quick-actions small{color:#a0a9b7;margin-top:4px;font-size:10px}.notice-banner{color:#775c2d;background:#fffbf2;border:1px solid #faefd1;border-radius:8px;align-items:center;gap:13px;margin-top:20px;padding:14px 18px;display:flex}.notice-icon{color:#fff;background:#e8ad42;border-radius:50%;flex:0 0 25px;place-items:center;width:25px;height:25px;font-size:14px;font-weight:800;display:grid}.notice-banner strong{font-size:12px}.notice-banner p{color:#9c875f;margin:3px 0 0;font-size:11px}.notice-banner b{color:#e28d24}.notice-banner a{color:#d4871f;white-space:nowrap;margin-left:auto;font-size:11px;text-decoration:none}@media (width<=900px){.topbar{gap:24px}.nav-links{gap:16px}.stats-grid{grid-template-columns:repeat(2,1fr)}.dashboard-grid{grid-template-columns:1fr}}@media (width<=600px){.topbar{flex-wrap:wrap;height:auto;min-height:68px;padding:14px 18px}.nav-links{order:3;justify-content:space-between;width:100%;height:38px}.topbar-actions{gap:8px}.user-name{display:none}.page-content{padding:28px 16px 40px}.welcome-row{flex-direction:column;align-items:flex-start;gap:20px}.stats-grid{gap:10px}.stat-card{min-height:105px;padding:14px 10px}.stat-icon{flex-basis:36px;width:36px;height:36px;margin-right:8px}.stat-icon svg{width:18px}.stat-card strong{font-size:20px}.trend{display:none}.panel{padding:18px 14px}.appointment-item time{width:48px}.appointment-info strong{font-size:11px}.status{padding:4px 6px}.notice-banner{align-items:flex-start}.notice-banner a{margin-top:4px}}*{box-sizing:border-box}.login-page{color:#1d2b45;background:#f7f9fc;min-height:100vh;font-family:Inter,-apple-system,BlinkMacSystemFont,Segoe UI,Microsoft YaHei,sans-serif;display:flex}.brand-panel,.form-panel{width:50%}.brand-panel{color:#fff;background:linear-gradient(145deg,#0d58c9,#176fe1 62%,#2782eb);min-height:100vh;display:flex;position:relative;overflow:hidden}.brand-content{z-index:1;flex-direction:column;width:76%;max-width:570px;margin:0 auto;padding:clamp(42px,8vh,85px) 0;display:flex;position:relative}.brand,.mobile-brand{color:inherit;align-items:center;gap:11px;font-size:21px;font-weight:800;text-decoration:none;display:flex}.brand-mark{background:#fff;border-radius:11px;place-items:center;width:39px;height:39px;display:grid}.brand-mark svg{fill:#1769e1;width:24px}.brand-slogan{flex-direction:column;align-items:center;margin-top:clamp(90px,17vh,175px);display:flex}.eyebrow{color:#bcd7ff;letter-spacing:3px;margin:0 0 20px;font-size:13px}.brand-slogan h1{color:#fff;letter-spacing:-2px;margin:0;font-size:clamp(36px,4vw,56px);font-weight:800;line-height:1.28}.brand-slogan h1 em{color:#d3e6ff;font-style:normal}.intro{color:#c9ddfb;justify-content:center;width:80%;margin:25px 0 0;font-size:15px;line-height:1.9;display:flex}.service-tags{flex-wrap:wrap;justify-content:space-around;gap:11px;margin-top:auto;display:flex}.service-tags span{color:#d9eaff;background:#ffffff1c;border:1px solid #ffffff2b;border-radius:5px;padding:8px 13px;font-size:11px}.decor{border:1px solid #ffffff1f;border-radius:50%;position:absolute}.decor-one{width:480px;height:480px;top:-180px;right:-100px}.decor-two{background:#ffffff09;width:460px;height:460px;bottom:-240px;right:12%}.car-line{opacity:.16;fill:none;stroke:#fff;stroke-linecap:round;stroke-linejoin:round;stroke-width:3px;width:min(58%,500px);position:absolute;bottom:10%;right:2%}.form-panel{flex-direction:column;justify-content:center;align-items:center;min-height:100vh;padding:40px 5%;display:flex}.login-card{width:100%;max-width:420px}.mobile-brand{color:#1769e1;font-size:18px;display:none}.mobile-brand .brand-mark{background:#e8f1ff;width:34px;height:34px}.mobile-brand .brand-mark svg{width:20px}.form-heading{margin-bottom:35px}.form-heading h2{color:#1b2942;letter-spacing:-.8px;margin:0 0 9px;font-size:30px}.form-heading p,.register-tip,.agreement{color:#8e9aac;margin:0;font-size:13px}.login-form label,.password-label label{color:#40506a;margin-bottom:9px;font-size:13px;font-weight:600;display:block}.password-label{justify-content:space-between;align-items:center;margin-top:21px;display:flex}.password-label a,.register-tip a,.agreement a{color:#1769e1;text-decoration:none}.input-wrap{background:#fff;border:1px solid #e0e6ef;border-radius:6px;align-items:center;gap:10px;height:48px;padding:0 14px;transition:border-color .2s,box-shadow .2s;display:flex}.input-wrap:focus-within{border-color:#1769e1;box-shadow:0 0 0 3px #1769e11a}.input-wrap>svg{fill:none;stroke:#a4afbd;stroke-linecap:round;stroke-linejoin:round;stroke-width:1.7px;flex:0 0 18px;width:18px}.input-wrap input{color:#25344d;width:100%;min-width:0;font:inherit;background:0 0;border:0;outline:0;padding:0;font-size:13px}.input-wrap input::placeholder{color:#adb6c3}.password-toggle{color:#a4afbd;cursor:pointer;background:0 0;border:0;place-items:center;width:24px;height:30px;padding:0;display:grid}.password-toggle svg{fill:none;stroke:currentColor;stroke-linecap:round;stroke-linejoin:round;stroke-width:1.6px;width:18px}.remember{align-items:center;gap:8px;color:#77859a!important;margin:17px 0 25px!important;font-size:12px!important;font-weight:400!important;display:flex!important}.remember input{accent-color:#1769e1;width:15px;height:15px;margin:0}.login-button{color:#fff;cursor:pointer;width:100%;height:48px;font:inherit;background:#1769e1;border:0;border-radius:6px;font-size:14px;font-weight:600;transition:background .2s,transform .2s;box-shadow:0 8px 18px #1769e12e}.login-button:hover{background:#0e5ac7;transform:translateY(-1px)}.register-tip{text-align:center;margin-top:25px}.register-tip a{margin-left:4px;font-weight:600}.agreement{white-space:nowrap;justify-content:center;align-items:center;gap:4px;margin-top:75px;font-size:10px;display:flex}.agreement-line{background:#e2e7ee;width:25px;height:1px;margin:0 5px}.copyright{color:#b0b9c6;margin:28px 0 0;font-size:10px}@media (width<=760px){.login-page{background:#f7f9fc;display:block}.brand-panel{display:none}.form-panel{justify-content:flex-start;width:100%;min-height:100vh;padding:38px 7% 25px}.login-card{max-width:470px}.mobile-brand{margin-bottom:65px;display:flex}.form-heading{margin-bottom:30px}.form-heading h2{font-size:27px}.agreement{margin-top:58px}}@media (width<=380px){.form-panel{padding-left:20px;padding-right:20px}.mobile-brand{margin-bottom:48px}.agreement-line{width:12px;margin:0 2px}}.bill-page[data-v-c010ae6f]{box-sizing:border-box;width:100%;min-height:100vh;padding:20px 16px calc(24px + env(safe-area-inset-bottom));color:#20232a;background:#f6f7fb}.page-header[data-v-c010ae6f]{justify-content:space-between;align-items:baseline;max-width:720px;margin:0 auto 16px;display:flex}h1[data-v-c010ae6f]{margin:0;font-size:22px;font-weight:600}.bill-count[data-v-c010ae6f]{color:#969ba6;font-size:13px}.bill-list[data-v-c010ae6f]{background:#fff;border-radius:12px;max-width:720px;margin:0 auto;overflow:hidden}.bill-item[data-v-c010ae6f]{border-bottom:1px solid #f0f1f4;align-items:center;min-height:72px;padding:0 16px;display:flex}.bill-icon[data-v-c010ae6f]{border-radius:50%;place-items:center;width:36px;height:36px;margin-right:12px;font-size:13px;display:grid}.bill-icon.income[data-v-c010ae6f]{color:#14966b;background:#e7f8f1}.bill-icon.expense[data-v-c010ae6f]{color:#eb635b;background:#fff0ef}.bill-info[data-v-c010ae6f]{flex:1;min-width:0}.bill-title[data-v-c010ae6f]{text-overflow:ellipsis;white-space:nowrap;font-size:15px;overflow:hidden}.bill-time[data-v-c010ae6f]{color:#a0a5ae;margin-top:5px;font-size:12px}.bill-amount[data-v-c010ae6f]{margin-left:12px;font-size:15px;font-weight:500}.bill-amount.income[data-v-c010ae6f]{color:#14966b}.bill-amount.expense[data-v-c010ae6f]{color:#20232a}.list-status[data-v-c010ae6f]{color:#a0a5ae;text-align:center;padding:20px 0;font-size:13px}.load-more-target[data-v-c010ae6f]{height:1px}@media (width>=768px){.bill-page[data-v-c010ae6f]{padding-top:32px}}.bill-page[data-v-0737fd45]{box-sizing:border-box;width:100%;min-height:100vh;padding:20px 16px calc(24px + env(safe-area-inset-bottom));color:#20232a;background:#f6f7fb}.page-header[data-v-0737fd45]{justify-content:space-between;align-items:baseline;max-width:720px;margin:0 auto 16px;display:flex}h1[data-v-0737fd45]{margin:0;font-size:22px;font-weight:600}.bill-count[data-v-0737fd45]{color:#969ba6;font-size:13px}.bill-list[data-v-0737fd45]{background:#fff;border-radius:12px;max-width:720px;margin:0 auto;overflow:hidden}.bill-item[data-v-0737fd45]{border-bottom:1px solid #f0f1f4;align-items:center;min-height:72px;padding:0 16px;display:flex}.bill-icon[data-v-0737fd45]{border-radius:50%;place-items:center;width:36px;height:36px;margin-right:12px;font-size:13px;display:grid}.bill-icon.income[data-v-0737fd45]{color:#14966b;background:#e7f8f1}.bill-icon.expense[data-v-0737fd45]{color:#eb635b;background:#fff0ef}.bill-info[data-v-0737fd45]{flex:1;min-width:0}.bill-title[data-v-0737fd45]{text-overflow:ellipsis;white-space:nowrap;font-size:15px;overflow:hidden}.bill-time[data-v-0737fd45]{color:#a0a5ae;margin-top:5px;font-size:12px}.bill-amount[data-v-0737fd45]{margin-left:12px;font-size:15px;font-weight:500}.bill-amount.income[data-v-0737fd45]{color:#14966b}.bill-amount.expense[data-v-0737fd45]{color:#20232a}.list-status[data-v-0737fd45]{color:#a0a5ae;text-align:center;padding:20px 0;font-size:13px}.load-more-target[data-v-0737fd45]{height:1px}@media (width>=768px){.bill-page[data-v-0737fd45]{padding-top:32px}}.add-user-page[data-v-be3f1cf0],.add-user-page[data-v-be3f1cf0] *{box-sizing:border-box}.add-user-page[data-v-be3f1cf0]{color:#1d2b45;background:#f5f7fb;justify-content:center;align-items:flex-start;min-height:calc(100vh - 74px);padding:48px 24px;display:flex}.add-user-card[data-v-be3f1cf0]{background:#fff;border:1px solid #e8edf5;border-radius:12px;width:100%;max-width:620px;padding:32px 36px 24px;box-shadow:0 8px 26px #29466b0d}.page-header[data-v-be3f1cf0]{border-bottom:1px solid #edf0f5;align-items:center;gap:14px;padding-bottom:25px;display:flex}.header-icon[data-v-be3f1cf0]{color:#1769e1;background:#eaf2ff;border-radius:10px;place-items:center;width:46px;height:46px;display:grid}.header-icon svg[data-v-be3f1cf0],.input-wrap svg[data-v-be3f1cf0],.default-password svg[data-v-be3f1cf0]{fill:none;stroke:currentColor;stroke-linecap:round;stroke-linejoin:round;stroke-width:1.7px;width:22px}h1[data-v-be3f1cf0]{color:#1b2942;margin:0 0 5px;font-size:22px}.page-header p[data-v-be3f1cf0],.field-tip[data-v-be3f1cf0]{color:#8d98aa;margin:0;font-size:12px}.user-form[data-v-be3f1cf0]{padding-top:27px}.user-form>.form-item+.form-item[data-v-be3f1cf0],.user-form>.form-item+.form-row[data-v-be3f1cf0],.user-form>.form-row+.form-item[data-v-be3f1cf0],.user-form>.form-row+.form-row[data-v-be3f1cf0]{margin-top:24px}.form-row[data-v-be3f1cf0]{gap:16px;display:flex}.form-row .form-item[data-v-be3f1cf0]{flex:1}.form-item label[data-v-be3f1cf0]{color:#3c4a62;margin-bottom:6px;font-size:14px;font-weight:600;display:block}.field-tip[data-v-be3f1cf0]{margin-bottom:10px;font-size:11px}.input-wrap[data-v-be3f1cf0],.default-password[data-v-be3f1cf0]{border-radius:7px;align-items:center;gap:10px;min-height:48px;padding:0 14px;display:flex}.input-wrap[data-v-be3f1cf0]{background:#fff;border:1px solid #dfe6ef;transition:border-color .2s,box-shadow .2s}.input-wrap[data-v-be3f1cf0]:focus-within{border-color:#1769e1;box-shadow:0 0 0 3px #1769e11a}.input-wrap svg[data-v-be3f1cf0],.default-password svg[data-v-be3f1cf0]{color:#9da9b8;flex:0 0 19px;width:19px}.input-wrap input[data-v-be3f1cf0]{color:#263650;width:100%;min-width:0;font:inherit;background:0 0;border:0;outline:0;padding:0;font-size:13px}.input-wrap input[data-v-be3f1cf0]::placeholder{color:#adb7c4}.input-wrap select[data-v-be3f1cf0]{color:#263650;cursor:pointer;width:100%;min-width:0;font:inherit;background:0 0;border:0;outline:0;padding:0;font-size:13px}.default-password[data-v-be3f1cf0]{color:#1769e1;background:#f3f7ff;border:1px solid #dce9ff}.default-password strong[data-v-be3f1cf0]{letter-spacing:1px;font-size:15px}.default-password span[data-v-be3f1cf0]{color:#8395b2;margin-left:auto;font-size:11px}.form-message[data-v-be3f1cf0]{color:#d47725;background:#fff7eb;border-radius:6px;margin-top:18px;padding:10px 12px;font-size:12px}.form-message.success[data-v-be3f1cf0]{color:#16835d;background:#eaf8f1}.form-actions[data-v-be3f1cf0]{justify-content:flex-end;gap:12px;margin-top:30px;display:flex}.cancel-button[data-v-be3f1cf0],.submit-button[data-v-be3f1cf0]{cursor:pointer;min-width:96px;height:42px;font:inherit;border-radius:6px;padding:0 18px;font-size:13px}.cancel-button[data-v-be3f1cf0]{color:#65748b;background:#fff;border:1px solid #dfe6ef}.submit-button[data-v-be3f1cf0]{color:#fff;background:#1769e1;border:1px solid #1769e1;box-shadow:0 5px 12px #1769e133}.cancel-button[data-v-be3f1cf0]:hover{background:#f7f9fc}.submit-button[data-v-be3f1cf0]:hover{background:#0e5ac7}.card-footer[data-v-be3f1cf0]{color:#9ba6b5;border-top:1px solid #edf0f5;align-items:center;gap:7px;margin-top:27px;padding-top:18px;font-size:11px;display:flex}.footer-dot[data-v-be3f1cf0]{background:#43b883;border-radius:50%;width:6px;height:6px}@media (width<=600px){.add-user-page[data-v-be3f1cf0]{min-height:calc(100vh - 116px);padding:24px 14px}.add-user-card[data-v-be3f1cf0]{border-radius:10px;padding:24px 18px 20px}.page-header[data-v-be3f1cf0]{padding-bottom:21px}.form-row[data-v-be3f1cf0]{display:block}.form-row .form-item+.form-item[data-v-be3f1cf0]{margin-top:24px}.form-actions[data-v-be3f1cf0]{gap:9px}.cancel-button[data-v-be3f1cf0],.submit-button[data-v-be3f1cf0]{flex:1}.card-footer[data-v-be3f1cf0]{align-items:flex-start;line-height:1.6}}.search-page[data-v-ad643977]{color:#1d2b45;background:#f5f7fb;min-height:calc(100vh - 74px);padding:38px 24px 60px}.search-card[data-v-ad643977],.result-section[data-v-ad643977]{width:100%;max-width:860px;margin:0 auto}.search-card[data-v-ad643977]{background:#fff;border:1px solid #e8edf5;border-radius:12px;padding:28px 32px 30px;box-shadow:0 8px 26px #29466b0d}.page-header[data-v-ad643977],.result-heading[data-v-ad643977]{justify-content:space-between;align-items:flex-start;display:flex}.eyebrow[data-v-ad643977]{color:#1769e1;letter-spacing:1.5px;margin:0 0 7px;font-size:10px;font-weight:700}h1[data-v-ad643977],h2[data-v-ad643977]{color:#1b2942;margin:0}h1[data-v-ad643977]{font-size:24px}.subtitle[data-v-ad643977],.result-heading p[data-v-ad643977]{color:#8d98aa;margin:7px 0 0;font-size:12px}.header-icon[data-v-ad643977]{color:#1769e1;background:#eaf2ff;border-radius:10px;place-items:center;width:44px;height:44px;display:grid}.header-icon svg[data-v-ad643977],.search-input>svg[data-v-ad643977]{fill:none;stroke:currentColor;stroke-linecap:round;stroke-linejoin:round;stroke-width:1.7px;width:21px}.search-form[data-v-ad643977]{gap:10px;margin-top:25px;display:flex}.search-input[data-v-ad643977]{border:1px solid #dfe6ef;border-radius:7px;flex:1;align-items:center;gap:9px;height:46px;padding:0 13px;transition:border-color .2s,box-shadow .2s;display:flex}.search-input[data-v-ad643977]:focus-within{border-color:#1769e1;box-shadow:0 0 0 3px #1769e11a}.search-input input[data-v-ad643977]{color:#263650;width:100%;min-width:0;font:inherit;background:0 0;border:0;outline:0;padding:0;font-size:13px}.search-input input[data-v-ad643977]::-webkit-search-cancel-button{display:none}.clear-button[data-v-ad643977],.more-button[data-v-ad643977]{color:#99a5b4;cursor:pointer;background:0 0;border:0;padding:0}.clear-button[data-v-ad643977]{font-size:21px}.search-button[data-v-ad643977]{color:#fff;cursor:pointer;width:90px;font:inherit;background:#1769e1;border:0;border-radius:7px;font-size:13px;box-shadow:0 5px 12px #1769e133}.search-button[data-v-ad643977]:hover{background:#0e5ac7}.result-section[data-v-ad643977]{margin-top:28px}.result-heading[data-v-ad643977]{align-items:center;margin-bottom:13px}h2[data-v-ad643977]{font-size:17px}.result-count[data-v-ad643977]{color:#8d98aa;font-size:12px}.user-list[data-v-ad643977]{background:#fff;border:1px solid #e8edf5;border-radius:10px;overflow:hidden}.user-item[data-v-ad643977]{border-bottom:1px solid #edf0f5;align-items:center;min-height:76px;padding:0 20px;display:flex}.car-avatar[data-v-ad643977]{color:#1769e1;background:#eaf2ff;border-radius:9px;place-items:center;width:38px;height:38px;margin-right:13px;font-size:16px;font-weight:700;display:grid}.user-info[data-v-ad643977]{flex-direction:column;flex:1;gap:5px;min-width:0;display:flex}.user-info strong[data-v-ad643977]{color:#354158;font-size:13px}.user-info span[data-v-ad643977]{color:#9aa4b3;font-size:11px}.user-status[data-v-ad643977]{align-items:center;gap:5px;margin-right:18px;font-size:11px;display:flex}.user-status i[data-v-ad643977]{border-radius:50%;width:6px;height:6px}.user-status.normal[data-v-ad643977]{color:#239366}.user-status.normal i[data-v-ad643977]{background:#38b982}.user-status.disabled[data-v-ad643977]{color:#d78a37}.user-status.disabled i[data-v-ad643977]{background:#e8a24d}.more-button[data-v-ad643977]{letter-spacing:2px;width:28px;font-size:17px}.list-state[data-v-ad643977]{color:#99a5b4;text-align:center;padding:24px 0;font-size:12px}.list-state button[data-v-ad643977]{color:#1769e1;cursor:pointer;font:inherit;background:0 0;border:0;margin-left:8px;padding:0}.error-state[data-v-ad643977]{color:#d47725}.loading-spinner[data-v-ad643977]{vertical-align:-2px;border:2px solid #dce9ff;border-top-color:#1769e1;border-radius:50%;width:13px;height:13px;margin-right:7px;animation:.7s linear infinite spin-ad643977;display:inline-block}.load-more-target[data-v-ad643977]{height:1px}@keyframes spin-ad643977{to{transform:rotate(360deg)}}@media (width<=600px){.search-page[data-v-ad643977]{min-height:calc(100vh - 116px);padding:22px 14px 40px}.search-card[data-v-ad643977]{padding:22px 18px 24px}h1[data-v-ad643977]{font-size:21px}.header-icon[data-v-ad643977]{width:38px;height:38px}.search-form[data-v-ad643977]{gap:8px}.search-button[data-v-ad643977]{width:68px}.user-item[data-v-ad643977]{min-height:70px;padding:0 13px}.user-status[data-v-ad643977]{margin-right:7px}.user-info span[data-v-ad643977]{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}}.user-detail-page[data-v-cc319b36]{color:#1d2b45;background:#f5f7fb;min-height:calc(100vh - 74px);padding:38px 24px 60px}.detail-container[data-v-cc319b36]{width:100%;max-width:860px;margin:0 auto}.page-header[data-v-cc319b36]{justify-content:space-between;align-items:flex-end;margin-bottom:24px;display:flex}.eyebrow[data-v-cc319b36]{color:#1769e1;letter-spacing:1.5px;margin:0 0 7px;font-size:10px;font-weight:700}h1[data-v-cc319b36],h2[data-v-cc319b36],h3[data-v-cc319b36],p[data-v-cc319b36]{margin-top:0}h1[data-v-cc319b36]{color:#1b2942;margin-bottom:7px;font-size:24px}.subtitle[data-v-cc319b36],.card-heading p[data-v-cc319b36],.profile-main p[data-v-cc319b36]{color:#8d98aa;margin-bottom:0;font-size:12px}.header-actions[data-v-cc319b36]{align-items:center;gap:8px;display:flex}.back-button[data-v-cc319b36],.delete-button[data-v-cc319b36]{cursor:pointer;font:inherit;background:#fff;border-radius:6px;padding:9px 13px;font-size:12px}.back-button[data-v-cc319b36]{color:#1769e1;border:1px solid #dfe8f5}.delete-button[data-v-cc319b36]{color:#dc635b;border:1px solid #f3d4d1}.back-button span[data-v-cc319b36]{margin-right:5px;font-size:15px}.profile-card[data-v-cc319b36],.info-card[data-v-cc319b36]{background:#fff;border:1px solid #e8edf5;border-radius:10px;box-shadow:0 7px 20px #29466b0a}.profile-card[data-v-cc319b36]{align-items:center;gap:15px;min-height:116px;padding:24px;display:flex}.profile-avatar[data-v-cc319b36]{color:#1769e1;background:#eaf2ff;border-radius:14px;flex:0 0 60px;place-items:center;width:60px;height:60px;font-size:25px;font-weight:700;display:grid}.profile-main[data-v-cc319b36]{flex:1}.profile-title[data-v-cc319b36]{align-items:center;gap:10px;display:flex}.profile-title h2[data-v-cc319b36]{color:#1d2b45;margin:0 0 7px;font-size:19px}.profile-main p+p[data-v-cc319b36]{margin-top:5px}.status[data-v-cc319b36]{color:#239366;align-items:center;gap:5px;margin-top:-7px;font-size:11px;display:flex}.status i[data-v-cc319b36]{background:#38b982;border-radius:50%;width:6px;height:6px}.status.disabled[data-v-cc319b36]{color:#d78a37}.status.disabled i[data-v-cc319b36]{background:#e8a24d}.back-button[data-v-cc319b36]:hover{background:#f2f7ff}.delete-button[data-v-cc319b36]:hover{background:#fff3f1}.detail-grid[data-v-cc319b36]{grid-template-columns:1fr 1fr;gap:20px;margin-top:20px;display:grid}.info-card[data-v-cc319b36]{padding:24px}.card-heading[data-v-cc319b36]{border-bottom:1px solid #edf0f5;align-items:center;gap:11px;padding-bottom:18px;display:flex}.heading-icon[data-v-cc319b36]{border-radius:8px;place-items:center;width:36px;height:36px;display:grid}.heading-icon svg[data-v-cc319b36]{fill:none;stroke:currentColor;stroke-linecap:round;stroke-linejoin:round;stroke-width:1.7px;width:19px}.heading-icon.blue[data-v-cc319b36]{color:#1769e1;background:#eaf2ff}.heading-icon.orange[data-v-cc319b36]{color:#e58b2b;background:#fff2df}.heading-icon.green[data-v-cc319b36]{color:#24966b;background:#e6f8ef}.card-heading h3[data-v-cc319b36]{color:#27354d;margin:0 0 4px;font-size:15px}.card-heading p[data-v-cc319b36]{font-size:10px}.info-list[data-v-cc319b36]{margin:0}.info-list div[data-v-cc319b36]{justify-content:space-between;align-items:center;gap:12px;padding:13px 0 0;display:flex}.editable-row[data-v-cc319b36]{min-height:31px}.inline-input[data-v-cc319b36]{color:#263650;width:0;min-width:0;font:inherit;border:1px solid #b9d1f6;border-radius:4px;outline:0;flex:1;padding:5px 7px;font-size:12px}.inline-input[data-v-cc319b36]:focus{border-color:#1769e1;box-shadow:0 0 0 2px #1769e11a}.info-list dt[data-v-cc319b36]{color:#919cac;font-size:11px}.info-list dd[data-v-cc319b36]{color:#3c4a62;text-align:right;flex:1;margin:0;font-size:12px}.info-list button[data-v-cc319b36],.save-field-button[data-v-cc319b36]{color:#1769e1;cursor:pointer;font:inherit;background:#f1f6ff;border:0;border-radius:4px;flex:none;padding:3px 7px;font-size:10px}.info-list button[data-v-cc319b36]:hover,.save-field-button[data-v-cc319b36]:hover{background:#dceaff}.info-list dd.highlight[data-v-cc319b36]{color:#e18427;font-weight:600}.repair-card[data-v-cc319b36]{margin-top:20px}.repair-heading[data-v-cc319b36]{padding-bottom:18px}.add-record-button[data-v-cc319b36],.oil-button[data-v-cc319b36]{color:#1769e1;cursor:pointer;font:inherit;background:#f1f6ff;border:0;border-radius:5px;padding:7px 10px;font-size:11px}.add-record-button[data-v-cc319b36]{margin-left:10px}.add-record-button[data-v-cc319b36]:hover,.oil-button[data-v-cc319b36]:hover{background:#dceaff}.oil-button[data-v-cc319b36]{margin-top:18px}.oil-form[data-v-cc319b36]{background:#f7faff;border:1px solid #e0ebfc;border-radius:7px;align-items:flex-end;gap:10px;margin-top:12px;padding:12px;display:flex}.oil-form label[data-v-cc319b36],.repair-form label[data-v-cc319b36]{color:#738197;flex-direction:column;flex:1;gap:5px;font-size:11px;display:flex}.oil-form input[data-v-cc319b36],.repair-form input[data-v-cc319b36],.repair-form textarea[data-v-cc319b36]{color:#354158;width:100%;font:inherit;background:#fff;border:1px solid #dfe6ef;border-radius:5px;outline:0;padding:8px;font-size:12px}.repair-form textarea[data-v-cc319b36]{resize:vertical;min-height:70px}.modal-mask[data-v-cc319b36]{z-index:10;background:#17233c66;justify-content:center;align-items:center;padding:20px;display:flex;position:fixed;inset:0}.repair-form[data-v-cc319b36]{background:#fff;border-radius:10px;width:100%;max-width:410px;padding:24px;box-shadow:0 14px 40px #17233c33}.modal-header[data-v-cc319b36]{justify-content:space-between;align-items:center;margin-bottom:18px;display:flex}.modal-header h2[data-v-cc319b36]{color:#1b2942;margin:0;font-size:18px}.modal-header button[data-v-cc319b36]{color:#8d98aa;cursor:pointer;background:0 0;border:0;padding:0;font-size:24px}.repair-form label+label[data-v-cc319b36]{margin-top:13px}.submit-record-button[data-v-cc319b36]{color:#fff;cursor:pointer;width:100%;height:40px;font:inherit;background:#1769e1;border:0;border-radius:5px;margin-top:20px;font-size:13px}.record-count[data-v-cc319b36]{color:#1769e1;background:#eaf2ff;border-radius:4px;margin-left:auto;padding:5px 8px;font-size:10px}.repair-item[data-v-cc319b36]{align-items:flex-start;gap:12px;min-height:66px;padding:16px 0 0;display:flex}.repair-item time[data-v-cc319b36]{color:#8d98aa;width:75px;padding-top:2px;font-size:11px}.timeline-dot[data-v-cc319b36]{background:#42b883;border:2px solid #d9f4e7;border-radius:50%;flex:0 0 9px;width:9px;height:9px;margin-top:4px}.repair-content[data-v-cc319b36]{flex:1}.repair-content strong[data-v-cc319b36]{color:#3c4a62;font-size:12px}.repair-content p[data-v-cc319b36]{color:#9aa4b3;margin:5px 0 0;font-size:11px}.repair-price[data-v-cc319b36]{color:#354158;font-size:12px;font-weight:600}@media (width<=600px){.user-detail-page[data-v-cc319b36]{min-height:calc(100vh - 116px);padding:24px 14px 40px}.page-header[data-v-cc319b36]{flex-direction:column;align-items:flex-start;gap:14px}.profile-card[data-v-cc319b36]{padding:18px 15px}.profile-avatar[data-v-cc319b36]{border-radius:11px;flex-basis:48px;width:48px;height:48px;font-size:20px}.profile-title h2[data-v-cc319b36]{font-size:16px}.header-actions[data-v-cc319b36]{justify-content:space-between;width:100%}.detail-grid[data-v-cc319b36]{grid-template-columns:1fr}.info-card[data-v-cc319b36]{padding:18px 15px}.repair-item[data-v-cc319b36]{gap:8px}.repair-item time[data-v-cc319b36]{width:68px;font-size:10px}.repair-price[data-v-cc319b36]{font-size:11px}.repair-heading[data-v-cc319b36]{flex-wrap:wrap}.add-record-button[data-v-cc319b36]{margin-left:auto}.oil-form[data-v-cc319b36]{flex-direction:column;align-items:stretch}}:root{--text:#6b6375;--text-h:#08060d;--bg:#fff;--border:#e5e4e7;--code-bg:#f4f3ec;--accent:#aa3bff;--accent-bg:#aa3bff1a;--accent-border:#aa3bff80;--social-bg:#f4f3ec80;--shadow:#0000001a 0 10px 15px -3px, #0000000d 0 4px 6px -2px;--sans:system-ui, "Segoe UI", Roboto, sans-serif;--heading:system-ui, "Segoe UI", Roboto, sans-serif;--mono:ui-monospace, Consolas, monospace;font:18px/145% var(--sans);letter-spacing:.18px;--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light dark;color:var(--text);background:var(--bg);font-synthesis:none;text-rendering:optimizelegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}@media (prefers-color-scheme:dark){:root{--lightningcss-light: ;--lightningcss-dark:initial}}@media (width<=1024px){:root{font-size:16px}}@media (prefers-color-scheme:dark){:root{--text:#9ca3af;--text-h:#f3f4f6;--bg:#16171d;--border:#2e303a;--code-bg:#1f2028;--accent:#c084fc;--accent-bg:#c084fc26;--accent-border:#c084fc80;--social-bg:#2f303a80;--shadow:#0006 0 10px 15px -3px, #00000040 0 4px 6px -2px}#social .button-icon{filter:invert()brightness(2)}}body{margin:0}h1,h2{font-family:var(--heading);color:var(--text-h);font-weight:500}h1{letter-spacing:-1.68px;margin:32px 0;font-size:56px}@media (width<=1024px){h1{margin:20px 0;font-size:36px}}h2{letter-spacing:-.24px;margin:0 0 8px;font-size:24px;line-height:118%}@media (width<=1024px){h2{font-size:20px}}p{margin:0}code,.counter{font-family:var(--mono);color:var(--text-h);border-radius:4px;display:inline-flex}code{background:var(--code-bg);padding:4px 8px;font-size:15px;line-height:135%}.counter{color:var(--accent);background:var(--accent-bg);border:2px solid #0000;border-radius:5px;margin-bottom:24px;padding:5px 10px;font-size:16px;transition:border-color .3s}.counter:hover{border-color:var(--accent-border)}.counter:focus-visible{outline:2px solid var(--accent);outline-offset:2px}.hero{position:relative}.hero .base,.hero .framework,.hero .vite{margin:0 auto;inset-inline:0}.hero .base{z-index:0;width:170px;position:relative}.hero .framework,.hero .vite{position:absolute}.hero .framework{z-index:1;height:28px;top:34px;transform:perspective(2000px)rotate(300deg)rotateX(44deg)rotateY(39deg)scale(1.4)}.hero .vite{z-index:0;width:auto;height:26px;top:107px;transform:perspective(2000px)rotate(300deg)rotateX(40deg)rotateY(39deg)scale(.8)}#app{text-align:center;border-inline:1px solid var(--border);box-sizing:border-box;flex-direction:column;width:1126px;max-width:100%;min-height:100svh;margin:0 auto;display:flex}#center{flex-direction:column;flex-grow:1;place-content:center;place-items:center;gap:25px;display:flex}@media (width<=1024px){#center{gap:18px;padding:32px 20px 24px}}#next-steps{border-top:1px solid var(--border);text-align:left;display:flex}#next-steps>div{flex:1 1 0;padding:32px}@media (width<=1024px){#next-steps>div{padding:24px 20px}}#next-steps .icon{width:22px;height:22px;margin-bottom:16px}@media (width<=1024px){#next-steps{text-align:center;flex-direction:column}}#docs{border-right:1px solid var(--border)}@media (width<=1024px){#docs{border-right:none;border-bottom:1px solid var(--border)}}#next-steps ul{gap:8px;margin:32px 0 0;padding:0;list-style:none;display:flex}#next-steps ul .logo{height:18px}#next-steps ul a{color:var(--text-h);background:var(--social-bg);border-radius:6px;align-items:center;gap:8px;padding:6px 12px;font-size:16px;text-decoration:none;transition:box-shadow .3s;display:flex}#next-steps ul a:hover{box-shadow:var(--shadow)}#next-steps ul a .button-icon{width:18px;height:18px}@media (width<=1024px){#next-steps ul{flex-wrap:wrap;justify-content:center;margin-top:20px}#next-steps ul li{flex:calc(50% - 8px)}#next-steps ul a{box-sizing:border-box;justify-content:center;width:100%}}#spacer{border-top:1px solid var(--border);height:88px}@media (width<=1024px){#spacer{height:48px}}.ticks{width:100%;position:relative}.ticks:before,.ticks:after{content:"";border:5px solid #0000;position:absolute;top:-4.5px}.ticks:before{border-left-color:var(--border);left:0}.ticks:after{border-right-color:var(--border);right:0} diff --git a/dist/assets/index-DVtkaHGg.css b/dist/assets/index-DVtkaHGg.css deleted file mode 100644 index 84881d1..0000000 --- a/dist/assets/index-DVtkaHGg.css +++ /dev/null @@ -1 +0,0 @@ -.topbar[data-v-640de8cc]{background:#fff;border-bottom:1px solid #e8edf5;align-items:center;gap:58px;height:74px;padding:0 clamp(24px,5vw,76px);animation:.55s cubic-bezier(.22,1,.36,1) both nav-slide-down-640de8cc;display:flex;position:relative}.topbar[data-v-640de8cc]:after{content:"";transform-origin:0;background:#1769e0;height:1px;animation:.8s ease-out .2s both nav-border-reveal-640de8cc;position:absolute;bottom:-1px;left:0;right:0;transform:scaleX(0)}.brand[data-v-640de8cc]{color:#13213b;white-space:nowrap;align-items:center;gap:10px;font-size:19px;font-weight:800;text-decoration:none;transition:color .25s,transform .25s;display:flex}.brand[data-v-640de8cc]:hover{color:#1769e0;transform:translateY(-2px)}.brand-mark[data-v-640de8cc]{color:#fff;background:#1769e0;border-radius:10px;place-items:center;width:36px;height:36px;transition:transform .35s cubic-bezier(.22,1,.36,1),box-shadow .35s;display:grid}.brand:hover .brand-mark[data-v-640de8cc]{transform:rotate(-8deg)scale(1.08);box-shadow:0 7px 15px #1769e14d}.brand-mark svg[data-v-640de8cc]{fill:currentColor;width:22px}.nav-links[data-v-640de8cc]{align-self:stretch;gap:34px;display:flex}.nav-links a[data-v-640de8cc]{color:#78849a;opacity:0;align-items:center;font-size:14px;text-decoration:none;transition:color .25s,transform .25s;animation:.45s cubic-bezier(.22,1,.36,1) both nav-item-in-640de8cc;display:flex;position:relative}.nav-links a[data-v-640de8cc]:first-child{animation-delay:.18s}.nav-links a[data-v-640de8cc]:nth-child(2){animation-delay:.25s}.nav-links a[data-v-640de8cc]:nth-child(3){animation-delay:.32s}.nav-links a[data-v-640de8cc]:nth-child(4){animation-delay:.39s}.nav-links a[data-v-640de8cc]:hover{color:#1769e0;transform:translateY(-2px)}.nav-links a.active[data-v-640de8cc]{color:#1769e0;font-weight:700}.nav-links a.active[data-v-640de8cc]:after{content:"";transform-origin:50%;background:#1769e0;border-radius:3px 3px 0 0;height:3px;animation:.35s cubic-bezier(.22,1,.36,1) .35s both nav-underline-in-640de8cc;position:absolute;bottom:0;left:0;right:0;transform:scaleX(1)}.nav-links a[data-v-640de8cc]:not(.active):after{content:"";transform-origin:50%;background:#1769e0;border-radius:3px 3px 0 0;height:3px;transition:transform .25s cubic-bezier(.22,1,.36,1);position:absolute;bottom:0;left:0;right:0;transform:scaleX(0)}.nav-links a[data-v-640de8cc]:not(.active):hover:after{transform:scaleX(1)}@keyframes nav-slide-down-640de8cc{0%{opacity:0;transform:translateY(-18px)}to{opacity:1;transform:translateY(0)}}@keyframes nav-border-reveal-640de8cc{0%{transform:scaleX(0)}to{transform:scaleX(1)}}@keyframes nav-item-in-640de8cc{0%{opacity:0;transform:translateY(-8px)}to{opacity:1;transform:translateY(0)}}@keyframes nav-underline-in-640de8cc{0%{transform:scaleX(0)}to{transform:scaleX(1)}}@media (prefers-reduced-motion:reduce){.topbar[data-v-640de8cc],.topbar[data-v-640de8cc]:after,.nav-links a[data-v-640de8cc],.nav-links a.active[data-v-640de8cc]:after{animation:none}.nav-links a[data-v-640de8cc]{opacity:1}}.workshop-page{min-height:100vh - 74px;color:#17233c;background:#f5f7fb;font-family:Inter,-apple-system,BlinkMacSystemFont,Segoe UI,Microsoft YaHei,sans-serif}.topbar-actions{align-items:center;gap:18px;margin-left:auto;display:flex}.icon-button{color:#7d899d;cursor:pointer;background:0 0;border:0;place-items:center;width:25px;height:32px;padding:0;display:grid;position:relative}.icon-button svg{fill:none;stroke:currentColor;stroke-linecap:round;stroke-linejoin:round;stroke-width:1.8px;width:20px}.notification i{background:#f15b5b;border:2px solid #fff;border-radius:50%;width:6px;height:6px;position:absolute;top:4px;right:0}.user-avatar{color:#1769e0;background:#dceaff;border-radius:50%;place-items:center;width:34px;height:34px;font-size:14px;font-weight:700;display:grid}.user-name{color:#34415a;font-size:14px}.page-content{max-width:1310px;margin:auto;padding:43px 28px 60px}.welcome-row{justify-content:space-between;align-items:center;margin-bottom:34px;display:flex}.eyebrow{color:#8d98aa;margin:0 0 10px;font-size:12px}h1{color:#17233c;letter-spacing:-.7px;margin:0 0 8px;font-size:27px}h1 span{font-size:23px}.subheading{color:#7c8799;margin:0;font-size:13px}.primary-button{color:#fff;cursor:pointer;background:#1769e0;border:0;border-radius:7px;align-items:center;gap:8px;padding:12px 19px;font-size:13px;font-weight:600;display:flex;box-shadow:0 5px 12px #1769e033}.primary-button span{font-size:20px;font-weight:300;line-height:14px}.stats-grid{grid-template-columns:repeat(4,1fr);gap:18px;margin-bottom:25px;display:grid}.stat-card{background:#fff;border:1px solid #edf0f5;border-radius:10px;align-items:center;min-height:122px;padding:22px 18px;display:flex;box-shadow:0 4px 14px #253b5d08}.stat-icon{border-radius:10px;flex:0 0 45px;place-items:center;width:45px;height:45px;margin-right:14px;display:grid}.stat-icon svg{fill:none;stroke:currentColor;stroke-linecap:round;stroke-linejoin:round;stroke-width:1.7px;width:22px}.blue{color:#216de1;background:#eaf2ff}.orange{color:#ec8b28;background:#fff3e4}.green{color:#2ba66b;background:#e7f8ef}.purple{color:#8c62dc;background:#f0eaff}.stat-card p{color:#8490a2;margin:0 0 7px;font-size:12px}.stat-card strong{color:#1b2942;font-size:25px;line-height:1}.stat-card small{color:#8994a6;margin-left:4px;font-size:11px}.trend{white-space:nowrap;border-radius:4px;align-self:flex-start;margin:3px 0 0 auto;padding:4px 7px;font-size:10px}.trend.up{color:#2ca66c;background:#eaf8f0}.trend.neutral{color:#8b63d9;background:#f0eaff}.dashboard-grid{grid-template-columns:minmax(0,1.58fr) minmax(340px,1fr);gap:20px;display:grid}.panel{background:#fff;border:1px solid #edf0f5;border-radius:10px;padding:24px 25px;box-shadow:0 4px 14px #253b5d08}.panel-heading{border-bottom:1px solid #f0f2f6;justify-content:space-between;align-items:flex-start;padding-bottom:17px;display:flex}.panel-heading h2{color:#1e2b43;margin:0 0 5px;font-size:16px}.panel-heading p{color:#98a2b1;margin:0;font-size:11px}.panel-heading a{color:#1769e0;font-size:11px;text-decoration:none}.panel-heading a span,.notice-banner a span{margin-left:4px;font-size:16px}.appointment-item{border-bottom:1px solid #f2f3f6;align-items:center;min-height:66px;display:flex}.appointment-item:last-child{border-bottom:0}.appointment-item time{color:#35425a;width:56px;font-size:13px;font-weight:700}.appointment-item time small{color:#a0a9b7;margin-top:3px;font-size:10px;font-weight:400;display:block}.car-badge{color:#286de0;background:#e5efff;border-radius:7px;place-items:center;width:31px;height:31px;margin-right:12px;font-size:12px;font-weight:800;display:grid}.car-badge.red{color:#e45656;background:#ffebeb}.car-badge.green{color:#2c9b68;background:#e4f7ed}.car-badge.dark{color:#53647b;background:#edf0f4}.appointment-info{flex:1}.appointment-info strong{color:#354158;margin-bottom:4px;font-size:12px;display:block}.appointment-info p{color:#9aa4b3;margin:0;font-size:11px}.status{border-radius:4px;padding:5px 9px;font-size:10px}.status.waiting{color:#d98627;background:#fff3e4}.status.serving{color:#216de1;background:#eaf2ff}.status.done{color:#2ca66c;background:#eaf8f0}.quick-actions{grid-template-columns:1fr 1fr;gap:12px;padding-top:17px;display:grid}.quick-actions a{border:1px solid #eef0f4;border-radius:8px;flex-direction:column;min-height:103px;padding:15px 13px;text-decoration:none;transition:border-color .2s,transform .2s;display:flex}.quick-actions a:hover{border-color:#b7d0f7;transform:translateY(-2px)}.quick-icon{border-radius:7px;place-items:center;width:30px;height:30px;margin-bottom:9px;font-size:19px;display:grid}.quick-actions strong{color:#3a465c;font-size:12px}.quick-actions small{color:#a0a9b7;margin-top:4px;font-size:10px}.notice-banner{color:#775c2d;background:#fffbf2;border:1px solid #faefd1;border-radius:8px;align-items:center;gap:13px;margin-top:20px;padding:14px 18px;display:flex}.notice-icon{color:#fff;background:#e8ad42;border-radius:50%;flex:0 0 25px;place-items:center;width:25px;height:25px;font-size:14px;font-weight:800;display:grid}.notice-banner strong{font-size:12px}.notice-banner p{color:#9c875f;margin:3px 0 0;font-size:11px}.notice-banner b{color:#e28d24}.notice-banner a{color:#d4871f;white-space:nowrap;margin-left:auto;font-size:11px;text-decoration:none}@media (width<=900px){.topbar{gap:24px}.nav-links{gap:16px}.stats-grid{grid-template-columns:repeat(2,1fr)}.dashboard-grid{grid-template-columns:1fr}}@media (width<=600px){.topbar{flex-wrap:wrap;height:auto;min-height:68px;padding:14px 18px}.nav-links{order:3;justify-content:space-between;width:100%;height:38px}.topbar-actions{gap:8px}.user-name{display:none}.page-content{padding:28px 16px 40px}.welcome-row{flex-direction:column;align-items:flex-start;gap:20px}.stats-grid{gap:10px}.stat-card{min-height:105px;padding:14px 10px}.stat-icon{flex-basis:36px;width:36px;height:36px;margin-right:8px}.stat-icon svg{width:18px}.stat-card strong{font-size:20px}.trend{display:none}.panel{padding:18px 14px}.appointment-item time{width:48px}.appointment-info strong{font-size:11px}.status{padding:4px 6px}.notice-banner{align-items:flex-start}.notice-banner a{margin-top:4px}}*{box-sizing:border-box}.login-page{color:#1d2b45;background:#f7f9fc;min-height:100vh;font-family:Inter,-apple-system,BlinkMacSystemFont,Segoe UI,Microsoft YaHei,sans-serif;display:flex}.brand-panel,.form-panel{width:50%}.brand-panel{color:#fff;background:linear-gradient(145deg,#0d58c9,#176fe1 62%,#2782eb);min-height:100vh;display:flex;position:relative;overflow:hidden}.brand-content{z-index:1;flex-direction:column;width:76%;max-width:570px;margin:0 auto;padding:clamp(42px,8vh,85px) 0;display:flex;position:relative}.brand,.mobile-brand{color:inherit;align-items:center;gap:11px;font-size:21px;font-weight:800;text-decoration:none;display:flex}.brand-mark{background:#fff;border-radius:11px;place-items:center;width:39px;height:39px;display:grid}.brand-mark svg{fill:#1769e1;width:24px}.brand-slogan{flex-direction:column;align-items:center;margin-top:clamp(90px,17vh,175px);display:flex}.eyebrow{color:#bcd7ff;letter-spacing:3px;margin:0 0 20px;font-size:13px}.brand-slogan h1{color:#fff;letter-spacing:-2px;margin:0;font-size:clamp(36px,4vw,56px);font-weight:800;line-height:1.28}.brand-slogan h1 em{color:#d3e6ff;font-style:normal}.intro{color:#c9ddfb;justify-content:center;width:80%;margin:25px 0 0;font-size:15px;line-height:1.9;display:flex}.service-tags{flex-wrap:wrap;justify-content:space-around;gap:11px;margin-top:auto;display:flex}.service-tags span{color:#d9eaff;background:#ffffff1c;border:1px solid #ffffff2b;border-radius:5px;padding:8px 13px;font-size:11px}.decor{border:1px solid #ffffff1f;border-radius:50%;position:absolute}.decor-one{width:480px;height:480px;top:-180px;right:-100px}.decor-two{background:#ffffff09;width:460px;height:460px;bottom:-240px;right:12%}.car-line{opacity:.16;fill:none;stroke:#fff;stroke-linecap:round;stroke-linejoin:round;stroke-width:3px;width:min(58%,500px);position:absolute;bottom:10%;right:2%}.form-panel{flex-direction:column;justify-content:center;align-items:center;min-height:100vh;padding:40px 5%;display:flex}.login-card{width:100%;max-width:420px}.mobile-brand{color:#1769e1;font-size:18px;display:none}.mobile-brand .brand-mark{background:#e8f1ff;width:34px;height:34px}.mobile-brand .brand-mark svg{width:20px}.form-heading{margin-bottom:35px}.form-heading h2{color:#1b2942;letter-spacing:-.8px;margin:0 0 9px;font-size:30px}.form-heading p,.register-tip,.agreement{color:#8e9aac;margin:0;font-size:13px}.login-form label,.password-label label{color:#40506a;margin-bottom:9px;font-size:13px;font-weight:600;display:block}.password-label{justify-content:space-between;align-items:center;margin-top:21px;display:flex}.password-label a,.register-tip a,.agreement a{color:#1769e1;text-decoration:none}.input-wrap{background:#fff;border:1px solid #e0e6ef;border-radius:6px;align-items:center;gap:10px;height:48px;padding:0 14px;transition:border-color .2s,box-shadow .2s;display:flex}.input-wrap:focus-within{border-color:#1769e1;box-shadow:0 0 0 3px #1769e11a}.input-wrap>svg{fill:none;stroke:#a4afbd;stroke-linecap:round;stroke-linejoin:round;stroke-width:1.7px;flex:0 0 18px;width:18px}.input-wrap input{color:#25344d;width:100%;min-width:0;font:inherit;background:0 0;border:0;outline:0;padding:0;font-size:13px}.input-wrap input::placeholder{color:#adb6c3}.password-toggle{color:#a4afbd;cursor:pointer;background:0 0;border:0;place-items:center;width:24px;height:30px;padding:0;display:grid}.password-toggle svg{fill:none;stroke:currentColor;stroke-linecap:round;stroke-linejoin:round;stroke-width:1.6px;width:18px}.remember{align-items:center;gap:8px;color:#77859a!important;margin:17px 0 25px!important;font-size:12px!important;font-weight:400!important;display:flex!important}.remember input{accent-color:#1769e1;width:15px;height:15px;margin:0}.login-button{color:#fff;cursor:pointer;width:100%;height:48px;font:inherit;background:#1769e1;border:0;border-radius:6px;font-size:14px;font-weight:600;transition:background .2s,transform .2s;box-shadow:0 8px 18px #1769e12e}.login-button:hover{background:#0e5ac7;transform:translateY(-1px)}.register-tip{text-align:center;margin-top:25px}.register-tip a{margin-left:4px;font-weight:600}.agreement{white-space:nowrap;justify-content:center;align-items:center;gap:4px;margin-top:75px;font-size:10px;display:flex}.agreement-line{background:#e2e7ee;width:25px;height:1px;margin:0 5px}.copyright{color:#b0b9c6;margin:28px 0 0;font-size:10px}@media (width<=760px){.login-page{background:#f7f9fc;display:block}.brand-panel{display:none}.form-panel{justify-content:flex-start;width:100%;min-height:100vh;padding:38px 7% 25px}.login-card{max-width:470px}.mobile-brand{margin-bottom:65px;display:flex}.form-heading{margin-bottom:30px}.form-heading h2{font-size:27px}.agreement{margin-top:58px}}@media (width<=380px){.form-panel{padding-left:20px;padding-right:20px}.mobile-brand{margin-bottom:48px}.agreement-line{width:12px;margin:0 2px}}.bill-page[data-v-c010ae6f]{box-sizing:border-box;width:100%;min-height:100vh;padding:20px 16px calc(24px + env(safe-area-inset-bottom));color:#20232a;background:#f6f7fb}.page-header[data-v-c010ae6f]{justify-content:space-between;align-items:baseline;max-width:720px;margin:0 auto 16px;display:flex}h1[data-v-c010ae6f]{margin:0;font-size:22px;font-weight:600}.bill-count[data-v-c010ae6f]{color:#969ba6;font-size:13px}.bill-list[data-v-c010ae6f]{background:#fff;border-radius:12px;max-width:720px;margin:0 auto;overflow:hidden}.bill-item[data-v-c010ae6f]{border-bottom:1px solid #f0f1f4;align-items:center;min-height:72px;padding:0 16px;display:flex}.bill-icon[data-v-c010ae6f]{border-radius:50%;place-items:center;width:36px;height:36px;margin-right:12px;font-size:13px;display:grid}.bill-icon.income[data-v-c010ae6f]{color:#14966b;background:#e7f8f1}.bill-icon.expense[data-v-c010ae6f]{color:#eb635b;background:#fff0ef}.bill-info[data-v-c010ae6f]{flex:1;min-width:0}.bill-title[data-v-c010ae6f]{text-overflow:ellipsis;white-space:nowrap;font-size:15px;overflow:hidden}.bill-time[data-v-c010ae6f]{color:#a0a5ae;margin-top:5px;font-size:12px}.bill-amount[data-v-c010ae6f]{margin-left:12px;font-size:15px;font-weight:500}.bill-amount.income[data-v-c010ae6f]{color:#14966b}.bill-amount.expense[data-v-c010ae6f]{color:#20232a}.list-status[data-v-c010ae6f]{color:#a0a5ae;text-align:center;padding:20px 0;font-size:13px}.load-more-target[data-v-c010ae6f]{height:1px}@media (width>=768px){.bill-page[data-v-c010ae6f]{padding-top:32px}}:root{--text:#6b6375;--text-h:#08060d;--bg:#fff;--border:#e5e4e7;--code-bg:#f4f3ec;--accent:#aa3bff;--accent-bg:#aa3bff1a;--accent-border:#aa3bff80;--social-bg:#f4f3ec80;--shadow:#0000001a 0 10px 15px -3px, #0000000d 0 4px 6px -2px;--sans:system-ui, "Segoe UI", Roboto, sans-serif;--heading:system-ui, "Segoe UI", Roboto, sans-serif;--mono:ui-monospace, Consolas, monospace;font:18px/145% var(--sans);letter-spacing:.18px;--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light dark;color:var(--text);background:var(--bg);font-synthesis:none;text-rendering:optimizelegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}@media (prefers-color-scheme:dark){:root{--lightningcss-light: ;--lightningcss-dark:initial}}@media (width<=1024px){:root{font-size:16px}}@media (prefers-color-scheme:dark){:root{--text:#9ca3af;--text-h:#f3f4f6;--bg:#16171d;--border:#2e303a;--code-bg:#1f2028;--accent:#c084fc;--accent-bg:#c084fc26;--accent-border:#c084fc80;--social-bg:#2f303a80;--shadow:#0006 0 10px 15px -3px, #00000040 0 4px 6px -2px}#social .button-icon{filter:invert()brightness(2)}}body{margin:0}h1,h2{font-family:var(--heading);color:var(--text-h);font-weight:500}h1{letter-spacing:-1.68px;margin:32px 0;font-size:56px}@media (width<=1024px){h1{margin:20px 0;font-size:36px}}h2{letter-spacing:-.24px;margin:0 0 8px;font-size:24px;line-height:118%}@media (width<=1024px){h2{font-size:20px}}p{margin:0}code,.counter{font-family:var(--mono);color:var(--text-h);border-radius:4px;display:inline-flex}code{background:var(--code-bg);padding:4px 8px;font-size:15px;line-height:135%}.counter{color:var(--accent);background:var(--accent-bg);border:2px solid #0000;border-radius:5px;margin-bottom:24px;padding:5px 10px;font-size:16px;transition:border-color .3s}.counter:hover{border-color:var(--accent-border)}.counter:focus-visible{outline:2px solid var(--accent);outline-offset:2px}.hero{position:relative}.hero .base,.hero .framework,.hero .vite{margin:0 auto;inset-inline:0}.hero .base{z-index:0;width:170px;position:relative}.hero .framework,.hero .vite{position:absolute}.hero .framework{z-index:1;height:28px;top:34px;transform:perspective(2000px)rotate(300deg)rotateX(44deg)rotateY(39deg)scale(1.4)}.hero .vite{z-index:0;width:auto;height:26px;top:107px;transform:perspective(2000px)rotate(300deg)rotateX(40deg)rotateY(39deg)scale(.8)}#app{text-align:center;border-inline:1px solid var(--border);box-sizing:border-box;flex-direction:column;width:1126px;max-width:100%;min-height:100svh;margin:0 auto;display:flex}#center{flex-direction:column;flex-grow:1;place-content:center;place-items:center;gap:25px;display:flex}@media (width<=1024px){#center{gap:18px;padding:32px 20px 24px}}#next-steps{border-top:1px solid var(--border);text-align:left;display:flex}#next-steps>div{flex:1 1 0;padding:32px}@media (width<=1024px){#next-steps>div{padding:24px 20px}}#next-steps .icon{width:22px;height:22px;margin-bottom:16px}@media (width<=1024px){#next-steps{text-align:center;flex-direction:column}}#docs{border-right:1px solid var(--border)}@media (width<=1024px){#docs{border-right:none;border-bottom:1px solid var(--border)}}#next-steps ul{gap:8px;margin:32px 0 0;padding:0;list-style:none;display:flex}#next-steps ul .logo{height:18px}#next-steps ul a{color:var(--text-h);background:var(--social-bg);border-radius:6px;align-items:center;gap:8px;padding:6px 12px;font-size:16px;text-decoration:none;transition:box-shadow .3s;display:flex}#next-steps ul a:hover{box-shadow:var(--shadow)}#next-steps ul a .button-icon{width:18px;height:18px}@media (width<=1024px){#next-steps ul{flex-wrap:wrap;justify-content:center;margin-top:20px}#next-steps ul li{flex:calc(50% - 8px)}#next-steps ul a{box-sizing:border-box;justify-content:center;width:100%}}#spacer{border-top:1px solid var(--border);height:88px}@media (width<=1024px){#spacer{height:48px}}.ticks{width:100%;position:relative}.ticks:before,.ticks:after{content:"";border:5px solid #0000;position:absolute;top:-4.5px}.ticks:before{border-left-color:var(--border);left:0}.ticks:after{border-right-color:var(--border);right:0} diff --git a/dist/index.html b/dist/index.html index b296e06..3ad098b 100644 --- a/dist/index.html +++ b/dist/index.html @@ -5,8 +5,8 @@ hong - - + +
diff --git a/node_modules/.package-lock.json b/node_modules/.package-lock.json index 80aebb1..f9590a4 100644 --- a/node_modules/.package-lock.json +++ b/node_modules/.package-lock.json @@ -402,6 +402,18 @@ "node": ">=0.4.0" } }, + "node_modules/agent-base": { + "version": "6.0.2", + "resolved": "https://registry.npmmirror.com/agent-base/-/agent-base-6.0.2.tgz", + "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", + "license": "MIT", + "dependencies": { + "debug": "4" + }, + "engines": { + "node": ">= 6.0.0" + } + }, "node_modules/alien-signals": { "version": "3.1.2", "resolved": "https://registry.npmmirror.com/alien-signals/-/alien-signals-3.1.2.tgz", @@ -441,6 +453,24 @@ "url": "https://github.com/sponsors/sxzz" } }, + "node_modules/asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmmirror.com/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", + "license": "MIT" + }, + "node_modules/axios": { + "version": "1.21.1", + "resolved": "https://registry.npmmirror.com/axios/-/axios-1.21.1.tgz", + "integrity": "sha512-6eI5Q/Y4u/Um9dDlsRoq5pY2rxnUTv+L4PpLitnbk/i4jb3MxLZ5CsN5Ih3IysbeRYK4pR+P7qfMsOQl9fwwFQ==", + "license": "MIT", + "dependencies": { + "follow-redirects": "^1.16.2", + "form-data": "^4.0.6", + "https-proxy-agent": "^5.0.1", + "proxy-from-env": "^2.1.0" + } + }, "node_modules/birpc": { "version": "2.9.0", "resolved": "https://registry.npmmirror.com/birpc/-/birpc-2.9.0.tgz", @@ -450,6 +480,19 @@ "url": "https://github.com/sponsors/antfu" } }, + "node_modules/call-bind-apply-helpers": { + "version": "1.0.2", + "resolved": "https://registry.npmmirror.com/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz", + "integrity": "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/chokidar": { "version": "5.0.0", "resolved": "https://registry.npmmirror.com/chokidar/-/chokidar-5.0.0.tgz", @@ -465,6 +508,18 @@ "url": "https://paulmillr.com/funding/" } }, + "node_modules/combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmmirror.com/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "license": "MIT", + "dependencies": { + "delayed-stream": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, "node_modules/confbox": { "version": "0.2.4", "resolved": "https://registry.npmmirror.com/confbox/-/confbox-0.2.4.tgz", @@ -492,12 +547,38 @@ "integrity": "sha512-z1HGKcYy2xA8AGQfwrn0PAy+PB7X/GSj3UVJW9qKyn43xWa+gl5nXmU4qqLMRzWVLFC8KusUX8T/0kCiOYpAIQ==", "license": "MIT" }, + "node_modules/debug": { + "version": "4.4.3", + "resolved": "https://registry.npmmirror.com/debug/-/debug-4.4.3.tgz", + "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==", + "license": "MIT", + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, "node_modules/defu": { "version": "6.1.7", "resolved": "https://registry.npmjs.org/defu/-/defu-6.1.7.tgz", "integrity": "sha512-7z22QmUWiQ/2d0KkdYmANbRUVABpZ9SNYyH5vx6PZ+nE5bcC0l7uFvEfHlyld/HcGBFTL536ClDt3DEcSlEJAQ==", "license": "MIT" }, + "node_modules/delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmmirror.com/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", + "license": "MIT", + "engines": { + "node": ">=0.4.0" + } + }, "node_modules/detect-libc": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.1.2.tgz", @@ -508,6 +589,20 @@ "node": ">=8" } }, + "node_modules/dunder-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmmirror.com/dunder-proto/-/dunder-proto-1.0.1.tgz", + "integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==", + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.1", + "es-errors": "^1.3.0", + "gopd": "^1.2.0" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/entities": { "version": "7.0.1", "resolved": "https://registry.npmmirror.com/entities/-/entities-7.0.1.tgz", @@ -520,6 +615,51 @@ "url": "https://github.com/fb55/entities?sponsor=1" } }, + "node_modules/es-define-property": { + "version": "1.0.1", + "resolved": "https://registry.npmmirror.com/es-define-property/-/es-define-property-1.0.1.tgz", + "integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-errors": { + "version": "1.3.0", + "resolved": "https://registry.npmmirror.com/es-errors/-/es-errors-1.3.0.tgz", + "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-object-atoms": { + "version": "1.1.2", + "resolved": "https://registry.npmmirror.com/es-object-atoms/-/es-object-atoms-1.1.2.tgz", + "integrity": "sha512-HWcBoN6NileqtSydK2FqHbS/LoDd2pqrnQHLyJzBj4kOp/ky2MWMN694xOfkK8/SnUsW2DH7EfyVlydKCsm1Zw==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-set-tostringtag": { + "version": "2.1.0", + "resolved": "https://registry.npmmirror.com/es-set-tostringtag/-/es-set-tostringtag-2.1.0.tgz", + "integrity": "sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.6", + "has-tostringtag": "^1.0.2", + "hasown": "^2.0.2" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/estree-walker": { "version": "2.0.2", "resolved": "https://registry.npmmirror.com/estree-walker/-/estree-walker-2.0.2.tgz", @@ -549,6 +689,42 @@ } } }, + "node_modules/follow-redirects": { + "version": "1.16.3", + "resolved": "https://registry.npmmirror.com/follow-redirects/-/follow-redirects-1.16.3.tgz", + "integrity": "sha512-toOSoqN6d51Wjf1aOFJYcoVv1aND9rj/CwjLU0Vz40oDuSpWDayCeKe4JpL5NL0WdFvoOOCI3BRo69HahjbR1A==", + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/RubenVerborgh" + } + ], + "license": "MIT", + "engines": { + "node": ">=4.0" + }, + "peerDependenciesMeta": { + "debug": { + "optional": true + } + } + }, + "node_modules/form-data": { + "version": "4.0.6", + "resolved": "https://registry.npmmirror.com/form-data/-/form-data-4.0.6.tgz", + "integrity": "sha512-vKatAh4SlVfgbv+YtmhiRjhEMJsYpsG1Y2rMQtR+SVSbytsSD1YGzDIcrAJmdFec88u/+VoGmxnl+80gL1tRCQ==", + "license": "MIT", + "dependencies": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "es-set-tostringtag": "^2.1.0", + "hasown": "^2.0.4", + "mime-types": "^2.1.35" + }, + "engines": { + "node": ">= 6" + } + }, "node_modules/fsevents": { "version": "2.3.3", "resolved": "https://registry.npmmirror.com/fsevents/-/fsevents-2.3.3.tgz", @@ -564,12 +740,122 @@ "node": "^8.16.0 || ^10.6.0 || >=11.0.0" } }, + "node_modules/function-bind": { + "version": "1.1.2", + "resolved": "https://registry.npmmirror.com/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-intrinsic": { + "version": "1.3.0", + "resolved": "https://registry.npmmirror.com/get-intrinsic/-/get-intrinsic-1.3.0.tgz", + "integrity": "sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==", + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.2", + "es-define-property": "^1.0.1", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.1.1", + "function-bind": "^1.1.2", + "get-proto": "^1.0.1", + "gopd": "^1.2.0", + "has-symbols": "^1.1.0", + "hasown": "^2.0.2", + "math-intrinsics": "^1.1.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmmirror.com/get-proto/-/get-proto-1.0.1.tgz", + "integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==", + "license": "MIT", + "dependencies": { + "dunder-proto": "^1.0.1", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/gopd": { + "version": "1.2.0", + "resolved": "https://registry.npmmirror.com/gopd/-/gopd-1.2.0.tgz", + "integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-symbols": { + "version": "1.1.0", + "resolved": "https://registry.npmmirror.com/has-symbols/-/has-symbols-1.1.0.tgz", + "integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-tostringtag": { + "version": "1.0.2", + "resolved": "https://registry.npmmirror.com/has-tostringtag/-/has-tostringtag-1.0.2.tgz", + "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==", + "license": "MIT", + "dependencies": { + "has-symbols": "^1.0.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/hasown": { + "version": "2.0.4", + "resolved": "https://registry.npmmirror.com/hasown/-/hasown-2.0.4.tgz", + "integrity": "sha512-T2UbfbBEF32wiepXIsMlTW9+dDYC6wMh/t/vYA4tuOMKqWz/n3vr1NFSxQiyP+zk2mXsoMA/i/7qV6LKut1t1A==", + "license": "MIT", + "dependencies": { + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/hookable": { "version": "5.5.3", "resolved": "https://registry.npmmirror.com/hookable/-/hookable-5.5.3.tgz", "integrity": "sha512-Yc+BQe8SvoXH1643Qez1zqLRmbA5rCL+sSmk6TVos0LWVfNIB7PGncdlId77WzLGSIB5KaWgTaNTs2lNVEI6VQ==", "license": "MIT" }, + "node_modules/https-proxy-agent": { + "version": "5.0.1", + "resolved": "https://registry.npmmirror.com/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz", + "integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==", + "license": "MIT", + "dependencies": { + "agent-base": "6", + "debug": "4" + }, + "engines": { + "node": ">= 6" + } + }, "node_modules/is-what": { "version": "5.5.0", "resolved": "https://registry.npmmirror.com/is-what/-/is-what-5.5.0.tgz", @@ -698,6 +984,36 @@ "url": "https://github.com/sponsors/sxzz" } }, + "node_modules/math-intrinsics": { + "version": "1.1.0", + "resolved": "https://registry.npmmirror.com/math-intrinsics/-/math-intrinsics-1.1.0.tgz", + "integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/mime-db": { + "version": "1.52.0", + "resolved": "https://registry.npmmirror.com/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime-types": { + "version": "2.1.35", + "resolved": "https://registry.npmmirror.com/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "license": "MIT", + "dependencies": { + "mime-db": "1.52.0" + }, + "engines": { + "node": ">= 0.6" + } + }, "node_modules/mitt": { "version": "3.0.1", "resolved": "https://registry.npmmirror.com/mitt/-/mitt-3.0.1.tgz", @@ -733,6 +1049,12 @@ "pathe": "^2.0.1" } }, + "node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmmirror.com/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "license": "MIT" + }, "node_modules/muggle-string": { "version": "0.4.1", "resolved": "https://registry.npmmirror.com/muggle-string/-/muggle-string-0.4.1.tgz", @@ -918,6 +1240,15 @@ "node": "^10 || ^12 || >=14" } }, + "node_modules/proxy-from-env": { + "version": "2.1.0", + "resolved": "https://registry.npmmirror.com/proxy-from-env/-/proxy-from-env-2.1.0.tgz", + "integrity": "sha512-cJ+oHTW1VAEa8cJslgmUZrc+sjRKgAKl3Zyse6+PV38hZe/V6Z14TbCuXcan9F9ghlz4QrFr2c92TNF82UkYHA==", + "license": "MIT", + "engines": { + "node": ">=10" + } + }, "node_modules/quansync": { "version": "0.2.11", "resolved": "https://registry.npmmirror.com/quansync/-/quansync-0.2.11.tgz", diff --git a/node_modules/.vite/deps/_metadata.json b/node_modules/.vite/deps/_metadata.json index 3e90af9..ba84381 100644 --- a/node_modules/.vite/deps/_metadata.json +++ b/node_modules/.vite/deps/_metadata.json @@ -1,31 +1,37 @@ { - "hash": "52d2e52f", + "hash": "006622f4", "configHash": "fcc5c9ea", - "lockfileHash": "249dfc88", - "browserHash": "caa69558", + "lockfileHash": "97e58b4d", + "browserHash": "b0057e1f", "optimized": { + "axios": { + "src": "../../axios/index.js", + "file": "axios.js", + "fileHash": "e122e9db", + "needsInterop": false + }, "pinia-plugin-persistedstate": { "src": "../../pinia-plugin-persistedstate/dist/index.js", "file": "pinia-plugin-persistedstate.js", - "fileHash": "2e10a0e3", + "fileHash": "c6613f0d", "needsInterop": false }, "pinia": { "src": "../../pinia/dist/pinia.mjs", "file": "pinia.js", - "fileHash": "f3acaa04", + "fileHash": "5c99a01a", "needsInterop": false }, "vue-router": { "src": "../../vue-router/dist/vue-router.js", "file": "vue-router.js", - "fileHash": "4a3cd007", + "fileHash": "5d56fc03", "needsInterop": false }, "vue": { "src": "../../vue/dist/vue.runtime.esm-bundler.js", "file": "vue.js", - "fileHash": "20642df1", + "fileHash": "f34e61db", "needsInterop": false } }, diff --git a/node_modules/.vite/deps/axios.js b/node_modules/.vite/deps/axios.js new file mode 100644 index 0000000..5000130 --- /dev/null +++ b/node_modules/.vite/deps/axios.js @@ -0,0 +1,4238 @@ +//#region \0rolldown/runtime.js +var __defProp = Object.defineProperty; +var __exportAll = (all, no_symbols) => { + let target = {}; + for (var name in all) __defProp(target, name, { + get: all[name], + enumerable: true + }); + if (!no_symbols) __defProp(target, Symbol.toStringTag, { value: "Module" }); + return target; +}; +//#endregion +//#region node_modules/axios/lib/helpers/bind.js +/** +* Create a bound version of a function with a specified `this` context +* +* @param {Function} fn - The function to bind +* @param {*} thisArg - The value to be passed as the `this` parameter +* @returns {Function} A new function that will call the original function with the specified `this` context +*/ +function bind(fn, thisArg) { + return function wrap() { + return fn.apply(thisArg, arguments); + }; +} +//#endregion +//#region node_modules/axios/lib/utils.js +var { toString } = Object.prototype; +var { getPrototypeOf } = Object; +var { iterator, toStringTag } = Symbol; +var hasOwnProperty = (({ hasOwnProperty }) => (obj, prop) => hasOwnProperty.call(obj, prop))(Object.prototype); +var isUnsafeObjectKey = (prop) => typeof prop === "string" && (prop === "__proto__" || prop === "constructor" || prop === "prototype"); +/** +* Determine whether an inherited object must be treated as a shared-prototype +* boundary. Cross-realm Object.prototype objects cannot be distinguished +* reliably from application-created null-prototype objects because their +* properties are mutable, so all inherited terminal prototypes are excluded +* as a fail-closed boundary. A null-prototype source still keeps its own +* properties, as produced by mergeConfig and other safe materialization paths. +* +* @param {*} obj The object to inspect +* @param {*} prototype The object's prototype +* @param {boolean} source Whether obj is the original traversal source +* +* @returns {boolean} True when obj is a safe prototype traversal boundary +*/ +var isPrototypeBoundary = (obj, prototype, source) => obj === Object.prototype || !source && prototype === null; +/** +* Determine whether an object can retain its identity through code paths that +* add, replace, and remove config properties without bypassing unsafe-key +* filtering. Immutable objects, unsafe-key-bearing objects, and objects with +* accessor or restricted data properties must be materialized instead. +* +* @param {*} obj The object to inspect +* +* @returns {boolean} True when every own property is safe and fully mutable +*/ +var isSafeAndFullyMutable = (obj) => { + if (!Object.isExtensible(obj)) return false; + const props = Object.getOwnPropertyNames(obj); + if (Object.getOwnPropertySymbols) props.push(...Object.getOwnPropertySymbols(obj)); + return props.every((prop) => { + if (isUnsafeObjectKey(prop)) return false; + const descriptor = Object.getOwnPropertyDescriptor(obj, prop); + return !!descriptor && descriptor.configurable && descriptor.writable === true; + }); +}; +/** +* Walk the prototype chain (excluding the source realm's Object.prototype) +* looking for an own `prop`. This distinguishes genuine own/inherited members +* — including class accessors and template prototypes — from members injected +* via Object.prototype pollution (e.g. `Object.prototype.username = '...'`), +* which live on Object.prototype itself and are therefore never matched. +* +* @param {*} thing The value whose chain to inspect +* @param {string|symbol} prop The property key to look for +* +* @returns {boolean} True when `prop` is owned below Object.prototype +*/ +var hasOwnInPrototypeChain = (thing, prop) => { + let obj = thing; + const seen = []; + while (obj != null) { + if (seen.indexOf(obj) !== -1) return false; + seen.push(obj); + const prototype = getPrototypeOf(obj); + if (isPrototypeBoundary(obj, prototype, obj === thing)) return false; + if (hasOwnProperty(obj, prop)) return true; + obj = prototype; + } + return false; +}; +/** +* Read `obj[prop]` only when it is safe from Object.prototype pollution. Own +* properties and members inherited from a non-Object.prototype source (a class +* instance or template object) are honored; a value reachable only through a +* polluted Object.prototype is ignored and `undefined` is returned. +* +* @param {*} obj The source object +* @param {string|symbol} prop The property key to read +* +* @returns {*} The resolved value, or undefined when unsafe/absent +*/ +var getSafeProp = (obj, prop) => obj != null && hasOwnInPrototypeChain(obj, prop) ? obj[prop] : void 0; +/** +* Flatten an object and its application-defined prototype chain into a +* null-prototype object. Members inherited only from the source realm's +* Object.prototype are deliberately excluded, while class/template members +* below that boundary are preserved. +* +* @param {*} thing The value to flatten +* +* @returns {*} A null-prototype copy, or the original value when it is already +* structurally safe or is not an object +*/ +var toSafeFlatObject = (thing) => { + if (thing == null || typeof thing !== "object" && typeof thing !== "function") return thing; + const sourcePrototype = getPrototypeOf(thing); + if (sourcePrototype === null && isSafeAndFullyMutable(thing)) return thing; + const result = Object.create(null); + const merged = Object.create(null); + const seen = []; + let current = thing; + while (current != null) { + if (seen.indexOf(current) !== -1) break; + seen.push(current); + const prototype = current === thing ? sourcePrototype : getPrototypeOf(current); + if (isPrototypeBoundary(current, prototype, current === thing)) break; + const props = Object.getOwnPropertyNames(current); + if (Object.getOwnPropertySymbols) props.push(...Object.getOwnPropertySymbols(current)); + for (const prop of props) { + if (isUnsafeObjectKey(prop)) continue; + if (!hasOwnProperty(merged, prop)) { + result[prop] = thing[prop]; + merged[prop] = true; + } + } + current = prototype; + } + return result; +}; +var kindOf = ((cache) => (thing) => { + const str = toString.call(thing); + return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase()); +})(Object.create(null)); +var kindOfTest = (type) => { + type = type.toLowerCase(); + return (thing) => kindOf(thing) === type; +}; +var typeOfTest = (type) => (thing) => typeof thing === type; +/** +* Determine if a value is a non-null object +* +* @param {Object} val The value to test +* +* @returns {boolean} True if value is an Array, otherwise false +*/ +var { isArray } = Array; +/** +* Determine if a value is undefined +* +* @param {*} val The value to test +* +* @returns {boolean} True if the value is undefined, otherwise false +*/ +var isUndefined = typeOfTest("undefined"); +/** +* Determine if a value is a Buffer +* +* @param {*} val The value to test +* +* @returns {boolean} True if value is a Buffer, otherwise false +*/ +function isBuffer(val) { + return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor) && isFunction$1(val.constructor.isBuffer) && val.constructor.isBuffer(val); +} +/** +* Determine if a value is an ArrayBuffer +* +* @param {*} val The value to test +* +* @returns {boolean} True if value is an ArrayBuffer, otherwise false +*/ +var isArrayBuffer = kindOfTest("ArrayBuffer"); +/** +* Determine if a value is a view on an ArrayBuffer +* +* @param {*} val The value to test +* +* @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false +*/ +function isArrayBufferView(val) { + let result; + if (typeof ArrayBuffer !== "undefined" && ArrayBuffer.isView) result = ArrayBuffer.isView(val); + else result = val && val.buffer && isArrayBuffer(val.buffer); + return result; +} +/** +* Determine if a value is a String +* +* @param {*} val The value to test +* +* @returns {boolean} True if value is a String, otherwise false +*/ +var isString = typeOfTest("string"); +/** +* Determine if a value is a Function +* +* @param {*} val The value to test +* @returns {boolean} True if value is a Function, otherwise false +*/ +var isFunction$1 = typeOfTest("function"); +/** +* Determine if a value is a Number +* +* @param {*} val The value to test +* +* @returns {boolean} True if value is a Number, otherwise false +*/ +var isNumber = typeOfTest("number"); +/** +* Determine if a value is an Object +* +* @param {*} thing The value to test +* +* @returns {boolean} True if value is an Object, otherwise false +*/ +var isObject = (thing) => thing !== null && typeof thing === "object"; +/** +* Determine if a value is a Boolean +* +* @param {*} thing The value to test +* @returns {boolean} True if value is a Boolean, otherwise false +*/ +var isBoolean = (thing) => thing === true || thing === false; +/** +* Determine if a value is a plain Object +* +* @param {*} val The value to test +* +* @returns {boolean} True if value is a plain Object, otherwise false +*/ +var isPlainObject = (val) => { + if (!isObject(val)) return false; + const prototype = getPrototypeOf(val); + return (prototype === null || prototype === Object.prototype || getPrototypeOf(prototype) === null) && (isPrototypeBoundary(val, prototype, true) || !hasOwnProperty(val, toStringTag) && !hasOwnProperty(val, iterator)); +}; +/** +* Determine if a value is an empty object (safely handles Buffers) +* +* @param {*} val The value to test +* +* @returns {boolean} True if value is an empty object, otherwise false +*/ +var isEmptyObject = (val) => { + if (!isObject(val) || isBuffer(val)) return false; + try { + return Object.keys(val).length === 0 && Object.getPrototypeOf(val) === Object.prototype; + } catch (e) { + return false; + } +}; +/** +* Determine if a value is a Date +* +* @param {*} val The value to test +* +* @returns {boolean} True if value is a Date, otherwise false +*/ +var isDate = kindOfTest("Date"); +/** +* Determine if a value is a File +* +* @param {*} val The value to test +* +* @returns {boolean} True if value is a File, otherwise false +*/ +var isFile = kindOfTest("File"); +/** +* Determine if a value is a React Native Blob +* React Native "blob": an object with a `uri` attribute. Optionally, it can +* also have a `name` and `type` attribute to specify filename and content type +* +* @see https://github.com/facebook/react-native/blob/26684cf3adf4094eb6c405d345a75bf8c7c0bf88/Libraries/Network/FormData.js#L68-L71 +* +* @param {*} value The value to test +* +* @returns {boolean} True if value is a React Native Blob, otherwise false +*/ +var isReactNativeBlob = (value) => { + return !!(value && typeof value.uri !== "undefined"); +}; +/** +* Determine if environment is React Native +* ReactNative `FormData` has a non-standard `getParts()` method +* +* @param {*} formData The formData to test +* +* @returns {boolean} True if environment is React Native, otherwise false +*/ +var isReactNative = (formData) => formData && typeof formData.getParts !== "undefined"; +/** +* Determine if a value is a Blob +* +* @param {*} val The value to test +* +* @returns {boolean} True if value is a Blob, otherwise false +*/ +var isBlob = kindOfTest("Blob"); +/** +* Determine if a value is a FileList +* +* @param {*} val The value to test +* +* @returns {boolean} True if value is a FileList, otherwise false +*/ +var isFileList = kindOfTest("FileList"); +var isSet = kindOfTest("Set"); +/** +* Determine if a value is a Stream +* +* @param {*} val The value to test +* +* @returns {boolean} True if value is a Stream, otherwise false +*/ +var isStream = (val) => isObject(val) && isFunction$1(val.pipe); +/** +* Determine if a value is a FormData +* +* @param {*} thing The value to test +* +* @returns {boolean} True if value is an FormData, otherwise false +*/ +function getGlobal() { + if (typeof globalThis !== "undefined") return globalThis; + if (typeof self !== "undefined") return self; + if (typeof window !== "undefined") return window; + if (typeof global !== "undefined") return global; + return {}; +} +var G = getGlobal(); +var FormDataCtor = typeof G.FormData !== "undefined" ? G.FormData : void 0; +var isFormData = (thing) => { + if (!thing) return false; + if (FormDataCtor && thing instanceof FormDataCtor) return true; + const proto = getPrototypeOf(thing); + if (!proto || proto === Object.prototype) return false; + if (!isFunction$1(thing.append)) return false; + const kind = kindOf(thing); + return kind === "formdata" || kind === "object" && isFunction$1(thing.toString) && thing.toString() === "[object FormData]"; +}; +/** +* Determine if a value is a URLSearchParams object +* +* @param {*} val The value to test +* +* @returns {boolean} True if value is a URLSearchParams object, otherwise false +*/ +var isURLSearchParams = kindOfTest("URLSearchParams"); +var [isReadableStream, isRequest, isResponse, isHeaders] = [ + "ReadableStream", + "Request", + "Response", + "Headers" +].map(kindOfTest); +/** +* Trim excess whitespace off the beginning and end of a string +* +* @param {String} str The String to trim +* +* @returns {String} The String freed of excess whitespace +*/ +var trim = (str) => { + return str.trim ? str.trim() : str.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, ""); +}; +/** +* Iterate over an Array or an Object invoking a function for each item. +* +* If `obj` is an Array callback will be called passing +* the value, index, and complete array for each item. +* +* If 'obj' is an Object callback will be called passing +* the value, key, and complete object for each property. +* +* @param {Object|Array} obj The object to iterate +* @param {Function} fn The callback to invoke for each item +* +* @param {Object} [options] +* @param {Boolean} [options.allOwnKeys = false] +* @returns {any} +*/ +function forEach(obj, fn, { allOwnKeys = false } = {}) { + if (obj === null || typeof obj === "undefined") return; + let i; + let l; + if (typeof obj !== "object") obj = [obj]; + if (isArray(obj)) for (i = 0, l = obj.length; i < l; i++) fn.call(null, obj[i], i, obj); + else { + if (isBuffer(obj)) return; + const keys = allOwnKeys ? Object.getOwnPropertyNames(obj) : Object.keys(obj); + const len = keys.length; + let key; + for (i = 0; i < len; i++) { + key = keys[i]; + fn.call(null, obj[key], key, obj); + } + } +} +/** +* Finds a key in an object, case-insensitive, returning the actual key name. +* Returns null if the object is a Buffer or if no match is found. +* +* @param {Object} obj - The object to search. +* @param {string} key - The key to find (case-insensitive). +* @returns {?string} The actual key name if found, otherwise null. +*/ +function findKey(obj, key) { + if (isBuffer(obj)) return null; + key = key.toLowerCase(); + const keys = Object.keys(obj); + let i = keys.length; + let _key; + while (i-- > 0) { + _key = keys[i]; + if (key === _key.toLowerCase()) return _key; + } + return null; +} +var _global = (() => { + if (typeof globalThis !== "undefined") return globalThis; + return typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : global; +})(); +var isContextDefined = (context) => !isUndefined(context) && context !== _global; +/** +* Accepts varargs expecting each argument to be an object, then +* immutably merges the properties of each object and returns result. +* +* When multiple objects contain the same key the later object in +* the arguments list will take precedence. +* +* Example: +* +* ```js +* const result = merge({foo: 123}, {foo: 456}); +* console.log(result.foo); // outputs 456 +* ``` +* +* @param {Object} obj1 Object to merge +* +* @returns {Object} Result of all merge properties +*/ +function merge(...objs) { + const { caseless, skipUndefined } = isContextDefined(this) && this || {}; + const result = {}; + const lowerCaseKeys = caseless ? Object.create(null) : null; + const assignValue = (val, key) => { + if (key === "__proto__" || key === "constructor" || key === "prototype") return; + let targetKey = key; + if (lowerCaseKeys && typeof key === "string") { + const lowerKey = key.toLowerCase(); + const knownKey = lowerCaseKeys[lowerKey]; + if (knownKey !== void 0 && hasOwnProperty(result, knownKey)) targetKey = knownKey; + else lowerCaseKeys[lowerKey] = key; + } + const existing = hasOwnProperty(result, targetKey) ? result[targetKey] : void 0; + if (isPlainObject(existing) && isPlainObject(val)) result[targetKey] = merge(existing, val); + else if (isPlainObject(val)) result[targetKey] = merge({}, val); + else if (isArray(val)) result[targetKey] = val.slice(); + else if (!skipUndefined || !isUndefined(val)) result[targetKey] = val; + }; + for (let i = 0, l = objs.length; i < l; i++) { + const source = objs[i]; + if (!source || isBuffer(source)) continue; + forEach(source, assignValue); + if (typeof source !== "object" || isArray(source) || !Object.getOwnPropertySymbols) continue; + const symbols = Object.getOwnPropertySymbols(source); + for (let j = 0; j < symbols.length; j++) { + const symbol = symbols[j]; + if (propertyIsEnumerable.call(source, symbol)) assignValue(source[symbol], symbol); + } + } + return result; +} +/** +* Extends object a by mutably adding to it the properties of object b. +* +* @param {Object} a The object to be extended +* @param {Object} b The object to copy properties from +* @param {Object} thisArg The object to bind function to +* +* @param {Object} [options] +* @param {Boolean} [options.allOwnKeys] +* @returns {Object} The resulting value of object a +*/ +var extend = (a, b, thisArg, { allOwnKeys } = {}) => { + forEach(b, (val, key) => { + if (thisArg && isFunction$1(val)) Object.defineProperty(a, key, { + __proto__: null, + value: bind(val, thisArg), + writable: true, + enumerable: true, + configurable: true + }); + else Object.defineProperty(a, key, { + __proto__: null, + value: val, + writable: true, + enumerable: true, + configurable: true + }); + }, { allOwnKeys }); + return a; +}; +/** +* Remove byte order marker. This catches EF BB BF (the UTF-8 BOM) +* +* @param {string} content with BOM +* +* @returns {string} content value without BOM +*/ +var stripBOM = (content) => { + if (content.charCodeAt(0) === 65279) content = content.slice(1); + return content; +}; +/** +* Inherit the prototype methods from one constructor into another +* @param {function} constructor +* @param {function} superConstructor +* @param {object} [props] +* @param {object} [descriptors] +* +* @returns {void} +*/ +var inherits = (constructor, superConstructor, props, descriptors) => { + constructor.prototype = Object.create(superConstructor.prototype, descriptors); + Object.defineProperty(constructor.prototype, "constructor", { + __proto__: null, + value: constructor, + writable: true, + enumerable: false, + configurable: true + }); + Object.defineProperty(constructor, "super", { + __proto__: null, + value: superConstructor.prototype + }); + props && Object.assign(constructor.prototype, props); +}; +/** +* Resolve object with deep prototype chain to a flat object +* @param {Object} sourceObj source object +* @param {Object} [destObj] +* @param {Function|Boolean} [filter] +* @param {Function} [propFilter] +* +* @returns {Object} +*/ +var toFlatObject = (sourceObj, destObj, filter, propFilter) => { + let props; + let i; + let prop; + const merged = {}; + destObj = destObj || {}; + if (sourceObj == null) return destObj; + do { + props = Object.getOwnPropertyNames(sourceObj); + i = props.length; + while (i-- > 0) { + prop = props[i]; + if ((!propFilter || propFilter(prop, sourceObj, destObj)) && !merged[prop]) { + destObj[prop] = sourceObj[prop]; + merged[prop] = true; + } + } + sourceObj = filter !== false && getPrototypeOf(sourceObj); + } while (sourceObj && (!filter || filter(sourceObj, destObj)) && sourceObj !== Object.prototype); + return destObj; +}; +/** +* Determines whether a string ends with the characters of a specified string +* +* @param {String} str +* @param {String} searchString +* @param {Number} [position= 0] +* +* @returns {boolean} +*/ +var endsWith = (str, searchString, position) => { + str = String(str); + if (position === void 0 || position > str.length) position = str.length; + position -= searchString.length; + const lastIndex = str.indexOf(searchString, position); + return lastIndex !== -1 && lastIndex === position; +}; +/** +* Returns new array from array like object or null if failed +* +* @param {*} [thing] +* +* @returns {?Array} +*/ +var toArray = (thing) => { + if (!thing) return null; + if (isArray(thing)) return thing; + let i = thing.length; + if (!Number.isSafeInteger(i) || i < 0 || i > 4294967295) return null; + const indexes = /* @__PURE__ */ new Set(); + const seen = /* @__PURE__ */ new Set(); + let source = thing; + while (source != null && indexes.size < i) { + if (seen.has(source)) return null; + seen.add(source); + const prototype = getPrototypeOf(source); + if (isPrototypeBoundary(source, prototype, source === thing)) break; + Object.getOwnPropertyNames(source).forEach((key) => { + const index = +key; + if (Number.isInteger(index) && index >= 0 && index < i && String(index) === key && hasOwnProperty(source, key)) indexes.add(index); + }); + source = prototype; + } + if (indexes.size !== i) return null; + const arr = new Array(i); + while (i-- > 0) arr[i] = thing[i]; + return arr; +}; +/** +* Checking if the Uint8Array exists and if it does, it returns a function that checks if the +* thing passed in is an instance of Uint8Array +* +* @param {TypedArray} +* +* @returns {Array} +*/ +var isTypedArray = ((TypedArray) => { + return (thing) => { + return TypedArray && thing instanceof TypedArray; + }; +})(typeof Uint8Array !== "undefined" && getPrototypeOf(Uint8Array)); +/** +* For each entry in the object, call the function with the key and value. +* +* @param {Object} obj - The object to iterate over. +* @param {Function} fn - The function to call for each entry. +* +* @returns {void} +*/ +var forEachEntry = (obj, fn) => { + const _iterator = (obj && obj[iterator]).call(obj); + let result; + while ((result = _iterator.next()) && !result.done) { + const pair = result.value; + fn.call(obj, pair[0], pair[1]); + } +}; +/** +* It takes a regular expression and a string, and returns an array of all the matches +* +* @param {string} regExp - The regular expression to match against. +* @param {string} str - The string to search. +* +* @returns {Array} +*/ +var matchAll = (regExp, str) => { + let matches; + const arr = []; + while ((matches = regExp.exec(str)) !== null) arr.push(matches); + return arr; +}; +var isHTMLForm = kindOfTest("HTMLFormElement"); +var toCamelCase = (str) => { + return str.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g, function replacer(m, p1, p2) { + return p1.toUpperCase() + p2; + }); +}; +var { propertyIsEnumerable } = Object.prototype; +/** +* Determine if a value is a RegExp object +* +* @param {*} val The value to test +* +* @returns {boolean} True if value is a RegExp object, otherwise false +*/ +var isRegExp = kindOfTest("RegExp"); +var reduceDescriptors = (obj, reducer) => { + const descriptors = Object.getOwnPropertyDescriptors(obj); + const reducedDescriptors = {}; + forEach(descriptors, (descriptor, name) => { + let ret; + if ((ret = reducer(descriptor, name, obj)) !== false) reducedDescriptors[name] = ret || descriptor; + }); + Object.defineProperties(obj, reducedDescriptors); +}; +/** +* Makes all methods read-only +* @param {Object} obj +*/ +var freezeMethods = (obj) => { + reduceDescriptors(obj, (descriptor, name) => { + if (isFunction$1(obj) && [ + "arguments", + "caller", + "callee" + ].includes(name)) return false; + const value = obj[name]; + if (!isFunction$1(value)) return; + descriptor.enumerable = false; + if ("writable" in descriptor) { + descriptor.writable = false; + return; + } + if (!descriptor.set) descriptor.set = () => { + throw Error("Can not rewrite read-only method '" + name + "'"); + }; + }); +}; +/** +* Converts an array or a delimited string into an object set with values as keys and true as values. +* Useful for fast membership checks. +* +* @param {Array|string} arrayOrString - The array or string to convert. +* @param {string} delimiter - The delimiter to use if input is a string. +* @returns {Object} An object with keys from the array or string, values set to true. +*/ +var toObjectSet = (arrayOrString, delimiter) => { + const obj = {}; + const define = (arr) => { + arr.forEach((value) => { + obj[value] = true; + }); + }; + isArray(arrayOrString) ? define(arrayOrString) : define(String(arrayOrString).split(delimiter)); + return obj; +}; +var noop = () => {}; +var toFiniteNumber = (value, defaultValue) => { + return value != null && Number.isFinite(value = +value) ? value : defaultValue; +}; +/** +* If the thing is a FormData object, return true, otherwise return false. +* +* @param {unknown} thing - The thing to check. +* +* @returns {boolean} +*/ +function isSpecCompliantForm(thing) { + return !!(thing && isFunction$1(thing.append) && thing[toStringTag] === "FormData" && thing[iterator]); +} +/** +* Recursively converts an object to a JSON-compatible object, handling circular references and Buffers. +* +* @param {Object} obj - The object to convert. +* @returns {Object} The JSON-compatible object. +*/ +var toJSONObject = (obj) => { + const visited = /* @__PURE__ */ new WeakSet(); + const visit = (source) => { + if (isObject(source)) { + if (visited.has(source)) return; + if (isBuffer(source)) return source; + if (!("toJSON" in source)) { + visited.add(source); + let target; + if (isSet(source)) { + target = []; + for (const value of source) { + const reducedValue = visit(value); + !isUndefined(reducedValue) && target.push(reducedValue); + } + } else { + target = isArray(source) ? [] : {}; + forEach(source, (value, key) => { + const reducedValue = visit(value); + !isUndefined(reducedValue) && (target[key] = reducedValue); + }); + } + visited.delete(source); + return target; + } + } + return source; + }; + return visit(obj); +}; +/** +* Determines if a value is an async function. +* +* @param {*} thing - The value to test. +* @returns {boolean} True if value is an async function, otherwise false. +*/ +var isAsyncFn = kindOfTest("AsyncFunction"); +/** +* Determines if a value is thenable (has then and catch methods). +* +* @param {*} thing - The value to test. +* @returns {boolean} True if value is thenable, otherwise false. +*/ +var isThenable = (thing) => thing && (isObject(thing) || isFunction$1(thing)) && isFunction$1(thing.then) && isFunction$1(thing.catch); +/** +* Provides a cross-platform setImmediate implementation. +* Uses native setImmediate if available, otherwise falls back to postMessage or setTimeout. +* +* @param {boolean} setImmediateSupported - Whether setImmediate is supported. +* @param {boolean} postMessageSupported - Whether postMessage is supported. +* @returns {Function} A function to schedule a callback asynchronously. +*/ +var _setImmediate = ((setImmediateSupported, postMessageSupported) => { + if (setImmediateSupported) return setImmediate; + return postMessageSupported ? ((token, callbacks) => { + _global.addEventListener("message", ({ source, data }) => { + if (source === _global && data === token) callbacks.length && callbacks.shift()(); + }, false); + return (cb) => { + callbacks.push(cb); + _global.postMessage(token, "*"); + }; + })(`axios@${Math.random()}`, []) : (cb) => setTimeout(cb); +})(typeof setImmediate === "function", isFunction$1(_global.postMessage)); +/** +* Schedules a microtask or asynchronous callback as soon as possible. +* Uses queueMicrotask if available, otherwise falls back to process.nextTick or _setImmediate. +* +* @type {Function} +*/ +var asap = typeof queueMicrotask !== "undefined" ? queueMicrotask.bind(_global) : typeof process !== "undefined" && process.nextTick || _setImmediate; +var isIterable = (thing) => thing != null && isFunction$1(thing[iterator]); +/** +* Determine if a value is iterable via an iterator that is NOT sourced solely +* from a polluted Object.prototype. Use this instead of `isIterable` whenever +* the iterable comes from untrusted input (e.g. user-supplied header sources), +* so `Object.prototype[Symbol.iterator] = ...` cannot turn an ordinary object +* into an attacker-controlled entries iterator. +* +* @param {*} thing The value to test +* +* @returns {boolean} True if value has a non-polluted iterator +*/ +var isSafeIterable = (thing) => thing != null && hasOwnInPrototypeChain(thing, iterator) && isIterable(thing); +var utils_default = { + isArray, + isArrayBuffer, + isBuffer, + isFormData, + isArrayBufferView, + isString, + isNumber, + isBoolean, + isObject, + isPlainObject, + isEmptyObject, + isReadableStream, + isRequest, + isResponse, + isHeaders, + isUndefined, + isDate, + isFile, + isReactNativeBlob, + isReactNative, + isBlob, + isRegExp, + isFunction: isFunction$1, + isStream, + isURLSearchParams, + isTypedArray, + isFileList, + forEach, + merge, + extend, + trim, + stripBOM, + inherits, + toFlatObject, + kindOf, + kindOfTest, + endsWith, + toArray, + forEachEntry, + matchAll, + isHTMLForm, + hasOwnProperty, + hasOwnProp: hasOwnProperty, + hasOwnInPrototypeChain, + getSafeProp, + toSafeFlatObject, + reduceDescriptors, + freezeMethods, + toObjectSet, + toCamelCase, + noop, + toFiniteNumber, + findKey, + global: _global, + isContextDefined, + isSpecCompliantForm, + toJSONObject, + isAsyncFn, + isThenable, + setImmediate: _setImmediate, + asap, + isIterable, + isSafeIterable +}; +//#endregion +//#region node_modules/axios/lib/helpers/parseHeaders.js +var ignoreDuplicateOf = utils_default.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" +]); +/** +* Parse headers into an object +* +* ``` +* Date: Wed, 27 Aug 2014 08:58:49 GMT +* Content-Type: application/json +* Connection: keep-alive +* Transfer-Encoding: chunked +* ``` +* +* @param {String} rawHeaders Headers needing to be parsed +* +* @returns {Object} Headers parsed into an object +*/ +var parseHeaders_default = (rawHeaders) => { + const parsed = Object.create(null); + let key; + let val; + let i; + rawHeaders && rawHeaders.split("\n").forEach(function parser(line) { + i = line.indexOf(":"); + key = line.substring(0, i).trim().toLowerCase(); + val = line.substring(i + 1).trim(); + const hasKey = utils_default.hasOwnProp(parsed, key); + if (!key || hasKey && utils_default.hasOwnProp(ignoreDuplicateOf, key)) return; + if (key === "set-cookie") { + if (hasKey) parsed[key].push(val); + else parsed[key] = [val]; + } else parsed[key] = hasKey ? parsed[key] + ", " + val : val; + }); + return parsed; +}; +//#endregion +//#region node_modules/axios/lib/helpers/sanitizeHeaderValue.js +function trimSPorHTAB(str) { + let start = 0; + let end = str.length; + while (start < end) { + const code = str.charCodeAt(start); + if (code !== 9 && code !== 32) break; + start += 1; + } + while (end > start) { + const code = str.charCodeAt(end - 1); + if (code !== 9 && code !== 32) break; + end -= 1; + } + return start === 0 && end === str.length ? str : str.slice(start, end); +} +var INVALID_UNICODE_HEADER_VALUE_CHARS = /* @__PURE__ */ new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+", "g"); +var INVALID_BYTE_STRING_HEADER_VALUE_CHARS = /* @__PURE__ */ new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+", "g"); +function sanitizeValue(value, invalidChars) { + if (utils_default.isArray(value)) return value.map((item) => sanitizeValue(item, invalidChars)); + return trimSPorHTAB(String(value).replace(invalidChars, "")); +} +var sanitizeHeaderValue = (value) => sanitizeValue(value, INVALID_UNICODE_HEADER_VALUE_CHARS); +var sanitizeByteStringHeaderValue = (value) => sanitizeValue(value, INVALID_BYTE_STRING_HEADER_VALUE_CHARS); +function toByteStringHeaderObject(headers) { + const byteStringHeaders = Object.create(null); + utils_default.forEach(headers.toJSON(), (value, header) => { + byteStringHeaders[header] = sanitizeByteStringHeaderValue(value); + }); + return byteStringHeaders; +} +//#endregion +//#region node_modules/axios/lib/core/AxiosHeaders.js +var $internals$1 = Symbol("internals"); +function normalizeHeader(header) { + return header && String(header).trim().toLowerCase(); +} +function normalizeValue(value) { + if (value === false || value == null) return value; + return utils_default.isArray(value) ? value.map(normalizeValue) : sanitizeHeaderValue(String(value)); +} +function parseTokens(str) { + const tokens = Object.create(null); + const tokensRE = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g; + let match; + while (match = tokensRE.exec(str)) tokens[match[1]] = match[2]; + return tokens; +} +var parameterNameRE = /^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/; +function trimOWS(value) { + let start = 0; + let end = value.length; + while (start < end) { + const code = value.charCodeAt(start); + if (code !== 9 && code !== 32) break; + start += 1; + } + while (end > start) { + const code = value.charCodeAt(end - 1); + if (code !== 9 && code !== 32) break; + end -= 1; + } + return start === 0 && end === value.length ? value : value.slice(start, end); +} +function decodeQuotedString(value) { + const last = value.length - 1; + if (last < 1 || value.charCodeAt(0) !== 34 || value.charCodeAt(last) !== 34) return value; + let decoded = ""; + for (let i = 1; i < last; i++) { + const code = value.charCodeAt(i); + if (code === 34) return value; + if (code === 92) { + i += 1; + if (i >= last) return value; + } + decoded += value[i]; + } + return decoded; +} +function parseParameters(value) { + const parameters = Object.create(null); + const str = String(value); + let start = 0; + let quoted = false; + let escaped = false; + function parseParameter(end) { + const part = trimOWS(str.slice(start, end)); + const equals = part.indexOf("="); + if (equals < 1) return; + const name = trimOWS(part.slice(0, equals)); + if (!parameterNameRE.test(name)) return; + const normalizedName = name.toLowerCase(); + if (normalizedName === "__proto__" || normalizedName === "constructor" || normalizedName === "prototype") return; + const parameterValue = trimOWS(part.slice(equals + 1)); + parameters[normalizedName] = decodeQuotedString(parameterValue); + } + for (let i = 0; i < str.length; i++) { + const code = str.charCodeAt(i); + if (quoted) { + if (escaped) escaped = false; + else if (code === 92) escaped = true; + else if (code === 34) quoted = false; + } else if (code === 34) quoted = true; + else if (code === 44 || code === 59) { + parseParameter(i); + start = i + 1; + } + } + parseParameter(str.length); + return parameters; +} +var isValidHeaderName = (str) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim()); +var PROTO_HEADER_SLOT = "__Proto__"; +var headerSlot = (name) => name === "__proto__" ? PROTO_HEADER_SLOT : name; +function matchHeaderValue(context, value, header, filter, isHeaderNameFilter) { + if (utils_default.isFunction(filter)) return filter.call(context, value, header); + if (isHeaderNameFilter) value = header; + if (!utils_default.isString(value)) return; + if (utils_default.isString(filter)) return value.indexOf(filter) !== -1; + if (utils_default.isRegExp(filter)) return filter.test(value); +} +function formatHeader(header) { + return header.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (w, char, str) => { + return char.toUpperCase() + str; + }); +} +function buildAccessors(obj, header) { + const accessorName = utils_default.toCamelCase(" " + header); + [ + "get", + "set", + "has" + ].forEach((methodName) => { + Object.defineProperty(obj, methodName + accessorName, { + __proto__: null, + value: function(arg1, arg2, arg3) { + return this[methodName].call(this, header, arg1, arg2, arg3); + }, + configurable: true + }); + }); +} +var AxiosHeaders$1 = class { + constructor(headers) { + headers && this.set(headers); + } + set(header, valueOrRewrite, rewrite) { + const self = this; + function setHeader(_value, _header, _rewrite) { + const lHeader = normalizeHeader(_header); + if (!lHeader) return; + const key = utils_default.findKey(self, lHeader); + if (!key || self[key] === void 0 || _rewrite === true || _rewrite === void 0 && self[key] !== false) self[headerSlot(key || _header)] = normalizeValue(_value); + } + const setHeaders = (headers, _rewrite) => utils_default.forEach(headers, (_value, _header) => setHeader(_value, _header, _rewrite)); + if (utils_default.isPlainObject(header) || header instanceof this.constructor) setHeaders(header, valueOrRewrite); + else if (utils_default.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) setHeaders(parseHeaders_default(header), valueOrRewrite); + else if (utils_default.isObject(header) && utils_default.isSafeIterable(header)) { + let obj = Object.create(null), dest, key; + for (const entry of header) { + if (!utils_default.isArray(entry)) throw new TypeError("Object iterator must return a key-value pair"); + key = entry[0]; + if (utils_default.hasOwnProp(obj, key)) { + dest = obj[key]; + obj[key] = utils_default.isArray(dest) ? [...dest, entry[1]] : [dest, entry[1]]; + } else obj[key] = entry[1]; + } + setHeaders(obj, valueOrRewrite); + } else header != null && setHeader(valueOrRewrite, header, rewrite); + return this; + } + get(header, parser) { + header = normalizeHeader(header); + if (header) { + const key = utils_default.findKey(this, header); + if (key) { + const value = this[key]; + if (!parser) return value; + if (parser === true) return parseTokens(value); + if (utils_default.isFunction(parser)) return parser.call(this, value, key); + if (utils_default.isRegExp(parser)) return parser.exec(value); + throw new TypeError("parser must be boolean|regexp|function"); + } + } + } + has(header, matcher) { + header = normalizeHeader(header); + if (header) { + const key = utils_default.findKey(this, header); + return !!(key && this[key] !== void 0 && (!matcher || matchHeaderValue(this, this[key], key, matcher))); + } + return false; + } + delete(header, matcher) { + const self = this; + let deleted = false; + function deleteHeader(_header) { + _header = normalizeHeader(_header); + if (_header) { + const key = utils_default.findKey(self, _header); + if (key && (!matcher || matchHeaderValue(self, self[key], key, matcher))) { + delete self[key]; + deleted = true; + } + } + } + if (utils_default.isArray(header)) header.forEach(deleteHeader); + else deleteHeader(header); + return deleted; + } + clear(matcher) { + const keys = Object.keys(this); + let i = keys.length; + let deleted = false; + while (i--) { + const key = keys[i]; + if (!matcher || matchHeaderValue(this, this[key], key, matcher, true)) { + delete this[key]; + deleted = true; + } + } + return deleted; + } + normalize(format) { + const self = this; + const headers = Object.create(null); + utils_default.forEach(this, (value, header) => { + const key = utils_default.findKey(headers, header); + if (key) { + self[key] = normalizeValue(value); + delete self[header]; + return; + } + const normalized = headerSlot(format ? formatHeader(header) : String(header).trim()); + if (normalized !== header) delete self[header]; + self[normalized] = normalizeValue(value); + headers[normalized] = true; + }); + return this; + } + concat(...targets) { + return this.constructor.concat(this, ...targets); + } + toJSON(asStrings) { + const obj = Object.create(null); + utils_default.forEach(this, (value, header) => { + value != null && value !== false && (obj[header] = asStrings && utils_default.isArray(value) ? value.join(", ") : value); + }); + return obj; + } + [Symbol.iterator]() { + return Object.entries(this.toJSON())[Symbol.iterator](); + } + toString() { + return Object.entries(this.toJSON()).map(([header, value]) => header + ": " + value).join("\n"); + } + getSetCookie() { + const value = this.get("set-cookie"); + return utils_default.isArray(value) ? value : value == null || value === false ? [] : [value]; + } + get [Symbol.toStringTag]() { + return "AxiosHeaders"; + } + static from(thing) { + return thing instanceof this ? thing : new this(thing); + } + static parseParameters(value) { + return parseParameters(value); + } + static concat(first, ...targets) { + const computed = new this(first); + targets.forEach((target) => computed.set(target)); + return computed; + } + static accessor(header) { + const accessors = (this[$internals$1] = this[$internals$1] = { accessors: {} }).accessors; + const prototype = this.prototype; + function defineAccessor(_header) { + const lHeader = normalizeHeader(_header); + if (!accessors[lHeader]) { + buildAccessors(prototype, _header); + accessors[lHeader] = true; + } + } + utils_default.isArray(header) ? header.forEach(defineAccessor) : defineAccessor(header); + return this; + } +}; +AxiosHeaders$1.accessor([ + "Content-Type", + "Content-Length", + "Accept", + "Accept-Encoding", + "User-Agent", + "Authorization" +]); +utils_default.reduceDescriptors(AxiosHeaders$1.prototype, ({ value }, key) => { + let mapped = key[0].toUpperCase() + key.slice(1); + return { + get: () => value, + set(headerValue) { + this[mapped] = headerValue; + } + }; +}); +utils_default.freezeMethods(AxiosHeaders$1); +//#endregion +//#region node_modules/axios/lib/core/AxiosError.js +var REDACTED = "[REDACTED ****]"; +function hasOwnOrPrototypeToJSON(source) { + if (utils_default.hasOwnProp(source, "toJSON")) return true; + let prototype = Object.getPrototypeOf(source); + while (prototype && prototype !== Object.prototype) { + if (utils_default.hasOwnProp(prototype, "toJSON")) return true; + prototype = Object.getPrototypeOf(prototype); + } + return false; +} +function redactConfig(config, redactKeys) { + const lowerKeys = new Set(redactKeys.map((k) => String(k).toLowerCase())); + const seen = []; + const visit = (source) => { + if (source === null || typeof source !== "object") return source; + if (utils_default.isBuffer(source)) return source; + if (seen.indexOf(source) !== -1) return void 0; + if (source instanceof AxiosHeaders$1) source = source.toJSON(); + seen.push(source); + let result; + if (utils_default.isArray(source)) { + result = []; + source.forEach((v, i) => { + const reducedValue = visit(v); + if (!utils_default.isUndefined(reducedValue)) result[i] = reducedValue; + }); + } else { + if (!utils_default.isPlainObject(source) && hasOwnOrPrototypeToJSON(source)) { + seen.pop(); + return source; + } + result = Object.create(null); + for (const [key, value] of Object.entries(source)) { + const reducedValue = lowerKeys.has(key.toLowerCase()) ? REDACTED : visit(value); + if (!utils_default.isUndefined(reducedValue)) result[key] = reducedValue; + } + } + seen.pop(); + return result; + }; + return visit(config); +} +function stringifySafely$1(value) { + try { + return String(value); + } catch (err) { + return ""; + } +} +function aggregateErrorMessage(error) { + return error.errors.map((entry) => { + try { + return entry && entry.message ? stringifySafely$1(entry.message) : stringifySafely$1(entry); + } catch (err) { + return ""; + } + }).filter(Boolean).join("; ") || error.name || "AggregateError"; +} +var CAUSED_BY_SEPARATOR = "\nCaused by: "; +var $causeStack = Symbol("causeStack"); +function getCauseStackIndex(error, stack) { + const causeStack = utils_default.hasOwnProp(error, $causeStack) && error[$causeStack]; + return causeStack && stack.endsWith(causeStack) ? stack.length - causeStack.length : -1; +} +/** +* Append the stack of a wrapped error to `target.stack`. +* +* `cause` already exposes the original error for tooling that walks the standard +* cause chain, but many error reporters read `stack` and nothing else. Inlining +* the wrapped stack there means those reporters surface the underlying failure +* instead of the axios frames that normalized it (see #6670). +* +* Every read is defensive: a custom `Error.prepareStackTrace` hook, a runtime +* without stack support, or a replaced `stack` property can leave the value +* missing, non-string, or read-only, and normalizing an error must not throw +* because of that. +* +* @param {Error} target The AxiosError being built. +* @param {Error} source The error being wrapped. +* +* @returns {void} +*/ +function appendCauseStack(target, source) { + try { + const sourceStack = source && source.stack; + if (typeof sourceStack !== "string" || !sourceStack) return; + const targetStack = target.stack; + if (typeof targetStack !== "string" || !targetStack) return; + const causeStack = CAUSED_BY_SEPARATOR + sourceStack; + target.stack = targetStack + causeStack; + Object.defineProperty(target, $causeStack, { + __proto__: null, + value: causeStack + }); + } catch (e) {} +} +var AxiosError$1 = class AxiosError$1 extends Error { + static from(error, code, config, request, response, customProps) { + let message = error.message; + if (!message && utils_default.isArray(error.errors) && error.errors.length) message = aggregateErrorMessage(error); + const axiosError = new AxiosError$1(message, code || error.code, config, request, response); + Object.defineProperty(axiosError, "cause", { + __proto__: null, + value: error, + writable: true, + enumerable: false, + configurable: true + }); + axiosError.name = error.name; + appendCauseStack(axiosError, error); + if (error.status != null && axiosError.status == null) axiosError.status = error.status; + customProps && Object.assign(axiosError, customProps); + return axiosError; + } + /** + * Create an Error with the specified message, config, error code, request and response. + * + * @param {string} message The error message. + * @param {string} [code] The error code (for example, 'ECONNABORTED'). + * @param {Object} [config] The config. + * @param {Object} [request] The request. + * @param {Object} [response] The response. + * + * @returns {Error} The created error. + */ + constructor(message, code, config, request, response) { + super(message); + Object.defineProperty(this, "message", { + __proto__: null, + value: message, + enumerable: true, + writable: true, + configurable: true + }); + this.name = "AxiosError"; + this.isAxiosError = true; + code && (this.code = code); + config && (this.config = config); + request && (this.request = request); + if (response) { + this.response = response; + this.status = response.status; + } + } + toJSON() { + const config = this.config; + const redactKeys = config && utils_default.hasOwnProp(config, "redact") ? config.redact : void 0; + const serializedConfig = utils_default.isArray(redactKeys) && redactKeys.length > 0 ? redactConfig(config, redactKeys) : utils_default.toJSONObject(config); + 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: serializedConfig, + code: this.code, + status: this.status + }; + } +}; +AxiosError$1.ERR_BAD_OPTION_VALUE = "ERR_BAD_OPTION_VALUE"; +AxiosError$1.ERR_BAD_OPTION = "ERR_BAD_OPTION"; +AxiosError$1.ECONNABORTED = "ECONNABORTED"; +AxiosError$1.ETIMEDOUT = "ETIMEDOUT"; +AxiosError$1.ECONNREFUSED = "ECONNREFUSED"; +AxiosError$1.ERR_NETWORK = "ERR_NETWORK"; +AxiosError$1.ERR_FR_TOO_MANY_REDIRECTS = "ERR_FR_TOO_MANY_REDIRECTS"; +AxiosError$1.ERR_DEPRECATED = "ERR_DEPRECATED"; +AxiosError$1.ERR_BAD_RESPONSE = "ERR_BAD_RESPONSE"; +AxiosError$1.ERR_BAD_REQUEST = "ERR_BAD_REQUEST"; +AxiosError$1.ERR_CANCELED = "ERR_CANCELED"; +AxiosError$1.ERR_NOT_SUPPORT = "ERR_NOT_SUPPORT"; +AxiosError$1.ERR_INVALID_URL = "ERR_INVALID_URL"; +AxiosError$1.ERR_FORM_DATA_DEPTH_EXCEEDED = "ERR_FORM_DATA_DEPTH_EXCEEDED"; +/** +* Determines if the given thing is a array or js object. +* +* @param {string} thing - The object or array to be visited. +* +* @returns {boolean} +*/ +function isVisitable(thing) { + return utils_default.isPlainObject(thing) || utils_default.isArray(thing); +} +/** +* It removes the brackets from the end of a string +* +* @param {string} key - The key of the parameter. +* +* @returns {string} the key without the brackets. +*/ +function removeBrackets(key) { + return utils_default.endsWith(key, "[]") ? key.slice(0, -2) : key; +} +/** +* It takes a path, a key, and a boolean, and returns a string +* +* @param {string} path - The path to the current key. +* @param {string} key - The key of the current object being iterated over. +* @param {string} dots - If true, the key will be rendered with dots instead of brackets. +* +* @returns {string} The path to the current key. +*/ +function renderKey(path, key, dots) { + if (!path) return key; + return path.concat(key).map(function each(token, i) { + token = removeBrackets(token); + return !dots && i ? "[" + token + "]" : token; + }).join(dots ? "." : ""); +} +/** +* If the array is an array and none of its elements are visitable, then it's a flat array. +* +* @param {Array} arr - The array to check +* +* @returns {boolean} +*/ +function isFlatArray(arr) { + return utils_default.isArray(arr) && !arr.some(isVisitable); +} +var predicates = utils_default.toFlatObject(utils_default, {}, null, function filter(prop) { + return /^is[A-Z]/.test(prop); +}); +/** +* Convert a data object to FormData +* +* @param {Object} obj +* @param {?Object} [formData] +* @param {?Object} [options] +* @param {Function} [options.visitor] +* @param {Boolean} [options.metaTokens = true] +* @param {Boolean} [options.dots = false] +* @param {?Boolean} [options.indexes = false] +* +* @returns {Object} +**/ +/** +* It converts an object into a FormData object +* +* @param {Object} obj - The object to convert to form data. +* @param {string} formData - The FormData object to append to. +* @param {Object} options +* +* @returns +*/ +function toFormData$1(obj, formData, options) { + if (!utils_default.isObject(obj)) throw new TypeError("target must be an object"); + formData = formData || new FormData(); + const option = (name, fallback) => { + const value = utils_default.getSafeProp(options, name); + return utils_default.isUndefined(value) ? fallback : value; + }; + const metaTokens = option("metaTokens", true); + const visitor = option("visitor") || defaultVisitor; + const dots = option("dots", false); + const indexes = option("indexes", false); + const _Blob = option("Blob") || typeof Blob !== "undefined" && Blob; + const maxDepth = option("maxDepth", 100); + const useBlob = _Blob && utils_default.isSpecCompliantForm(formData); + const stack = []; + if (!utils_default.isFunction(visitor)) throw new TypeError("visitor must be a function"); + function convertValue(value) { + if (value === null) return ""; + if (utils_default.isDate(value)) return value.toISOString(); + if (utils_default.isBoolean(value)) return value.toString(); + if (!useBlob && utils_default.isBlob(value)) throw new AxiosError$1("Blob is not supported. Use a Buffer instead."); + if (utils_default.isArrayBuffer(value) || utils_default.isTypedArray(value)) { + if (useBlob && typeof _Blob === "function") return new _Blob([value]); + throw new AxiosError$1("Blob is not supported. Use a Buffer instead.", AxiosError$1.ERR_NOT_SUPPORT); + } + return value; + } + function throwIfMaxDepthExceeded(depth) { + if (depth > maxDepth) throw new AxiosError$1("Object is too deeply nested (" + depth + " levels). Max depth: " + maxDepth, AxiosError$1.ERR_FORM_DATA_DEPTH_EXCEEDED); + } + function stringifyWithDepthLimit(value, depth) { + if (maxDepth === Infinity) return JSON.stringify(value); + const ancestors = []; + return JSON.stringify(value, function limitDepth(_key, currentValue) { + if (!utils_default.isObject(currentValue)) return currentValue; + while (ancestors.length && ancestors[ancestors.length - 1] !== this) ancestors.pop(); + ancestors.push(currentValue); + throwIfMaxDepthExceeded(depth + ancestors.length - 1); + return currentValue; + }); + } + /** + * Default visitor. + * + * @param {*} value + * @param {String|Number} key + * @param {Array} path + * @this {FormData} + * + * @returns {boolean} return true to visit the each prop of the value recursively + */ + function defaultVisitor(value, key, path) { + let arr = value; + if (utils_default.isReactNative(formData) && utils_default.isReactNativeBlob(value)) { + formData.append(renderKey(path, key, dots), convertValue(value)); + return false; + } + if (value && !path && typeof value === "object") { + if (utils_default.endsWith(key, "{}")) { + key = metaTokens ? key : key.slice(0, -2); + value = stringifyWithDepthLimit(value, 1); + } else if (utils_default.isArray(value) && isFlatArray(value) || (utils_default.isFileList(value) || utils_default.endsWith(key, "[]")) && (arr = utils_default.toArray(value))) { + key = removeBrackets(key); + arr.forEach(function each(el, index) { + !(utils_default.isUndefined(el) || el === null) && formData.append(indexes === true ? renderKey([key], index, dots) : indexes === null ? key : key + "[]", convertValue(el)); + }); + return false; + } + } + if (isVisitable(value)) return true; + formData.append(renderKey(path, key, dots), convertValue(value)); + return false; + } + const exposedHelpers = Object.assign(predicates, { + defaultVisitor, + convertValue, + isVisitable + }); + function build(value, path, depth = 0) { + if (utils_default.isUndefined(value)) return; + throwIfMaxDepthExceeded(depth); + if (stack.indexOf(value) !== -1) throw new Error("Circular reference detected in " + path.join(".")); + stack.push(value); + utils_default.forEach(value, function each(el, key) { + if ((!(utils_default.isUndefined(el) || el === null) && visitor.call(formData, el, utils_default.isString(key) ? key.trim() : key, path, exposedHelpers)) === true) build(el, path ? path.concat(key) : [key], depth + 1); + }); + stack.pop(); + } + if (!utils_default.isObject(obj)) throw new TypeError("data must be an object"); + build(obj); + return formData; +} +//#endregion +//#region node_modules/axios/lib/helpers/AxiosURLSearchParams.js +/** +* It encodes a string by replacing all characters that are not in the unreserved set with +* their percent-encoded equivalents +* +* @param {string} str - The string to encode. +* +* @returns {string} The encoded string. +*/ +function encode$1(str) { + const charMap = { + "!": "%21", + "'": "%27", + "(": "%28", + ")": "%29", + "~": "%7E", + "%20": "+" + }; + return encodeURIComponent(str).replace(/[!'()~]|%20/g, function replacer(match) { + return charMap[match]; + }); +} +/** +* It takes a params object and converts it to a FormData object +* +* @param {Object} params - The parameters to be converted to a FormData object. +* @param {Object} options - The options object passed to the Axios constructor. +* +* @returns {void} +*/ +function AxiosURLSearchParams(params, options) { + this._pairs = []; + params && toFormData$1(params, this, options); +} +var prototype = AxiosURLSearchParams.prototype; +prototype.append = function append(name, value) { + this._pairs.push([name, value]); +}; +prototype.toString = function toString(encoder) { + const _encode = encoder ? (value) => encoder.call(this, value, encode$1) : encode$1; + return this._pairs.map(function each(pair) { + return _encode(pair[0]) + "=" + _encode(pair[1]); + }, "").join("&"); +}; +//#endregion +//#region node_modules/axios/lib/helpers/buildURL.js +/** +* It replaces URL-encoded forms of `:`, `$`, `,`, and spaces with +* their plain counterparts (`:`, `$`, `,`, `+`). +* +* @param {string} val The value to be encoded. +* +* @returns {string} The encoded value. +*/ +function encode(val) { + return encodeURIComponent(val).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+"); +} +/** +* Build a URL by appending params to the end +* +* @param {string} url The base of the url (e.g., http://www.google.com) +* @param {object} [params] The params to be appended +* @param {?(object|Function)} options +* +* @returns {string} The formatted url +*/ +function buildURL(url, params, options) { + if (!params) return url; + url = url || ""; + const _options = utils_default.isFunction(options) ? { serialize: options } : options; + const _encode = utils_default.getSafeProp(_options, "encode") || encode; + const serializeFn = utils_default.getSafeProp(_options, "serialize"); + let serializedParams; + if (serializeFn) serializedParams = serializeFn(params, _options); + else serializedParams = utils_default.isURLSearchParams(params) ? params.toString() : new AxiosURLSearchParams(params, _options).toString(_encode); + if (serializedParams) { + const hashmarkIndex = url.indexOf("#"); + if (hashmarkIndex !== -1) url = url.slice(0, hashmarkIndex); + url += (url.indexOf("?") === -1 ? "?" : "&") + serializedParams; + } + return url; +} +//#endregion +//#region node_modules/axios/lib/core/InterceptorManager.js +var $internals = Symbol("internals"); +function countHandlers(handlers) { + return handlers ? handlers.length : 0; +} +function trimHandlers(handlers) { + if (!handlers) return; + while (handlers.length && handlers[handlers.length - 1] === null) handlers.pop(); +} +function normalizeHandlerId(id) { + if (typeof id === "string" && id !== "" && String(Number(id)) === id) return Number(id); + return id; +} +function syncHandlerEntries(manager, internals) { + const handlers = manager.handlers; + const length = countHandlers(handlers); + if (handlers !== internals.handlersRef) { + internals.handlersRef = handlers; + internals.handlerEntries.clear(); + } else if (length !== internals.handlersLength) { + if (!length) internals.handlerEntries.clear(); + else internals.handlerEntries.forEach(function removeStaleEntry(entry, id) { + if (handlers[entry.index] !== entry.handler) internals.handlerEntries.delete(id); + }); + } + internals.handlersLength = length; +} +var InterceptorManager = class { + constructor() { + this.handlers = []; + this[$internals] = { + handlersRef: this.handlers, + handlersLength: this.handlers.length, + handlerEntries: /* @__PURE__ */ new Map(), + iterationDepth: 0, + nextId: 0 + }; + } + /** + * Add a new interceptor to the stack + * + * @param {Function} fulfilled The function to handle `then` for a `Promise` + * @param {Function} rejected The function to handle `reject` for a `Promise` + * @param {Object} options The options for the interceptor, synchronous and runWhen + * + * @return {Number} An ID used to remove interceptor later + */ + use(fulfilled, rejected, options) { + const handler = { + fulfilled, + rejected, + synchronous: options ? options.synchronous : false, + runWhen: options ? options.runWhen : null + }; + const internals = this[$internals]; + if (this.handlers == null) this.handlers = []; + syncHandlerEntries(this, internals); + const id = internals.nextId++; + this.handlers.push(handler); + internals.handlerEntries.set(id, { + handler, + index: this.handlers.length - 1 + }); + internals.handlersLength = this.handlers.length; + return id; + } + /** + * Remove an interceptor from the stack + * + * @param {Number} id The ID that was returned by `use` + * + * @returns {void} + */ + eject(id) { + const internals = this[$internals]; + syncHandlerEntries(this, internals); + const handlerId = normalizeHandlerId(id); + const entry = internals.handlerEntries.get(handlerId); + if (entry) { + internals.handlerEntries.delete(handlerId); + if (this.handlers[entry.index] !== entry.handler) return; + this.handlers[entry.index] = null; + if (!internals.iterationDepth) { + trimHandlers(this.handlers); + internals.handlersLength = this.handlers.length; + } + } + } + /** + * Clear all interceptors from the stack + * + * @returns {void} + */ + clear() { + if (this.handlers) { + this.handlers = []; + syncHandlerEntries(this, this[$internals]); + } + } + /** + * Iterate over all the registered interceptors + * + * This method is particularly useful for skipping over any + * interceptors that may have become `null` calling `eject`. + * + * @param {Function} fn The function to call for each interceptor + * + * @returns {void} + */ + forEach(fn) { + const internals = this[$internals]; + syncHandlerEntries(this, internals); + internals.iterationDepth++; + try { + utils_default.forEach(this.handlers, function forEachHandler(h) { + if (h !== null) fn(h); + }); + } finally { + if (!--internals.iterationDepth) { + syncHandlerEntries(this, internals); + trimHandlers(this.handlers); + internals.handlersLength = countHandlers(this.handlers); + } + } + } +}; +//#endregion +//#region node_modules/axios/lib/defaults/transitional.js +var transitional_default = { + silentJSONParsing: true, + forcedJSONParsing: true, + clarifyTimeoutError: false, + legacyInterceptorReqResOrdering: true, + advertiseZstdAcceptEncoding: false, + validateStatusUndefinedResolves: true, + encodeBasicAuthUsername: false +}; +//#endregion +//#region node_modules/axios/lib/platform/browser/index.js +var browser_default = { + isBrowser: true, + classes: { + URLSearchParams: typeof URLSearchParams !== "undefined" ? URLSearchParams : AxiosURLSearchParams, + FormData: typeof FormData !== "undefined" ? FormData : null, + Blob: typeof Blob !== "undefined" ? Blob : null + }, + protocols: [ + "http", + "https", + "file", + "blob", + "url", + "data" + ] +}; +//#endregion +//#region node_modules/axios/lib/platform/common/utils.js +var utils_exports = /* @__PURE__ */ __exportAll({ + hasBrowserEnv: () => hasBrowserEnv, + hasStandardBrowserEnv: () => hasStandardBrowserEnv, + hasStandardBrowserWebWorkerEnv: () => hasStandardBrowserWebWorkerEnv, + navigator: () => _navigator, + origin: () => origin +}); +var hasBrowserEnv = typeof window !== "undefined" && typeof document !== "undefined"; +var _navigator = typeof navigator === "object" && navigator || void 0; +/** +* Determine if we're running in a standard browser environment +* +* This allows axios to run in a web worker, and react-native. +* Both environments support XMLHttpRequest, but not fully standard globals. +* +* web workers: +* typeof window -> undefined +* typeof document -> undefined +* +* react-native: +* navigator.product -> 'ReactNative' +* nativescript +* navigator.product -> 'NativeScript' or 'NS' +* +* @returns {boolean} +*/ +var hasStandardBrowserEnv = hasBrowserEnv && (!_navigator || [ + "ReactNative", + "NativeScript", + "NS" +].indexOf(_navigator.product) < 0); +/** +* Determine if we're running in a standard browser webWorker environment +* +* Although the `isStandardBrowserEnv` method indicates that +* `allows axios to run in a web worker`, the WebWorker will still be +* filtered out due to its judgment standard +* `typeof window !== 'undefined' && typeof document !== 'undefined'`. +* This leads to a problem when axios post `FormData` in webWorker +*/ +var hasStandardBrowserWebWorkerEnv = (() => { + return typeof WorkerGlobalScope !== "undefined" && self instanceof WorkerGlobalScope && typeof self.importScripts === "function"; +})(); +var origin = hasBrowserEnv && window.location.href || "http://localhost"; +//#endregion +//#region node_modules/axios/lib/platform/index.js +var platform_default = { + ...utils_exports, + ...browser_default +}; +//#endregion +//#region node_modules/axios/lib/helpers/toURLEncodedForm.js +function toURLEncodedForm(data, options) { + return toFormData$1(data, new platform_default.classes.URLSearchParams(), { + visitor: function(value, key, path, helpers) { + if (platform_default.isNode && utils_default.isBuffer(value)) { + this.append(key, value.toString("base64")); + return false; + } + return helpers.defaultVisitor.apply(this, arguments); + }, + ...options + }); +} +//#endregion +//#region node_modules/axios/lib/helpers/formDataToJSON.js +var MAX_DEPTH = 100; +function throwIfDepthExceeded(index) { + if (index > MAX_DEPTH) throw new AxiosError$1("FormData field is too deeply nested (" + index + " levels). Max depth: " + MAX_DEPTH, AxiosError$1.ERR_FORM_DATA_DEPTH_EXCEEDED); +} +/** +* It takes a string like `foo[x][y][z]` and returns an array like `['foo', 'x', 'y', 'z'] +* +* @param {string} name - The name of the property to get. +* +* @returns An array of strings. +*/ +function parsePropPath(name) { + const path = []; + const pattern = /[^.[\]]+|\[([^.[\]]*)]/g; + let match; + while ((match = pattern.exec(name)) !== null) { + throwIfDepthExceeded(path.length); + path.push(match[0] === "[]" ? "" : match[1] || match[0]); + } + return path; +} +/** +* Convert an array to an object. +* +* @param {Array} arr - The array to convert to an object. +* +* @returns An object with the same keys and values as the array. +*/ +function arrayToObject(arr) { + const obj = {}; + const keys = Object.keys(arr); + let i; + const len = keys.length; + let key; + for (i = 0; i < len; i++) { + key = keys[i]; + obj[key] = arr[key]; + } + return obj; +} +function normalizeArray(value) { + if (!utils_default.isArray(value)) return value; + const keys = Object.keys(value); + return keys.length !== value.length || keys.some((key, index) => key !== String(index)) ? arrayToObject(value) : value; +} +function normalizeArrays(obj) { + const pending = [obj]; + while (pending.length) { + const target = pending.pop(); + Object.keys(target).forEach((key) => { + const value = target[key] = normalizeArray(target[key]); + if (utils_default.isArray(value) || utils_default.isPlainObject(value)) pending.push(value); + }); + } + return obj; +} +/** +* It takes a FormData object and returns a JavaScript object +* +* @param {string} formData The FormData object to convert to JSON. +* +* @returns {Object | null} The converted object. +*/ +function formDataToJSON(formData) { + function buildPath(path, value, target, index) { + throwIfDepthExceeded(index); + let name = path[index++]; + if (name === "__proto__") return true; + const isNumericKey = Number.isFinite(+name); + const isLast = index >= path.length; + name = !name && utils_default.isArray(target) ? target.length : name; + if (isLast) { + if (utils_default.hasOwnProp(target, name)) { + target[name] = normalizeArray(target[name]); + target[name] = utils_default.isArray(target[name]) ? target[name].concat(value) : [target[name], value]; + } else target[name] = value; + return !isNumericKey; + } + if (!utils_default.hasOwnProp(target, name) || !utils_default.isObject(target[name])) target[name] = []; + if (buildPath(path, value, target[name], index) && utils_default.isArray(target[name])) target[name] = arrayToObject(target[name]); + return !isNumericKey; + } + if (utils_default.isFormData(formData) && utils_default.isFunction(formData.entries)) { + const obj = {}; + utils_default.forEachEntry(formData, (name, value) => { + buildPath(parsePropPath(name), value, obj, 0); + }); + return normalizeArrays(obj); + } + return null; +} +//#endregion +//#region node_modules/axios/lib/core/methodList.js +var methodList = Object.freeze([ + "get", + "delete", + "head", + "options", + "post", + "put", + "patch", + "purge", + "link", + "unlink", + "query" +]); +//#endregion +//#region node_modules/axios/lib/defaults/index.js +var own = (obj, key) => obj != null && utils_default.hasOwnProp(obj, key) ? obj[key] : void 0; +/** +* It takes a string, tries to parse it, and if it fails, it returns the stringified version +* of the input +* +* @param {any} rawValue - The value to be stringified. +* @param {Function} parser - A function that parses a string into a JavaScript object. +* @param {Function} encoder - A function that takes a value and returns a string. +* +* @returns {string} A stringified version of the rawValue. +*/ +function stringifySafely(rawValue, parser, encoder) { + if (utils_default.isString(rawValue)) try { + (parser || JSON.parse)(rawValue); + return utils_default.trim(rawValue); + } catch (e) { + if (e.name !== "SyntaxError") throw e; + } + return (encoder || JSON.stringify)(rawValue); +} +var defaults = { + transitional: transitional_default, + adapter: [ + "xhr", + "http", + "fetch" + ], + transformRequest: [function transformRequest(data, headers) { + const contentType = headers.getContentType() || ""; + const hasJSONContentType = contentType.indexOf("application/json") > -1; + const isObjectPayload = utils_default.isObject(data); + if (isObjectPayload && utils_default.isHTMLForm(data)) data = new FormData(data); + if (utils_default.isFormData(data)) return hasJSONContentType ? JSON.stringify(formDataToJSON(data)) : data; + if (utils_default.isArrayBuffer(data) || utils_default.isBuffer(data) || utils_default.isStream(data) || utils_default.isFile(data) || utils_default.isBlob(data) || utils_default.isReadableStream(data)) return data; + if (utils_default.isArrayBufferView(data)) return data.buffer; + if (utils_default.isURLSearchParams(data)) { + headers.setContentType("application/x-www-form-urlencoded;charset=utf-8", false); + return data.toString(); + } + let isFileList; + if (isObjectPayload) { + const formSerializer = own(this, "formSerializer"); + if (contentType.indexOf("application/x-www-form-urlencoded") > -1) return toURLEncodedForm(data, formSerializer).toString(); + if ((isFileList = utils_default.isFileList(data)) || contentType.indexOf("multipart/form-data") > -1) { + const env = own(this, "env"); + const _FormData = env && env.FormData; + return toFormData$1(isFileList ? { "files[]": data } : data, _FormData && new _FormData(), formSerializer); + } + } + if (isObjectPayload || hasJSONContentType) { + headers.setContentType("application/json", false); + return stringifySafely(data); + } + return data; + }], + transformResponse: [function transformResponse(data) { + const transitional = own(this, "transitional") || defaults.transitional; + const forcedJSONParsing = transitional && transitional.forcedJSONParsing; + const responseType = own(this, "responseType"); + const JSONRequested = responseType === "json"; + if (utils_default.isResponse(data) || utils_default.isReadableStream(data)) return data; + if (data && utils_default.isString(data) && (forcedJSONParsing && !responseType || JSONRequested)) { + const strictJSONParsing = !(transitional && transitional.silentJSONParsing) && JSONRequested; + try { + return JSON.parse(data, own(this, "parseReviver")); + } catch (e) { + if (strictJSONParsing) { + if (e.name === "SyntaxError") throw AxiosError$1.from(e, AxiosError$1.ERR_BAD_RESPONSE, this, null, own(this, "response")); + throw e; + } + } + } + return data; + }], + /** + * A timeout in milliseconds to abort a request. If set to 0 (default) a + * timeout is not created. + */ + timeout: 0, + xsrfCookieName: "XSRF-TOKEN", + xsrfHeaderName: "X-XSRF-TOKEN", + maxContentLength: -1, + maxBodyLength: -1, + env: { + FormData: platform_default.classes.FormData, + Blob: platform_default.classes.Blob + }, + validateStatus: function validateStatus(status) { + return status >= 200 && status < 300; + }, + headers: { common: { + Accept: "application/json, text/plain, */*", + "Content-Type": void 0 + } } +}; +utils_default.forEach(methodList, (method) => { + defaults.headers[method] = {}; +}); +//#endregion +//#region node_modules/axios/lib/core/transformData.js +/** +* Transform the data for a request or a response +* +* @param {Array|Function} fns A single function or Array of functions +* @param {?Object} response The response object +* +* @returns {*} The resulting transformed data +*/ +function transformData(fns, response) { + const config = this || defaults; + const context = response || config; + const headers = AxiosHeaders$1.from(context.headers); + let data = context.data; + utils_default.forEach(fns, function transform(fn) { + data = fn.call(config, data, headers.normalize(), response ? response.status : void 0); + }); + headers.normalize(); + return data; +} +//#endregion +//#region node_modules/axios/lib/cancel/isCancel.js +function isCancel$1(value) { + return !!(value && value.__CANCEL__); +} +//#endregion +//#region node_modules/axios/lib/cancel/CanceledError.js +var CanceledError$1 = class extends AxiosError$1 { + /** + * A `CanceledError` is an object that is thrown when an operation is canceled. + * + * @param {string=} message The message. + * @param {Object=} config The config. + * @param {Object=} request The request. + * + * @returns {CanceledError} The created error. + */ + constructor(message, config, request) { + super(message == null ? "canceled" : message, AxiosError$1.ERR_CANCELED, config, request); + this.name = "CanceledError"; + this.__CANCEL__ = true; + } +}; +//#endregion +//#region node_modules/axios/lib/core/settle.js +/** +* Resolve or reject a Promise based on response status. +* +* @param {Function} resolve A function that resolves the promise. +* @param {Function} reject A function that rejects the promise. +* @param {object} response The response. +* +* @returns {object} The response. +*/ +function settle(resolve, reject, response) { + const validateStatus = response.config.validateStatus; + if (!response.status || !validateStatus || validateStatus(response.status)) resolve(response); + else reject(new AxiosError$1("Request failed with status code " + response.status, response.status >= 400 && response.status < 500 ? AxiosError$1.ERR_BAD_REQUEST : AxiosError$1.ERR_BAD_RESPONSE, response.config, response.request, response)); +} +//#endregion +//#region node_modules/axios/lib/helpers/normalizeURLForProtocolCheck.js +var urlParserControlCharacters = /[\t\n\r]/g; +/** +* Match WHATWG URL preprocessing before checking a URL's protocol. +* +* @param {string} url +* +* @returns {string} +*/ +function normalizeURLForProtocolCheck(url) { + if (typeof url !== "string") return url; + let start = 0; + while (start < url.length && url.charCodeAt(start) <= 32) start++; + return url.slice(start).replace(urlParserControlCharacters, ""); +} +//#endregion +//#region node_modules/axios/lib/helpers/parseProtocol.js +function parseProtocol(url) { + const match = /^([-+\w]{1,25}):(?:\/\/)?/.exec(url); + return match && match[1].toLowerCase() || ""; +} +//#endregion +//#region node_modules/axios/lib/helpers/cookies.js +var decodeCookieValue = (value) => { + try { + return decodeURIComponent(value); + } catch (e) { + return value; + } +}; +var cookies_default = platform_default.hasStandardBrowserEnv ? { + write(name, value, expires, path, domain, secure, sameSite) { + if (typeof document === "undefined") return; + const cookie = [`${name}=${encodeURIComponent(value)}`]; + if (utils_default.isNumber(expires)) cookie.push(`expires=${new Date(expires).toUTCString()}`); + if (utils_default.isString(path)) cookie.push(`path=${path}`); + if (utils_default.isString(domain)) cookie.push(`domain=${domain}`); + if (secure === true) cookie.push("secure"); + if (utils_default.isString(sameSite)) cookie.push(`SameSite=${sameSite}`); + document.cookie = cookie.join("; "); + }, + read(name) { + if (typeof document === "undefined") return null; + const cookieString = document.cookie; + if (!cookieString) return null; + const cookies = cookieString.split(";"); + for (let i = 0; i < cookies.length; i++) { + const cookie = cookies[i].replace(/^\s+/, ""); + const eq = cookie.indexOf("="); + if (eq !== -1 && cookie.slice(0, eq) === name) return decodeCookieValue(cookie.slice(eq + 1)); + } + return null; + }, + async readAsync(name) { + try { + const store = typeof window !== "undefined" && window.cookieStore; + if (store && utils_default.isFunction(store.get)) { + const cookie = await store.get(name); + return cookie ? decodeCookieValue(cookie.value) : null; + } + } catch (e) {} + return this.read(name); + }, + remove(name) { + this.write(name, "", Date.now() - 864e5, "/"); + } +} : { + write() {}, + read() { + return null; + }, + async readAsync() { + return null; + }, + remove() {} +}; +//#endregion +//#region node_modules/axios/lib/helpers/speedometer.js +/** +* Calculate data maxRate +* @param {Number} [samplesCount= 10] +* @param {Number} [min= 1000] +* @returns {Function} +*/ +function speedometer(samplesCount, min) { + samplesCount = samplesCount || 10; + const bytes = new Array(samplesCount); + const timestamps = new Array(samplesCount); + let head = 0; + let tail = 0; + let firstSampleTS; + min = min !== void 0 ? min : 1e3; + return function push(chunkLength) { + const now = Date.now(); + const startedAt = timestamps[tail]; + if (!firstSampleTS) firstSampleTS = now; + bytes[head] = chunkLength; + timestamps[head] = now; + let i = tail; + let bytesCount = 0; + while (i !== head) { + bytesCount += bytes[i++]; + i = i % samplesCount; + } + head = (head + 1) % samplesCount; + if (head === tail) tail = (tail + 1) % samplesCount; + if (now - firstSampleTS < min) return; + const passed = startedAt && now - startedAt; + return passed ? Math.round(bytesCount * 1e3 / passed) : void 0; + }; +} +//#endregion +//#region node_modules/axios/lib/helpers/throttle.js +/** +* Throttle decorator +* @param {Function} fn +* @param {Number} freq +* @return {Array} +*/ +function throttle(fn, freq) { + let timestamp = 0; + let threshold = 1e3 / freq; + let lastArgs; + let timer; + const invoke = (args, now = Date.now()) => { + timestamp = now; + lastArgs = null; + if (timer) { + clearTimeout(timer); + timer = null; + } + fn(...args); + }; + const throttled = (...args) => { + const now = Date.now(); + const passed = now - timestamp; + if (passed >= threshold) invoke(args, now); + else { + lastArgs = args; + if (!timer) timer = setTimeout(() => { + timer = null; + invoke(lastArgs); + }, threshold - passed); + } + }; + const flush = () => lastArgs && invoke(lastArgs); + const flushWith = (...args) => invoke(args); + return [ + throttled, + flush, + flushWith + ]; +} +//#endregion +//#region node_modules/axios/lib/helpers/progressEventReducer.js +var progressEventReducer = (listener, isDownloadStream, freq = 3) => { + let bytesNotified = 0; + const _speedometer = speedometer(50, 250); + return throttle((e) => { + if (!e || !utils_default.isNumber(e.loaded)) return; + const rawLoaded = e.loaded; + const total = e.lengthComputable ? e.total : void 0; + const loaded = Math.max(0, total != null ? Math.min(rawLoaded, total) : rawLoaded); + const progressBytes = Math.max(0, loaded - bytesNotified); + const rate = _speedometer(progressBytes); + bytesNotified = Math.max(bytesNotified, loaded); + listener({ + loaded, + total, + progress: total ? loaded / total : void 0, + bytes: progressBytes, + rate: rate ? rate : void 0, + estimated: rate && total ? (total - loaded) / rate : void 0, + event: e, + lengthComputable: total != null, + [isDownloadStream ? "download" : "upload"]: true + }); + }, freq); +}; +var progressEventDecorator = (total, throttled) => { + const lengthComputable = total != null; + return [(loaded) => throttled[0]({ + lengthComputable, + total, + loaded + }), throttled[1]]; +}; +var asyncDecorator = (fn, scheduler = utils_default.asap) => (...args) => scheduler(() => fn(...args)); +//#endregion +//#region node_modules/axios/lib/helpers/isURLSameOrigin.js +var isURLSameOrigin_default = platform_default.hasStandardBrowserEnv ? ((origin) => (url) => { + url = new URL(url, document.baseURI || platform_default.origin); + return origin.protocol === url.protocol && origin.host === url.host && origin.port === url.port; +})(new URL(platform_default.origin)) : () => true; +//#endregion +//#region node_modules/axios/lib/helpers/isAbsoluteURL.js +/** +* Determines whether the specified URL is absolute +* +* @param {string} url The URL to test +* +* @returns {boolean} True if the specified URL is absolute, otherwise false +*/ +function isAbsoluteURL(url) { + if (typeof url !== "string") return false; + return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url); +} +//#endregion +//#region node_modules/axios/lib/helpers/combineURLs.js +/** +* Creates a new URL by combining the specified URLs +* +* @param {string} baseURL The base URL +* @param {string} relativeURL The relative URL +* +* @returns {string} The combined URL +*/ +function combineURLs(baseURL, relativeURL) { + if (!relativeURL) return baseURL; + let end = baseURL.length; + while (end > 0 && baseURL.charCodeAt(end - 1) === 47) end--; + return baseURL.slice(0, end) + "/" + relativeURL.replace(/^\/+/, ""); +} +//#endregion +//#region node_modules/axios/lib/core/buildFullPath.js +var malformedHttpProtocol = /^https?:(?!\/\/)/i; +function redactFragment(fragment) { + if (!fragment) return fragment; + return fragment.replace(/(^|&)([^=&]*=)?[^&]+/g, (match, separator, parameterName = "") => { + return `${separator}${parameterName}${REDACTED}`; + }); +} +function redactSensitiveURLParts(url) { + const redactedURL = url.replace(/^(https?:\/{0,2})[^/?#]*@/i, `$1${REDACTED}@`); + const fragmentIndex = redactedURL.indexOf("#"); + const redactedURLWithoutFragment = (fragmentIndex === -1 ? redactedURL : redactedURL.slice(0, fragmentIndex)).replace(/([?&][^=&#]*=)[^&#]*/g, `$1${REDACTED}`); + if (fragmentIndex === -1) return redactedURLWithoutFragment; + return `${redactedURLWithoutFragment}#${redactFragment(redactedURL.slice(fragmentIndex + 1))}`; +} +function assertValidHttpProtocolURL(url, config) { + if (typeof url === "string") { + const normalizedURL = normalizeURLForProtocolCheck(url); + if (malformedHttpProtocol.test(normalizedURL)) throw new AxiosError$1(`Invalid URL ${JSON.stringify(redactSensitiveURLParts(normalizedURL))}: missing "//" after protocol`, AxiosError$1.ERR_INVALID_URL, config); + } +} +/** +* Creates a new URL by combining the baseURL with the requestedURL, +* only when the requestedURL is not already an absolute URL. +* If the requestURL is absolute, this function returns the requestedURL untouched. +* +* @param {string} baseURL The base URL +* @param {string} requestedURL Absolute or relative URL to combine +* +* @returns {string} The combined full path +*/ +function buildFullPath(baseURL, requestedURL, allowAbsoluteUrls, config) { + assertValidHttpProtocolURL(requestedURL, config); + let isRelativeUrl = !isAbsoluteURL(requestedURL); + if (baseURL && (isRelativeUrl || allowAbsoluteUrls === false)) { + assertValidHttpProtocolURL(baseURL, config); + return combineURLs(baseURL, requestedURL); + } + return requestedURL; +} +//#endregion +//#region node_modules/axios/lib/core/assertParamsAcyclic.js +function assertParamsAcyclic(params) { + const pending = [{ value: params }]; + const active = /* @__PURE__ */ new WeakSet(); + const visited = /* @__PURE__ */ new WeakSet(); + while (pending.length) { + const { value, done } = pending.pop(); + if (!utils_default.isPlainObject(value) && !utils_default.isArray(value)) continue; + if (done) { + active.delete(value); + continue; + } + if (active.has(value)) throw new AxiosError$1("Circular reference detected in params", AxiosError$1.ERR_BAD_OPTION_VALUE); + if (visited.has(value)) continue; + visited.add(value); + active.add(value); + pending.push({ + value, + done: true + }); + const keys = Object.keys(value); + if (Object.getOwnPropertySymbols && Object.getOwnPropertyDescriptor) Object.getOwnPropertySymbols(value).forEach((key) => { + const descriptor = Object.getOwnPropertyDescriptor(value, key); + if (descriptor && descriptor.enumerable) keys.push(key); + }); + keys.forEach((key) => { + if (key === "__proto__" || key === "constructor" || key === "prototype") { + const descriptor = Object.getOwnPropertyDescriptor(value, key); + if (descriptor && utils_default.hasOwnProp(descriptor, "value")) pending.push({ value: descriptor.value }); + } else pending.push({ value: value[key] }); + }); + } +} +//#endregion +//#region node_modules/axios/lib/core/mergeConfig.js +var headersToObject = (thing) => thing instanceof AxiosHeaders$1 ? { ...thing } : thing; +var ownEnumerableKeys = (thing) => { + if (Object.getOwnPropertySymbols && Object.getOwnPropertyDescriptor) return Object.keys(thing).concat(Object.getOwnPropertySymbols(thing).filter((symbol) => { + const descriptor = Object.getOwnPropertyDescriptor(thing, symbol); + return descriptor && descriptor.enumerable; + })); + return Object.keys(thing); +}; +function mergeParams(a, b) { + const pending = []; + const copies = /* @__PURE__ */ new WeakMap(); + const empty = {}; + function copy(target, source) { + if (!utils_default.isPlainObject(source)) return utils_default.isArray(source) ? source.slice() : source; + const base = utils_default.isPlainObject(target) ? target : empty; + let bases = copies.get(source); + if (!bases) { + bases = /* @__PURE__ */ new WeakMap(); + copies.set(source, bases); + } + if (bases.has(base)) return bases.get(base); + const result = {}; + bases.set(base, result); + pending.push({ + base, + source, + result + }); + return result; + } + const result = utils_default.isUndefined(b) ? copy(void 0, a) : copy(a, b); + while (pending.length) { + const { base, source, result: target } = pending.pop(); + const baseKeys = new Set(ownEnumerableKeys(base)); + const sourceKeys = new Set(ownEnumerableKeys(source)); + (/* @__PURE__ */ new Set([...baseKeys, ...sourceKeys])).forEach((key) => { + if (key === "__proto__" || key === "constructor" || key === "prototype") return; + const hasSource = sourceKeys.has(key); + const value = hasSource ? source[key] : void 0; + const previous = (!hasSource || utils_default.isPlainObject(value)) && baseKeys.has(key) ? base[key] : void 0; + target[key] = hasSource ? copy(previous, value) : copy(void 0, previous); + }); + } + assertParamsAcyclic(result); + return result; +} +function getMergedValue(target, source, prop, caseless) { + if (utils_default.isPlainObject(target) && utils_default.isPlainObject(source)) return utils_default.merge.call({ caseless }, target, source); + else if (utils_default.isPlainObject(source)) return utils_default.merge({}, source); + else if (utils_default.isArray(source)) return source.slice(); + return source; +} +function mergeDeepProperties(a, b, prop, caseless) { + if (!utils_default.isUndefined(b)) return getMergedValue(a, b, prop, caseless); + else if (!utils_default.isUndefined(a)) return getMergedValue(void 0, a, prop, caseless); +} +function valueFromConfig2(a, b) { + if (!utils_default.isUndefined(b)) return getMergedValue(void 0, b); +} +function defaultToConfig2(a, b) { + if (!utils_default.isUndefined(b)) return getMergedValue(void 0, b); + else if (!utils_default.isUndefined(a)) return getMergedValue(void 0, a); +} +function getMergedTransitionalOption(config1, config2, prop) { + const transitional2 = utils_default.hasOwnProp(config2, "transitional") ? config2.transitional : void 0; + if (!utils_default.isUndefined(transitional2)) { + if (utils_default.isPlainObject(transitional2)) { + if (utils_default.hasOwnProp(transitional2, prop)) return transitional2[prop]; + } else return; + } + const transitional1 = utils_default.hasOwnProp(config1, "transitional") ? config1.transitional : void 0; + if (utils_default.isPlainObject(transitional1) && utils_default.hasOwnProp(transitional1, prop)) return transitional1[prop]; +} +function mergeDirectKeys(a, b, prop, config1, config2) { + if (utils_default.hasOwnProp(config2, prop)) return getMergedValue(a, b); + else if (utils_default.hasOwnProp(config1, prop)) return getMergedValue(void 0, a); +} +function mergeHeaders(a, b, prop) { + return mergeDeepProperties(headersToObject(a), headersToObject(b), prop, true); +} +var hasOwnPropertyDescriptor = Object.freeze({ + __proto__: null, + value: Object.prototype.hasOwnProperty, + enumerable: false, + writable: true, + configurable: true +}); +var mergeMap = { + url: valueFromConfig2, + method: valueFromConfig2, + data: valueFromConfig2, + baseURL: defaultToConfig2, + transformRequest: defaultToConfig2, + transformResponse: defaultToConfig2, + params: mergeParams, + paramsSerializer: defaultToConfig2, + timeout: defaultToConfig2, + timeoutErrorMessage: defaultToConfig2, + withCredentials: defaultToConfig2, + withXSRFToken: defaultToConfig2, + adapter: defaultToConfig2, + responseType: defaultToConfig2, + xsrfCookieName: defaultToConfig2, + xsrfHeaderName: defaultToConfig2, + onUploadProgress: defaultToConfig2, + onDownloadProgress: defaultToConfig2, + decompress: defaultToConfig2, + maxContentLength: defaultToConfig2, + maxBodyLength: defaultToConfig2, + beforeRedirect: defaultToConfig2, + transport: defaultToConfig2, + httpAgent: defaultToConfig2, + httpsAgent: defaultToConfig2, + cancelToken: defaultToConfig2, + socketPath: defaultToConfig2, + allowedSocketPaths: defaultToConfig2, + responseEncoding: defaultToConfig2, + validateStatus: mergeDirectKeys, + headers: mergeHeaders +}; +/** +* Config-specific merge-function which creates a new config-object +* by merging two configuration objects together. +* +* @param {Object} config1 +* @param {Object} config2 +* +* @returns {Object} New object resulting from merging config2 to config1 +*/ +function mergeConfig$1(config1, config2) { + config1 = config1 || {}; + config2 = config2 || {}; + const config = Object.create(null); + Object.defineProperty(config, "hasOwnProperty", hasOwnPropertyDescriptor); + const keys = ownEnumerableKeys({ + ...config1, + ...config2 + }); + for (let i = 0, len = keys.length; i < len; i++) { + const prop = keys[i]; + if (prop === "__proto__" || prop === "constructor" || prop === "prototype") continue; + const merge = utils_default.hasOwnProp(mergeMap, prop) ? mergeMap[prop] : mergeDeepProperties; + const a = utils_default.hasOwnProp(config1, prop) ? config1[prop] : void 0; + const b = utils_default.hasOwnProp(config2, prop) ? config2[prop] : void 0; + const configValue = merge === mergeDirectKeys ? merge(a, b, prop, config1, config2) : merge(a, b, prop); + utils_default.isUndefined(configValue) && merge !== mergeDirectKeys || (config[prop] = configValue); + } + if (utils_default.hasOwnProp(config2, "validateStatus") && utils_default.isUndefined(config2.validateStatus) && getMergedTransitionalOption(config1, config2, "validateStatusUndefinedResolves") === false) { + if (utils_default.hasOwnProp(config1, "validateStatus")) config.validateStatus = getMergedValue(void 0, config1.validateStatus); + else delete config.validateStatus; + } + return config; +} +//#endregion +//#region node_modules/axios/lib/core/setFormDataHeaders.js +var FORM_DATA_CONTENT_HEADERS = ["content-type", "content-length"]; +/** +* Apply the headers generated by a FormData implementation to the request headers, +* honoring the `formDataHeaderPolicy` option: with 'content-only', copy only the +* content-* headers; otherwise merge all of them. +* +* @param {AxiosHeaders} headers - the request headers to mutate +* @param {Object | null | undefined} formHeaders - headers produced by the FormData implementation +* @param {String} [policy] - the resolved `formDataHeaderPolicy` config value +* +* @returns {void} +*/ +function setFormDataHeaders(headers, formHeaders, policy) { + if (policy !== "content-only") { + headers.set(formHeaders); + return; + } + Object.entries(formHeaders || {}).forEach(([key, val]) => { + if (FORM_DATA_CONTENT_HEADERS.includes(key.toLowerCase())) headers.set(key, val); + }); +} +//#endregion +//#region node_modules/axios/lib/helpers/resolveConfig.js +/** +* Encode a UTF-8 string to a Latin-1 byte string for use with btoa(). +* This is a modern replacement for the deprecated unescape(encodeURIComponent(str)) pattern. +* +* @param {string} str The string to encode +* +* @returns {string} UTF-8 bytes as a Latin-1 string +*/ +var encodeUTF8$1 = (str) => encodeURIComponent(str).replace(/%([0-9A-F]{2})/gi, (_, hex) => String.fromCharCode(parseInt(hex, 16))); +var readCookie = (name) => cookies_default.read(name); +function resolveConfig(config, readXsrfCookie = readCookie) { + const newConfig = mergeConfig$1({}, config); + const own = (key) => utils_default.hasOwnProp(newConfig, key) ? newConfig[key] : void 0; + const data = own("data"); + let withXSRFToken = own("withXSRFToken"); + const xsrfHeaderName = own("xsrfHeaderName"); + const xsrfCookieName = own("xsrfCookieName"); + let headers = own("headers"); + const auth = own("auth"); + const baseURL = own("baseURL"); + const allowAbsoluteUrls = own("allowAbsoluteUrls"); + const url = own("url"); + newConfig.headers = headers = AxiosHeaders$1.from(headers); + newConfig.url = buildURL(buildFullPath(baseURL, url, allowAbsoluteUrls, newConfig), own("params"), own("paramsSerializer")); + if (auth) { + const username = utils_default.getSafeProp(auth, "username") || ""; + const password = utils_default.getSafeProp(auth, "password") || ""; + const transitional = own("transitional"); + const encodeUsername = transitional && utils_default.hasOwnProp(transitional, "encodeBasicAuthUsername") && transitional.encodeBasicAuthUsername === true; + try { + headers.set("Authorization", "Basic " + btoa((encodeUsername ? encodeUTF8$1(username) : username) + ":" + (password ? encodeUTF8$1(password) : ""))); + } catch (e) { + throw AxiosError$1.from(e, AxiosError$1.ERR_BAD_OPTION_VALUE, config); + } + } + if (utils_default.isFormData(data)) { + const getHeaders = utils_default.getSafeProp(data, "getHeaders"); + if (platform_default.hasStandardBrowserEnv || platform_default.hasStandardBrowserWebWorkerEnv || utils_default.isReactNative(data)) headers.setContentType(void 0); + else if (utils_default.isFunction(getHeaders)) setFormDataHeaders(headers, getHeaders.call(data), own("formDataHeaderPolicy")); + } + if (platform_default.hasStandardBrowserEnv) { + if (utils_default.isFunction(withXSRFToken)) withXSRFToken = withXSRFToken(newConfig); + if (withXSRFToken === true || withXSRFToken == null && isURLSameOrigin_default(newConfig.url)) { + const xsrfValue = xsrfHeaderName && xsrfCookieName && readXsrfCookie(xsrfCookieName); + if (xsrfValue) headers.set(xsrfHeaderName, xsrfValue); + } + } + return newConfig; +} +var xhr_default = typeof XMLHttpRequest !== "undefined" && function(config) { + return new Promise(function dispatchXhrRequest(resolve, reject) { + let useAsyncXsrf; + try { + const store = platform_default.hasStandardBrowserEnv && typeof window !== "undefined" && window.cookieStore; + useAsyncXsrf = store && utils_default.isFunction(store.get); + } catch (e) {} + let xsrfCookieName; + const _config = resolveConfig(config, useAsyncXsrf ? (name) => { + xsrfCookieName = name; + return null; + } : void 0); + let requestData = _config.data; + const requestHeaders = AxiosHeaders$1.from(_config.headers).normalize(); + let { responseType, onUploadProgress, onDownloadProgress } = _config; + let onCanceled; + let timeoutId; + let uploadThrottled, downloadThrottled; + let flushUpload, flushDownload, flushDownloadWithEvent; + function done() { + clearTimeout(timeoutId); + try { + flushUpload && flushUpload(); + } catch (err) { + setTimeout(() => { + throw err; + }); + } + try { + flushDownload && flushDownload(); + } catch (err) { + setTimeout(() => { + throw err; + }); + } + if (request) { + downloadThrottled && request.removeEventListener("progress", downloadThrottled); + if (request.upload) { + uploadThrottled && request.upload.removeEventListener("progress", uploadThrottled); + flushUpload && request.upload.removeEventListener("loadend", flushUpload); + } + } + _config.cancelToken && _config.cancelToken.unsubscribe(onCanceled); + _config.signal && _config.signal.removeEventListener("abort", onCanceled); + } + let request = new XMLHttpRequest(); + request.open(_config.method.toUpperCase(), _config.url, true); + request.timeout = _config.timeout; + function onloadend(event) { + if (!request) return; + if (request.status === 0 && (parseProtocol(normalizeURLForProtocolCheck(_config.url)) || parseProtocol(platform_default.origin)) !== "file" && !(request.responseURL && request.responseURL.startsWith("file:"))) { + reject(new AxiosError$1("Request aborted", AxiosError$1.ECONNABORTED, config, request)); + done(); + request = null; + return; + } + try { + if (event) flushDownloadWithEvent && flushDownloadWithEvent(event); + else flushDownload && flushDownload(); + } catch (err) { + setTimeout(() => { + throw err; + }); + } + if (!request) return; + const responseHeaders = AxiosHeaders$1.from("getAllResponseHeaders" in request && request.getAllResponseHeaders()); + settle(function _resolve(value) { + resolve(value); + done(); + }, function _reject(err) { + reject(err); + done(); + }, { + data: !responseType || responseType === "text" || responseType === "json" ? request.responseText : request.response, + status: request.status, + statusText: request.statusText, + headers: responseHeaders, + config, + request + }); + request = null; + } + if ("onloadend" in request) request.onloadend = onloadend; + else request.onreadystatechange = function handleLoad() { + if (!request || request.readyState !== 4) return; + if (request.status === 0 && !(request.responseURL && request.responseURL.startsWith("file:"))) return; + setTimeout(onloadend); + }; + request.onabort = function handleAbort() { + if (!request) return; + reject(new AxiosError$1("Request aborted", AxiosError$1.ECONNABORTED, config, request)); + done(); + request = null; + }; + request.onerror = function handleError(event) { + const err = new AxiosError$1(event && event.message ? event.message : "Network Error", AxiosError$1.ERR_NETWORK, config, request); + err.event = event || null; + reject(err); + done(); + request = null; + }; + request.ontimeout = function handleTimeout() { + if (!request) return; + let timeoutErrorMessage = _config.timeout ? "timeout of " + _config.timeout + "ms exceeded" : "timeout exceeded"; + const transitional = _config.transitional || transitional_default; + if (_config.timeoutErrorMessage) timeoutErrorMessage = _config.timeoutErrorMessage; + reject(new AxiosError$1(timeoutErrorMessage, transitional.clarifyTimeoutError ? AxiosError$1.ETIMEDOUT : AxiosError$1.ECONNABORTED, config, request)); + done(); + request = null; + }; + requestData === void 0 && requestHeaders.setContentType(null); + if (!utils_default.isUndefined(_config.withCredentials)) request.withCredentials = !!_config.withCredentials; + if (responseType && responseType !== "json") request.responseType = _config.responseType; + if (onDownloadProgress) { + [downloadThrottled, flushDownload, flushDownloadWithEvent] = progressEventReducer(onDownloadProgress, true); + request.addEventListener("progress", downloadThrottled); + } + if (onUploadProgress && request.upload) { + [uploadThrottled, flushUpload] = progressEventReducer(onUploadProgress); + request.upload.addEventListener("progress", uploadThrottled); + request.upload.addEventListener("loadend", flushUpload); + } + if (_config.cancelToken || _config.signal) { + onCanceled = (cancel) => { + if (!request) return; + reject(!cancel || cancel.type ? new CanceledError$1(null, config, request) : cancel); + const xhr = request; + done(); + request = null; + xhr.abort(); + }; + _config.cancelToken && _config.cancelToken.subscribe(onCanceled); + if (!request) return; + if (_config.signal) _config.signal.aborted ? onCanceled() : _config.signal.addEventListener("abort", onCanceled); + } + if (!request) return; + const protocol = parseProtocol(_config.url); + if (protocol && !platform_default.protocols.includes(protocol)) { + reject(new AxiosError$1("Unsupported protocol " + protocol + ":", AxiosError$1.ERR_BAD_REQUEST, config)); + done(); + return; + } + const sendRequest = () => { + if (!request) return; + if ("setRequestHeader" in request) utils_default.forEach(toByteStringHeaderObject(requestHeaders), function setRequestHeader(val, key) { + request.setRequestHeader(key, val); + }); + request.send(requestData || null); + }; + if (xsrfCookieName) { + const now = typeof performance !== "undefined" && utils_default.isFunction(performance.now) ? () => performance.now() : Date.now; + const deadline = request.timeout > 0 ? now() + Number(request.timeout) : void 0; + const abortOnTimeout = () => { + if (!request) return; + const xhr = request; + xhr.ontimeout(); + xhr.abort(); + }; + if (deadline !== void 0) { + const scheduleTimeout = () => { + const remaining = deadline - now(); + if (remaining > 0) timeoutId = setTimeout(scheduleTimeout, Math.min(remaining, 2147483647)); + else abortOnTimeout(); + }; + scheduleTimeout(); + } + cookies_default.readAsync(xsrfCookieName).then((value) => { + if (!request) return; + if (deadline !== void 0 && now() >= deadline) { + abortOnTimeout(); + return; + } + if (value) { + const headerName = utils_default.hasOwnProp(_config, "xsrfHeaderName") && _config.xsrfHeaderName; + requestHeaders.set(headerName, value); + } + sendRequest(); + }).catch((error) => { + if (!request) return; + reject(AxiosError$1.from(error, null, config, request)); + done(); + request = null; + }); + } else sendRequest(); + }); +}; +//#endregion +//#region node_modules/axios/lib/helpers/composeSignals.js +var composeSignals = (signals, timeout) => { + signals = signals ? signals.filter(Boolean) : []; + if (!timeout && !signals.length) return; + const controller = new AbortController(); + let aborted = false; + const onabort = function(reason) { + if (!aborted) { + aborted = true; + unsubscribe(); + const err = reason instanceof Error ? reason : this.reason; + controller.abort(err instanceof AxiosError$1 ? err : new CanceledError$1(err instanceof Error ? err.message : err)); + } + }; + let timer = timeout && setTimeout(() => { + timer = null; + onabort(new AxiosError$1(`timeout of ${timeout}ms exceeded`, AxiosError$1.ETIMEDOUT)); + }, timeout); + const unsubscribe = () => { + if (!signals) return; + timer && clearTimeout(timer); + timer = null; + signals.forEach((signal) => { + const unsubscribeSignal = utils_default.getSafeProp(signal, "unsubscribe"); + utils_default.isFunction(unsubscribeSignal) ? unsubscribeSignal.call(signal, onabort) : signal.removeEventListener("abort", onabort); + }); + signals = null; + }; + signals.forEach((signal) => { + if (aborted) return; + if (signal.aborted) { + onabort.call(signal); + return; + } + signal.addEventListener("abort", onabort, { once: true }); + }); + const { signal } = controller; + signal.unsubscribe = () => utils_default.asap(unsubscribe); + return signal; +}; +//#endregion +//#region node_modules/axios/lib/helpers/trackStream.js +var streamChunk = function* (chunk, chunkSize) { + let len = chunk.byteLength; + if (!chunkSize || len < chunkSize) { + yield chunk; + return; + } + let pos = 0; + let end; + while (pos < len) { + end = pos + chunkSize; + yield chunk.slice(pos, end); + pos = end; + } +}; +var readBytes = async function* (iterable, chunkSize) { + for await (const chunk of readStream(iterable)) yield* streamChunk(chunk, chunkSize); +}; +var readStream = async function* (stream) { + if (stream[Symbol.asyncIterator]) { + yield* stream; + return; + } + const reader = stream.getReader(); + try { + for (;;) { + const { done, value } = await reader.read(); + if (done) break; + yield value; + } + } finally { + await reader.cancel(); + } +}; +var trackStream = (stream, chunkSize, onProgress, onFinish) => { + const iterator = readBytes(stream, chunkSize); + let bytes = 0; + let done; + let _onFinish = (e) => { + if (!done) { + done = true; + onFinish && onFinish(e); + } + }; + return new ReadableStream({ + async pull(controller) { + try { + const { done, value } = await iterator.next(); + if (done) { + _onFinish(); + controller.close(); + return; + } + let len = value.byteLength; + if (onProgress) onProgress(bytes += len); + controller.enqueue(new Uint8Array(value)); + } catch (err) { + _onFinish(err); + throw err; + } + }, + cancel(reason) { + _onFinish(reason); + return iterator.return(); + } + }, { highWaterMark: 2 }); +}; +//#endregion +//#region node_modules/axios/lib/helpers/formDataToBlob.js +var CRLF = "\r\n"; +var normalizeLines = (value) => String(value).replace(/\r\n|\r|\n/g, CRLF); +var escapeName = (value) => String(value).replace(/[\r\n"]/g, (char) => char === "\r" ? "%0D" : char === "\n" ? "%0A" : "%22"); +var stringBytes = (value, normalize) => { + let length = 0; + for (let i = 0; i < value.length; i++) { + const code = value.charCodeAt(i); + if (normalize && (code === 13 || code === 10)) { + if (code === 13 && value.charCodeAt(i + 1) === 10) i++; + length += 2; + } else if (code < 128) length++; + else if (code < 2048) length += 2; + else if (code >= 55296 && code <= 56319 && value.charCodeAt(i + 1) >= 56320 && value.charCodeAt(i + 1) <= 57343) { + length += 4; + i++; + } else length += 3; + } + return length; +}; +var FormDataError = class extends TypeError { + constructor(message, reason) { + super(message); + this.name = "FormDataError"; + this.reason = reason; + } +}; +function formDataToBlob(form, Blob, limit, limitError, boundary) { + if (!utils_default.isFunction(Blob)) throw new FormDataError("Blob is not supported", "blob"); + if (!utils_default.isString(boundary) || !/^[A-Za-z0-9'()+_,./:=? -]{1,70}$/.test(boundary) || / $/.test(boundary)) throw new FormDataError("Invalid multipart boundary", "boundary"); + const footer = "--" + boundary + "--\r\n"; + let length = footer.length; + const parts = []; + const checkLength = (extra) => { + if (length + extra > limit) throw limitError(); + }; + checkLength(0); + for (const [name, value] of form) { + const isString = utils_default.isString(value); + const valueLength = isString ? stringBytes(value, true) : value.size; + if (!Number.isFinite(valueLength) || valueLength < 0) throw new FormDataError("Unsupported FormData part size", "part"); + checkLength(valueLength + stringBytes(name, true) + (!isString && value.name ? stringBytes(value.name, false) : 0) + (!isString && value.type ? stringBytes(value.type, false) : 0)); + let header = "--" + boundary + "\r\nContent-Disposition: form-data; name=\"" + escapeName(normalizeLines(name)) + "\""; + if (!isString) header += "; filename=\"" + escapeName(utils_default.isString(value.name) ? value.name : "blob") + "\"\r\nContent-Type: " + String(value.type || "application/octet-stream").replace(/[\r\n]/g, ""); + header += "\r\n\r\n"; + const partLength = stringBytes(header, false) + valueLength + 2; + checkLength(partLength); + length += partLength; + parts.push({ + header, + value, + isString + }); + } + const blobParts = []; + for (const part of parts) blobParts.push(part.header, part.isString ? normalizeLines(part.value) : part.value, CRLF); + blobParts.push(footer); + return new Blob(blobParts, { type: "multipart/form-data; boundary=" + boundary }); +} +//#endregion +//#region node_modules/axios/lib/core/createMultipartBody.js +function createMultipartBody(form, Blob, limit, limitError, boundary) { + if (!utils_default.isFunction(Blob)) throw new AxiosError$1("Blob is not supported", AxiosError$1.ERR_NOT_SUPPORT); + if (boundary === void 0) { + if (utils_default.isFunction(platform_default.generateString)) boundary = "axios-" + platform_default.generateString(36, "0123456789abcdef"); + else { + const crypto = utils_default.global.crypto; + if (!crypto || !utils_default.isFunction(crypto.getRandomValues)) throw new AxiosError$1("Random byte generation is not supported", AxiosError$1.ERR_NOT_SUPPORT); + const random = /* @__PURE__ */ new Uint8Array(18); + crypto.getRandomValues(random); + boundary = "axios-" + Array.from(random, (value) => ("0" + value.toString(16)).slice(-2)).join(""); + } + } + try { + return formDataToBlob(form, Blob, limit, limitError, boundary); + } catch (error) { + if (error instanceof FormDataError) { + const code = error.reason === "boundary" ? AxiosError$1.ERR_BAD_OPTION_VALUE : AxiosError$1.ERR_BAD_REQUEST; + throw new AxiosError$1(error.message, code); + } + throw error; + } +} +//#endregion +//#region node_modules/axios/lib/helpers/estimateDataURLDecodedBytes.js +/** +* Estimate data: URL byte lengths *without* allocating large buffers. +* - Fetch percent-decodes a base64 body before decoding it. +* - Node's Buffer.from(body, 'base64') sizes its backing allocation from the +* percent-decoded body, including ignored characters and content after padding. +* - Non-base64 data is percent-decoded and then encoded as UTF-8. +*/ +var isHexDigit = (charCode) => charCode >= 48 && charCode <= 57 || charCode >= 65 && charCode <= 70 || charCode >= 97 && charCode <= 102; +var isPercentEncodedByte = (str, i, len) => i + 2 < len && isHexDigit(str.charCodeAt(i + 1)) && isHexDigit(str.charCodeAt(i + 2)); +var hexValue = (charCode) => charCode <= 57 ? charCode - 48 : (charCode & 223) - 55; +var isBase64Char = (charCode) => charCode >= 65 && charCode <= 90 || charCode >= 97 && charCode <= 122 || charCode >= 48 && charCode <= 57 || charCode === 43 || charCode === 47 || charCode === 45 || charCode === 95; +var isBase64Whitespace = (charCode) => charCode === 9 || charCode === 10 || charCode === 12 || charCode === 13 || charCode === 32; +var base64Bytes = (significant) => { + const groups = Math.floor(significant / 4); + const remainder = significant % 4; + return groups * 3 + (remainder === 2 ? 1 : remainder === 3 ? 2 : 0); +}; +var estimateBase64BufferAllocation = (body) => { + const len = body.length; + let padding = 0; + if (len > 0 && body.charCodeAt(len - 1) === 61) { + padding++; + if (len > 1 && body.charCodeAt(len - 2) === 61) padding++; + } + return Math.floor((len - padding) * 3 / 4); +}; +var estimatePercentDecodedBase64Bytes = (body) => { + const len = body.length; + let significant = 0; + let padding = 0; + let invalid = false; + for (let i = 0; i < len; i++) { + let code = body.charCodeAt(i); + if (code === 37 && isPercentEncodedByte(body, i, len)) { + code = hexValue(body.charCodeAt(i + 1)) * 16 + hexValue(body.charCodeAt(i + 2)); + i += 2; + } + if (isBase64Whitespace(code)) continue; + if (code === 61) { + padding++; + continue; + } + if (!isBase64Char(code) || padding > 0) { + invalid = true; + continue; + } + significant++; + } + if (invalid || padding > 2 || padding > 0 && (significant + padding) % 4 !== 0 || significant % 4 === 1) return estimateBase64BufferAllocation(body); + return base64Bytes(significant); +}; +var estimateDataURLBytes = (url, estimateBase64, base64Pattern) => { + if (!url || typeof url !== "string") return 0; + if (!/^data:/i.test(url)) return 0; + const comma = url.indexOf(","); + if (comma < 0) return 0; + const meta = url.slice(5, comma); + const body = url.slice(comma + 1); + if (base64Pattern.test(meta)) return estimateBase64(body); + let bytes = 0; + for (let i = 0, len = body.length; i < len; i++) { + const c = body.charCodeAt(i); + if (c === 37 && isPercentEncodedByte(body, i, len)) { + bytes += 1; + i += 2; + } else if (c < 128) bytes += 1; + else if (c < 2048) bytes += 2; + else if (c >= 55296 && c <= 56319 && i + 1 < len) { + const next = body.charCodeAt(i + 1); + if (next >= 56320 && next <= 57343) { + bytes += 4; + i++; + } else bytes += 3; + } else bytes += 3; + } + return bytes; +}; +/** +* Estimate the percent-decoded payload size used by Fetch data: URLs. +* +* @param {string} url +* @returns {number} +*/ +function estimateDataURLDecodedBytes(url) { + const fragmentIndex = typeof url === "string" ? url.indexOf("#") : -1; + return estimateDataURLBytes(fragmentIndex === -1 ? url : url.slice(0, fragmentIndex), estimatePercentDecodedBase64Bytes, /; *base64[\t\n\f\r ]*$/i); +} +//#endregion +//#region node_modules/axios/lib/env/data.js +var VERSION$1 = "1.21.1"; +//#endregion +//#region node_modules/axios/lib/adapters/fetch.js +var DEFAULT_CHUNK_SIZE = 65536; +var DEFAULT_REQUEST_OPTIONS = { + cache: "default", + redirect: "follow", + referrer: "about:client", + referrerPolicy: "", + mode: "cors", + integrity: "", + keepalive: false, + priority: "auto", + window: null +}; +var { isFunction } = utils_default; +/** +* Encode a UTF-8 string to a Latin-1 byte string for use with btoa(). +* This is a modern replacement for the deprecated unescape(encodeURIComponent(str)) pattern. +* +* @param {string} str The string to encode +* +* @returns {string} UTF-8 bytes as a Latin-1 string +*/ +var encodeUTF8 = (str) => encodeURIComponent(str).replace(/%([0-9A-F]{2})/gi, (_, hex) => String.fromCharCode(parseInt(hex, 16))); +var decodeURIComponentSafe = (value) => { + if (!utils_default.isString(value)) return value; + try { + return decodeURIComponent(value); + } catch (error) { + return value; + } +}; +var test = (fn, ...args) => { + try { + return !!fn(...args); + } catch (e) { + return false; + } +}; +var maybeWithAuthCredentials = (url) => { + const protocolIndex = url.indexOf("://"); + let urlToCheck = url; + if (protocolIndex !== -1) urlToCheck = urlToCheck.slice(protocolIndex + 3); + return urlToCheck.includes("@") || urlToCheck.includes(":"); +}; +var factory = (env) => { + const globalObject = utils_default.global !== void 0 && utils_default.global !== null ? utils_default.global : globalThis; + const { ReadableStream, TextEncoder } = globalObject; + env = utils_default.merge.call({ skipUndefined: true }, { + Request: globalObject.Request, + Response: globalObject.Response, + Blob: globalObject.Blob + }, env); + const envFetch = utils_default.hasOwnProp(env, "fetch") ? env.fetch : void 0; + const { Request, Response, Blob } = env; + const isFetchSupported = envFetch ? isFunction(envFetch) : typeof fetch === "function"; + const isRequestSupported = isFunction(Request); + const isResponseSupported = isFunction(Response); + if (!isFetchSupported) return false; + const isReadableStreamSupported = isFetchSupported && isFunction(ReadableStream); + const encodeText = isFetchSupported && (typeof TextEncoder === "function" ? ((encoder) => (str) => encoder.encode(str))(new TextEncoder()) : async (str) => new Uint8Array(await new Request(str).arrayBuffer())); + const supportsRequestStream = isRequestSupported && isReadableStreamSupported && test(() => { + let duplexAccessed = false; + const request = new Request(platform_default.origin, { + body: new ReadableStream(), + method: "POST", + get duplex() { + duplexAccessed = true; + return "half"; + } + }); + const hasContentType = request.headers.has("Content-Type"); + if (request.body != null) request.body.cancel(); + return duplexAccessed && !hasContentType; + }); + const supportsResponseStream = isResponseSupported && isReadableStreamSupported && test(() => utils_default.isReadableStream(new Response("").body)); + const requestDefaults = Object.assign(Object.create(null), DEFAULT_REQUEST_OPTIONS); + if (isRequestSupported && !test(() => new Request(platform_default.origin, requestDefaults))) { + delete requestDefaults.cache; + if (!test(() => new Request(platform_default.origin, requestDefaults))) requestDefaults.cache = DEFAULT_REQUEST_OPTIONS.cache; + } + const resolvers = { stream: supportsResponseStream && ((res) => res.body) }; + isFetchSupported && (() => { + [ + "text", + "arrayBuffer", + "blob", + "formData", + "stream" + ].forEach((type) => { + !resolvers[type] && (resolvers[type] = (res, config) => { + let method = res && res[type]; + if (method) return method.call(res); + throw new AxiosError$1(`Response type '${type}' is not supported`, AxiosError$1.ERR_NOT_SUPPORT, config); + }); + }); + })(); + const getBodyLength = async (body) => { + if (body == null) return 0; + if (utils_default.isBlob(body)) return body.size; + if (utils_default.isArrayBufferView(body) || utils_default.isArrayBuffer(body)) return body.byteLength; + if (utils_default.isURLSearchParams(body)) body = body + ""; + if (utils_default.isString(body)) return (await encodeText(body)).byteLength; + }; + const resolveBodyLength = async (headers, body) => { + const length = utils_default.toFiniteNumber(headers.getContentLength()); + return length == null ? getBodyLength(body) : length; + }; + return async (config) => { + let { url, method, data, signal, cancelToken, timeout, onDownloadProgress, onUploadProgress, responseType, headers, withCredentials = "same-origin", fetchOptions, maxContentLength, maxBodyLength, maxRedirects } = resolveConfig(config); + const hasMaxContentLength = utils_default.isNumber(maxContentLength) && maxContentLength > -1; + const hasMaxBodyLength = utils_default.isNumber(maxBodyLength) && maxBodyLength > -1; + const own = (key) => utils_default.hasOwnProp(config, key) ? config[key] : void 0; + let _fetch = envFetch || fetch; + responseType = responseType ? (responseType + "").toLowerCase() : "text"; + let composedSignal = composeSignals([signal, cancelToken && cancelToken.toAbortSignal()], timeout); + let request = null; + const unsubscribe = composedSignal && composedSignal.unsubscribe && (() => { + composedSignal.unsubscribe(); + }); + let requestContentLength; + let pendingBodyError = null; + let pendingResponseError = null; + const maxBodyLengthError = () => new AxiosError$1("Request body larger than maxBodyLength limit", AxiosError$1.ERR_BAD_REQUEST, config, request); + try { + let auth = void 0; + const configAuth = own("auth"); + if (configAuth) auth = { + username: utils_default.getSafeProp(configAuth, "username") || "", + password: utils_default.getSafeProp(configAuth, "password") || "" + }; + let parsedURL; + if (maybeWithAuthCredentials(url)) { + parsedURL = new URL(url, platform_default.origin); + if (!auth && (parsedURL.username || parsedURL.password)) auth = { + username: decodeURIComponentSafe(parsedURL.username), + password: decodeURIComponentSafe(parsedURL.password) + }; + if (parsedURL.username || parsedURL.password) { + parsedURL.username = ""; + parsedURL.password = ""; + url = parsedURL.href; + } + } + if (auth) { + headers.delete("authorization"); + headers.set("Authorization", "Basic " + btoa(encodeUTF8((auth.username || "") + ":" + (auth.password || "")))); + } + if (hasMaxContentLength && parsedURL && parsedURL.protocol === "data:") { + if (estimateDataURLDecodedBytes(parsedURL.href) > maxContentLength) throw new AxiosError$1("maxContentLength size of " + maxContentLength + " exceeded", AxiosError$1.ERR_BAD_RESPONSE, config, request); + } + const formContentType = utils_default.isSpecCompliantForm(data) && AxiosHeaders$1.from(own("headers")).getContentType(); + let formBoundary; + if (utils_default.isString(formContentType) && /^multipart\/form-data(?:\s*;|$)/i.test(formContentType.trim())) { + const parameters = AxiosHeaders$1.parseParameters(formContentType); + if (utils_default.hasOwnProp(parameters, "boundary")) formBoundary = parameters.boundary; + } + if (utils_default.isSpecCompliantForm(data) && method !== "get" && method !== "head" && (hasMaxBodyLength || onUploadProgress && supportsRequestStream || formBoundary !== void 0)) { + data = createMultipartBody(data, Blob, hasMaxBodyLength ? maxBodyLength : Infinity, maxBodyLengthError, formBoundary); + headers.setContentType(formBoundary === void 0 ? data.type : formContentType); + requestContentLength = data.size; + } + if (hasMaxBodyLength && method !== "get" && method !== "head") { + const outboundLength = await getBodyLength(data); + if (typeof outboundLength === "number" && isFinite(outboundLength)) { + requestContentLength = outboundLength; + if (outboundLength > maxBodyLength) throw maxBodyLengthError(); + } + } + const mustEnforceStreamBody = hasMaxBodyLength && (utils_default.isReadableStream(data) || utils_default.isStream(data)); + const trackRequestStream = (stream, onProgress, flush) => trackStream(stream, DEFAULT_CHUNK_SIZE, (loadedBytes) => { + if (hasMaxBodyLength && loadedBytes > maxBodyLength) throw pendingBodyError = maxBodyLengthError(); + onProgress && onProgress(loadedBytes); + }, flush); + if (supportsRequestStream && method !== "get" && method !== "head" && (onUploadProgress || mustEnforceStreamBody)) { + requestContentLength = requestContentLength == null ? await resolveBodyLength(headers, data) : requestContentLength; + if (requestContentLength !== 0 || mustEnforceStreamBody) { + let _request = new Request(url, { + method: "POST", + body: data, + duplex: "half" + }); + let contentTypeHeader; + if (utils_default.isFormData(data) && (contentTypeHeader = _request.headers.get("content-type"))) headers.setContentType(contentTypeHeader); + if (_request.body) { + const [onProgress, flush] = onUploadProgress && progressEventDecorator(requestContentLength, progressEventReducer(asyncDecorator(onUploadProgress))) || []; + data = trackRequestStream(_request.body, onProgress, flush); + } + } + } else if (mustEnforceStreamBody && !isRequestSupported && isReadableStreamSupported && method !== "get" && method !== "head") data = trackRequestStream(data); + else if (mustEnforceStreamBody && isRequestSupported && !supportsRequestStream && method !== "get" && method !== "head") throw new AxiosError$1("Stream request bodies are not supported by the current fetch implementation", AxiosError$1.ERR_NOT_SUPPORT, config, request); + if (!utils_default.isString(withCredentials)) withCredentials = withCredentials ? "include" : "omit"; + const isCredentialsSupported = isRequestSupported && "credentials" in Request.prototype; + if (utils_default.isFormData(data)) { + const contentType = headers.getContentType(); + if (contentType && /^multipart\/form-data/i.test(contentType) && !/boundary=/i.test(contentType)) headers.delete("content-type"); + } + headers.set("User-Agent", "axios/" + VERSION$1, false); + const safeFetchOptions = fetchOptions == null ? fetchOptions : Object.assign(Object.create(null), fetchOptions); + if (safeFetchOptions) { + delete safeFetchOptions.body; + delete safeFetchOptions.headers; + delete safeFetchOptions.method; + delete safeFetchOptions.signal; + delete safeFetchOptions.duplex; + delete safeFetchOptions.credentials; + } + const resolvedOptions = Object.assign(Object.create(null), safeFetchOptions, { + signal: composedSignal, + method: method.toUpperCase(), + headers: toByteStringHeaderObject(headers.normalize()), + body: data, + duplex: "half", + credentials: isCredentialsSupported ? withCredentials : void 0 + }); + if (isRequestSupported) { + utils_default.forEach(requestDefaults, (value, key) => { + if (resolvedOptions[key] === void 0) resolvedOptions[key] = value; + }); + if (resolvedOptions.signal === void 0) resolvedOptions.signal = null; + if (resolvedOptions.body === void 0) resolvedOptions.body = null; + } + if (maxRedirects === 0) { + resolvedOptions.redirect = "manual"; + if (safeFetchOptions) safeFetchOptions.redirect = "manual"; + } + request = isRequestSupported && new Request(url, resolvedOptions); + let response = await (isRequestSupported ? _fetch(request, safeFetchOptions) : _fetch(url, resolvedOptions)); + const responseHeaders = AxiosHeaders$1.from(response.headers); + if (hasMaxContentLength) { + const declaredLength = utils_default.toFiniteNumber(responseHeaders.getContentLength()); + if (declaredLength != null && declaredLength > maxContentLength) throw new AxiosError$1("maxContentLength size of " + maxContentLength + " exceeded", AxiosError$1.ERR_BAD_RESPONSE, config, request); + } + const isStreamResponse = supportsResponseStream && (responseType === "stream" || responseType === "response"); + if (supportsResponseStream && response.body && (onDownloadProgress || hasMaxContentLength || isStreamResponse && unsubscribe)) { + const options = {}; + [ + "status", + "statusText", + "headers" + ].forEach((prop) => { + options[prop] = response[prop]; + }); + const responseContentLength = utils_default.toFiniteNumber(responseHeaders.getContentLength()); + const [onProgress, flush] = onDownloadProgress && progressEventDecorator(responseContentLength, progressEventReducer(asyncDecorator(onDownloadProgress), true)) || []; + let bytesRead = 0; + const onChunkProgress = (loadedBytes) => { + if (hasMaxContentLength) { + bytesRead = loadedBytes; + if (bytesRead > maxContentLength) throw pendingResponseError = new AxiosError$1("maxContentLength size of " + maxContentLength + " exceeded", AxiosError$1.ERR_BAD_RESPONSE, config, request); + } + onProgress && onProgress(loadedBytes); + }; + response = new Response(trackStream(response.body, DEFAULT_CHUNK_SIZE, onChunkProgress, () => { + flush && flush(); + unsubscribe && unsubscribe(); + }), options); + } + responseType = responseType || "text"; + let responseData = await resolvers[utils_default.findKey(resolvers, responseType) || "text"](response, config); + if (hasMaxContentLength && !supportsResponseStream && !isStreamResponse) { + let materializedSize; + if (responseData != null) { + if (typeof responseData.byteLength === "number") materializedSize = responseData.byteLength; + else if (typeof responseData.size === "number") materializedSize = responseData.size; + else if (typeof responseData === "string") materializedSize = typeof TextEncoder === "function" ? new TextEncoder().encode(responseData).byteLength : responseData.length; + } + if (typeof materializedSize === "number" && materializedSize > maxContentLength) throw new AxiosError$1("maxContentLength size of " + maxContentLength + " exceeded", AxiosError$1.ERR_BAD_RESPONSE, config, request); + } + !isStreamResponse && unsubscribe && unsubscribe(); + return await new Promise((resolve, reject) => { + settle(resolve, reject, { + data: responseData, + headers: AxiosHeaders$1.from(response.headers), + status: response.status, + statusText: response.statusText, + config, + request + }); + }); + } catch (err) { + unsubscribe && unsubscribe(); + if (composedSignal && composedSignal.aborted && composedSignal.reason instanceof AxiosError$1) { + const canceledError = composedSignal.reason; + canceledError.config = config; + request && (canceledError.request = request); + if (err !== canceledError) Object.defineProperty(canceledError, "cause", { + __proto__: null, + value: err, + writable: true, + enumerable: false, + configurable: true + }); + throw canceledError; + } + if (pendingBodyError) { + request && !pendingBodyError.request && (pendingBodyError.request = request); + throw pendingBodyError; + } + if (pendingResponseError) throw pendingResponseError; + if (err instanceof AxiosError$1) { + request && !err.request && (err.request = request); + throw err; + } + if (err && err.name === "TypeError" && /Load failed|fetch/i.test(err.message)) { + const networkError = new AxiosError$1("Network Error", AxiosError$1.ERR_NETWORK, config, request, err && err.response); + Object.defineProperty(networkError, "cause", { + __proto__: null, + value: err.cause || err, + writable: true, + enumerable: false, + configurable: true + }); + throw networkError; + } + throw AxiosError$1.from(err, err && err.code, config, request, err && err.response); + } + }; +}; +var seedCache = /* @__PURE__ */ new Map(); +var getFetch = (config) => { + const env = Object.create(null); + const configuredEnv = config && utils_default.hasOwnProp(config, "env") && config.env; + [ + "fetch", + "Request", + "Response", + "Blob" + ].forEach((key) => { + if (configuredEnv && utils_default.hasOwnProp(configuredEnv, key)) env[key] = configuredEnv[key]; + }); + const { fetch, Request, Response, Blob } = env; + const seeds = [ + Request, + Response, + fetch, + Blob + ]; + let i = seeds.length, seed, target, map = seedCache; + while (i--) { + seed = seeds[i]; + target = map.get(seed); + target === void 0 && map.set(seed, target = i ? /* @__PURE__ */ new Map() : factory(env)); + map = target; + } + return target; +}; +getFetch(); +//#endregion +//#region node_modules/axios/lib/adapters/adapters.js +/** +* Known adapters mapping. +* Provides environment-specific adapters for Axios: +* - `http` for Node.js +* - `xhr` for browsers +* - `fetch` for fetch API-based requests +* +* @type {Object} +*/ +var knownAdapters = { + http: null, + xhr: xhr_default, + fetch: { get: getFetch } +}; +utils_default.forEach(knownAdapters, (fn, value) => { + if (fn) { + try { + Object.defineProperty(fn, "name", { + __proto__: null, + value + }); + } catch (e) {} + Object.defineProperty(fn, "adapterName", { + __proto__: null, + value + }); + } +}); +/** +* Render a rejection reason string for unknown or unsupported adapters +* +* @param {string} reason +* @returns {string} +*/ +var renderReason = (reason) => `- ${reason}`; +/** +* Check if the adapter is resolved (function, null, or false) +* +* @param {Function|null|false} adapter +* @returns {boolean} +*/ +var isResolvedHandle = (adapter) => utils_default.isFunction(adapter) || adapter === null || adapter === false; +/** +* Get the first suitable adapter from the provided list. +* Tries each adapter in order until a supported one is found. +* Throws an AxiosError if no adapter is suitable. +* +* @param {Array|string|Function} adapters - Adapter(s) by name or function. +* @param {Object} config - Axios request configuration +* @throws {AxiosError} If no suitable adapter is available +* @returns {Function} The resolved adapter function +*/ +function getAdapter$1(adapters, config) { + adapters = utils_default.isArray(adapters) ? adapters : [adapters]; + const { length } = adapters; + let nameOrAdapter; + let adapter; + const rejectedReasons = {}; + for (let i = 0; i < length; i++) { + nameOrAdapter = adapters[i]; + let id; + adapter = nameOrAdapter; + if (!isResolvedHandle(nameOrAdapter)) { + adapter = knownAdapters[(id = String(nameOrAdapter)).toLowerCase()]; + if (adapter === void 0) throw new AxiosError$1(`Unknown adapter '${id}'`); + } + if (adapter && (utils_default.isFunction(adapter) || (adapter = adapter.get(config)))) break; + rejectedReasons[id || "#" + i] = adapter; + } + if (!adapter) { + const reasons = Object.entries(rejectedReasons).map(([id, state]) => `adapter ${id} ` + (state === false ? "is not supported by the environment" : "is not available in the build")); + throw new AxiosError$1(`There is no suitable adapter to dispatch the request ` + (length ? reasons.length > 1 ? "since :\n" + reasons.map(renderReason).join("\n") : " " + renderReason(reasons[0]) : "as no adapter specified"), AxiosError$1.ERR_NOT_SUPPORT); + } + return adapter; +} +/** +* Exports Axios adapters and utility to resolve an adapter +*/ +var adapters_default = { + /** + * Resolve an adapter from a list of adapter names or functions. + * @type {Function} + */ + getAdapter: getAdapter$1, + /** + * Exposes all known adapters + * @type {Object} + */ + adapters: knownAdapters +}; +//#endregion +//#region node_modules/axios/lib/core/dispatchRequest.js +/** +* Throws a `CanceledError` if cancellation has been requested. +* +* @param {Object} config The config that is to be used for the request +* +* @returns {void} +*/ +function throwIfCancellationRequested(config) { + if (config.cancelToken) config.cancelToken.throwIfRequested(); + if (config.signal && config.signal.aborted) throw new CanceledError$1(null, config); +} +/** +* Resolve the clock used to time adapter execution. +* +* Prefers the monotonic `performance.now()` so wall-clock adjustments do not +* skew the measurement, and so frameworks that forbid reading the current +* time during prerendering (e.g. Next.js Cache Components) accept it. Falls +* back to `Date.now()` in runtimes without the High Resolution Time API. +* +* @returns {() => number} Millisecond clock +*/ +function resolveClock() { + return typeof performance !== "undefined" && utils_default.isFunction(performance.now) ? () => performance.now() : Date.now; +} +/** +* Whole milliseconds elapsed since `start`, floored at zero. +* +* Rounded so the value stays an integer as with `Date.now()`. The fallback +* wall clock can move backwards mid-request, so the result is clamped. +* +* @param {() => number} now Clock returned by `resolveClock()` +* @param {number} start Timestamp read from `now` +* +* @returns {number} Non-negative elapsed milliseconds +*/ +function elapsedSince(now, start) { + return Math.max(0, Math.round(now() - start)); +} +/** +* Dispatch a request to the server using the configured adapter. +* +* @param {object} config The config that is to be used for the request +* +* @returns {Promise} The Promise to be fulfilled +*/ +function dispatchRequest(_config) { + const config = utils_default.toSafeFlatObject(_config); + throwIfCancellationRequested(config); + config.headers = AxiosHeaders$1.from(utils_default.getSafeProp(config, "headers")); + config.data = transformData.call(config, config.transformRequest); + if ([ + "post", + "put", + "patch" + ].indexOf(config.method) !== -1) config.headers.setContentType("application/x-www-form-urlencoded", false); + const adapter = adapters_default.getAdapter(config.adapter || defaults.adapter, config); + const now = resolveClock(); + const start = now(); + return adapter(config).then(function onAdapterResolution(response) { + throwIfCancellationRequested(config); + response.duration = elapsedSince(now, start); + config.response = response; + try { + response.data = transformData.call(config, config.transformResponse, response); + } finally { + delete config.response; + } + response.headers = AxiosHeaders$1.from(response.headers); + return response; + }, function onAdapterRejection(reason) { + if (!isCancel$1(reason)) { + throwIfCancellationRequested(config); + if (reason && reason.response) { + reason.response.duration = elapsedSince(now, start); + config.response = reason.response; + try { + reason.response.data = transformData.call(config, config.transformResponse, reason.response); + } finally { + delete config.response; + } + reason.response.headers = AxiosHeaders$1.from(reason.response.headers); + } + } + return Promise.reject(reason); + }); +} +//#endregion +//#region node_modules/axios/lib/helpers/validator.js +var validators$1 = {}; +[ + "object", + "boolean", + "number", + "function", + "string", + "symbol" +].forEach((type, i) => { + validators$1[type] = function validator(thing) { + return typeof thing === type || "a" + (i < 1 ? "n " : " ") + type; + }; +}); +var deprecatedWarnings = {}; +/** +* Transitional option validator +* +* @param {function|boolean?} validator - set to false if the transitional option has been removed +* @param {string?} version - deprecated version / removed since version +* @param {string?} message - some message with additional info +* +* @returns {function} +*/ +validators$1.transitional = function transitional(validator, version, message) { + function formatMessage(opt, desc) { + return "[Axios v" + VERSION$1 + "] Transitional option '" + opt + "'" + desc + (message ? ". " + message : ""); + } + return (value, opt, opts) => { + if (validator === false) throw new AxiosError$1(formatMessage(opt, " has been removed" + (version ? " in " + version : "")), AxiosError$1.ERR_DEPRECATED); + if (version && !deprecatedWarnings[opt]) { + deprecatedWarnings[opt] = true; + console.warn(formatMessage(opt, " has been deprecated since v" + version + " and will be removed in the near future")); + } + return validator ? validator(value, opt, opts) : true; + }; +}; +validators$1.spelling = function spelling(correctSpelling) { + return (value, opt) => { + console.warn(`${opt} is likely a misspelling of ${correctSpelling}`); + return true; + }; +}; +/** +* Assert object's properties type +* +* @param {object} options +* @param {object} schema +* @param {boolean?} allowUnknown +* +* @returns {object} +*/ +function assertOptions(options, schema, allowUnknown) { + if (typeof options !== "object" || options === null) throw new AxiosError$1("options must be an object", AxiosError$1.ERR_BAD_OPTION_VALUE); + const keys = Object.keys(options); + let i = keys.length; + while (i-- > 0) { + const opt = keys[i]; + const validator = Object.prototype.hasOwnProperty.call(schema, opt) ? schema[opt] : void 0; + if (validator) { + const value = options[opt]; + const result = value === void 0 || validator(value, opt, options); + if (result !== true) throw new AxiosError$1("option " + opt + " must be " + result, AxiosError$1.ERR_BAD_OPTION_VALUE); + continue; + } + if (allowUnknown !== true) throw new AxiosError$1("Unknown option " + opt, AxiosError$1.ERR_BAD_OPTION); + } +} +var validator_default = { + assertOptions, + validators: validators$1 +}; +//#endregion +//#region node_modules/axios/lib/core/Axios.js +var validators = validator_default.validators; +var isHeadersBucket = (value) => { + if (value == null || utils_default.isPlainObject(value) || value instanceof AxiosHeaders$1) return true; + try { + return utils_default.isObject(value) && utils_default.getSafeProp(value, Symbol.toStringTag) === "AxiosHeaders" && [ + "toJSON", + "set", + "get", + "has", + "delete", + "clear", + "normalize", + "concat", + "toString", + Symbol.iterator + ].every((method) => utils_default.isFunction(utils_default.getSafeProp(value, method))); + } catch (e) { + return false; + } +}; +/** +* Create a new instance of Axios +* +* @param {Object} instanceConfig The default config for the instance +* +* @return {Axios} A new instance of Axios +*/ +var Axios$1 = class { + constructor(instanceConfig) { + this.defaults = instanceConfig || {}; + this.interceptors = { + request: new InterceptorManager(), + response: new InterceptorManager() + }; + } + /** + * Dispatch a request + * + * @param {String|Object} configOrUrl The config specific for this request (merged with this.defaults) + * @param {?Object} config + * + * @returns {Promise} The Promise to be fulfilled + */ + async request(configOrUrl, config) { + try { + return await this._request(configOrUrl, config); + } catch (err) { + if (err instanceof Error) try { + let dummy = {}; + Error.captureStackTrace ? Error.captureStackTrace(dummy) : dummy = /* @__PURE__ */ new Error(); + const dummyStack = dummy.stack; + let stack = ""; + if (typeof dummyStack === "string") { + const firstNewlineIndex = dummyStack.indexOf("\n"); + stack = firstNewlineIndex === -1 ? "" : dummyStack.slice(firstNewlineIndex + 1); + } + if (!err.stack) err.stack = stack; + else if (stack) { + const firstNewlineIndex = stack.indexOf("\n"); + const secondNewlineIndex = firstNewlineIndex === -1 ? -1 : stack.indexOf("\n", firstNewlineIndex + 1); + const duplicateCheckSuffix = secondNewlineIndex === -1 ? stack : stack.slice(secondNewlineIndex + 1); + const currentStack = String(err.stack); + const causeIndex = getCauseStackIndex(err, currentStack); + const stackHead = causeIndex === -1 ? currentStack : currentStack.slice(0, causeIndex); + const causeSection = causeIndex === -1 ? "" : currentStack.slice(causeIndex); + if (!stackHead.endsWith(duplicateCheckSuffix)) err.stack = stackHead + "\n" + stack + causeSection; + } + } catch (e) {} + throw err; + } + } + _request(configOrUrl, config) { + if (typeof configOrUrl === "string") { + config = config || {}; + config.url = configOrUrl; + } else config = configOrUrl || {}; + config = mergeConfig$1(this.defaults, config); + const { transitional, paramsSerializer, headers } = config; + if (transitional !== void 0) validator_default.assertOptions(transitional, { + silentJSONParsing: validators.transitional(validators.boolean), + forcedJSONParsing: validators.transitional(validators.boolean), + clarifyTimeoutError: validators.transitional(validators.boolean), + legacyInterceptorReqResOrdering: validators.transitional(validators.boolean), + advertiseZstdAcceptEncoding: validators.transitional(validators.boolean), + validateStatusUndefinedResolves: validators.transitional(validators.boolean), + encodeBasicAuthUsername: validators.transitional(validators.boolean) + }, false); + if (paramsSerializer != null) { + if (utils_default.isFunction(paramsSerializer)) config.paramsSerializer = { serialize: paramsSerializer }; + else validator_default.assertOptions(paramsSerializer, { + encode: validators.function, + serialize: validators.function + }, true); + } + if (config.allowAbsoluteUrls !== void 0) {} else if (utils_default.hasOwnProp(this.defaults, "allowAbsoluteUrls") && this.defaults.allowAbsoluteUrls !== void 0) config.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls; + else config.allowAbsoluteUrls = true; + validator_default.assertOptions(config, { + baseUrl: validators.spelling("baseURL"), + withXsrfToken: validators.spelling("withXSRFToken") + }, true); + config.method = (utils_default.getSafeProp(config, "method") || utils_default.getSafeProp(this.defaults, "method") || "get").toLowerCase(); + const commonHeaders = utils_default.getSafeProp(headers, "common"); + const methodHeaders = utils_default.getSafeProp(headers, config.method); + const contextHeaders = headers && utils_default.merge(isHeadersBucket(commonHeaders) ? commonHeaders : void 0, isHeadersBucket(methodHeaders) ? methodHeaders : void 0); + headers && utils_default.forEach(methodList.concat("common"), (method) => { + if (isHeadersBucket(utils_default.getSafeProp(headers, method))) delete headers[method]; + }); + config.headers = AxiosHeaders$1.concat(contextHeaders, headers); + const requestInterceptorChain = []; + let synchronousRequestInterceptors = true; + this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) { + if (typeof interceptor.runWhen === "function" && interceptor.runWhen(config) === false) return; + synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous; + const transitional = config.transitional || transitional_default; + if (transitional && transitional.legacyInterceptorReqResOrdering) requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected); + else requestInterceptorChain.push(interceptor.fulfilled, interceptor.rejected); + }); + const responseInterceptorChain = []; + this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) { + responseInterceptorChain.push(interceptor.fulfilled, interceptor.rejected); + }); + let promise; + let i = 0; + let len; + if (!synchronousRequestInterceptors) { + const chain = [dispatchRequest.bind(this), void 0]; + chain.unshift(...requestInterceptorChain); + chain.push(...responseInterceptorChain); + len = chain.length; + promise = Promise.resolve(config); + while (i < len) promise = promise.then(chain[i++], chain[i++]); + return promise; + } + len = requestInterceptorChain.length; + let newConfig = config; + while (i < len) { + const onFulfilled = requestInterceptorChain[i++]; + const onRejected = requestInterceptorChain[i++]; + try { + newConfig = onFulfilled ? onFulfilled(newConfig) : newConfig; + } catch (error) { + if (!onRejected) { + promise = Promise.reject(error); + break; + } + try { + const rejectedResult = onRejected.call(this, error); + if (utils_default.isThenable(rejectedResult)) promise = Promise.resolve(rejectedResult).then(() => dispatchRequest.call(this, newConfig)); + } catch (rejectedError) { + promise = Promise.reject(rejectedError); + } + break; + } + } + if (!promise) try { + promise = dispatchRequest.call(this, newConfig); + } catch (error) { + promise = Promise.reject(error); + } + i = 0; + len = responseInterceptorChain.length; + while (i < len) promise = promise.then(responseInterceptorChain[i++], responseInterceptorChain[i++]); + return promise; + } + getUri(config) { + config = mergeConfig$1(this.defaults, config); + return buildURL(buildFullPath(config.baseURL, config.url, config.allowAbsoluteUrls, config), config.params, config.paramsSerializer); + } +}; +utils_default.forEach([ + "delete", + "get", + "head", + "options" +], function forEachMethodNoData(method) { + Axios$1.prototype[method] = async function(url, config) { + return this.request(mergeConfig$1(config || {}, { + method, + url, + data: config && utils_default.hasOwnProp(config, "data") ? config.data : void 0 + })); + }; +}); +utils_default.forEach([ + "post", + "put", + "patch", + "query" +], function forEachMethodWithData(method) { + function generateHTTPMethod(isForm) { + return async function httpMethod(url, data, config) { + return this.request(mergeConfig$1(config || {}, { + method, + headers: isForm ? { "Content-Type": "multipart/form-data" } : {}, + url, + data + })); + }; + } + Axios$1.prototype[method] = generateHTTPMethod(); + if (method !== "query") Axios$1.prototype[method + "Form"] = generateHTTPMethod(true); +}); +//#endregion +//#region node_modules/axios/lib/cancel/CancelToken.js +/** +* A `CancelToken` is an object that can be used to request cancellation of an operation. +* +* @param {Function} executor The executor function. +* +* @returns {CancelToken} +*/ +var CancelToken$1 = class CancelToken$1 { + constructor(executor) { + if (typeof executor !== "function") throw new TypeError("executor must be a function."); + let resolvePromise; + this.promise = new Promise(function promiseExecutor(resolve) { + resolvePromise = resolve; + }); + const token = this; + this.promise.then((cancel) => { + if (!token._listeners) return; + let i = token._listeners.length; + while (i-- > 0) token._listeners[i](cancel); + token._listeners = null; + }); + this.promise.then = (onfulfilled) => { + let _resolve; + const promise = new Promise((resolve) => { + token.subscribe(resolve); + _resolve = resolve; + }).then(onfulfilled); + promise.cancel = function reject() { + token.unsubscribe(_resolve); + }; + return promise; + }; + executor(function cancel(message, config, request) { + if (token.reason) return; + token.reason = new CanceledError$1(message, config, request); + resolvePromise(token.reason); + }); + } + /** + * Throws a `CanceledError` if cancellation has been requested. + */ + throwIfRequested() { + if (this.reason) throw this.reason; + } + /** + * Subscribe to the cancel signal + */ + subscribe(listener) { + if (this.reason) { + listener(this.reason); + return; + } + if (this._listeners) this._listeners.push(listener); + else this._listeners = [listener]; + } + /** + * Unsubscribe from the cancel signal + */ + unsubscribe(listener) { + if (!this._listeners) return; + const index = this._listeners.indexOf(listener); + if (index !== -1) this._listeners.splice(index, 1); + } + toAbortSignal() { + const controller = new AbortController(); + const abort = (err) => { + controller.abort(err); + }; + this.subscribe(abort); + controller.signal.unsubscribe = () => this.unsubscribe(abort); + return controller.signal; + } + /** + * Returns an object that contains a new `CancelToken` and a function that, when called, + * cancels the `CancelToken`. + */ + static source() { + let cancel; + return { + token: new CancelToken$1(function executor(c) { + cancel = c; + }), + cancel + }; + } +}; +//#endregion +//#region node_modules/axios/lib/helpers/spread.js +/** +* Syntactic sugar for invoking a function and expanding an array for arguments. +* +* Common use case would be to use `Function.prototype.apply`. +* +* ```js +* function f(x, y, z) {} +* const args = [1, 2, 3]; +* f.apply(null, args); +* ``` +* +* With `spread` this example can be re-written. +* +* ```js +* spread(function(x, y, z) {})([1, 2, 3]); +* ``` +* +* @param {Function} callback +* +* @returns {Function} +*/ +function spread$1(callback) { + return function wrap(arr) { + return callback.apply(null, arr); + }; +} +//#endregion +//#region node_modules/axios/lib/helpers/isAxiosError.js +/** +* Determines whether the payload is an error thrown by Axios +* +* @param {*} payload The value to test +* +* @returns {boolean} True if the payload is an error thrown by Axios, otherwise false +*/ +function isAxiosError$1(payload) { + return utils_default.isObject(payload) && payload.isAxiosError === true; +} +//#endregion +//#region node_modules/axios/lib/helpers/HttpStatusCode.js +var HttpStatusCode$1 = { + 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, + /** + * @deprecated Use `ContentTooLarge` instead. + */ + PayloadTooLarge: 413, + ContentTooLarge: 413, + UriTooLong: 414, + UnsupportedMediaType: 415, + RangeNotSatisfiable: 416, + ExpectationFailed: 417, + ImATeapot: 418, + MisdirectedRequest: 421, + /** + * @deprecated Use `UnprocessableContent` instead. + */ + UnprocessableEntity: 422, + UnprocessableContent: 422, + Locked: 423, + FailedDependency: 424, + TooEarly: 425, + UpgradeRequired: 426, + PreconditionRequired: 428, + TooManyRequests: 429, + RequestHeaderFieldsTooLarge: 431, + UnavailableForLegalReasons: 451, + InternalServerError: 500, + NotImplemented: 501, + BadGateway: 502, + ServiceUnavailable: 503, + GatewayTimeout: 504, + HttpVersionNotSupported: 505, + VariantAlsoNegotiates: 506, + InsufficientStorage: 507, + LoopDetected: 508, + NotExtended: 510, + NetworkAuthenticationRequired: 511, + WebServerReturnsAnUnknownError: 520, + WebServerIsDown: 521, + ConnectionTimedOut: 522, + OriginIsUnreachable: 523, + TimeoutOccurred: 524, + SslHandshakeFailed: 525, + InvalidSslCertificate: 526 +}; +Object.entries(HttpStatusCode$1).forEach(([key, value]) => { + if (HttpStatusCode$1[value] === void 0) HttpStatusCode$1[value] = key; +}); +//#endregion +//#region node_modules/axios/lib/axios.js +/** +* Create an instance of Axios +* +* @param {Object} defaultConfig The default config for the instance +* +* @returns {Axios} A new instance of Axios +*/ +function createInstance(defaultConfig) { + const context = new Axios$1(defaultConfig); + const instance = bind(Axios$1.prototype.request, context); + utils_default.extend(instance, Axios$1.prototype, context, { allOwnKeys: true }); + utils_default.extend(instance, context, null, { allOwnKeys: true }); + instance.create = function create(instanceConfig) { + return createInstance(mergeConfig$1(defaultConfig, instanceConfig)); + }; + return instance; +} +var axios = createInstance(defaults); +axios.Axios = Axios$1; +axios.CanceledError = CanceledError$1; +axios.CancelToken = CancelToken$1; +axios.isCancel = isCancel$1; +axios.VERSION = VERSION$1; +axios.toFormData = toFormData$1; +axios.AxiosError = AxiosError$1; +axios.Cancel = axios.CanceledError; +axios.all = function all(promises) { + return Promise.all(promises); +}; +axios.spread = spread$1; +axios.isAxiosError = isAxiosError$1; +axios.mergeConfig = mergeConfig$1; +axios.AxiosHeaders = AxiosHeaders$1; +axios.formToJSON = (thing) => formDataToJSON(utils_default.isHTMLForm(thing) ? new FormData(thing) : thing); +axios.getAdapter = adapters_default.getAdapter; +axios.HttpStatusCode = HttpStatusCode$1; +axios.default = axios; +//#endregion +//#region node_modules/axios/index.js +var { Axios, AxiosError, CanceledError, isCancel, CancelToken, VERSION, all, Cancel, isAxiosError, spread, toFormData, AxiosHeaders, HttpStatusCode, formToJSON, getAdapter, mergeConfig, create } = axios; +//#endregion +export { Axios, AxiosError, AxiosHeaders, Cancel, CancelToken, CanceledError, HttpStatusCode, VERSION, all, create, axios as default, formToJSON, getAdapter, isAxiosError, isCancel, mergeConfig, spread, toFormData }; diff --git a/node_modules/.vite/deps/axios.js.map b/node_modules/.vite/deps/axios.js.map new file mode 100644 index 0000000..b3e4340 --- /dev/null +++ b/node_modules/.vite/deps/axios.js.map @@ -0,0 +1 @@ +{"version":3,"file":"axios.js","names":["isFunction","utils","utils","$internals","utils","AxiosHeaders","parseHeaders","utils","AxiosHeaders","stringifySafely","AxiosError","utils","toFormData","AxiosError","encode","toFormData","utils","utils","platform","toFormData","platform","utils","AxiosError","utils","utils","transitionalDefaults","toFormData","AxiosError","platform","AxiosHeaders","isCancel","CanceledError","AxiosError","AxiosError","platform","utils","utils","platform","AxiosError","utils","AxiosError","AxiosHeaders","utils","mergeConfig","encodeUTF8","cookies","mergeConfig","utils","AxiosHeaders","AxiosError","platform","isURLSameOrigin","platform","utils","AxiosHeaders","AxiosError","transitionalDefaults","CanceledError","AxiosError","CanceledError","utils","utils","utils","AxiosError","platform","VERSION","utils","platform","AxiosError","AxiosHeaders","VERSION","xhrAdapter","fetchAdapter.getFetch","utils","getAdapter","AxiosError","CanceledError","utils","AxiosHeaders","adapters","isCancel","validators","VERSION","AxiosError","validator","utils","AxiosHeaders","Axios","mergeConfig","transitionalDefaults","CancelToken","CanceledError","spread","isAxiosError","utils","HttpStatusCode","Axios","mergeConfig","CanceledError","CancelToken","isCancel","VERSION","toFormData","AxiosError","spread","isAxiosError","AxiosHeaders","utils","adapters","HttpStatusCode"],"sources":["../../axios/lib/helpers/bind.js","../../axios/lib/utils.js","../../axios/lib/helpers/parseHeaders.js","../../axios/lib/helpers/sanitizeHeaderValue.js","../../axios/lib/core/AxiosHeaders.js","../../axios/lib/core/AxiosError.js","../../axios/lib/helpers/toFormData.js","../../axios/lib/helpers/AxiosURLSearchParams.js","../../axios/lib/helpers/buildURL.js","../../axios/lib/core/InterceptorManager.js","../../axios/lib/defaults/transitional.js","../../axios/lib/platform/browser/classes/URLSearchParams.js","../../axios/lib/platform/browser/classes/FormData.js","../../axios/lib/platform/browser/classes/Blob.js","../../axios/lib/platform/browser/index.js","../../axios/lib/platform/common/utils.js","../../axios/lib/platform/index.js","../../axios/lib/helpers/toURLEncodedForm.js","../../axios/lib/helpers/formDataToJSON.js","../../axios/lib/core/methodList.js","../../axios/lib/defaults/index.js","../../axios/lib/core/transformData.js","../../axios/lib/cancel/isCancel.js","../../axios/lib/cancel/CanceledError.js","../../axios/lib/core/settle.js","../../axios/lib/helpers/normalizeURLForProtocolCheck.js","../../axios/lib/helpers/parseProtocol.js","../../axios/lib/helpers/cookies.js","../../axios/lib/helpers/speedometer.js","../../axios/lib/helpers/throttle.js","../../axios/lib/helpers/progressEventReducer.js","../../axios/lib/helpers/isURLSameOrigin.js","../../axios/lib/helpers/isAbsoluteURL.js","../../axios/lib/helpers/combineURLs.js","../../axios/lib/core/buildFullPath.js","../../axios/lib/core/assertParamsAcyclic.js","../../axios/lib/core/mergeConfig.js","../../axios/lib/core/setFormDataHeaders.js","../../axios/lib/helpers/resolveConfig.js","../../axios/lib/adapters/xhr.js","../../axios/lib/helpers/composeSignals.js","../../axios/lib/helpers/trackStream.js","../../axios/lib/helpers/formDataToBlob.js","../../axios/lib/core/createMultipartBody.js","../../axios/lib/helpers/estimateDataURLDecodedBytes.js","../../axios/lib/env/data.js","../../axios/lib/adapters/fetch.js","../../axios/lib/adapters/adapters.js","../../axios/lib/core/dispatchRequest.js","../../axios/lib/helpers/validator.js","../../axios/lib/core/Axios.js","../../axios/lib/cancel/CancelToken.js","../../axios/lib/helpers/spread.js","../../axios/lib/helpers/isAxiosError.js","../../axios/lib/helpers/HttpStatusCode.js","../../axios/lib/axios.js","../../axios/index.js"],"sourcesContent":["'use strict';\n\n/**\n * Create a bound version of a function with a specified `this` context\n *\n * @param {Function} fn - The function to bind\n * @param {*} thisArg - The value to be passed as the `this` parameter\n * @returns {Function} A new function that will call the original function with the specified `this` context\n */\nexport default function bind(fn, thisArg) {\n return function wrap() {\n return fn.apply(thisArg, arguments);\n };\n}\n","'use strict';\n\nimport bind from './helpers/bind.js';\n\n// utils is a library of generic helper functions non-specific to axios\n\nconst { toString } = Object.prototype;\nconst { getPrototypeOf } = Object;\nconst { iterator, toStringTag } = Symbol;\n\n/* Creating a function that will check if an object has a property. */\nconst hasOwnProperty = (\n ({ hasOwnProperty }) =>\n (obj, prop) =>\n hasOwnProperty.call(obj, prop)\n)(Object.prototype);\n\nconst isUnsafeObjectKey = (prop) =>\n typeof prop === 'string' &&\n (prop === '__proto__' || prop === 'constructor' || prop === 'prototype');\n\n/**\n * Determine whether an inherited object must be treated as a shared-prototype\n * boundary. Cross-realm Object.prototype objects cannot be distinguished\n * reliably from application-created null-prototype objects because their\n * properties are mutable, so all inherited terminal prototypes are excluded\n * as a fail-closed boundary. A null-prototype source still keeps its own\n * properties, as produced by mergeConfig and other safe materialization paths.\n *\n * @param {*} obj The object to inspect\n * @param {*} prototype The object's prototype\n * @param {boolean} source Whether obj is the original traversal source\n *\n * @returns {boolean} True when obj is a safe prototype traversal boundary\n */\nconst isPrototypeBoundary = (obj, prototype, source) =>\n obj === Object.prototype || (!source && prototype === null);\n\n/**\n * Determine whether an object can retain its identity through code paths that\n * add, replace, and remove config properties without bypassing unsafe-key\n * filtering. Immutable objects, unsafe-key-bearing objects, and objects with\n * accessor or restricted data properties must be materialized instead.\n *\n * @param {*} obj The object to inspect\n *\n * @returns {boolean} True when every own property is safe and fully mutable\n */\nconst isSafeAndFullyMutable = (obj) => {\n if (!Object.isExtensible(obj)) {\n return false;\n }\n\n const props = Object.getOwnPropertyNames(obj);\n\n if (Object.getOwnPropertySymbols) {\n props.push(...Object.getOwnPropertySymbols(obj));\n }\n\n return props.every((prop) => {\n if (isUnsafeObjectKey(prop)) {\n return false;\n }\n\n const descriptor = Object.getOwnPropertyDescriptor(obj, prop);\n\n return !!descriptor && descriptor.configurable && descriptor.writable === true;\n });\n};\n\n/**\n * Walk the prototype chain (excluding the source realm's Object.prototype)\n * looking for an own `prop`. This distinguishes genuine own/inherited members\n * — including class accessors and template prototypes — from members injected\n * via Object.prototype pollution (e.g. `Object.prototype.username = '...'`),\n * which live on Object.prototype itself and are therefore never matched.\n *\n * @param {*} thing The value whose chain to inspect\n * @param {string|symbol} prop The property key to look for\n *\n * @returns {boolean} True when `prop` is owned below Object.prototype\n */\nconst hasOwnInPrototypeChain = (thing, prop) => {\n let obj = thing;\n const seen = [];\n\n while (obj != null) {\n if (seen.indexOf(obj) !== -1) {\n return false;\n }\n seen.push(obj);\n\n const prototype = getPrototypeOf(obj);\n\n if (isPrototypeBoundary(obj, prototype, obj === thing)) {\n return false;\n }\n\n if (hasOwnProperty(obj, prop)) {\n return true;\n }\n obj = prototype;\n }\n return false;\n};\n\n/**\n * Read `obj[prop]` only when it is safe from Object.prototype pollution. Own\n * properties and members inherited from a non-Object.prototype source (a class\n * instance or template object) are honored; a value reachable only through a\n * polluted Object.prototype is ignored and `undefined` is returned.\n *\n * @param {*} obj The source object\n * @param {string|symbol} prop The property key to read\n *\n * @returns {*} The resolved value, or undefined when unsafe/absent\n */\nconst getSafeProp = (obj, prop) =>\n obj != null && hasOwnInPrototypeChain(obj, prop) ? obj[prop] : undefined;\n\n/**\n * Flatten an object and its application-defined prototype chain into a\n * null-prototype object. Members inherited only from the source realm's\n * Object.prototype are deliberately excluded, while class/template members\n * below that boundary are preserved.\n *\n * @param {*} thing The value to flatten\n *\n * @returns {*} A null-prototype copy, or the original value when it is already\n * structurally safe or is not an object\n */\nconst toSafeFlatObject = (thing) => {\n if (thing == null || (typeof thing !== 'object' && typeof thing !== 'function')) {\n return thing;\n }\n\n const sourcePrototype = getPrototypeOf(thing);\n\n if (sourcePrototype === null && isSafeAndFullyMutable(thing)) {\n return thing;\n }\n\n const result = Object.create(null);\n const merged = Object.create(null);\n const seen = [];\n let current = thing;\n\n while (current != null) {\n if (seen.indexOf(current) !== -1) {\n break;\n }\n\n seen.push(current);\n\n const prototype = current === thing ? sourcePrototype : getPrototypeOf(current);\n\n if (isPrototypeBoundary(current, prototype, current === thing)) {\n break;\n }\n\n const props = Object.getOwnPropertyNames(current);\n\n if (Object.getOwnPropertySymbols) {\n props.push(...Object.getOwnPropertySymbols(current));\n }\n\n for (const prop of props) {\n if (isUnsafeObjectKey(prop)) {\n continue;\n }\n\n if (!hasOwnProperty(merged, prop)) {\n result[prop] = thing[prop];\n merged[prop] = true;\n }\n }\n\n current = prototype;\n }\n\n return result;\n};\n\nconst kindOf = ((cache) => (thing) => {\n const str = toString.call(thing);\n return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase());\n})(Object.create(null));\n\nconst kindOfTest = (type) => {\n type = type.toLowerCase();\n return (thing) => kindOf(thing) === type;\n};\n\nconst typeOfTest = (type) => (thing) => typeof thing === type;\n\n/**\n * Determine if a value is a non-null object\n *\n * @param {Object} val The value to test\n *\n * @returns {boolean} True if value is an Array, otherwise false\n */\nconst { isArray } = Array;\n\n/**\n * Determine if a value is undefined\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if the value is undefined, otherwise false\n */\nconst isUndefined = typeOfTest('undefined');\n\n/**\n * Determine if a value is a Buffer\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Buffer, otherwise false\n */\nfunction isBuffer(val) {\n return (\n val !== null &&\n !isUndefined(val) &&\n val.constructor !== null &&\n !isUndefined(val.constructor) &&\n isFunction(val.constructor.isBuffer) &&\n val.constructor.isBuffer(val)\n );\n}\n\n/**\n * Determine if a value is an ArrayBuffer\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is an ArrayBuffer, otherwise false\n */\nconst isArrayBuffer = kindOfTest('ArrayBuffer');\n\n/**\n * Determine if a value is a view on an ArrayBuffer\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false\n */\nfunction isArrayBufferView(val) {\n let result;\n if (typeof ArrayBuffer !== 'undefined' && ArrayBuffer.isView) {\n result = ArrayBuffer.isView(val);\n } else {\n result = val && val.buffer && isArrayBuffer(val.buffer);\n }\n return result;\n}\n\n/**\n * Determine if a value is a String\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a String, otherwise false\n */\nconst isString = typeOfTest('string');\n\n/**\n * Determine if a value is a Function\n *\n * @param {*} val The value to test\n * @returns {boolean} True if value is a Function, otherwise false\n */\nconst isFunction = typeOfTest('function');\n\n/**\n * Determine if a value is a Number\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Number, otherwise false\n */\nconst isNumber = typeOfTest('number');\n\n/**\n * Determine if a value is an Object\n *\n * @param {*} thing The value to test\n *\n * @returns {boolean} True if value is an Object, otherwise false\n */\nconst isObject = (thing) => thing !== null && typeof thing === 'object';\n\n/**\n * Determine if a value is a Boolean\n *\n * @param {*} thing The value to test\n * @returns {boolean} True if value is a Boolean, otherwise false\n */\nconst isBoolean = (thing) => thing === true || thing === false;\n\n/**\n * Determine if a value is a plain Object\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a plain Object, otherwise false\n */\nconst isPlainObject = (val) => {\n if (!isObject(val)) {\n return false;\n }\n\n const prototype = getPrototypeOf(val);\n return (\n (prototype === null || prototype === Object.prototype || getPrototypeOf(prototype) === null) &&\n // Treat own Symbol.toStringTag or Symbol.iterator members as evidence the\n // value is tagged/iterable, ignoring members reachable only through shared\n // or terminal prototype boundaries. This is exactly what\n // hasOwnInPrototypeChain(val, prop) computes here: every prototype admitted\n // above (null, Object.prototype, or a terminal null-prototype template) is\n // a boundary, so the walk never inspects anything but `val`'s own members,\n // and stops before even those when `val` is itself the boundary\n // Object.prototype. Checking that inline avoids allocating the walker's\n // `seen` list twice per call on the mergeConfig / merge hot path.\n (isPrototypeBoundary(val, prototype, true) ||\n (!hasOwnProperty(val, toStringTag) && !hasOwnProperty(val, iterator)))\n );\n};\n\n/**\n * Determine if a value is an empty object (safely handles Buffers)\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is an empty object, otherwise false\n */\nconst isEmptyObject = (val) => {\n // Early return for non-objects or Buffers to prevent RangeError\n if (!isObject(val) || isBuffer(val)) {\n return false;\n }\n\n try {\n return Object.keys(val).length === 0 && Object.getPrototypeOf(val) === Object.prototype;\n } catch (e) {\n // Fallback for any other objects that might cause RangeError with Object.keys()\n return false;\n }\n};\n\n/**\n * Determine if a value is a Date\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Date, otherwise false\n */\nconst isDate = kindOfTest('Date');\n\n/**\n * Determine if a value is a File\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a File, otherwise false\n */\nconst isFile = kindOfTest('File');\n\n/**\n * Determine if a value is a React Native Blob\n * React Native \"blob\": an object with a `uri` attribute. Optionally, it can\n * also have a `name` and `type` attribute to specify filename and content type\n *\n * @see https://github.com/facebook/react-native/blob/26684cf3adf4094eb6c405d345a75bf8c7c0bf88/Libraries/Network/FormData.js#L68-L71\n *\n * @param {*} value The value to test\n *\n * @returns {boolean} True if value is a React Native Blob, otherwise false\n */\nconst isReactNativeBlob = (value) => {\n return !!(value && typeof value.uri !== 'undefined');\n};\n\n/**\n * Determine if environment is React Native\n * ReactNative `FormData` has a non-standard `getParts()` method\n *\n * @param {*} formData The formData to test\n *\n * @returns {boolean} True if environment is React Native, otherwise false\n */\nconst isReactNative = (formData) => formData && typeof formData.getParts !== 'undefined';\n\n/**\n * Determine if a value is a Blob\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Blob, otherwise false\n */\nconst isBlob = kindOfTest('Blob');\n\n/**\n * Determine if a value is a FileList\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a FileList, otherwise false\n */\nconst isFileList = kindOfTest('FileList');\nconst isSet = kindOfTest('Set');\n\n/**\n * Determine if a value is a Stream\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Stream, otherwise false\n */\nconst isStream = (val) => isObject(val) && isFunction(val.pipe);\n\n/**\n * Determine if a value is a FormData\n *\n * @param {*} thing The value to test\n *\n * @returns {boolean} True if value is an FormData, otherwise false\n */\nfunction getGlobal() {\n if (typeof globalThis !== 'undefined') return globalThis;\n if (typeof self !== 'undefined') return self;\n if (typeof window !== 'undefined') return window;\n if (typeof global !== 'undefined') return global;\n return {};\n}\n\nconst G = getGlobal();\nconst FormDataCtor = typeof G.FormData !== 'undefined' ? G.FormData : undefined;\n\nconst isFormData = (thing) => {\n if (!thing) return false;\n if (FormDataCtor && thing instanceof FormDataCtor) return true;\n // Reject plain objects inheriting directly from Object.prototype so prototype-pollution gadgets can't spoof FormData.\n const proto = getPrototypeOf(thing);\n if (!proto || proto === Object.prototype) return false;\n if (!isFunction(thing.append)) return false;\n const kind = kindOf(thing);\n return (\n kind === 'formdata' ||\n // detect form-data instance\n (kind === 'object' && isFunction(thing.toString) && thing.toString() === '[object FormData]')\n );\n};\n\n/**\n * Determine if a value is a URLSearchParams object\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a URLSearchParams object, otherwise false\n */\nconst isURLSearchParams = kindOfTest('URLSearchParams');\n\nconst [isReadableStream, isRequest, isResponse, isHeaders] = [\n 'ReadableStream',\n 'Request',\n 'Response',\n 'Headers',\n].map(kindOfTest);\n\n/**\n * Trim excess whitespace off the beginning and end of a string\n *\n * @param {String} str The String to trim\n *\n * @returns {String} The String freed of excess whitespace\n */\nconst trim = (str) => {\n return str.trim ? str.trim() : str.replace(/^[\\s\\uFEFF\\xA0]+|[\\s\\uFEFF\\xA0]+$/g, '');\n};\n/**\n * Iterate over an Array or an Object invoking a function for each item.\n *\n * If `obj` is an Array callback will be called passing\n * the value, index, and complete array for each item.\n *\n * If 'obj' is an Object callback will be called passing\n * the value, key, and complete object for each property.\n *\n * @param {Object|Array} obj The object to iterate\n * @param {Function} fn The callback to invoke for each item\n *\n * @param {Object} [options]\n * @param {Boolean} [options.allOwnKeys = false]\n * @returns {any}\n */\nfunction forEach(obj, fn, { allOwnKeys = false } = {}) {\n // Don't bother if no value provided\n if (obj === null || typeof obj === 'undefined') {\n return;\n }\n\n let i;\n let l;\n\n // Force an array if not already something iterable\n if (typeof obj !== 'object') {\n /*eslint no-param-reassign:0*/\n obj = [obj];\n }\n\n if (isArray(obj)) {\n // Iterate over array values\n for (i = 0, l = obj.length; i < l; i++) {\n fn.call(null, obj[i], i, obj);\n }\n } else {\n // Buffer check\n if (isBuffer(obj)) {\n return;\n }\n\n // Iterate over object keys\n const keys = allOwnKeys ? Object.getOwnPropertyNames(obj) : Object.keys(obj);\n const len = keys.length;\n let key;\n\n for (i = 0; i < len; i++) {\n key = keys[i];\n fn.call(null, obj[key], key, obj);\n }\n }\n}\n\n/**\n * Finds a key in an object, case-insensitive, returning the actual key name.\n * Returns null if the object is a Buffer or if no match is found.\n *\n * @param {Object} obj - The object to search.\n * @param {string} key - The key to find (case-insensitive).\n * @returns {?string} The actual key name if found, otherwise null.\n */\nfunction findKey(obj, key) {\n if (isBuffer(obj)) {\n return null;\n }\n\n key = key.toLowerCase();\n const keys = Object.keys(obj);\n let i = keys.length;\n let _key;\n while (i-- > 0) {\n _key = keys[i];\n if (key === _key.toLowerCase()) {\n return _key;\n }\n }\n return null;\n}\n\nconst _global = (() => {\n /*eslint no-undef:0*/\n if (typeof globalThis !== 'undefined') return globalThis;\n return typeof self !== 'undefined' ? self : typeof window !== 'undefined' ? window : global;\n})();\n\nconst isContextDefined = (context) => !isUndefined(context) && context !== _global;\n\n/**\n * Accepts varargs expecting each argument to be an object, then\n * immutably merges the properties of each object and returns result.\n *\n * When multiple objects contain the same key the later object in\n * the arguments list will take precedence.\n *\n * Example:\n *\n * ```js\n * const result = merge({foo: 123}, {foo: 456});\n * console.log(result.foo); // outputs 456\n * ```\n *\n * @param {Object} obj1 Object to merge\n *\n * @returns {Object} Result of all merge properties\n */\nfunction merge(...objs) {\n const { caseless, skipUndefined } = (isContextDefined(this) && this) || {};\n const result = {};\n // Caseless lookup only applies to string keys — symbol keys are\n // identity-matched. Every string key that reaches `result` passes through\n // this index first, so it can never hold two case variants of one key and a\n // lowercase -> key map is exactly what findKey(result, key) would rescan\n // Object.keys(result) for on each assignment.\n const lowerCaseKeys = caseless ? Object.create(null) : null;\n const assignValue = (val, key) => {\n // Skip dangerous property names to prevent prototype pollution\n if (key === '__proto__' || key === 'constructor' || key === 'prototype') {\n return;\n }\n\n let targetKey = key;\n if (lowerCaseKeys && typeof key === 'string') {\n const lowerKey = key.toLowerCase();\n const knownKey = lowerCaseKeys[lowerKey];\n // A key recorded but absent from `result` was skipped by skipUndefined;\n // the later spelling wins then, as it does for findKey.\n if (knownKey !== undefined && hasOwnProperty(result, knownKey)) {\n targetKey = knownKey;\n } else {\n lowerCaseKeys[lowerKey] = key;\n }\n }\n // Read via own-prop only — a bare `result[targetKey]` walks the prototype\n // chain, so a polluted Object.prototype value could surface here and get\n // copied into the merged result.\n const existing = hasOwnProperty(result, targetKey) ? result[targetKey] : undefined;\n if (isPlainObject(existing) && isPlainObject(val)) {\n result[targetKey] = merge(existing, val);\n } else if (isPlainObject(val)) {\n result[targetKey] = merge({}, val);\n } else if (isArray(val)) {\n result[targetKey] = val.slice();\n } else if (!skipUndefined || !isUndefined(val)) {\n result[targetKey] = val;\n }\n };\n\n for (let i = 0, l = objs.length; i < l; i++) {\n const source = objs[i];\n if (!source || isBuffer(source)) {\n continue;\n }\n\n forEach(source, assignValue);\n\n if (typeof source !== 'object' || isArray(source) || !Object.getOwnPropertySymbols) {\n continue;\n }\n\n const symbols = Object.getOwnPropertySymbols(source);\n for (let j = 0; j < symbols.length; j++) {\n const symbol = symbols[j];\n if (propertyIsEnumerable.call(source, symbol)) {\n assignValue(source[symbol], symbol);\n }\n }\n }\n return result;\n}\n\n/**\n * Extends object a by mutably adding to it the properties of object b.\n *\n * @param {Object} a The object to be extended\n * @param {Object} b The object to copy properties from\n * @param {Object} thisArg The object to bind function to\n *\n * @param {Object} [options]\n * @param {Boolean} [options.allOwnKeys]\n * @returns {Object} The resulting value of object a\n */\nconst extend = (a, b, thisArg, { allOwnKeys } = {}) => {\n forEach(\n b,\n (val, key) => {\n if (thisArg && isFunction(val)) {\n Object.defineProperty(a, key, {\n // Null-proto descriptor so a polluted Object.prototype.get cannot\n // hijack defineProperty's accessor-vs-data resolution.\n __proto__: null,\n value: bind(val, thisArg),\n writable: true,\n enumerable: true,\n configurable: true,\n });\n } else {\n Object.defineProperty(a, key, {\n __proto__: null,\n value: val,\n writable: true,\n enumerable: true,\n configurable: true,\n });\n }\n },\n { allOwnKeys }\n );\n return a;\n};\n\n/**\n * Remove byte order marker. This catches EF BB BF (the UTF-8 BOM)\n *\n * @param {string} content with BOM\n *\n * @returns {string} content value without BOM\n */\nconst stripBOM = (content) => {\n if (content.charCodeAt(0) === 0xfeff) {\n content = content.slice(1);\n }\n return content;\n};\n\n/**\n * Inherit the prototype methods from one constructor into another\n * @param {function} constructor\n * @param {function} superConstructor\n * @param {object} [props]\n * @param {object} [descriptors]\n *\n * @returns {void}\n */\nconst inherits = (constructor, superConstructor, props, descriptors) => {\n constructor.prototype = Object.create(superConstructor.prototype, descriptors);\n Object.defineProperty(constructor.prototype, 'constructor', {\n __proto__: null,\n value: constructor,\n writable: true,\n enumerable: false,\n configurable: true,\n });\n Object.defineProperty(constructor, 'super', {\n __proto__: null,\n value: superConstructor.prototype,\n });\n props && Object.assign(constructor.prototype, props);\n};\n\n/**\n * Resolve object with deep prototype chain to a flat object\n * @param {Object} sourceObj source object\n * @param {Object} [destObj]\n * @param {Function|Boolean} [filter]\n * @param {Function} [propFilter]\n *\n * @returns {Object}\n */\nconst toFlatObject = (sourceObj, destObj, filter, propFilter) => {\n let props;\n let i;\n let prop;\n const merged = {};\n\n destObj = destObj || {};\n // eslint-disable-next-line no-eq-null,eqeqeq\n if (sourceObj == null) return destObj;\n\n do {\n props = Object.getOwnPropertyNames(sourceObj);\n i = props.length;\n while (i-- > 0) {\n prop = props[i];\n if ((!propFilter || propFilter(prop, sourceObj, destObj)) && !merged[prop]) {\n destObj[prop] = sourceObj[prop];\n merged[prop] = true;\n }\n }\n sourceObj = filter !== false && getPrototypeOf(sourceObj);\n } while (sourceObj && (!filter || filter(sourceObj, destObj)) && sourceObj !== Object.prototype);\n\n return destObj;\n};\n\n/**\n * Determines whether a string ends with the characters of a specified string\n *\n * @param {String} str\n * @param {String} searchString\n * @param {Number} [position= 0]\n *\n * @returns {boolean}\n */\nconst endsWith = (str, searchString, position) => {\n str = String(str);\n if (position === undefined || position > str.length) {\n position = str.length;\n }\n position -= searchString.length;\n const lastIndex = str.indexOf(searchString, position);\n return lastIndex !== -1 && lastIndex === position;\n};\n\n/**\n * Returns new array from array like object or null if failed\n *\n * @param {*} [thing]\n *\n * @returns {?Array}\n */\nconst toArray = (thing) => {\n if (!thing) return null;\n if (isArray(thing)) return thing;\n let i = thing.length;\n if (!Number.isSafeInteger(i) || i < 0 || i > 0xffffffff) return null;\n\n // Bound the copy by actual indexed properties, including hidden and inherited\n // members of array-like collections, rather than by the declared length alone.\n const indexes = new Set();\n const seen = new Set();\n let source = thing;\n\n while (source != null && indexes.size < i) {\n if (seen.has(source)) return null;\n seen.add(source);\n\n const prototype = getPrototypeOf(source);\n if (isPrototypeBoundary(source, prototype, source === thing)) break;\n\n Object.getOwnPropertyNames(source).forEach((key) => {\n const index = +key;\n if (\n Number.isInteger(index) &&\n index >= 0 &&\n index < i &&\n String(index) === key &&\n hasOwnProperty(source, key)\n ) {\n indexes.add(index);\n }\n });\n source = prototype;\n }\n\n if (indexes.size !== i) return null;\n const arr = new Array(i);\n while (i-- > 0) {\n arr[i] = thing[i];\n }\n return arr;\n};\n\n/**\n * Checking if the Uint8Array exists and if it does, it returns a function that checks if the\n * thing passed in is an instance of Uint8Array\n *\n * @param {TypedArray}\n *\n * @returns {Array}\n */\n// eslint-disable-next-line func-names\nconst isTypedArray = ((TypedArray) => {\n // eslint-disable-next-line func-names\n return (thing) => {\n return TypedArray && thing instanceof TypedArray;\n };\n})(typeof Uint8Array !== 'undefined' && getPrototypeOf(Uint8Array));\n\n/**\n * For each entry in the object, call the function with the key and value.\n *\n * @param {Object} obj - The object to iterate over.\n * @param {Function} fn - The function to call for each entry.\n *\n * @returns {void}\n */\nconst forEachEntry = (obj, fn) => {\n const generator = obj && obj[iterator];\n\n const _iterator = generator.call(obj);\n\n let result;\n\n while ((result = _iterator.next()) && !result.done) {\n const pair = result.value;\n fn.call(obj, pair[0], pair[1]);\n }\n};\n\n/**\n * It takes a regular expression and a string, and returns an array of all the matches\n *\n * @param {string} regExp - The regular expression to match against.\n * @param {string} str - The string to search.\n *\n * @returns {Array}\n */\nconst matchAll = (regExp, str) => {\n let matches;\n const arr = [];\n\n while ((matches = regExp.exec(str)) !== null) {\n arr.push(matches);\n }\n\n return arr;\n};\n\n/* Checking if the kindOfTest function returns true when passed an HTMLFormElement. */\nconst isHTMLForm = kindOfTest('HTMLFormElement');\n\nconst toCamelCase = (str) => {\n return str.toLowerCase().replace(/[-_\\s]([a-z\\d])(\\w*)/g, function replacer(m, p1, p2) {\n return p1.toUpperCase() + p2;\n });\n};\n\nconst { propertyIsEnumerable } = Object.prototype;\n\n/**\n * Determine if a value is a RegExp object\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a RegExp object, otherwise false\n */\nconst isRegExp = kindOfTest('RegExp');\n\nconst reduceDescriptors = (obj, reducer) => {\n const descriptors = Object.getOwnPropertyDescriptors(obj);\n const reducedDescriptors = {};\n\n forEach(descriptors, (descriptor, name) => {\n let ret;\n if ((ret = reducer(descriptor, name, obj)) !== false) {\n reducedDescriptors[name] = ret || descriptor;\n }\n });\n\n Object.defineProperties(obj, reducedDescriptors);\n};\n\n/**\n * Makes all methods read-only\n * @param {Object} obj\n */\n\nconst freezeMethods = (obj) => {\n reduceDescriptors(obj, (descriptor, name) => {\n // skip restricted props in strict mode\n if (isFunction(obj) && ['arguments', 'caller', 'callee'].includes(name)) {\n return false;\n }\n\n const value = obj[name];\n\n if (!isFunction(value)) return;\n\n descriptor.enumerable = false;\n\n if ('writable' in descriptor) {\n descriptor.writable = false;\n return;\n }\n\n if (!descriptor.set) {\n descriptor.set = () => {\n throw Error(\"Can not rewrite read-only method '\" + name + \"'\");\n };\n }\n });\n};\n\n/**\n * Converts an array or a delimited string into an object set with values as keys and true as values.\n * Useful for fast membership checks.\n *\n * @param {Array|string} arrayOrString - The array or string to convert.\n * @param {string} delimiter - The delimiter to use if input is a string.\n * @returns {Object} An object with keys from the array or string, values set to true.\n */\nconst toObjectSet = (arrayOrString, delimiter) => {\n const obj = {};\n\n const define = (arr) => {\n arr.forEach((value) => {\n obj[value] = true;\n });\n };\n\n isArray(arrayOrString) ? define(arrayOrString) : define(String(arrayOrString).split(delimiter));\n\n return obj;\n};\n\nconst noop = () => {};\n\nconst toFiniteNumber = (value, defaultValue) => {\n return value != null && Number.isFinite((value = +value)) ? value : defaultValue;\n};\n\n/**\n * If the thing is a FormData object, return true, otherwise return false.\n *\n * @param {unknown} thing - The thing to check.\n *\n * @returns {boolean}\n */\nfunction isSpecCompliantForm(thing) {\n return !!(\n thing &&\n isFunction(thing.append) &&\n thing[toStringTag] === 'FormData' &&\n thing[iterator]\n );\n}\n\n/**\n * Recursively converts an object to a JSON-compatible object, handling circular references and Buffers.\n *\n * @param {Object} obj - The object to convert.\n * @returns {Object} The JSON-compatible object.\n */\nconst toJSONObject = (obj) => {\n const visited = new WeakSet();\n\n const visit = (source) => {\n if (isObject(source)) {\n if (visited.has(source)) {\n return;\n }\n\n //Buffer check\n if (isBuffer(source)) {\n return source;\n }\n\n if (!('toJSON' in source)) {\n // add-on descent / delete-on-ascent: preserves path semantics, so DAG nodes serialise at every occurrence (see #7230).\n visited.add(source);\n\n let target;\n\n if (isSet(source)) {\n target = [];\n for (const value of source) {\n const reducedValue = visit(value);\n !isUndefined(reducedValue) && target.push(reducedValue);\n }\n } else {\n target = isArray(source) ? [] : {};\n\n forEach(source, (value, key) => {\n const reducedValue = visit(value);\n !isUndefined(reducedValue) && (target[key] = reducedValue);\n });\n }\n\n visited.delete(source);\n\n return target;\n }\n }\n\n return source;\n };\n\n return visit(obj);\n};\n\n/**\n * Determines if a value is an async function.\n *\n * @param {*} thing - The value to test.\n * @returns {boolean} True if value is an async function, otherwise false.\n */\nconst isAsyncFn = kindOfTest('AsyncFunction');\n\n/**\n * Determines if a value is thenable (has then and catch methods).\n *\n * @param {*} thing - The value to test.\n * @returns {boolean} True if value is thenable, otherwise false.\n */\nconst isThenable = (thing) =>\n thing &&\n (isObject(thing) || isFunction(thing)) &&\n isFunction(thing.then) &&\n isFunction(thing.catch);\n\n// original code\n// https://github.com/DigitalBrainJS/AxiosPromise/blob/16deab13710ec09779922131f3fa5954320f83ab/lib/utils.js#L11-L34\n\n/**\n * Provides a cross-platform setImmediate implementation.\n * Uses native setImmediate if available, otherwise falls back to postMessage or setTimeout.\n *\n * @param {boolean} setImmediateSupported - Whether setImmediate is supported.\n * @param {boolean} postMessageSupported - Whether postMessage is supported.\n * @returns {Function} A function to schedule a callback asynchronously.\n */\nconst _setImmediate = ((setImmediateSupported, postMessageSupported) => {\n if (setImmediateSupported) {\n return setImmediate;\n }\n\n return postMessageSupported\n ? ((token, callbacks) => {\n _global.addEventListener(\n 'message',\n ({ source, data }) => {\n if (source === _global && data === token) {\n callbacks.length && callbacks.shift()();\n }\n },\n false\n );\n\n return (cb) => {\n callbacks.push(cb);\n _global.postMessage(token, '*');\n };\n })(`axios@${Math.random()}`, [])\n : (cb) => setTimeout(cb);\n})(typeof setImmediate === 'function', isFunction(_global.postMessage));\n\n/**\n * Schedules a microtask or asynchronous callback as soon as possible.\n * Uses queueMicrotask if available, otherwise falls back to process.nextTick or _setImmediate.\n *\n * @type {Function}\n */\nconst asap =\n typeof queueMicrotask !== 'undefined'\n ? queueMicrotask.bind(_global)\n : (typeof process !== 'undefined' && process.nextTick) || _setImmediate;\n\n// *********************\n\nconst isIterable = (thing) => thing != null && isFunction(thing[iterator]);\n\n/**\n * Determine if a value is iterable via an iterator that is NOT sourced solely\n * from a polluted Object.prototype. Use this instead of `isIterable` whenever\n * the iterable comes from untrusted input (e.g. user-supplied header sources),\n * so `Object.prototype[Symbol.iterator] = ...` cannot turn an ordinary object\n * into an attacker-controlled entries iterator.\n *\n * @param {*} thing The value to test\n *\n * @returns {boolean} True if value has a non-polluted iterator\n */\nconst isSafeIterable = (thing) =>\n thing != null && hasOwnInPrototypeChain(thing, iterator) && isIterable(thing);\n\nexport default {\n isArray,\n isArrayBuffer,\n isBuffer,\n isFormData,\n isArrayBufferView,\n isString,\n isNumber,\n isBoolean,\n isObject,\n isPlainObject,\n isEmptyObject,\n isReadableStream,\n isRequest,\n isResponse,\n isHeaders,\n isUndefined,\n isDate,\n isFile,\n isReactNativeBlob,\n isReactNative,\n isBlob,\n isRegExp,\n isFunction,\n isStream,\n isURLSearchParams,\n isTypedArray,\n isFileList,\n forEach,\n merge,\n extend,\n trim,\n stripBOM,\n inherits,\n toFlatObject,\n kindOf,\n kindOfTest,\n endsWith,\n toArray,\n forEachEntry,\n matchAll,\n isHTMLForm,\n hasOwnProperty,\n hasOwnProp: hasOwnProperty, // an alias to avoid ESLint no-prototype-builtins detection\n hasOwnInPrototypeChain,\n getSafeProp,\n toSafeFlatObject,\n reduceDescriptors,\n freezeMethods,\n toObjectSet,\n toCamelCase,\n noop,\n toFiniteNumber,\n findKey,\n global: _global,\n isContextDefined,\n isSpecCompliantForm,\n toJSONObject,\n isAsyncFn,\n isThenable,\n setImmediate: _setImmediate,\n asap,\n isIterable,\n isSafeIterable,\n};\n","'use strict';\n\nimport utils from '../utils.js';\n\n// RawAxiosHeaders whose duplicates are ignored by node\n// c.f. https://nodejs.org/api/http.html#http_message_headers\nconst ignoreDuplicateOf = utils.toObjectSet([\n 'age',\n 'authorization',\n 'content-length',\n 'content-type',\n 'etag',\n 'expires',\n 'from',\n 'host',\n 'if-modified-since',\n 'if-unmodified-since',\n 'last-modified',\n 'location',\n 'max-forwards',\n 'proxy-authorization',\n 'referer',\n 'retry-after',\n 'user-agent',\n]);\n\n/**\n * Parse headers into an object\n *\n * ```\n * Date: Wed, 27 Aug 2014 08:58:49 GMT\n * Content-Type: application/json\n * Connection: keep-alive\n * Transfer-Encoding: chunked\n * ```\n *\n * @param {String} rawHeaders Headers needing to be parsed\n *\n * @returns {Object} Headers parsed into an object\n */\nexport default (rawHeaders) => {\n // Header names are data, including __proto__; avoid inherited setters.\n const parsed = Object.create(null);\n let key;\n let val;\n let i;\n\n rawHeaders &&\n rawHeaders.split('\\n').forEach(function parser(line) {\n i = line.indexOf(':');\n key = line.substring(0, i).trim().toLowerCase();\n val = line.substring(i + 1).trim();\n\n const hasKey = utils.hasOwnProp(parsed, key);\n\n if (!key || (hasKey && utils.hasOwnProp(ignoreDuplicateOf, key))) {\n return;\n }\n\n if (key === 'set-cookie') {\n if (hasKey) {\n parsed[key].push(val);\n } else {\n parsed[key] = [val];\n }\n } else {\n parsed[key] = hasKey ? parsed[key] + ', ' + val : val;\n }\n });\n\n return parsed;\n};\n","'use strict';\n\nimport utils from '../utils.js';\n\nfunction trimSPorHTAB(str) {\n let start = 0;\n let end = str.length;\n\n while (start < end) {\n const code = str.charCodeAt(start);\n\n if (code !== 0x09 && code !== 0x20) {\n break;\n }\n\n start += 1;\n }\n\n while (end > start) {\n const code = str.charCodeAt(end - 1);\n\n if (code !== 0x09 && code !== 0x20) {\n break;\n }\n\n end -= 1;\n }\n\n return start === 0 && end === str.length ? str : str.slice(start, end);\n}\n\n// The control-code ranges are intentional: header sanitization strips C0/DEL bytes.\n// eslint-disable-next-line no-control-regex\nconst INVALID_UNICODE_HEADER_VALUE_CHARS = new RegExp('[\\\\u0000-\\\\u0008\\\\u000a-\\\\u001f\\\\u007f]+', 'g');\n// eslint-disable-next-line no-control-regex\nconst INVALID_BYTE_STRING_HEADER_VALUE_CHARS = new RegExp('[^\\\\u0009\\\\u0020-\\\\u007e\\\\u0080-\\\\u00ff]+', 'g');\n\nfunction sanitizeValue(value, invalidChars) {\n if (utils.isArray(value)) {\n return value.map((item) => sanitizeValue(item, invalidChars));\n }\n\n return trimSPorHTAB(String(value).replace(invalidChars, ''));\n}\n\nexport const sanitizeHeaderValue = (value) =>\n sanitizeValue(value, INVALID_UNICODE_HEADER_VALUE_CHARS);\n\nexport const sanitizeByteStringHeaderValue = (value) =>\n sanitizeValue(value, INVALID_BYTE_STRING_HEADER_VALUE_CHARS);\n\nexport function toByteStringHeaderObject(headers) {\n const byteStringHeaders = Object.create(null);\n\n utils.forEach(headers.toJSON(), (value, header) => {\n byteStringHeaders[header] = sanitizeByteStringHeaderValue(value);\n });\n\n return byteStringHeaders;\n}\n","'use strict';\n\nimport utils from '../utils.js';\nimport parseHeaders from '../helpers/parseHeaders.js';\nimport { sanitizeHeaderValue } from '../helpers/sanitizeHeaderValue.js';\n\nconst $internals = Symbol('internals');\n\nfunction normalizeHeader(header) {\n return header && String(header).trim().toLowerCase();\n}\n\nfunction normalizeValue(value) {\n if (value === false || value == null) {\n return value;\n }\n\n return utils.isArray(value) ? value.map(normalizeValue) : sanitizeHeaderValue(String(value));\n}\n\nfunction parseTokens(str) {\n const tokens = Object.create(null);\n const tokensRE = /([^\\s,;=]+)\\s*(?:=\\s*([^,;]+))?/g;\n let match;\n\n while ((match = tokensRE.exec(str))) {\n tokens[match[1]] = match[2];\n }\n\n return tokens;\n}\n\nconst parameterNameRE = /^[!#$%&'*+\\-.^_`|~0-9A-Za-z]+$/;\n\nfunction trimOWS(value) {\n let start = 0;\n let end = value.length;\n\n while (start < end) {\n const code = value.charCodeAt(start);\n\n if (code !== 0x09 && code !== 0x20) {\n break;\n }\n\n start += 1;\n }\n\n while (end > start) {\n const code = value.charCodeAt(end - 1);\n\n if (code !== 0x09 && code !== 0x20) {\n break;\n }\n\n end -= 1;\n }\n\n return start === 0 && end === value.length ? value : value.slice(start, end);\n}\n\nfunction decodeQuotedString(value) {\n const last = value.length - 1;\n\n if (last < 1 || value.charCodeAt(0) !== 0x22 || value.charCodeAt(last) !== 0x22) {\n return value;\n }\n\n let decoded = '';\n\n for (let i = 1; i < last; i++) {\n const code = value.charCodeAt(i);\n\n if (code === 0x22) {\n return value;\n }\n\n if (code === 0x5c) {\n i += 1;\n\n if (i >= last) {\n return value;\n }\n }\n\n decoded += value[i];\n }\n\n return decoded;\n}\n\nfunction parseParameters(value) {\n const parameters = Object.create(null);\n const str = String(value);\n let start = 0;\n let quoted = false;\n let escaped = false;\n\n function parseParameter(end) {\n const part = trimOWS(str.slice(start, end));\n const equals = part.indexOf('=');\n\n if (equals < 1) {\n return;\n }\n\n const name = trimOWS(part.slice(0, equals));\n\n if (!parameterNameRE.test(name)) {\n return;\n }\n\n const normalizedName = name.toLowerCase();\n\n if (\n normalizedName === '__proto__' ||\n normalizedName === 'constructor' ||\n normalizedName === 'prototype'\n ) {\n return;\n }\n\n const parameterValue = trimOWS(part.slice(equals + 1));\n parameters[normalizedName] = decodeQuotedString(parameterValue);\n }\n\n for (let i = 0; i < str.length; i++) {\n const code = str.charCodeAt(i);\n\n if (quoted) {\n if (escaped) {\n escaped = false;\n } else if (code === 0x5c) {\n escaped = true;\n } else if (code === 0x22) {\n quoted = false;\n }\n } else if (code === 0x22) {\n quoted = true;\n } else if (code === 0x2c || code === 0x3b) {\n parseParameter(i);\n start = i + 1;\n }\n }\n\n parseParameter(str.length);\n\n return parameters;\n}\n\nconst isValidHeaderName = (str) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim());\n\n// `__proto__` is a valid field name, and the one name the uppercase mapping at\n// the bottom of this file cannot reach: it is inherited from Object.prototype\n// instead of being declared on AxiosHeaders.prototype, so `self.__proto__ = v`\n// runs the inherited setter. That silently discards the header, and an array\n// value replaces the instance prototype, taking every method with it.\n// Store it under the same kind of case variant that mapping uses for `set` and\n// `constructor`. Header lookup is caseless, so it reads back under either\n// spelling, and no own `__proto__` slot is ever created for a later\n// `Object.assign` to copy onto a plain object through the same setter.\nconst PROTO_HEADER_SLOT = '__Proto__';\n\nconst headerSlot = (name) => (name === '__proto__' ? PROTO_HEADER_SLOT : name);\n\nfunction matchHeaderValue(context, value, header, filter, isHeaderNameFilter) {\n if (utils.isFunction(filter)) {\n return filter.call(context, value, header);\n }\n\n if (isHeaderNameFilter) {\n value = header;\n }\n\n if (!utils.isString(value)) return;\n\n if (utils.isString(filter)) {\n return value.indexOf(filter) !== -1;\n }\n\n if (utils.isRegExp(filter)) {\n return filter.test(value);\n }\n}\n\nfunction formatHeader(header) {\n return header\n .trim()\n .toLowerCase()\n .replace(/([a-z\\d])(\\w*)/g, (w, char, str) => {\n return char.toUpperCase() + str;\n });\n}\n\nfunction buildAccessors(obj, header) {\n const accessorName = utils.toCamelCase(' ' + header);\n\n ['get', 'set', 'has'].forEach((methodName) => {\n Object.defineProperty(obj, methodName + accessorName, {\n // Null-proto descriptor so a polluted Object.prototype.get cannot turn\n // this data descriptor into an accessor descriptor on the way in.\n __proto__: null,\n value: function (arg1, arg2, arg3) {\n return this[methodName].call(this, header, arg1, arg2, arg3);\n },\n configurable: true,\n });\n });\n}\n\nclass AxiosHeaders {\n constructor(headers) {\n headers && this.set(headers);\n }\n\n set(header, valueOrRewrite, rewrite) {\n const self = this;\n\n function setHeader(_value, _header, _rewrite) {\n const lHeader = normalizeHeader(_header);\n\n if (!lHeader) {\n return;\n }\n\n const key = utils.findKey(self, lHeader);\n\n if (\n !key ||\n self[key] === undefined ||\n _rewrite === true ||\n (_rewrite === undefined && self[key] !== false)\n ) {\n self[headerSlot(key || _header)] = normalizeValue(_value);\n }\n }\n\n const setHeaders = (headers, _rewrite) =>\n utils.forEach(headers, (_value, _header) => setHeader(_value, _header, _rewrite));\n\n if (utils.isPlainObject(header) || header instanceof this.constructor) {\n setHeaders(header, valueOrRewrite);\n } else if (utils.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {\n setHeaders(parseHeaders(header), valueOrRewrite);\n } else if (utils.isObject(header) && utils.isSafeIterable(header)) {\n let obj = Object.create(null),\n dest,\n key;\n for (const entry of header) {\n if (!utils.isArray(entry)) {\n throw new TypeError('Object iterator must return a key-value pair');\n }\n\n key = entry[0];\n\n if (utils.hasOwnProp(obj, key)) {\n dest = obj[key];\n obj[key] = utils.isArray(dest) ? [...dest, entry[1]] : [dest, entry[1]];\n } else {\n obj[key] = entry[1];\n }\n }\n\n setHeaders(obj, valueOrRewrite);\n } else {\n header != null && setHeader(valueOrRewrite, header, rewrite);\n }\n\n return this;\n }\n\n get(header, parser) {\n header = normalizeHeader(header);\n\n if (header) {\n const key = utils.findKey(this, header);\n\n if (key) {\n const value = this[key];\n\n if (!parser) {\n return value;\n }\n\n if (parser === true) {\n return parseTokens(value);\n }\n\n if (utils.isFunction(parser)) {\n return parser.call(this, value, key);\n }\n\n if (utils.isRegExp(parser)) {\n return parser.exec(value);\n }\n\n throw new TypeError('parser must be boolean|regexp|function');\n }\n }\n }\n\n has(header, matcher) {\n header = normalizeHeader(header);\n\n if (header) {\n const key = utils.findKey(this, header);\n\n return !!(\n key &&\n this[key] !== undefined &&\n (!matcher || matchHeaderValue(this, this[key], key, matcher))\n );\n }\n\n return false;\n }\n\n delete(header, matcher) {\n const self = this;\n let deleted = false;\n\n function deleteHeader(_header) {\n _header = normalizeHeader(_header);\n\n if (_header) {\n const key = utils.findKey(self, _header);\n\n if (key && (!matcher || matchHeaderValue(self, self[key], key, matcher))) {\n delete self[key];\n\n deleted = true;\n }\n }\n }\n\n if (utils.isArray(header)) {\n header.forEach(deleteHeader);\n } else {\n deleteHeader(header);\n }\n\n return deleted;\n }\n\n clear(matcher) {\n const keys = Object.keys(this);\n let i = keys.length;\n let deleted = false;\n\n while (i--) {\n const key = keys[i];\n if (!matcher || matchHeaderValue(this, this[key], key, matcher, true)) {\n delete this[key];\n deleted = true;\n }\n }\n\n return deleted;\n }\n\n normalize(format) {\n const self = this;\n const headers = Object.create(null);\n\n utils.forEach(this, (value, header) => {\n const key = utils.findKey(headers, header);\n\n if (key) {\n self[key] = normalizeValue(value);\n delete self[header];\n return;\n }\n\n const normalized = headerSlot(format ? formatHeader(header) : String(header).trim());\n\n if (normalized !== header) {\n delete self[header];\n }\n\n self[normalized] = normalizeValue(value);\n\n headers[normalized] = true;\n });\n\n return this;\n }\n\n concat(...targets) {\n return this.constructor.concat(this, ...targets);\n }\n\n toJSON(asStrings) {\n const obj = Object.create(null);\n\n utils.forEach(this, (value, header) => {\n value != null &&\n value !== false &&\n (obj[header] = asStrings && utils.isArray(value) ? value.join(', ') : value);\n });\n\n return obj;\n }\n\n [Symbol.iterator]() {\n return Object.entries(this.toJSON())[Symbol.iterator]();\n }\n\n toString() {\n return Object.entries(this.toJSON())\n .map(([header, value]) => header + ': ' + value)\n .join('\\n');\n }\n\n getSetCookie() {\n const value = this.get('set-cookie');\n return utils.isArray(value) ? value : value == null || value === false ? [] : [value];\n }\n\n get [Symbol.toStringTag]() {\n return 'AxiosHeaders';\n }\n\n static from(thing) {\n return thing instanceof this ? thing : new this(thing);\n }\n\n static parseParameters(value) {\n return parseParameters(value);\n }\n\n static concat(first, ...targets) {\n const computed = new this(first);\n\n targets.forEach((target) => computed.set(target));\n\n return computed;\n }\n\n static accessor(header) {\n const internals =\n (this[$internals] =\n this[$internals] =\n {\n accessors: {},\n });\n\n const accessors = internals.accessors;\n const prototype = this.prototype;\n\n function defineAccessor(_header) {\n const lHeader = normalizeHeader(_header);\n\n if (!accessors[lHeader]) {\n buildAccessors(prototype, _header);\n accessors[lHeader] = true;\n }\n }\n\n utils.isArray(header) ? header.forEach(defineAccessor) : defineAccessor(header);\n\n return this;\n }\n}\n\nAxiosHeaders.accessor([\n 'Content-Type',\n 'Content-Length',\n 'Accept',\n 'Accept-Encoding',\n 'User-Agent',\n 'Authorization',\n]);\n\n// reserved names hotfix\nutils.reduceDescriptors(AxiosHeaders.prototype, ({ value }, key) => {\n let mapped = key[0].toUpperCase() + key.slice(1); // map `set` => `Set`\n return {\n get: () => value,\n set(headerValue) {\n this[mapped] = headerValue;\n },\n };\n});\n\nutils.freezeMethods(AxiosHeaders);\n\nexport default AxiosHeaders;\n","'use strict';\n\nimport utils from '../utils.js';\nimport AxiosHeaders from './AxiosHeaders.js';\n\nexport const REDACTED = '[REDACTED ****]';\n\nfunction hasOwnOrPrototypeToJSON(source) {\n if (utils.hasOwnProp(source, 'toJSON')) {\n return true;\n }\n\n let prototype = Object.getPrototypeOf(source);\n\n while (prototype && prototype !== Object.prototype) {\n if (utils.hasOwnProp(prototype, 'toJSON')) {\n return true;\n }\n\n prototype = Object.getPrototypeOf(prototype);\n }\n\n return false;\n}\n\n// Build a plain-object snapshot of `config` and replace the value of any key\n// (case-insensitive) listed in `redactKeys` with REDACTED. Walks through arrays\n// and AxiosHeaders, and short-circuits on circular references.\nfunction redactConfig(config, redactKeys) {\n const lowerKeys = new Set(redactKeys.map((k) => String(k).toLowerCase()));\n const seen = [];\n\n const visit = (source) => {\n if (source === null || typeof source !== 'object') return source;\n if (utils.isBuffer(source)) return source;\n if (seen.indexOf(source) !== -1) return undefined;\n\n if (source instanceof AxiosHeaders) {\n source = source.toJSON();\n }\n\n seen.push(source);\n\n let result;\n if (utils.isArray(source)) {\n result = [];\n source.forEach((v, i) => {\n const reducedValue = visit(v);\n if (!utils.isUndefined(reducedValue)) {\n result[i] = reducedValue;\n }\n });\n } else {\n if (!utils.isPlainObject(source) && hasOwnOrPrototypeToJSON(source)) {\n seen.pop();\n return source;\n }\n\n result = Object.create(null);\n for (const [key, value] of Object.entries(source)) {\n const reducedValue = lowerKeys.has(key.toLowerCase()) ? REDACTED : visit(value);\n if (!utils.isUndefined(reducedValue)) {\n result[key] = reducedValue;\n }\n }\n }\n\n seen.pop();\n return result;\n };\n\n return visit(config);\n}\n\nfunction stringifySafely(value) {\n try {\n return String(value);\n } catch (err) {\n return '';\n }\n}\n\nfunction aggregateErrorMessage(error) {\n const message = error.errors\n .map((entry) => {\n try {\n return entry && entry.message ? stringifySafely(entry.message) : stringifySafely(entry);\n } catch (err) {\n return '';\n }\n })\n .filter(Boolean)\n .join('; ');\n\n return message || error.name || 'AggregateError';\n}\n\n// Shared with `Axios.prototype.request`, which splices the reconstructed\n// caller frames in ahead of this marker.\nexport const CAUSED_BY_SEPARATOR = '\\nCaused by: ';\nconst $causeStack = Symbol('causeStack');\n\n// Match the section we appended, not marker-like text in an error message or\n// a replacement stack supplied by the caller. Do not re-read the cause's stack.\nexport function getCauseStackIndex(error, stack) {\n const causeStack = utils.hasOwnProp(error, $causeStack) && error[$causeStack];\n\n return causeStack && stack.endsWith(causeStack) ? stack.length - causeStack.length : -1;\n}\n\n/**\n * Append the stack of a wrapped error to `target.stack`.\n *\n * `cause` already exposes the original error for tooling that walks the standard\n * cause chain, but many error reporters read `stack` and nothing else. Inlining\n * the wrapped stack there means those reporters surface the underlying failure\n * instead of the axios frames that normalized it (see #6670).\n *\n * Every read is defensive: a custom `Error.prepareStackTrace` hook, a runtime\n * without stack support, or a replaced `stack` property can leave the value\n * missing, non-string, or read-only, and normalizing an error must not throw\n * because of that.\n *\n * @param {Error} target The AxiosError being built.\n * @param {Error} source The error being wrapped.\n *\n * @returns {void}\n */\nfunction appendCauseStack(target, source) {\n try {\n const sourceStack = source && source.stack;\n\n if (typeof sourceStack !== 'string' || !sourceStack) {\n return;\n }\n\n const targetStack = target.stack;\n\n if (typeof targetStack !== 'string' || !targetStack) {\n return;\n }\n\n // Each call to `from()` creates a fresh target. Re-wrapping includes the\n // previous stack verbatim, adding one cause section per wrap.\n const causeStack = CAUSED_BY_SEPARATOR + sourceStack;\n target.stack = targetStack + causeStack;\n Object.defineProperty(target, $causeStack, { __proto__: null, value: causeStack });\n } catch (e) {\n // Ignore failures from custom stack hooks or un-writable stack properties.\n }\n}\n\nclass AxiosError extends Error {\n static from(error, code, config, request, response, customProps) {\n // `AggregateError` (thrown by Node on dual-stack/Happy-Eyeballs connection\n // failures) has an empty `message`; its detail lives in `errors[]`. Without\n // this, the wrapped error surfaces with a blank message (see #6721).\n let message = error.message;\n if (!message && utils.isArray(error.errors) && error.errors.length) {\n message = aggregateErrorMessage(error);\n }\n\n const axiosError = new AxiosError(message, code || error.code, config, request, response);\n // Match native `Error` `cause` semantics: non-enumerable. The wrapped\n // error often carries circular internals (sockets, requests, agents), so\n // an enumerable `cause` makes structured loggers (pino/winston) and any\n // own-property walk throw \"Converting circular structure to JSON\".\n // Regression from #6982; see #7205. `__proto__: null` mirrors the\n // `message` descriptor below (prototype-pollution-safe descriptor).\n Object.defineProperty(axiosError, 'cause', {\n __proto__: null,\n value: error,\n writable: true,\n enumerable: false,\n configurable: true,\n });\n axiosError.name = error.name;\n\n // Inline the wrapped stack for reporters that read only `stack`; the `cause`\n // property above already covers cause-aware tooling.\n appendCauseStack(axiosError, error);\n\n // Preserve status from the original error if not already set from response\n if (error.status != null && axiosError.status == null) {\n axiosError.status = error.status;\n }\n\n customProps && Object.assign(axiosError, customProps);\n return axiosError;\n }\n\n /**\n * Create an Error with the specified message, config, error code, request and response.\n *\n * @param {string} message The error message.\n * @param {string} [code] The error code (for example, 'ECONNABORTED').\n * @param {Object} [config] The config.\n * @param {Object} [request] The request.\n * @param {Object} [response] The response.\n *\n * @returns {Error} The created error.\n */\n constructor(message, code, config, request, response) {\n super(message);\n\n // Make message enumerable to maintain backward compatibility\n // The native Error constructor sets message as non-enumerable,\n // but axios < v1.13.3 had it as enumerable\n Object.defineProperty(this, 'message', {\n // Null-proto descriptor so a polluted Object.prototype.get cannot turn\n // this data descriptor into an accessor descriptor on the way in.\n __proto__: null,\n value: message,\n enumerable: true,\n writable: true,\n configurable: true,\n });\n\n this.name = 'AxiosError';\n this.isAxiosError = true;\n code && (this.code = code);\n config && (this.config = config);\n request && (this.request = request);\n if (response) {\n this.response = response;\n this.status = response.status;\n }\n }\n\n toJSON() {\n // Opt-in redaction: when the request config carries a `redact` array, the\n // value of any matching key (case-insensitive, at any depth) is replaced\n // with REDACTED in the serialized snapshot. Undefined or empty leaves the\n // existing serialization behavior unchanged.\n const config = this.config;\n const redactKeys = config && utils.hasOwnProp(config, 'redact') ? config.redact : undefined;\n const serializedConfig =\n utils.isArray(redactKeys) && redactKeys.length > 0\n ? redactConfig(config, redactKeys)\n : utils.toJSONObject(config);\n\n return {\n // Standard\n message: this.message,\n name: this.name,\n // Microsoft\n description: this.description,\n number: this.number,\n // Mozilla\n fileName: this.fileName,\n lineNumber: this.lineNumber,\n columnNumber: this.columnNumber,\n stack: this.stack,\n // Axios\n config: serializedConfig,\n code: this.code,\n status: this.status,\n };\n }\n}\n\n// This can be changed to static properties as soon as the parser options in .eslint.cjs are updated.\nAxiosError.ERR_BAD_OPTION_VALUE = 'ERR_BAD_OPTION_VALUE';\nAxiosError.ERR_BAD_OPTION = 'ERR_BAD_OPTION';\nAxiosError.ECONNABORTED = 'ECONNABORTED';\nAxiosError.ETIMEDOUT = 'ETIMEDOUT';\nAxiosError.ECONNREFUSED = 'ECONNREFUSED';\nAxiosError.ERR_NETWORK = 'ERR_NETWORK';\nAxiosError.ERR_FR_TOO_MANY_REDIRECTS = 'ERR_FR_TOO_MANY_REDIRECTS';\nAxiosError.ERR_DEPRECATED = 'ERR_DEPRECATED';\nAxiosError.ERR_BAD_RESPONSE = 'ERR_BAD_RESPONSE';\nAxiosError.ERR_BAD_REQUEST = 'ERR_BAD_REQUEST';\nAxiosError.ERR_CANCELED = 'ERR_CANCELED';\nAxiosError.ERR_NOT_SUPPORT = 'ERR_NOT_SUPPORT';\nAxiosError.ERR_INVALID_URL = 'ERR_INVALID_URL';\nAxiosError.ERR_FORM_DATA_DEPTH_EXCEEDED = 'ERR_FORM_DATA_DEPTH_EXCEEDED';\n\nexport default AxiosError;\n","'use strict';\n\nimport utils from '../utils.js';\nimport AxiosError from '../core/AxiosError.js';\n// temporary hotfix to avoid circular references until AxiosURLSearchParams is refactored\nimport PlatformFormData from '../platform/node/classes/FormData.js';\nimport PlatformBuffer from '../platform/node/classes/Buffer.js';\n\n// Default nesting limit shared with the inverse transform (formDataToJSON) so\n// the FormData <-> JSON round-trip stays symmetric.\nexport const DEFAULT_FORM_DATA_MAX_DEPTH = 100;\n\n/**\n * Determines if the given thing is a array or js object.\n *\n * @param {string} thing - The object or array to be visited.\n *\n * @returns {boolean}\n */\nfunction isVisitable(thing) {\n return utils.isPlainObject(thing) || utils.isArray(thing);\n}\n\n/**\n * It removes the brackets from the end of a string\n *\n * @param {string} key - The key of the parameter.\n *\n * @returns {string} the key without the brackets.\n */\nfunction removeBrackets(key) {\n return utils.endsWith(key, '[]') ? key.slice(0, -2) : key;\n}\n\n/**\n * It takes a path, a key, and a boolean, and returns a string\n *\n * @param {string} path - The path to the current key.\n * @param {string} key - The key of the current object being iterated over.\n * @param {string} dots - If true, the key will be rendered with dots instead of brackets.\n *\n * @returns {string} The path to the current key.\n */\nfunction renderKey(path, key, dots) {\n if (!path) return key;\n return path\n .concat(key)\n .map(function each(token, i) {\n // eslint-disable-next-line no-param-reassign\n token = removeBrackets(token);\n return !dots && i ? '[' + token + ']' : token;\n })\n .join(dots ? '.' : '');\n}\n\n/**\n * If the array is an array and none of its elements are visitable, then it's a flat array.\n *\n * @param {Array} arr - The array to check\n *\n * @returns {boolean}\n */\nfunction isFlatArray(arr) {\n return utils.isArray(arr) && !arr.some(isVisitable);\n}\n\nconst predicates = utils.toFlatObject(utils, {}, null, function filter(prop) {\n return /^is[A-Z]/.test(prop);\n});\n\n/**\n * Convert a data object to FormData\n *\n * @param {Object} obj\n * @param {?Object} [formData]\n * @param {?Object} [options]\n * @param {Function} [options.visitor]\n * @param {Boolean} [options.metaTokens = true]\n * @param {Boolean} [options.dots = false]\n * @param {?Boolean} [options.indexes = false]\n *\n * @returns {Object}\n **/\n\n/**\n * It converts an object into a FormData object\n *\n * @param {Object} obj - The object to convert to form data.\n * @param {string} formData - The FormData object to append to.\n * @param {Object} options\n *\n * @returns\n */\nfunction toFormData(obj, formData, options) {\n if (!utils.isObject(obj)) {\n throw new TypeError('target must be an object');\n }\n\n // eslint-disable-next-line no-param-reassign\n formData = formData || new (PlatformFormData || FormData)();\n\n const option = (name, fallback) => {\n const value = utils.getSafeProp(options, name);\n return utils.isUndefined(value) ? fallback : value;\n };\n\n const metaTokens = option('metaTokens', true);\n // eslint-disable-next-line no-use-before-define\n const visitor = option('visitor') || defaultVisitor;\n const dots = option('dots', false);\n const indexes = option('indexes', false);\n const _Blob = option('Blob') || (typeof Blob !== 'undefined' && Blob);\n const maxDepth = option('maxDepth', DEFAULT_FORM_DATA_MAX_DEPTH);\n const useBlob = _Blob && utils.isSpecCompliantForm(formData);\n const stack = [];\n\n if (!utils.isFunction(visitor)) {\n throw new TypeError('visitor must be a function');\n }\n\n function convertValue(value) {\n if (value === null) return '';\n\n if (utils.isDate(value)) {\n return value.toISOString();\n }\n\n if (utils.isBoolean(value)) {\n return value.toString();\n }\n\n if (!useBlob && utils.isBlob(value)) {\n throw new AxiosError('Blob is not supported. Use a Buffer instead.');\n }\n\n if (utils.isArrayBuffer(value) || utils.isTypedArray(value)) {\n if (useBlob && typeof _Blob === 'function') {\n return new _Blob([value]);\n }\n if (PlatformBuffer && PlatformBuffer.isBufferAvailable()) {\n return PlatformBuffer.from(value);\n }\n throw new AxiosError(\n 'Blob is not supported. Use a Buffer instead.',\n AxiosError.ERR_NOT_SUPPORT\n );\n }\n\n return value;\n }\n\n function throwIfMaxDepthExceeded(depth) {\n if (depth > maxDepth) {\n throw new AxiosError(\n 'Object is too deeply nested (' + depth + ' levels). Max depth: ' + maxDepth,\n AxiosError.ERR_FORM_DATA_DEPTH_EXCEEDED\n );\n }\n }\n\n function stringifyWithDepthLimit(value, depth) {\n if (maxDepth === Infinity) {\n return JSON.stringify(value);\n }\n\n const ancestors = [];\n\n return JSON.stringify(value, function limitDepth(_key, currentValue) {\n if (!utils.isObject(currentValue)) {\n return currentValue;\n }\n\n while (ancestors.length && ancestors[ancestors.length - 1] !== this) {\n ancestors.pop();\n }\n\n ancestors.push(currentValue);\n throwIfMaxDepthExceeded(depth + ancestors.length - 1);\n\n return currentValue;\n });\n }\n\n /**\n * Default visitor.\n *\n * @param {*} value\n * @param {String|Number} key\n * @param {Array} path\n * @this {FormData}\n *\n * @returns {boolean} return true to visit the each prop of the value recursively\n */\n function defaultVisitor(value, key, path) {\n let arr = value;\n\n if (utils.isReactNative(formData) && utils.isReactNativeBlob(value)) {\n formData.append(renderKey(path, key, dots), convertValue(value));\n return false;\n }\n\n if (value && !path && typeof value === 'object') {\n if (utils.endsWith(key, '{}')) {\n // eslint-disable-next-line no-param-reassign\n key = metaTokens ? key : key.slice(0, -2);\n // eslint-disable-next-line no-param-reassign\n value = stringifyWithDepthLimit(value, 1);\n } else if (\n (utils.isArray(value) && isFlatArray(value)) ||\n ((utils.isFileList(value) || utils.endsWith(key, '[]')) && (arr = utils.toArray(value)))\n ) {\n // eslint-disable-next-line no-param-reassign\n key = removeBrackets(key);\n\n arr.forEach(function each(el, index) {\n !(utils.isUndefined(el) || el === null) &&\n formData.append(\n // eslint-disable-next-line no-nested-ternary\n indexes === true\n ? renderKey([key], index, dots)\n : indexes === null\n ? key\n : key + '[]',\n convertValue(el)\n );\n });\n return false;\n }\n }\n\n if (isVisitable(value)) {\n return true;\n }\n\n formData.append(renderKey(path, key, dots), convertValue(value));\n\n return false;\n }\n\n const exposedHelpers = Object.assign(predicates, {\n defaultVisitor,\n convertValue,\n isVisitable,\n });\n\n function build(value, path, depth = 0) {\n if (utils.isUndefined(value)) return;\n\n throwIfMaxDepthExceeded(depth);\n\n if (stack.indexOf(value) !== -1) {\n throw new Error('Circular reference detected in ' + path.join('.'));\n }\n\n stack.push(value);\n\n utils.forEach(value, function each(el, key) {\n const result =\n !(utils.isUndefined(el) || el === null) &&\n visitor.call(formData, el, utils.isString(key) ? key.trim() : key, path, exposedHelpers);\n\n if (result === true) {\n build(el, path ? path.concat(key) : [key], depth + 1);\n }\n });\n\n stack.pop();\n }\n\n if (!utils.isObject(obj)) {\n throw new TypeError('data must be an object');\n }\n\n build(obj);\n\n return formData;\n}\n\nexport default toFormData;\n","'use strict';\n\nimport toFormData from './toFormData.js';\n\n/**\n * It encodes a string by replacing all characters that are not in the unreserved set with\n * their percent-encoded equivalents\n *\n * @param {string} str - The string to encode.\n *\n * @returns {string} The encoded string.\n */\nfunction encode(str) {\n const charMap = {\n '!': '%21',\n \"'\": '%27',\n '(': '%28',\n ')': '%29',\n '~': '%7E',\n '%20': '+',\n };\n return encodeURIComponent(str).replace(/[!'()~]|%20/g, function replacer(match) {\n return charMap[match];\n });\n}\n\n/**\n * It takes a params object and converts it to a FormData object\n *\n * @param {Object} params - The parameters to be converted to a FormData object.\n * @param {Object} options - The options object passed to the Axios constructor.\n *\n * @returns {void}\n */\nfunction AxiosURLSearchParams(params, options) {\n this._pairs = [];\n\n params && toFormData(params, this, options);\n}\n\nconst prototype = AxiosURLSearchParams.prototype;\n\nprototype.append = function append(name, value) {\n this._pairs.push([name, value]);\n};\n\nprototype.toString = function toString(encoder) {\n const _encode = encoder\n ? (value) => encoder.call(this, value, encode)\n : encode;\n\n return this._pairs\n .map(function each(pair) {\n return _encode(pair[0]) + '=' + _encode(pair[1]);\n }, '')\n .join('&');\n};\n\nexport default AxiosURLSearchParams;\n","'use strict';\n\nimport utils from '../utils.js';\nimport AxiosURLSearchParams from './AxiosURLSearchParams.js';\n\n/**\n * It replaces URL-encoded forms of `:`, `$`, `,`, and spaces with\n * their plain counterparts (`:`, `$`, `,`, `+`).\n *\n * @param {string} val The value to be encoded.\n *\n * @returns {string} The encoded value.\n */\nexport function encode(val) {\n return encodeURIComponent(val)\n .replace(/%3A/gi, ':')\n .replace(/%24/g, '$')\n .replace(/%2C/gi, ',')\n .replace(/%20/g, '+');\n}\n\n/**\n * Build a URL by appending params to the end\n *\n * @param {string} url The base of the url (e.g., http://www.google.com)\n * @param {object} [params] The params to be appended\n * @param {?(object|Function)} options\n *\n * @returns {string} The formatted url\n */\nexport default function buildURL(url, params, options) {\n if (!params) {\n return url;\n }\n url = url || '';\n\n const _options = utils.isFunction(options)\n ? {\n serialize: options,\n }\n : options;\n\n // Read serializer options pollution-safely: own properties and methods on a\n // class/template prototype are honored, but values injected onto a polluted\n // Object.prototype are ignored.\n const _encode = utils.getSafeProp(_options, 'encode') || encode;\n const serializeFn = utils.getSafeProp(_options, 'serialize');\n\n let serializedParams;\n\n if (serializeFn) {\n serializedParams = serializeFn(params, _options);\n } else {\n serializedParams = utils.isURLSearchParams(params)\n ? params.toString()\n : new AxiosURLSearchParams(params, _options).toString(_encode);\n }\n\n if (serializedParams) {\n const hashmarkIndex = url.indexOf('#');\n\n if (hashmarkIndex !== -1) {\n url = url.slice(0, hashmarkIndex);\n }\n url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;\n }\n\n return url;\n}\n","'use strict';\n\nimport utils from '../utils.js';\n\nconst $internals = Symbol('internals');\n\n// `handlers` is public and may be replaced with a nullish value by user code;\n// `clear()` has always tolerated that. Treat it as an empty stack rather than\n// dereferencing it.\nfunction countHandlers(handlers) {\n return handlers ? handlers.length : 0;\n}\n\nfunction trimHandlers(handlers) {\n if (!handlers) {\n return;\n }\n\n while (handlers.length && handlers[handlers.length - 1] === null) {\n handlers.pop();\n }\n}\n\n// Preserve the array-key coercion used before IDs were stored in a Map, without\n// treating null, empty strings, or noncanonical numeric strings as ID zero.\nfunction normalizeHandlerId(id) {\n if (typeof id === 'string' && id !== '' && String(Number(id)) === id) {\n return Number(id);\n }\n\n return id;\n}\n\nfunction syncHandlerEntries(manager, internals) {\n const handlers = manager.handlers;\n const length = countHandlers(handlers);\n\n if (handlers !== internals.handlersRef) {\n internals.handlersRef = handlers;\n internals.handlerEntries.clear();\n } else if (length !== internals.handlersLength) {\n if (!length) {\n internals.handlerEntries.clear();\n } else {\n internals.handlerEntries.forEach(function removeStaleEntry(entry, id) {\n if (handlers[entry.index] !== entry.handler) {\n internals.handlerEntries.delete(id);\n }\n });\n }\n }\n\n internals.handlersLength = length;\n}\n\nclass InterceptorManager {\n constructor() {\n this.handlers = [];\n this[$internals] = {\n handlersRef: this.handlers,\n handlersLength: this.handlers.length,\n handlerEntries: new Map(),\n iterationDepth: 0,\n nextId: 0,\n };\n }\n\n /**\n * Add a new interceptor to the stack\n *\n * @param {Function} fulfilled The function to handle `then` for a `Promise`\n * @param {Function} rejected The function to handle `reject` for a `Promise`\n * @param {Object} options The options for the interceptor, synchronous and runWhen\n *\n * @return {Number} An ID used to remove interceptor later\n */\n use(fulfilled, rejected, options) {\n const handler = {\n fulfilled,\n rejected,\n synchronous: options ? options.synchronous : false,\n runWhen: options ? options.runWhen : null,\n };\n const internals = this[$internals];\n\n if (this.handlers == null) {\n this.handlers = [];\n }\n\n syncHandlerEntries(this, internals);\n\n const id = internals.nextId++;\n\n this.handlers.push(handler);\n internals.handlerEntries.set(id, {\n handler,\n index: this.handlers.length - 1,\n });\n internals.handlersLength = this.handlers.length;\n\n return id;\n }\n\n /**\n * Remove an interceptor from the stack\n *\n * @param {Number} id The ID that was returned by `use`\n *\n * @returns {void}\n */\n eject(id) {\n const internals = this[$internals];\n\n syncHandlerEntries(this, internals);\n\n const handlerId = normalizeHandlerId(id);\n const entry = internals.handlerEntries.get(handlerId);\n\n if (entry) {\n internals.handlerEntries.delete(handlerId);\n\n // Ignore IDs invalidated by clear or direct replacement of handlers.\n if (this.handlers[entry.index] !== entry.handler) {\n return;\n }\n\n this.handlers[entry.index] = null;\n\n // Do not reuse an index while forEach is walking its length snapshot.\n if (!internals.iterationDepth) {\n trimHandlers(this.handlers);\n internals.handlersLength = this.handlers.length;\n }\n }\n }\n\n /**\n * Clear all interceptors from the stack\n *\n * @returns {void}\n */\n clear() {\n if (this.handlers) {\n this.handlers = [];\n syncHandlerEntries(this, this[$internals]);\n }\n }\n\n /**\n * Iterate over all the registered interceptors\n *\n * This method is particularly useful for skipping over any\n * interceptors that may have become `null` calling `eject`.\n *\n * @param {Function} fn The function to call for each interceptor\n *\n * @returns {void}\n */\n forEach(fn) {\n const internals = this[$internals];\n\n syncHandlerEntries(this, internals);\n\n internals.iterationDepth++;\n\n try {\n utils.forEach(this.handlers, function forEachHandler(h) {\n if (h !== null) {\n fn(h);\n }\n });\n } finally {\n if (!--internals.iterationDepth) {\n syncHandlerEntries(this, internals);\n trimHandlers(this.handlers);\n internals.handlersLength = countHandlers(this.handlers);\n }\n }\n }\n}\n\nexport default InterceptorManager;\n","'use strict';\n\nexport default {\n silentJSONParsing: true,\n forcedJSONParsing: true,\n clarifyTimeoutError: false,\n legacyInterceptorReqResOrdering: true,\n advertiseZstdAcceptEncoding: false,\n validateStatusUndefinedResolves: true,\n encodeBasicAuthUsername: false,\n};\n","'use strict';\n\nimport AxiosURLSearchParams from '../../../helpers/AxiosURLSearchParams.js';\nexport default typeof URLSearchParams !== 'undefined' ? URLSearchParams : AxiosURLSearchParams;\n","'use strict';\n\nexport default typeof FormData !== 'undefined' ? FormData : null;\n","'use strict';\n\nexport default typeof Blob !== 'undefined' ? Blob : null;\n","import URLSearchParams from './classes/URLSearchParams.js';\nimport FormData from './classes/FormData.js';\nimport Blob from './classes/Blob.js';\n\nexport default {\n isBrowser: true,\n classes: {\n URLSearchParams,\n FormData,\n Blob,\n },\n protocols: ['http', 'https', 'file', 'blob', 'url', 'data'],\n};\n","const hasBrowserEnv = typeof window !== 'undefined' && typeof document !== 'undefined';\n\nconst _navigator = (typeof navigator === 'object' && navigator) || undefined;\n\n/**\n * Determine if we're running in a standard browser environment\n *\n * This allows axios to run in a web worker, and react-native.\n * Both environments support XMLHttpRequest, but not fully standard globals.\n *\n * web workers:\n * typeof window -> undefined\n * typeof document -> undefined\n *\n * react-native:\n * navigator.product -> 'ReactNative'\n * nativescript\n * navigator.product -> 'NativeScript' or 'NS'\n *\n * @returns {boolean}\n */\nconst hasStandardBrowserEnv =\n hasBrowserEnv &&\n (!_navigator || ['ReactNative', 'NativeScript', 'NS'].indexOf(_navigator.product) < 0);\n\n/**\n * Determine if we're running in a standard browser webWorker environment\n *\n * Although the `isStandardBrowserEnv` method indicates that\n * `allows axios to run in a web worker`, the WebWorker will still be\n * filtered out due to its judgment standard\n * `typeof window !== 'undefined' && typeof document !== 'undefined'`.\n * This leads to a problem when axios post `FormData` in webWorker\n */\nconst hasStandardBrowserWebWorkerEnv = (() => {\n return (\n typeof WorkerGlobalScope !== 'undefined' &&\n // eslint-disable-next-line no-undef\n self instanceof WorkerGlobalScope &&\n typeof self.importScripts === 'function'\n );\n})();\n\nconst origin = (hasBrowserEnv && window.location.href) || 'http://localhost';\n\nexport {\n hasBrowserEnv,\n hasStandardBrowserWebWorkerEnv,\n hasStandardBrowserEnv,\n _navigator as navigator,\n origin,\n};\n","import platform from './node/index.js';\nimport * as utils from './common/utils.js';\n\nexport default {\n ...utils,\n ...platform,\n};\n","'use strict';\n\nimport utils from '../utils.js';\nimport toFormData from './toFormData.js';\nimport platform from '../platform/index.js';\n\nexport default function toURLEncodedForm(data, options) {\n return toFormData(data, new platform.classes.URLSearchParams(), {\n visitor: function (value, key, path, helpers) {\n if (platform.isNode && utils.isBuffer(value)) {\n this.append(key, value.toString('base64'));\n return false;\n }\n\n return helpers.defaultVisitor.apply(this, arguments);\n },\n ...options,\n });\n}\n","'use strict';\n\nimport utils from '../utils.js';\nimport AxiosError from '../core/AxiosError.js';\nimport { DEFAULT_FORM_DATA_MAX_DEPTH } from './toFormData.js';\n\nconst MAX_DEPTH = DEFAULT_FORM_DATA_MAX_DEPTH;\n\nfunction throwIfDepthExceeded(index) {\n if (index > MAX_DEPTH) {\n throw new AxiosError(\n 'FormData field is too deeply nested (' + index + ' levels). Max depth: ' + MAX_DEPTH,\n AxiosError.ERR_FORM_DATA_DEPTH_EXCEEDED\n );\n }\n}\n\n/**\n * It takes a string like `foo[x][y][z]` and returns an array like `['foo', 'x', 'y', 'z']\n *\n * @param {string} name - The name of the property to get.\n *\n * @returns An array of strings.\n */\nfunction parsePropPath(name) {\n // foo[x][y][z] -> ['foo', 'x', 'y', 'z']\n // foo.x.y.z -> ['foo', 'x', 'y', 'z']\n // A path is split on `.` and on `[...]` groups. A segment — whether written\n // in dot notation or captured inside brackets — may contain any character\n // except `.`, `[` and `]`, so a key like `user-name` or `user name` is kept\n // literal instead of being split (#5402). `.`, `[` and `]` keep their existing\n // meaning, e.g. `foo[bar.baz]` -> ['foo', 'bar', 'baz'] and `[]` is an array push.\n // Excluding `[` from the bracket group also makes the match fail fast at the\n // next `[`, so a malformed name cannot rescan to the end of the string from\n // every unmatched `[` — parsing stays linear in the length of the name.\n const path = [];\n const pattern = /[^.[\\]]+|\\[([^.[\\]]*)]/g;\n let match;\n\n while ((match = pattern.exec(name)) !== null) {\n throwIfDepthExceeded(path.length);\n path.push(match[0] === '[]' ? '' : match[1] || match[0]);\n }\n\n return path;\n}\n\n/**\n * Convert an array to an object.\n *\n * @param {Array} arr - The array to convert to an object.\n *\n * @returns An object with the same keys and values as the array.\n */\nfunction arrayToObject(arr) {\n const obj = {};\n const keys = Object.keys(arr);\n let i;\n const len = keys.length;\n let key;\n for (i = 0; i < len; i++) {\n key = keys[i];\n obj[key] = arr[key];\n }\n return obj;\n}\n\nfunction normalizeArray(value) {\n if (!utils.isArray(value)) return value;\n\n const keys = Object.keys(value);\n return keys.length !== value.length || keys.some((key, index) => key !== String(index))\n ? arrayToObject(value)\n : value;\n}\n\nfunction normalizeArrays(obj) {\n const pending = [obj];\n while (pending.length) {\n const target = pending.pop();\n Object.keys(target).forEach((key) => {\n const value = (target[key] = normalizeArray(target[key]));\n if (utils.isArray(value) || utils.isPlainObject(value)) {\n pending.push(value);\n }\n });\n }\n return obj;\n}\n\n/**\n * It takes a FormData object and returns a JavaScript object\n *\n * @param {string} formData The FormData object to convert to JSON.\n *\n * @returns {Object | null} The converted object.\n */\nfunction formDataToJSON(formData) {\n function buildPath(path, value, target, index) {\n throwIfDepthExceeded(index);\n\n let name = path[index++];\n\n if (name === '__proto__') return true;\n\n const isNumericKey = Number.isFinite(+name);\n const isLast = index >= path.length;\n name = !name && utils.isArray(target) ? target.length : name;\n\n if (isLast) {\n if (utils.hasOwnProp(target, name)) {\n target[name] = normalizeArray(target[name]);\n target[name] = utils.isArray(target[name])\n ? target[name].concat(value)\n : [target[name], value];\n } else {\n target[name] = value;\n }\n\n return !isNumericKey;\n }\n\n if (!utils.hasOwnProp(target, name) || !utils.isObject(target[name])) {\n target[name] = [];\n }\n\n const result = buildPath(path, value, target[name], index);\n\n if (result && utils.isArray(target[name])) {\n target[name] = arrayToObject(target[name]);\n }\n\n return !isNumericKey;\n }\n\n if (utils.isFormData(formData) && utils.isFunction(formData.entries)) {\n const obj = {};\n\n utils.forEachEntry(formData, (name, value) => {\n buildPath(parsePropPath(name), value, obj, 0);\n });\n\n return normalizeArrays(obj);\n }\n\n return null;\n}\n\nexport default formDataToJSON;\n","'use strict';\n\nconst methodList = Object.freeze([\n 'get',\n 'delete',\n 'head',\n 'options',\n 'post',\n 'put',\n 'patch',\n 'purge',\n 'link',\n 'unlink',\n 'query',\n]);\n\nexport default methodList;\n","'use strict';\n\nimport utils from '../utils.js';\nimport AxiosError from '../core/AxiosError.js';\nimport transitionalDefaults from './transitional.js';\nimport toFormData from '../helpers/toFormData.js';\nimport toURLEncodedForm from '../helpers/toURLEncodedForm.js';\nimport platform from '../platform/index.js';\nimport formDataToJSON from '../helpers/formDataToJSON.js';\nimport methodList from '../core/methodList.js';\n\nconst own = (obj, key) => (obj != null && utils.hasOwnProp(obj, key) ? obj[key] : undefined);\n\n/**\n * It takes a string, tries to parse it, and if it fails, it returns the stringified version\n * of the input\n *\n * @param {any} rawValue - The value to be stringified.\n * @param {Function} parser - A function that parses a string into a JavaScript object.\n * @param {Function} encoder - A function that takes a value and returns a string.\n *\n * @returns {string} A stringified version of the rawValue.\n */\nfunction stringifySafely(rawValue, parser, encoder) {\n if (utils.isString(rawValue)) {\n try {\n (parser || JSON.parse)(rawValue);\n return utils.trim(rawValue);\n } catch (e) {\n if (e.name !== 'SyntaxError') {\n throw e;\n }\n }\n }\n\n return (encoder || JSON.stringify)(rawValue);\n}\n\nconst defaults = {\n transitional: transitionalDefaults,\n\n adapter: ['xhr', 'http', 'fetch'],\n\n transformRequest: [\n function transformRequest(data, headers) {\n const contentType = headers.getContentType() || '';\n const hasJSONContentType = contentType.indexOf('application/json') > -1;\n const isObjectPayload = utils.isObject(data);\n\n if (isObjectPayload && utils.isHTMLForm(data)) {\n data = new FormData(data);\n }\n\n const isFormData = utils.isFormData(data);\n\n if (isFormData) {\n return hasJSONContentType ? JSON.stringify(formDataToJSON(data)) : data;\n }\n\n if (\n utils.isArrayBuffer(data) ||\n utils.isBuffer(data) ||\n utils.isStream(data) ||\n utils.isFile(data) ||\n utils.isBlob(data) ||\n utils.isReadableStream(data)\n ) {\n return data;\n }\n if (utils.isArrayBufferView(data)) {\n return data.buffer;\n }\n if (utils.isURLSearchParams(data)) {\n headers.setContentType('application/x-www-form-urlencoded;charset=utf-8', false);\n return data.toString();\n }\n\n let isFileList;\n\n if (isObjectPayload) {\n const formSerializer = own(this, 'formSerializer');\n if (contentType.indexOf('application/x-www-form-urlencoded') > -1) {\n return toURLEncodedForm(data, formSerializer).toString();\n }\n\n if (\n (isFileList = utils.isFileList(data)) ||\n contentType.indexOf('multipart/form-data') > -1\n ) {\n const env = own(this, 'env');\n const _FormData = env && env.FormData;\n\n return toFormData(\n isFileList ? { 'files[]': data } : data,\n _FormData && new _FormData(),\n formSerializer\n );\n }\n }\n\n if (isObjectPayload || hasJSONContentType) {\n headers.setContentType('application/json', false);\n return stringifySafely(data);\n }\n\n return data;\n },\n ],\n\n transformResponse: [\n function transformResponse(data) {\n const transitional = own(this, 'transitional') || defaults.transitional;\n const forcedJSONParsing = transitional && transitional.forcedJSONParsing;\n const responseType = own(this, 'responseType');\n const JSONRequested = responseType === 'json';\n\n if (utils.isResponse(data) || utils.isReadableStream(data)) {\n return data;\n }\n\n if (\n data &&\n utils.isString(data) &&\n ((forcedJSONParsing && !responseType) || JSONRequested)\n ) {\n const silentJSONParsing = transitional && transitional.silentJSONParsing;\n const strictJSONParsing = !silentJSONParsing && JSONRequested;\n\n try {\n return JSON.parse(data, own(this, 'parseReviver'));\n } catch (e) {\n if (strictJSONParsing) {\n if (e.name === 'SyntaxError') {\n throw AxiosError.from(e, AxiosError.ERR_BAD_RESPONSE, this, null, own(this, 'response'));\n }\n throw e;\n }\n }\n }\n\n return data;\n },\n ],\n\n /**\n * A timeout in milliseconds to abort a request. If set to 0 (default) a\n * timeout is not created.\n */\n timeout: 0,\n\n xsrfCookieName: 'XSRF-TOKEN',\n xsrfHeaderName: 'X-XSRF-TOKEN',\n\n maxContentLength: -1,\n maxBodyLength: -1,\n\n env: {\n FormData: platform.classes.FormData,\n Blob: platform.classes.Blob,\n },\n\n validateStatus: function validateStatus(status) {\n return status >= 200 && status < 300;\n },\n\n headers: {\n common: {\n Accept: 'application/json, text/plain, */*',\n 'Content-Type': undefined,\n },\n },\n};\n\nutils.forEach(methodList, (method) => {\n defaults.headers[method] = {};\n});\n\nexport default defaults;\n","'use strict';\n\nimport utils from '../utils.js';\nimport defaults from '../defaults/index.js';\nimport AxiosHeaders from '../core/AxiosHeaders.js';\n\n/**\n * Transform the data for a request or a response\n *\n * @param {Array|Function} fns A single function or Array of functions\n * @param {?Object} response The response object\n *\n * @returns {*} The resulting transformed data\n */\nexport default function transformData(fns, response) {\n const config = this || defaults;\n const context = response || config;\n const headers = AxiosHeaders.from(context.headers);\n let data = context.data;\n\n utils.forEach(fns, function transform(fn) {\n data = fn.call(config, data, headers.normalize(), response ? response.status : undefined);\n });\n\n headers.normalize();\n\n return data;\n}\n","'use strict';\n\nexport default function isCancel(value) {\n return !!(value && value.__CANCEL__);\n}\n","'use strict';\n\nimport AxiosError from '../core/AxiosError.js';\n\nclass CanceledError extends AxiosError {\n /**\n * A `CanceledError` is an object that is thrown when an operation is canceled.\n *\n * @param {string=} message The message.\n * @param {Object=} config The config.\n * @param {Object=} request The request.\n *\n * @returns {CanceledError} The created error.\n */\n constructor(message, config, request) {\n super(message == null ? 'canceled' : message, AxiosError.ERR_CANCELED, config, request);\n this.name = 'CanceledError';\n this.__CANCEL__ = true;\n }\n}\n\nexport default CanceledError;\n","'use strict';\n\nimport AxiosError from './AxiosError.js';\n\n/**\n * Resolve or reject a Promise based on response status.\n *\n * @param {Function} resolve A function that resolves the promise.\n * @param {Function} reject A function that rejects the promise.\n * @param {object} response The response.\n *\n * @returns {object} The response.\n */\nexport default function settle(resolve, reject, response) {\n const validateStatus = response.config.validateStatus;\n if (!response.status || !validateStatus || validateStatus(response.status)) {\n resolve(response);\n } else {\n reject(new AxiosError(\n 'Request failed with status code ' + response.status,\n response.status >= 400 && response.status < 500 ? AxiosError.ERR_BAD_REQUEST : AxiosError.ERR_BAD_RESPONSE,\n response.config,\n response.request,\n response\n ));\n }\n}\n","'use strict';\n\nconst urlParserControlCharacters = /[\\t\\n\\r]/g;\n\n/**\n * Match WHATWG URL preprocessing before checking a URL's protocol.\n *\n * @param {string} url\n *\n * @returns {string}\n */\nexport default function normalizeURLForProtocolCheck(url) {\n if (typeof url !== 'string') {\n return url;\n }\n\n let start = 0;\n\n while (start < url.length && url.charCodeAt(start) <= 0x20) {\n start++;\n }\n\n return url.slice(start).replace(urlParserControlCharacters, '');\n}\n","'use strict';\n\nexport default function parseProtocol(url) {\n const match = /^([-+\\w]{1,25}):(?:\\/\\/)?/.exec(url);\n return (match && match[1].toLowerCase()) || '';\n}\n","import utils from '../utils.js';\nimport platform from '../platform/index.js';\n\nconst decodeCookieValue = (value) => {\n try {\n return decodeURIComponent(value);\n } catch (e) {\n return value;\n }\n};\n\nexport default platform.hasStandardBrowserEnv\n ? // Standard browser envs support document.cookie\n {\n write(name, value, expires, path, domain, secure, sameSite) {\n if (typeof document === 'undefined') return;\n\n const cookie = [`${name}=${encodeURIComponent(value)}`];\n\n if (utils.isNumber(expires)) {\n cookie.push(`expires=${new Date(expires).toUTCString()}`);\n }\n if (utils.isString(path)) {\n cookie.push(`path=${path}`);\n }\n if (utils.isString(domain)) {\n cookie.push(`domain=${domain}`);\n }\n if (secure === true) {\n cookie.push('secure');\n }\n if (utils.isString(sameSite)) {\n cookie.push(`SameSite=${sameSite}`);\n }\n\n document.cookie = cookie.join('; ');\n },\n\n read(name) {\n if (typeof document === 'undefined') return null;\n const cookieString = document.cookie;\n if (!cookieString) return null;\n // Match name=value by splitting on the semicolon separator instead of building a\n // RegExp from `name` — interpolating an unescaped string into a RegExp would let\n // metacharacters (e.g. `.+?` in an attacker-influenced cookie name) cause ReDoS or\n // match the wrong cookie. Browsers may serialize cookie pairs as either \";\" or\n // \"; \", so ignore optional whitespace before each cookie name.\n const cookies = cookieString.split(';');\n for (let i = 0; i < cookies.length; i++) {\n const cookie = cookies[i].replace(/^\\s+/, '');\n const eq = cookie.indexOf('=');\n if (eq !== -1 && cookie.slice(0, eq) === name) {\n return decodeCookieValue(cookie.slice(eq + 1));\n }\n }\n return null;\n },\n\n async readAsync(name) {\n try {\n const store = typeof window !== 'undefined' && window.cookieStore;\n if (store && utils.isFunction(store.get)) {\n const cookie = await store.get(name);\n // Both APIs expose stored bytes; preserve Axios's existing URI decoding.\n return cookie ? decodeCookieValue(cookie.value) : null;\n }\n } catch (e) {\n // Restricted or unavailable storage retains the synchronous fallback.\n }\n\n return this.read(name);\n },\n\n remove(name) {\n this.write(name, '', Date.now() - 86400000, '/');\n },\n }\n : // Non-standard browser env (web workers, react-native) lack needed support.\n {\n write() {},\n read() {\n return null;\n },\n async readAsync() {\n return null;\n },\n remove() {},\n };\n","'use strict';\n\n/**\n * Calculate data maxRate\n * @param {Number} [samplesCount= 10]\n * @param {Number} [min= 1000]\n * @returns {Function}\n */\nfunction speedometer(samplesCount, min) {\n samplesCount = samplesCount || 10;\n const bytes = new Array(samplesCount);\n const timestamps = new Array(samplesCount);\n let head = 0;\n let tail = 0;\n let firstSampleTS;\n\n min = min !== undefined ? min : 1000;\n\n return function push(chunkLength) {\n const now = Date.now();\n\n const startedAt = timestamps[tail];\n\n if (!firstSampleTS) {\n firstSampleTS = now;\n }\n\n bytes[head] = chunkLength;\n timestamps[head] = now;\n\n let i = tail;\n let bytesCount = 0;\n\n while (i !== head) {\n bytesCount += bytes[i++];\n i = i % samplesCount;\n }\n\n head = (head + 1) % samplesCount;\n\n if (head === tail) {\n tail = (tail + 1) % samplesCount;\n }\n\n if (now - firstSampleTS < min) {\n return;\n }\n\n const passed = startedAt && now - startedAt;\n\n return passed ? Math.round((bytesCount * 1000) / passed) : undefined;\n };\n}\n\nexport default speedometer;\n","/**\n * Throttle decorator\n * @param {Function} fn\n * @param {Number} freq\n * @return {Array}\n */\nfunction throttle(fn, freq) {\n let timestamp = 0;\n let threshold = 1000 / freq;\n let lastArgs;\n let timer;\n\n const invoke = (args, now = Date.now()) => {\n timestamp = now;\n lastArgs = null;\n if (timer) {\n clearTimeout(timer);\n timer = null;\n }\n fn(...args);\n };\n\n const throttled = (...args) => {\n const now = Date.now();\n const passed = now - timestamp;\n if (passed >= threshold) {\n invoke(args, now);\n } else {\n lastArgs = args;\n if (!timer) {\n timer = setTimeout(() => {\n timer = null;\n invoke(lastArgs);\n }, threshold - passed);\n }\n }\n };\n\n const flush = () => lastArgs && invoke(lastArgs);\n const flushWith = (...args) => invoke(args);\n\n return [throttled, flush, flushWith];\n}\n\nexport default throttle;\n","import speedometer from './speedometer.js';\nimport throttle from './throttle.js';\nimport utils from '../utils.js';\n\nexport const progressEventReducer = (listener, isDownloadStream, freq = 3) => {\n let bytesNotified = 0;\n const _speedometer = speedometer(50, 250);\n\n return throttle((e) => {\n if (!e || !utils.isNumber(e.loaded)) {\n return;\n }\n const rawLoaded = e.loaded;\n const total = e.lengthComputable ? e.total : undefined;\n const loaded = Math.max(0, total != null ? Math.min(rawLoaded, total) : rawLoaded);\n const progressBytes = Math.max(0, loaded - bytesNotified);\n const rate = _speedometer(progressBytes);\n\n bytesNotified = Math.max(bytesNotified, loaded);\n\n const data = {\n loaded,\n total,\n progress: total ? loaded / total : undefined,\n bytes: progressBytes,\n rate: rate ? rate : undefined,\n estimated: rate && total ? (total - loaded) / rate : undefined,\n event: e,\n lengthComputable: total != null,\n [isDownloadStream ? 'download' : 'upload']: true,\n };\n\n listener(data);\n }, freq);\n};\n\nexport const progressEventDecorator = (total, throttled) => {\n const lengthComputable = total != null;\n\n return [\n (loaded) =>\n throttled[0]({\n lengthComputable,\n total,\n loaded,\n }),\n throttled[1],\n ];\n};\n\nexport const asyncDecorator =\n (fn, scheduler = utils.asap) =>\n (...args) =>\n scheduler(() => fn(...args));\n","import platform from '../platform/index.js';\n\nexport default platform.hasStandardBrowserEnv\n ? ((origin) => (url) => {\n url = new URL(url, document.baseURI || platform.origin);\n\n return (\n origin.protocol === url.protocol && origin.host === url.host && origin.port === url.port\n );\n })(new URL(platform.origin))\n : () => true;\n","'use strict';\n\n/**\n * Determines whether the specified URL is absolute\n *\n * @param {string} url The URL to test\n *\n * @returns {boolean} True if the specified URL is absolute, otherwise false\n */\nexport default function isAbsoluteURL(url) {\n // A URL is considered absolute if it begins with \"://\" or \"//\" (protocol-relative URL).\n // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed\n // by any combination of letters, digits, plus, period, or hyphen.\n if (typeof url !== 'string') {\n return false;\n }\n\n return /^([a-z][a-z\\d+\\-.]*:)?\\/\\//i.test(url);\n}\n","'use strict';\n\n/**\n * Creates a new URL by combining the specified URLs\n *\n * @param {string} baseURL The base URL\n * @param {string} relativeURL The relative URL\n *\n * @returns {string} The combined URL\n */\nexport default function combineURLs(baseURL, relativeURL) {\n if (!relativeURL) {\n return baseURL;\n }\n\n let end = baseURL.length;\n\n while (end > 0 && baseURL.charCodeAt(end - 1) === 47) {\n end--;\n }\n\n return baseURL.slice(0, end) + '/' + relativeURL.replace(/^\\/+/, '');\n}\n","'use strict';\n\nimport AxiosError, { REDACTED } from './AxiosError.js';\nimport isAbsoluteURL from '../helpers/isAbsoluteURL.js';\nimport combineURLs from '../helpers/combineURLs.js';\nimport normalizeURLForProtocolCheck from '../helpers/normalizeURLForProtocolCheck.js';\n\nconst malformedHttpProtocol = /^https?:(?!\\/\\/)/i;\n\n// Redact the parts of a URL that can carry secrets before it is embedded in an\n// error message. AxiosError.toJSON() serializes `message` verbatim and errors\n// are commonly logged, while the opt-in `config.redact` model only cleans\n// config keys — it cannot reach the message. Redact only the genuinely\n// sensitive substrings — userinfo (credentials), query parameter values and\n// fragment contents — with the same REDACTED marker the config redaction uses,\n// while keeping the scheme, host, path and parameter names so the offending\n// request stays accurately identifiable.\nfunction redactFragment(fragment) {\n if (!fragment) {\n return fragment;\n }\n\n return fragment.replace(/(^|&)([^=&]*=)?[^&]+/g, (match, separator, parameterName = '') => {\n return `${separator}${parameterName}${REDACTED}`;\n });\n}\n\nfunction redactSensitiveURLParts(url) {\n const redactedURL = url.replace(/^(https?:\\/{0,2})[^/?#]*@/i, `$1${REDACTED}@`);\n const fragmentIndex = redactedURL.indexOf('#');\n const urlWithoutFragment =\n fragmentIndex === -1 ? redactedURL : redactedURL.slice(0, fragmentIndex);\n const redactedURLWithoutFragment = urlWithoutFragment.replace(\n /([?&][^=&#]*=)[^&#]*/g,\n `$1${REDACTED}`\n );\n\n if (fragmentIndex === -1) {\n return redactedURLWithoutFragment;\n }\n\n return `${redactedURLWithoutFragment}#${redactFragment(redactedURL.slice(fragmentIndex + 1))}`;\n}\n\nfunction assertValidHttpProtocolURL(url, config) {\n if (typeof url === 'string') {\n const normalizedURL = normalizeURLForProtocolCheck(url);\n if (malformedHttpProtocol.test(normalizedURL)) {\n throw new AxiosError(\n `Invalid URL ${JSON.stringify(redactSensitiveURLParts(normalizedURL))}: missing \"//\" after protocol`,\n AxiosError.ERR_INVALID_URL,\n config\n );\n }\n }\n}\n\n/**\n * Creates a new URL by combining the baseURL with the requestedURL,\n * only when the requestedURL is not already an absolute URL.\n * If the requestURL is absolute, this function returns the requestedURL untouched.\n *\n * @param {string} baseURL The base URL\n * @param {string} requestedURL Absolute or relative URL to combine\n *\n * @returns {string} The combined full path\n */\nexport default function buildFullPath(baseURL, requestedURL, allowAbsoluteUrls, config) {\n assertValidHttpProtocolURL(requestedURL, config);\n let isRelativeUrl = !isAbsoluteURL(requestedURL);\n if (baseURL && (isRelativeUrl || allowAbsoluteUrls === false)) {\n assertValidHttpProtocolURL(baseURL, config);\n return combineURLs(baseURL, requestedURL);\n }\n return requestedURL;\n}\n","'use strict';\n\nimport utils from '../utils.js';\nimport AxiosError from './AxiosError.js';\n\nexport default function assertParamsAcyclic(params) {\n const pending = [{ value: params }];\n const active = new WeakSet();\n const visited = new WeakSet();\n\n while (pending.length) {\n const { value, done } = pending.pop();\n if (!utils.isPlainObject(value) && !utils.isArray(value)) continue;\n if (done) {\n active.delete(value);\n continue;\n }\n if (active.has(value)) {\n throw new AxiosError(\n 'Circular reference detected in params',\n AxiosError.ERR_BAD_OPTION_VALUE\n );\n }\n if (visited.has(value)) continue;\n visited.add(value);\n active.add(value);\n pending.push({ value, done: true });\n\n const keys = Object.keys(value);\n if (Object.getOwnPropertySymbols && Object.getOwnPropertyDescriptor) {\n Object.getOwnPropertySymbols(value).forEach((key) => {\n const descriptor = Object.getOwnPropertyDescriptor(value, key);\n if (descriptor && descriptor.enumerable) keys.push(key);\n });\n }\n // Shallow array elements retain fields filtered during plain-object merges.\n // Inspect reserved data properties without evaluating their accessors.\n keys.forEach((key) => {\n if (key === '__proto__' || key === 'constructor' || key === 'prototype') {\n const descriptor = Object.getOwnPropertyDescriptor(value, key);\n if (descriptor && utils.hasOwnProp(descriptor, 'value')) {\n pending.push({ value: descriptor.value });\n }\n } else {\n pending.push({ value: value[key] });\n }\n });\n }\n}\n","'use strict';\n\nimport utils from '../utils.js';\nimport AxiosHeaders from './AxiosHeaders.js';\nimport assertParamsAcyclic from './assertParamsAcyclic.js';\n\nconst headersToObject = (thing) => (thing instanceof AxiosHeaders ? { ...thing } : thing);\n\nconst ownEnumerableKeys = (thing) => {\n if (Object.getOwnPropertySymbols && Object.getOwnPropertyDescriptor) {\n return Object.keys(thing).concat(\n Object.getOwnPropertySymbols(thing).filter((symbol) => {\n const descriptor = Object.getOwnPropertyDescriptor(thing, symbol);\n return descriptor && descriptor.enumerable;\n })\n );\n }\n return Object.keys(thing);\n};\n\n// Copy params without recursive merges so the serializer remains responsible\n// for its depth policy. Only visit defaults that contribute to the result.\nfunction mergeParams(a, b) {\n const pending = [];\n const copies = new WeakMap();\n const empty = {};\n\n function copy(target, source) {\n if (!utils.isPlainObject(source)) {\n return utils.isArray(source) ? source.slice() : source;\n }\n\n const base = utils.isPlainObject(target) ? target : empty;\n let bases = copies.get(source);\n if (!bases) {\n bases = new WeakMap();\n copies.set(source, bases);\n }\n if (bases.has(base)) return bases.get(base);\n\n const result = {};\n bases.set(base, result);\n pending.push({ base, source, result });\n return result;\n }\n\n const result = utils.isUndefined(b) ? copy(undefined, a) : copy(a, b);\n while (pending.length) {\n const { base, source, result: target } = pending.pop();\n const baseKeys = new Set(ownEnumerableKeys(base));\n const sourceKeys = new Set(ownEnumerableKeys(source));\n const keys = new Set([...baseKeys, ...sourceKeys]);\n\n keys.forEach((key) => {\n if (key === '__proto__' || key === 'constructor' || key === 'prototype') return;\n const hasSource = sourceKeys.has(key);\n const value = hasSource ? source[key] : undefined;\n const previous =\n (!hasSource || utils.isPlainObject(value)) && baseKeys.has(key) ? base[key] : undefined;\n target[key] = hasSource ? copy(previous, value) : copy(undefined, previous);\n });\n }\n\n assertParamsAcyclic(result);\n return result;\n}\n\nfunction getMergedValue(target, source, prop, caseless) {\n if (utils.isPlainObject(target) && utils.isPlainObject(source)) {\n return utils.merge.call({ caseless }, target, source);\n } else if (utils.isPlainObject(source)) {\n return utils.merge({}, source);\n } else if (utils.isArray(source)) {\n return source.slice();\n }\n return source;\n}\n\nfunction mergeDeepProperties(a, b, prop, caseless) {\n if (!utils.isUndefined(b)) {\n return getMergedValue(a, b, prop, caseless);\n } else if (!utils.isUndefined(a)) {\n return getMergedValue(undefined, a, prop, caseless);\n }\n}\n\n// eslint-disable-next-line consistent-return\nfunction valueFromConfig2(a, b) {\n if (!utils.isUndefined(b)) {\n return getMergedValue(undefined, b);\n }\n}\n\n// eslint-disable-next-line consistent-return\nfunction defaultToConfig2(a, b) {\n if (!utils.isUndefined(b)) {\n return getMergedValue(undefined, b);\n } else if (!utils.isUndefined(a)) {\n return getMergedValue(undefined, a);\n }\n}\n\nfunction getMergedTransitionalOption(config1, config2, prop) {\n const transitional2 = utils.hasOwnProp(config2, 'transitional')\n ? config2.transitional\n : undefined;\n\n if (!utils.isUndefined(transitional2)) {\n if (utils.isPlainObject(transitional2)) {\n if (utils.hasOwnProp(transitional2, prop)) {\n return transitional2[prop];\n }\n } else {\n return undefined;\n }\n }\n\n const transitional1 = utils.hasOwnProp(config1, 'transitional')\n ? config1.transitional\n : undefined;\n\n if (utils.isPlainObject(transitional1) && utils.hasOwnProp(transitional1, prop)) {\n return transitional1[prop];\n }\n\n return undefined;\n}\n\n// eslint-disable-next-line consistent-return\nfunction mergeDirectKeys(a, b, prop, config1, config2) {\n if (utils.hasOwnProp(config2, prop)) {\n return getMergedValue(a, b);\n } else if (utils.hasOwnProp(config1, prop)) {\n return getMergedValue(undefined, a);\n }\n}\n\nfunction mergeHeaders(a, b, prop) {\n return mergeDeepProperties(headersToObject(a), headersToObject(b), prop, true);\n}\n\n// Null-proto, frozen descriptor so a polluted Object.prototype.get cannot turn\n// this data descriptor into an accessor descriptor on the way in.\n// defineProperty only reads it, so one shared instance serves every call.\nconst hasOwnPropertyDescriptor = Object.freeze({\n __proto__: null,\n value: Object.prototype.hasOwnProperty,\n enumerable: false,\n writable: true,\n configurable: true,\n});\n\n// The strategy table and the strategies above are stateless, so they are\n// built once at module load instead of on every call: mergeConfig runs at\n// most twice per request (once from a method alias, once from `_request`).\nconst mergeMap = {\n url: valueFromConfig2,\n method: valueFromConfig2,\n data: valueFromConfig2,\n baseURL: defaultToConfig2,\n transformRequest: defaultToConfig2,\n transformResponse: defaultToConfig2,\n params: mergeParams,\n paramsSerializer: defaultToConfig2,\n timeout: defaultToConfig2,\n timeoutErrorMessage: defaultToConfig2,\n withCredentials: defaultToConfig2,\n withXSRFToken: defaultToConfig2,\n adapter: defaultToConfig2,\n responseType: defaultToConfig2,\n xsrfCookieName: defaultToConfig2,\n xsrfHeaderName: defaultToConfig2,\n onUploadProgress: defaultToConfig2,\n onDownloadProgress: defaultToConfig2,\n decompress: defaultToConfig2,\n maxContentLength: defaultToConfig2,\n maxBodyLength: defaultToConfig2,\n beforeRedirect: defaultToConfig2,\n transport: defaultToConfig2,\n httpAgent: defaultToConfig2,\n httpsAgent: defaultToConfig2,\n cancelToken: defaultToConfig2,\n socketPath: defaultToConfig2,\n allowedSocketPaths: defaultToConfig2,\n responseEncoding: defaultToConfig2,\n validateStatus: mergeDirectKeys,\n headers: mergeHeaders,\n};\n\n/**\n * Config-specific merge-function which creates a new config-object\n * by merging two configuration objects together.\n *\n * @param {Object} config1\n * @param {Object} config2\n *\n * @returns {Object} New object resulting from merging config2 to config1\n */\nexport default function mergeConfig(config1, config2) {\n // eslint-disable-next-line no-param-reassign\n config1 = config1 || {};\n config2 = config2 || {};\n\n // Use a null-prototype object so that downstream reads such as `config.auth`\n // or `config.baseURL` cannot inherit polluted values from Object.prototype.\n // `hasOwnProperty` is restored as a non-enumerable own slot to preserve\n // ergonomics for user code that relies on it.\n const config = Object.create(null);\n Object.defineProperty(config, 'hasOwnProperty', hasOwnPropertyDescriptor);\n\n const keys = ownEnumerableKeys({ ...config1, ...config2 });\n\n for (let i = 0, len = keys.length; i < len; i++) {\n const prop = keys[i];\n if (prop === '__proto__' || prop === 'constructor' || prop === 'prototype') continue;\n const merge = utils.hasOwnProp(mergeMap, prop) ? mergeMap[prop] : mergeDeepProperties;\n const a = utils.hasOwnProp(config1, prop) ? config1[prop] : undefined;\n const b = utils.hasOwnProp(config2, prop) ? config2[prop] : undefined;\n const configValue =\n merge === mergeDirectKeys ? merge(a, b, prop, config1, config2) : merge(a, b, prop);\n (utils.isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue);\n }\n\n if (\n utils.hasOwnProp(config2, 'validateStatus') &&\n utils.isUndefined(config2.validateStatus) &&\n getMergedTransitionalOption(config1, config2, 'validateStatusUndefinedResolves') === false\n ) {\n if (utils.hasOwnProp(config1, 'validateStatus')) {\n config.validateStatus = getMergedValue(undefined, config1.validateStatus);\n } else {\n delete config.validateStatus;\n }\n }\n\n return config;\n}\n","'use strict';\n\nconst FORM_DATA_CONTENT_HEADERS = ['content-type', 'content-length'];\n\n/**\n * Apply the headers generated by a FormData implementation to the request headers,\n * honoring the `formDataHeaderPolicy` option: with 'content-only', copy only the\n * content-* headers; otherwise merge all of them.\n *\n * @param {AxiosHeaders} headers - the request headers to mutate\n * @param {Object | null | undefined} formHeaders - headers produced by the FormData implementation\n * @param {String} [policy] - the resolved `formDataHeaderPolicy` config value\n *\n * @returns {void}\n */\nexport default function setFormDataHeaders(headers, formHeaders, policy) {\n if (policy !== 'content-only') {\n headers.set(formHeaders);\n return;\n }\n\n Object.entries(formHeaders || {}).forEach(([key, val]) => {\n if (FORM_DATA_CONTENT_HEADERS.includes(key.toLowerCase())) {\n headers.set(key, val);\n }\n });\n}\n","import platform from '../platform/index.js';\nimport utils from '../utils.js';\nimport AxiosError from '../core/AxiosError.js';\nimport isURLSameOrigin from './isURLSameOrigin.js';\nimport cookies from './cookies.js';\nimport buildFullPath from '../core/buildFullPath.js';\nimport mergeConfig from '../core/mergeConfig.js';\nimport AxiosHeaders from '../core/AxiosHeaders.js';\nimport setFormDataHeaders from '../core/setFormDataHeaders.js';\nimport buildURL from './buildURL.js';\n\n/**\n * Encode a UTF-8 string to a Latin-1 byte string for use with btoa().\n * This is a modern replacement for the deprecated unescape(encodeURIComponent(str)) pattern.\n *\n * @param {string} str The string to encode\n *\n * @returns {string} UTF-8 bytes as a Latin-1 string\n */\nconst encodeUTF8 = (str) =>\n encodeURIComponent(str).replace(/%([0-9A-F]{2})/gi, (_, hex) =>\n String.fromCharCode(parseInt(hex, 16))\n );\n\nconst readCookie = (name) => cookies.read(name);\n\nfunction resolveConfig(config, readXsrfCookie = readCookie) {\n const newConfig = mergeConfig({}, config);\n\n // Read only own properties to prevent prototype pollution gadgets\n // (e.g. Object.prototype.baseURL = 'https://evil.com').\n const own = (key) => (utils.hasOwnProp(newConfig, key) ? newConfig[key] : undefined);\n\n const data = own('data');\n let withXSRFToken = own('withXSRFToken');\n const xsrfHeaderName = own('xsrfHeaderName');\n const xsrfCookieName = own('xsrfCookieName');\n let headers = own('headers');\n const auth = own('auth');\n const baseURL = own('baseURL');\n const allowAbsoluteUrls = own('allowAbsoluteUrls');\n const url = own('url');\n\n newConfig.headers = headers = AxiosHeaders.from(headers);\n\n newConfig.url = buildURL(\n buildFullPath(baseURL, url, allowAbsoluteUrls, newConfig),\n own('params'),\n own('paramsSerializer')\n );\n\n // HTTP basic authentication\n if (auth) {\n const username = utils.getSafeProp(auth, 'username') || '';\n const password = utils.getSafeProp(auth, 'password') || '';\n const transitional = own('transitional');\n const encodeUsername =\n transitional &&\n utils.hasOwnProp(transitional, 'encodeBasicAuthUsername') &&\n transitional.encodeBasicAuthUsername === true;\n\n try {\n headers.set(\n 'Authorization',\n // Preserve legacy username bytes unless the caller opts in to UTF-8.\n 'Basic ' +\n btoa(\n (encodeUsername ? encodeUTF8(username) : username) +\n ':' +\n (password ? encodeUTF8(password) : '')\n )\n );\n } catch (e) {\n throw AxiosError.from(e, AxiosError.ERR_BAD_OPTION_VALUE, config);\n }\n }\n\n if (utils.isFormData(data)) {\n const getHeaders = utils.getSafeProp(data, 'getHeaders');\n\n if (\n platform.hasStandardBrowserEnv ||\n platform.hasStandardBrowserWebWorkerEnv ||\n utils.isReactNative(data)\n ) {\n headers.setContentType(undefined); // browser/web worker/RN handles it\n } else if (utils.isFunction(getHeaders)) {\n // Node.js FormData (like form-data package)\n setFormDataHeaders(headers, getHeaders.call(data), own('formDataHeaderPolicy'));\n }\n }\n\n // Add xsrf header\n // This is only done if running in a standard browser environment.\n // Specifically not if we're in a web worker, or react-native.\n\n if (platform.hasStandardBrowserEnv) {\n if (utils.isFunction(withXSRFToken)) {\n withXSRFToken = withXSRFToken(newConfig);\n }\n\n // Strict boolean check — prevents proto-pollution gadgets (e.g. Object.prototype.withXSRFToken = 1)\n // and misconfigurations (e.g. \"false\") from short-circuiting the same-origin check and leaking\n // the XSRF token cross-origin.\n const shouldSendXSRF =\n withXSRFToken === true || (withXSRFToken == null && isURLSameOrigin(newConfig.url));\n\n if (shouldSendXSRF) {\n const xsrfValue = xsrfHeaderName && xsrfCookieName && readXsrfCookie(xsrfCookieName);\n\n if (xsrfValue) {\n headers.set(xsrfHeaderName, xsrfValue);\n }\n }\n }\n\n return newConfig;\n}\n\nexport default resolveConfig;\n","import utils from '../utils.js';\nimport settle from '../core/settle.js';\nimport transitionalDefaults from '../defaults/transitional.js';\nimport AxiosError from '../core/AxiosError.js';\nimport CanceledError from '../cancel/CanceledError.js';\nimport normalizeURLForProtocolCheck from '../helpers/normalizeURLForProtocolCheck.js';\nimport parseProtocol from '../helpers/parseProtocol.js';\nimport platform from '../platform/index.js';\nimport AxiosHeaders from '../core/AxiosHeaders.js';\nimport cookies from '../helpers/cookies.js';\nimport { progressEventReducer } from '../helpers/progressEventReducer.js';\nimport resolveConfig from '../helpers/resolveConfig.js';\nimport { toByteStringHeaderObject } from '../helpers/sanitizeHeaderValue.js';\n\nconst isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined';\n\nexport default isXHRAdapterSupported &&\n function (config) {\n return new Promise(function dispatchXhrRequest(resolve, reject) {\n let useAsyncXsrf;\n try {\n const store =\n platform.hasStandardBrowserEnv && typeof window !== 'undefined' && window.cookieStore;\n useAsyncXsrf = store && utils.isFunction(store.get);\n } catch (e) {\n // A restricted Cookie Store getter must retain the synchronous fallback.\n }\n let xsrfCookieName;\n const _config = resolveConfig(\n config,\n useAsyncXsrf\n ? (name) => {\n xsrfCookieName = name;\n return null;\n }\n : undefined\n );\n let requestData = _config.data;\n const requestHeaders = AxiosHeaders.from(_config.headers).normalize();\n let { responseType, onUploadProgress, onDownloadProgress } = _config;\n let onCanceled;\n let timeoutId;\n let uploadThrottled, downloadThrottled;\n let flushUpload, flushDownload, flushDownloadWithEvent;\n\n function done() {\n clearTimeout(timeoutId);\n // A final progress callback must not prevent the remaining cleanup.\n // Report errors asynchronously, as onloadend and the throttle timer do.\n try {\n flushUpload && flushUpload(); // flush events\n } catch (err) {\n setTimeout(() => {\n throw err;\n });\n }\n try {\n flushDownload && flushDownload(); // flush events\n } catch (err) {\n setTimeout(() => {\n throw err;\n });\n }\n\n // A flush can synchronously cancel the request and reenter done().\n // In that case the inner call has already detached these listeners.\n if (request) {\n downloadThrottled && request.removeEventListener('progress', downloadThrottled);\n if (request.upload) {\n uploadThrottled && request.upload.removeEventListener('progress', uploadThrottled);\n flushUpload && request.upload.removeEventListener('loadend', flushUpload);\n }\n }\n\n _config.cancelToken && _config.cancelToken.unsubscribe(onCanceled);\n\n _config.signal && _config.signal.removeEventListener('abort', onCanceled);\n }\n\n let request = new XMLHttpRequest();\n\n request.open(_config.method.toUpperCase(), _config.url, true);\n\n // Set the request timeout in MS\n request.timeout = _config.timeout;\n\n function onloadend(event) {\n if (!request) {\n return;\n }\n\n // Status 0 means no response was received, which onerror and onabort normally\n // reject before this runs. Firefox 152 fires only readystatechange and loadend for\n // navigation-canceled requests (https://bugzilla.mozilla.org/show_bug.cgi?id=1505389),\n // leaving settle() to resolve them as an empty success. ECONNABORTED is the error\n // onabort raised on Firefox 151. Reads over file:, which some environments report as\n // status 0 on success, are excluded by the request URL's scheme after browser-style\n // preprocessing, by the page origin's scheme for relative URLs (which inherit it), or\n // by responseURL where implemented.\n if (\n request.status === 0 &&\n (parseProtocol(normalizeURLForProtocolCheck(_config.url)) ||\n parseProtocol(platform.origin)) !== 'file' &&\n !(request.responseURL && request.responseURL.startsWith('file:'))\n ) {\n reject(new AxiosError('Request aborted', AxiosError.ECONNABORTED, config, request));\n done();\n\n // Clean up request\n request = null;\n return;\n }\n\n // When loadend is still dispatching, flushing with it gives progress\n // listeners a final delivery whose event has a live target. The legacy\n // ready-state fallback has no event, so replay its pending progress.\n // A throwing listener must not block settlement; rethrow asynchronously,\n // matching how listener errors surface on the throttle timer path.\n try {\n if (event) {\n flushDownloadWithEvent && flushDownloadWithEvent(event);\n } else {\n flushDownload && flushDownload();\n }\n } catch (err) {\n setTimeout(() => {\n throw err;\n });\n }\n\n // A final progress callback can cancel the request synchronously.\n if (!request) {\n return;\n }\n\n // Prepare the response\n const responseHeaders = AxiosHeaders.from(\n 'getAllResponseHeaders' in request && request.getAllResponseHeaders()\n );\n const responseData =\n !responseType || responseType === 'text' || responseType === 'json'\n ? request.responseText\n : request.response;\n const response = {\n data: responseData,\n status: request.status,\n statusText: request.statusText,\n headers: responseHeaders,\n config,\n request,\n };\n\n settle(\n function _resolve(value) {\n resolve(value);\n done();\n },\n function _reject(err) {\n reject(err);\n done();\n },\n response\n );\n\n // Clean up request\n request = null;\n }\n\n if ('onloadend' in request) {\n // Use onloadend if available\n request.onloadend = onloadend;\n } else {\n // Listen for ready state to emulate onloadend\n request.onreadystatechange = function handleLoad() {\n if (!request || request.readyState !== 4) {\n return;\n }\n\n // The request errored out and we didn't get a response, this will be\n // handled by onerror instead\n // With one exception: request that using file: protocol, most browsers\n // will return status as 0 even though it's a successful request\n if (\n request.status === 0 &&\n !(request.responseURL && request.responseURL.startsWith('file:'))\n ) {\n return;\n }\n // readystate handler is calling before onerror or ontimeout handlers,\n // so we should call onloadend on the next 'tick'\n setTimeout(onloadend);\n };\n }\n\n // Handle browser request cancellation (as opposed to a manual cancellation)\n request.onabort = function handleAbort() {\n if (!request) {\n return;\n }\n\n reject(new AxiosError('Request aborted', AxiosError.ECONNABORTED, config, request));\n done();\n\n // Clean up request\n request = null;\n };\n\n // Handle low level network errors\n request.onerror = function handleError(event) {\n // Browsers deliver a ProgressEvent in XHR onerror\n // (message may be empty; when present, surface it)\n // See https://developer.mozilla.org/docs/Web/API/XMLHttpRequest/error_event\n const msg = event && event.message ? event.message : 'Network Error';\n const err = new AxiosError(msg, AxiosError.ERR_NETWORK, config, request);\n // attach the underlying event for consumers who want details\n err.event = event || null;\n reject(err);\n done();\n request = null;\n };\n\n // Handle timeout\n request.ontimeout = function handleTimeout() {\n if (!request) return;\n let timeoutErrorMessage = _config.timeout\n ? 'timeout of ' + _config.timeout + 'ms exceeded'\n : 'timeout exceeded';\n const transitional = _config.transitional || transitionalDefaults;\n if (_config.timeoutErrorMessage) {\n timeoutErrorMessage = _config.timeoutErrorMessage;\n }\n reject(\n new AxiosError(\n timeoutErrorMessage,\n transitional.clarifyTimeoutError ? AxiosError.ETIMEDOUT : AxiosError.ECONNABORTED,\n config,\n request\n )\n );\n done();\n\n // Clean up request\n request = null;\n };\n\n // Remove Content-Type if data is undefined\n requestData === undefined && requestHeaders.setContentType(null);\n\n // Add withCredentials to request if needed\n if (!utils.isUndefined(_config.withCredentials)) {\n request.withCredentials = !!_config.withCredentials;\n }\n\n // Add responseType to request if needed\n if (responseType && responseType !== 'json') {\n request.responseType = _config.responseType;\n }\n\n // Handle progress if needed\n if (onDownloadProgress) {\n [downloadThrottled, flushDownload, flushDownloadWithEvent] = progressEventReducer(\n onDownloadProgress,\n true\n );\n request.addEventListener('progress', downloadThrottled);\n }\n\n // Not all browsers support upload events\n if (onUploadProgress && request.upload) {\n [uploadThrottled, flushUpload] = progressEventReducer(onUploadProgress);\n\n request.upload.addEventListener('progress', uploadThrottled);\n\n request.upload.addEventListener('loadend', flushUpload);\n }\n\n if (_config.cancelToken || _config.signal) {\n // Handle cancellation\n // eslint-disable-next-line func-names\n onCanceled = (cancel) => {\n if (!request) {\n return;\n }\n reject(!cancel || cancel.type ? new CanceledError(null, config, request) : cancel);\n const xhr = request;\n done();\n request = null;\n xhr.abort();\n };\n\n _config.cancelToken && _config.cancelToken.subscribe(onCanceled);\n if (!request) return;\n if (_config.signal) {\n _config.signal.aborted\n ? onCanceled()\n : _config.signal.addEventListener('abort', onCanceled);\n }\n }\n\n if (!request) return;\n\n const protocol = parseProtocol(_config.url);\n\n if (protocol && !platform.protocols.includes(protocol)) {\n reject(\n new AxiosError(\n 'Unsupported protocol ' + protocol + ':',\n AxiosError.ERR_BAD_REQUEST,\n config\n )\n );\n done();\n return;\n }\n\n const sendRequest = () => {\n if (!request) return;\n // Apply headers after an asynchronous XSRF read so existing headers are\n // replaced through AxiosHeaders rather than appended by the native XHR.\n if ('setRequestHeader' in request) {\n utils.forEach(\n toByteStringHeaderObject(requestHeaders),\n function setRequestHeader(val, key) {\n request.setRequestHeader(key, val);\n }\n );\n }\n request.send(requestData || null);\n };\n\n if (xsrfCookieName) {\n // Native XHR timeout starts at send(). Cover cookie preparation and the\n // subsequent request with the same budget and existing timeout handler.\n const now =\n typeof performance !== 'undefined' && utils.isFunction(performance.now)\n ? () => performance.now()\n : Date.now;\n const deadline = request.timeout > 0 ? now() + Number(request.timeout) : undefined;\n const abortOnTimeout = () => {\n if (!request) return;\n const xhr = request;\n xhr.ontimeout();\n xhr.abort();\n };\n if (deadline !== undefined) {\n const scheduleTimeout = () => {\n const remaining = deadline - now();\n if (remaining > 0) {\n // Browser timers overflow above the signed 32-bit delay limit.\n timeoutId = setTimeout(scheduleTimeout, Math.min(remaining, 0x7fffffff));\n } else {\n abortOnTimeout();\n }\n };\n scheduleTimeout();\n }\n\n cookies\n .readAsync(xsrfCookieName)\n .then((value) => {\n if (!request) return;\n // Promise callbacks may run before an overdue timer after a busy task.\n if (deadline !== undefined && now() >= deadline) {\n abortOnTimeout();\n return;\n }\n if (value) {\n const headerName =\n utils.hasOwnProp(_config, 'xsrfHeaderName') && _config.xsrfHeaderName;\n requestHeaders.set(headerName, value);\n }\n sendRequest();\n })\n .catch((error) => {\n if (!request) return;\n reject(AxiosError.from(error, null, config, request));\n done();\n request = null;\n });\n } else {\n sendRequest();\n }\n });\n };\n","import CanceledError from '../cancel/CanceledError.js';\nimport AxiosError from '../core/AxiosError.js';\nimport utils from '../utils.js';\n\nconst composeSignals = (signals, timeout) => {\n signals = signals ? signals.filter(Boolean) : [];\n\n if (!timeout && !signals.length) {\n return;\n }\n\n const controller = new AbortController();\n\n let aborted = false;\n\n const onabort = function (reason) {\n if (!aborted) {\n aborted = true;\n unsubscribe();\n const err = reason instanceof Error ? reason : this.reason;\n controller.abort(\n err instanceof AxiosError\n ? err\n : new CanceledError(err instanceof Error ? err.message : err)\n );\n }\n };\n\n let timer =\n timeout &&\n setTimeout(() => {\n timer = null;\n onabort(new AxiosError(`timeout of ${timeout}ms exceeded`, AxiosError.ETIMEDOUT));\n }, timeout);\n\n const unsubscribe = () => {\n if (!signals) {\n return;\n }\n timer && clearTimeout(timer);\n timer = null;\n signals.forEach((signal) => {\n const unsubscribeSignal = utils.getSafeProp(signal, 'unsubscribe');\n utils.isFunction(unsubscribeSignal)\n ? unsubscribeSignal.call(signal, onabort)\n : signal.removeEventListener('abort', onabort);\n });\n signals = null;\n };\n\n signals.forEach((signal) => {\n if (aborted) {\n return;\n }\n\n if (signal.aborted) {\n onabort.call(signal);\n return;\n }\n\n signal.addEventListener('abort', onabort, { once: true });\n });\n\n const { signal } = controller;\n\n signal.unsubscribe = () => utils.asap(unsubscribe);\n\n return signal;\n};\n\nexport default composeSignals;\n","export const streamChunk = function* (chunk, chunkSize) {\n let len = chunk.byteLength;\n\n if (!chunkSize || len < chunkSize) {\n yield chunk;\n return;\n }\n\n let pos = 0;\n let end;\n\n while (pos < len) {\n end = pos + chunkSize;\n yield chunk.slice(pos, end);\n pos = end;\n }\n};\n\nexport const readBytes = async function* (iterable, chunkSize) {\n for await (const chunk of readStream(iterable)) {\n yield* streamChunk(chunk, chunkSize);\n }\n};\n\nconst readStream = async function* (stream) {\n if (stream[Symbol.asyncIterator]) {\n yield* stream;\n return;\n }\n\n const reader = stream.getReader();\n try {\n for (;;) {\n const { done, value } = await reader.read();\n if (done) {\n break;\n }\n yield value;\n }\n } finally {\n await reader.cancel();\n }\n};\n\nexport const trackStream = (stream, chunkSize, onProgress, onFinish) => {\n const iterator = readBytes(stream, chunkSize);\n\n let bytes = 0;\n let done;\n let _onFinish = (e) => {\n if (!done) {\n done = true;\n onFinish && onFinish(e);\n }\n };\n\n return new ReadableStream(\n {\n async pull(controller) {\n try {\n const { done, value } = await iterator.next();\n\n if (done) {\n _onFinish();\n controller.close();\n return;\n }\n\n let len = value.byteLength;\n if (onProgress) {\n let loadedBytes = (bytes += len);\n onProgress(loadedBytes);\n }\n controller.enqueue(new Uint8Array(value));\n } catch (err) {\n _onFinish(err);\n throw err;\n }\n },\n cancel(reason) {\n _onFinish(reason);\n return iterator.return();\n },\n },\n {\n highWaterMark: 2,\n }\n );\n};\n","import utils from '../utils.js';\n\nconst CRLF = '\\r\\n';\nconst normalizeLines = (value) => String(value).replace(/\\r\\n|\\r|\\n/g, CRLF);\nconst escapeName = (value) =>\n String(value).replace(/[\\r\\n\"]/g, (char) =>\n char === '\\r' ? '%0D' : char === '\\n' ? '%0A' : '%22'\n );\n\n// Count UTF-8 bytes without allocating an encoded copy of a field. FormData\n// string values normalize line endings; Blob/File contents remain unchanged.\nconst stringBytes = (value, normalize) => {\n let length = 0;\n for (let i = 0; i < value.length; i++) {\n const code = value.charCodeAt(i);\n if (normalize && (code === 13 || code === 10)) {\n if (code === 13 && value.charCodeAt(i + 1) === 10) i++;\n length += 2;\n } else if (code < 0x80) {\n length++;\n } else if (code < 0x800) {\n length += 2;\n } else if (\n code >= 0xd800 &&\n code <= 0xdbff &&\n value.charCodeAt(i + 1) >= 0xdc00 &&\n value.charCodeAt(i + 1) <= 0xdfff\n ) {\n length += 4;\n i++;\n } else {\n length += 3;\n }\n }\n return length;\n};\n\n// Describe serialization failures independently of any request library.\nexport class FormDataError extends TypeError {\n constructor(message, reason) {\n super(message);\n this.name = 'FormDataError';\n this.reason = reason;\n }\n}\n\n// The caller supplies the boundary, Blob implementation, and limit error.\nexport default function formDataToBlob(form, Blob, limit, limitError, boundary) {\n if (!utils.isFunction(Blob)) {\n throw new FormDataError('Blob is not supported', 'blob');\n }\n\n if (\n !utils.isString(boundary) ||\n !/^[A-Za-z0-9'()+_,./:=? -]{1,70}$/.test(boundary) ||\n / $/.test(boundary)\n ) {\n throw new FormDataError('Invalid multipart boundary', 'boundary');\n }\n const footer = '--' + boundary + '--' + CRLF;\n let length = footer.length;\n const parts = [];\n const checkLength = (extra) => {\n if (length + extra > limit) throw limitError();\n };\n checkLength(0);\n\n for (const [name, value] of form) {\n const isString = utils.isString(value);\n const valueLength = isString ? stringBytes(value, true) : value.size;\n if (!Number.isFinite(valueLength) || valueLength < 0) {\n throw new FormDataError('Unsupported FormData part size', 'part');\n }\n // Reject large values and names before building normalized header strings.\n checkLength(\n valueLength +\n stringBytes(name, true) +\n (!isString && value.name ? stringBytes(value.name, false) : 0) +\n (!isString && value.type ? stringBytes(value.type, false) : 0)\n );\n\n let header =\n '--' +\n boundary +\n CRLF +\n 'Content-Disposition: form-data; name=\"' +\n escapeName(normalizeLines(name)) +\n '\"';\n if (!isString) {\n header +=\n '; filename=\"' +\n escapeName(utils.isString(value.name) ? value.name : 'blob') +\n '\"' +\n CRLF +\n 'Content-Type: ' +\n String(value.type || 'application/octet-stream').replace(/[\\r\\n]/g, '');\n }\n header += CRLF + CRLF;\n const partLength = stringBytes(header, false) + valueLength + CRLF.length;\n checkLength(partLength);\n length += partLength;\n parts.push({ header, value, isString });\n }\n\n // Native Blob composition retains existing Blob/File data. No file is read\n // and no complete multipart ArrayBuffer is created to determine its length.\n const blobParts = [];\n for (const part of parts) {\n blobParts.push(part.header, part.isString ? normalizeLines(part.value) : part.value, CRLF);\n }\n blobParts.push(footer);\n return new Blob(blobParts, { type: 'multipart/form-data; boundary=' + boundary });\n}\n","import utils from '../utils.js';\nimport platform from '../platform/index.js';\nimport AxiosError from './AxiosError.js';\nimport formDataToBlob, { FormDataError } from '../helpers/formDataToBlob.js';\n\nexport default function createMultipartBody(form, Blob, limit, limitError, boundary) {\n // Report missing Blob support before trying to select a random source.\n if (!utils.isFunction(Blob)) {\n throw new AxiosError('Blob is not supported', AxiosError.ERR_NOT_SUPPORT);\n }\n\n if (boundary === undefined) {\n if (utils.isFunction(platform.generateString)) {\n boundary = 'axios-' + platform.generateString(36, '0123456789abcdef');\n } else {\n const crypto = utils.global.crypto;\n if (!crypto || !utils.isFunction(crypto.getRandomValues)) {\n throw new AxiosError('Random byte generation is not supported', AxiosError.ERR_NOT_SUPPORT);\n }\n const random = new Uint8Array(18);\n crypto.getRandomValues(random);\n boundary =\n 'axios-' + Array.from(random, (value) => ('0' + value.toString(16)).slice(-2)).join('');\n }\n }\n\n try {\n return formDataToBlob(form, Blob, limit, limitError, boundary);\n } catch (error) {\n if (error instanceof FormDataError) {\n const code =\n error.reason === 'boundary' ? AxiosError.ERR_BAD_OPTION_VALUE : AxiosError.ERR_BAD_REQUEST;\n throw new AxiosError(error.message, code);\n }\n throw error;\n }\n}\n","/**\n * Estimate data: URL byte lengths *without* allocating large buffers.\n * - Fetch percent-decodes a base64 body before decoding it.\n * - Node's Buffer.from(body, 'base64') sizes its backing allocation from the\n * percent-decoded body, including ignored characters and content after padding.\n * - Non-base64 data is percent-decoded and then encoded as UTF-8.\n */\nconst isHexDigit = (charCode) =>\n (charCode >= 48 && charCode <= 57) ||\n (charCode >= 65 && charCode <= 70) ||\n (charCode >= 97 && charCode <= 102);\n\nconst isPercentEncodedByte = (str, i, len) =>\n i + 2 < len && isHexDigit(str.charCodeAt(i + 1)) && isHexDigit(str.charCodeAt(i + 2));\n\nconst hexValue = (charCode) => (charCode <= 57 ? charCode - 48 : (charCode & 0xdf) - 55);\n\nconst isBase64Char = (charCode) =>\n (charCode >= 65 && charCode <= 90) || // A-Z\n (charCode >= 97 && charCode <= 122) || // a-z\n (charCode >= 48 && charCode <= 57) || // 0-9\n charCode === 43 || // +\n charCode === 47 || // /\n charCode === 45 || // - (base64url)\n charCode === 95; // _ (base64url)\n\nconst isBase64Whitespace = (charCode) =>\n charCode === 9 || charCode === 10 || charCode === 12 || charCode === 13 || charCode === 32;\n\nconst base64Bytes = (significant) => {\n const groups = Math.floor(significant / 4);\n const remainder = significant % 4;\n return groups * 3 + (remainder === 2 ? 1 : remainder === 3 ? 2 : 0);\n};\n\n// Buffer.byteLength(body, 'base64') uses the raw string length as an allocation\n// upper bound even when Buffer.from later ignores characters or stops at '='.\nconst estimateBase64BufferAllocation = (body) => {\n const len = body.length;\n let padding = 0;\n\n if (len > 0 && body.charCodeAt(len - 1) === 61 /* '=' */) {\n padding++;\n\n if (len > 1 && body.charCodeAt(len - 2) === 61 /* '=' */) {\n padding++;\n }\n }\n\n return Math.floor(((len - padding) * 3) / 4);\n};\n\nconst estimatePercentDecodedBase64BufferAllocation = (body) => {\n // Ordinary Base64 needs only its length and trailing padding.\n if (body.indexOf('%') === -1) {\n return estimateBase64BufferAllocation(body);\n }\n\n let length = 0;\n let previous = 0;\n let last = 0;\n\n for (let i = 0, len = body.length; i < len; i++) {\n let code = body.charCodeAt(i);\n if (code === 37 /* '%' */ && isPercentEncodedByte(body, i, len)) {\n code = hexValue(body.charCodeAt(i + 1)) * 16 + hexValue(body.charCodeAt(i + 2));\n i += 2;\n }\n length++;\n previous = last;\n last = code;\n }\n\n const padding = last === 61 ? (previous === 61 ? 2 : 1) : 0;\n return Math.floor(((length - padding) * 3) / 4);\n};\n\nconst estimatePercentDecodedBase64Bytes = (body) => {\n const len = body.length;\n let significant = 0;\n let padding = 0;\n let invalid = false;\n\n for (let i = 0; i < len; i++) {\n let code = body.charCodeAt(i);\n\n if (code === 37 /* '%' */ && isPercentEncodedByte(body, i, len)) {\n code = hexValue(body.charCodeAt(i + 1)) * 16 + hexValue(body.charCodeAt(i + 2));\n i += 2;\n }\n\n if (isBase64Whitespace(code)) {\n continue;\n }\n\n if (code === 61 /* '=' */) {\n padding++;\n continue;\n }\n\n if (!isBase64Char(code) || padding > 0) {\n invalid = true;\n continue;\n }\n\n significant++;\n }\n\n // Fetch rejects malformed forgiving-base64 input. Returning the raw-size\n // allocation bound keeps that invalid input from becoming a pre-check bypass.\n if (\n invalid ||\n padding > 2 ||\n (padding > 0 && (significant + padding) % 4 !== 0) ||\n significant % 4 === 1\n ) {\n return estimateBase64BufferAllocation(body);\n }\n\n return base64Bytes(significant);\n};\n\nconst estimateDataURLBytes = (url, estimateBase64, base64Pattern) => {\n if (!url || typeof url !== 'string') return 0;\n if (!/^data:/i.test(url)) return 0;\n\n const comma = url.indexOf(',');\n if (comma < 0) return 0;\n\n const meta = url.slice(5, comma);\n const body = url.slice(comma + 1);\n const isBase64 = base64Pattern.test(meta);\n\n if (isBase64) {\n return estimateBase64(body);\n }\n\n // Compute UTF-8 byte length directly from UTF-16 code units without allocating\n // a byte buffer (TextEncoder.encode would defeat the DoS guard on large bodies).\n // Valid %XX triplets count as one decoded byte; this matches the bytes that\n // decodeURIComponent(body) would produce before Buffer re-encodes the string.\n let bytes = 0;\n for (let i = 0, len = body.length; i < len; i++) {\n const c = body.charCodeAt(i);\n if (c === 37 /* '%' */ && isPercentEncodedByte(body, i, len)) {\n bytes += 1;\n i += 2;\n } else if (c < 0x80) {\n bytes += 1;\n } else if (c < 0x800) {\n bytes += 2;\n } else if (c >= 0xd800 && c <= 0xdbff && i + 1 < len) {\n const next = body.charCodeAt(i + 1);\n if (next >= 0xdc00 && next <= 0xdfff) {\n bytes += 4;\n i++;\n } else {\n bytes += 3;\n }\n } else {\n bytes += 3;\n }\n }\n return bytes;\n};\n\n/**\n * Estimate the percent-decoded payload size used by Fetch data: URLs.\n *\n * @param {string} url\n * @returns {number}\n */\nexport default function estimateDataURLDecodedBytes(url) {\n // Fetch removes URL fragments before processing a data: URL.\n const fragmentIndex = typeof url === 'string' ? url.indexOf('#') : -1;\n\n return estimateDataURLBytes(\n fragmentIndex === -1 ? url : url.slice(0, fragmentIndex),\n estimatePercentDecodedBase64Bytes,\n /; *base64[\\t\\n\\f\\r ]*$/i\n );\n}\n\n/**\n * Estimate the Buffer backing allocation used after Node's percent-decoding step.\n *\n * @param {string} url\n * @returns {number}\n */\nexport function estimateDataURLBufferAllocation(url) {\n // Match fromDataURI's case-insensitive protocol and encoding suffix.\n return estimateDataURLBytes(url, estimatePercentDecodedBase64BufferAllocation, /;base64$/i);\n}\n","export const VERSION = \"1.21.1\";","import platform from '../platform/index.js';\nimport utils from '../utils.js';\nimport AxiosError from '../core/AxiosError.js';\nimport composeSignals from '../helpers/composeSignals.js';\nimport { trackStream } from '../helpers/trackStream.js';\nimport createMultipartBody from '../core/createMultipartBody.js';\nimport AxiosHeaders from '../core/AxiosHeaders.js';\nimport {\n progressEventReducer,\n progressEventDecorator,\n asyncDecorator,\n} from '../helpers/progressEventReducer.js';\nimport resolveConfig from '../helpers/resolveConfig.js';\nimport settle from '../core/settle.js';\nimport estimateDataURLDecodedBytes from '../helpers/estimateDataURLDecodedBytes.js';\nimport { VERSION } from '../env/data.js';\nimport { toByteStringHeaderObject } from '../helpers/sanitizeHeaderValue.js';\n\nconst DEFAULT_CHUNK_SIZE = 64 * 1024;\n\nconst DEFAULT_REQUEST_OPTIONS = {\n cache: 'default',\n redirect: 'follow',\n referrer: 'about:client',\n referrerPolicy: '',\n mode: 'cors',\n integrity: '',\n keepalive: false,\n priority: 'auto',\n window: null,\n};\n\nconst { isFunction } = utils;\n\n/**\n * Encode a UTF-8 string to a Latin-1 byte string for use with btoa().\n * This is a modern replacement for the deprecated unescape(encodeURIComponent(str)) pattern.\n *\n * @param {string} str The string to encode\n *\n * @returns {string} UTF-8 bytes as a Latin-1 string\n */\nconst encodeUTF8 = (str) =>\n encodeURIComponent(str).replace(/%([0-9A-F]{2})/gi, (_, hex) =>\n String.fromCharCode(parseInt(hex, 16))\n );\n\n// Node's WHATWG URL parser returns `username` and `password` percent-encoded.\n// Decode before composing the `auth` option so credentials such as\n// `my%40email.com:pass` are sent as `my@email.com:pass`. Falls back to the\n// original value for malformed input so a bad encoding never throws.\nconst decodeURIComponentSafe = (value) => {\n if (!utils.isString(value)) {\n return value;\n }\n\n try {\n return decodeURIComponent(value);\n } catch (error) {\n return value;\n }\n};\n\nconst test = (fn, ...args) => {\n try {\n return !!fn(...args);\n } catch (e) {\n return false;\n }\n};\n\nconst maybeWithAuthCredentials = (url) => {\n const protocolIndex = url.indexOf('://');\n let urlToCheck = url;\n if (protocolIndex !== -1) {\n urlToCheck = urlToCheck.slice(protocolIndex + 3);\n }\n return urlToCheck.includes('@') || urlToCheck.includes(':');\n};\n\nconst factory = (env) => {\n const globalObject =\n utils.global !== undefined && utils.global !== null ? utils.global : globalThis;\n const { ReadableStream, TextEncoder } = globalObject;\n\n env = utils.merge.call(\n {\n skipUndefined: true,\n },\n {\n Request: globalObject.Request,\n Response: globalObject.Response,\n Blob: globalObject.Blob,\n },\n env\n );\n\n const envFetch = utils.hasOwnProp(env, 'fetch') ? env.fetch : undefined;\n const { Request, Response, Blob } = env;\n const isFetchSupported = envFetch ? isFunction(envFetch) : typeof fetch === 'function';\n const isRequestSupported = isFunction(Request);\n const isResponseSupported = isFunction(Response);\n\n if (!isFetchSupported) {\n return false;\n }\n\n const isReadableStreamSupported = isFetchSupported && isFunction(ReadableStream);\n\n const encodeText =\n isFetchSupported &&\n (typeof TextEncoder === 'function'\n ? (\n (encoder) => (str) =>\n encoder.encode(str)\n )(new TextEncoder())\n : async (str) => new Uint8Array(await new Request(str).arrayBuffer()));\n\n const supportsRequestStream =\n isRequestSupported &&\n isReadableStreamSupported &&\n test(() => {\n let duplexAccessed = false;\n\n const request = new Request(platform.origin, {\n body: new ReadableStream(),\n method: 'POST',\n get duplex() {\n duplexAccessed = true;\n return 'half';\n },\n });\n\n const hasContentType = request.headers.has('Content-Type');\n\n if (request.body != null) {\n request.body.cancel();\n }\n\n return duplexAccessed && !hasContentType;\n });\n\n const supportsResponseStream =\n isResponseSupported &&\n isReadableStreamSupported &&\n test(() => utils.isReadableStream(new Response('').body));\n\n // Some runtimes reject every explicit cache mode. Use own defaults for both\n // probes so unrelated polluted options cannot affect cache-mode detection.\n const requestDefaults = Object.assign(Object.create(null), DEFAULT_REQUEST_OPTIONS);\n\n if (isRequestSupported && !test(() => new Request(platform.origin, requestDefaults))) {\n delete requestDefaults.cache;\n\n // Only omit cache when that makes Request construction succeed. Otherwise\n // retain the explicit default that protects supporting runtimes from pollution.\n if (!test(() => new Request(platform.origin, requestDefaults))) {\n requestDefaults.cache = DEFAULT_REQUEST_OPTIONS.cache;\n }\n }\n\n const resolvers = {\n stream: supportsResponseStream && ((res) => res.body),\n };\n\n isFetchSupported &&\n (() => {\n ['text', 'arrayBuffer', 'blob', 'formData', 'stream'].forEach((type) => {\n !resolvers[type] &&\n (resolvers[type] = (res, config) => {\n let method = res && res[type];\n\n if (method) {\n return method.call(res);\n }\n\n throw new AxiosError(\n `Response type '${type}' is not supported`,\n AxiosError.ERR_NOT_SUPPORT,\n config\n );\n });\n });\n })();\n\n const getBodyLength = async (body) => {\n if (body == null) {\n return 0;\n }\n\n if (utils.isBlob(body)) {\n return body.size;\n }\n\n if (utils.isArrayBufferView(body) || utils.isArrayBuffer(body)) {\n return body.byteLength;\n }\n\n if (utils.isURLSearchParams(body)) {\n body = body + '';\n }\n\n if (utils.isString(body)) {\n return (await encodeText(body)).byteLength;\n }\n };\n\n const resolveBodyLength = async (headers, body) => {\n const length = utils.toFiniteNumber(headers.getContentLength());\n\n return length == null ? getBodyLength(body) : length;\n };\n\n return async (config) => {\n let {\n url,\n method,\n data,\n signal,\n cancelToken,\n timeout,\n onDownloadProgress,\n onUploadProgress,\n responseType,\n headers,\n withCredentials = 'same-origin',\n fetchOptions,\n maxContentLength,\n maxBodyLength,\n maxRedirects,\n } = resolveConfig(config);\n\n const hasMaxContentLength = utils.isNumber(maxContentLength) && maxContentLength > -1;\n const hasMaxBodyLength = utils.isNumber(maxBodyLength) && maxBodyLength > -1;\n const own = (key) => (utils.hasOwnProp(config, key) ? config[key] : undefined);\n\n let _fetch = envFetch || fetch;\n\n responseType = responseType ? (responseType + '').toLowerCase() : 'text';\n\n let composedSignal = composeSignals(\n [signal, cancelToken && cancelToken.toAbortSignal()],\n timeout\n );\n\n let request = null;\n\n const unsubscribe =\n composedSignal &&\n composedSignal.unsubscribe &&\n (() => {\n composedSignal.unsubscribe();\n });\n\n let requestContentLength;\n\n // AxiosErrors we raise while request or response bodies are being streamed. Captured\n // by identity so the catch block can surface it directly, regardless of\n // how the runtime wraps the resulting fetch rejection (undici exposes it\n // as `err.cause`; some browsers drop the original error entirely).\n let pendingBodyError = null;\n let pendingResponseError = null;\n\n const maxBodyLengthError = () =>\n new AxiosError(\n 'Request body larger than maxBodyLength limit',\n AxiosError.ERR_BAD_REQUEST,\n config,\n request\n );\n\n try {\n // HTTP basic authentication\n let auth = undefined;\n const configAuth = own('auth');\n\n if (configAuth) {\n const username = utils.getSafeProp(configAuth, 'username') || '';\n const password = utils.getSafeProp(configAuth, 'password') || '';\n auth = {\n username,\n password,\n };\n }\n\n let parsedURL;\n if (maybeWithAuthCredentials(url)) {\n parsedURL = new URL(url, platform.origin);\n\n if (!auth && (parsedURL.username || parsedURL.password)) {\n const urlUsername = decodeURIComponentSafe(parsedURL.username);\n const urlPassword = decodeURIComponentSafe(parsedURL.password);\n auth = {\n username: urlUsername,\n password: urlPassword,\n };\n }\n\n if (parsedURL.username || parsedURL.password) {\n parsedURL.username = '';\n parsedURL.password = '';\n url = parsedURL.href;\n }\n }\n\n if (auth) {\n headers.delete('authorization');\n headers.set(\n 'Authorization',\n 'Basic ' + btoa(encodeUTF8((auth.username || '') + ':' + (auth.password || '')))\n );\n }\n\n // Enforce maxContentLength for data: URLs up-front so we never materialize\n // an oversized payload. The HTTP adapter applies the same check (see http.js\n // \"if (protocol === 'data:')\" branch).\n if (hasMaxContentLength && parsedURL && parsedURL.protocol === 'data:') {\n const estimated = estimateDataURLDecodedBytes(parsedURL.href);\n if (estimated > maxContentLength) {\n throw new AxiosError(\n 'maxContentLength size of ' + maxContentLength + ' exceeded',\n AxiosError.ERR_BAD_RESPONSE,\n config,\n request\n );\n }\n }\n\n const formContentType =\n utils.isSpecCompliantForm(data) && AxiosHeaders.from(own('headers')).getContentType();\n let formBoundary;\n if (\n utils.isString(formContentType) &&\n /^multipart\\/form-data(?:\\s*;|$)/i.test(formContentType.trim())\n ) {\n const parameters = AxiosHeaders.parseParameters(formContentType);\n if (utils.hasOwnProp(parameters, 'boundary')) formBoundary = parameters.boundary;\n }\n\n if (\n utils.isSpecCompliantForm(data) &&\n method !== 'get' &&\n method !== 'head' &&\n (hasMaxBodyLength ||\n (onUploadProgress && supportsRequestStream) ||\n formBoundary !== undefined)\n ) {\n data = createMultipartBody(\n data,\n Blob,\n hasMaxBodyLength ? maxBodyLength : Infinity,\n maxBodyLengthError,\n formBoundary\n );\n // Blob.type lowercases its value, including a case-sensitive boundary.\n // Retain the caller's header when an explicit boundary was serialized.\n headers.setContentType(formBoundary === undefined ? data.type : formContentType);\n requestContentLength = data.size;\n }\n\n // Enforce maxBodyLength against known-size bodies before dispatch using\n // the body's *actual* size — never a caller-declared Content-Length,\n // which could under-report to slip an oversized body past the check.\n // Unknown-size streams return undefined here and are counted per-chunk\n // below as fetch consumes them.\n if (hasMaxBodyLength && method !== 'get' && method !== 'head') {\n const outboundLength = await getBodyLength(data);\n if (typeof outboundLength === 'number' && isFinite(outboundLength)) {\n requestContentLength = outboundLength;\n if (outboundLength > maxBodyLength) {\n throw maxBodyLengthError();\n }\n }\n }\n\n // A streamed body under maxBodyLength must be counted as fetch consumes\n // it; its size is never trusted from a caller-declared Content-Length.\n const mustEnforceStreamBody =\n hasMaxBodyLength && (utils.isReadableStream(data) || utils.isStream(data));\n\n const trackRequestStream = (stream, onProgress, flush) =>\n trackStream(\n stream,\n DEFAULT_CHUNK_SIZE,\n (loadedBytes) => {\n if (hasMaxBodyLength && loadedBytes > maxBodyLength) {\n throw (pendingBodyError = maxBodyLengthError());\n }\n onProgress && onProgress(loadedBytes);\n },\n flush\n );\n\n if (\n supportsRequestStream &&\n method !== 'get' &&\n method !== 'head' &&\n (onUploadProgress || mustEnforceStreamBody)\n ) {\n requestContentLength =\n requestContentLength == null\n ? await resolveBodyLength(headers, data)\n : requestContentLength;\n\n // A declared length of 0 is only trusted to skip the wrap when we are\n // not enforcing a stream limit (which must not rely on that header).\n if (requestContentLength !== 0 || mustEnforceStreamBody) {\n let _request = new Request(url, {\n method: 'POST',\n body: data,\n duplex: 'half',\n });\n\n let contentTypeHeader;\n\n if (\n utils.isFormData(data) &&\n (contentTypeHeader = _request.headers.get('content-type'))\n ) {\n headers.setContentType(contentTypeHeader);\n }\n\n if (_request.body) {\n const [onProgress, flush] =\n (onUploadProgress &&\n progressEventDecorator(\n requestContentLength,\n progressEventReducer(asyncDecorator(onUploadProgress))\n )) ||\n [];\n\n data = trackRequestStream(_request.body, onProgress, flush);\n }\n }\n } else if (\n mustEnforceStreamBody &&\n !isRequestSupported &&\n isReadableStreamSupported &&\n method !== 'get' &&\n method !== 'head'\n ) {\n data = trackRequestStream(data);\n } else if (\n mustEnforceStreamBody &&\n isRequestSupported &&\n !supportsRequestStream &&\n method !== 'get' &&\n method !== 'head'\n ) {\n throw new AxiosError(\n 'Stream request bodies are not supported by the current fetch implementation',\n AxiosError.ERR_NOT_SUPPORT,\n config,\n request\n );\n }\n\n if (!utils.isString(withCredentials)) {\n withCredentials = withCredentials ? 'include' : 'omit';\n }\n\n // Cloudflare Workers throws when credentials are defined\n // see https://github.com/cloudflare/workerd/issues/902\n const isCredentialsSupported = isRequestSupported && 'credentials' in Request.prototype;\n\n // If data is FormData and Content-Type is multipart/form-data without boundary,\n // delete it so fetch can set it correctly with the boundary\n if (utils.isFormData(data)) {\n const contentType = headers.getContentType();\n if (\n contentType &&\n /^multipart\\/form-data/i.test(contentType) &&\n !/boundary=/i.test(contentType)\n ) {\n headers.delete('content-type');\n }\n }\n\n // Set User-Agent header if not already set (fetch defaults to 'node' in Node.js)\n headers.set('User-Agent', 'axios/' + VERSION, false);\n\n const safeFetchOptions =\n fetchOptions == null ? fetchOptions : Object.assign(Object.create(null), fetchOptions);\n\n if (safeFetchOptions) {\n // These options are owned by Axios and are already reflected in the\n // resolved Request passed to fetch.\n delete safeFetchOptions.body;\n delete safeFetchOptions.headers;\n delete safeFetchOptions.method;\n delete safeFetchOptions.signal;\n delete safeFetchOptions.duplex;\n delete safeFetchOptions.credentials;\n }\n\n const resolvedOptions = Object.assign(Object.create(null), safeFetchOptions, {\n signal: composedSignal,\n method: method.toUpperCase(),\n headers: toByteStringHeaderObject(headers.normalize()),\n body: data,\n duplex: 'half',\n credentials: isCredentialsSupported ? withCredentials : undefined,\n });\n\n if (isRequestSupported) {\n utils.forEach(requestDefaults, (value, key) => {\n if (resolvedOptions[key] === undefined) {\n resolvedOptions[key] = value;\n }\n });\n\n if (resolvedOptions.signal === undefined) {\n resolvedOptions.signal = null;\n }\n\n if (resolvedOptions.body === undefined) {\n resolvedOptions.body = null;\n }\n }\n\n if (maxRedirects === 0) {\n resolvedOptions.redirect = 'manual';\n\n if (safeFetchOptions) {\n safeFetchOptions.redirect = 'manual';\n }\n }\n\n request = isRequestSupported && new Request(url, resolvedOptions);\n\n let response = await (isRequestSupported\n ? _fetch(request, safeFetchOptions)\n : _fetch(url, resolvedOptions));\n\n const responseHeaders = AxiosHeaders.from(response.headers);\n\n // Cheap pre-check: if the server honestly declares a content-length that\n // already exceeds the cap, reject before we start streaming.\n if (hasMaxContentLength) {\n const declaredLength = utils.toFiniteNumber(responseHeaders.getContentLength());\n if (declaredLength != null && declaredLength > maxContentLength) {\n throw new AxiosError(\n 'maxContentLength size of ' + maxContentLength + ' exceeded',\n AxiosError.ERR_BAD_RESPONSE,\n config,\n request\n );\n }\n }\n\n const isStreamResponse =\n supportsResponseStream && (responseType === 'stream' || responseType === 'response');\n\n if (\n supportsResponseStream &&\n response.body &&\n (onDownloadProgress || hasMaxContentLength || (isStreamResponse && unsubscribe))\n ) {\n const options = {};\n\n ['status', 'statusText', 'headers'].forEach((prop) => {\n options[prop] = response[prop];\n });\n\n const responseContentLength = utils.toFiniteNumber(responseHeaders.getContentLength());\n\n const [onProgress, flush] =\n (onDownloadProgress &&\n progressEventDecorator(\n responseContentLength,\n progressEventReducer(asyncDecorator(onDownloadProgress), true)\n )) ||\n [];\n\n let bytesRead = 0;\n const onChunkProgress = (loadedBytes) => {\n if (hasMaxContentLength) {\n bytesRead = loadedBytes;\n if (bytesRead > maxContentLength) {\n throw (pendingResponseError = new AxiosError(\n 'maxContentLength size of ' + maxContentLength + ' exceeded',\n AxiosError.ERR_BAD_RESPONSE,\n config,\n request\n ));\n }\n }\n onProgress && onProgress(loadedBytes);\n };\n\n response = new Response(\n trackStream(response.body, DEFAULT_CHUNK_SIZE, onChunkProgress, () => {\n flush && flush();\n unsubscribe && unsubscribe();\n }),\n options\n );\n }\n\n responseType = responseType || 'text';\n\n let responseData = await resolvers[utils.findKey(resolvers, responseType) || 'text'](\n response,\n config\n );\n\n // Fallback enforcement for environments without ReadableStream support\n // (legacy runtimes). Detect materialized size from typed output; skip\n // streams/Response passthrough since the user will read those themselves.\n if (hasMaxContentLength && !supportsResponseStream && !isStreamResponse) {\n let materializedSize;\n if (responseData != null) {\n if (typeof responseData.byteLength === 'number') {\n materializedSize = responseData.byteLength;\n } else if (typeof responseData.size === 'number') {\n materializedSize = responseData.size;\n } else if (typeof responseData === 'string') {\n materializedSize =\n typeof TextEncoder === 'function'\n ? new TextEncoder().encode(responseData).byteLength\n : responseData.length;\n }\n }\n if (typeof materializedSize === 'number' && materializedSize > maxContentLength) {\n throw new AxiosError(\n 'maxContentLength size of ' + maxContentLength + ' exceeded',\n AxiosError.ERR_BAD_RESPONSE,\n config,\n request\n );\n }\n }\n\n !isStreamResponse && unsubscribe && unsubscribe();\n\n return await new Promise((resolve, reject) => {\n settle(resolve, reject, {\n data: responseData,\n headers: AxiosHeaders.from(response.headers),\n status: response.status,\n statusText: response.statusText,\n config,\n request,\n });\n });\n } catch (err) {\n unsubscribe && unsubscribe();\n\n // Safari can surface fetch aborts as a DOMException-like object whose\n // branded getters throw. Prefer our composed signal reason before reading\n // the caught error, preserving timeout vs cancellation semantics.\n if (composedSignal && composedSignal.aborted && composedSignal.reason instanceof AxiosError) {\n const canceledError = composedSignal.reason;\n canceledError.config = config;\n request && (canceledError.request = request);\n if (err !== canceledError) {\n // Non-enumerable to match native Error `cause` semantics so loggers\n // don't recurse into circular fetch internals (see #7205).\n Object.defineProperty(canceledError, 'cause', {\n __proto__: null,\n value: err,\n writable: true,\n enumerable: false,\n configurable: true,\n });\n }\n throw canceledError;\n }\n\n // Surface a maxBodyLength violation we raised while the request body was\n // being streamed. Keeping the original error (rather than reading\n // `err.cause.isAxiosError`) keeps the error deterministic across runtimes\n // and avoids both prototype-pollution reads and mis-attributing a foreign\n // AxiosError that merely happened to land in `err.cause`.\n if (pendingBodyError) {\n request && !pendingBodyError.request && (pendingBodyError.request = request);\n throw pendingBodyError;\n }\n\n if (pendingResponseError) {\n throw pendingResponseError;\n }\n\n // Re-throw AxiosErrors we raised synchronously (data: URL / content-length\n // pre-checks, response size enforcement) without re-wrapping them.\n if (err instanceof AxiosError) {\n request && !err.request && (err.request = request);\n throw err;\n }\n\n if (err && err.name === 'TypeError' && /Load failed|fetch/i.test(err.message)) {\n const networkError = new AxiosError(\n 'Network Error',\n AxiosError.ERR_NETWORK,\n config,\n request,\n err && err.response\n );\n // Non-enumerable to match native Error `cause` semantics so loggers\n // don't recurse into circular fetch internals (see #7205).\n Object.defineProperty(networkError, 'cause', {\n __proto__: null,\n value: err.cause || err,\n writable: true,\n enumerable: false,\n configurable: true,\n });\n throw networkError;\n }\n\n throw AxiosError.from(err, err && err.code, config, request, err && err.response);\n }\n };\n};\n\nconst seedCache = new Map();\n\nexport const getFetch = (config) => {\n const env = Object.create(null);\n const configuredEnv = config && utils.hasOwnProp(config, 'env') && config.env;\n ['fetch', 'Request', 'Response', 'Blob'].forEach((key) => {\n if (configuredEnv && utils.hasOwnProp(configuredEnv, key)) {\n env[key] = configuredEnv[key];\n }\n });\n const { fetch, Request, Response, Blob } = env;\n const seeds = [Request, Response, fetch, Blob];\n\n let len = seeds.length,\n i = len,\n seed,\n target,\n map = seedCache;\n\n while (i--) {\n seed = seeds[i];\n target = map.get(seed);\n\n target === undefined && map.set(seed, (target = i ? new Map() : factory(env)));\n\n map = target;\n }\n\n return target;\n};\n\nconst adapter = getFetch();\n\nexport default adapter;\n","import utils from '../utils.js';\nimport httpAdapter from './http.js';\nimport xhrAdapter from './xhr.js';\nimport * as fetchAdapter from './fetch.js';\nimport AxiosError from '../core/AxiosError.js';\n\n/**\n * Known adapters mapping.\n * Provides environment-specific adapters for Axios:\n * - `http` for Node.js\n * - `xhr` for browsers\n * - `fetch` for fetch API-based requests\n *\n * @type {Object}\n */\nconst knownAdapters = {\n http: httpAdapter,\n xhr: xhrAdapter,\n fetch: {\n get: fetchAdapter.getFetch,\n },\n};\n\n// Assign adapter names for easier debugging and identification\nutils.forEach(knownAdapters, (fn, value) => {\n if (fn) {\n try {\n // Null-proto descriptors so a polluted Object.prototype.get cannot turn\n // these data descriptors into accessor descriptors on the way in.\n Object.defineProperty(fn, 'name', { __proto__: null, value });\n } catch (e) {\n // eslint-disable-next-line no-empty\n }\n Object.defineProperty(fn, 'adapterName', { __proto__: null, value });\n }\n});\n\n/**\n * Render a rejection reason string for unknown or unsupported adapters\n *\n * @param {string} reason\n * @returns {string}\n */\nconst renderReason = (reason) => `- ${reason}`;\n\n/**\n * Check if the adapter is resolved (function, null, or false)\n *\n * @param {Function|null|false} adapter\n * @returns {boolean}\n */\nconst isResolvedHandle = (adapter) =>\n utils.isFunction(adapter) || adapter === null || adapter === false;\n\n/**\n * Get the first suitable adapter from the provided list.\n * Tries each adapter in order until a supported one is found.\n * Throws an AxiosError if no adapter is suitable.\n *\n * @param {Array|string|Function} adapters - Adapter(s) by name or function.\n * @param {Object} config - Axios request configuration\n * @throws {AxiosError} If no suitable adapter is available\n * @returns {Function} The resolved adapter function\n */\nfunction getAdapter(adapters, config) {\n adapters = utils.isArray(adapters) ? adapters : [adapters];\n\n const { length } = adapters;\n let nameOrAdapter;\n let adapter;\n\n const rejectedReasons = {};\n\n for (let i = 0; i < length; i++) {\n nameOrAdapter = adapters[i];\n let id;\n\n adapter = nameOrAdapter;\n\n if (!isResolvedHandle(nameOrAdapter)) {\n adapter = knownAdapters[(id = String(nameOrAdapter)).toLowerCase()];\n\n if (adapter === undefined) {\n throw new AxiosError(`Unknown adapter '${id}'`);\n }\n }\n\n if (adapter && (utils.isFunction(adapter) || (adapter = adapter.get(config)))) {\n break;\n }\n\n rejectedReasons[id || '#' + i] = adapter;\n }\n\n if (!adapter) {\n const reasons = Object.entries(rejectedReasons).map(\n ([id, state]) =>\n `adapter ${id} ` +\n (state === false ? 'is not supported by the environment' : 'is not available in the build')\n );\n\n let s = length\n ? reasons.length > 1\n ? 'since :\\n' + reasons.map(renderReason).join('\\n')\n : ' ' + renderReason(reasons[0])\n : 'as no adapter specified';\n\n throw new AxiosError(\n `There is no suitable adapter to dispatch the request ` + s,\n AxiosError.ERR_NOT_SUPPORT\n );\n }\n\n return adapter;\n}\n\n/**\n * Exports Axios adapters and utility to resolve an adapter\n */\nexport default {\n /**\n * Resolve an adapter from a list of adapter names or functions.\n * @type {Function}\n */\n getAdapter,\n\n /**\n * Exposes all known adapters\n * @type {Object}\n */\n adapters: knownAdapters,\n};\n","'use strict';\n\nimport transformData from './transformData.js';\nimport isCancel from '../cancel/isCancel.js';\nimport defaults from '../defaults/index.js';\nimport CanceledError from '../cancel/CanceledError.js';\nimport AxiosHeaders from '../core/AxiosHeaders.js';\nimport adapters from '../adapters/adapters.js';\nimport utils from '../utils.js';\n\n/**\n * Throws a `CanceledError` if cancellation has been requested.\n *\n * @param {Object} config The config that is to be used for the request\n *\n * @returns {void}\n */\nfunction throwIfCancellationRequested(config) {\n if (config.cancelToken) {\n config.cancelToken.throwIfRequested();\n }\n\n if (config.signal && config.signal.aborted) {\n throw new CanceledError(null, config);\n }\n}\n\n/**\n * Resolve the clock used to time adapter execution.\n *\n * Prefers the monotonic `performance.now()` so wall-clock adjustments do not\n * skew the measurement, and so frameworks that forbid reading the current\n * time during prerendering (e.g. Next.js Cache Components) accept it. Falls\n * back to `Date.now()` in runtimes without the High Resolution Time API.\n *\n * @returns {() => number} Millisecond clock\n */\nfunction resolveClock() {\n return typeof performance !== 'undefined' && utils.isFunction(performance.now)\n ? () => performance.now()\n : Date.now;\n}\n\n/**\n * Whole milliseconds elapsed since `start`, floored at zero.\n *\n * Rounded so the value stays an integer as with `Date.now()`. The fallback\n * wall clock can move backwards mid-request, so the result is clamped.\n *\n * @param {() => number} now Clock returned by `resolveClock()`\n * @param {number} start Timestamp read from `now`\n *\n * @returns {number} Non-negative elapsed milliseconds\n */\nfunction elapsedSince(now, start) {\n return Math.max(0, Math.round(now() - start));\n}\n\n/**\n * Dispatch a request to the server using the configured adapter.\n *\n * @param {object} config The config that is to be used for the request\n *\n * @returns {Promise} The Promise to be fulfilled\n */\nexport default function dispatchRequest(_config) {\n // Interceptors may replace the merged config with an ordinary object. Flatten\n // it at the dispatch boundary so shared prototype members cannot become\n // request behavior, while preserving intentional template/class members.\n const config = utils.toSafeFlatObject(_config);\n\n throwIfCancellationRequested(config);\n\n config.headers = AxiosHeaders.from(utils.getSafeProp(config, 'headers'));\n\n // Transform request data\n config.data = transformData.call(config, config.transformRequest);\n\n if (['post', 'put', 'patch'].indexOf(config.method) !== -1) {\n config.headers.setContentType('application/x-www-form-urlencoded', false);\n }\n\n const adapter = adapters.getAdapter(config.adapter || defaults.adapter, config);\n\n const now = resolveClock();\n const start = now();\n\n return adapter(config).then(\n function onAdapterResolution(response) {\n throwIfCancellationRequested(config);\n\n response.duration = elapsedSince(now, start);\n\n // Expose the current response on config so that transformResponse can\n // attach it to any AxiosError it throws (e.g. on JSON parse failure).\n // We clean it up afterwards to avoid polluting the config object.\n config.response = response;\n try {\n response.data = transformData.call(config, config.transformResponse, response);\n } finally {\n delete config.response;\n }\n\n response.headers = AxiosHeaders.from(response.headers);\n\n return response;\n },\n function onAdapterRejection(reason) {\n if (!isCancel(reason)) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n if (reason && reason.response) {\n reason.response.duration = elapsedSince(now, start);\n config.response = reason.response;\n try {\n reason.response.data = transformData.call(\n config,\n config.transformResponse,\n reason.response\n );\n } finally {\n delete config.response;\n }\n reason.response.headers = AxiosHeaders.from(reason.response.headers);\n }\n }\n\n return Promise.reject(reason);\n }\n );\n}\n","'use strict';\n\nimport { VERSION } from '../env/data.js';\nimport AxiosError from '../core/AxiosError.js';\n\nconst validators = {};\n\n// eslint-disable-next-line func-names\n['object', 'boolean', 'number', 'function', 'string', 'symbol'].forEach((type, i) => {\n validators[type] = function validator(thing) {\n return typeof thing === type || 'a' + (i < 1 ? 'n ' : ' ') + type;\n };\n});\n\nconst deprecatedWarnings = {};\n\n/**\n * Transitional option validator\n *\n * @param {function|boolean?} validator - set to false if the transitional option has been removed\n * @param {string?} version - deprecated version / removed since version\n * @param {string?} message - some message with additional info\n *\n * @returns {function}\n */\nvalidators.transitional = function transitional(validator, version, message) {\n function formatMessage(opt, desc) {\n return (\n '[Axios v' +\n VERSION +\n \"] Transitional option '\" +\n opt +\n \"'\" +\n desc +\n (message ? '. ' + message : '')\n );\n }\n\n // eslint-disable-next-line func-names\n return (value, opt, opts) => {\n if (validator === false) {\n throw new AxiosError(\n formatMessage(opt, ' has been removed' + (version ? ' in ' + version : '')),\n AxiosError.ERR_DEPRECATED\n );\n }\n\n if (version && !deprecatedWarnings[opt]) {\n deprecatedWarnings[opt] = true;\n // eslint-disable-next-line no-console\n console.warn(\n formatMessage(\n opt,\n ' has been deprecated since v' + version + ' and will be removed in the near future'\n )\n );\n }\n\n return validator ? validator(value, opt, opts) : true;\n };\n};\n\nvalidators.spelling = function spelling(correctSpelling) {\n return (value, opt) => {\n // eslint-disable-next-line no-console\n console.warn(`${opt} is likely a misspelling of ${correctSpelling}`);\n return true;\n };\n};\n\n/**\n * Assert object's properties type\n *\n * @param {object} options\n * @param {object} schema\n * @param {boolean?} allowUnknown\n *\n * @returns {object}\n */\n\nfunction assertOptions(options, schema, allowUnknown) {\n if (typeof options !== 'object' || options === null) {\n throw new AxiosError('options must be an object', AxiosError.ERR_BAD_OPTION_VALUE);\n }\n const keys = Object.keys(options);\n let i = keys.length;\n while (i-- > 0) {\n const opt = keys[i];\n // Use hasOwnProperty so a polluted Object.prototype. cannot supply\n // a non-function validator and cause a TypeError.\n const validator = Object.prototype.hasOwnProperty.call(schema, opt) ? schema[opt] : undefined;\n if (validator) {\n const value = options[opt];\n const result = value === undefined || validator(value, opt, options);\n if (result !== true) {\n throw new AxiosError(\n 'option ' + opt + ' must be ' + result,\n AxiosError.ERR_BAD_OPTION_VALUE\n );\n }\n continue;\n }\n if (allowUnknown !== true) {\n throw new AxiosError('Unknown option ' + opt, AxiosError.ERR_BAD_OPTION);\n }\n }\n}\n\nexport default {\n assertOptions,\n validators,\n};\n","'use strict';\n\nimport utils from '../utils.js';\nimport buildURL from '../helpers/buildURL.js';\nimport InterceptorManager from './InterceptorManager.js';\nimport dispatchRequest from './dispatchRequest.js';\nimport mergeConfig from './mergeConfig.js';\nimport buildFullPath from './buildFullPath.js';\nimport methodList from './methodList.js';\nimport validator from '../helpers/validator.js';\nimport AxiosHeaders from './AxiosHeaders.js';\nimport transitionalDefaults from '../defaults/transitional.js';\nimport { getCauseStackIndex } from './AxiosError.js';\n\nconst validators = validator.validators;\n\n// Recognize header maps without consuming objects intended as literal values.\n// AxiosHeaders from other builds share a brand and header-container interface,\n// but not constructor identity. A tag and toJSON alone can describe a literal.\nconst isHeadersBucket = (value) => {\n if (value == null || utils.isPlainObject(value) || value instanceof AxiosHeaders) {\n return true;\n }\n\n try {\n return (\n utils.isObject(value) &&\n utils.getSafeProp(value, Symbol.toStringTag) === 'AxiosHeaders' &&\n [\n 'toJSON',\n 'set',\n 'get',\n 'has',\n 'delete',\n 'clear',\n 'normalize',\n 'concat',\n 'toString',\n Symbol.iterator,\n ].every((method) => utils.isFunction(utils.getSafeProp(value, method)))\n );\n } catch (e) {\n // A failed optional brand probe must not prevent literal header serialization.\n return false;\n }\n};\n\n/**\n * Create a new instance of Axios\n *\n * @param {Object} instanceConfig The default config for the instance\n *\n * @return {Axios} A new instance of Axios\n */\nclass Axios {\n constructor(instanceConfig) {\n this.defaults = instanceConfig || {};\n this.interceptors = {\n request: new InterceptorManager(),\n response: new InterceptorManager(),\n };\n }\n\n /**\n * Dispatch a request\n *\n * @param {String|Object} configOrUrl The config specific for this request (merged with this.defaults)\n * @param {?Object} config\n *\n * @returns {Promise} The Promise to be fulfilled\n */\n async request(configOrUrl, config) {\n try {\n return await this._request(configOrUrl, config);\n } catch (err) {\n if (err instanceof Error) {\n try {\n let dummy = {};\n\n Error.captureStackTrace ? Error.captureStackTrace(dummy) : (dummy = new Error());\n\n const dummyStack = dummy.stack;\n let stack = '';\n\n // slice off the Error: ... line\n if (typeof dummyStack === 'string') {\n const firstNewlineIndex = dummyStack.indexOf('\\n');\n\n stack = firstNewlineIndex === -1 ? '' : dummyStack.slice(firstNewlineIndex + 1);\n }\n\n if (!err.stack) {\n err.stack = stack;\n } else if (stack) {\n // Match a common suffix after the 2 top frames when available,\n // otherwise compare the full reconstructed stack.\n const firstNewlineIndex = stack.indexOf('\\n');\n const secondNewlineIndex =\n firstNewlineIndex === -1 ? -1 : stack.indexOf('\\n', firstNewlineIndex + 1);\n const duplicateCheckSuffix =\n secondNewlineIndex === -1 ? stack : stack.slice(secondNewlineIndex + 1);\n\n // `AxiosError.from()` may have already inlined the wrapped error's\n // stack under a `Caused by:` marker. Keep the reconstructed caller\n // frames ahead of that marker so stack-only reporters do not read\n // them as part of the low-level cause.\n const currentStack = String(err.stack);\n const causeIndex = getCauseStackIndex(err, currentStack);\n const stackHead = causeIndex === -1 ? currentStack : currentStack.slice(0, causeIndex);\n const causeSection = causeIndex === -1 ? '' : currentStack.slice(causeIndex);\n\n if (!stackHead.endsWith(duplicateCheckSuffix)) {\n err.stack = stackHead + '\\n' + stack + causeSection;\n }\n }\n } catch (e) {\n // Ignore failures from custom stack hooks or un-writable stack properties.\n }\n }\n\n throw err;\n }\n }\n\n _request(configOrUrl, config) {\n /*eslint no-param-reassign:0*/\n // Allow for axios('example/url'[, config]) a la fetch API\n if (typeof configOrUrl === 'string') {\n config = config || {};\n config.url = configOrUrl;\n } else {\n config = configOrUrl || {};\n }\n\n config = mergeConfig(this.defaults, config);\n\n const { transitional, paramsSerializer, headers } = config;\n\n if (transitional !== undefined) {\n validator.assertOptions(\n transitional,\n {\n silentJSONParsing: validators.transitional(validators.boolean),\n forcedJSONParsing: validators.transitional(validators.boolean),\n clarifyTimeoutError: validators.transitional(validators.boolean),\n legacyInterceptorReqResOrdering: validators.transitional(validators.boolean),\n advertiseZstdAcceptEncoding: validators.transitional(validators.boolean),\n validateStatusUndefinedResolves: validators.transitional(validators.boolean),\n encodeBasicAuthUsername: validators.transitional(validators.boolean),\n },\n false\n );\n }\n\n if (paramsSerializer != null) {\n if (utils.isFunction(paramsSerializer)) {\n config.paramsSerializer = {\n serialize: paramsSerializer,\n };\n } else {\n validator.assertOptions(\n paramsSerializer,\n {\n encode: validators.function,\n serialize: validators.function,\n },\n true\n );\n }\n }\n\n // Set config.allowAbsoluteUrls\n if (config.allowAbsoluteUrls !== undefined) {\n // do nothing\n } else if (\n utils.hasOwnProp(this.defaults, 'allowAbsoluteUrls') &&\n this.defaults.allowAbsoluteUrls !== undefined\n ) {\n config.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls;\n } else {\n config.allowAbsoluteUrls = true;\n }\n\n validator.assertOptions(\n config,\n {\n baseUrl: validators.spelling('baseURL'),\n withXsrfToken: validators.spelling('withXSRFToken'),\n },\n true\n );\n\n // Set config.method\n config.method = (\n utils.getSafeProp(config, 'method') ||\n utils.getSafeProp(this.defaults, 'method') ||\n 'get'\n ).toLowerCase();\n\n // Flatten header defaults without consuming literal method-named headers.\n const commonHeaders = utils.getSafeProp(headers, 'common');\n const methodHeaders = utils.getSafeProp(headers, config.method);\n const contextHeaders =\n headers &&\n utils.merge(\n isHeadersBucket(commonHeaders) ? commonHeaders : undefined,\n isHeadersBucket(methodHeaders) ? methodHeaders : undefined\n );\n\n headers &&\n utils.forEach(methodList.concat('common'), (method) => {\n if (isHeadersBucket(utils.getSafeProp(headers, method))) {\n delete headers[method];\n }\n });\n\n config.headers = AxiosHeaders.concat(contextHeaders, headers);\n\n // filter out skipped interceptors\n const requestInterceptorChain = [];\n let synchronousRequestInterceptors = true;\n this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {\n if (typeof interceptor.runWhen === 'function' && interceptor.runWhen(config) === false) {\n return;\n }\n\n synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous;\n\n const transitional = config.transitional || transitionalDefaults;\n const legacyInterceptorReqResOrdering =\n transitional && transitional.legacyInterceptorReqResOrdering;\n\n if (legacyInterceptorReqResOrdering) {\n requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected);\n } else {\n requestInterceptorChain.push(interceptor.fulfilled, interceptor.rejected);\n }\n });\n\n const responseInterceptorChain = [];\n this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {\n responseInterceptorChain.push(interceptor.fulfilled, interceptor.rejected);\n });\n\n let promise;\n let i = 0;\n let len;\n\n if (!synchronousRequestInterceptors) {\n const chain = [dispatchRequest.bind(this), undefined];\n chain.unshift(...requestInterceptorChain);\n chain.push(...responseInterceptorChain);\n len = chain.length;\n\n promise = Promise.resolve(config);\n\n while (i < len) {\n promise = promise.then(chain[i++], chain[i++]);\n }\n\n return promise;\n }\n\n len = requestInterceptorChain.length;\n\n let newConfig = config;\n\n while (i < len) {\n const onFulfilled = requestInterceptorChain[i++];\n const onRejected = requestInterceptorChain[i++];\n try {\n newConfig = onFulfilled ? onFulfilled(newConfig) : newConfig;\n } catch (error) {\n if (!onRejected) {\n promise = Promise.reject(error);\n break;\n }\n\n try {\n const rejectedResult = onRejected.call(this, error);\n\n if (utils.isThenable(rejectedResult)) {\n promise = Promise.resolve(rejectedResult).then(() =>\n dispatchRequest.call(this, newConfig)\n );\n }\n } catch (rejectedError) {\n promise = Promise.reject(rejectedError);\n }\n\n break;\n }\n }\n\n if (!promise) {\n try {\n promise = dispatchRequest.call(this, newConfig);\n } catch (error) {\n promise = Promise.reject(error);\n }\n }\n\n i = 0;\n len = responseInterceptorChain.length;\n\n while (i < len) {\n promise = promise.then(responseInterceptorChain[i++], responseInterceptorChain[i++]);\n }\n\n return promise;\n }\n\n getUri(config) {\n config = mergeConfig(this.defaults, config);\n const fullPath = buildFullPath(config.baseURL, config.url, config.allowAbsoluteUrls, config);\n return buildURL(fullPath, config.params, config.paramsSerializer);\n }\n}\n\n// Provide aliases for supported request methods\nutils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {\n /*eslint func-names:0*/\n Axios.prototype[method] = async function (url, config) {\n return this.request(\n mergeConfig(config || {}, {\n method,\n url,\n data: config && utils.hasOwnProp(config, 'data') ? config.data : undefined,\n })\n );\n };\n});\n\nutils.forEach(['post', 'put', 'patch', 'query'], function forEachMethodWithData(method) {\n function generateHTTPMethod(isForm) {\n return async function httpMethod(url, data, config) {\n return this.request(\n mergeConfig(config || {}, {\n method,\n headers: isForm\n ? {\n 'Content-Type': 'multipart/form-data',\n }\n : {},\n url,\n data,\n })\n );\n };\n }\n\n Axios.prototype[method] = generateHTTPMethod();\n\n // QUERY is a safe/idempotent read method; multipart form bodies don't fit\n // its semantics, so no queryForm shorthand is generated.\n if (method !== 'query') {\n Axios.prototype[method + 'Form'] = generateHTTPMethod(true);\n }\n});\n\nexport default Axios;\n","'use strict';\n\nimport CanceledError from './CanceledError.js';\n\n/**\n * A `CancelToken` is an object that can be used to request cancellation of an operation.\n *\n * @param {Function} executor The executor function.\n *\n * @returns {CancelToken}\n */\nclass CancelToken {\n constructor(executor) {\n if (typeof executor !== 'function') {\n throw new TypeError('executor must be a function.');\n }\n\n let resolvePromise;\n\n this.promise = new Promise(function promiseExecutor(resolve) {\n resolvePromise = resolve;\n });\n\n const token = this;\n\n // eslint-disable-next-line func-names\n this.promise.then((cancel) => {\n if (!token._listeners) return;\n\n let i = token._listeners.length;\n\n while (i-- > 0) {\n token._listeners[i](cancel);\n }\n token._listeners = null;\n });\n\n // eslint-disable-next-line func-names\n this.promise.then = (onfulfilled) => {\n let _resolve;\n // eslint-disable-next-line func-names\n const promise = new Promise((resolve) => {\n token.subscribe(resolve);\n _resolve = resolve;\n }).then(onfulfilled);\n\n promise.cancel = function reject() {\n token.unsubscribe(_resolve);\n };\n\n return promise;\n };\n\n executor(function cancel(message, config, request) {\n if (token.reason) {\n // Cancellation has already been requested\n return;\n }\n\n token.reason = new CanceledError(message, config, request);\n resolvePromise(token.reason);\n });\n }\n\n /**\n * Throws a `CanceledError` if cancellation has been requested.\n */\n throwIfRequested() {\n if (this.reason) {\n throw this.reason;\n }\n }\n\n /**\n * Subscribe to the cancel signal\n */\n\n subscribe(listener) {\n if (this.reason) {\n listener(this.reason);\n return;\n }\n\n if (this._listeners) {\n this._listeners.push(listener);\n } else {\n this._listeners = [listener];\n }\n }\n\n /**\n * Unsubscribe from the cancel signal\n */\n\n unsubscribe(listener) {\n if (!this._listeners) {\n return;\n }\n const index = this._listeners.indexOf(listener);\n if (index !== -1) {\n this._listeners.splice(index, 1);\n }\n }\n\n toAbortSignal() {\n const controller = new AbortController();\n\n const abort = (err) => {\n controller.abort(err);\n };\n\n this.subscribe(abort);\n\n controller.signal.unsubscribe = () => this.unsubscribe(abort);\n\n return controller.signal;\n }\n\n /**\n * Returns an object that contains a new `CancelToken` and a function that, when called,\n * cancels the `CancelToken`.\n */\n static source() {\n let cancel;\n const token = new CancelToken(function executor(c) {\n cancel = c;\n });\n return {\n token,\n cancel,\n };\n }\n}\n\nexport default CancelToken;\n","'use strict';\n\n/**\n * Syntactic sugar for invoking a function and expanding an array for arguments.\n *\n * Common use case would be to use `Function.prototype.apply`.\n *\n * ```js\n * function f(x, y, z) {}\n * const args = [1, 2, 3];\n * f.apply(null, args);\n * ```\n *\n * With `spread` this example can be re-written.\n *\n * ```js\n * spread(function(x, y, z) {})([1, 2, 3]);\n * ```\n *\n * @param {Function} callback\n *\n * @returns {Function}\n */\nexport default function spread(callback) {\n return function wrap(arr) {\n return callback.apply(null, arr);\n };\n}\n","'use strict';\n\nimport utils from '../utils.js';\n\n/**\n * Determines whether the payload is an error thrown by Axios\n *\n * @param {*} payload The value to test\n *\n * @returns {boolean} True if the payload is an error thrown by Axios, otherwise false\n */\nexport default function isAxiosError(payload) {\n return utils.isObject(payload) && payload.isAxiosError === true;\n}\n","const HttpStatusCode = {\n Continue: 100,\n SwitchingProtocols: 101,\n Processing: 102,\n EarlyHints: 103,\n Ok: 200,\n Created: 201,\n Accepted: 202,\n NonAuthoritativeInformation: 203,\n NoContent: 204,\n ResetContent: 205,\n PartialContent: 206,\n MultiStatus: 207,\n AlreadyReported: 208,\n ImUsed: 226,\n MultipleChoices: 300,\n MovedPermanently: 301,\n Found: 302,\n SeeOther: 303,\n NotModified: 304,\n UseProxy: 305,\n Unused: 306,\n TemporaryRedirect: 307,\n PermanentRedirect: 308,\n BadRequest: 400,\n Unauthorized: 401,\n PaymentRequired: 402,\n Forbidden: 403,\n NotFound: 404,\n MethodNotAllowed: 405,\n NotAcceptable: 406,\n ProxyAuthenticationRequired: 407,\n RequestTimeout: 408,\n Conflict: 409,\n Gone: 410,\n LengthRequired: 411,\n PreconditionFailed: 412,\n /**\n * @deprecated Use `ContentTooLarge` instead.\n */\n PayloadTooLarge: 413,\n ContentTooLarge: 413,\n UriTooLong: 414,\n UnsupportedMediaType: 415,\n RangeNotSatisfiable: 416,\n ExpectationFailed: 417,\n ImATeapot: 418,\n MisdirectedRequest: 421,\n /**\n * @deprecated Use `UnprocessableContent` instead.\n */\n UnprocessableEntity: 422,\n UnprocessableContent: 422,\n Locked: 423,\n FailedDependency: 424,\n TooEarly: 425,\n UpgradeRequired: 426,\n PreconditionRequired: 428,\n TooManyRequests: 429,\n RequestHeaderFieldsTooLarge: 431,\n UnavailableForLegalReasons: 451,\n InternalServerError: 500,\n NotImplemented: 501,\n BadGateway: 502,\n ServiceUnavailable: 503,\n GatewayTimeout: 504,\n HttpVersionNotSupported: 505,\n VariantAlsoNegotiates: 506,\n InsufficientStorage: 507,\n LoopDetected: 508,\n NotExtended: 510,\n NetworkAuthenticationRequired: 511,\n WebServerReturnsAnUnknownError: 520,\n WebServerIsDown: 521,\n ConnectionTimedOut: 522,\n OriginIsUnreachable: 523,\n TimeoutOccurred: 524,\n SslHandshakeFailed: 525,\n InvalidSslCertificate: 526,\n};\n\nObject.entries(HttpStatusCode).forEach(([key, value]) => {\n if (HttpStatusCode[value] === undefined) {\n HttpStatusCode[value] = key;\n }\n});\n\nexport default HttpStatusCode;\n","'use strict';\n\nimport utils from './utils.js';\nimport bind from './helpers/bind.js';\nimport Axios from './core/Axios.js';\nimport mergeConfig from './core/mergeConfig.js';\nimport defaults from './defaults/index.js';\nimport formDataToJSON from './helpers/formDataToJSON.js';\nimport CanceledError from './cancel/CanceledError.js';\nimport CancelToken from './cancel/CancelToken.js';\nimport isCancel from './cancel/isCancel.js';\nimport { VERSION } from './env/data.js';\nimport toFormData from './helpers/toFormData.js';\nimport AxiosError from './core/AxiosError.js';\nimport spread from './helpers/spread.js';\nimport isAxiosError from './helpers/isAxiosError.js';\nimport AxiosHeaders from './core/AxiosHeaders.js';\nimport adapters from './adapters/adapters.js';\nimport HttpStatusCode from './helpers/HttpStatusCode.js';\n\n/**\n * Create an instance of Axios\n *\n * @param {Object} defaultConfig The default config for the instance\n *\n * @returns {Axios} A new instance of Axios\n */\nfunction createInstance(defaultConfig) {\n const context = new Axios(defaultConfig);\n const instance = bind(Axios.prototype.request, context);\n\n // Copy axios.prototype to instance\n utils.extend(instance, Axios.prototype, context, { allOwnKeys: true });\n\n // Copy context to instance\n utils.extend(instance, context, null, { allOwnKeys: true });\n\n // Factory for creating new instances\n instance.create = function create(instanceConfig) {\n return createInstance(mergeConfig(defaultConfig, instanceConfig));\n };\n\n return instance;\n}\n\n// Create the default instance to be exported\nconst axios = createInstance(defaults);\n\n// Expose Axios class to allow class inheritance\naxios.Axios = Axios;\n\n// Expose Cancel & CancelToken\naxios.CanceledError = CanceledError;\naxios.CancelToken = CancelToken;\naxios.isCancel = isCancel;\naxios.VERSION = VERSION;\naxios.toFormData = toFormData;\n\n// Expose AxiosError class\naxios.AxiosError = AxiosError;\n\n// alias for CanceledError for backward compatibility\naxios.Cancel = axios.CanceledError;\n\n// Expose all/spread\naxios.all = function all(promises) {\n return Promise.all(promises);\n};\n\naxios.spread = spread;\n\n// Expose isAxiosError\naxios.isAxiosError = isAxiosError;\n\n// Expose mergeConfig\naxios.mergeConfig = mergeConfig;\n\naxios.AxiosHeaders = AxiosHeaders;\n\naxios.formToJSON = (thing) => formDataToJSON(utils.isHTMLForm(thing) ? new FormData(thing) : thing);\n\naxios.getAdapter = adapters.getAdapter;\n\naxios.HttpStatusCode = HttpStatusCode;\n\naxios.default = axios;\n\n// this module should only have a default export\nexport default axios;\n","import axios from './lib/axios.js';\n\n// This module is intended to unwrap Axios default export as named.\n// Keep top-level export same with static properties\n// so that it can keep same with es module or cjs\nconst {\n Axios,\n AxiosError,\n CanceledError,\n isCancel,\n CancelToken,\n VERSION,\n all,\n Cancel,\n isAxiosError,\n spread,\n toFormData,\n AxiosHeaders,\n HttpStatusCode,\n formToJSON,\n getAdapter,\n mergeConfig,\n create,\n} = axios;\n\nexport {\n axios as default,\n create,\n Axios,\n AxiosError,\n CanceledError,\n isCancel,\n CancelToken,\n VERSION,\n all,\n Cancel,\n isAxiosError,\n spread,\n toFormData,\n AxiosHeaders,\n HttpStatusCode,\n formToJSON,\n getAdapter,\n mergeConfig,\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AASA,SAAwB,KAAK,IAAI,SAAS;CACxC,OAAO,SAAS,OAAO;EACrB,OAAO,GAAG,MAAM,SAAS,SAAS;CACpC;AACF;;;ACPA,IAAM,EAAE,aAAa,OAAO;AAC5B,IAAM,EAAE,mBAAmB;AAC3B,IAAM,EAAE,UAAU,gBAAgB;AAGlC,IAAM,mBACH,EAAE,sBACF,KAAK,SACJ,eAAe,KAAK,KAAK,IAAI,EAAA,CAC/B,OAAO,SAAS;AAElB,IAAM,qBAAqB,SACzB,OAAO,SAAS,aACf,SAAS,eAAe,SAAS,iBAAiB,SAAS;;;;;;;;;;;;;;;AAgB9D,IAAM,uBAAuB,KAAK,WAAW,WAC3C,QAAQ,OAAO,aAAc,CAAC,UAAU,cAAc;;;;;;;;;;;AAYxD,IAAM,yBAAyB,QAAQ;CACrC,IAAI,CAAC,OAAO,aAAa,GAAG,GAC1B,OAAO;CAGT,MAAM,QAAQ,OAAO,oBAAoB,GAAG;CAE5C,IAAI,OAAO,uBACT,MAAM,KAAK,GAAG,OAAO,sBAAsB,GAAG,CAAC;CAGjD,OAAO,MAAM,OAAO,SAAS;EAC3B,IAAI,kBAAkB,IAAI,GACxB,OAAO;EAGT,MAAM,aAAa,OAAO,yBAAyB,KAAK,IAAI;EAE5D,OAAO,CAAC,CAAC,cAAc,WAAW,gBAAgB,WAAW,aAAa;CAC5E,CAAC;AACH;;;;;;;;;;;;;AAcA,IAAM,0B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A,aACA,SACA,KACA,QACA,cACA,QACA,YACA,cACA,gBACA,YACA,YACA,aACA,WACE"} \ No newline at end of file diff --git a/node_modules/agent-base/README.md b/node_modules/agent-base/README.md new file mode 100644 index 0000000..256f1f3 --- /dev/null +++ b/node_modules/agent-base/README.md @@ -0,0 +1,145 @@ +agent-base +========== +### Turn a function into an [`http.Agent`][http.Agent] instance +[![Build Status](https://github.com/TooTallNate/node-agent-base/workflows/Node%20CI/badge.svg)](https://github.com/TooTallNate/node-agent-base/actions?workflow=Node+CI) + +This module provides an `http.Agent` generator. That is, you pass it an async +callback function, and it returns a new `http.Agent` instance that will invoke the +given callback function when sending outbound HTTP requests. + +#### Some subclasses: + +Here's some more interesting uses of `agent-base`. +Send a pull request to list yours! + + * [`http-proxy-agent`][http-proxy-agent]: An HTTP(s) proxy `http.Agent` implementation for HTTP endpoints + * [`https-proxy-agent`][https-proxy-agent]: An HTTP(s) proxy `http.Agent` implementation for HTTPS endpoints + * [`pac-proxy-agent`][pac-proxy-agent]: A PAC file proxy `http.Agent` implementation for HTTP and HTTPS + * [`socks-proxy-agent`][socks-proxy-agent]: A SOCKS proxy `http.Agent` implementation for HTTP and HTTPS + + +Installation +------------ + +Install with `npm`: + +``` bash +$ npm install agent-base +``` + + +Example +------- + +Here's a minimal example that creates a new `net.Socket` connection to the server +for every HTTP request (i.e. the equivalent of `agent: false` option): + +```js +var net = require('net'); +var tls = require('tls'); +var url = require('url'); +var http = require('http'); +var agent = require('agent-base'); + +var endpoint = 'http://nodejs.org/api/'; +var parsed = url.parse(endpoint); + +// This is the important part! +parsed.agent = agent(function (req, opts) { + var socket; + // `secureEndpoint` is true when using the https module + if (opts.secureEndpoint) { + socket = tls.connect(opts); + } else { + socket = net.connect(opts); + } + return socket; +}); + +// Everything else works just like normal... +http.get(parsed, function (res) { + console.log('"response" event!', res.headers); + res.pipe(process.stdout); +}); +``` + +Returning a Promise or using an `async` function is also supported: + +```js +agent(async function (req, opts) { + await sleep(1000); + // etc… +}); +``` + +Return another `http.Agent` instance to "pass through" the responsibility +for that HTTP request to that agent: + +```js +agent(function (req, opts) { + return opts.secureEndpoint ? https.globalAgent : http.globalAgent; +}); +``` + + +API +--- + +## Agent(Function callback[, Object options]) → [http.Agent][] + +Creates a base `http.Agent` that will execute the callback function `callback` +for every HTTP request that it is used as the `agent` for. The callback function +is responsible for creating a `stream.Duplex` instance of some kind that will be +used as the underlying socket in the HTTP request. + +The `options` object accepts the following properties: + + * `timeout` - Number - Timeout for the `callback()` function in milliseconds. Defaults to Infinity (optional). + +The callback function should have the following signature: + +### callback(http.ClientRequest req, Object options, Function cb) → undefined + +The ClientRequest `req` can be accessed to read request headers and +and the path, etc. The `options` object contains the options passed +to the `http.request()`/`https.request()` function call, and is formatted +to be directly passed to `net.connect()`/`tls.connect()`, or however +else you want a Socket to be created. Pass the created socket to +the callback function `cb` once created, and the HTTP request will +continue to proceed. + +If the `https` module is used to invoke the HTTP request, then the +`secureEndpoint` property on `options` _will be set to `true`_. + + +License +------- + +(The MIT License) + +Copyright (c) 2013 Nathan Rajlich <nathan@tootallnate.net> + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +'Software'), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +[http-proxy-agent]: https://github.com/TooTallNate/node-http-proxy-agent +[https-proxy-agent]: https://github.com/TooTallNate/node-https-proxy-agent +[pac-proxy-agent]: https://github.com/TooTallNate/node-pac-proxy-agent +[socks-proxy-agent]: https://github.com/TooTallNate/node-socks-proxy-agent +[http.Agent]: https://nodejs.org/api/http.html#http_class_http_agent diff --git a/node_modules/agent-base/dist/src/index.d.ts b/node_modules/agent-base/dist/src/index.d.ts new file mode 100644 index 0000000..bc4ab74 --- /dev/null +++ b/node_modules/agent-base/dist/src/index.d.ts @@ -0,0 +1,78 @@ +/// +import net from 'net'; +import http from 'http'; +import https from 'https'; +import { Duplex } from 'stream'; +import { EventEmitter } from 'events'; +declare function createAgent(opts?: createAgent.AgentOptions): createAgent.Agent; +declare function createAgent(callback: createAgent.AgentCallback, opts?: createAgent.AgentOptions): createAgent.Agent; +declare namespace createAgent { + interface ClientRequest extends http.ClientRequest { + _last?: boolean; + _hadError?: boolean; + method: string; + } + interface AgentRequestOptions { + host?: string; + path?: string; + port: number; + } + interface HttpRequestOptions extends AgentRequestOptions, Omit { + secureEndpoint: false; + } + interface HttpsRequestOptions extends AgentRequestOptions, Omit { + secureEndpoint: true; + } + type RequestOptions = HttpRequestOptions | HttpsRequestOptions; + type AgentLike = Pick | http.Agent; + type AgentCallbackReturn = Duplex | AgentLike; + type AgentCallbackCallback = (err?: Error | null, socket?: createAgent.AgentCallbackReturn) => void; + type AgentCallbackPromise = (req: createAgent.ClientRequest, opts: createAgent.RequestOptions) => createAgent.AgentCallbackReturn | Promise; + type AgentCallback = typeof Agent.prototype.callback; + type AgentOptions = { + timeout?: number; + }; + /** + * Base `http.Agent` implementation. + * No pooling/keep-alive is implemented by default. + * + * @param {Function} callback + * @api public + */ + class Agent extends EventEmitter { + timeout: number | null; + maxFreeSockets: number; + maxTotalSockets: number; + maxSockets: number; + sockets: { + [key: string]: net.Socket[]; + }; + freeSockets: { + [key: string]: net.Socket[]; + }; + requests: { + [key: string]: http.IncomingMessage[]; + }; + options: https.AgentOptions; + private promisifiedCallback?; + private explicitDefaultPort?; + private explicitProtocol?; + constructor(callback?: createAgent.AgentCallback | createAgent.AgentOptions, _opts?: createAgent.AgentOptions); + get defaultPort(): number; + set defaultPort(v: number); + get protocol(): string; + set protocol(v: string); + callback(req: createAgent.ClientRequest, opts: createAgent.RequestOptions, fn: createAgent.AgentCallbackCallback): void; + callback(req: createAgent.ClientRequest, opts: createAgent.RequestOptions): createAgent.AgentCallbackReturn | Promise; + /** + * Called by node-core's "_http_client.js" module when creating + * a new HTTP request with this Agent instance. + * + * @api public + */ + addRequest(req: ClientRequest, _opts: RequestOptions): void; + freeSocket(socket: net.Socket, opts: AgentOptions): void; + destroy(): void; + } +} +export = createAgent; diff --git a/node_modules/agent-base/dist/src/index.js b/node_modules/agent-base/dist/src/index.js new file mode 100644 index 0000000..bfd9e22 --- /dev/null +++ b/node_modules/agent-base/dist/src/index.js @@ -0,0 +1,203 @@ +"use strict"; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +const events_1 = require("events"); +const debug_1 = __importDefault(require("debug")); +const promisify_1 = __importDefault(require("./promisify")); +const debug = debug_1.default('agent-base'); +function isAgent(v) { + return Boolean(v) && typeof v.addRequest === 'function'; +} +function isSecureEndpoint() { + const { stack } = new Error(); + if (typeof stack !== 'string') + return false; + return stack.split('\n').some(l => l.indexOf('(https.js:') !== -1 || l.indexOf('node:https:') !== -1); +} +function createAgent(callback, opts) { + return new createAgent.Agent(callback, opts); +} +(function (createAgent) { + /** + * Base `http.Agent` implementation. + * No pooling/keep-alive is implemented by default. + * + * @param {Function} callback + * @api public + */ + class Agent extends events_1.EventEmitter { + constructor(callback, _opts) { + super(); + let opts = _opts; + if (typeof callback === 'function') { + this.callback = callback; + } + else if (callback) { + opts = callback; + } + // Timeout for the socket to be returned from the callback + this.timeout = null; + if (opts && typeof opts.timeout === 'number') { + this.timeout = opts.timeout; + } + // These aren't actually used by `agent-base`, but are required + // for the TypeScript definition files in `@types/node` :/ + this.maxFreeSockets = 1; + this.maxSockets = 1; + this.maxTotalSockets = Infinity; + this.sockets = {}; + this.freeSockets = {}; + this.requests = {}; + this.options = {}; + } + get defaultPort() { + if (typeof this.explicitDefaultPort === 'number') { + return this.explicitDefaultPort; + } + return isSecureEndpoint() ? 443 : 80; + } + set defaultPort(v) { + this.explicitDefaultPort = v; + } + get protocol() { + if (typeof this.explicitProtocol === 'string') { + return this.explicitProtocol; + } + return isSecureEndpoint() ? 'https:' : 'http:'; + } + set protocol(v) { + this.explicitProtocol = v; + } + callback(req, opts, fn) { + throw new Error('"agent-base" has no default implementation, you must subclass and override `callback()`'); + } + /** + * Called by node-core's "_http_client.js" module when creating + * a new HTTP request with this Agent instance. + * + * @api public + */ + addRequest(req, _opts) { + const opts = Object.assign({}, _opts); + if (typeof opts.secureEndpoint !== 'boolean') { + opts.secureEndpoint = isSecureEndpoint(); + } + if (opts.host == null) { + opts.host = 'localhost'; + } + if (opts.port == null) { + opts.port = opts.secureEndpoint ? 443 : 80; + } + if (opts.protocol == null) { + opts.protocol = opts.secureEndpoint ? 'https:' : 'http:'; + } + if (opts.host && opts.path) { + // If both a `host` and `path` are specified then it's most + // likely the result of a `url.parse()` call... we need to + // remove the `path` portion so that `net.connect()` doesn't + // attempt to open that as a unix socket file. + delete opts.path; + } + delete opts.agent; + delete opts.hostname; + delete opts._defaultAgent; + delete opts.defaultPort; + delete opts.createConnection; + // Hint to use "Connection: close" + // XXX: non-documented `http` module API :( + req._last = true; + req.shouldKeepAlive = false; + let timedOut = false; + let timeoutId = null; + const timeoutMs = opts.timeout || this.timeout; + const onerror = (err) => { + if (req._hadError) + return; + req.emit('error', err); + // For Safety. Some additional errors might fire later on + // and we need to make sure we don't double-fire the error event. + req._hadError = true; + }; + const ontimeout = () => { + timeoutId = null; + timedOut = true; + const err = new Error(`A "socket" was not created for HTTP request before ${timeoutMs}ms`); + err.code = 'ETIMEOUT'; + onerror(err); + }; + const callbackError = (err) => { + if (timedOut) + return; + if (timeoutId !== null) { + clearTimeout(timeoutId); + timeoutId = null; + } + onerror(err); + }; + const onsocket = (socket) => { + if (timedOut) + return; + if (timeoutId != null) { + clearTimeout(timeoutId); + timeoutId = null; + } + if (isAgent(socket)) { + // `socket` is actually an `http.Agent` instance, so + // relinquish responsibility for this `req` to the Agent + // from here on + debug('Callback returned another Agent instance %o', socket.constructor.name); + socket.addRequest(req, opts); + return; + } + if (socket) { + socket.once('free', () => { + this.freeSocket(socket, opts); + }); + req.onSocket(socket); + return; + } + const err = new Error(`no Duplex stream was returned to agent-base for \`${req.method} ${req.path}\``); + onerror(err); + }; + if (typeof this.callback !== 'function') { + onerror(new Error('`callback` is not defined')); + return; + } + if (!this.promisifiedCallback) { + if (this.callback.length >= 3) { + debug('Converting legacy callback function to promise'); + this.promisifiedCallback = promisify_1.default(this.callback); + } + else { + this.promisifiedCallback = this.callback; + } + } + if (typeof timeoutMs === 'number' && timeoutMs > 0) { + timeoutId = setTimeout(ontimeout, timeoutMs); + } + if ('port' in opts && typeof opts.port !== 'number') { + opts.port = Number(opts.port); + } + try { + debug('Resolving socket for %o request: %o', opts.protocol, `${req.method} ${req.path}`); + Promise.resolve(this.promisifiedCallback(req, opts)).then(onsocket, callbackError); + } + catch (err) { + Promise.reject(err).catch(callbackError); + } + } + freeSocket(socket, opts) { + debug('Freeing socket %o %o', socket.constructor.name, opts); + socket.destroy(); + } + destroy() { + debug('Destroying agent %o', this.constructor.name); + } + } + createAgent.Agent = Agent; + // So that `instanceof` works correctly + createAgent.prototype = createAgent.Agent.prototype; +})(createAgent || (createAgent = {})); +module.exports = createAgent; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/agent-base/dist/src/index.js.map b/node_modules/agent-base/dist/src/index.js.map new file mode 100644 index 0000000..bd118ab --- /dev/null +++ b/node_modules/agent-base/dist/src/index.js.map @@ -0,0 +1 @@ +{"version":3,"file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I,CAAC,CAAC,CAAC,IAAI,CACxD,QAAQ,EACR,aAAa,CACb,CAAC;aACF;YAAC,OAAO,GAAG,EAAE;gBACb,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC;aACzC;QACF,CAAC;QAED,UAAU,CAAC,MAAkB,EAAE,IAAkB;YAChD,KAAK,CAAC,sBAAsB,EAAE,MAAM,CAAC,WAAW,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;YAC7D,MAAM,CAAC,OAAO,EAAE,CAAC;QAClB,CAAC;QAED,OAAO;YACN,KAAK,CAAC,qBAAqB,EAAE,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;QACrD,CAAC;KACD;IAxPY,iBAAK,QAwPjB,CAAA;IAED,uCAAuC;IACvC,WAAW,CAAC,SAAS,GAAG,WAAW,CAAC,KAAK,CAAC,SAAS,CAAC;AACrD,CAAC,EAtTS,WAAW,KAAX,WAAW,QAsTpB;AAED,iBAAS,WAAW,CAAC"} \ No newline at end of file diff --git a/node_modules/agent-base/dist/src/promisify.d.ts b/node_modules/agent-base/dist/src/promisify.d.ts new file mode 100644 index 0000000..0268869 --- /dev/null +++ b/node_modules/agent-base/dist/src/promisify.d.ts @@ -0,0 +1,4 @@ +import { ClientRequest, RequestOptions, AgentCallbackCallback, AgentCallbackPromise } from './index'; +declare type LegacyCallback = (req: ClientRequest, opts: RequestOptions, fn: AgentCallbackCallback) => void; +export default function promisify(fn: LegacyCallback): AgentCallbackPromise; +export {}; diff --git a/node_modules/agent-base/dist/src/promisify.js b/node_modules/agent-base/dist/src/promisify.js new file mode 100644 index 0000000..b2f6132 --- /dev/null +++ b/node_modules/agent-base/dist/src/promisify.js @@ -0,0 +1,18 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +function promisify(fn) { + return function (req, opts) { + return new Promise((resolve, reject) => { + fn.call(this, req, opts, (err, rtn) => { + if (err) { + reject(err); + } + else { + resolve(rtn); + } + }); + }); + }; +} +exports.default = promisify; +//# sourceMappingURL=promisify.js.map \ No newline at end of file diff --git a/node_modules/agent-base/dist/src/promisify.js.map b/node_modules/agent-base/dist/src/promisify.js.map new file mode 100644 index 0000000..4bff9bf --- /dev/null +++ b/node_modules/agent-base/dist/src/promisify.js.map @@ -0,0 +1 @@ +{"version":3,"file":"promisify.js","sourceRoot":"","sources":["../../src/promisify.ts"],"names":[],"mappings":";;AAeA,SAAwB,SAAS,CAAC,EAAkB;IACnD,OAAO,UAAsB,GAAkB,EAAE,IAAoB;QACpE,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;YACtC,EAAE,CAAC,IAAI,CACN,IAAI,EACJ,GAAG,EACH,IAAI,EACJ,CAAC,GAA6B,EAAE,GAAyB,EAAE,EAAE;gBAC5D,IAAI,GAAG,EAAE;oBACR,MAAM,CAAC,GAAG,CAAC,CAAC;iBACZ;qBAAM;oBACN,OAAO,CAAC,GAAG,CAAC,CAAC;iBACb;YACF,CAAC,CACD,CAAC;QACH,CAAC,CAAC,CAAC;IACJ,CAAC,CAAC;AACH,CAAC;AAjBD,4BAiBC"} \ No newline at end of file diff --git a/node_modules/agent-base/package.json b/node_modules/agent-base/package.json new file mode 100644 index 0000000..fadce3a --- /dev/null +++ b/node_modules/agent-base/package.json @@ -0,0 +1,64 @@ +{ + "name": "agent-base", + "version": "6.0.2", + "description": "Turn a function into an `http.Agent` instance", + "main": "dist/src/index", + "typings": "dist/src/index", + "files": [ + "dist/src", + "src" + ], + "scripts": { + "prebuild": "rimraf dist", + "build": "tsc", + "postbuild": "cpy --parents src test '!**/*.ts' dist", + "test": "mocha --reporter spec dist/test/*.js", + "test-lint": "eslint src --ext .js,.ts", + "prepublishOnly": "npm run build" + }, + "repository": { + "type": "git", + "url": "git://github.com/TooTallNate/node-agent-base.git" + }, + "keywords": [ + "http", + "agent", + "base", + "barebones", + "https" + ], + "author": "Nathan Rajlich (http://n8.io/)", + "license": "MIT", + "bugs": { + "url": "https://github.com/TooTallNate/node-agent-base/issues" + }, + "dependencies": { + "debug": "4" + }, + "devDependencies": { + "@types/debug": "4", + "@types/mocha": "^5.2.7", + "@types/node": "^14.0.20", + "@types/semver": "^7.1.0", + "@types/ws": "^6.0.3", + "@typescript-eslint/eslint-plugin": "1.6.0", + "@typescript-eslint/parser": "1.1.0", + "async-listen": "^1.2.0", + "cpy-cli": "^2.0.0", + "eslint": "5.16.0", + "eslint-config-airbnb": "17.1.0", + "eslint-config-prettier": "4.1.0", + "eslint-import-resolver-typescript": "1.1.1", + "eslint-plugin-import": "2.16.0", + "eslint-plugin-jsx-a11y": "6.2.1", + "eslint-plugin-react": "7.12.4", + "mocha": "^6.2.0", + "rimraf": "^3.0.0", + "semver": "^7.1.2", + "typescript": "^3.5.3", + "ws": "^3.0.0" + }, + "engines": { + "node": ">= 6.0.0" + } +} diff --git a/node_modules/agent-base/src/index.ts b/node_modules/agent-base/src/index.ts new file mode 100644 index 0000000..a47ccd4 --- /dev/null +++ b/node_modules/agent-base/src/index.ts @@ -0,0 +1,345 @@ +import net from 'net'; +import http from 'http'; +import https from 'https'; +import { Duplex } from 'stream'; +import { EventEmitter } from 'events'; +import createDebug from 'debug'; +import promisify from './promisify'; + +const debug = createDebug('agent-base'); + +function isAgent(v: any): v is createAgent.AgentLike { + return Boolean(v) && typeof v.addRequest === 'function'; +} + +function isSecureEndpoint(): boolean { + const { stack } = new Error(); + if (typeof stack !== 'string') return false; + return stack.split('\n').some(l => l.indexOf('(https.js:') !== -1 || l.indexOf('node:https:') !== -1); +} + +function createAgent(opts?: createAgent.AgentOptions): createAgent.Agent; +function createAgent( + callback: createAgent.AgentCallback, + opts?: createAgent.AgentOptions +): createAgent.Agent; +function createAgent( + callback?: createAgent.AgentCallback | createAgent.AgentOptions, + opts?: createAgent.AgentOptions +) { + return new createAgent.Agent(callback, opts); +} + +namespace createAgent { + export interface ClientRequest extends http.ClientRequest { + _last?: boolean; + _hadError?: boolean; + method: string; + } + + export interface AgentRequestOptions { + host?: string; + path?: string; + // `port` on `http.RequestOptions` can be a string or undefined, + // but `net.TcpNetConnectOpts` expects only a number + port: number; + } + + export interface HttpRequestOptions + extends AgentRequestOptions, + Omit { + secureEndpoint: false; + } + + export interface HttpsRequestOptions + extends AgentRequestOptions, + Omit { + secureEndpoint: true; + } + + export type RequestOptions = HttpRequestOptions | HttpsRequestOptions; + + export type AgentLike = Pick | http.Agent; + + export type AgentCallbackReturn = Duplex | AgentLike; + + export type AgentCallbackCallback = ( + err?: Error | null, + socket?: createAgent.AgentCallbackReturn + ) => void; + + export type AgentCallbackPromise = ( + req: createAgent.ClientRequest, + opts: createAgent.RequestOptions + ) => + | createAgent.AgentCallbackReturn + | Promise; + + export type AgentCallback = typeof Agent.prototype.callback; + + export type AgentOptions = { + timeout?: number; + }; + + /** + * Base `http.Agent` implementation. + * No pooling/keep-alive is implemented by default. + * + * @param {Function} callback + * @api public + */ + export class Agent extends EventEmitter { + public timeout: number | null; + public maxFreeSockets: number; + public maxTotalSockets: number; + public maxSockets: number; + public sockets: { + [key: string]: net.Socket[]; + }; + public freeSockets: { + [key: string]: net.Socket[]; + }; + public requests: { + [key: string]: http.IncomingMessage[]; + }; + public options: https.AgentOptions; + private promisifiedCallback?: createAgent.AgentCallbackPromise; + private explicitDefaultPort?: number; + private explicitProtocol?: string; + + constructor( + callback?: createAgent.AgentCallback | createAgent.AgentOptions, + _opts?: createAgent.AgentOptions + ) { + super(); + + let opts = _opts; + if (typeof callback === 'function') { + this.callback = callback; + } else if (callback) { + opts = callback; + } + + // Timeout for the socket to be returned from the callback + this.timeout = null; + if (opts && typeof opts.timeout === 'number') { + this.timeout = opts.timeout; + } + + // These aren't actually used by `agent-base`, but are required + // for the TypeScript definition files in `@types/node` :/ + this.maxFreeSockets = 1; + this.maxSockets = 1; + this.maxTotalSockets = Infinity; + this.sockets = {}; + this.freeSockets = {}; + this.requests = {}; + this.options = {}; + } + + get defaultPort(): number { + if (typeof this.explicitDefaultPort === 'number') { + return this.explicitDefaultPort; + } + return isSecureEndpoint() ? 443 : 80; + } + + set defaultPort(v: number) { + this.explicitDefaultPort = v; + } + + get protocol(): string { + if (typeof this.explicitProtocol === 'string') { + return this.explicitProtocol; + } + return isSecureEndpoint() ? 'https:' : 'http:'; + } + + set protocol(v: string) { + this.explicitProtocol = v; + } + + callback( + req: createAgent.ClientRequest, + opts: createAgent.RequestOptions, + fn: createAgent.AgentCallbackCallback + ): void; + callback( + req: createAgent.ClientRequest, + opts: createAgent.RequestOptions + ): + | createAgent.AgentCallbackReturn + | Promise; + callback( + req: createAgent.ClientRequest, + opts: createAgent.AgentOptions, + fn?: createAgent.AgentCallbackCallback + ): + | createAgent.AgentCallbackReturn + | Promise + | void { + throw new Error( + '"agent-base" has no default implementation, you must subclass and override `callback()`' + ); + } + + /** + * Called by node-core's "_http_client.js" module when creating + * a new HTTP request with this Agent instance. + * + * @api public + */ + addRequest(req: ClientRequest, _opts: RequestOptions): void { + const opts: RequestOptions = { ..._opts }; + + if (typeof opts.secureEndpoint !== 'boolean') { + opts.secureEndpoint = isSecureEndpoint(); + } + + if (opts.host == null) { + opts.host = 'localhost'; + } + + if (opts.port == null) { + opts.port = opts.secureEndpoint ? 443 : 80; + } + + if (opts.protocol == null) { + opts.protocol = opts.secureEndpoint ? 'https:' : 'http:'; + } + + if (opts.host && opts.path) { + // If both a `host` and `path` are specified then it's most + // likely the result of a `url.parse()` call... we need to + // remove the `path` portion so that `net.connect()` doesn't + // attempt to open that as a unix socket file. + delete opts.path; + } + + delete opts.agent; + delete opts.hostname; + delete opts._defaultAgent; + delete opts.defaultPort; + delete opts.createConnection; + + // Hint to use "Connection: close" + // XXX: non-documented `http` module API :( + req._last = true; + req.shouldKeepAlive = false; + + let timedOut = false; + let timeoutId: ReturnType | null = null; + const timeoutMs = opts.timeout || this.timeout; + + const onerror = (err: NodeJS.ErrnoException) => { + if (req._hadError) return; + req.emit('error', err); + // For Safety. Some additional errors might fire later on + // and we need to make sure we don't double-fire the error event. + req._hadError = true; + }; + + const ontimeout = () => { + timeoutId = null; + timedOut = true; + const err: NodeJS.ErrnoException = new Error( + `A "socket" was not created for HTTP request before ${timeoutMs}ms` + ); + err.code = 'ETIMEOUT'; + onerror(err); + }; + + const callbackError = (err: NodeJS.ErrnoException) => { + if (timedOut) return; + if (timeoutId !== null) { + clearTimeout(timeoutId); + timeoutId = null; + } + onerror(err); + }; + + const onsocket = (socket: AgentCallbackReturn) => { + if (timedOut) return; + if (timeoutId != null) { + clearTimeout(timeoutId); + timeoutId = null; + } + + if (isAgent(socket)) { + // `socket` is actually an `http.Agent` instance, so + // relinquish responsibility for this `req` to the Agent + // from here on + debug( + 'Callback returned another Agent instance %o', + socket.constructor.name + ); + (socket as createAgent.Agent).addRequest(req, opts); + return; + } + + if (socket) { + socket.once('free', () => { + this.freeSocket(socket as net.Socket, opts); + }); + req.onSocket(socket as net.Socket); + return; + } + + const err = new Error( + `no Duplex stream was returned to agent-base for \`${req.method} ${req.path}\`` + ); + onerror(err); + }; + + if (typeof this.callback !== 'function') { + onerror(new Error('`callback` is not defined')); + return; + } + + if (!this.promisifiedCallback) { + if (this.callback.length >= 3) { + debug('Converting legacy callback function to promise'); + this.promisifiedCallback = promisify(this.callback); + } else { + this.promisifiedCallback = this.callback; + } + } + + if (typeof timeoutMs === 'number' && timeoutMs > 0) { + timeoutId = setTimeout(ontimeout, timeoutMs); + } + + if ('port' in opts && typeof opts.port !== 'number') { + opts.port = Number(opts.port); + } + + try { + debug( + 'Resolving socket for %o request: %o', + opts.protocol, + `${req.method} ${req.path}` + ); + Promise.resolve(this.promisifiedCallback(req, opts)).then( + onsocket, + callbackError + ); + } catch (err) { + Promise.reject(err).catch(callbackError); + } + } + + freeSocket(socket: net.Socket, opts: AgentOptions) { + debug('Freeing socket %o %o', socket.constructor.name, opts); + socket.destroy(); + } + + destroy() { + debug('Destroying agent %o', this.constructor.name); + } + } + + // So that `instanceof` works correctly + createAgent.prototype = createAgent.Agent.prototype; +} + +export = createAgent; diff --git a/node_modules/agent-base/src/promisify.ts b/node_modules/agent-base/src/promisify.ts new file mode 100644 index 0000000..60cc662 --- /dev/null +++ b/node_modules/agent-base/src/promisify.ts @@ -0,0 +1,33 @@ +import { + Agent, + ClientRequest, + RequestOptions, + AgentCallbackCallback, + AgentCallbackPromise, + AgentCallbackReturn +} from './index'; + +type LegacyCallback = ( + req: ClientRequest, + opts: RequestOptions, + fn: AgentCallbackCallback +) => void; + +export default function promisify(fn: LegacyCallback): AgentCallbackPromise { + return function(this: Agent, req: ClientRequest, opts: RequestOptions) { + return new Promise((resolve, reject) => { + fn.call( + this, + req, + opts, + (err: Error | null | undefined, rtn?: AgentCallbackReturn) => { + if (err) { + reject(err); + } else { + resolve(rtn); + } + } + ); + }); + }; +} diff --git a/node_modules/asynckit/LICENSE b/node_modules/asynckit/LICENSE new file mode 100644 index 0000000..c9eca5d --- /dev/null +++ b/node_modules/asynckit/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2016 Alex Indigo + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/asynckit/README.md b/node_modules/asynckit/README.md new file mode 100644 index 0000000..ddcc7e6 --- /dev/null +++ b/node_modules/asynckit/README.md @@ -0,0 +1,233 @@ +# asynckit [![NPM Module](https://img.shields.io/npm/v/asynckit.svg?style=flat)](https://www.npmjs.com/package/asynckit) + +Minimal async jobs utility library, with streams support. + +[![PhantomJS Build](https://img.shields.io/travis/alexindigo/asynckit/v0.4.0.svg?label=browser&style=flat)](https://travis-ci.org/alexindigo/asynckit) +[![Linux Build](https://img.shields.io/travis/alexindigo/asynckit/v0.4.0.svg?label=linux:0.12-6.x&style=flat)](https://travis-ci.org/alexindigo/asynckit) +[![Windows Build](https://img.shields.io/appveyor/ci/alexindigo/asynckit/v0.4.0.svg?label=windows:0.12-6.x&style=flat)](https://ci.appveyor.com/project/alexindigo/asynckit) + +[![Coverage Status](https://img.shields.io/coveralls/alexindigo/asynckit/v0.4.0.svg?label=code+coverage&style=flat)](https://coveralls.io/github/alexindigo/asynckit?branch=master) +[![Dependency Status](https://img.shields.io/david/alexindigo/asynckit/v0.4.0.svg?style=flat)](https://david-dm.org/alexindigo/asynckit) +[![bitHound Overall Score](https://www.bithound.io/github/alexindigo/asynckit/badges/score.svg)](https://www.bithound.io/github/alexindigo/asynckit) + + + +AsyncKit provides harness for `parallel` and `serial` iterators over list of items represented by arrays or objects. +Optionally it accepts abort function (should be synchronously return by iterator for each item), and terminates left over jobs upon an error event. For specific iteration order built-in (`ascending` and `descending`) and custom sort helpers also supported, via `asynckit.serialOrdered` method. + +It ensures async operations to keep behavior more stable and prevent `Maximum call stack size exceeded` errors, from sync iterators. + +| compression | size | +| :----------------- | -------: | +| asynckit.js | 12.34 kB | +| asynckit.min.js | 4.11 kB | +| asynckit.min.js.gz | 1.47 kB | + + +## Install + +```sh +$ npm install --save asynckit +``` + +## Examples + +### Parallel Jobs + +Runs iterator over provided array in parallel. Stores output in the `result` array, +on the matching positions. In unlikely event of an error from one of the jobs, +will terminate rest of the active jobs (if abort function is provided) +and return error along with salvaged data to the main callback function. + +#### Input Array + +```javascript +var parallel = require('asynckit').parallel + , assert = require('assert') + ; + +var source = [ 1, 1, 4, 16, 64, 32, 8, 2 ] + , expectedResult = [ 2, 2, 8, 32, 128, 64, 16, 4 ] + , expectedTarget = [ 1, 1, 2, 4, 8, 16, 32, 64 ] + , target = [] + ; + +parallel(source, asyncJob, function(err, result) +{ + assert.deepEqual(result, expectedResult); + assert.deepEqual(target, expectedTarget); +}); + +// async job accepts one element from the array +// and a callback function +function asyncJob(item, cb) +{ + // different delays (in ms) per item + var delay = item * 25; + + // pretend different jobs take different time to finish + // and not in consequential order + var timeoutId = setTimeout(function() { + target.push(item); + cb(null, item * 2); + }, delay); + + // allow to cancel "leftover" jobs upon error + // return function, invoking of which will abort this job + return clearTimeout.bind(null, timeoutId); +} +``` + +More examples could be found in [test/test-parallel-array.js](test/test-parallel-array.js). + +#### Input Object + +Also it supports named jobs, listed via object. + +```javascript +var parallel = require('asynckit/parallel') + , assert = require('assert') + ; + +var source = { first: 1, one: 1, four: 4, sixteen: 16, sixtyFour: 64, thirtyTwo: 32, eight: 8, two: 2 } + , expectedResult = { first: 2, one: 2, four: 8, sixteen: 32, sixtyFour: 128, thirtyTwo: 64, eight: 16, two: 4 } + , expectedTarget = [ 1, 1, 2, 4, 8, 16, 32, 64 ] + , expectedKeys = [ 'first', 'one', 'two', 'four', 'eight', 'sixteen', 'thirtyTwo', 'sixtyFour' ] + , target = [] + , keys = [] + ; + +parallel(source, asyncJob, function(err, result) +{ + assert.deepEqual(result, expectedResult); + assert.deepEqual(target, expectedTarget); + assert.deepEqual(keys, expectedKeys); +}); + +// supports full value, key, callback (shortcut) interface +function asyncJob(item, key, cb) +{ + // different delays (in ms) per item + var delay = item * 25; + + // pretend different jobs take different time to finish + // and not in consequential order + var timeoutId = setTimeout(function() { + keys.push(key); + target.push(item); + cb(null, item * 2); + }, delay); + + // allow to cancel "leftover" jobs upon error + // return function, invoking of which will abort this job + return clearTimeout.bind(null, timeoutId); +} +``` + +More examples could be found in [test/test-parallel-object.js](test/test-parallel-object.js). + +### Serial Jobs + +Runs iterator over provided array sequentially. Stores output in the `result` array, +on the matching positions. In unlikely event of an error from one of the jobs, +will not proceed to the rest of the items in the list +and return error along with salvaged data to the main callback function. + +#### Input Array + +```javascript +var serial = require('asynckit/serial') + , assert = require('assert') + ; + +var source = [ 1, 1, 4, 16, 64, 32, 8, 2 ] + , expectedResult = [ 2, 2, 8, 32, 128, 64, 16, 4 ] + , expectedTarget = [ 0, 1, 2, 3, 4, 5, 6, 7 ] + , target = [] + ; + +serial(source, asyncJob, function(err, result) +{ + assert.deepEqual(result, expectedResult); + assert.deepEqual(target, expectedTarget); +}); + +// extended interface (item, key, callback) +// also supported for arrays +function asyncJob(item, key, cb) +{ + target.push(key); + + // it will be automatically made async + // even it iterator "returns" in the same event loop + cb(null, item * 2); +} +``` + +More examples could be found in [test/test-serial-array.js](test/test-serial-array.js). + +#### Input Object + +Also it supports named jobs, listed via object. + +```javascript +var serial = require('asynckit').serial + , assert = require('assert') + ; + +var source = [ 1, 1, 4, 16, 64, 32, 8, 2 ] + , expectedResult = [ 2, 2, 8, 32, 128, 64, 16, 4 ] + , expectedTarget = [ 0, 1, 2, 3, 4, 5, 6, 7 ] + , target = [] + ; + +var source = { first: 1, one: 1, four: 4, sixteen: 16, sixtyFour: 64, thirtyTwo: 32, eight: 8, two: 2 } + , expectedResult = { first: 2, one: 2, four: 8, sixteen: 32, sixtyFour: 128, thirtyTwo: 64, eight: 16, two: 4 } + , expectedTarget = [ 1, 1, 4, 16, 64, 32, 8, 2 ] + , target = [] + ; + + +serial(source, asyncJob, function(err, result) +{ + assert.deepEqual(result, expectedResult); + assert.deepEqual(target, expectedTarget); +}); + +// shortcut interface (item, callback) +// works for object as well as for the arrays +function asyncJob(item, cb) +{ + target.push(item); + + // it will be automatically made async + // even it iterator "returns" in the same event loop + cb(null, item * 2); +} +``` + +More examples could be found in [test/test-serial-object.js](test/test-serial-object.js). + +_Note: Since _object_ is an _unordered_ collection of properties, +it may produce unexpected results with sequential iterations. +Whenever order of the jobs' execution is important please use `serialOrdered` method._ + +### Ordered Serial Iterations + +TBD + +For example [compare-property](compare-property) package. + +### Streaming interface + +TBD + +## Want to Know More? + +More examples can be found in [test folder](test/). + +Or open an [issue](https://github.com/alexindigo/asynckit/issues) with questions and/or suggestions. + +## License + +AsyncKit is licensed under the MIT license. diff --git a/node_modules/asynckit/bench.js b/node_modules/asynckit/bench.js new file mode 100644 index 0000000..c612f1a --- /dev/null +++ b/node_modules/asynckit/bench.js @@ -0,0 +1,76 @@ +/* eslint no-console: "off" */ + +var asynckit = require('./') + , async = require('async') + , assert = require('assert') + , expected = 0 + ; + +var Benchmark = require('benchmark'); +var suite = new Benchmark.Suite; + +var source = []; +for (var z = 1; z < 100; z++) +{ + source.push(z); + expected += z; +} + +suite +// add tests + +.add('async.map', function(deferred) +{ + var total = 0; + + async.map(source, + function(i, cb) + { + setImmediate(function() + { + total += i; + cb(null, total); + }); + }, + function(err, result) + { + assert.ifError(err); + assert.equal(result[result.length - 1], expected); + deferred.resolve(); + }); +}, {'defer': true}) + + +.add('asynckit.parallel', function(deferred) +{ + var total = 0; + + asynckit.parallel(source, + function(i, cb) + { + setImmediate(function() + { + total += i; + cb(null, total); + }); + }, + function(err, result) + { + assert.ifError(err); + assert.equal(result[result.length - 1], expected); + deferred.resolve(); + }); +}, {'defer': true}) + + +// add listeners +.on('cycle', function(ev) +{ + console.log(String(ev.target)); +}) +.on('complete', function() +{ + console.log('Fastest is ' + this.filter('fastest').map('name')); +}) +// run async +.run({ 'async': true }); diff --git a/node_modules/asynckit/index.js b/node_modules/asynckit/index.js new file mode 100644 index 0000000..455f945 --- /dev/null +++ b/node_modules/asynckit/index.js @@ -0,0 +1,6 @@ +module.exports = +{ + parallel : require('./parallel.js'), + serial : require('./serial.js'), + serialOrdered : require('./serialOrdered.js') +}; diff --git a/node_modules/asynckit/lib/abort.js b/node_modules/asynckit/lib/abort.js new file mode 100644 index 0000000..114367e --- /dev/null +++ b/node_modules/asynckit/lib/abort.js @@ -0,0 +1,29 @@ +// API +module.exports = abort; + +/** + * Aborts leftover active jobs + * + * @param {object} state - current state object + */ +function abort(state) +{ + Object.keys(state.jobs).forEach(clean.bind(state)); + + // reset leftover jobs + state.jobs = {}; +} + +/** + * Cleans up leftover job by invoking abort function for the provided job id + * + * @this state + * @param {string|number} key - job id to abort + */ +function clean(key) +{ + if (typeof this.jobs[key] == 'function') + { + this.jobs[key](); + } +} diff --git a/node_modules/asynckit/lib/async.js b/node_modules/asynckit/lib/async.js new file mode 100644 index 0000000..7f1288a --- /dev/null +++ b/node_modules/asynckit/lib/async.js @@ -0,0 +1,34 @@ +var defer = require('./defer.js'); + +// API +module.exports = async; + +/** + * Runs provided callback asynchronously + * even if callback itself is not + * + * @param {function} callback - callback to invoke + * @returns {function} - augmented callback + */ +function async(callback) +{ + var isAsync = false; + + // check if async happened + defer(function() { isAsync = true; }); + + return function async_callback(err, result) + { + if (isAsync) + { + callback(err, result); + } + else + { + defer(function nextTick_callback() + { + callback(err, result); + }); + } + }; +} diff --git a/node_modules/asynckit/lib/defer.js b/node_modules/asynckit/lib/defer.js new file mode 100644 index 0000000..b67110c --- /dev/null +++ b/node_modules/asynckit/lib/defer.js @@ -0,0 +1,26 @@ +module.exports = defer; + +/** + * Runs provided function on next iteration of the event loop + * + * @param {function} fn - function to run + */ +function defer(fn) +{ + var nextTick = typeof setImmediate == 'function' + ? setImmediate + : ( + typeof process == 'object' && typeof process.nextTick == 'function' + ? process.nextTick + : null + ); + + if (nextTick) + { + nextTick(fn); + } + else + { + setTimeout(fn, 0); + } +} diff --git a/node_modules/asynckit/lib/iterate.js b/node_modules/asynckit/lib/iterate.js new file mode 100644 index 0000000..5d2839a --- /dev/null +++ b/node_modules/asynckit/lib/iterate.js @@ -0,0 +1,75 @@ +var async = require('./async.js') + , abort = require('./abort.js') + ; + +// API +module.exports = iterate; + +/** + * Iterates over each job object + * + * @param {array|object} list - array or object (named list) to iterate over + * @param {function} iterator - iterator to run + * @param {object} state - current job status + * @param {function} callback - invoked when all elements processed + */ +function iterate(list, iterator, state, callback) +{ + // store current index + var key = state['keyedList'] ? state['keyedList'][state.index] : state.index; + + state.jobs[key] = runJob(iterator, key, list[key], function(error, output) + { + // don't repeat yourself + // skip secondary callbacks + if (!(key in state.jobs)) + { + return; + } + + // clean up jobs + delete state.jobs[key]; + + if (error) + { + // don't process rest of the results + // stop still active jobs + // and reset the list + abort(state); + } + else + { + state.results[key] = output; + } + + // return salvaged results + callback(error, state.results); + }); +} + +/** + * Runs iterator over provided job element + * + * @param {function} iterator - iterator to invoke + * @param {string|number} key - key/index of the element in the list of jobs + * @param {mixed} item - job description + * @param {function} callback - invoked after iterator is done with the job + * @returns {function|mixed} - job abort function or something else + */ +function runJob(iterator, key, item, callback) +{ + var aborter; + + // allow shortcut if iterator expects only two arguments + if (iterator.length == 2) + { + aborter = iterator(item, async(callback)); + } + // otherwise go with full three arguments + else + { + aborter = iterator(item, key, async(callback)); + } + + return aborter; +} diff --git a/node_modules/asynckit/lib/readable_asynckit.js b/node_modules/asynckit/lib/readable_asynckit.js new file mode 100644 index 0000000..78ad240 --- /dev/null +++ b/node_modules/asynckit/lib/readable_asynckit.js @@ -0,0 +1,91 @@ +var streamify = require('./streamify.js') + , defer = require('./defer.js') + ; + +// API +module.exports = ReadableAsyncKit; + +/** + * Base constructor for all streams + * used to hold properties/methods + */ +function ReadableAsyncKit() +{ + ReadableAsyncKit.super_.apply(this, arguments); + + // list of active jobs + this.jobs = {}; + + // add stream methods + this.destroy = destroy; + this._start = _start; + this._read = _read; +} + +/** + * Destroys readable stream, + * by aborting outstanding jobs + * + * @returns {void} + */ +function destroy() +{ + if (this.destroyed) + { + return; + } + + this.destroyed = true; + + if (typeof this.terminator == 'function') + { + this.terminator(); + } +} + +/** + * Starts provided jobs in async manner + * + * @private + */ +function _start() +{ + // first argument – runner function + var runner = arguments[0] + // take away first argument + , args = Array.prototype.slice.call(arguments, 1) + // second argument - input data + , input = args[0] + // last argument - result callback + , endCb = streamify.callback.call(this, args[args.length - 1]) + ; + + args[args.length - 1] = endCb; + // third argument - iterator + args[1] = streamify.iterator.call(this, args[1]); + + // allow time for proper setup + defer(function() + { + if (!this.destroyed) + { + this.terminator = runner.apply(null, args); + } + else + { + endCb(null, Array.isArray(input) ? [] : {}); + } + }.bind(this)); +} + + +/** + * Implement _read to comply with Readable streams + * Doesn't really make sense for flowing object mode + * + * @private + */ +function _read() +{ + +} diff --git a/node_modules/asynckit/lib/readable_parallel.js b/node_modules/asynckit/lib/readable_parallel.js new file mode 100644 index 0000000..5d2929f --- /dev/null +++ b/node_modules/asynckit/lib/readable_parallel.js @@ -0,0 +1,25 @@ +var parallel = require('../parallel.js'); + +// API +module.exports = ReadableParallel; + +/** + * Streaming wrapper to `asynckit.parallel` + * + * @param {array|object} list - array or object (named list) to iterate over + * @param {function} iterator - iterator to run + * @param {function} callback - invoked when all elements processed + * @returns {stream.Readable#} + */ +function ReadableParallel(list, iterator, callback) +{ + if (!(this instanceof ReadableParallel)) + { + return new ReadableParallel(list, iterator, callback); + } + + // turn on object mode + ReadableParallel.super_.call(this, {objectMode: true}); + + this._start(parallel, list, iterator, callback); +} diff --git a/node_modules/asynckit/lib/readable_serial.js b/node_modules/asynckit/lib/readable_serial.js new file mode 100644 index 0000000..7822698 --- /dev/null +++ b/node_modules/asynckit/lib/readable_serial.js @@ -0,0 +1,25 @@ +var serial = require('../serial.js'); + +// API +module.exports = ReadableSerial; + +/** + * Streaming wrapper to `asynckit.serial` + * + * @param {array|object} list - array or object (named list) to iterate over + * @param {function} iterator - iterator to run + * @param {function} callback - invoked when all elements processed + * @returns {stream.Readable#} + */ +function ReadableSerial(list, iterator, callback) +{ + if (!(this instanceof ReadableSerial)) + { + return new ReadableSerial(list, iterator, callback); + } + + // turn on object mode + ReadableSerial.super_.call(this, {objectMode: true}); + + this._start(serial, list, iterator, callback); +} diff --git a/node_modules/asynckit/lib/readable_serial_ordered.js b/node_modules/asynckit/lib/readable_serial_ordered.js new file mode 100644 index 0000000..3de89c4 --- /dev/null +++ b/node_modules/asynckit/lib/readable_serial_ordered.js @@ -0,0 +1,29 @@ +var serialOrdered = require('../serialOrdered.js'); + +// API +module.exports = ReadableSerialOrdered; +// expose sort helpers +module.exports.ascending = serialOrdered.ascending; +module.exports.descending = serialOrdered.descending; + +/** + * Streaming wrapper to `asynckit.serialOrdered` + * + * @param {array|object} list - array or object (named list) to iterate over + * @param {function} iterator - iterator to run + * @param {function} sortMethod - custom sort function + * @param {function} callback - invoked when all elements processed + * @returns {stream.Readable#} + */ +function ReadableSerialOrdered(list, iterator, sortMethod, callback) +{ + if (!(this instanceof ReadableSerialOrdered)) + { + return new ReadableSerialOrdered(list, iterator, sortMethod, callback); + } + + // turn on object mode + ReadableSerialOrdered.super_.call(this, {objectMode: true}); + + this._start(serialOrdered, list, iterator, sortMethod, callback); +} diff --git a/node_modules/asynckit/lib/state.js b/node_modules/asynckit/lib/state.js new file mode 100644 index 0000000..cbea7ad --- /dev/null +++ b/node_modules/asynckit/lib/state.js @@ -0,0 +1,37 @@ +// API +module.exports = state; + +/** + * Creates initial state object + * for iteration over list + * + * @param {array|object} list - list to iterate over + * @param {function|null} sortMethod - function to use for keys sort, + * or `null` to keep them as is + * @returns {object} - initial state object + */ +function state(list, sortMethod) +{ + var isNamedList = !Array.isArray(list) + , initState = + { + index : 0, + keyedList: isNamedList || sortMethod ? Object.keys(list) : null, + jobs : {}, + results : isNamedList ? {} : [], + size : isNamedList ? Object.keys(list).length : list.length + } + ; + + if (sortMethod) + { + // sort array keys based on it's values + // sort object's keys just on own merit + initState.keyedList.sort(isNamedList ? sortMethod : function(a, b) + { + return sortMethod(list[a], list[b]); + }); + } + + return initState; +} diff --git a/node_modules/asynckit/lib/streamify.js b/node_modules/asynckit/lib/streamify.js new file mode 100644 index 0000000..f56a1c9 --- /dev/null +++ b/node_modules/asynckit/lib/streamify.js @@ -0,0 +1,141 @@ +var async = require('./async.js'); + +// API +module.exports = { + iterator: wrapIterator, + callback: wrapCallback +}; + +/** + * Wraps iterators with long signature + * + * @this ReadableAsyncKit# + * @param {function} iterator - function to wrap + * @returns {function} - wrapped function + */ +function wrapIterator(iterator) +{ + var stream = this; + + return function(item, key, cb) + { + var aborter + , wrappedCb = async(wrapIteratorCallback.call(stream, cb, key)) + ; + + stream.jobs[key] = wrappedCb; + + // it's either shortcut (item, cb) + if (iterator.length == 2) + { + aborter = iterator(item, wrappedCb); + } + // or long format (item, key, cb) + else + { + aborter = iterator(item, key, wrappedCb); + } + + return aborter; + }; +} + +/** + * Wraps provided callback function + * allowing to execute snitch function before + * real callback + * + * @this ReadableAsyncKit# + * @param {function} callback - function to wrap + * @returns {function} - wrapped function + */ +function wrapCallback(callback) +{ + var stream = this; + + var wrapped = function(error, result) + { + return finisher.call(stream, error, result, callback); + }; + + return wrapped; +} + +/** + * Wraps provided iterator callback function + * makes sure snitch only called once, + * but passes secondary calls to the original callback + * + * @this ReadableAsyncKit# + * @param {function} callback - callback to wrap + * @param {number|string} key - iteration key + * @returns {function} wrapped callback + */ +function wrapIteratorCallback(callback, key) +{ + var stream = this; + + return function(error, output) + { + // don't repeat yourself + if (!(key in stream.jobs)) + { + callback(error, output); + return; + } + + // clean up jobs + delete stream.jobs[key]; + + return streamer.call(stream, error, {key: key, value: output}, callback); + }; +} + +/** + * Stream wrapper for iterator callback + * + * @this ReadableAsyncKit# + * @param {mixed} error - error response + * @param {mixed} output - iterator output + * @param {function} callback - callback that expects iterator results + */ +function streamer(error, output, callback) +{ + if (error && !this.error) + { + this.error = error; + this.pause(); + this.emit('error', error); + // send back value only, as expected + callback(error, output && output.value); + return; + } + + // stream stuff + this.push(output); + + // back to original track + // send back value only, as expected + callback(error, output && output.value); +} + +/** + * Stream wrapper for finishing callback + * + * @this ReadableAsyncKit# + * @param {mixed} error - error response + * @param {mixed} output - iterator output + * @param {function} callback - callback that expects final results + */ +function finisher(error, output, callback) +{ + // signal end of the stream + // only for successfully finished streams + if (!error) + { + this.push(null); + } + + // back to original track + callback(error, output); +} diff --git a/node_modules/asynckit/lib/terminator.js b/node_modules/asynckit/lib/terminator.js new file mode 100644 index 0000000..d6eb992 --- /dev/null +++ b/node_modules/asynckit/lib/terminator.js @@ -0,0 +1,29 @@ +var abort = require('./abort.js') + , async = require('./async.js') + ; + +// API +module.exports = terminator; + +/** + * Terminates jobs in the attached state context + * + * @this AsyncKitState# + * @param {function} callback - final callback to invoke after termination + */ +function terminator(callback) +{ + if (!Object.keys(this.jobs).length) + { + return; + } + + // fast forward iteration index + this.index = this.size; + + // abort jobs + abort(this); + + // send back results we have so far + async(callback)(null, this.results); +} diff --git a/node_modules/asynckit/package.json b/node_modules/asynckit/package.json new file mode 100644 index 0000000..51147d6 --- /dev/null +++ b/node_modules/asynckit/package.json @@ -0,0 +1,63 @@ +{ + "name": "asynckit", + "version": "0.4.0", + "description": "Minimal async jobs utility library, with streams support", + "main": "index.js", + "scripts": { + "clean": "rimraf coverage", + "lint": "eslint *.js lib/*.js test/*.js", + "test": "istanbul cover --reporter=json tape -- 'test/test-*.js' | tap-spec", + "win-test": "tape test/test-*.js", + "browser": "browserify -t browserify-istanbul test/lib/browserify_adjustment.js test/test-*.js | obake --coverage | tap-spec", + "report": "istanbul report", + "size": "browserify index.js | size-table asynckit", + "debug": "tape test/test-*.js" + }, + "pre-commit": [ + "clean", + "lint", + "test", + "browser", + "report", + "size" + ], + "repository": { + "type": "git", + "url": "git+https://github.com/alexindigo/asynckit.git" + }, + "keywords": [ + "async", + "jobs", + "parallel", + "serial", + "iterator", + "array", + "object", + "stream", + "destroy", + "terminate", + "abort" + ], + "author": "Alex Indigo ", + "license": "MIT", + "bugs": { + "url": "https://github.com/alexindigo/asynckit/issues" + }, + "homepage": "https://github.com/alexindigo/asynckit#readme", + "devDependencies": { + "browserify": "^13.0.0", + "browserify-istanbul": "^2.0.0", + "coveralls": "^2.11.9", + "eslint": "^2.9.0", + "istanbul": "^0.4.3", + "obake": "^0.1.2", + "phantomjs-prebuilt": "^2.1.7", + "pre-commit": "^1.1.3", + "reamde": "^1.1.0", + "rimraf": "^2.5.2", + "size-table": "^0.2.0", + "tap-spec": "^4.1.1", + "tape": "^4.5.1" + }, + "dependencies": {} +} diff --git a/node_modules/asynckit/parallel.js b/node_modules/asynckit/parallel.js new file mode 100644 index 0000000..3c50344 --- /dev/null +++ b/node_modules/asynckit/parallel.js @@ -0,0 +1,43 @@ +var iterate = require('./lib/iterate.js') + , initState = require('./lib/state.js') + , terminator = require('./lib/terminator.js') + ; + +// Public API +module.exports = parallel; + +/** + * Runs iterator over provided array elements in parallel + * + * @param {array|object} list - array or object (named list) to iterate over + * @param {function} iterator - iterator to run + * @param {function} callback - invoked when all elements processed + * @returns {function} - jobs terminator + */ +function parallel(list, iterator, callback) +{ + var state = initState(list); + + while (state.index < (state['keyedList'] || list).length) + { + iterate(list, iterator, state, function(error, result) + { + if (error) + { + callback(error, result); + return; + } + + // looks like it's the last one + if (Object.keys(state.jobs).length === 0) + { + callback(null, state.results); + return; + } + }); + + state.index++; + } + + return terminator.bind(state, callback); +} diff --git a/node_modules/asynckit/serial.js b/node_modules/asynckit/serial.js new file mode 100644 index 0000000..6cd949a --- /dev/null +++ b/node_modules/asynckit/serial.js @@ -0,0 +1,17 @@ +var serialOrdered = require('./serialOrdered.js'); + +// Public API +module.exports = serial; + +/** + * Runs iterator over provided array elements in series + * + * @param {array|object} list - array or object (named list) to iterate over + * @param {function} iterator - iterator to run + * @param {function} callback - invoked when all elements processed + * @returns {function} - jobs terminator + */ +function serial(list, iterator, callback) +{ + return serialOrdered(list, iterator, null, callback); +} diff --git a/node_modules/asynckit/serialOrdered.js b/node_modules/asynckit/serialOrdered.js new file mode 100644 index 0000000..607eafe --- /dev/null +++ b/node_modules/asynckit/serialOrdered.js @@ -0,0 +1,75 @@ +var iterate = require('./lib/iterate.js') + , initState = require('./lib/state.js') + , terminator = require('./lib/terminator.js') + ; + +// Public API +module.exports = serialOrdered; +// sorting helpers +module.exports.ascending = ascending; +module.exports.descending = descending; + +/** + * Runs iterator over provided sorted array elements in series + * + * @param {array|object} list - array or object (named list) to iterate over + * @param {function} iterator - iterator to run + * @param {function} sortMethod - custom sort function + * @param {function} callback - invoked when all elements processed + * @returns {function} - jobs terminator + */ +function serialOrdered(list, iterator, sortMethod, callback) +{ + var state = initState(list, sortMethod); + + iterate(list, iterator, state, function iteratorHandler(error, result) + { + if (error) + { + callback(error, result); + return; + } + + state.index++; + + // are we there yet? + if (state.index < (state['keyedList'] || list).length) + { + iterate(list, iterator, state, iteratorHandler); + return; + } + + // done here + callback(null, state.results); + }); + + return terminator.bind(state, callback); +} + +/* + * -- Sort methods + */ + +/** + * sort helper to sort array elements in ascending order + * + * @param {mixed} a - an item to compare + * @param {mixed} b - an item to compare + * @returns {number} - comparison result + */ +function ascending(a, b) +{ + return a < b ? -1 : a > b ? 1 : 0; +} + +/** + * sort helper to sort array elements in descending order + * + * @param {mixed} a - an item to compare + * @param {mixed} b - an item to compare + * @returns {number} - comparison result + */ +function descending(a, b) +{ + return -1 * ascending(a, b); +} diff --git a/node_modules/asynckit/stream.js b/node_modules/asynckit/stream.js new file mode 100644 index 0000000..d43465f --- /dev/null +++ b/node_modules/asynckit/stream.js @@ -0,0 +1,21 @@ +var inherits = require('util').inherits + , Readable = require('stream').Readable + , ReadableAsyncKit = require('./lib/readable_asynckit.js') + , ReadableParallel = require('./lib/readable_parallel.js') + , ReadableSerial = require('./lib/readable_serial.js') + , ReadableSerialOrdered = require('./lib/readable_serial_ordered.js') + ; + +// API +module.exports = +{ + parallel : ReadableParallel, + serial : ReadableSerial, + serialOrdered : ReadableSerialOrdered, +}; + +inherits(ReadableAsyncKit, Readable); + +inherits(ReadableParallel, ReadableAsyncKit); +inherits(ReadableSerial, ReadableAsyncKit); +inherits(ReadableSerialOrdered, ReadableAsyncKit); diff --git a/node_modules/axios/CHANGELOG.md b/node_modules/axios/CHANGELOG.md new file mode 100644 index 0000000..bef1fab --- /dev/null +++ b/node_modules/axios/CHANGELOG.md @@ -0,0 +1,2002 @@ +# Changelog + +## v1.21.0 — October 21, 2026 + +This release adds response timing and opt-in UTF-8 Basic authentication, improves request handling across runtimes, and changes how header defaults are recognized. + +## ⚠️ Breaking Changes & Deprecations + +* **Header Defaults:** Only plain objects, null-prototype maps, and compatible `AxiosHeaders` instances are treated as common or method-specific defaults; literal headers such as `Link` are now preserved. Applications using custom class instances as defaults must convert them to plain maps, for example `{ post: { ...customDefaults } }`, or compatible `AxiosHeaders`. Otherwise, those instances become literal header values, including on requests using other methods. (**[#11156](https://github.com/axios/axios/pull/11156)**) + +## 🚀 New Features + +* **Response Timing:** Added `response.duration`, in milliseconds, including on `error.response` when present. Timing measures adapter execution and excludes interceptors and transforms; streamed responses stop timing when the stream becomes available. Axios replaces any existing `duration` value supplied by a custom adapter. (**[#11214](https://github.com/axios/axios/pull/11214)**) +* **UTF-8 Basic Authentication:** Added `transitional.encodeBasicAuthUsername: true` to support Unicode usernames in XHR and Fetch requests. The option defaults to `false`, preserving existing authentication behavior; applications opting in should supply the original Unicode username and remove manual pre-encoding workarounds. (**[#11159](https://github.com/axios/axios/pull/11159)**) + +## 🐛 Bug Fixes + +* **Fetch Compatibility:** Restored requests in runtimes such as Cloudflare Workers that reject the implicit `cache: 'default'`, while preserving explicit caller settings. Response-size failures now retain their original `ERR_BAD_RESPONSE` and request context when runtime wrappers replace the underlying stream error. (**[#11194](https://github.com/axios/axios/pull/11194)**, **[#11179](https://github.com/axios/axios/pull/11179)**) +* **Runtime Consistency:** Aligned encoded-byte size accounting, multipart uploads, proxy routing, same-origin resolution, parameter merging, and form serialization across adapters. Circular parameters now reject with `ERR_BAD_OPTION_VALUE`, and sparse or non-index numeric form fields serialize as keyed objects. With `proxy: false`, native `proxyEnv` agents using unsupported pool-management or TLS-session lifecycle overrides now reject with `ERR_BAD_OPTION_VALUE`; construct those agents without `proxyEnv`. (**[#11242](https://github.com/axios/axios/pull/11242)**) +* **Header Handling:** Preserved headers named **`__proto__`** using safe casing without changing the `AxiosHeaders` instance prototype. Function matchers in `has()`, `delete()`, and `clear()` now receive the headers instance as `this`, matching their declared contract. (**[#11134](https://github.com/axios/axios/pull/11134)**, **[#11216](https://github.com/axios/axios/pull/11216)**) +* **URL and Data URL Parsing:** Accepted case-insensitive supported URL schemes and Base64 markers, and corrected decoding of percent-encoded Base64 data URLs. Node data URL allocation estimates remain aligned with decoding so configured size limits apply before allocation. (**[#11138](https://github.com/axios/axios/pull/11138)**, **[#11163](https://github.com/axios/axios/pull/11163)**, **[#11294](https://github.com/axios/axios/pull/11294)**) +* **Error Diagnostics:** Preserved short reconstructed request stacks and appended wrapped error stacks under `Caused by:` so tooling that reads only `error.stack` retains the original failure context. (**[#11132](https://github.com/axios/axios/pull/11132)**, **[#11142](https://github.com/axios/axios/pull/11142)**) +* **Interceptor Removal:** Restored removal through canonical numeric-string interceptor IDs, including after registry compaction. (**[#11139](https://github.com/axios/axios/pull/11139)**) +* **Proxy TLS:** HTTPS CONNECT tunnels now apply current origin TLS options from an explicit `httpsAgent`, or from `https.globalAgent` when no explicit agent is supplied. This preserves process-wide custom CA settings through proxy tunnels. (**[#11178](https://github.com/axios/axios/pull/11178)**) +* **XHR Lifecycle:** Used asynchronous Cookie Store reads for XSRF tokens where supported, preserving cookie fallback, timeout accounting, and cancellation. Upload and download progress listeners are now removed on completion, failure, timeout, and cancellation. (**[#11166](https://github.com/axios/axios/pull/11166)**, **[#11225](https://github.com/axios/axios/pull/11225)**) +* **HTTP/2 Sessions:** Stopped reusing sessions immediately after GOAWAY and prevented draining sessions from scheduling idle timers that could delay process exit. (**[#11210](https://github.com/axios/axios/pull/11210)**) +* **TypeScript Declarations:** Exposed the response-default marker as a public type to resolve `TS2527` when consumers emit declarations involving unresolved response generics, covering both ESM and CommonJS. (**[#11125](https://github.com/axios/axios/pull/11125)**) + +## 🔧 Maintenance & Chores + +* **Configuration Performance:** Reduced request configuration merge overhead, particularly for requests with many headers, while preserving merge semantics and prototype-pollution guards. (**[#11208](https://github.com/axios/axios/pull/11208)**) +* **Same-Origin Checks:** Removed obsolete Internet Explorer detection without changing origin decisions in supported environments. (**[#11174](https://github.com/axios/axios/pull/11174)**) +* **Dependencies:** Updated `follow-redirects` to 1.16.1 and refreshed development, documentation, test, and GitHub Actions dependencies. Removed unused `dayjs` from the docs package, root `chalk`, and `chai` from CJS module tests. (**[#11169](https://github.com/axios/axios/pull/11169)**, **[#11188](https://github.com/axios/axios/pull/11188)**, **[#11189](https://github.com/axios/axios/pull/11189)**, **[#11195](https://github.com/axios/axios/pull/11195)**, **[#11212](https://github.com/axios/axios/pull/11212)**, **[#11213](https://github.com/axios/axios/pull/11213)**, **[#11218](https://github.com/axios/axios/pull/11218)**, **[#11220](https://github.com/axios/axios/pull/11220)**, **[#11221](https://github.com/axios/axios/pull/11221)**, **[#11230](https://github.com/axios/axios/pull/11230)**, **[#11234](https://github.com/axios/axios/pull/11234)**, **[#11244](https://github.com/axios/axios/pull/11244)**, **[#11245](https://github.com/axios/axios/pull/11245)**, **[#11266](https://github.com/axios/axios/pull/11266)**, **[#11267](https://github.com/axios/axios/pull/11267)**, **[#11268](https://github.com/axios/axios/pull/11268)**, **[#11269](https://github.com/axios/axios/pull/11269)**, **[#11270](https://github.com/axios/axios/pull/11270)**, **[#11271](https://github.com/axios/axios/pull/11271)**, **[#11272](https://github.com/axios/axios/pull/11272)**, **[#11298](https://github.com/axios/axios/pull/11298)**, **[#11302](https://github.com/axios/axios/pull/11302)**, **[#11303](https://github.com/axios/axios/pull/11303)**, **[#11304](https://github.com/axios/axios/pull/11304)**, **[#11305](https://github.com/axios/axios/pull/11305)**, **[#11306](https://github.com/axios/axios/pull/11306)**, **[#11313](https://github.com/axios/axios/pull/11313)**, **[#11321](https://github.com/axios/axios/pull/11321)**, **[#11322](https://github.com/axios/axios/pull/11322)**, **[#11323](https://github.com/axios/axios/pull/11323)**, **[#11342](https://github.com/axios/axios/pull/11342)**) +* **Documentation:** Fixed interceptor test links, updated README CDN examples to the published 1.20.0 bundle, and corrected guidance on interceptor options and request lifecycle ordering. (**[#11228](https://github.com/axios/axios/pull/11228)**, **[#11149](https://github.com/axios/axios/pull/11149)**, **[#11335](https://github.com/axios/axios/pull/11335)**) +* **Contributor Workflow:** Consolidated agent instructions in `AGENTS.md`, standardized PR labels, required prerelease notes and validation evidence, and clarified that `npm test` requires installed Playwright browsers. (**[#11238](https://github.com/axios/axios/pull/11238)**, **[#11273](https://github.com/axios/axios/pull/11273)**, **[#11223](https://github.com/axios/axios/pull/11223)**, **[#11284](https://github.com/axios/axios/pull/11284)**) +* **Sponsors and Support:** Added HeroDevs, Code for Japan, and Sweepico sponsor listings, refreshed sponsor data, and documented extended security support for Axios v0. (**[#11222](https://github.com/axios/axios/pull/11222)**, **[#11249](https://github.com/axios/axios/pull/11249)**, **[#11252](https://github.com/axios/axios/pull/11252)**, **[#11341](https://github.com/axios/axios/pull/11341)**) +* **Proxy Regression Coverage:** Added a long dotted request-hostname test for `NO_PROXY` handling, extending coverage of an existing denial-of-service fix. (**[#11235](https://github.com/axios/axios/pull/11235)**) +* **Release Preparation:** Updated package version metadata for 1.21.0. (**[#11346](https://github.com/axios/axios/pull/11346)**) + +## 🌟 New Contributors + +Welcome to our 24 new contributors. Thank you for helping improve Axios: + +* **@lazerg** (**[#11194](https://github.com/axios/axios/pull/11194)**) +* **@QIU-Guanzong** (**[#11228](https://github.com/axios/axios/pull/11228)**) +* **@Iams4kura** (**[#11125](https://github.com/axios/axios/pull/11125)**) +* **@vjymisal0** (**[#11179](https://github.com/axios/axios/pull/11179)**) +* **@jarrensj** (**[#11238](https://github.com/axios/axios/pull/11238)**) +* **@LineGu** (**[#11132](https://github.com/axios/axios/pull/11132)**) +* **@luantaraschi** (**[#11134](https://github.com/axios/axios/pull/11134)**) +* **@Cyberhet** (**[#11284](https://github.com/axios/axios/pull/11284)**) +* **@nyxst4ck** (**[#11138](https://github.com/axios/axios/pull/11138)**) +* **@windcrestai** (**[#11163](https://github.com/axios/axios/pull/11163)**) +* **@kazuki-netizen** (**[#11294](https://github.com/axios/axios/pull/11294)**) +* **@bilashcse** (**[#11139](https://github.com/axios/axios/pull/11139)**) +* **@JiuYue0820** (**[#11149](https://github.com/axios/axios/pull/11149)**) +* **@official-burak** (**[#11156](https://github.com/axios/axios/pull/11156)**) +* **@contactjawad** (**[#11159](https://github.com/axios/axios/pull/11159)**) +* **@wittachai-as** (**[#11174](https://github.com/axios/axios/pull/11174)**) +* **@yiheng-kkk** (**[#11166](https://github.com/axios/axios/pull/11166)**) +* **@ShikeChen01** (**[#11208](https://github.com/axios/axios/pull/11208)**) +* **@cuishuang** (**[#11210](https://github.com/axios/axios/pull/11210)**) +* **@Truenocancion** (**[#11225](https://github.com/axios/axios/pull/11225)**) +* **@jakezwang** (**[#11216](https://github.com/axios/axios/pull/11216)**) +* **@Adityagarg2712** (**[#11214](https://github.com/axios/axios/pull/11214)**) +* **@Zandereins** (**[#11235](https://github.com/axios/axios/pull/11235)**) +* **@Plastic-time** (**[#11335](https://github.com/axios/axios/pull/11335)**) + +[Full Changelog](https://github.com/axios/axios/compare/v1.20.0...v1.21.0) + +## v1.19.0 — July 22, 2026 + +This release raises the form-data security floor, adds configuration and type-system capabilities, and fixes NO_PROXY matching, interceptor errors, progress reporting, and serialization edge cases. + +## 🔒 Security Fixes + +- Multipart Form Data: Raised the form-data dependency floor to ^4.0.6, preventing fresh installations from resolving versions affected by the CRLF injection vulnerability GHSA-hmw2-7cc7-3qxx (https://github.com/advisories/GHSA-hmw2-7cc7-3qxx). (#11028) + +## 🚀 New Features + +- Configuration Extensibility: Preserved own-enumerable symbol-keyed fields through mergeConfig and added a generic params type across public TypeScript declarations, responses, errors, + adapters, and serializers. (#11043, #11081) +- Header Parameter Parsing: Added the opt-in AxiosHeaders.parseParameters() parser for quote-aware, RFC-style HTTP parameter parsing while preserving legacy parsing behavior. (#11051) +- HTTP Status Codes: Added the missing Cloudflare 520 WebServerReturnsAnUnknownError status and matching ESM/CJS declarations. (#11067) + +## 🐛 Bug Fixes + +- Form Data Conversion: Limited formDataToJSON path splitting to dot and bracket notation, preserving literal punctuation in keys, and removed browser-facing Buffer.from usage from toFormData to avoid unnecessary polyfills. (#11006, #11018) +- Proxy Bypass: Canonicalized IPv4 shorthand, octal, and hexadecimal forms during NO_PROXY matching and honored * entries within comma- or space-separated bypass lists. (#11029, #11053) +- Cancellation: Propagated already-aborted input signals immediately when composing abort signals. (#11035) +- Header Handling: Preserved empty first values for duplicate singleton headers and made AxiosHeaders#getSetCookie() consistently return arrays for present values. (#11036, #11037) +- URL Handling: Included normalized, safely redacted offending URLs in malformed-protocol errors and removed repeated trailing slashes when combining base URLs. (#11008, #11038) + +- Progress Events: Clamped malformed negative progress values to zero and ensured final Node.js download progress events are delivered before streamed responses close. (#11039, #11040) +- Error and JSON Serialization: Serialized Set values as arrays in JSON-compatible snapshots and synthesized useful AxiosError messages from otherwise-empty AggregateError instances. (#11044, #11059) +- Content-Length Enforcement: Corrected base64 data: URL size estimation so maxContentLength is enforced consistently by the HTTP and Fetch adapters. (#11061) +- Synchronous Interceptors: Prevented requests from being dispatched after synchronous request interceptors fail unless their paired rejection handler resolves successfully. (#11071) + +## 🔧 Maintenance & Chores + +- Dependencies: Updated development and test tooling, the docs fixture's Axios version, and GitHub Actions integrations including Checkout, Setup Node, Setup Deno, and Zizmor. (#11031, #11055, #11056, #11058, #11079, #11080, #11088, #11089, #11090) +- Build Outputs: Limited sourcemap generation to published minified bundles, removing broken map references from non-minified builds. (#11054) +- Form Data Internals: Centralized FormData header handling and made the Node.js adapter tolerate getHeaders() returning undefined under the content-only policy. (#11062) +- Developer Experience: Ignored common local AI-tooling directories and fixed a constant-reassignment crash when the development sandbox serves its root path. (#11032, #11073) +- Documentation: Updated sponsor information, clarified that baseURL is not a path-security boundary, scoped provenance claims to attested releases, and corrected the configuration-defaults documentation. (#11041, #11068, #11076, #11078) +- Publishing: Simplified v1 publishing to use the npm version bundled with Node.js 26 and updated package metadata for the 1.19.0 release. (#11083, #11095) + +## 🌟 New Contributors + +We are thrilled to welcome our new contributors. Thank you for helping improve Axios: + +- @afonsojramos (#11028) +- @MahinAnowar (#11006) +- @yassertawfik4 (#11024) +- @AnandSundar (#11029) +- @lin-hongkuan (#11035) +- @Wali007-lab (#11054) +- @magicdawn (#11043) +- @andrewkernel (#11053) +- @Sagargupta16 (#11059) +- @Rpaudel379 (#11078) +- @kobihikri (#11076) +- @spokodev (#11061) +- @shaedrich (#11081) +- @QodeXcli (#11062) +- @akahoshi1421 (#11067) +- @TheHonoredOne914 (#11071) +- @Ahsan1Murtaza (#11073) + +[Full Changelog](https://github.com/axios/axios/compare/v1.18.1...v1.19.0) + + +## v1.18.0 — June 13, 2026 + +This release hardens redirect and URL handling, improves the validateStatus configuration semantics, and includes updates to documentation, dependencies, and release metadata. + +## 🔒 Security Fixes + +* **Redirect Header Safety:** Added Node HTTP adapter support for stripping caller-specified sensitive headers on cross-origin redirects, helping prevent custom auth headers such as API keys from leaking to another origin. (__#10892__) + +* **URL And Request Hardening:** Rejects malformed `http:` and `https:` URLs that omit `//` with `ERR_INVALID_URL`, while tightening prototype-pollution-safe config reads, stream size limits, FormData depth handling, data URL sizing, and local `NO_PROXY` matching. (__#11000__) + +## 🐛 Bug Fixes + +* **Status Validation:** Added `transitional.validateStatusUndefinedResolves` so applications can opt in to treating `validateStatus: undefined` like the option was omitted, while `validateStatus: null` remains the explicit way to accept every status. (__#10899__) + +## 🔧 Maintenance & Chores + +* **Documentation:** Published the v1.17.0 release notes, fixed a changelog typo, clarified the package update PR policy, and marked the `proxy` request config as Node.js-only in the advanced docs. (__#10984__, __#10988__, __#10992__, __#10995__) + +* **Dependencies:** Bumped `@babel/core`, `@babel/preset-env`, `@commitlint/cli`, `@commitlint/config-conventional`, `@rollup/plugin-babel`, `@rollup/plugin-commonjs`, `@vitest/browser`, `@vitest/browser-playwright`, `eslint`, `lint-staged`, `rollup`, `vitest`, and `actions/checkout`. (__#10989__, __#10996__, __#10997__) + +* **Release Metadata:** Prepared the 1.18.0 release by updating package metadata and the runtime `VERSION` value. (__#11003__) + +## 🌟 New Contributors + +We are thrilled to welcome our new contributors. Thank you for helping improve axios: + +* __@drori12__ (__#10984__) +* __@eyupcanakman__ (__#10899__) +* __@Adi-Beker__ (__#10995__) + +[Full Changelog](https://github.com/axios/axios/compare/v1.17.0...v1.18.0) + +## v1.17.0 — June 1, 2026 + +This release adds Node HTTP zstd decompression, hardens config and release workflows, and fixes authentication, header, proxy, and type-handling regressions. + +## 🔒 Security Fixes + +* **Config Hardening:** Guarded `socketPath`, `params`, and `paramsSerializer` reads with own-property checks to prevent inherited prototype values from affecting request behavior, including SSRF-sensitive paths. (__#10901__, __#10922__) +* **Release Publishing:** Switched the publish workflow to npm staged publishing for safer, auditable package releases with provenance. (__#10926__) + +## 🚀 New Features + +* **HTTP Compression:** Added Node HTTP adapter support for zstd response decompression, with `transitional.advertiseZstdAcceptEncoding` controlling whether `zstd` is advertised in `Accept-Encoding`. (__#6792__, __#10920__) + +## 🐛 Bug Fixes + +* **Authentication Handling:** Restored Basic auth on same-origin Node redirects while continuing to strip credentials cross-origin, and aligned the fetch adapter with HTTP adapter behavior for URL-embedded Basic auth. (__#10929__, __#10896__) +* **Proxy TLS:** Preserved user `httpsAgent` TLS options when tunneling HTTPS requests through HTTP CONNECT proxies. (__#10957__) +* **React Native FormData:** Cleared default `Content-Type` for React Native `FormData` so multipart boundaries can be generated correctly. (__#10898__) +* **Headers:** Silently skipped empty or whitespace-only header names instead of throwing, matching parsed-header behavior and avoiding React Native response crashes. (__#10875__) +* **Request Data Merging:** Preserved enumerable symbol keys when cloning plain request data through axios merge logic. (__#10812__) +* **Bundler Compatibility:** Converted `resolveConfig` from an arrow default export to a named function export to avoid webpack and Babel transform interop failures. (__#10891__) +* **Types:** Corrected `AxiosHeaders.toJSON()` return types and updated CommonJS `isCancel` typings to narrow to `CanceledError`. (__#10956__, __#10952__) +* **Build Tooling:** Avoided emitting a null `Authorization` header from the GitHub build helper when `GITHUB_TOKEN` is unset. (__#10931__) + +## 🔧 Maintenance & Chores + +* **HTTP/2 Internals:** Extracted `Http2Sessions` into its own helper module and added direct unit coverage for session pooling, timeout, and cleanup behavior. (__#10861__) +* **Package Publishing:** Reduced published package size by switching to a `files` allowlist and dropping unneeded unminified bundle source maps. (__#10939__) +* **CI and Release Automation:** Added bundle-size reporting, moved reports to the job summary, fixed bundle-size comparison coverage, added Node 26 to the matrix, pinned npm for staged publishing, and prepared the 1.17.0 release. (__#10907__, __#10911__, __#10916__, __#10927__, __#10935__, __#10983__) +* **Developer Workflow:** Added a dev container and iterated on OpenSpec workflow files before removing them from the release branch. (__#10925__, __#10914__, __#10958__) +* **Documentation and Policy:** Updated disclosure, contributor, collaboration, threat-model, advanced docs, README badges, release notes, moderator configuration, and project metadata. (__#10890__, __#10889__, __#10921__, __#10945__, __#10905__, __#10933__, __#10915__, __#10887__, __#10955__) +* **Dependencies:** Bumped Babel tooling, Commitlint, ESLint, Rollup, Globals, Vitest, Playwright, `fs-extra`, `qs`, docs dependencies, and GitHub Actions dependencies including `actions/dependency-review-action` and `zizmorcore/zizmor-action`. (__#10871__, __#10879__, __#10918__, __#10919__, __#10934__, __#10947__, __#10954__, __#10960__) + +## 🌟 New Contributors + +We are thrilled to welcome our new contributors. Thank you for helping improve axios: + +* __@BasixKOR__ (__#6792__) +* __@carladams1299-lab__ (__#10861__) +* __@LaplaceYoung__ (__#10812__) +* __@JamieMagee__ (__#10939__) +* __@RonGamzu__ (__#10905__) +* __@sapirbaruch__ (__#10891__) +* __@nezukoagent__ (__#10901__) +* __@devareddy05__ (__#10929__) +* __@Mohammad-Faiz-Cloud-Engineer__ (__#10922__) +* __@azandabot__ (__#10931__) +* __@niksy__ (__#10896__) + +[Full Changelog](https://github.com/axios/axios/compare/v1.16.1...v1.17.0) + +## v1.16.1 — May 13, 2026 + +This release ships a defence-in-depth fix for prototype pollution in `formDataToJSON`, hardens proxy and CI workflows, restores Webpack 4 compatibility for the fetch adapter, and includes several small bug fixes and maintenance improvements. + +## 🔒 Security Fixes + +* **Prototype Pollution Defence-in-Depth:** Hardened `formDataToJSON` against already-polluted `Object.prototype` by walking own properties only, so attacker-controlled keys inherited from a poisoned prototype cannot propagate through deserialization. (__#7413__) +* **Proxy Cleartext Leak:** Fixed an issue where HTTPS request data could be transmitted in cleartext to an HTTP proxy under certain configurations. (__#10858__) +* **CI Cache Removal:** Removed all GitHub Actions caches as a defence-in-depth measure against cache poisoning vectors in the build pipeline. (__#10882__) + +## 🐛 Bug Fixes + +* **Data URI Parsing:** Updated the `fromDataURI` regex to match RFC 2397 more strictly, fixing edge cases in `data:` URL handling. (__#10829__) +* **Unicode Headers:** Preserved Unicode header values when running through request interceptors, so non-ASCII header content is no longer corrupted before dispatch. (__#10850__) +* **XHR Upload Progress:** Guarded against malformed `ProgressEvent` payloads emitted by some environments during XHR upload, preventing crashes when `loaded` / `total` are missing or invalid. (__#10868__) +* **Webpack 4 Fetch Adapter:** Fixed an "unexpected token" error caused by syntax in the fetch adapter that Webpack 4 could not parse, restoring compatibility for legacy bundler users. (__#10864__) +* **Type Definitions:** Made `parseReviver` `context.source` optional in the type definitions to align with the ES2023 specification. (__#10837__) +* **URL Object Support Reverted:** Reverted the change that allowed passing a `URL` object as `config.url` (originally __#10866__) due to regressions; this support will be reintroduced in a later release once the underlying issues are addressed. (__#10874__) + +## 🔧 Maintenance & Chores + +* **Cycle Detection Refactor:** Replaced the array-based cycle tracker in `toJSONObject` with a `WeakSet`, improving performance and memory behaviour on large nested structures. (__#10832__) +* **composeSignals Cleanup:** Refactored `composeSignals` to use a clearer early-return structure, simplifying the cancellation/abort composition path. (__#10844__) +* **AI Readiness & Repo Docs:** Added `AGENTS.md` and related contributor-guide updates for both human and AI agents, plus post-release documentation improvements. (__#10835__, __#10841__) +* **Docs Improvements:** Clarified the GET request example, fixed the interceptor `eject` example to reference the correct instance, and corrected the Buzzoid sponsor description in the README. (__#10836__, __#10853__, __#10856__) +* **Sponsorship Tooling:** Fixed empty sponsor arrays in the sponsor processing script, added the ability to inject additional sponsors, updated the sponsorship link, and added a Twicsy advertisement entry. (__#10843__, __#10859__, __#10869__) +* **Dependencies:** Bumped `@commitlint/cli` from 20.5.0 to 20.5.2. (__#10846__) + +## 🌟 New Contributors + +We are thrilled to welcome our new contributors. Thank you for helping improve axios: + +* __@hpinmetaverse__ (__#10836__) +* __@tommyhgunz14__ (__#7413__) +* __@abhu85__ (__#10829__) +* __@divyanshuraj1095__ (__#10853__) +* __@sagodi97__ (__#10856__) +* __@rkdfx__ (__#10868__) +* __@Liuwei1125__ (__#10866__) + +[Full Changelog](https://github.com/axios/axios/compare/v1.16.0...v1.16.1) + +## v1.16.0 — May 2, 2026 + +This release adds support for the QUERY HTTP method and a new `ECONNREFUSED` error constant, lands a substantial wave of HTTP, fetch, and XHR adapter bug fixes around redirects, aborts, headers, and timeouts, and welcomes 23 new contributors. + +## ⚠️ Notable Changes + +A handful of fixes in this release are either security-adjacent or change observable behaviour. Please review before upgrading: + +- **Fetch adapter now enforces `maxBodyLength` and `maxContentLength`.** These limits were silently ignored on the fetch adapter prior to 1.16.0 — anyone relying on them as a safety net (DoS protection, accidental large uploads) had no protection. (**#10795**) +- **Proxy requests now preserve user-supplied `Host` headers.** Previously, the proxy path could overwrite a custom `Host`. Virtual-host-style routing through a proxy will now behave correctly. (**#10822**) +- **Basic auth credentials embedded in URLs are now URL-decoded.** If you have percent-encoded credentials in a URL (e.g. `https://user:p%40ss@host`), the decoded value is what now goes on the wire. (**#10825**) +- **`parseProtocol` now strictly requires a colon in the protocol separator.** Strings that loosely parsed as protocols before may no longer match. (**#10729**) +- **Deprecated `unescape()` replaced with modern UTF-8 encoding.** Non-ASCII URL handling is now spec-correct; consumers depending on legacy `unescape()` quirks may see different output bytes. (**#7378**) +- **`transformRequest` input typing change was reverted.** The typing change introduced in #10745 was reverted in #10810 after follow-up review — net behavior is unchanged from 1.15.2. (**#10745**, **#10810**) + +## 🚀 New Features + +- **QUERY HTTP Method:** Added support for the QUERY HTTP method across adapters and type definitions. (**#10802**) +- **ECONNREFUSED Error Constant:** Exposed `ECONNREFUSED` as a constant on `AxiosError` so callers can match connection-refused failures without comparing string literals (closes #6485). (**#10680**) +- **Encode Helper Export:** Exported the internal `encode` helper from `buildURL` so userland param serializers can reuse the same encoding logic that axios uses internally. (**#6897**) + +## 🐛 Bug Fixes + +- **HTTP Adapter — Redirects & Headers:** Cleared stale headers when a redirect targets a no-proxy host, fixed the redirect listener chain so listeners no longer stack across hops, restored the missing `requestDetails` argument on `beforeRedirect`, preserved user-supplied `Host` headers when forwarding through a proxy, and properly URL-decoded basic auth credentials. (**#10794**, **#10800**, **#6241**, **#10822**, **#10825**) +- **HTTP Adapter — Streams & Timeouts:** Preserved the partial response object on `AxiosError` when a stream is aborted after headers arrive, honoured the `timeout` option during the connect phase when redirects are disabled, and resolved an unsettled-promise hang when an aborted request was combined with compression and `maxRedirects: 0`. (**#10708**, **#10819**, **#7149**) +- **Fetch Adapter:** Enforced `maxBodyLength` / `maxContentLength` in the fetch adapter, set the `User-Agent` header to match the HTTP adapter, preserved the original abort reason instead of replacing it with a generic error, and deferred global access so importing the module no longer throws a `TypeError` in restricted environments. (**#10795**, **#10772**, **#10806**, **#7260**) +- **XHR Adapter:** Unsubscribed the `cancelToken` and `AbortSignal` listeners on the error, timeout, and abort code paths to prevent leaked subscriptions. (**#10787**) +- **Error Handling:** Attached the parsed response to `AxiosError` when `JSON.parse` fails inside `dispatchRequest`, prevented `settle` from emitting `undefined` error codes, and tightened the `parseProtocol` regex to require a colon in the protocol separator. (**#10724**, **#7276**, **#10729**) +- **Types & Exports:** Aligned the CommonJS `CancelToken` typings with the ESM build, fixed a compiler error caused by `RawAxiosHeaders`, and re-exported `create` from the package index. (**#7414**, **#6389**, **#6460**) +- **UTF-8 Encoding:** Replaced the deprecated `unescape()` call with a modern UTF-8 encoding implementation. (**#7378**) +- **Misc Cleanup:** Resolved a batch of small inconsistencies and gadget-level issues across the codebase. (**#10833**) + +## 🔧 Maintenance & Chores + +- **Refactor — ES6 Modernisation:** Modernised the `utils` module and XHR adapter to use ES6 features, and tidied the multipart boundary error message. (**#10588**, **#7419**) +- **Tests:** Hardened the HTTP test server lifecycle to fix flaky `FormData` EPIPE failures, fixed Win32 platform support for the pipe tests, and corrected an incorrect test assumption. (**#10820**, **#10791**, **#10796**) +- **Docs:** Documented `paramsSerializer.encode` for strict RFC 3986 query encoding, updated the `parseReviver` TypeScript definitions and configuration docs for ES2023, added timeout guidance to the README's first async example, and expanded notes around the recent type changes. (**#10821**, **#10782**, **#10759**, **#10804**) +- **Reverted:** Reverted the `transformRequest` input typing change from #10745 after follow-up review. (**#10745**, **#10810**) +- **Dependencies:** Bumped `actions/setup-node`, the `github-actions` group, and `postcss` (in `/docs`) to their latest versions. (**#10785**, **#10813**, **#10814**) +- **Release:** Updated changelog and packages, and prepared the 1.16.0 release. (**#10790**, **#10834**) + +## 🌟 New Contributors + +We are thrilled to welcome our new contributors. Thank you for helping improve axios: + +- **@singhankit001** (**#10588**) +- **@cuiweixie** (**#7419**) +- **@iruizsalinas** (**#10787**) +- **@MarcosNocetti** (**#10680**) +- **@deepview-autofix** (**#10729**) +- **@atharvasingh7007** (**#10745**) +- **@OfekDanny** (**#10772**) +- **@mnahkies** (**#7414**) +- **@tboyila** (**#10759**) +- **@Kingo64** (**#6897**) +- **@ramram1048** (**#6389**) +- **@FLNacif** (**#6460**) +- **@zozo123** (**#10806**) +- **@pierluigilenoci** (**#10802**) +- **@afurm** (**#10708**) +- **@karan-lrn** (**#7378**) +- **@ebeigarts** (**#7149**) +- **@Raymondo97** (**#10782**) +- **@mixelburg** (**#10821**) +- **@ashishkr96** (**#10822**) +- **@cyphercodes** (**#10819**) +- **@Jye10032** (**#7260**) +- **@VeerShah41** (**#7276**) + +[Full Changelog](https://github.com/axios/axios/compare/v1.15.2...v1.16.0) + +## v1.15.2 - April 21, 2026 + +This release delivers prototype-pollution hardening for the Node HTTP adapter, adds an opt-in `allowedSocketPaths` allowlist to mitigate SSRF via Unix domain sockets, fixes a keep-alive socket memory leak, and ships supply-chain hardening across CI and security docs. + +## 🔒 Security Fixes + +- **Prototype Pollution Hardening (HTTP Adapter):** Hardened the Node HTTP adapter and `resolveConfig`/`mergeConfig`/validator paths to read only own properties and use null-prototype config objects, preventing polluted `auth`, `baseURL`, `socketPath`, `beforeRedirect`, and `insecureHTTPParser` from influencing requests. (**#10779**) +- **SSRF via `socketPath`:** Rejects non-string `socketPath` values and adds an opt-in `allowedSocketPaths` config option to restrict permitted Unix domain socket paths, returning `AxiosError` `ERR_BAD_OPTION_VALUE` on mismatch. (**#10777**) +- **Supply-chain Hardening:** Added `.npmrc` with `ignore-scripts=true`, lockfile lint CI, non-blocking reproducible build diff, scoped CODEOWNERS, expanded `SECURITY.md`/`THREATMODEL.md` with provenance verification (`npm audit signatures`), 60-day resolution policy, and maintainer incident-response runbook. (**#10776**) + +## 🚀 New Features + +- **`allowedSocketPaths` Config Option:** New request config option (and TypeScript types) to allowlist Unix domain socket paths used by the Node http adapter; backwards compatible when unset. (**#10777**) + +## 🐛 Bug Fixes + +- **Keep-alive Socket Memory Leak:** Installs a single per-socket `error` listener tracking the active request via `kAxiosSocketListener`/`kAxiosCurrentReq`, eliminating per-request listener accumulation, `MaxListenersExceededWarning`, and linear heap growth under concurrent or long-running keep-alive workloads (fixes #10780). (**#10788**) + +## 🔧 Maintenance & Chores + +- **Changelog:** Updated `CHANGELOG.md` with v1.15.1 release notes. (**#10781**) + +[Full Changelog](https://github.com/axios/axios/compare/v1.15.1...v1.15.2) + +--- + +## v1.15.1 - April 19, 2026 + +This release ships a coordinated set of security hardening fixes across headers, body/redirect limits, multipart handling, and XSRF/prototype-pollution vectors, alongside a broad sweep of bug fixes, test migrations, and threat-model documentation updates. + +## 🔒 Security Fixes + +- **Header Injection Hardening:** Tightened validation and sanitisation across request header construction to close the header-injection attack surface. (**#10749**) + +- **CRLF Stripping in Multipart Headers:** Correctly strips CR/LF from multipart header values to prevent injection via field names and filenames. (**#10758**) + +- **Prototype Pollution / Auth Bypass:** Replaced unsafe `in` checks with `hasOwnProperty` to prevent authentication bypass via prototype pollution on config objects, with additional regression tests. (**#10761**, **#10760**) + +- **`withXSRFToken` Truthy Bypass:** Short-circuits on any truthy non-boolean value, so an ambiguous config no longer silently leaks the XSRF token cross-origin. (**#10762**) + +- **`maxBodyLength` With Zero Redirects:** Enforces `maxBodyLength` even when `maxRedirects` is set to `0`, closing a bypass path for oversized request bodies. (**#10753**) + +- **Streamed Response `maxContentLength` Bypass:** Applies `maxContentLength` to streamed responses that previously bypassed the cap. (**#10754**) + +- **Follow-up CVE Completion:** Completes an earlier incomplete CVE fix to fully close the regression window. (**#10755**) + +## 🚀 New Features + +- **AI-Based Docs Translations:** Initial scaffold for AI-assisted translations of the documentation site. (**#10705**) + +- **`Location` Request Header Type:** Adds `Location` to `CommonRequestHeadersList` for accurate typing of redirect-aware requests. (**#7528**) + +## 🐛 Bug Fixes + +- **FormData Handling:** Removes `Content-Type` when no boundary is present on `FormData` fetch requests, supports multi-select fields, cancels `request.body` instead of the source stream on fetch abort, and fixes a recursion bug in form-data serialisation. (**#7314**, **#10676**, **#10702**, **#10726**) + +- **HTTP Adapter:** Handles socket-only request errors without leaking keep-alive listeners. (**#10576**) + +- **Progress Events:** Clamps `loaded` to `total` for computable upload/download progress events. (**#7458**) + +- **Types:** Aligns `runWhen` type with the runtime behaviour in `InterceptorManager` and makes response header keys case-insensitive. (**#7529**, **#10677**) + +- **`buildFullPath`:** Uses strict equality in the base/relative URL check. (**#7252**) + +- **`AxiosURLSearchParams` Regex:** Improves the regex used for param serialisation to avoid edge-case mismatches. (**#10736**) + +- **Resilient Value Parsing:** Parses out header/config values instead of throwing on malformed input. (**#10687**) + +- **Docs Artefact Cleanup:** Removes the docs content that was incorrectly committed. (**#10727**) + +## 🔧 Maintenance & Chores + +- **Threat Model & Security Docs:** Ongoing refinement of `THREATMODEL.md`, including Hopper security update, TLS and tag-replay wording, mitigation descriptions, decompression-bomb guidance, and further cleanup. (**#10672**, **#10715**, **#10718**, **#10722**, **#10763**, **#10765**) + +- **Test Coverage & Migration:** Expanded `shouldBypassProxy` coverage for wildcard/IPv6/edge cases, documented and tested `AxiosError.status`, and migrated `progressEventReducer` tests to Vitest. (**#10723**, **#10725**, **#10741**) + +- **Type Refactor:** Uses TypeScript utility types to deduplicate literal unions. (**#7520**) + +- **Repo & CI:** Adds `CODEOWNERS`, switches v1.x releases to an ephemeral release branch, and removes orphaned Bower support. (**#10739**, **#10738**, **#10746**) + +## 🌟 New Contributors + +We are thrilled to welcome our new contributors. Thank you for helping improve axios: + +- **@curiouscoder-cmd** (**#7252**) +- **@tryonelove** (**#7520**) +- **@darwin808** (**#7314**) +- **@zoontek** (**#10702**) +- **@AKIB473** (**#10725**) + +[Full Changelog](https://github.com/axios/axios/compare/v1.15.0...v1.15.1) + +--- + +## v1.15.0 - April 7, 2026 + +This release delivers two critical security patches targeting header injection and SSRF via proxy bypass, adds official runtime support for Deno and Bun, and includes significant CI security hardening. + +## 🔒 Security Fixes + +- **Header Injection (CRLF):** Rejects any header value containing `\r` or `\n` characters to block CRLF injection chains that could be used to exfiltrate cloud metadata (IMDS). Behavior change: headers with CR/LF now throw `"Invalid character in header content"`. (**#10660**) + +- **SSRF via `no_proxy` Bypass:** Introduces a `shouldBypassProxy` helper that normalises hostnames (strips trailing dots, handles bracketed IPv6) before evaluating `no_proxy`/`NO_PROXY` rules, closing a gap that could cause loopback or internal hosts to be inadvertently proxied. (**#10661**) + +## 🚀 New Features + +- **Deno & Bun Runtime Support:** Added full smoke test suites for Deno and Bun, with CI workflows that run both runtimes before any release is cut. (**#10652**) + +## 🐛 Bug Fixes + +- **Node.js v22 Compatibility:** Replaced deprecated `url.parse()` calls with the WHATWG `URL`/`URLSearchParams` API across examples, sandbox, and tests, eliminating `DEP0169` deprecation warnings on Node.js v22+. (**#10625**) + +## 🔧 Maintenance & Chores + +- **CI Security Hardening:** Added [zizmor](https://github.com/zizmorcore/zizmor) GitHub Actions security scanner; switched npm publish to OIDC Trusted Publishing (removing the long-lived `NODE_AUTH_TOKEN`); pinned all action references to full commit SHAs; narrowed workflow permissions to least privilege; gated the publish step behind a dedicated `npm-publish` environment; and blocked the sponsor-block workflow from running on forks. (**#10618**, **#10619**, **#10627**, **#10637**, **#10641**, **#10666**) + +- **Docs:** Clarified HTTP/2 support and the unsupported `httpVersion` option; added documentation for header case preservation; improved the `beforeRedirect` example to prevent accidental credential leakage. (**#10644**, **#10654**, **#10624**) + +- **Dependencies:** Bumped `picomatch`, `handlebars`, `serialize-javascript`, `vite` (×3), `denoland/setup-deno`, and 4 additional dev dependencies to latest versions. (**#10564**, **#10565**, **#10567**, **#10568**, **#10572**, **#10574**, **#10663**, **#10664**, **#10665**, **#10669**, **#10670**) + +## 🌟 New Contributors + +We are thrilled to welcome our new contributors. Thank you for helping improve axios: + +- **@Kilros0817** (**#10625**) +- **@shaanmajid** (**#10616**, **#10617**, **#10618**, **#10619**, **#10637**, **#10641**, **#10666**) +- **@ashstrc** (**#10624**, **#10644**) +- **@Abhi3975** (**#10589**) +- **@raashish1601** (**#10573**) + +[Full Changelog](https://github.com/axios/axios/compare/v1.14.0...v1.15.0) + +--- + +## v1.14.0 - March 27, 2026 + +This release fixes a security vulnerability in the `formidable` dependency, resolves a CommonJS compatibility regression, hardens proxy and HTTP/2 handling, and modernises the build and test toolchain. + +## 🔒 Security Fixes + +- **Formidable Vulnerability:** Upgraded `formidable` from v2 to v3 to address a reported arbitrary-file vulnerability. Updated test server and assertions to align with the v3 API. (**#7533**) + +## 🐛 Bug Fixes + +- **CommonJS Compatibility:** Restored `require('axios')` in Node.js by correcting the `main` field in `package.json` to point to the built CJS bundle. (**#7532**) + +- **Fetch Adapter:** Cancel the `ReadableStream` body after the request stream capability probe to prevent resource leaks. (**#7515**) + +- **Proxy:** Upgraded `proxy-from-env` to v2 and switched to the named `getProxyForUrl` export, fixing proxy detection from environment variables and resolving CJS bundling errors. (**#7499**) + +- **HTTP/2:** Close detached HTTP/2 sessions on timeout to free resources when no new requests arrive. (**#7457**) + +- **Headers:** Trim trailing CRLF characters from normalised header values. (**#7456**) + +## 🔧 Maintenance & Chores + +- **Toolchain Modernisation:** Migrated test suite to Vitest, updated ESLint to v10, upgraded Rollup and `@rollup/plugin-babel`, migrated to Husky 9, upgraded TypeScript to latest, and modernised the Express test harness. (**#7484**, **#7489**, **#7498**, **#7505**, **#7506**, **#7507**, **#7508**, **#7509**, **#7510**, **#7516**, **#7522**) + +- **Dependencies:** Bumped `multer` to v2, `minimatch`, `tar`, `pacote`, `@babel/preset-env`, and additional dev dependencies. (**#7453**, **#7480**, **#7491**, **#7504**, **#7517**, **#7531**) + +## 🌟 New Contributors + +We are thrilled to welcome our new contributors. Thank you for helping improve axios: + +- **@penkzhou** (**#7515**) +- **@aviu16** (**#7456**) +- **@fedotov** (**#7457**) + +[Full Changelog](https://github.com/axios/axios/compare/v1.13.6...v1.14.0) + +--- + +## v1.13.6 - February 27, 2026 + +This release adds React Native Blob support, fixes several enumeration and export regressions, and patches FormData detection for WeChat Mini Program environments. + +## 🚀 New Features + +- **React Native Blob Support:** Axios now correctly handles native Blob objects in React Native environments. (**#5764**) + +## 🐛 Bug Fixes + +- **AxiosError:** Fixed `AxiosError.from` not copying the `status` field from the source error. (**#7403**) + +- **AxiosError:** Made the `message` property enumerable so it appears in `JSON.stringify` output and `Object.keys`. (**#7392**) + +- **FormData Detection:** Corrected safe FormData detection for WeChat Mini Program environments. (**#7324**) + +- **React Native / Browserify Export:** Fixed broken module export that caused import failures in React Native and Browserify. (**#7386**) + +## 🔧 Maintenance & Chores + +- **Dependencies:** Migrated `@rollup/plugin-babel` from v5 to v6 and bumped the development dependencies group. (**#7424**, **#7432**) + +## 🌟 New Contributors + +We are thrilled to welcome our new contributors. Thank you for helping improve axios: + +- **@moh3n9595** (**#5764**) +- **@skrtheboss** (**#7403**) +- **@ybbus** (**#7392**) +- **@Shiwaangee** (**#7324**) +- **@Gudahtt** (**#7386**) + +[Full Changelog](https://github.com/axios/axios/compare/v1.13.5...v1.13.6) + +--- + +## v1.13.5 - February 8, 2026 + +This release patches a prototype pollution denial-of-service vulnerability, fixes a missing `status` field regression in `AxiosError`, adds interceptor ordering control, and introduces URL validation for `isAbsoluteURL`. + +## 🔒 Security Fixes + +- **Prototype Pollution (DoS):** Hardened `mergeConfig` to ignore `__proto__`, `constructor`, and `prototype` keys, preventing denial-of-service via prototype pollution when merging user-supplied config. (**#7369**) + +## 🚀 New Features + +- **`isAbsoluteURL` Validation:** Added input validation to `isAbsoluteURL` to handle malformed or unexpected input gracefully. (**#7326**) + +## 🐛 Bug Fixes + +- **AxiosError `status`:** Restored the `status` field on `AxiosError` instances, which was missing in v1.13.3 and later. (**#7368**) + +- **Interceptor Ordering:** Added a `useLegacyInterceptorOrder` option to restore pre-v1.13 interceptor execution order for applications relying on the previous behaviour. ([569f028](https://github.com/axios/axios/commit/569f028a5878faaec8d7d138ba686aac407bda4c)) + +## 🔧 Maintenance & Chores + +- **CI:** Fixed run conditions and updated workflow YAMLs. (**#7372**, **#7373**) + +- **Dependencies:** Bumped `karma-sourcemap-loader` and minor package versions. (**#7356**, **#7360**) + +## 🌟 New Contributors + +We are thrilled to welcome our new contributors. Thank you for helping improve axios: + +- **@asmitha-16** (**#7326**) + +[Full Changelog](https://github.com/axios/axios/compare/v1.13.4...v1.13.5) + +--- + +## v1.13.4 - January 27, 2026 + +Patch release fixing regressions introduced in v1.13.3, including TypeScript export compatibility and CI/build stability. + +## 🐛 Bug Fixes + +- **v1.13.3 Regressions:** Fixed multiple issues introduced by the v1.13.3 release, including broken merge configs. (**#7352**) + +- **TypeScript Exports:** Corrected TypeScript export declarations to restore proper type resolution. (**#4884**) + +## 🔧 Maintenance & Chores + +- **CI & Build:** Refactored CI pipeline and build configuration for stability. (**#7340**) + +[Full Changelog](https://github.com/axios/axios/compare/v1.13.3...v1.13.4) + +--- + +## [1.13.3](https://github.com/axios/axios/compare/v1.13.2...v1.13.3) (2026-01-20) + +### Bug Fixes + +- **http2:** Use port 443 for HTTPS connections by default. ([#7256](https://github.com/axios/axios/issues/7256)) ([d7e6065](https://github.com/axios/axios/commit/d7e60653460480ffacecf85383012ca1baa6263e)) +- **interceptor:** handle the error in the same interceptor ([#6269](https://github.com/axios/axios/issues/6269)) ([5945e40](https://github.com/axios/axios/commit/5945e40bb171d4ac4fc195df276cf952244f0f89)) +- main field in package.json should correspond to cjs artifacts ([#5756](https://github.com/axios/axios/issues/5756)) ([7373fbf](https://github.com/axios/axios/commit/7373fbff24cd92ce650d99ff6f7fe08c2e2a0a04)) +- **package.json:** add 'bun' package.json 'exports' condition. Load the Node.js build in Bun instead of the browser build ([#5754](https://github.com/axios/axios/issues/5754)) ([b89217e](https://github.com/axios/axios/commit/b89217e3e91de17a3d55e2b8f39ceb0e9d8aeda8)) +- silentJSONParsing=false should throw on invalid JSON ([#7253](https://github.com/axios/axios/issues/7253)) ([#7257](https://github.com/axios/axios/issues/7257)) ([7d19335](https://github.com/axios/axios/commit/7d19335e43d6754a1a9a66e424f7f7da259895bf)) +- turn AxiosError into a native error ([#5394](https://github.com/axios/axios/issues/5394)) ([#5558](https://github.com/axios/axios/issues/5558)) ([1c6a86d](https://github.com/axios/axios/commit/1c6a86dd2c0623ee1af043a8491dbc96d40e883b)) +- **types:** add handlers to AxiosInterceptorManager interface ([#5551](https://github.com/axios/axios/issues/5551)) ([8d1271b](https://github.com/axios/axios/commit/8d1271b49fc226ed7defd07cd577bd69a55bb13a)) +- **types:** restore AxiosError.cause type from unknown to Error ([#7327](https://github.com/axios/axios/issues/7327)) ([d8233d9](https://github.com/axios/axios/commit/d8233d9e8e9a64bfba9bbe01d475ba417510b82b)) +- unclear error message is thrown when specifying an empty proxy authorization ([#6314](https://github.com/axios/axios/issues/6314)) ([6ef867e](https://github.com/axios/axios/commit/6ef867e684adf7fb2343e3b29a79078a3c76dc29)) + +### Features + +- add `undefined` as a value in AxiosRequestConfig ([#5560](https://github.com/axios/axios/issues/5560)) ([095033c](https://github.com/axios/axios/commit/095033c626895ecdcda2288050b63dcf948db3bd)) +- add automatic minor and patch upgrades to dependabot ([#6053](https://github.com/axios/axios/issues/6053)) ([65a7584](https://github.com/axios/axios/commit/65a7584eda6164980ddb8cf5372f0afa2a04c1ed)) +- add Node.js coverage script using c8 (closes [#7289](https://github.com/axios/axios/issues/7289)) ([#7294](https://github.com/axios/axios/issues/7294)) ([ec9d94e](https://github.com/axios/axios/commit/ec9d94e9f88da13e9219acadf65061fb38ce080a)) +- added copilot instructions ([3f83143](https://github.com/axios/axios/commit/3f83143bfe617eec17f9d7dcf8bafafeeae74c26)) +- compatibility with frozen prototypes ([#6265](https://github.com/axios/axios/issues/6265)) ([860e033](https://github.com/axios/axios/commit/860e03396a536e9b926dacb6570732489c9d7012)) +- enhance pipeFileToResponse with error handling ([#7169](https://github.com/axios/axios/issues/7169)) ([88d7884](https://github.com/axios/axios/commit/88d78842541610692a04282233933d078a8a2552)) +- **types:** Intellisense for string literals in a widened union ([#6134](https://github.com/axios/axios/issues/6134)) ([f73474d](https://github.com/axios/axios/commit/f73474d02c5aa957b2daeecee65508557fd3c6e5)), closes [/github.com/microsoft/TypeScript/issues/33471#issuecomment-1376364329](https://github.com//github.com/microsoft/TypeScript/issues/33471/issues/issuecomment-1376364329) + +### Reverts + +- Revert "fix: silentJSONParsing=false should throw on invalid JSON (#7253) (#7…" (#7298) ([a4230f5](https://github.com/axios/axios/commit/a4230f5581b3f58b6ff531b6dbac377a4fd7942a)), closes [#7253](https://github.com/axios/axios/issues/7253) [#7](https://github.com/axios/axios/issues/7) [#7298](https://github.com/axios/axios/issues/7298) +- **deps:** bump peter-evans/create-pull-request from 7 to 8 in the github-actions group ([#7334](https://github.com/axios/axios/issues/7334)) ([2d6ad5e](https://github.com/axios/axios/commit/2d6ad5e48bd29b0b2b5e7e95fb473df98301543a)) + +### Contributors to this release + +- avatar [Ashvin Tiwari](https://github.com/ashvin2005 '+1752/-4 (#7218 #7218 )') +- avatar [Nikunj Mochi](https://github.com/mochinikunj '+940/-12 (#7294 #7294 )') +- avatar [Anchal Singh](https://github.com/imanchalsingh '+544/-102 (#7169 #7185 )') +- avatar [jasonsaayman](https://github.com/jasonsaayman '+317/-73 (#7334 #7298 )') +- avatar [Julian Dax](https://github.com/brodo '+99/-120 (#5558 )') +- avatar [Akash Dhar Dubey](https://github.com/AKASHDHARDUBEY '+167/-0 (#7287 #7288 )') +- avatar [Madhumita](https://github.com/madhumitaaa '+20/-68 (#7198 )') +- avatar [Tackoil](https://github.com/Tackoil '+80/-2 (#6269 )') +- avatar [Justin Dhillon](https://github.com/justindhillon '+41/-41 (#6324 #6315 )') +- avatar [Rudransh](https://github.com/Rudrxxx '+71/-2 (#7257 )') +- avatar [WuMingDao](https://github.com/WuMingDao '+36/-36 (#7215 )') +- avatar [codenomnom](https://github.com/codenomnom '+70/-0 (#7201 #7201 )') +- avatar [Nandan Acharya](https://github.com/Nandann018-ux '+60/-10 (#7272 )') +- avatar [Eric Dubé](https://github.com/KernelDeimos '+22/-40 (#7042 )') +- avatar [Tibor Pilz](https://github.com/tiborpilz '+40/-4 (#5551 )') +- avatar [Gabriel Quaresma](https://github.com/joaoGabriel55 '+31/-4 (#6314 )') +- avatar [Turadg Aleahmad](https://github.com/turadg '+23/-6 (#6265 )') +- avatar [JohnTitor](https://github.com/kiritosan '+14/-14 (#6155 )') +- avatar [rohit miryala](https://github.com/rohitmiryala '+22/-0 (#7250 )') +- avatar [Wilson Mun](https://github.com/wmundev '+20/-0 (#6053 )') +- avatar [techcodie](https://github.com/techcodie '+7/-7 (#7236 )') +- avatar [Ved Vadnere](https://github.com/Archis009 '+5/-6 (#7283 )') +- avatar [svihpinc](https://github.com/svihpinc '+5/-3 (#6134 )') +- avatar [SANDESH LENDVE](https://github.com/mrsandy1965 '+3/-3 (#7246 )') +- avatar [Lubos](https://github.com/mrlubos '+5/-1 (#7312 )') +- avatar [Jarred Sumner](https://github.com/Jarred-Sumner '+5/-1 (#5754 )') +- avatar [Adam Hines](https://github.com/thebanjomatic '+2/-1 (#5756 )') +- avatar [Subhan Kumar Rai](https://github.com/Subhan030 '+2/-1 (#7256 )') +- avatar [Joseph Frazier](https://github.com/josephfrazier '+1/-1 (#7311 )') +- avatar [KT0803](https://github.com/KT0803 '+0/-2 (#7229 )') +- avatar [Albie](https://github.com/AlbertoSadoc '+1/-1 (#5560 )') +- avatar [Jake Hayes](https://github.com/thejayhaykid '+1/-0 (#5999 )') + +## [1.13.2](https://github.com/axios/axios/compare/v1.13.1...v1.13.2) (2025-11-04) + +### Bug Fixes + +- **http:** fix 'socket hang up' bug for keep-alive requests when using timeouts; ([#7206](https://github.com/axios/axios/issues/7206)) ([8d37233](https://github.com/axios/axios/commit/8d372335f5c50ecd01e8615f2468a9eb19703117)) +- **http:** use default export for http2 module to support stubs; ([#7196](https://github.com/axios/axios/issues/7196)) ([0588880](https://github.com/axios/axios/commit/0588880ac7ddba7594ef179930493884b7e90bf5)) + +### Performance Improvements + +- **http:** fix early loop exit; ([#7202](https://github.com/axios/axios/issues/7202)) ([12c314b](https://github.com/axios/axios/commit/12c314b603e7852a157e93e47edb626a471ba6c5)) + +### Contributors to this release + +- avatar [Dmitriy Mozgovoy](https://github.com/DigitalBrainJS '+28/-9 (#7206 #7202 )') +- avatar [Kasper Isager Dalsgarð](https://github.com/kasperisager '+9/-9 (#7196 )') + +## [1.13.1](https://github.com/axios/axios/compare/v1.13.0...v1.13.1) (2025-10-28) + +### Bug Fixes + +- **http:** fixed a regression that caused the data stream to be interrupted for responses with non-OK HTTP statuses; ([#7193](https://github.com/axios/axios/issues/7193)) ([bcd5581](https://github.com/axios/axios/commit/bcd5581d208cd372055afdcb2fd10b68ca40613c)) + +### Contributors to this release + +- avatar [Anchal Singh](https://github.com/imanchalsingh '+220/-111 (#7173 )') +- avatar [Dmitriy Mozgovoy](https://github.com/DigitalBrainJS '+18/-1 (#7193 )') + +# [1.13.0](https://github.com/axios/axios/compare/v1.12.2...v1.13.0) (2025-10-27) + +### Bug Fixes + +- **fetch:** prevent TypeError when config.env is undefined ([#7155](https://github.com/axios/axios/issues/7155)) ([015faec](https://github.com/axios/axios/commit/015faeca9f26db76f9562760f04bb9f8229f4db1)) +- resolve issue [#7131](https://github.com/axios/axios/issues/7131) (added spacing in mergeConfig.js) ([#7133](https://github.com/axios/axios/issues/7133)) ([9b9ec98](https://github.com/axios/axios/commit/9b9ec98548d93e9f2204deea10a5f1528bf3ce62)) + +### Features + +- **http:** add HTTP2 support; ([#7150](https://github.com/axios/axios/issues/7150)) ([d676df7](https://github.com/axios/axios/commit/d676df772244726533ca320f42e967f5af056bac)) + +### Contributors to this release + +- avatar [Dmitriy Mozgovoy](https://github.com/DigitalBrainJS '+794/-180 (#7186 #7150 #7039 )') +- avatar [Noritaka Kobayashi](https://github.com/noritaka1166 '+24/-509 (#7032 )') +- avatar [Aviraj2929](https://github.com/Aviraj2929 '+211/-93 (#7136 #7135 #7134 #7112 )') +- avatar [prasoon patel](https://github.com/Prasoon52 '+167/-6 (#7099 )') +- avatar [Samyak Dandge](https://github.com/Samy-in '+134/-0 (#7171 )') +- avatar [Anchal Singh](https://github.com/imanchalsingh '+53/-56 (#7170 )') +- avatar [Rahul Kumar](https://github.com/jaiyankargupta '+28/-28 (#7073 )') +- avatar [Amit Verma](https://github.com/Amitverma0509 '+24/-13 (#7129 )') +- avatar [Abhishek3880](https://github.com/abhishekmaniy '+23/-4 (#7119 #7117 #7116 #7115 )') +- avatar [Dhvani Maktuporia](https://github.com/Dhvani365 '+14/-5 (#7175 )') +- avatar [Usama Ayoub](https://github.com/sam3690 '+4/-4 (#7133 )') +- avatar [ikuy1203](https://github.com/ikuy1203 '+3/-3 (#7166 )') +- avatar [Nikhil Simon Toppo](https://github.com/Kirito-Excalibur '+1/-1 (#7172 )') +- avatar [Jane Wangari](https://github.com/Wangarijane '+1/-1 (#7155 )') +- avatar [Supakorn Ieamgomol](https://github.com/Supakornn '+1/-1 (#7065 )') +- avatar [Kian-Meng Ang](https://github.com/kianmeng '+1/-1 (#7046 )') +- avatar [UTSUMI Keiji](https://github.com/k-utsumi '+1/-1 (#7037 )') + +## [1.12.2](https://github.com/axios/axios/compare/v1.12.1...v1.12.2) (2025-09-14) + +### Bug Fixes + +- **fetch:** use current global fetch instead of cached one when env fetch is not specified to keep MSW support; ([#7030](https://github.com/axios/axios/issues/7030)) ([cf78825](https://github.com/axios/axios/commit/cf78825e1229b60d1629ad0bbc8a752ff43c3f53)) + +### Contributors to this release + +- avatar [Dmitriy Mozgovoy](https://github.com/DigitalBrainJS '+247/-16 (#7030 #7022 #7024 )') +- avatar [Noritaka Kobayashi](https://github.com/noritaka1166 '+2/-6 (#7028 #7029 )') + +## [1.12.1](https://github.com/axios/axios/compare/v1.12.0...v1.12.1) (2025-09-12) + +### Bug Fixes + +- **types:** fixed env config types; ([#7020](https://github.com/axios/axios/issues/7020)) ([b5f26b7](https://github.com/axios/axios/commit/b5f26b75bdd9afa95016fb67d0cab15fc74cbf05)) + +### Contributors to this release + +- avatar [Dmitriy Mozgovoy](https://github.com/DigitalBrainJS '+10/-4 (#7020 )') + +# [1.12.0](https://github.com/axios/axios/compare/v1.11.0...v1.12.0) (2025-09-11) + +### Bug Fixes + +- adding build artifacts ([9ec86de](https://github.com/axios/axios/commit/9ec86de257bfa33856571036279169f385ed92bd)) +- dont add dist on release ([a2edc36](https://github.com/axios/axios/commit/a2edc3606a4f775d868a67bb3461ff18ce7ecd11)) +- **fetch-adapter:** set correct Content-Type for Node FormData ([#6998](https://github.com/axios/axios/issues/6998)) ([a9f47af](https://github.com/axios/axios/commit/a9f47afbf3224d2ca987dbd8188789c7ea853c5d)) +- **node:** enforce maxContentLength for data: URLs ([#7011](https://github.com/axios/axios/issues/7011)) ([945435f](https://github.com/axios/axios/commit/945435fc51467303768202250debb8d4ae892593)) +- package exports ([#5627](https://github.com/axios/axios/issues/5627)) ([aa78ac2](https://github.com/axios/axios/commit/aa78ac23fc9036163308c0f6bd2bb885e7af3f36)) +- **params:** removing '[' and ']' from URL encode exclude characters ([#3316](https://github.com/axios/axios/issues/3316)) ([#5715](https://github.com/axios/axios/issues/5715)) ([6d84189](https://github.com/axios/axios/commit/6d84189349c43b1dcdd977b522610660cc4c7042)) +- release pr run ([fd7f404](https://github.com/axios/axios/commit/fd7f404488b2c4f238c2fbe635b58026a634bfd2)) +- **types:** change the type guard on isCancel ([#5595](https://github.com/axios/axios/issues/5595)) ([0dbb7fd](https://github.com/axios/axios/commit/0dbb7fd4f61dc568498cd13a681fa7f907d6ec7e)) + +### Features + +- **adapter:** surface low‑level network error details; attach original error via cause ([#6982](https://github.com/axios/axios/issues/6982)) ([78b290c](https://github.com/axios/axios/commit/78b290c57c978ed2ab420b90d97350231c9e5d74)) +- **fetch:** add fetch, Request, Response env config variables for the adapter; ([#7003](https://github.com/axios/axios/issues/7003)) ([c959ff2](https://github.com/axios/axios/commit/c959ff29013a3bc90cde3ac7ea2d9a3f9c08974b)) +- support reviver on JSON.parse ([#5926](https://github.com/axios/axios/issues/5926)) ([2a97634](https://github.com/axios/axios/commit/2a9763426e43d996fd60d01afe63fa6e1f5b4fca)), closes [#5924](https://github.com/axios/axios/issues/5924) +- **types:** extend AxiosResponse interface to include custom headers type ([#6782](https://github.com/axios/axios/issues/6782)) ([7960d34](https://github.com/axios/axios/commit/7960d34eded2de66ffd30b4687f8da0e46c4903e)) + +### Contributors to this release + +- avatar [Willian Agostini](https://github.com/WillianAgostini '+132/-16760 (#7002 #5926 #6782 )') +- avatar [Dmitriy Mozgovoy](https://github.com/DigitalBrainJS '+4263/-293 (#7006 #7003 )') +- avatar [khani](https://github.com/mkhani01 '+111/-15 (#6982 )') +- avatar [Ameer Assadi](https://github.com/AmeerAssadi '+123/-0 (#7011 )') +- avatar [Emiedonmokumo Dick-Boro](https://github.com/emiedonmokumo '+55/-35 (#6998 )') +- avatar [Zeroday BYTE](https://github.com/opsysdebug '+8/-8 (#6980 )') +- avatar [Jason Saayman](https://github.com/jasonsaayman '+7/-7 (#6985 #6985 )') +- avatar [최예찬](https://github.com/HealGaren '+5/-7 (#5715 )') +- avatar [Gligor Kotushevski](https://github.com/gligorkot '+3/-1 (#5627 )') +- avatar [Aleksandar Dimitrov](https://github.com/adimit '+2/-1 (#5595 )') + +# [1.11.0](https://github.com/axios/axios/compare/v1.10.0...v1.11.0) (2025-07-22) + +### Bug Fixes + +- form-data npm package ([#6970](https://github.com/axios/axios/issues/6970)) ([e72c193](https://github.com/axios/axios/commit/e72c193722530db538b19e5ddaaa4544d226b253)) +- prevent RangeError when using large Buffers ([#6961](https://github.com/axios/axios/issues/6961)) ([a2214ca](https://github.com/axios/axios/commit/a2214ca1bc60540baf2c80573cea3a0ff91ba9d1)) +- **types:** resolve type discrepancies between ESM and CJS TypeScript declaration files ([#6956](https://github.com/axios/axios/issues/6956)) ([8517aa1](https://github.com/axios/axios/commit/8517aa16f8d082fc1d5309c642220fa736159110)) + +### Contributors to this release + +- avatar [izzy goldman](https://github.com/izzygld '+186/-93 (#6970 )') +- avatar [Manish Sahani](https://github.com/manishsahanidev '+70/-0 (#6961 )') +- avatar [Noritaka Kobayashi](https://github.com/noritaka1166 '+12/-10 (#6938 #6939 )') +- avatar [James Nail](https://github.com/jrnail23 '+13/-2 (#6956 )') +- avatar [Tejaswi1305](https://github.com/Tejaswi1305 '+1/-1 (#6894 )') + +# [1.10.0](https://github.com/axios/axios/compare/v1.9.0...v1.10.0) (2025-06-14) + +### Bug Fixes + +- **adapter:** pass fetchOptions to fetch function ([#6883](https://github.com/axios/axios/issues/6883)) ([0f50af8](https://github.com/axios/axios/commit/0f50af8e076b7fb403844789bd5e812dedcaf4ed)) +- **form-data:** convert boolean values to strings in FormData serialization ([#6917](https://github.com/axios/axios/issues/6917)) ([5064b10](https://github.com/axios/axios/commit/5064b108de336ff34862650709761b8a96d26be0)) +- **package:** add module entry point for React Native; ([#6933](https://github.com/axios/axios/issues/6933)) ([3d343b8](https://github.com/axios/axios/commit/3d343b86dc4fd0eea0987059c5af04327c7ae304)) + +### Features + +- **types:** improved fetchOptions interface ([#6867](https://github.com/axios/axios/issues/6867)) ([63f1fce](https://github.com/axios/axios/commit/63f1fce233009f5db1abf2586c145825ac98c3d7)) + +### Contributors to this release + +- avatar [Dmitriy Mozgovoy](https://github.com/DigitalBrainJS '+30/-19 (#6933 #6920 #6893 #6892 )') +- avatar [Noritaka Kobayashi](https://github.com/noritaka1166 '+2/-6 (#6922 #6923 )') +- avatar [Dimitrios Lazanas](https://github.com/dimitry-lzs '+4/-0 (#6917 )') +- avatar [Adrian Knapp](https://github.com/AdrianKnapp '+2/-2 (#6867 )') +- avatar [Howie Zhao](https://github.com/howiezhao '+3/-1 (#6872 )') +- avatar [Uhyeon Park](https://github.com/warpdev '+1/-1 (#6883 )') +- avatar [Sampo Silvennoinen](https://github.com/stscoundrel '+1/-1 (#6913 )') + +# [1.9.0](https://github.com/axios/axios/compare/v1.8.4...v1.9.0) (2025-04-24) + +### Bug Fixes + +- **core:** fix the Axios constructor implementation to treat the config argument as optional; ([#6881](https://github.com/axios/axios/issues/6881)) ([6c5d4cd](https://github.com/axios/axios/commit/6c5d4cd69286868059c5e52d45085cb9a894a983)) +- **fetch:** fixed ERR_NETWORK mapping for Safari browsers; ([#6767](https://github.com/axios/axios/issues/6767)) ([dfe8411](https://github.com/axios/axios/commit/dfe8411c9a082c3d068bdd1f8d6e73054f387f45)) +- **headers:** allow iterable objects to be a data source for the set method; ([#6873](https://github.com/axios/axios/issues/6873)) ([1b1f9cc](https://github.com/axios/axios/commit/1b1f9ccdc15f1ea745160ec9a5223de9db4673bc)) +- **headers:** fix `getSetCookie` by using 'get' method for caseless access; ([#6874](https://github.com/axios/axios/issues/6874)) ([d4f7df4](https://github.com/axios/axios/commit/d4f7df4b304af8b373488fdf8e830793ff843eb9)) +- **headers:** fixed support for setting multiple header values from an iterated source; ([#6885](https://github.com/axios/axios/issues/6885)) ([f7a3b5e](https://github.com/axios/axios/commit/f7a3b5e0f7e5e127b97defa92a132fbf1b55cf15)) +- **http:** send minimal end multipart boundary ([#6661](https://github.com/axios/axios/issues/6661)) ([987d2e2](https://github.com/axios/axios/commit/987d2e2dd3b362757550f36eab875e60640b6ddc)) +- **types:** fix autocomplete for adapter config ([#6855](https://github.com/axios/axios/issues/6855)) ([e61a893](https://github.com/axios/axios/commit/e61a8934d8f94dd429a2f309b48c67307c700df0)) + +### Features + +- **AxiosHeaders:** add getSetCookie method to retrieve set-cookie headers values ([#5707](https://github.com/axios/axios/issues/5707)) ([80ea756](https://github.com/axios/axios/commit/80ea756e72bcf53110fa792f5d7ab76e8b11c996)) + +### Contributors to this release + +- avatar [Dmitriy Mozgovoy](https://github.com/DigitalBrainJS '+200/-34 (#6890 #6889 #6888 #6885 #6881 #6767 #6874 #6873 )') +- avatar [Jay](https://github.com/jasonsaayman '+26/-1 ()') +- avatar [Willian Agostini](https://github.com/WillianAgostini '+21/-0 (#5707 )') +- avatar [George Cheng](https://github.com/Gerhut '+3/-3 (#5096 )') +- avatar [FatahChan](https://github.com/FatahChan '+2/-2 (#6855 )') +- avatar [Ionuț G. Stan](https://github.com/igstan '+1/-1 (#6661 )') + +## [1.8.4](https://github.com/axios/axios/compare/v1.8.3...v1.8.4) (2025-03-19) + +### Bug Fixes + +- **buildFullPath:** handle `allowAbsoluteUrls: false` without `baseURL` ([#6833](https://github.com/axios/axios/issues/6833)) ([f10c2e0](https://github.com/axios/axios/commit/f10c2e0de7fde0051f848609a29c2906d0caa1d9)) + +### Contributors to this release + +- avatar [Marc Hassan](https://github.com/mhassan1 '+5/-1 (#6833 )') + +## [1.8.3](https://github.com/axios/axios/compare/v1.8.2...v1.8.3) (2025-03-10) + +### Bug Fixes + +- add missing type for allowAbsoluteUrls ([#6818](https://github.com/axios/axios/issues/6818)) ([10fa70e](https://github.com/axios/axios/commit/10fa70ef14fe39558b15a179f0e82f5f5e5d11b2)) +- **xhr/fetch:** pass `allowAbsoluteUrls` to `buildFullPath` in `xhr` and `fetch` adapters ([#6814](https://github.com/axios/axios/issues/6814)) ([ec159e5](https://github.com/axios/axios/commit/ec159e507bdf08c04ba1a10fe7710094e9e50ec9)) + +### Contributors to this release + +- avatar [Ashcon Partovi](https://github.com/Electroid '+6/-0 (#6811 )') +- avatar [StefanBRas](https://github.com/StefanBRas '+4/-0 (#6818 )') +- avatar [Marc Hassan](https://github.com/mhassan1 '+2/-2 (#6814 )') + +## [1.8.2](https://github.com/axios/axios/compare/v1.8.1...v1.8.2) (2025-03-07) + +### Bug Fixes + +- **http-adapter:** add allowAbsoluteUrls to path building ([#6810](https://github.com/axios/axios/issues/6810)) ([fb8eec2](https://github.com/axios/axios/commit/fb8eec214ce7744b5ca787f2c3b8339b2f54b00f)) + +### Contributors to this release + +- avatar [Fasoro-Joseph Alexander](https://github.com/lexcorp16 '+1/-1 (#6810 )') + +## [1.8.1](https://github.com/axios/axios/compare/v1.8.0...v1.8.1) (2025-02-26) + +### Bug Fixes + +- **utils:** move `generateString` to platform utils to avoid importing crypto module into client builds; ([#6789](https://github.com/axios/axios/issues/6789)) ([36a5a62](https://github.com/axios/axios/commit/36a5a620bec0b181451927f13ac85b9888b86cec)) + +### Contributors to this release + +- avatar [Dmitriy Mozgovoy](https://github.com/DigitalBrainJS '+51/-47 (#6789 )') + +# [1.8.0](https://github.com/axios/axios/compare/v1.7.9...v1.8.0) (2025-02-25) + +### Bug Fixes + +- **examples:** application crashed when navigating examples in browser ([#5938](https://github.com/axios/axios/issues/5938)) ([1260ded](https://github.com/axios/axios/commit/1260ded634ec101dd5ed05d3b70f8e8f899dba6c)) +- missing word in SUPPORT_QUESTION.yml ([#6757](https://github.com/axios/axios/issues/6757)) ([1f890b1](https://github.com/axios/axios/commit/1f890b13f2c25a016f3c84ae78efb769f244133e)) +- **utils:** replace getRandomValues with crypto module ([#6788](https://github.com/axios/axios/issues/6788)) ([23a25af](https://github.com/axios/axios/commit/23a25af0688d1db2c396deb09229d2271cc24f6c)) + +### Features + +- Add config for ignoring absolute URLs ([#5902](https://github.com/axios/axios/issues/5902)) ([#6192](https://github.com/axios/axios/issues/6192)) ([32c7bcc](https://github.com/axios/axios/commit/32c7bcc0f233285ba27dec73a4b1e81fb7a219b3)) + +### Reverts + +- Revert "chore: expose fromDataToStream to be consumable (#6731)" (#6732) ([1317261](https://github.com/axios/axios/commit/1317261125e9c419fe9f126867f64d28f9c1efda)), closes [#6731](https://github.com/axios/axios/issues/6731) [#6732](https://github.com/axios/axios/issues/6732) + +### BREAKING CHANGES + +- code relying on the above will now combine the URLs instead of prefer request URL + +- feat: add config option for allowing absolute URLs + +- fix: add default value for allowAbsoluteUrls in buildFullPath + +- fix: typo in flow control when setting allowAbsoluteUrls + +### Contributors to this release + +- avatar [Michael Toscano](https://github.com/GethosTheWalrus '+42/-8 (#6192 )') +- avatar [Willian Agostini](https://github.com/WillianAgostini '+26/-3 (#6788 #6777 )') +- avatar [Naron](https://github.com/naronchen '+27/-0 (#5901 )') +- avatar [shravan || श्रvan](https://github.com/shravan20 '+7/-3 (#6116 )') +- avatar [Justin Dhillon](https://github.com/justindhillon '+0/-7 (#6312 )') +- avatar [yionr](https://github.com/yionr '+5/-1 (#6129 )') +- avatar [Shin'ya Ueoka](https://github.com/ueokande '+3/-3 (#5935 )') +- avatar [Dan Dascalescu](https://github.com/dandv '+3/-3 (#5908 #6757 )') +- avatar [Nitin Ramnani](https://github.com/NitinRamnani '+2/-2 (#5938 )') +- avatar [Shay Molcho](https://github.com/shaymolcho '+2/-2 (#6770 )') +- avatar [Jay](https://github.com/jasonsaayman '+0/-3 (#6732 )') +- fancy45daddy +- avatar [Habip Akyol](https://github.com/habipakyol '+1/-1 (#6030 )') +- avatar [Bailey Lissington](https://github.com/llamington '+1/-1 (#6771 )') +- avatar [Bernardo da Eira Duarte](https://github.com/bernardoduarte '+1/-1 (#6480 )') +- avatar [Shivam Batham](https://github.com/Shivam-Batham '+1/-1 (#5949 )') +- avatar [Lipin Kariappa](https://github.com/lipinnnnn '+1/-1 (#5936 )') + +## [1.7.9](https://github.com/axios/axios/compare/v1.7.8...v1.7.9) (2024-12-04) + +### Reverts + +- Revert "fix(types): export CJS types from ESM (#6218)" (#6729) ([c44d2f2](https://github.com/axios/axios/commit/c44d2f2316ad289b38997657248ba10de11deb6c)), closes [#6218](https://github.com/axios/axios/issues/6218) [#6729](https://github.com/axios/axios/issues/6729) + +### Contributors to this release + +- avatar [Jay](https://github.com/jasonsaayman '+596/-108 (#6729 )') + +## [1.7.8](https://github.com/axios/axios/compare/v1.7.7...v1.7.8) (2024-11-25) + +### Bug Fixes + +- allow passing a callback as paramsSerializer to buildURL ([#6680](https://github.com/axios/axios/issues/6680)) ([eac4619](https://github.com/axios/axios/commit/eac4619fe2e0926e876cd260ee21e3690381dbb5)) +- **core:** fixed config merging bug ([#6668](https://github.com/axios/axios/issues/6668)) ([5d99fe4](https://github.com/axios/axios/commit/5d99fe4491202a6268c71e5dcc09192359d73cea)) +- fixed width form to not shrink after 'Send Request' button is clicked ([#6644](https://github.com/axios/axios/issues/6644)) ([7ccd5fd](https://github.com/axios/axios/commit/7ccd5fd42402102d38712c32707bf055be72ab54)) +- **http:** add support for File objects as payload in http adapter ([#6588](https://github.com/axios/axios/issues/6588)) ([#6605](https://github.com/axios/axios/issues/6605)) ([6841d8d](https://github.com/axios/axios/commit/6841d8d18ddc71cc1bd202ffcfddb3f95622eef3)) +- **http:** fixed proxy-from-env module import ([#5222](https://github.com/axios/axios/issues/5222)) ([12b3295](https://github.com/axios/axios/commit/12b32957f1258aee94ef859809ed39f8f88f9dfa)) +- **http:** use `globalThis.TextEncoder` when available ([#6634](https://github.com/axios/axios/issues/6634)) ([df956d1](https://github.com/axios/axios/commit/df956d18febc9100a563298dfdf0f102c3d15410)) +- ios11 breaks when build ([#6608](https://github.com/axios/axios/issues/6608)) ([7638952](https://github.com/axios/axios/commit/763895270f7b50c7c780c3c9807ae8635de952cd)) +- **types:** add missing types for mergeConfig function ([#6590](https://github.com/axios/axios/issues/6590)) ([00de614](https://github.com/axios/axios/commit/00de614cd07b7149af335e202aef0e076c254f49)) +- **types:** export CJS types from ESM ([#6218](https://github.com/axios/axios/issues/6218)) ([c71811b](https://github.com/axios/axios/commit/c71811b00f2fcff558e4382ba913bdac4ad7200e)) +- updated stream aborted error message to be more clear ([#6615](https://github.com/axios/axios/issues/6615)) ([cc3217a](https://github.com/axios/axios/commit/cc3217a612024d83a663722a56d7a98d8759c6d5)) +- use URL API instead of DOM to fix a potential vulnerability warning; ([#6714](https://github.com/axios/axios/issues/6714)) ([0a8d6e1](https://github.com/axios/axios/commit/0a8d6e19da5b9899a2abafaaa06a75ee548597db)) + +### Contributors to this release + +- avatar [Remco Haszing](https://github.com/remcohaszing '+108/-596 (#6218 )') +- avatar [Jay](https://github.com/jasonsaayman '+281/-19 (#6640 #6619 )') +- avatar [Aayush Yadav](https://github.com/aayushyadav020 '+124/-111 (#6617 )') +- avatar [Dmitriy Mozgovoy](https://github.com/DigitalBrainJS '+12/-65 (#6714 )') +- avatar [Ell Bradshaw](https://github.com/cincodenada '+29/-0 (#6489 )') +- avatar [Amit Saini](https://github.com/amitsainii '+13/-3 (#5237 )') +- avatar [Tommaso Paulon](https://github.com/guuido '+14/-1 (#6680 )') +- avatar [Akki](https://github.com/Aakash-Rana '+5/-5 (#6668 )') +- avatar [Sampo Silvennoinen](https://github.com/stscoundrel '+3/-3 (#6633 )') +- avatar [Kasper Isager Dalsgarð](https://github.com/kasperisager '+2/-2 (#6634 )') +- avatar [Christian Clauss](https://github.com/cclauss '+4/-0 (#6683 )') +- avatar [Pavan Welihinda](https://github.com/pavan168 '+2/-2 (#5222 )') +- avatar [Taylor Flatt](https://github.com/taylorflatt '+2/-2 (#6615 )') +- avatar [Kenzo Wada](https://github.com/Kenzo-Wada '+2/-2 (#6608 )') +- avatar [Ngole Lawson](https://github.com/echelonnought '+3/-0 (#6644 )') +- avatar [Haven](https://github.com/Baoyx007 '+3/-0 (#6590 )') +- avatar [Shrivali Dutt](https://github.com/shrivalidutt '+1/-1 (#6637 )') +- avatar [Henco Appel](https://github.com/hencoappel '+1/-1 (#6605 )') + +## [1.7.7](https://github.com/axios/axios/compare/v1.7.6...v1.7.7) (2024-08-31) + +### Bug Fixes + +- **fetch:** fix stream handling in Safari by fallback to using a stream reader instead of an async iterator; ([#6584](https://github.com/axios/axios/issues/6584)) ([d198085](https://github.com/axios/axios/commit/d1980854fee1765cd02fa0787adf5d6e34dd9dcf)) +- **http:** fixed support for IPv6 literal strings in url ([#5731](https://github.com/axios/axios/issues/5731)) ([364993f](https://github.com/axios/axios/commit/364993f0d8bc6e0e06f76b8a35d2d0a35cab054c)) + +### Contributors to this release + +- avatar [Rishi556](https://github.com/Rishi556 '+39/-1 (#5731 )') +- avatar [Dmitriy Mozgovoy](https://github.com/DigitalBrainJS '+27/-7 (#6584 )') + +## [1.7.6](https://github.com/axios/axios/compare/v1.7.5...v1.7.6) (2024-08-30) + +### Bug Fixes + +- **fetch:** fix content length calculation for FormData payload; ([#6524](https://github.com/axios/axios/issues/6524)) ([085f568](https://github.com/axios/axios/commit/085f56861a83e9ac02c140ad9d68dac540dfeeaa)) +- **fetch:** optimize signals composing logic; ([#6582](https://github.com/axios/axios/issues/6582)) ([df9889b](https://github.com/axios/axios/commit/df9889b83c2cc37e9e6189675a73ab70c60f031f)) + +### Contributors to this release + +- avatar [Dmitriy Mozgovoy](https://github.com/DigitalBrainJS '+98/-46 (#6582 )') +- avatar [Jacques Germishuys](https://github.com/jacquesg '+5/-1 (#6524 )') +- avatar [kuroino721](https://github.com/kuroino721 '+3/-1 (#6575 )') + +## [1.7.5](https://github.com/axios/axios/compare/v1.7.4...v1.7.5) (2024-08-23) + +### Bug Fixes + +- **adapter:** fix undefined reference to hasBrowserEnv ([#6572](https://github.com/axios/axios/issues/6572)) ([7004707](https://github.com/axios/axios/commit/7004707c4180b416341863bd86913fe4fc2f1df1)) +- **core:** add the missed implementation of AxiosError#status property; ([#6573](https://github.com/axios/axios/issues/6573)) ([6700a8a](https://github.com/axios/axios/commit/6700a8adac06942205f6a7a21421ecb36c4e0852)) +- **core:** fix `ReferenceError: navigator is not defined` for custom environments; ([#6567](https://github.com/axios/axios/issues/6567)) ([fed1a4b](https://github.com/axios/axios/commit/fed1a4b2d78ed4a588c84e09d32749ed01dc2794)) +- **fetch:** fix credentials handling in Cloudflare workers ([#6533](https://github.com/axios/axios/issues/6533)) ([550d885](https://github.com/axios/axios/commit/550d885eb90fd156add7b93bbdc54d30d2f9a98d)) + +### Contributors to this release + +- avatar [Dmitriy Mozgovoy](https://github.com/DigitalBrainJS '+187/-83 (#6573 #6567 #6566 #6564 #6563 #6557 #6556 #6555 #6554 #6552 )') +- avatar [Antonin Bas](https://github.com/antoninbas '+6/-6 (#6572 )') +- avatar [Hans Otto Wirtz](https://github.com/hansottowirtz '+4/-1 (#6533 )') + +## [1.7.4](https://github.com/axios/axios/compare/v1.7.3...v1.7.4) (2024-08-13) + +### Bug Fixes + +- **sec:** CVE-2024-39338 ([#6539](https://github.com/axios/axios/issues/6539)) ([#6543](https://github.com/axios/axios/issues/6543)) ([6b6b605](https://github.com/axios/axios/commit/6b6b605eaf73852fb2dae033f1e786155959de3a)) +- **sec:** disregard protocol-relative URL to remediate SSRF ([#6539](https://github.com/axios/axios/issues/6539)) ([07a661a](https://github.com/axios/axios/commit/07a661a2a6b9092c4aa640dcc7f724ec5e65bdda)) + +### Contributors to this release + +- avatar [Lev Pachmanov](https://github.com/levpachmanov '+47/-11 (#6543 )') +- avatar [Đỗ Trọng Hải](https://github.com/hainenber '+49/-4 (#6539 )') + +## [1.7.3](https://github.com/axios/axios/compare/v1.7.2...v1.7.3) (2024-08-01) + +### Bug Fixes + +- **adapter:** fix progress event emitting; ([#6518](https://github.com/axios/axios/issues/6518)) ([e3c76fc](https://github.com/axios/axios/commit/e3c76fc9bdd03aa4d98afaf211df943e2031453f)) +- **fetch:** fix withCredentials request config ([#6505](https://github.com/axios/axios/issues/6505)) ([85d4d0e](https://github.com/axios/axios/commit/85d4d0ea0aae91082f04e303dec46510d1b4e787)) +- **xhr:** return original config on errors from XHR adapter ([#6515](https://github.com/axios/axios/issues/6515)) ([8966ee7](https://github.com/axios/axios/commit/8966ee7ea62ecbd6cfb39a905939bcdab5cf6388)) + +### Contributors to this release + +- avatar [Dmitriy Mozgovoy](https://github.com/DigitalBrainJS '+211/-159 (#6518 #6519 )') +- avatar [Valerii Sidorenko](https://github.com/ValeraS '+3/-3 (#6515 )') +- avatar [prianYu](https://github.com/prianyu '+2/-2 (#6505 )') + +## [1.7.2](https://github.com/axios/axios/compare/v1.7.1...v1.7.2) (2024-05-21) + +### Bug Fixes + +- **fetch:** enhance fetch API detection; ([#6413](https://github.com/axios/axios/issues/6413)) ([4f79aef](https://github.com/axios/axios/commit/4f79aef81b7c4644328365bfc33acf0a9ef595bc)) + +### Contributors to this release + +- avatar [Dmitriy Mozgovoy](https://github.com/DigitalBrainJS '+3/-3 (#6413 )') + +## [1.7.1](https://github.com/axios/axios/compare/v1.7.0...v1.7.1) (2024-05-20) + +### Bug Fixes + +- **fetch:** fixed ReferenceError issue when TextEncoder is not available in the environment; ([#6410](https://github.com/axios/axios/issues/6410)) ([733f15f](https://github.com/axios/axios/commit/733f15fe5bd2d67e1fadaee82e7913b70d45dc5e)) + +### Contributors to this release + +- avatar [Dmitriy Mozgovoy](https://github.com/DigitalBrainJS '+14/-9 (#6410 )') + +# [1.7.0](https://github.com/axios/axios/compare/v1.7.0-beta.2...v1.7.0) (2024-05-19) + +### Features + +- **adapter:** add fetch adapter; ([#6371](https://github.com/axios/axios/issues/6371)) ([a3ff99b](https://github.com/axios/axios/commit/a3ff99b59d8ec2ab5dd049e68c043617a4072e42)) + +### Bug Fixes + +- **core/axios:** handle un-writable error stack ([#6362](https://github.com/axios/axios/issues/6362)) ([81e0455](https://github.com/axios/axios/commit/81e0455b7b57fbaf2be16a73ebe0e6591cc6d8f9)) + +### Contributors to this release + +- avatar [Dmitriy Mozgovoy](https://github.com/DigitalBrainJS '+1015/-127 (#6371 )') +- avatar [Jay](https://github.com/jasonsaayman '+30/-14 ()') +- avatar [Alexandre ABRIOUX](https://github.com/alexandre-abrioux '+56/-6 (#6362 )') + +# [1.7.0-beta.2](https://github.com/axios/axios/compare/v1.7.0-beta.1...v1.7.0-beta.2) (2024-05-19) + +### Bug Fixes + +- **fetch:** capitalize HTTP method names; ([#6395](https://github.com/axios/axios/issues/6395)) ([ad3174a](https://github.com/axios/axios/commit/ad3174a3515c3c2573f4bcb94818d582826f3914)) +- **fetch:** fix & optimize progress capturing for cases when the request data has a nullish value or zero data length ([#6400](https://github.com/axios/axios/issues/6400)) ([95a3e8e](https://github.com/axios/axios/commit/95a3e8e346cfd6a5548e171f2341df3235d0e26b)) +- **fetch:** fix headers getting from a stream response; ([#6401](https://github.com/axios/axios/issues/6401)) ([870e0a7](https://github.com/axios/axios/commit/870e0a76f60d0094774a6a63fa606eec52a381af)) + +### Contributors to this release + +- avatar [Dmitriy Mozgovoy](https://github.com/DigitalBrainJS '+99/-46 (#6405 #6404 #6401 #6400 #6395 )') + +# [1.7.0-beta.1](https://github.com/axios/axios/compare/v1.7.0-beta.0...v1.7.0-beta.1) (2024-05-07) + +### Bug Fixes + +- **core/axios:** handle un-writable error stack ([#6362](https://github.com/axios/axios/issues/6362)) ([81e0455](https://github.com/axios/axios/commit/81e0455b7b57fbaf2be16a73ebe0e6591cc6d8f9)) +- **fetch:** fix cases when ReadableStream or Response.body are not available; ([#6377](https://github.com/axios/axios/issues/6377)) ([d1d359d](https://github.com/axios/axios/commit/d1d359da347704e8b28d768e61515a3e96c5b072)) +- **fetch:** treat fetch-related TypeError as an AxiosError.ERR_NETWORK error; ([#6380](https://github.com/axios/axios/issues/6380)) ([bb5f9a5](https://github.com/axios/axios/commit/bb5f9a5ab768452de9e166dc28d0ffc234245ef1)) + +### Contributors to this release + +- avatar [Alexandre ABRIOUX](https://github.com/alexandre-abrioux '+56/-6 (#6362 )') +- avatar [Dmitriy Mozgovoy](https://github.com/DigitalBrainJS '+42/-17 (#6380 #6377 )') + +# [1.7.0-beta.0](https://github.com/axios/axios/compare/v1.6.8...v1.7.0-beta.0) (2024-04-28) + +### Features + +- **adapter:** add fetch adapter; ([#6371](https://github.com/axios/axios/issues/6371)) ([a3ff99b](https://github.com/axios/axios/commit/a3ff99b59d8ec2ab5dd049e68c043617a4072e42)) + +### Contributors to this release + +- avatar [Dmitriy Mozgovoy](https://github.com/DigitalBrainJS '+1015/-127 (#6371 )') +- avatar [Jay](https://github.com/jasonsaayman '+30/-14 ()') + +## [1.6.8](https://github.com/axios/axios/compare/v1.6.7...v1.6.8) (2024-03-15) + +### Bug Fixes + +- **AxiosHeaders:** fix AxiosHeaders conversion to an object during config merging ([#6243](https://github.com/axios/axios/issues/6243)) ([2656612](https://github.com/axios/axios/commit/2656612bc10fe2757e9832b708ed773ab340b5cb)) +- **import:** use named export for EventEmitter; ([7320430](https://github.com/axios/axios/commit/7320430aef2e1ba2b89488a0eaf42681165498b1)) +- **vulnerability:** update follow-redirects to 1.15.6 ([#6300](https://github.com/axios/axios/issues/6300)) ([8786e0f](https://github.com/axios/axios/commit/8786e0ff55a8c68d4ca989801ad26df924042e27)) + +### Contributors to this release + +- avatar [Jay](https://github.com/jasonsaayman '+4572/-3446 (#6238 )') +- avatar [Dmitriy Mozgovoy](https://github.com/DigitalBrainJS '+30/-0 (#6231 )') +- avatar [Mitchell](https://github.com/Creaous '+9/-9 (#6300 )') +- avatar [Emmanuel](https://github.com/mannoeu '+2/-2 (#6196 )') +- avatar [Lucas Keller](https://github.com/ljkeller '+3/-0 (#6194 )') +- avatar [Aditya Mogili](https://github.com/ADITYA-176 '+1/-1 ()') +- avatar [Miroslav Petrov](https://github.com/petrovmiroslav '+1/-1 (#6243 )') + +## [1.6.7](https://github.com/axios/axios/compare/v1.6.6...v1.6.7) (2024-01-25) + +### Bug Fixes + +- capture async stack only for rejections with native error objects; ([#6203](https://github.com/axios/axios/issues/6203)) ([1a08f90](https://github.com/axios/axios/commit/1a08f90f402336e4d00e9ee82f211c6adb1640b0)) + +### Contributors to this release + +- avatar [Dmitriy Mozgovoy](https://github.com/DigitalBrainJS '+30/-26 (#6203 )') +- avatar [zhoulixiang](https://github.com/zh-lx '+0/-3 (#6186 )') + +## [1.6.6](https://github.com/axios/axios/compare/v1.6.5...v1.6.6) (2024-01-24) + +### Bug Fixes + +- fixed missed dispatchBeforeRedirect argument ([#5778](https://github.com/axios/axios/issues/5778)) ([a1938ff](https://github.com/axios/axios/commit/a1938ff073fcb0f89011f001dfbc1fa1dc995e39)) +- wrap errors to improve async stack trace ([#5987](https://github.com/axios/axios/issues/5987)) ([123f354](https://github.com/axios/axios/commit/123f354b920f154a209ea99f76b7b2ef3d9ebbab)) + +### Contributors to this release + +- avatar [Ilya Priven](https://github.com/ikonst '+91/-8 (#5987 )') +- avatar [Zao Soula](https://github.com/zaosoula '+6/-6 (#5778 )') + +## [1.6.5](https://github.com/axios/axios/compare/v1.6.4...v1.6.5) (2024-01-05) + +### Bug Fixes + +- **ci:** refactor notify action as a job of publish action; ([#6176](https://github.com/axios/axios/issues/6176)) ([0736f95](https://github.com/axios/axios/commit/0736f95ce8776366dc9ca569f49ba505feb6373c)) +- **dns:** fixed lookup error handling; ([#6175](https://github.com/axios/axios/issues/6175)) ([f4f2b03](https://github.com/axios/axios/commit/f4f2b039dd38eb4829e8583caede4ed6d2dd59be)) + +### Contributors to this release + +- avatar [Dmitriy Mozgovoy](https://github.com/DigitalBrainJS '+41/-6 (#6176 #6175 )') +- avatar [Jay](https://github.com/jasonsaayman '+6/-1 ()') + +## [1.6.4](https://github.com/axios/axios/compare/v1.6.3...v1.6.4) (2024-01-03) + +### Bug Fixes + +- **security:** fixed formToJSON prototype pollution vulnerability; ([#6167](https://github.com/axios/axios/issues/6167)) ([3c0c11c](https://github.com/axios/axios/commit/3c0c11cade045c4412c242b5727308cff9897a0e)) +- **security:** fixed security vulnerability in follow-redirects ([#6163](https://github.com/axios/axios/issues/6163)) ([75af1cd](https://github.com/axios/axios/commit/75af1cdff5b3a6ca3766d3d3afbc3115bb0811b8)) + +### Contributors to this release + +- avatar [Jay](https://github.com/jasonsaayman '+34/-6 ()') +- avatar [Dmitriy Mozgovoy](https://github.com/DigitalBrainJS '+34/-3 (#6172 #6167 )') +- avatar [Guy Nesher](https://github.com/gnesher '+10/-10 (#6163 )') + +## [1.6.3](https://github.com/axios/axios/compare/v1.6.2...v1.6.3) (2023-12-26) + +### Bug Fixes + +- Regular Expression Denial of Service (ReDoS) ([#6132](https://github.com/axios/axios/issues/6132)) ([5e7ad38](https://github.com/axios/axios/commit/5e7ad38fb0f819fceb19fb2ee5d5d38f56aa837d)) + +### Contributors to this release + +- avatar [Jay](https://github.com/jasonsaayman '+15/-6 (#6145 )') +- avatar [Willian Agostini](https://github.com/WillianAgostini '+17/-2 (#6132 )') +- avatar [Dmitriy Mozgovoy](https://github.com/DigitalBrainJS '+3/-0 (#6084 )') + +## [1.6.2](https://github.com/axios/axios/compare/v1.6.1...v1.6.2) (2023-11-14) + +### Features + +- **withXSRFToken:** added withXSRFToken option as a workaround to achieve the old `withCredentials` behavior; ([#6046](https://github.com/axios/axios/issues/6046)) ([cff9967](https://github.com/axios/axios/commit/cff996779b272a5e94c2b52f5503ccf668bc42dc)) + +### PRs + +- feat(withXSRFToken): added withXSRFToken option as a workaround to achieve the old `withCredentials` behavior; ( [#6046](https://api.github.com/repos/axios/axios/pulls/6046) ) + +``` + +📢 This PR added 'withXSRFToken' option as a replacement for old withCredentials behaviour. +You should now use withXSRFToken along with withCredential to get the old behavior. +This functionality is considered as a fix. +``` + +### Contributors to this release + +- avatar [Dmitriy Mozgovoy](https://github.com/DigitalBrainJS '+271/-146 (#6081 #6080 #6079 #6078 #6046 #6064 #6063 )') +- avatar [Ng Choon Khon (CK)](https://github.com/ckng0221 '+4/-4 (#6073 )') +- avatar [Muhammad Noman](https://github.com/mnomanmemon '+2/-2 (#6048 )') + +## [1.6.1](https://github.com/axios/axios/compare/v1.6.0...v1.6.1) (2023-11-08) + +### Bug Fixes + +- **formdata:** fixed content-type header normalization for non-standard browser environments; ([#6056](https://github.com/axios/axios/issues/6056)) ([dd465ab](https://github.com/axios/axios/commit/dd465ab22bbfa262c6567be6574bf46a057d5288)) +- **platform:** fixed emulated browser detection in node.js environment; ([#6055](https://github.com/axios/axios/issues/6055)) ([3dc8369](https://github.com/axios/axios/commit/3dc8369e505e32a4e12c22f154c55fd63ac67fbb)) + +### Contributors to this release + +- avatar [Dmitriy Mozgovoy](https://github.com/DigitalBrainJS '+432/-65 (#6059 #6056 #6055 )') +- avatar [Fabian Meyer](https://github.com/meyfa '+5/-2 (#5835 )') + +### PRs + +- feat(withXSRFToken): added withXSRFToken option as a workaround to achieve the old `withCredentials` behavior; ( [#6046](https://api.github.com/repos/axios/axios/pulls/6046) ) + +``` + +📢 This PR added 'withXSRFToken' option as a replacement for old withCredentials behaviour. +You should now use withXSRFToken along with withCredential to get the old behavior. +This functionality is considered as a fix. +``` + +# [1.6.0](https://github.com/axios/axios/compare/v1.5.1...v1.6.0) (2023-10-26) + +### Bug Fixes + +- **CSRF:** fixed CSRF vulnerability CVE-2023-45857 ([#6028](https://github.com/axios/axios/issues/6028)) ([96ee232](https://github.com/axios/axios/commit/96ee232bd3ee4de2e657333d4d2191cd389e14d0)) +- **dns:** fixed lookup function decorator to work properly in node v20; ([#6011](https://github.com/axios/axios/issues/6011)) ([5aaff53](https://github.com/axios/axios/commit/5aaff532a6b820bb9ab6a8cd0f77131b47e2adb8)) +- **types:** fix AxiosHeaders types; ([#5931](https://github.com/axios/axios/issues/5931)) ([a1c8ad0](https://github.com/axios/axios/commit/a1c8ad008b3c13d53e135bbd0862587fb9d3fc09)) + +### PRs + +- CVE 2023 45857 ( [#6028](https://api.github.com/repos/axios/axios/pulls/6028) ) + +``` + +⚠️ Critical vulnerability fix. See https://security.snyk.io/vuln/SNYK-JS-AXIOS-6032459 +``` + +### Contributors to this release + +- avatar [Dmitriy Mozgovoy](https://github.com/DigitalBrainJS '+449/-114 (#6032 #6021 #6011 #5932 #5931 )') +- avatar [Valentin Panov](https://github.com/valentin-panov '+4/-4 (#6028 )') +- avatar [Rinku Chaudhari](https://github.com/therealrinku '+1/-1 (#5889 )') + +## [1.5.1](https://github.com/axios/axios/compare/v1.5.0...v1.5.1) (2023-09-26) + +### Bug Fixes + +- **adapters:** improved adapters loading logic to have clear error messages; ([#5919](https://github.com/axios/axios/issues/5919)) ([e410779](https://github.com/axios/axios/commit/e4107797a7a1376f6209fbecfbbce73d3faa7859)) +- **formdata:** fixed automatic addition of the `Content-Type` header for FormData in non-browser environments; ([#5917](https://github.com/axios/axios/issues/5917)) ([bc9af51](https://github.com/axios/axios/commit/bc9af51b1886d1b3529617702f2a21a6c0ed5d92)) +- **headers:** allow `content-encoding` header to handle case-insensitive values ([#5890](https://github.com/axios/axios/issues/5890)) ([#5892](https://github.com/axios/axios/issues/5892)) ([4c89f25](https://github.com/axios/axios/commit/4c89f25196525e90a6e75eda9cb31ae0a2e18acd)) +- **types:** removed duplicated code ([9e62056](https://github.com/axios/axios/commit/9e6205630e1c9cf863adf141c0edb9e6d8d4b149)) + +### Contributors to this release + +- avatar [Dmitriy Mozgovoy](https://github.com/DigitalBrainJS '+89/-18 (#5919 #5917 )') +- avatar [David Dallas](https://github.com/DavidJDallas '+11/-5 ()') +- avatar [Sean Sattler](https://github.com/fb-sean '+2/-8 ()') +- avatar [Mustafa Ateş Uzun](https://github.com/0o001 '+4/-4 ()') +- avatar [Przemyslaw Motacki](https://github.com/sfc-gh-pmotacki '+2/-1 (#5892 )') +- avatar [Michael Di Prisco](https://github.com/Cadienvan '+1/-1 ()') + +### PRs + +- CVE 2023 45857 ( [#6028](https://api.github.com/repos/axios/axios/pulls/6028) ) + +``` + +⚠️ Critical vulnerability fix. See https://security.snyk.io/vuln/SNYK-JS-AXIOS-6032459 +``` + +# [1.5.0](https://github.com/axios/axios/compare/v1.4.0...v1.5.0) (2023-08-26) + +### Bug Fixes + +- **adapter:** make adapter loading error more clear by using platform-specific adapters explicitly ([#5837](https://github.com/axios/axios/issues/5837)) ([9a414bb](https://github.com/axios/axios/commit/9a414bb6c81796a95c6c7fe668637825458e8b6d)) +- **dns:** fixed `cacheable-lookup` integration; ([#5836](https://github.com/axios/axios/issues/5836)) ([b3e327d](https://github.com/axios/axios/commit/b3e327dcc9277bdce34c7ef57beedf644b00d628)) +- **headers:** added support for setting header names that overlap with class methods; ([#5831](https://github.com/axios/axios/issues/5831)) ([d8b4ca0](https://github.com/axios/axios/commit/d8b4ca0ea5f2f05efa4edfe1e7684593f9f68273)) +- **headers:** fixed common Content-Type header merging; ([#5832](https://github.com/axios/axios/issues/5832)) ([8fda276](https://github.com/axios/axios/commit/8fda2766b1e6bcb72c3fabc146223083ef13ce17)) + +### Features + +- export getAdapter function ([#5324](https://github.com/axios/axios/issues/5324)) ([ca73eb8](https://github.com/axios/axios/commit/ca73eb878df0ae2dace81fe3a7f1fb5986231bf1)) +- **export:** export adapters without `unsafe` prefix ([#5839](https://github.com/axios/axios/issues/5839)) ([1601f4a](https://github.com/axios/axios/commit/1601f4a27a81ab47fea228f1e244b2c4e3ce28bf)) + +### Contributors to this release + +- avatar [Dmitriy Mozgovoy](https://github.com/DigitalBrainJS '+66/-29 (#5839 #5837 #5836 #5832 #5831 )') +- avatar [夜葬](https://github.com/geekact '+42/-0 (#5324 )') +- avatar [Jonathan Budiman](https://github.com/JBudiman00 '+30/-0 (#5788 )') +- avatar [Michael Di Prisco](https://github.com/Cadienvan '+3/-5 (#5791 )') + +### PRs + +- CVE 2023 45857 ( [#6028](https://api.github.com/repos/axios/axios/pulls/6028) ) + +``` + +⚠️ Critical vulnerability fix. See https://security.snyk.io/vuln/SNYK-JS-AXIOS-6032459 +``` + +# [1.4.0](https://github.com/axios/axios/compare/v1.3.6...v1.4.0) (2023-04-27) + +### Bug Fixes + +- **formdata:** add `multipart/form-data` content type for FormData payload on custom client environments; ([#5678](https://github.com/axios/axios/issues/5678)) ([bbb61e7](https://github.com/axios/axios/commit/bbb61e70cb1185adfb1cbbb86eaf6652c48d89d1)) +- **package:** export package internals with unsafe path prefix; ([#5677](https://github.com/axios/axios/issues/5677)) ([df38c94](https://github.com/axios/axios/commit/df38c949f26414d88ba29ec1e353c4d4f97eaf09)) + +### Features + +- **dns:** added support for a custom lookup function; ([#5339](https://github.com/axios/axios/issues/5339)) ([2701911](https://github.com/axios/axios/commit/2701911260a1faa5cc5e1afe437121b330a3b7bb)) +- **types:** export `AxiosHeaderValue` type. ([#5525](https://github.com/axios/axios/issues/5525)) ([726f1c8](https://github.com/axios/axios/commit/726f1c8e00cffa0461a8813a9bdcb8f8b9d762cf)) + +### Performance Improvements + +- **merge-config:** optimize mergeConfig performance by avoiding duplicate key visits; ([#5679](https://github.com/axios/axios/issues/5679)) ([e6f7053](https://github.com/axios/axios/commit/e6f7053bf1a3e87cf1f9da8677e12e3fe829d68e)) + +### Contributors to this release + +- avatar [Dmitriy Mozgovoy](https://github.com/DigitalBrainJS '+151/-16 (#5684 #5339 #5679 #5678 #5677 )') +- avatar [Arthur Fiorette](https://github.com/arthurfiorette '+19/-19 (#5525 )') +- avatar [PIYUSH NEGI](https://github.com/npiyush97 '+2/-18 (#5670 )') + +### PRs + +- CVE 2023 45857 ( [#6028](https://api.github.com/repos/axios/axios/pulls/6028) ) + +``` + +⚠️ Critical vulnerability fix. See https://security.snyk.io/vuln/SNYK-JS-AXIOS-6032459 +``` + +## [1.3.6](https://github.com/axios/axios/compare/v1.3.5...v1.3.6) (2023-04-19) + +### Bug Fixes + +- **types:** added transport to RawAxiosRequestConfig ([#5445](https://github.com/axios/axios/issues/5445)) ([6f360a2](https://github.com/axios/axios/commit/6f360a2531d8d70363fd9becef6a45a323f170e2)) +- **utils:** make isFormData detection logic stricter to avoid unnecessary calling of the `toString` method on the target; ([#5661](https://github.com/axios/axios/issues/5661)) ([aa372f7](https://github.com/axios/axios/commit/aa372f7306295dfd1100c1c2c77ce95c95808e76)) + +### Contributors to this release + +- avatar [Dmitriy Mozgovoy](https://github.com/DigitalBrainJS '+48/-10 (#5665 #5661 #5663 )') +- avatar [Michael Di Prisco](https://github.com/Cadienvan '+2/-0 (#5445 )') + +### PRs + +- CVE 2023 45857 ( [#6028](https://api.github.com/repos/axios/axios/pulls/6028) ) + +``` + +⚠️ Critical vulnerability fix. See https://security.snyk.io/vuln/SNYK-JS-AXIOS-6032459 +``` + +## [1.3.5](https://github.com/axios/axios/compare/v1.3.4...v1.3.5) (2023-04-05) + +### Bug Fixes + +- **headers:** fixed isValidHeaderName to support full list of allowed characters; ([#5584](https://github.com/axios/axios/issues/5584)) ([e7decef](https://github.com/axios/axios/commit/e7decef6a99f4627e27ed9ea5b00ce8e201c3841)) +- **params:** re-added the ability to set the function as `paramsSerializer` config; ([#5633](https://github.com/axios/axios/issues/5633)) ([a56c866](https://github.com/axios/axios/commit/a56c8661209d5ce5a645a05f294a0e08a6c1f6b3)) + +### Contributors to this release + +- avatar [Dmitriy Mozgovoy](https://github.com/DigitalBrainJS '+28/-10 (#5633 #5584 )') + +### PRs + +- CVE 2023 45857 ( [#6028](https://api.github.com/repos/axios/axios/pulls/6028) ) + +``` + +⚠️ Critical vulnerability fix. See https://security.snyk.io/vuln/SNYK-JS-AXIOS-6032459 +``` + +## [1.3.4](https://github.com/axios/axios/compare/v1.3.3...v1.3.4) (2023-02-22) + +### Bug Fixes + +- **blob:** added a check to make sure the Blob class is available in the browser's global scope; ([#5548](https://github.com/axios/axios/issues/5548)) ([3772c8f](https://github.com/axios/axios/commit/3772c8fe74112a56e3e9551f894d899bc3a9443a)) +- **http:** fixed regression bug when handling synchronous errors inside the adapter; ([#5564](https://github.com/axios/axios/issues/5564)) ([a3b246c](https://github.com/axios/axios/commit/a3b246c9de5c3bc4b5a742e15add55b375479451)) + +### Contributors to this release + +- avatar [Dmitriy Mozgovoy](https://github.com/DigitalBrainJS '+38/-26 (#5564 )') +- avatar [lcysgsg](https://github.com/lcysgsg '+4/-0 (#5548 )') +- avatar [Michael Di Prisco](https://github.com/Cadienvan '+3/-0 (#5444 )') + +### PRs + +- CVE 2023 45857 ( [#6028](https://api.github.com/repos/axios/axios/pulls/6028) ) + +``` + +⚠️ Critical vulnerability fix. See https://security.snyk.io/vuln/SNYK-JS-AXIOS-6032459 +``` + +## [1.3.3](https://github.com/axios/axios/compare/v1.3.2...v1.3.3) (2023-02-13) + +### Bug Fixes + +- **formdata:** added a check to make sure the FormData class is available in the browser's global scope; ([#5545](https://github.com/axios/axios/issues/5545)) ([a6dfa72](https://github.com/axios/axios/commit/a6dfa72010db5ad52db8bd13c0f98e537e8fd05d)) +- **formdata:** fixed setting NaN as Content-Length for form payload in some cases; ([#5535](https://github.com/axios/axios/issues/5535)) ([c19f7bf](https://github.com/axios/axios/commit/c19f7bf770f90ae8307f4ea3104f227056912da1)) +- **headers:** fixed the filtering logic of the clear method; ([#5542](https://github.com/axios/axios/issues/5542)) ([ea87ebf](https://github.com/axios/axios/commit/ea87ebfe6d1699af072b9e7cd40faf8f14b0ab93)) + +### Contributors to this release + +- avatar [Dmitriy Mozgovoy](https://github.com/DigitalBrainJS '+11/-7 (#5545 #5535 #5542 )') +- avatar [陈若枫](https://github.com/ruofee '+2/-2 (#5467 )') + +### PRs + +- CVE 2023 45857 ( [#6028](https://api.github.com/repos/axios/axios/pulls/6028) ) + +``` + +⚠️ Critical vulnerability fix. See https://security.snyk.io/vuln/SNYK-JS-AXIOS-6032459 +``` + +## [1.3.2](https://github.com/axios/axios/compare/v1.3.1...v1.3.2) (2023-02-03) + +### Bug Fixes + +- **http:** treat http://localhost as base URL for relative paths to avoid `ERR_INVALID_URL` error; ([#5528](https://github.com/axios/axios/issues/5528)) ([128d56f](https://github.com/axios/axios/commit/128d56f4a0fb8f5f2ed6e0dd80bc9225fee9538c)) +- **http:** use explicit import instead of TextEncoder global; ([#5530](https://github.com/axios/axios/issues/5530)) ([6b3c305](https://github.com/axios/axios/commit/6b3c305fc40c56428e0afabedc6f4d29c2830f6f)) + +### Contributors to this release + +- avatar [Dmitriy Mozgovoy](https://github.com/DigitalBrainJS '+2/-1 (#5530 #5528 )') + +### PRs + +- CVE 2023 45857 ( [#6028](https://api.github.com/repos/axios/axios/pulls/6028) ) + +``` + +⚠️ Critical vulnerability fix. See https://security.snyk.io/vuln/SNYK-JS-AXIOS-6032459 +``` + +## [1.3.1](https://github.com/axios/axios/compare/v1.3.0...v1.3.1) (2023-02-01) + +### Bug Fixes + +- **formdata:** add hotfix to use the asynchronous API to compute the content-length header value; ([#5521](https://github.com/axios/axios/issues/5521)) ([96d336f](https://github.com/axios/axios/commit/96d336f527619f21da012fe1f117eeb53e5a2120)) +- **serializer:** fixed serialization of array-like objects; ([#5518](https://github.com/axios/axios/issues/5518)) ([08104c0](https://github.com/axios/axios/commit/08104c028c0f9353897b1b6691d74c440fd0c32d)) + +### Contributors to this release + +- avatar [Dmitriy Mozgovoy](https://github.com/DigitalBrainJS '+27/-8 (#5521 #5518 )') + +### PRs + +- CVE 2023 45857 ( [#6028](https://api.github.com/repos/axios/axios/pulls/6028) ) + +``` + +⚠️ Critical vulnerability fix. See https://security.snyk.io/vuln/SNYK-JS-AXIOS-6032459 +``` + +# [1.3.0](https://github.com/axios/axios/compare/v1.2.6...v1.3.0) (2023-01-31) + +### Bug Fixes + +- **headers:** fixed & optimized clear method; ([#5507](https://github.com/axios/axios/issues/5507)) ([9915635](https://github.com/axios/axios/commit/9915635c69d0ab70daca5738488421f67ca60959)) +- **http:** add zlib headers if missing ([#5497](https://github.com/axios/axios/issues/5497)) ([65e8d1e](https://github.com/axios/axios/commit/65e8d1e28ce829f47a837e45129730e541950d3c)) + +### Features + +- **fomdata:** added support for spec-compliant FormData & Blob types; ([#5316](https://github.com/axios/axios/issues/5316)) ([6ac574e](https://github.com/axios/axios/commit/6ac574e00a06731288347acea1e8246091196953)) + +### Contributors to this release + +- avatar [Dmitriy Mozgovoy](https://github.com/DigitalBrainJS '+352/-67 (#5514 #5512 #5510 #5509 #5508 #5316 #5507 )') +- avatar [ItsNotGoodName](https://github.com/ItsNotGoodName '+43/-2 (#5497 )') + +### PRs + +- CVE 2023 45857 ( [#6028](https://api.github.com/repos/axios/axios/pulls/6028) ) + +``` + +⚠️ Critical vulnerability fix. See https://security.snyk.io/vuln/SNYK-JS-AXIOS-6032459 +``` + +## [1.2.6](https://github.com/axios/axios/compare/v1.2.5...v1.2.6) (2023-01-28) + +### Bug Fixes + +- **headers:** added missed Authorization accessor; ([#5502](https://github.com/axios/axios/issues/5502)) ([342c0ba](https://github.com/axios/axios/commit/342c0ba9a16ea50f5ed7d2366c5c1a2c877e3f26)) +- **types:** fixed `CommonRequestHeadersList` & `CommonResponseHeadersList` types to be private in commonJS; ([#5503](https://github.com/axios/axios/issues/5503)) ([5a3d0a3](https://github.com/axios/axios/commit/5a3d0a3234d77361a1bc7cedee2da1e11df08e2c)) + +### Contributors to this release + +- ![avatar](https://avatars.githubusercontent.com/u/12586868?v=4&s=16) [Dmitriy Mozgovoy](https://github.com/DigitalBrainJS '+24/-9 (#5503 #5502 )') + +### PRs + +- CVE 2023 45857 ( [#6028](https://api.github.com/repos/axios/axios/pulls/6028) ) + +``` + +⚠️ Critical vulnerability fix. See https://security.snyk.io/vuln/SNYK-JS-AXIOS-6032459 +``` + +## [1.2.5](https://github.com/axios/axios/compare/v1.2.4...v1.2.5) (2023-01-26) + +### Bug Fixes + +- **types:** fixed AxiosHeaders to handle spread syntax by making all methods non-enumerable; ([#5499](https://github.com/axios/axios/issues/5499)) ([580f1e8](https://github.com/axios/axios/commit/580f1e8033a61baa38149d59fd16019de3932c22)) + +### Contributors to this release + +- ![avatar](https://avatars.githubusercontent.com/u/12586868?v=4&s=16) [Dmitriy Mozgovoy](https://github.com/DigitalBrainJS '+82/-54 (#5499 )') +- ![avatar](https://avatars.githubusercontent.com/u/20516159?v=4&s=16) [Elliot Ford](https://github.com/EFord36 '+1/-1 (#5462 )') + +### PRs + +- CVE 2023 45857 ( [#6028](https://api.github.com/repos/axios/axios/pulls/6028) ) + +``` + +⚠️ Critical vulnerability fix. See https://security.snyk.io/vuln/SNYK-JS-AXIOS-6032459 +``` + +## [1.2.4](https://github.com/axios/axios/compare/v1.2.3...v1.2.4) (2023-01-22) + +### Bug Fixes + +- **types:** renamed `RawAxiosRequestConfig` back to `AxiosRequestConfig`; ([#5486](https://github.com/axios/axios/issues/5486)) ([2a71f49](https://github.com/axios/axios/commit/2a71f49bc6c68495fa419003a3107ed8bd703ad0)) +- **types:** fix `AxiosRequestConfig` generic; ([#5478](https://github.com/axios/axios/issues/5478)) ([9bce81b](https://github.com/axios/axios/commit/186ea062da8b7d578ae78b1a5c220986b9bce81b)) + +### Contributors to this release + +- ![avatar](https://avatars.githubusercontent.com/u/12586868?v=4&s=16) [Dmitriy Mozgovoy](https://github.com/DigitalBrainJS '+242/-108 (#5486 #5482 )') +- ![avatar](https://avatars.githubusercontent.com/u/9430821?v=4&s=16) [Daniel Hillmann](https://github.com/hilleer '+1/-1 (#5478 )') + +### PRs + +- CVE 2023 45857 ( [#6028](https://api.github.com/repos/axios/axios/pulls/6028) ) + +``` + +⚠️ Critical vulnerability fix. See https://security.snyk.io/vuln/SNYK-JS-AXIOS-6032459 +``` + +## [1.2.3](https://github.com/axios/axios/compare/1.2.2...1.2.3) (2023-01-10) + +### Bug Fixes + +- **types:** fixed AxiosRequestConfig header interface by refactoring it to RawAxiosRequestConfig; ([#5420](https://github.com/axios/axios/issues/5420)) ([0811963](https://github.com/axios/axios/commit/08119634a22f1d5b19f5c9ea0adccb6d3eebc3bc)) + +### Contributors to this release + +- ![avatar](https://avatars.githubusercontent.com/u/12586868?v=4&s=16) [Dmitriy Mozgovoy](https://github.com/DigitalBrainJS '+938/-442 (#5456 #5455 #5453 #5451 #5449 #5447 #5446 #5443 #5442 #5439 #5420 )') + +### PRs + +- CVE 2023 45857 ( [#6028](https://api.github.com/repos/axios/axios/pulls/6028) ) + +``` + +⚠️ Critical vulnerability fix. See https://security.snyk.io/vuln/SNYK-JS-AXIOS-6032459 +``` + +## [1.2.2] - 2022-12-29 + +### Fixed + +- fix(ci): fix release script inputs [#5392](https://github.com/axios/axios/pull/5392) +- fix(ci): prerelease scipts [#5377](https://github.com/axios/axios/pull/5377) +- fix(ci): release scripts [#5376](https://github.com/axios/axios/pull/5376) +- fix(ci): typescript tests [#5375](https://github.com/axios/axios/pull/5375) +- fix: Brotli decompression [#5353](https://github.com/axios/axios/pull/5353) +- fix: add missing HttpStatusCode [#5345](https://github.com/axios/axios/pull/5345) + +### Chores + +- chore(ci): set conventional-changelog header config [#5406](https://github.com/axios/axios/pull/5406) +- chore(ci): fix automatic contributors resolving [#5403](https://github.com/axios/axios/pull/5403) +- chore(ci): improved logging for the contributors list generator [#5398](https://github.com/axios/axios/pull/5398) +- chore(ci): fix release action [#5397](https://github.com/axios/axios/pull/5397) +- chore(ci): fix version bump script by adding bump argument for target version [#5393](https://github.com/axios/axios/pull/5393) +- chore(deps): bump decode-uri-component from 0.2.0 to 0.2.2 [#5342](https://github.com/axios/axios/pull/5342) +- chore(ci): GitHub Actions Release script [#5384](https://github.com/axios/axios/pull/5384) +- chore(ci): release scripts [#5364](https://github.com/axios/axios/pull/5364) + +### Contributors to this release + +- ![avatar](https://avatars.githubusercontent.com/u/12586868?v=4&s=16) [Dmitriy Mozgovoy](https://github.com/DigitalBrainJS) +- ![avatar](https://avatars.githubusercontent.com/u/1652293?v=4&s=16) [Winnie](https://github.com/winniehell) + +## [1.2.1] - 2022-12-05 + +### Changed + +- feat(exports): export mergeConfig [#5151](https://github.com/axios/axios/pull/5151) + +### Fixed + +- fix(CancelledError): include config [#4922](https://github.com/axios/axios/pull/4922) +- fix(general): removing multiple/trailing/leading whitespace [#5022](https://github.com/axios/axios/pull/5022) +- fix(headers): decompression for responses without Content-Length header [#5306](https://github.com/axios/axios/pull/5306) +- fix(webWorker): exception to sending form data in web worker [#5139](https://github.com/axios/axios/pull/5139) + +### Refactors + +- refactor(types): AxiosProgressEvent.event type to any [#5308](https://github.com/axios/axios/pull/5308) +- refactor(types): add missing types for static AxiosError.from method [#4956](https://github.com/axios/axios/pull/4956) + +### Chores + +- chore(docs): remove README link to non-existent upgrade guide [#5307](https://github.com/axios/axios/pull/5307) +- chore(docs): typo in issue template name [#5159](https://github.com/axios/axios/pull/5159) + +### Contributors to this release + +- [Dmitriy Mozgovoy](https://github.com/DigitalBrainJS) +- [Zachary Lysobey](https://github.com/zachlysobey) +- [Kevin Ennis](https://github.com/kevincennis) +- [Philipp Loose](https://github.com/phloose) +- [secondl1ght](https://github.com/secondl1ght) +- [wenzheng](https://github.com/0x30) +- [Ivan Barsukov](https://github.com/ovarn) +- [Arthur Fiorette](https://github.com/arthurfiorette) + +### PRs + +- CVE 2023 45857 ( [#6028](https://api.github.com/repos/axios/axios/pulls/6028) ) + +``` + +⚠️ Critical vulnerability fix. See https://security.snyk.io/vuln/SNYK-JS-AXIOS-6032459 +``` + +## [1.2.0] - 2022-11-10 + +### Changed + +- changed: refactored module exports [#5162](https://github.com/axios/axios/pull/5162) +- change: re-added support for loading Axios with require('axios').default [#5225](https://github.com/axios/axios/pull/5225) + +### Fixed + +- fix: improve AxiosHeaders class [#5224](https://github.com/axios/axios/pull/5224) +- fix: TypeScript type definitions for commonjs [#5196](https://github.com/axios/axios/pull/5196) +- fix: type definition of use method on AxiosInterceptorManager to match the README [#5071](https://github.com/axios/axios/pull/5071) +- fix: \_\_dirname is not defined in the sandbox [#5269](https://github.com/axios/axios/pull/5269) +- fix: AxiosError.toJSON method to avoid circular references [#5247](https://github.com/axios/axios/pull/5247) +- fix: Z_BUF_ERROR when content-encoding is set but the response body is empty [#5250](https://github.com/axios/axios/pull/5250) + +### Refactors + +- refactor: allowing adapters to be loaded by name [#5277](https://github.com/axios/axios/pull/5277) + +### Chores + +- chore: force CI restart [#5243](https://github.com/axios/axios/pull/5243) +- chore: update ECOSYSTEM.md [#5077](https://github.com/axios/axios/pull/5077) +- chore: update get/index.html [#5116](https://github.com/axios/axios/pull/5116) +- chore: update Sandbox UI/UX [#5205](https://github.com/axios/axios/pull/5205) +- chore:(actions): remove git credentials after checkout [#5235](https://github.com/axios/axios/pull/5235) +- chore(actions): bump actions/dependency-review-action from 2 to 3 [#5266](https://github.com/axios/axios/pull/5266) +- chore(packages): bump loader-utils from 1.4.1 to 1.4.2 [#5295](https://github.com/axios/axios/pull/5295) +- chore(packages): bump engine.io from 6.2.0 to 6.2.1 [#5294](https://github.com/axios/axios/pull/5294) +- chore(packages): bump socket.io-parser from 4.0.4 to 4.0.5 [#5241](https://github.com/axios/axios/pull/5241) +- chore(packages): bump loader-utils from 1.4.0 to 1.4.1 [#5245](https://github.com/axios/axios/pull/5245) +- chore(docs): update Resources links in README [#5119](https://github.com/axios/axios/pull/5119) +- chore(docs): update the link for JSON url [#5265](https://github.com/axios/axios/pull/5265) +- chore(docs): fix broken links [#5218](https://github.com/axios/axios/pull/5218) +- chore(docs): update and rename UPGRADE_GUIDE.md to MIGRATION_GUIDE.md [#5170](https://github.com/axios/axios/pull/5170) +- chore(docs): typo fix line #856 and #920 [#5194](https://github.com/axios/axios/pull/5194) +- chore(docs): typo fix #800 [#5193](https://github.com/axios/axios/pull/5193) +- chore(docs): fix typos [#5184](https://github.com/axios/axios/pull/5184) +- chore(docs): fix punctuation in README.md [#5197](https://github.com/axios/axios/pull/5197) +- chore(docs): update readme in the Handling Errors section - issue reference #5260 [#5261](https://github.com/axios/axios/pull/5261) +- chore: remove \b from filename [#5207](https://github.com/axios/axios/pull/5207) +- chore(docs): update CHANGELOG.md [#5137](https://github.com/axios/axios/pull/5137) +- chore: add sideEffects false to package.json [#5025](https://github.com/axios/axios/pull/5025) + +### Contributors to this release + +- [Maddy Miller](https://github.com/me4502) +- [Amit Saini](https://github.com/amitsainii) +- [ecyrbe](https://github.com/ecyrbe) +- [Ikko Ashimine](https://github.com/eltociear) +- [Geeth Gunnampalli](https://github.com/thetechie7) +- [Shreem Asati](https://github.com/shreem-123) +- [Frieder Bluemle](https://github.com/friederbluemle) +- [윤세영](https://github.com/yunseyeong) +- [Claudio Busatto](https://github.com/cjcbusatto) +- [Remco Haszing](https://github.com/remcohaszing) +- [Dmitriy Mozgovoy](https://github.com/DigitalBrainJS) +- [Csaba Maulis](https://github.com/om4csaba) +- [MoPaMo](https://github.com/MoPaMo) +- [Daniel Fjeldstad](https://github.com/w3bdesign) +- [Adrien Brunet](https://github.com/adrien-may) +- [Frazer Smith](https://github.com/Fdawgs) +- [HaiTao](https://github.com/836334258) +- [AZM](https://github.com/aziyatali) +- [relbns](https://github.com/relbns) + +### PRs + +- CVE 2023 45857 ( [#6028](https://api.github.com/repos/axios/axios/pulls/6028) ) + +``` + +⚠️ Critical vulnerability fix. See https://security.snyk.io/vuln/SNYK-JS-AXIOS-6032459 +``` + +## [1.1.3] - 2022-10-15 + +### Added + +- Added custom params serializer support [#5113](https://github.com/axios/axios/pull/5113) + +### Fixed + +- Fixed top-level export to keep them in-line with static properties [#5109](https://github.com/axios/axios/pull/5109) +- Stopped including null values to query string. [#5108](https://github.com/axios/axios/pull/5108) +- Restored proxy config backwards compatibility with 0.x [#5097](https://github.com/axios/axios/pull/5097) +- Added back AxiosHeaders in AxiosHeaderValue [#5103](https://github.com/axios/axios/pull/5103) +- Pin CDN install instructions to a specific version [#5060](https://github.com/axios/axios/pull/5060) +- Handling of array values fixed for AxiosHeaders [#5085](https://github.com/axios/axios/pull/5085) + +### Chores + +- docs: match badge style, add link to them [#5046](https://github.com/axios/axios/pull/5046) +- chore: fixing comments typo [#5054](https://github.com/axios/axios/pull/5054) +- chore: update issue template [#5061](https://github.com/axios/axios/pull/5061) +- chore: added progress capturing section to the docs; [#5084](https://github.com/axios/axios/pull/5084) + +### Contributors to this release + +- [Jason Saayman](https://github.com/jasonsaayman) +- [scarf](https://github.com/scarf005) +- [Lenz Weber-Tronic](https://github.com/phryneas) +- [Arvindh](https://github.com/itsarvindh) +- [Félix Legrelle](https://github.com/FelixLgr) +- [Patrick Petrovic](https://github.com/ppati000) +- [Dmitriy Mozgovoy](https://github.com/DigitalBrainJS) +- [littledian](https://github.com/littledian) +- [ChronosMasterOfAllTime](https://github.com/ChronosMasterOfAllTime) + +### PRs + +- CVE 2023 45857 ( [#6028](https://api.github.com/repos/axios/axios/pulls/6028) ) + +``` + +⚠️ Critical vulnerability fix. See https://security.snyk.io/vuln/SNYK-JS-AXIOS-6032459 +``` + +## [1.1.2] - 2022-10-07 + +### Fixed + +- Fixed broken exports for UMD builds. + +### Contributors to this release + +- [Jason Saayman](https://github.com/jasonsaayman) + +### PRs + +- CVE 2023 45857 ( [#6028](https://api.github.com/repos/axios/axios/pulls/6028) ) + +``` + +⚠️ Critical vulnerability fix. See https://security.snyk.io/vuln/SNYK-JS-AXIOS-6032459 +``` + +## [1.1.1] - 2022-10-07 + +### Fixed + +- Fixed broken exports for common js. This fix breaks a prior fix, I will fix both issues ASAP but the commonJS use is more impactful. + +### Contributors to this release + +- [Jason Saayman](https://github.com/jasonsaayman) + +### PRs + +- CVE 2023 45857 ( [#6028](https://api.github.com/repos/axios/axios/pulls/6028) ) + +``` + +⚠️ Critical vulnerability fix. See https://security.snyk.io/vuln/SNYK-JS-AXIOS-6032459 +``` + +## [1.1.0] - 2022-10-06 + +### Fixed + +- Fixed missing exports in type definition index.d.ts [#5003](https://github.com/axios/axios/pull/5003) +- Fixed query params composing [#5018](https://github.com/axios/axios/pull/5018) +- Fixed GenericAbortSignal interface by making it more generic [#5021](https://github.com/axios/axios/pull/5021) +- Fixed adding "clear" to AxiosInterceptorManager [#5010](https://github.com/axios/axios/pull/5010) +- Fixed commonjs & umd exports [#5030](https://github.com/axios/axios/pull/5030) +- Fixed inability to access response headers when using axios 1.x with Jest [#5036](https://github.com/axios/axios/pull/5036) + +### Contributors to this release + +- [Trim21](https://github.com/trim21) +- [Dmitriy Mozgovoy](https://github.com/DigitalBrainJS) +- [shingo.sasaki](https://github.com/s-sasaki-0529) +- [Ivan Pepelko](https://github.com/ivanpepelko) +- [Richard Kořínek](https://github.com/risa) + +### PRs + +- CVE 2023 45857 ( [#6028](https://api.github.com/repos/axios/axios/pulls/6028) ) + +``` + +⚠️ Critical vulnerability fix. See https://security.snyk.io/vuln/SNYK-JS-AXIOS-6032459 +``` + +## [1.0.0] - 2022-10-04 + +### Added + +- Added stack trace to AxiosError [#4624](https://github.com/axios/axios/pull/4624) +- Add AxiosError to AxiosStatic [#4654](https://github.com/axios/axios/pull/4654) +- Replaced Rollup as our build runner [#4596](https://github.com/axios/axios/pull/4596) +- Added generic TS types for the exposed toFormData helper [#4668](https://github.com/axios/axios/pull/4668) +- Added listen callback function [#4096](https://github.com/axios/axios/pull/4096) +- Added instructions for installing using PNPM [#4207](https://github.com/axios/axios/pull/4207) +- Added generic AxiosAbortSignal TS interface to avoid importing AbortController polyfill [#4229](https://github.com/axios/axios/pull/4229) +- Added axios-url-template in ECOSYSTEM.md [#4238](https://github.com/axios/axios/pull/4238) +- Added a clear() function to the request and response interceptors object so a user can ensure that all interceptors have been removed from an axios instance [#4248](https://github.com/axios/axios/pull/4248) +- Added react hook plugin [#4319](https://github.com/axios/axios/pull/4319) +- Adding HTTP status code for transformResponse [#4580](https://github.com/axios/axios/pull/4580) +- Added blob to the list of protocols supported by the browser [#4678](https://github.com/axios/axios/pull/4678) +- Resolving proxy from env on redirect [#4436](https://github.com/axios/axios/pull/4436) +- Added enhanced toFormData implementation with additional options [4704](https://github.com/axios/axios/pull/4704) +- Adding Canceler parameters config and request [#4711](https://github.com/axios/axios/pull/4711) +- Added automatic payload serialization to application/x-www-form-urlencoded [#4714](https://github.com/axios/axios/pull/4714) +- Added the ability for webpack users to overwrite built-ins [#4715](https://github.com/axios/axios/pull/4715) +- Added string[] to AxiosRequestHeaders type [#4322](https://github.com/axios/axios/pull/4322) +- Added the ability for the url-encoded-form serializer to respect the formSerializer config [#4721](https://github.com/axios/axios/pull/4721) +- Added isCancel type assert [#4293](https://github.com/axios/axios/pull/4293) +- Added data URL support for node.js [#4725](https://github.com/axios/axios/pull/4725) +- Adding types for progress event callbacks [#4675](https://github.com/axios/axios/pull/4675) +- URL params serializer [#4734](https://github.com/axios/axios/pull/4734) +- Added axios.formToJSON method [#4735](https://github.com/axios/axios/pull/4735) +- Bower platform add data protocol [#4804](https://github.com/axios/axios/pull/4804) +- Use WHATWG URL API instead of url.parse() [#4852](https://github.com/axios/axios/pull/4852) +- Add ENUM containing Http Status Codes to typings [#4903](https://github.com/axios/axios/pull/4903) +- Improve typing of timeout in index.d.ts [#4934](https://github.com/axios/axios/pull/4934) + +### Changed + +- Updated AxiosError.config to be optional in the type definition [#4665](https://github.com/axios/axios/pull/4665) +- Updated README emphasizing the URLSearchParam built-in interface over other solutions [#4590](https://github.com/axios/axios/pull/4590) +- Include request and config when creating a CanceledError instance [#4659](https://github.com/axios/axios/pull/4659) +- Changed func-names eslint rule to as-needed [#4492](https://github.com/axios/axios/pull/4492) +- Replacing deprecated substr() with slice() as substr() is deprecated [#4468](https://github.com/axios/axios/pull/4468) +- Updating HTTP links in README.md to use HTTPS [#4387](https://github.com/axios/axios/pull/4387) +- Updated to a better trim() polyfill [#4072](https://github.com/axios/axios/pull/4072) +- Updated types to allow specifying partial default headers on instance create [#4185](https://github.com/axios/axios/pull/4185) +- Expanded isAxiosError types [#4344](https://github.com/axios/axios/pull/4344) +- Updated type definition for axios instance methods [#4224](https://github.com/axios/axios/pull/4224) +- Updated eslint config [#4722](https://github.com/axios/axios/pull/4722) +- Updated Docs [#4742](https://github.com/axios/axios/pull/4742) +- Refactored Axios to use ES2017 [#4787](https://github.com/axios/axios/pull/4787) + +### Deprecated + +- There are multiple deprecations, refactors and fixes provided in this release. Please read through the full release notes to see how this may impact your project and use case. + +### Removed + +- Removed incorrect argument for NetworkError constructor [#4656](https://github.com/axios/axios/pull/4656) +- Removed Webpack [#4596](https://github.com/axios/axios/pull/4596) +- Removed function that transform arguments to array [#4544](https://github.com/axios/axios/pull/4544) + +### Fixed + +- Fixed grammar in README [#4649](https://github.com/axios/axios/pull/4649) +- Fixed code error in README [#4599](https://github.com/axios/axios/pull/4599) +- Optimized the code that checks cancellation [#4587](https://github.com/axios/axios/pull/4587) +- Fix url pointing to defaults.js in README [#4532](https://github.com/axios/axios/pull/4532) +- Use type alias instead of interface for AxiosPromise [#4505](https://github.com/axios/axios/pull/4505) +- Fix some word spelling and lint style in code comments [#4500](https://github.com/axios/axios/pull/4500) +- Edited readme with 3 updated browser icons of Chrome, FireFox and Safari [#4414](https://github.com/axios/axios/pull/4414) +- Bump follow-redirects from 1.14.9 to 1.15.0 [#4673](https://github.com/axios/axios/pull/4673) +- Fixing http tests to avoid hanging when assertions fail [#4435](https://github.com/axios/axios/pull/4435) +- Fix TS definition for AxiosRequestTransformer [#4201](https://github.com/axios/axios/pull/4201) +- Fix grammatical issues in README [#4232](https://github.com/axios/axios/pull/4232) +- Fixing instance.defaults.headers type [#4557](https://github.com/axios/axios/pull/4557) +- Fixed race condition on immediate requests cancellation [#4261](https://github.com/axios/axios/pull/4261) +- Fixing Z_BUF_ERROR when no content [#4701](https://github.com/axios/axios/pull/4701) +- Fixing proxy beforeRedirect regression [#4708](https://github.com/axios/axios/pull/4708) +- Fixed AxiosError status code type [#4717](https://github.com/axios/axios/pull/4717) +- Fixed AxiosError stack capturing [#4718](https://github.com/axios/axios/pull/4718) +- Fixing AxiosRequestHeaders typings [#4334](https://github.com/axios/axios/pull/4334) +- Fixed max body length defaults [#4731](https://github.com/axios/axios/pull/4731) +- Fixed toFormData Blob issue on node>v17 [#4728](https://github.com/axios/axios/pull/4728) +- Bump grunt from 1.5.2 to 1.5.3 [#4743](https://github.com/axios/axios/pull/4743) +- Fixing content-type header repeated [#4745](https://github.com/axios/axios/pull/4745) +- Fixed timeout error message for http [4738](https://github.com/axios/axios/pull/4738) +- Request ignores false, 0 and empty string as body values [#4785](https://github.com/axios/axios/pull/4785) +- Added back missing minified builds [#4805](https://github.com/axios/axios/pull/4805) +- Fixed a type error [#4815](https://github.com/axios/axios/pull/4815) +- Fixed a regression bug with unsubscribing from cancel token; [#4819](https://github.com/axios/axios/pull/4819) +- Remove repeated compression algorithm [#4820](https://github.com/axios/axios/pull/4820) +- The error of calling extend to pass parameters [#4857](https://github.com/axios/axios/pull/4857) +- SerializerOptions.indexes allows boolean | null | undefined [#4862](https://github.com/axios/axios/pull/4862) +- Require interceptors to return values [#4874](https://github.com/axios/axios/pull/4874) +- Removed unused imports [#4949](https://github.com/axios/axios/pull/4949) +- Allow null indexes on formSerializer and paramsSerializer [#4960](https://github.com/axios/axios/pull/4960) + +### Chores + +- Set permissions for GitHub actions [#4765](https://github.com/axios/axios/pull/4765) +- Included githubactions in the dependabot config [#4770](https://github.com/axios/axios/pull/4770) +- Included dependency review [#4771](https://github.com/axios/axios/pull/4771) +- Update security.md [#4784](https://github.com/axios/axios/pull/4784) +- Remove unnecessary spaces [#4854](https://github.com/axios/axios/pull/4854) +- Simplify the import path of AxiosError [#4875](https://github.com/axios/axios/pull/4875) +- Fix Gitpod dead link [#4941](https://github.com/axios/axios/pull/4941) +- Enable syntax highlighting for a code block [#4970](https://github.com/axios/axios/pull/4970) +- Using Logo Axios in Readme.md [#4993](https://github.com/axios/axios/pull/4993) +- Fix markup for note in README [#4825](https://github.com/axios/axios/pull/4825) +- Fix typo and formatting, add colons [#4853](https://github.com/axios/axios/pull/4853) +- Fix typo in readme [#4942](https://github.com/axios/axios/pull/4942) + +### Security + +- Update SECURITY.md [#4687](https://github.com/axios/axios/pull/4687) + +### Contributors to this release + +- [Bertrand Marron](https://github.com/tusbar) +- [Dmitriy Mozgovoy](https://github.com/DigitalBrainJS) +- [Dan Mooney](https://github.com/danmooney) +- [Michael Li](https://github.com/xiaoyu-tamu) +- [aong](https://github.com/yxwzaxns) +- [Des Preston](https://github.com/despreston) +- [Ted Robertson](https://github.com/tredondo) +- [zhoulixiang](https://github.com/zh-lx) +- [Arthur Fiorette](https://github.com/arthurfiorette) +- [Kumar Shanu](https://github.com/Kr-Shanu) +- [JALAL](https://github.com/JLL32) +- [Jingyi Lin](https://github.com/MageeLin) +- [Philipp Loose](https://github.com/phloose) +- [Alexander Shchukin](https://github.com/sashsvamir) +- [Dave Cardwell](https://github.com/davecardwell) +- [Cat Scarlet](https://github.com/catscarlet) +- [Luca Pizzini](https://github.com/lpizzinidev) +- [Kai](https://github.com/Schweinepriester) +- [Maxime Bargiel](https://github.com/mbargiel) +- [Brian Helba](https://github.com/brianhelba) +- [reslear](https://github.com/reslear) +- [Jamie Slome](https://github.com/JamieSlome) +- [Landro3](https://github.com/Landro3) +- [rafw87](https://github.com/rafw87) +- [Afzal Sayed](https://github.com/afzalsayed96) +- [Koki Oyatsu](https://github.com/kaishuu0123) +- [Dave](https://github.com/wangcch) +- [暴走老七](https://github.com/baozouai) +- [Spencer](https://github.com/spalger) +- [Adrian Wieprzkowicz](https://github.com/Argeento) +- [Jamie Telin](https://github.com/lejahmie) +- [毛呆](https://github.com/aweikalee) +- [Kirill Shakirov](https://github.com/turisap) +- [Rraji Abdelbari](https://github.com/estarossa0) +- [Jelle Schutter](https://github.com/jelleschutter) +- [Tom Ceuppens](https://github.com/KyorCode) +- [Johann Cooper](https://github.com/JohannCooper) +- [Dimitris Halatsis](https://github.com/mitsos1os) +- [chenjigeng](https://github.com/chenjigeng) +- [João Gabriel Quaresma](https://github.com/joaoGabriel55) +- [Victor Augusto](https://github.com/VictorAugDB) +- [neilnaveen](https://github.com/neilnaveen) +- [Pavlos](https://github.com/psmoros) +- [Kiryl Valkovich](https://github.com/visortelle) +- [Naveen](https://github.com/naveensrinivasan) +- [wenzheng](https://github.com/0x30) +- [hcwhan](https://github.com/hcwhan) +- [Bassel Rachid](https://github.com/basselworkforce) +- [Grégoire Pineau](https://github.com/lyrixx) +- [felipedamin](https://github.com/felipedamin) +- [Karl Horky](https://github.com/karlhorky) +- [Yue JIN](https://github.com/kingyue737) +- [Usman Ali Siddiqui](https://github.com/usman250994) +- [WD](https://github.com/techbirds) +- [Günther Foidl](https://github.com/gfoidl) +- [Stephen Jennings](https://github.com/jennings) +- [C.T.Lin](https://github.com/chentsulin) +- [mia-z](https://github.com/mia-z) +- [Parth Banathia](https://github.com/Parth0105) +- [parth0105pluang](https://github.com/parth0105pluang) +- [Marco Weber](https://github.com/mrcwbr) +- [Luca Pizzini](https://github.com/lpizzinidev) +- [Willian Agostini](https://github.com/WillianAgostini) + +- [Huyen Nguyen](https://github.com/huyenltnguyen) diff --git a/node_modules/axios/LICENSE b/node_modules/axios/LICENSE new file mode 100644 index 0000000..05006a5 --- /dev/null +++ b/node_modules/axios/LICENSE @@ -0,0 +1,7 @@ +# Copyright (c) 2014-present Matt Zabriskie & Collaborators + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/axios/MIGRATION_GUIDE.md b/node_modules/axios/MIGRATION_GUIDE.md new file mode 100644 index 0000000..2e59d9d --- /dev/null +++ b/node_modules/axios/MIGRATION_GUIDE.md @@ -0,0 +1,877 @@ +# Axios Migration Guide + +> **Migrating from Axios 0.x to 1.x** +> +> This guide helps developers upgrade from Axios 0.x to 1.x by documenting breaking changes, providing migration strategies, and offering solutions to common upgrade challenges. + +## Table of Contents + +- [Overview](#overview) +- [Breaking Changes](#breaking-changes) +- [Error Handling Migration](#error-handling-migration) +- [API Changes](#api-changes) +- [Configuration Changes](#configuration-changes) +- [Migration Strategies](#migration-strategies) +- [Common Patterns](#common-patterns) +- [Troubleshooting](#troubleshooting) +- [Resources](#resources) + +## Overview + +Axios 1.x introduced several breaking changes to improve consistency, security, and developer experience. While these changes provide better error handling and more predictable behavior, they require code updates when migrating from 0.x versions. + +### Key Changes Summary + +| Area | 0.x Behavior | 1.x Behavior | Impact | +|------|--------------|--------------|--------| +| Error Handling | Selective throwing | Consistent throwing | High | +| JSON Parsing | Lenient | Strict | Medium | +| Browser Support | IE11+ | Modern browsers | Low-Medium | +| TypeScript | Partial | Full support | Low | + +### Migration Complexity + +- **Simple applications**: 1-2 hours +- **Medium applications**: 1-2 days +- **Large applications with complex error handling**: 3-5 days + +## Breaking Changes + +### 1. Error Handling Changes + +**The most significant change in Axios 1.x is how errors are handled.** + +#### 0.x Behavior +```javascript +// Axios 0.x - Some HTTP error codes didn't throw +axios.get('/api/data') + .then(response => { + // Response interceptor could handle all errors + console.log('Success:', response.data); + }); + +// Response interceptor handled everything +axios.interceptors.response.use( + response => response, + error => { + handleError(error); + // Error was "handled" and didn't propagate + } +); +``` + +#### 1.x Behavior +```javascript +// Axios 1.x - All HTTP errors throw consistently +axios.get('/api/data') + .then(response => { + console.log('Success:', response.data); + }) + .catch(error => { + // Must handle errors at call site or they propagate + console.error('Request failed:', error); + }); + +// Response interceptor must re-throw or return rejected promise +axios.interceptors.response.use( + response => response, + error => { + handleError(error); + // Must explicitly handle propagation + return Promise.reject(error); // or throw error; + } +); +``` + +#### Impact +- **Response interceptors** can no longer "swallow" errors silently +- **Every API call** must handle errors explicitly or they become unhandled promise rejections +- **Centralized error handling** requires new patterns + +### 2. JSON Parsing Changes + +#### 0.x Behavior +```javascript +// Axios 0.x - Lenient JSON parsing +// Would attempt to parse even invalid JSON +response.data; // Might contain partial data or fallbacks +``` + +#### 1.x Behavior +```javascript +// Axios 1.x - Strict JSON parsing +// Throws clear errors for invalid JSON +try { + const data = response.data; +} catch (error) { + // Handle JSON parsing errors explicitly +} +``` + +### 3. Request/Response Transform Changes + +#### 0.x Behavior +```javascript +// Implicit transformations with some edge cases +transformRequest: [function (data) { + // Less predictable behavior + return data; +}] +``` + +#### 1.x Behavior +```javascript +// More consistent transformation pipeline +transformRequest: [function (data, headers) { + // Headers parameter always available + // More predictable behavior + return data; +}] +``` + +### 4. Browser Support Changes + +- **0.x**: Supported IE11 and older browsers +- **1.x**: Requires modern browsers with Promise support +- **Polyfills**: May be needed for older browser support + +## Error Handling Migration + +The error handling changes are the most complex part of migrating to Axios 1.x. Here are proven strategies: + +### Strategy 1: Centralized Error Handling with Error Boundary + +```javascript +// Create a centralized error handler +class ApiErrorHandler { + constructor() { + this.setupInterceptors(); + } + + setupInterceptors() { + axios.interceptors.response.use( + response => response, + error => { + // Centralized error processing + this.processError(error); + + // Return a resolved promise with error info for handled errors + if (this.isHandledError(error)) { + return Promise.resolve({ + data: null, + error: this.normalizeError(error), + handled: true + }); + } + + // Re-throw unhandled errors + return Promise.reject(error); + } + ); + } + + processError(error) { + // Log errors + console.error('API Error:', error); + + // Show user notifications + if (error.response?.status === 401) { + this.handleAuthError(); + } else if (error.response?.status >= 500) { + this.showErrorNotification('Server error occurred'); + } + } + + isHandledError(error) { + // Define which errors are "handled" centrally + const handledStatuses = [401, 403, 404, 422, 500, 502, 503]; + return handledStatuses.includes(error.response?.status); + } + + normalizeError(error) { + return { + status: error.response?.status, + message: error.response?.data?.message || error.message, + code: error.response?.data?.code || error.code + }; + } + + handleAuthError() { + // Redirect to login, clear tokens, etc. + localStorage.removeItem('token'); + window.location.href = '/login'; + } + + showErrorNotification(message) { + // Show user-friendly error message + console.error(message); // Replace with your notification system + } +} + +// Initialize globally +const errorHandler = new ApiErrorHandler(); + +// Usage in components/services +async function fetchUserData(userId) { + try { + const response = await axios.get(`/api/users/${userId}`); + + // Check if error was handled centrally + if (response.handled) { + return { data: null, error: response.error }; + } + + return { data: response.data, error: null }; + } catch (error) { + // Unhandled errors still need local handling + return { data: null, error: { message: 'Unexpected error occurred' } }; + } +} +``` + +### Strategy 2: Wrapper Function Pattern + +```javascript +// Create a wrapper that provides 0.x-like behavior +function createApiWrapper() { + const api = axios.create(); + + // Add response interceptor for centralized handling + api.interceptors.response.use( + response => response, + error => { + // Handle common errors centrally + if (error.response?.status === 401) { + // Handle auth errors + handleAuthError(); + } + + if (error.response?.status >= 500) { + // Handle server errors + showServerErrorNotification(); + } + + // Always reject to maintain error propagation + return Promise.reject(error); + } + ); + + // Wrapper function that mimics 0.x behavior + function safeRequest(requestConfig, options = {}) { + return api(requestConfig) + .then(response => response) + .catch(error => { + if (options.suppressErrors) { + // Return error info instead of throwing + return { + data: null, + error: { + status: error.response?.status, + message: error.response?.data?.message || error.message + } + }; + } + throw error; + }); + } + + return { safeRequest, axios: api }; +} + +// Usage +const { safeRequest } = createApiWrapper(); + +// For calls where you want centralized error handling +const result = await safeRequest( + { method: 'get', url: '/api/data' }, + { suppressErrors: true } +); + +if (result.error) { + // Handle error case + console.log('Request failed:', result.error.message); +} else { + // Handle success case + console.log('Data:', result.data); +} +``` + +### Strategy 3: Global Error Handler with Custom Events + +```javascript +// Set up global error handling with events +class GlobalErrorHandler extends EventTarget { + constructor() { + super(); + this.setupInterceptors(); + } + + setupInterceptors() { + axios.interceptors.response.use( + response => response, + error => { + // Emit custom event for global handling + this.dispatchEvent(new CustomEvent('apiError', { + detail: { error, timestamp: new Date() } + })); + + // Always reject to maintain proper error flow + return Promise.reject(error); + } + ); + } +} + +const globalErrorHandler = new GlobalErrorHandler(); + +// Set up global listeners +globalErrorHandler.addEventListener('apiError', (event) => { + const { error } = event.detail; + + // Centralized error logic + if (error.response?.status === 401) { + handleAuthError(); + } + + if (error.response?.status >= 500) { + showErrorNotification('Server error occurred'); + } +}); + +// Usage remains clean +async function apiCall() { + try { + const response = await axios.get('/api/data'); + return response.data; + } catch (error) { + // Error was already handled globally + // Just handle component-specific logic + return null; + } +} +``` + +## API Changes + +### Request Configuration + +#### 0.x to 1.x Changes +```javascript +// 0.x - Some properties had different defaults +const config = { + timeout: 0, // No timeout by default + maxContentLength: -1, // No limit +}; + +// 1.x - More secure defaults +const config = { + timeout: 0, // Still no timeout, but easier to configure + maxContentLength: 2000, // Default limit for security + maxBodyLength: 2000, // New property +}; +``` + +### Response Object + +The response object structure remains largely the same, but error responses are more consistent: + +```javascript +// Both 0.x and 1.x +response = { + data: {}, // Response body + status: 200, // HTTP status + statusText: 'OK', // HTTP status message + headers: {}, // Response headers + config: {}, // Request config + request: {} // Request object +}; + +// Error responses are more consistent in 1.x +error.response = { + data: {}, // Error response body + status: 404, // HTTP error status + statusText: 'Not Found', + headers: {}, + config: {}, + request: {} +}; +``` + +## Configuration Changes + +### Default Configuration Updates + +```javascript +// 0.x defaults +axios.defaults.timeout = 0; // No timeout +axios.defaults.maxContentLength = -1; // No limit + +// 1.x defaults (more secure) +axios.defaults.timeout = 0; // Still no timeout +axios.defaults.maxContentLength = 2000; // 2MB limit +axios.defaults.maxBodyLength = 2000; // 2MB limit +``` + +### Instance Configuration + +```javascript +// 0.x - Instance creation +const api = axios.create({ + baseURL: 'https://api.example.com', + timeout: 1000, +}); + +// 1.x - Same API, but more options available +const api = axios.create({ + baseURL: 'https://api.example.com', + timeout: 1000, + maxBodyLength: Infinity, // Override default if needed + maxContentLength: Infinity, +}); +``` + +## Migration Strategies + +### Step-by-Step Migration Process + +#### Phase 1: Preparation +1. **Audit Current Error Handling** + ```bash + # Find all axios usage + grep -r "axios\." src/ + grep -r "\.catch" src/ + grep -r "interceptors" src/ + ``` + +2. **Identify Patterns** + - Response interceptors that handle errors + - Components that rely on centralized error handling + - Authentication and retry logic + +3. **Create Test Cases** + ```javascript + // Test current error handling behavior + describe('Error Handling Migration', () => { + it('should handle 401 errors consistently', async () => { + // Test authentication error flows + }); + + it('should handle 500 errors with user feedback', async () => { + // Test server error handling + }); + }); + ``` + +#### Phase 2: Implementation +1. **Update Dependencies** + ```bash + npm update axios + ``` + +2. **Implement New Error Handling** + - Choose one of the strategies above + - Update response interceptors + - Add error handling to API calls + +3. **Update Authentication Logic** + ```javascript + // 0.x pattern + axios.interceptors.response.use(null, error => { + if (error.response?.status === 401) { + logout(); + // Error was "handled" + } + }); + + // 1.x pattern + axios.interceptors.response.use( + response => response, + error => { + if (error.response?.status === 401) { + logout(); + } + return Promise.reject(error); // Always propagate + } + ); + ``` + +#### Phase 3: Testing and Validation +1. **Test Error Scenarios** + - Network failures + - HTTP error codes (401, 403, 404, 500, etc.) + - Timeout errors + - JSON parsing errors + +2. **Validate User Experience** + - Error messages are shown appropriately + - Authentication redirects work + - Loading states are handled correctly + +### Gradual Migration Approach + +For large applications, consider gradual migration: + +```javascript +// Create a compatibility layer +const axiosCompat = { + // Use new axios instance for new code + v1: axios.create({ + // 1.x configuration + }), + + // Wrapper for legacy code + legacy: createLegacyWrapper(axios.create({ + // Configuration that mimics 0.x behavior + })) +}; + +function createLegacyWrapper(axiosInstance) { + // Add interceptors that provide 0.x-like behavior + axiosInstance.interceptors.response.use( + response => response, + error => { + // Handle errors in 0.x style for legacy code + handleLegacyError(error); + // Don't propagate certain errors + if (shouldSuppressError(error)) { + return Promise.resolve({ data: null, error: true }); + } + return Promise.reject(error); + } + ); + + return axiosInstance; +} +``` + +## Common Patterns + +### Authentication Interceptors + +#### Updated Authentication Pattern +```javascript +// Token refresh interceptor for 1.x +let isRefreshing = false; +let refreshSubscribers = []; + +function subscribeTokenRefresh(cb) { + refreshSubscribers.push(cb); +} + +function onTokenRefreshed(token) { + refreshSubscribers.forEach(cb => cb(token)); + refreshSubscribers = []; +} + +axios.interceptors.response.use( + response => response, + async error => { + const originalRequest = error.config; + + if (error.response?.status === 401 && !originalRequest._retry) { + if (isRefreshing) { + // Wait for token refresh + return new Promise(resolve => { + subscribeTokenRefresh(token => { + originalRequest.headers.Authorization = `Bearer ${token}`; + resolve(axios(originalRequest)); + }); + }); + } + + originalRequest._retry = true; + isRefreshing = true; + + try { + const newToken = await refreshToken(); + onTokenRefreshed(newToken); + isRefreshing = false; + + originalRequest.headers.Authorization = `Bearer ${newToken}`; + return axios(originalRequest); + } catch (refreshError) { + isRefreshing = false; + logout(); + return Promise.reject(refreshError); + } + } + + return Promise.reject(error); + } +); +``` + +### Retry Logic + +```javascript +// Retry interceptor for 1.x +function createRetryInterceptor(maxRetries = 3, retryDelay = 1000) { + return axios.interceptors.response.use( + response => response, + async error => { + const config = error.config; + + if (!config || !config.retry) { + return Promise.reject(error); + } + + config.__retryCount = config.__retryCount || 0; + + if (config.__retryCount >= maxRetries) { + return Promise.reject(error); + } + + config.__retryCount += 1; + + // Exponential backoff + const delay = retryDelay * Math.pow(2, config.__retryCount - 1); + await new Promise(resolve => setTimeout(resolve, delay)); + + return axios(config); + } + ); +} + +// Usage +const api = axios.create(); +createRetryInterceptor(3, 1000); + +// Make request with retry +api.get('/api/data', { retry: true }); +``` + +### Loading State Management + +```javascript +// Loading interceptor for 1.x +class LoadingManager { + constructor() { + this.requests = new Set(); + this.setupInterceptors(); + } + + setupInterceptors() { + axios.interceptors.request.use(config => { + this.requests.add(config); + this.updateLoadingState(); + return config; + }); + + axios.interceptors.response.use( + response => { + this.requests.delete(response.config); + this.updateLoadingState(); + return response; + }, + error => { + this.requests.delete(error.config); + this.updateLoadingState(); + return Promise.reject(error); + } + ); + } + + updateLoadingState() { + const isLoading = this.requests.size > 0; + // Update your loading UI + document.body.classList.toggle('loading', isLoading); + } +} + +const loadingManager = new LoadingManager(); +``` + +## Troubleshooting + +### Common Migration Issues + +#### Issue 1: Unhandled Promise Rejections + +**Problem:** +```javascript +// This pattern worked in 0.x but causes unhandled rejections in 1.x +axios.get('/api/data'); // No .catch() handler +``` + +**Solution:** +```javascript +// Always handle promises +axios.get('/api/data') + .catch(error => { + // Handle error appropriately + console.error('Request failed:', error.message); + }); + +// Or use async/await with try/catch +async function fetchData() { + try { + const response = await axios.get('/api/data'); + return response.data; + } catch (error) { + console.error('Request failed:', error.message); + return null; + } +} +``` + +#### Issue 2: Response Interceptors Not "Handling" Errors + +**Problem:** +```javascript +// 0.x style - interceptor "handled" errors +axios.interceptors.response.use(null, error => { + showErrorMessage(error.message); + // Error was considered "handled" +}); +``` + +**Solution:** +```javascript +// 1.x style - explicitly control error propagation +axios.interceptors.response.use( + response => response, + error => { + showErrorMessage(error.message); + + // Choose whether to propagate the error + if (shouldPropagateError(error)) { + return Promise.reject(error); + } + + // Return success-like response for "handled" errors + return Promise.resolve({ + data: null, + handled: true, + error: normalizeError(error) + }); + } +); +``` + +#### Issue 3: JSON Parsing Errors + +**Problem:** +```javascript +// 1.x is stricter about JSON parsing +// This might throw where 0.x was lenient +const data = response.data; +``` + +**Solution:** +```javascript +// Add response transformer for better error handling +axios.defaults.transformResponse = [ + function (data) { + if (typeof data === 'string') { + try { + return JSON.parse(data); + } catch (e) { + // Handle JSON parsing errors gracefully + console.warn('Invalid JSON response:', data); + return { error: 'Invalid JSON', rawData: data }; + } + } + return data; + } +]; +``` + +#### Issue 4: TypeScript Errors After Upgrade + +**Problem:** +```typescript +// TypeScript errors after upgrade +const response = await axios.get('/api/data'); +// Property 'someProperty' does not exist on type 'any' +``` + +**Solution:** +```typescript +// Define proper interfaces +interface ApiResponse { + data: any; + message: string; + success: boolean; +} + +const response = await axios.get('/api/data'); +// Now properly typed +console.log(response.data.data); +``` + +### Debug Migration Issues + +#### Enable Debug Logging +```javascript +// Add request/response logging +axios.interceptors.request.use(config => { + console.log('Request:', config); + return config; +}); + +axios.interceptors.response.use( + response => { + console.log('Response:', response); + return response; + }, + error => { + console.log('Error:', error); + return Promise.reject(error); + } +); +``` + +#### Compare Behavior +```javascript +// Create side-by-side comparison during migration +const axios0x = require('axios-0x'); // Keep old version for testing +const axios1x = require('axios'); + +async function compareRequests(config) { + try { + const [result0x, result1x] = await Promise.allSettled([ + axios0x(config), + axios1x(config) + ]); + + console.log('0.x result:', result0x); + console.log('1.x result:', result1x); + } catch (error) { + console.log('Comparison error:', error); + } +} +``` + +## Resources + +### Official Documentation +- [Axios 1.x Documentation](https://axios-http.com/) +- [Axios GitHub Repository](https://github.com/axios/axios) +- [Axios Changelog](https://github.com/axios/axios/blob/main/CHANGELOG.md) + +### Migration Tools +- [Axios Migration Codemod](https://github.com/axios/axios-migration-codemod) *(if available)* +- [ESLint Rules for Axios 1.x](https://github.com/axios/eslint-plugin-axios) *(if available)* + +### Community Resources +- [Stack Overflow - Axios Migration Questions](https://stackoverflow.com/questions/tagged/axios+migration) +- [GitHub Discussions](https://github.com/axios/axios/discussions) +- [Axios Discord Community](https://discord.gg/axios) *(if available)* + +### Related Issues +- [Error Handling Changes Discussion](https://github.com/axios/axios/issues/7208) +- [Migration Guide Request](https://github.com/axios/axios/issues/xxxx) *(link to related issues)* + +--- + +## Need Help? + +If you encounter issues during migration that aren't covered in this guide: + +1. **Search existing issues** in the [Axios GitHub repository](https://github.com/axios/axios/issues) +2. **Ask questions** in [GitHub Discussions](https://github.com/axios/axios/discussions) +3. **Contribute improvements** to this migration guide + +--- + +*This migration guide is maintained by the community. If you find errors or have suggestions, please [open an issue](https://github.com/axios/axios/issues) or submit a pull request.* \ No newline at end of file diff --git a/node_modules/axios/README.md b/node_modules/axios/README.md new file mode 100644 index 0000000..7999def --- /dev/null +++ b/node_modules/axios/README.md @@ -0,0 +1,2815 @@ +> [!IMPORTANT] +> [**Get Security Updates for Axios v0 & Early Access Provider →**](https://www.herodevs.com/support/nes-for-axios?utm_source=axios-site&utm_medium=referral&utm_campaign=nes-for-axios_global&utm_content=landing-page_none_20260924_a) + +

💎 Platinum sponsors

+ + + + + +
+ + Thanks.dev + +

+ We're passionate about making open source sustainable. Scan your dependency tree to better understand which open source projects need funding. +

+

+ thanks.dev +

+
+ 💜 Become a sponsor +
+ + + + + +
+ 💜 Become a sponsor + + 💜 Become a sponsor +
+

🥇 Gold sponsors

+ + + + + + + + + + + + + + + + + + + + + +
+ + Principal Financial Group + +

+ Free tools to help with your financial planning needs! +

+

+ principal.com +

+
+ + SAP + +

+ SAP SE, a global software company, is one of the largest vendors of ERP and other enterprise applications. +

+

+ opensource.sap.com +

+
+ + Descope + +

+ Reduce user friction, prevent account takeover, and get a 360° view of your customer and agentic identities with the Descope External IAM platform. +

+

+ descope.com +

+
+ + RxDB + +

+ RxDB is a NoSQL database for JavaScript that runs directly in your app. +

+

+ rxdb.info +

+
+ + Poprey + +

+ Buy Instagram Likes +

+

+ poprey.com +

+
+ + Fun 88 + +

+ Fun88 is a global online gambling and betting brand founded in 2009, offering a wide range of services including sports betting, live casino games, slots, and virtual gaming. +

+

+ global.fun88.com +

+
+ + JBO Vietnam + +

+ JBO Vietnam is a prominent online entertainment brand in Vietnam, offering sports betting, esports, online casino games, and a wide range of other exciting games. +

+

+ jbo88b.com +

+
+ + JBO Thailand + +

+ JBO Thailand is a prominent online entertainment brand in Thailand, offering sports betting, esports, online casino games, and a wide range of other exciting games. +

+

+ jbo88b.com +

+
+ + ScrapingBee + +

+ Scrape websites with a powerful web scraping API without managing proxies, browsers, or anti-bot defenses. +

+

+ scrapingbee.com +

+
+ + HeroDevs + +

+ Security and long-term support for end-of-life open source software. +

+

+ herodevs.com +

+
+ + Sweepico Promo Code + +

+ Social Gaming Platform +

+

+ Sweepico Promo Code +

+
+ + CI powered by Namespace + +

+ Actually the fastest way to run
your GitHub Actions. +

+

+ namespace.so +

+
+ + + +

+ +
+ Axios
+
+ +

Promise based HTTP client for the browser and node.js

+ +

+ Website • + Documentation +

+ +
+ +[![npm version](https://img.shields.io/npm/v/axios.svg?style=flat-square)](https://www.npmjs.org/package/axios) +[![Build status](https://img.shields.io/github/actions/workflow/status/axios/axios/ci.yml?branch=v1.x&label=CI&logo=github&style=flat-square)](https://github.com/axios/axios/actions/workflows/ci.yml) +[![Gitpod Ready-to-Code](https://img.shields.io/badge/Gitpod-Ready--to--Code-blue?logo=gitpod&style=flat-square)](https://gitpod.io/#https://github.com/axios/axios) +[![install size](https://img.shields.io/badge/dynamic/json?url=https://packagephobia.com/v2/api.json?p=axios&query=$.install.pretty&label=install%20size&style=flat-square)](https://packagephobia.now.sh/result?p=axios) +[![npm bundle size](https://img.shields.io/bundlephobia/minzip/axios?style=flat-square)](https://bundlephobia.com/package/axios@latest) +[![npm downloads](https://img.shields.io/npm/dm/axios.svg?style=flat-square)](https://npm-stat.com/charts.html?package=axios) +[![gitter chat](https://img.shields.io/gitter/room/mzabriskie/axios.svg?style=flat-square)](https://gitter.im/mzabriskie/axios) +[![code helpers](https://www.codetriage.com/axios/axios/badges/users.svg)](https://www.codetriage.com/axios/axios) +[![Contributors](https://img.shields.io/github/contributors/axios/axios.svg?style=flat-square)](CONTRIBUTORS.md) +[![Agent Friendly](https://agentfriendlycode.com/api/badge/github/axios/axios.svg)](https://agentfriendlycode.com/repo/32) + +
+ +## Table of contents + +- [Features](#features) +- [Browser support](#browser-support) +- [Installing](#installing) + - [Package manager](#package-manager) + - [CDN](#cdn) +- [Example](#example) +- [Axios API](#axios-api) +- [Request method aliases](#request-method-aliases) +- [Concurrency](#concurrency-deprecated) +- [Creating an instance](#creating-an-instance) +- [Instance methods](#instance-methods) +- [Request config](#request-config) +- [Response schema](#response-schema) +- [Config defaults](#config-defaults) + - [Global axios defaults](#global-axios-defaults) + - [Custom instance defaults](#custom-instance-defaults) + - [Config order of precedence](#config-order-of-precedence) +- [Interceptors](#interceptors) + - [Multiple interceptors](#multiple-interceptors) +- [Handling errors](#handling-errors) +- [Handling timeouts](#handling-timeouts) +- [Cancellation](#cancellation) + - [AbortController](#abortcontroller) + - [CancelToken](#canceltoken-deprecated) +- [Using application/x-www-form-urlencoded format](#using-applicationx-www-form-urlencoded-format) + - [URLSearchParams](#urlsearchparams) + - [Query string](#query-string-older-browsers) + - [Automatic serialization](#automatic-serialization-to-urlsearchparams) +- [Using multipart/form-data format](#using-multipartform-data-format) + - [FormData](#formdata) + - [Automatic serialization](#automatic-serialization-to-formdata) +- [Posting files](#posting-files) +- [HTML form posting](#html-form-posting-browser) +- [Progress capturing](#progress-capturing) +- [Rate limiting](#rate-limiting) +- [AxiosHeaders](#axiosheaders) +- [Fetch adapter](#fetch-adapter) + - [Custom fetch](#custom-fetch) + - [Using with Tauri](#using-with-tauri) + - [Using with SvelteKit](#using-with-sveltekit) +- [HTTP/2 support](#http2-support) +- [Semver](#semver) +- [Promises](#promises) +- [TypeScript](#typescript) +- [Contributing](#contributing) + - [Local setup](#local-setup) +- [Resources](#resources) +- [Credits](#credits) +- [License](#license) + +## Features + +- Make [XMLHttpRequests](https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest) from the browser. +- Make [http](https://nodejs.org/api/http.html) requests from Node.js. +- Use the [Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise) API for asynchronous request handling. +- Intercept requests and responses to add custom logic or transform data. +- Transform request and response data. +- Cancel requests with built-in cancellation APIs. +- Serialize and parse [JSON](https://www.json.org/json-en.html) data. +- Serialize data objects to `multipart/form-data` or `application/x-www-form-urlencoded`. +- Add client-side protection against [Cross-Site Request Forgery](https://en.wikipedia.org/wiki/Cross-site_request_forgery). + +## Browser support + +| Chrome | Firefox | Safari | Opera | Edge | +| :------------------------------------------------------------------------------------------------------------: | :---------------------------------------------------------------------------------------------------------------: | :------------------------------------------------------------------------------------------------------------: | :---------------------------------------------------------------------------------------------------------: | :------------------------------------------------------------------------------------------------------: | +| ![Chrome browser logo](https://raw.githubusercontent.com/alrra/browser-logos/main/src/chrome/chrome_48x48.png) | ![Firefox browser logo](https://raw.githubusercontent.com/alrra/browser-logos/main/src/firefox/firefox_48x48.png) | ![Safari browser logo](https://raw.githubusercontent.com/alrra/browser-logos/main/src/safari/safari_48x48.png) | ![Opera browser logo](https://raw.githubusercontent.com/alrra/browser-logos/main/src/opera/opera_48x48.png) | ![Edge browser logo](https://raw.githubusercontent.com/alrra/browser-logos/main/src/edge/edge_48x48.png) | +| Latest ✔ | Latest ✔ | Latest ✔ | Latest ✔ | Latest ✔ | + +[![Browser Matrix](https://saucelabs.com/open_sauce/build_matrix/axios.svg)](https://saucelabs.com/u/axios) + +## Installing + +### Package manager + +Using npm: + +```bash +$ npm install axios +``` + +Using yarn: + +```bash +$ yarn add axios +``` + +Using pnpm: + +```bash +$ pnpm add axios +``` + +Using bun: + +```bash +$ bun add axios +``` + +Using Deno: + +```bash +$ deno add axios +``` + +Once the package is installed, import it with `import` or `require`: + +```js +import axios, { isCancel, AxiosError } from 'axios'; +``` + +You can also use the default export, since the named export is just a re-export from the Axios factory: + +```js +import axios from 'axios'; + +console.log(axios.isCancel('something')); +``` + +If you use `require` for importing, **only the default export is available**: + +```js +const axios = require('axios'); + +console.log(axios.isCancel('something')); +``` + +Some bundlers and ES6 linters need this form: + +```js +import { default as axios } from 'axios'; +``` + +In custom or legacy environments, you can import the bundle directly: + +```js +const axios = require('axios/dist/browser/axios.cjs'); // browser commonJS bundle (ES2017) +// const axios = require('axios/dist/node/axios.cjs'); // node commonJS bundle (ES2017) +``` + +### CDN + +Using jsDelivr CDN (ES5 UMD browser module): + +```html + +``` + +Using unpkg CDN: + +```html + +``` + +## Example + +```js +import axios from 'axios'; +//const axios = require('axios'); // legacy way + +try { + const response = await axios.get('/user?ID=12345'); + console.log(response); +} catch (error) { + console.error(error); +} + +// Optionally the request above could also be done as +axios + .get('/user', { + params: { + ID: 12345, + }, + timeout: 5000, // 5 seconds. See "Handling Timeouts" below for matching error handling + }) + .then(function (response) { + console.log(response); + }) + .catch(function (error) { + console.log(error); + }) + .finally(function () { + // always executed + }); + +// Want to use async/await? Add the `async` keyword to your outer function/method. +async function getUser() { + try { + // Example: GET request with query parameters + const response = await axios.get('/user', { + params: { + ID: 12345, + }, + }); + + // Using the `params` option improves readability and automatically formats query strings + + console.log(response); + } catch (error) { + console.error(error); + } +} +``` + +> Note: Set a `timeout` in production. Without one, a stalled request can hang +> indefinitely. See [Handling Timeouts](#handling-timeouts) for the matching error handling. + +> Note: `async/await` is part of ECMAScript 2017 and is not supported in Internet +> Explorer and older browsers, so use with caution. + +Performing a `POST` request + +```js +const response = await axios.post('/user', { + firstName: 'Fred', + lastName: 'Flintstone', +}); +console.log(response); +``` + +Performing multiple concurrent requests + +```js +function getUserAccount() { + return axios.get('/user/12345'); +} + +function getUserPermissions() { + return axios.get('/user/12345/permissions'); +} + +Promise.all([getUserAccount(), getUserPermissions()]).then(function (results) { + const acct = results[0]; + const perm = results[1]; +}); +``` + +## axios API + +Requests can be made by passing the relevant config to `axios`. + +##### axios(config) + +```js +// Send a POST request +axios({ + method: 'post', + url: '/user/12345', + data: { + firstName: 'Fred', + lastName: 'Flintstone', + }, +}); +``` + +```js +// GET request for remote image in node.js +import fs from 'fs'; +const response = await axios({ + method: 'get', + url: 'https://bit.ly/2mTM3nY', + responseType: 'stream', +}); +response.data.pipe(fs.createWriteStream('ada_lovelace.jpg')); +``` + +##### axios(url[, config]) + +```js +// Send a GET request (default method) +axios('/user/12345'); +``` + +### Request method aliases + +For convenience, aliases have been provided for all common request methods. + +##### axios.request(config) + +##### axios.get(url[, config]) + +##### axios.delete(url[, config]) + +##### axios.head(url[, config]) + +##### axios.options(url[, config]) + +##### axios.post(url[, data[, config]]) + +##### axios.put(url[, data[, config]]) + +##### axios.patch(url[, data[, config]]) + +###### Note + +When using the alias methods `url`, `method`, and `data` properties don't need to be specified in config. + +### Concurrency (deprecated) + +Use `Promise.all` instead of these helpers. + +Helper functions for dealing with concurrent requests. + +axios.all(iterable) +axios.spread(callback) + +### Creating an instance + +You can create a new instance of axios with a custom config. + +##### axios.create([config]) + +```js +const instance = axios.create({ + baseURL: 'https://some-domain.com/api/', + timeout: 1000, + headers: { 'X-Custom-Header': 'foobar' }, +}); +``` + +### Instance methods + +The following instance methods are available. Axios merges the specified config with the instance config. + +##### axios#request(config) + +##### axios#get(url[, config]) + +##### axios#delete(url[, config]) + +##### axios#head(url[, config]) + +##### axios#options(url[, config]) + +##### axios#post(url[, data[, config]]) + +##### axios#put(url[, data[, config]]) + +##### axios#patch(url[, data[, config]]) + +##### axios#getUri([config]) + +## Request config + +### Security notice: decompression-bomb protection is opt-in + +By default `maxContentLength` and `maxBodyLength` are `-1` (unlimited). A malicious or compromised server can return a tiny gzip/deflate/brotli/zstd body that expands to gigabytes and exhaust the Node.js process. + +If you call servers you do not fully trust, **set a cap**: + +```js +axios.defaults.maxContentLength = 10 * 1024 * 1024; // 10 MB +axios.defaults.maxBodyLength = 10 * 1024 * 1024; +``` + +See the [security guide](https://axios.rest/pages/misc/security.html) for details. + +These config options are available for requests. Only `url` is required. Requests default to `GET` when `method` is not set. + +```js +{ + // `url` is the server URL for the request + url: '/user', + + // `method` is the request method to be used when making the request + method: 'get', // default + + // Axios prepends `baseURL` to `url` unless `url` is absolute and `allowAbsoluteUrls` is set to true. + // It can be convenient to set `baseURL` for an instance of axios to pass relative URLs + // to the methods of that instance. + // `baseURL` is not a security boundary. If `url` is attacker-controlled, validate it + // before passing it to axios. Relative URLs can contain `..` segments that resolve + // outside an intended path prefix after the final URL is parsed. + // HTTP(S) URLs must include `//` after the protocol. Values such as + // `https:example.com` and `https:/example.com` are rejected with ERR_INVALID_URL. + baseURL: 'https://some-domain.com/api/', + + // `allowAbsoluteUrls` determines whether or not absolute URLs will override a configured `baseUrl`. + // When set to true (default), absolute values for `url` will override `baseUrl`. + // When set to false, absolute values for `url` will always be prepended by `baseUrl`. + allowAbsoluteUrls: true, + + // `transformRequest` allows changes to the request data before it is sent to the server + // It runs for every request, whatever the request method + // The last function in the array must return a string or an instance of Buffer, ArrayBuffer, + // FormData, Stream, Blob or File + // You may modify the headers object. + transformRequest: [function (data, headers) { + // Do whatever you want to transform the data + + return data; + }], + + // `transformResponse` allows changes to the response data to be made before + // it is passed to then/catch + transformResponse: [function (data) { + // Do whatever you want to transform the data + + return data; + }], + + // `parseReviver` is an optional function passed as the + // second argument (reviver) to JSON.parse() + parseReviver: function (key, value, context) { + // In modern environments, context.source provides the raw JSON string + // allowing for precision-safe parsing of BigInt + if (typeof value === 'number' && context?.source) { + const isInteger = Number.isInteger(value); + const isUnsafe = !Number.isSafeInteger(value); + const isValidIntegerString = /^-?\d+$/.test(context.source); + + if (isInteger && isUnsafe && isValidIntegerString) { + try { + return BigInt(context.source); + } catch { + // Fallback: return original value if parsing fails + } + } + } + return value; + }, + + // `headers` are custom headers to be sent + headers: {'X-Requested-With': 'XMLHttpRequest'}, + + // `params` are the URL parameters to be sent with the request + // Must be a plain object or a URLSearchParams object + params: { + ID: 12345 + }, + + // `paramsSerializer` is an optional config that allows you to customize serializing `params`. + paramsSerializer: { + + // Custom encoder function which sends key/value pairs in an iterative fashion. + encode?: (param: string): string => { /* Do custom operations here and return transformed string */ }, + + // Custom serializer function for the entire parameter. Allows the user to mimic pre 1.x behaviour. + serialize?: (params: Record, options?: ParamsSerializerOptions ), + + // Configuration for formatting array indexes in the params. + indexes: false, // Three available options: (1) indexes: null (leads to no brackets), (2) (default) indexes: false (leads to empty brackets), (3) indexes: true (leads to brackets with indexes). + + // Maximum object nesting depth when serializing params. Payloads deeper than this throw an + // AxiosError with code ERR_FORM_DATA_DEPTH_EXCEEDED. Default: 100. Set to Infinity to disable. + maxDepth: 100 + + }, + + // `data` is the data to be sent as the request body + // Only applicable for request methods 'PUT', 'POST', 'DELETE', and 'PATCH' + // `data` is request-specific: axios does not inherit or deep-merge it from defaults. + // To add shared body fields, use a request interceptor or transformRequest. + // When no `transformRequest` is set, it must be of one of the following types: + // - string, plain object, ArrayBuffer, ArrayBufferView, URLSearchParams + // - Browser only: FormData, File, Blob + // - React Native: FormData + // - Node only: Stream, Buffer, FormData (form-data package) + data: { + firstName: 'Fred' + }, + + // `formDataHeaderPolicy` controls how node.js FormData#getHeaders() is copied. + // 'legacy' (default) copies all returned headers for v1 compatibility. + // 'content-only' copies only Content-Type and Content-Length. + formDataHeaderPolicy: 'legacy', + + // syntax alternative to send data into the body + // method post + // only the value is sent, not the key + data: 'Country=Brasil&City=Belo Horizonte', + + // `timeout` specifies the number of milliseconds before the request times out. + // If the request takes longer than `timeout`, Axios aborts it. + timeout: 1000, // default is `0` (no timeout) + + // `withCredentials` indicates whether or not cross-site Access-Control requests + // should be made using credentials + // This only controls whether the browser sends credentials. + // It does not control whether the XSRF header is added. + withCredentials: false, // default + + // `adapter` allows custom handling of requests which makes testing easier. + // Return a promise and supply a valid response (see lib/adapters/README.md) + adapter: function (config) { + /* ... */ + }, + // Also, you can set the name of the built-in adapter, or provide an array with their names + // to choose the first available in the environment + adapter: 'xhr', // 'fetch' | 'http' | ['xhr', 'http', 'fetch'] + + // `auth` indicates that HTTP Basic auth should be used, and supplies credentials. + // This will set an `Authorization` header, overwriting any existing + // `Authorization` custom headers you have set using `headers`. + // If `auth` is omitted, the Node.js HTTP and fetch adapters can read + // HTTP Basic auth credentials from the request URL, for example + // `https://user:pass@example.com`. Axios decodes percent-encoded URL + // credentials, and `auth` takes precedence over URL-embedded credentials. + // The Node.js HTTP adapter preserves Basic auth on same-origin redirects + // and strips it on cross-origin redirects. + // Please note that only HTTP Basic auth is configurable through this parameter. + // For Bearer tokens and such, use `Authorization` custom headers instead. + auth: { + username: 'janedoe', + password: 's00pers3cret' + }, + + // `responseType` indicates the type of data that the server will respond with + // options are: 'arraybuffer', 'document', 'json', 'text', 'stream' + // browser only: 'blob' + responseType: 'json', // not set by default; see `forcedJSONParsing` below + + // `responseEncoding` indicates encoding to use for decoding responses (Node.js only) + // Note: Ignored for `responseType` of 'stream' or client-side requests + // options are: 'ascii', 'ASCII', 'ansi', 'ANSI', 'binary', 'BINARY', 'base64', 'BASE64', 'base64url', + // 'BASE64URL', 'hex', 'HEX', 'latin1', 'LATIN1', 'ucs-2', 'UCS-2', 'ucs2', 'UCS2', 'utf-8', 'UTF-8', + // 'utf8', 'UTF8', 'utf16le', 'UTF16LE' + responseEncoding: 'utf8', // default + + // `xsrfCookieName` is the name of the cookie to use as a value for the xsrf token + xsrfCookieName: 'XSRF-TOKEN', // default + + // `xsrfHeaderName` is the name of the http header that carries the xsrf token value + xsrfHeaderName: 'X-XSRF-TOKEN', // default + + // `withXSRFToken` defines whether to send the XSRF header in browser requests. + // `undefined` (default) - set XSRF header only for the same origin requests + // `true` - always set XSRF header, including for cross-origin requests + // `false` - never set XSRF header + // function - resolve with custom logic; receives the internal config object + withXSRFToken: boolean | undefined | ((config: InternalAxiosRequestConfig) => boolean | undefined), + + // `withXSRFToken` controls whether Axios reads the XSRF cookie and sets the XSRF header. + // - `undefined` (default): the XSRF header is set only for same-origin requests. + // - `true`: attempt to set the XSRF header for all requests (including cross-origin). + // - `false`: never set the XSRF header. + // - function: a callback that receives the request `config` and returns `true`, + // `false`, or `undefined` to decide per-request behavior. + // + // Note about `withCredentials`: `withCredentials` controls whether cross-site + // requests include credentials (cookies and HTTP auth). In older Axios versions, + // setting `withCredentials: true` implicitly caused Axios to set the XSRF header + // for cross-origin requests. Newer Axios separates these concerns: to allow the + // XSRF header to be sent for cross-origin requests you should set both + // `withCredentials: true` and `withXSRFToken: true`. + // + // Example: + // axios.get('/user', { withCredentials: true, withXSRFToken: true }); + + // `onUploadProgress` allows handling of progress events for uploads + // browser & node.js + onUploadProgress: function ({loaded, total, progress, bytes, estimated, rate, upload = true}) { + // Do whatever you want with the Axios progress event + }, + + // `onDownloadProgress` allows handling of progress events for downloads + // browser & node.js + onDownloadProgress: function ({loaded, total, progress, bytes, estimated, rate, download = true}) { + // Do whatever you want with the Axios progress event + }, + + // `maxContentLength` defines the max size of the response content in bytes. + // It is enforced by the Node.js HTTP adapter and the fetch adapter. + maxContentLength: 2000, + + // `maxBodyLength` defines the max size of the request content in bytes. + // It is enforced by the Node.js HTTP adapter and the fetch adapter when the body length can be determined. + maxBodyLength: 2000, + + // `redact` masks matching config keys when AxiosError#toJSON() is called. + // Matching is case-insensitive and recursive. It does not change the request. + redact: ['authorization', 'password'], + + // `validateStatus` defines whether to resolve or reject the promise for a given + // HTTP response status code. If `validateStatus` returns `true` or is set to + // `null`, Axios resolves the promise; otherwise, Axios rejects it. + // Explicit `validateStatus: undefined` resolves every status by default for + // backward compatibility. Set `transitional.validateStatusUndefinedResolves` + // to `false` to make explicit `undefined` behave as if this option was omitted. + validateStatus: function (status) { + return status >= 200 && status < 300; // default + }, + + // `maxRedirects` defines the maximum number of redirects to follow in node.js. + // If set to 0, Axios follows no redirects. + maxRedirects: 21, // default + + // `sensitiveHeaders` (Node only option) lists custom secret-bearing headers + // (such as `X-API-Key`) to remove from cross-origin redirects. Matching is + // case-insensitive. Same-origin redirects keep these headers. If + // `maxRedirects` is 0, this option is not used. + sensitiveHeaders: ['X-API-Key'], + + // `beforeRedirect` defines a function that Axios calls before redirect. + // Use this to adjust the request options upon redirecting, + // to inspect the latest response headers, + // or to cancel the request by throwing an error + // If maxRedirects is set to 0, `beforeRedirect` is not used. + + beforeRedirect: (options, { headers }) => { + if ( + options.hostname === "example.com" && + options.protocol === "https:" + ) { + options.auth = "user:password"; + } + }, + // Security note: + // The `beforeRedirect` hook runs after sensitive headers are stripped during redirects. + // `follow-redirects` removes credentials on protocol downgrades + // (HTTPS to HTTP). Because `beforeRedirect` runs after that step, + // re-injecting credentials without checking the destination can expose + // sensitive data. Only add credentials for trusted HTTPS destinations. + + // `socketPath` defines a UNIX Socket to be used in node.js. + // e.g. '/var/run/docker.sock' to send requests to the docker daemon. + // Only either `socketPath` or `proxy` can be specified. + // If both are specified, `socketPath` is used. + // + // Security: when `socketPath` is set, hostname/port of the URL are ignored, + // which bypasses hostname-based SSRF protections. Never derive `socketPath` + // from untrusted input. Use `allowedSocketPaths` (below) to restrict accepted + // socket paths for defense-in-depth. + socketPath: null, // default + + // `allowedSocketPaths` restricts which `socketPath` values are accepted. + // Accepts a string or array of strings. Entries and the incoming socketPath + // are compared after path.resolve(). A mismatch throws AxiosError with code + // `ERR_BAD_OPTION_VALUE`. When null/undefined, no restriction is applied. + allowedSocketPaths: null, // default + + // `transport` determines the transport method for the request. + // If defined, Axios uses it. Otherwise, if `maxRedirects` is 0, + // Axios uses the default `http` or `https` library, depending on the protocol specified in `protocol`. + // Otherwise, Axios uses the `httpFollow` or `httpsFollow` library, again depending on the protocol, + // which can handle redirects. + transport: undefined, // default + + // `httpAgent` and `httpsAgent` define a custom agent to be used when performing http + // and https requests, respectively, in node.js. This allows options to be added like + // `keepAlive` that are not enabled by default before Node.js v19.0.0. After Node.js + // v19.0.0, you no longer need to customize the agent to enable `keepAlive` because + // `http.globalAgent` has `keepAlive` enabled by default. + httpAgent: new http.Agent({ keepAlive: true }), + httpsAgent: new https.Agent({ keepAlive: true }), + + // `proxy` defines the hostname, port, and protocol of the proxy server. + // You can also define your proxy using the conventional `http_proxy` and + // `https_proxy` environment variables. If you are using environment variables + // for your proxy configuration, you can also define a `no_proxy` environment + // variable as a comma-separated list of domains that should not be proxied. + // Use `false` to disable proxies, ignoring environment variables. + // On Node.js versions with native environment proxy support, axios defers + // environment proxy handling to Node when the selected agent has `proxyEnv` + // enabled, including processes started with `NODE_USE_ENV_PROXY=1`, + // `--use-env-proxy`, or `NODE_OPTIONS=--use-env-proxy`. Custom agents without + // `proxyEnv` continue to use axios environment proxy resolution. Explicit + // `proxy` config is still handled by axios. + // `auth` indicates that HTTP Basic auth should be used to connect to the proxy, and + // supplies credentials. + // For `http://` targets, axios sends the request to the proxy in + // forward-proxy mode and stamps `Proxy-Authorization` onto the request + // headers (overwriting any user-supplied `Proxy-Authorization` header). + // For `https://` targets, axios establishes a CONNECT tunnel through the + // proxy and performs TLS end-to-end with the origin; `Proxy-Authorization` + // is sent on the CONNECT request only, never on the wrapped TLS request, + // so the proxy never sees the URL, headers, or body. Axios forwards + // `httpsAgent` TLS options such as `ca`, `cert`, `key`, and + // `rejectUnauthorized` to the generated tunneling agent, so they still apply + // to the origin TLS connection. + // If you supply an `HttpsProxyAgent`, axios leaves tunneling to that agent. + // If the proxy server uses HTTPS, then you must set the protocol to `https`. + // A user-supplied `Host` header in `headers` is preserved when forwarding + // through a proxy (case-insensitive match on `host`/`Host`/`HOST`); this + // lets you target a virtual host that differs from the request URL, for + // example, hitting `127.0.0.1:4000` while having the proxy treat the + // request as `example.com`. If no `Host` header is supplied, axios + // defaults it to the request URL's `hostname:port` as before. The Host + // header is only set in forward-proxy mode (HTTP targets); for HTTPS + // tunneling the Host header is sent inside the TLS connection, not seen + // by the proxy. + proxy: { + protocol: 'https', + host: '127.0.0.1', + // hostname: '127.0.0.1' // Takes precedence over 'host' if both are defined + port: 9000, + auth: { + username: 'mikeymike', + password: 'rapunz3l' + } + }, + + // `cancelToken` specifies a cancel token that can be used to cancel the request + // (see Cancellation section below for details) + cancelToken: new CancelToken(function (cancel) { + }), + + // an alternative way to cancel Axios requests using AbortController + signal: new AbortController().signal, + + // `decompress` indicates whether or not the response body should be decompressed + // automatically. If set to `true` will also remove the 'content-encoding' header + // from the responses objects of all decompressed responses + // Axios supports gzip, deflate, brotli, and zstd when the current Node.js + // runtime provides the corresponding zlib decompressor. + // - Node only (XHR cannot turn off decompression) + decompress: true, // default + + // `insecureHTTPParser` boolean. + // Indicates where to use an insecure HTTP parser that accepts invalid HTTP headers. + // This may allow interoperability with non-conformant HTTP implementations. + // Using the insecure parser should be avoided. + // see options https://nodejs.org/dist/latest-v12.x/docs/api/http.html#http_http_request_url_options_callback + // see also https://nodejs.org/en/blog/vulnerability/february-2020-security-releases/#strict-http-header-parsing-none + insecureHTTPParser: undefined, // default + + // transitional options for backward compatibility that may be removed in the newer versions + transitional: { + // silent JSON parsing mode + // `true` - ignore JSON parsing errors and set response.data to null if parsing failed (old behaviour) + // `false` - throw SyntaxError if JSON parsing failed + // Important: this option only takes effect when `responseType` is explicitly set to 'json'. + // When `responseType` is omitted (defaults to no value), axios uses `forcedJSONParsing` + // to attempt JSON parsing, but will silently return the raw string on failure regardless + // of this setting. To have invalid JSON throw errors, use: + // { responseType: 'json', transitional: { silentJSONParsing: false } } + silentJSONParsing: true, // default value for the current Axios version + + // try to parse the response string as JSON even if `responseType` is not 'json' + forcedJSONParsing: true, + + // throw ETIMEDOUT error instead of generic ECONNABORTED on request timeouts + clarifyTimeoutError: false, + + // keep explicit `validateStatus: undefined` resolving every response status + // for backward compatibility. Set to false to make explicit undefined behave + // as if validateStatus was omitted. + validateStatusUndefinedResolves: true, + + // advertise `zstd` in the default Accept-Encoding header when the current + // Node.js runtime supports zstd decompression. Axios still decompresses + // zstd responses when support exists and `decompress` is true. + advertiseZstdAcceptEncoding: false, + + // use the legacy interceptor request/response ordering + legacyInterceptorReqResOrdering: true, // default + }, + + env: { + // The FormData class to be used to automatically serialize the payload into a FormData object + FormData: window?.FormData || global?.FormData + }, + + formSerializer: { + visitor: (value, key, path, helpers) => {}; // custom visitor function to serialize form values + dots: boolean; // use dots instead of brackets format + metaTokens: boolean; // keep special endings like {} in parameter key + indexes: boolean; // array indexes format null - no brackets, false - empty brackets, true - brackets with indexes + maxDepth: 100; // maximum object nesting depth; throws AxiosError (ERR_FORM_DATA_DEPTH_EXCEEDED) if exceeded. Set to Infinity to disable. + }, + + // http adapter only (node.js) + maxRate: [ + 100 * 1024, // 100KB/s upload limit, + 100 * 1024 // 100KB/s download limit + ] +} +``` + +For custom secret-bearing headers in Node.js, list them in `sensitiveHeaders` so Axios removes them when following a redirect to another origin: + +```js +axios.get('https://api.example.com/users', { + headers: { 'X-API-Key': 'secret' }, + sensitiveHeaders: ['X-API-Key'], +}); +``` + +### Strict RFC 3986 percent-encoding for query params + +By default, axios decodes `%3A`, `%24`, `%2C` and `%20` back to `:`, `$`, `,` and `+` for readability (the `+` follows the `application/x-www-form-urlencoded` convention for spaces in query strings). These characters are valid in a query component under [RFC 3986](https://datatracker.ietf.org/doc/html/rfc3986#section-3.4), so the default output is correct, but some backends require strict percent-encoding and reject the readable form. + +Override the default encoder via `paramsSerializer.encode`: + +```js +// Per-request: emit strict RFC 3986 percent-encoding for query values +axios.get('/foo', { + params: { filter: JSON.stringify({ startedAt: '2026-01-23' }) }, + paramsSerializer: { encode: encodeURIComponent }, +}); + +// Or set it on the instance defaults +const client = axios.create({ + paramsSerializer: { encode: encodeURIComponent }, +}); +``` + +## HTTP/2 support + +Axios has experimental HTTP/2 support in the Node.js HTTP adapter. + +Support depends on the runtime environment and Node.js version. Redirects and some adapter behavior may differ from HTTP/1.1. + +Options like `httpVersion` and `http2Options` are adapter-specific and may not work the same way in every environment. + +If you need HTTP/2, check runtime support or use a custom adapter. + +## Response schema + +The response to a request contains the following information. + +```js +{ + // `data` is the response that was provided by the server + data: {}, + + // `status` is the HTTP status code from the server response + status: 200, + + // `statusText` is the HTTP status message from the server response + statusText: 'OK', + + // `headers` the HTTP headers that the server responded with + // All header names are lowercase and can be accessed using the bracket notation. + // Example: `response.headers['content-type']` + headers: {}, + + // `config` is the config that was provided to `axios` for the request + config: {}, + + // `request` is the request that generated this response + // It is the last ClientRequest instance in node.js (in redirects) + // and an XMLHttpRequest instance in the browser + request: {} +} +``` + +When using `then`, you receive the response like this: + +```js +const response = await axios.get('/user/12345'); +console.log(response.data); +console.log(response.status); +console.log(response.statusText); +console.log(response.headers); +console.log(response.config); +``` + +When using `catch`, or passing a [rejection callback](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise/then) as the second parameter of `then`, read the response from the `error` object. See [Handling errors](#handling-errors). + +## Config defaults + +Config defaults apply to every request. + +### Global axios defaults + +```js +axios.defaults.baseURL = 'https://api.example.com'; + +// Important: If you use axios with multiple domains, Axios sends AUTH_TOKEN to all of them. +// See below for an example using Custom instance defaults instead. +axios.defaults.headers.common['Authorization'] = AUTH_TOKEN; + +axios.defaults.headers.post['Content-Type'] = 'application/x-www-form-urlencoded'; +``` + +### Custom instance defaults + +```js +// Set config defaults when creating the instance +const instance = axios.create({ + baseURL: 'https://api.example.com', +}); + +// Alter defaults after instance has been created +instance.defaults.headers.common['Authorization'] = AUTH_TOKEN; +``` + +### Config order of precedence + +Axios merges config in this order: library defaults from [lib/defaults/index.js](https://github.com/axios/axios/blob/main/lib/defaults/index.js#L49), the instance `defaults` property, and the request `config` argument. Later values take precedence over earlier ones. + +Some options are request-specific and are only taken from the request `config`. `data` is one of those options: axios does not inherit or deep-merge request bodies from global or instance defaults. If every request needs shared body fields, add them with a request interceptor or `transformRequest`, and scope that logic carefully so sensitive values are not sent to the wrong endpoint. + +```js +// Create an instance using the config defaults provided by the library +// At this point the timeout config value is `0` as is the default for the library +const instance = axios.create(); + +// Override timeout default for the library +// Now all requests using this instance will wait 2.5 seconds before timing out +instance.defaults.timeout = 2500; + +// Override timeout for this request as it's known to take a long time +instance.get('/longRequest', { + timeout: 5000, +}); +``` + +## Interceptors + +You can intercept requests or responses before methods like `.get()` or `.post()` +resolve their promises (before code inside `then` or `catch`, or after `await`) + +```js +const instance = axios.create(); + +// Add a request interceptor +instance.interceptors.request.use( + function (config) { + // Do something before the request is sent + return config; + }, + function (error) { + // Do something with the request error + return Promise.reject(error); + } +); + +// Add a response interceptor +instance.interceptors.response.use( + function (response) { + // Any status code that lies within the range of 2xx causes this function to trigger + // Do something with response data + return response; + }, + function (error) { + // Any status codes that fall outside the range of 2xx cause this function to trigger + // Do something with response error + return Promise.reject(error); + } +); +``` + +If you need to remove an interceptor later you can. + +```js +const instance = axios.create(); +const myInterceptor = instance.interceptors.request.use(function () { + /*...*/ +}); +instance.interceptors.request.eject(myInterceptor); +``` + +You can also clear all interceptors for requests or responses. + +```js +const instance = axios.create(); +instance.interceptors.request.use(function () { + /*...*/ +}); +instance.interceptors.request.clear(); // Removes interceptors from requests +instance.interceptors.response.use(function () { + /*...*/ +}); +instance.interceptors.response.clear(); // Removes interceptors from responses +``` + +You can add interceptors to a custom instance of axios. + +```js +const instance = axios.create(); +instance.interceptors.request.use(function () { + /*...*/ +}); +``` + +When you add request interceptors, they are presumed to be asynchronous by default. This can cause a delay +in the execution of your axios request when the main thread is blocked (a promise is created under the hood for +the interceptor and your request gets put at the bottom of the call stack). If your request interceptors are synchronous you can add a flag +to the options object that will tell axios to run the code synchronously and avoid any delays in request execution. + +```js +axios.interceptors.request.use( + function (config) { + config.headers.test = 'I am only a header!'; + return config; + }, + null, + { synchronous: true } +); +``` + +If a synchronous request interceptor throws, Axios calls that interceptor's paired rejection handler and stops running the remaining request interceptors. A rejection handler that returns normally, including one that returns `undefined` or a fulfilled Promise, treats the error as handled: Axios dispatches the request with the last valid config, and ignores the handler's return value. To block dispatch, omit the rejection handler or throw/return a rejected Promise from it. The final error then continues through response rejection interceptors. + +Use a rejected Promise when validation must prevent the request: + +```js +axios.interceptors.request.use( + function validate(config) { + if (!config.headers.has('Authorization')) { + throw new Error('Authorization is required'); + } + return config; + }, + function rejectInvalidRequest(error) { + return Promise.reject(error); + }, + { synchronous: true } +); +``` + +A logging-only rejection handler can return normally to preserve the existing request-continuation behavior: + +```js +axios.interceptors.request.use( + function prepare(config) { + throw new Error('Optional preparation failed'); + }, + function logPreparationFailure(error) { + console.warn(error); + // Returning normally dispatches with the last valid config. + }, + { synchronous: true } +); +``` + +If you want to execute a particular interceptor based on a runtime check, +you can add a `runWhen` function to the options object. The request interceptor will not run **if and only if** the return +of `runWhen` is `false`. Axios calls the function with the config +object (don't forget that you can bind your own arguments to it as well.) This can be handy when you have an +asynchronous request interceptor that only needs to run at certain times. + +```js +function onGetCall(config) { + return config.method === 'get'; +} +axios.interceptors.request.use( + function (config) { + config.headers.test = 'special get headers'; + return config; + }, + null, + { runWhen: onGetCall } +); +``` + +> Note: The options parameter (with `synchronous` and `runWhen` properties) is only supported for request interceptors at the moment. + +### Interceptor execution order + +Request and response interceptors use different execution orders. + +Request interceptors run in reverse order (LIFO: last in, first out). The last interceptor added runs first. + +Response interceptors run in the order they were added (FIFO: first in, first out). The first interceptor added runs first. + +Example: + +```js +const instance = axios.create(); + +const interceptor = (id) => (base) => { + console.log(id); + return base; +}; + +instance.interceptors.request.use(interceptor('Request Interceptor 1')); +instance.interceptors.request.use(interceptor('Request Interceptor 2')); +instance.interceptors.request.use(interceptor('Request Interceptor 3')); +instance.interceptors.response.use(interceptor('Response Interceptor 1')); +instance.interceptors.response.use(interceptor('Response Interceptor 2')); +instance.interceptors.response.use(interceptor('Response Interceptor 3')); + +// Console output: +// Request Interceptor 3 +// Request Interceptor 2 +// Request Interceptor 1 +// [HTTP request is made] +// Response Interceptor 1 +// Response Interceptor 2 +// Response Interceptor 3 +``` + +### Multiple interceptors + +When a response is fulfilled and multiple response interceptors are registered: + +- Each interceptor runs in registration order. +- Each interceptor receives the result from the previous interceptor. +- The chain returns the result from the last interceptor. +- If a fulfillment interceptor throws, Axios skips the next fulfillment interceptor and calls the next rejection interceptor. +- After the error is caught, later fulfillment interceptors run again, just like in a promise chain. + +Read [the interceptor tests](./tests/browser/interceptors.browser.test.js) to see all this in code. + +## Error types + +Axios error messages include details that can help you debug the request. + +Axios errors use this structure: +| Property | Definition | +| -------- | ---------- | +| message | A quick summary of the error message and the status it failed with. | +| name | The error name: usually `AxiosError`, `CanceledError` for cancellations, or the original name of a wrapped error. Use `axios.isAxiosError(error)` to identify Axios errors and `axios.isCancel(error)` to detect cancellations. | +| stack | Stack trace for the error. | +| config | An axios config object with specific instance configurations defined by the user from when the request was made | +| code | Axios error code. The table below lists internal Axios error codes. | +| status | HTTP response status code. See [here](https://en.wikipedia.org/wiki/List_of_HTTP_status_codes) for common HTTP response status code meanings. + +These are the internal Axios error codes: + +| Code | Definition | +| ------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| ERR_BAD_OPTION_VALUE | Invalid value provided in axios configuration. | +| ERR_BAD_OPTION | Invalid option provided in axios configuration. | +| ERR_NOT_SUPPORT | Feature or method not supported in the current axios environment. | +| ERR_DEPRECATED | Deprecated feature or method used in axios. | +| ERR_INVALID_URL | Invalid URL provided for axios request. | +| ECONNABORTED | Typically indicates that the request has been timed out (unless `transitional.clarifyTimeoutError` is set) or aborted by the browser or its plugin. | +| ERR_CANCELED | The user explicitly canceled the request with an AbortSignal or CancelToken. | +| ETIMEDOUT | Request timed out after exceeding the configured Axios timeout. Set `transitional.clarifyTimeoutError` to `true`; otherwise Axios throws a generic `ECONNABORTED` error. | +| ECONNREFUSED | The server refused the connection. Set by the Node.js `http` adapter, with the original system error on `error.cause`; the `xhr` and `fetch` adapters report `ERR_NETWORK` instead. | +| ERR_NETWORK | Network-related issue. In the browser, this error can also be caused by a [CORS](https://developer.mozilla.org/ru/docs/Web/HTTP/Guides/CORS) or [Mixed Content](https://developer.mozilla.org/en-US/docs/Web/Security/Mixed_content) policy violation. The browser does not allow the JS code to clarify the real reason for the error caused by security issues, so please check the console. | +| ERR_FR_TOO_MANY_REDIRECTS | Request exceeded the configured maximum number of redirects. | +| ERR_BAD_RESPONSE | Response cannot be parsed properly or is in an unexpected format. Usually related to a response with `5xx` status code. | +| ERR_BAD_REQUEST | The request has an unexpected format or is missing required parameters. Usually related to a response with `4xx` status code. | +| ERR_FORM_DATA_DEPTH_EXCEEDED | An object exceeds the configured `maxDepth` while serializing `params` or form data. Default limit is 100 levels. Parsing FormData into JSON, by `axios.formToJSON()` or when a spec-compliant `FormData` (one with an `entries()` method) or HTML form is sent with `Content-Type: application/json`, has a fixed limit of 100 levels that `maxDepth` does not change. | + +## Handling errors + +By default, Axios rejects responses with status codes outside the 2xx range. + +```js +axios.get('/user/12345').catch(function (error) { + if (error.response) { + // The request was made and the server responded with a status code + // that falls out of the range of 2xx + console.log(error.response.data); + console.log(error.response.status); + console.log(error.response.headers); + } else if (error.request) { + // The request was made but no response was received + // `error.request` is an instance of XMLHttpRequest in the browser and an instance of + // http.ClientRequest in node.js + console.log(error.request); + } else { + // Something happened in setting up the request that triggered an Error + console.log('Error', error.message); + } + console.log(error.config); +}); +``` + +Axios rejects an `http:` or `https:` request `url` or `baseURL` that omits `//` after the protocol. For example, `https:example.com` and `https:/example.com` reject with `AxiosError` code `ERR_INVALID_URL` instead of being silently normalized. Pass a well-formed URL such as `https://example.com`. + +The error identifies the malformed URL, for example `Invalid URL "https:example.com": missing "//" after protocol`. To keep logs useful without leaking secrets, Axios reports the control-character-normalized URL with credentials, query parameter values, and fragment contents redacted; the scheme, host, path, and query parameter names remain visible. + +Use `validateStatus` to override the default condition (`status >= 200 && status < 300`) and choose which HTTP status codes should reject. + +```js +axios.get('/user/12345', { + validateStatus: function (status) { + return status < 500; // Resolve only if the status code is less than 500 + }, +}); +``` + +By default, explicit `validateStatus: undefined` keeps legacy behavior and resolves every response status because `transitional.validateStatusUndefinedResolves` defaults to `true`. Set it to `false` to make explicit `validateStatus: undefined` behave like the option was omitted, so Axios uses the configured/default validator and rejects non-2xx responses by default. + +`validateStatus: null` still accepts every response status. If you disable the transitional behavior and intentionally want all statuses to resolve, use `null` or `() => true`. + +```js +axios.get('/user/12345', { + validateStatus: undefined, + transitional: { + validateStatusUndefinedResolves: false, + }, +}); +``` + +Use `toJSON` to get more information about the HTTP error. + +```js +axios.get('/user/12345').catch(function (error) { + console.log(error.toJSON()); +}); +``` + +To avoid logging secrets from `error.config`, pass a `redact` array in the request config. Matching config keys are masked case-insensitively at any depth when `AxiosError#toJSON()` is called. Objects other than plain objects and `AxiosHeaders` that have a `toJSON()` method, such as `URL` objects, are serialized as-is and not scanned, and credentials inside URL strings are not matched. List the parent key, such as `auth` or `proxy`, to mask the whole value. + +```js +axios + .get('/user/12345', { + headers: { Authorization: 'Bearer token' }, + redact: ['authorization'], + }) + .catch(function (error) { + console.log(error.toJSON().config.headers.Authorization); // [REDACTED ****] + }); +``` + +## Handling timeouts + +```js +async function fetchWithTimeout() { + try { + const response = await axios.get('https://example.com/data', { + timeout: 5000, // 5 seconds + transitional: { + // set to true if you prefer ETIMEDOUT over ECONNABORTED + clarifyTimeoutError: false, + }, + }); + + console.log('Response:', response.data); + } catch (error) { + if (axios.isAxiosError(error)) { + if (error.code === 'ECONNABORTED' || error.code === 'ETIMEDOUT') { + console.error('Request timed out. Please try again.'); + return; + } + + console.error('Axios error:', error.message); + return; + } + + console.error('Unexpected error:', error); + } +} +``` + +## Cancellation + +### AbortController + +Since `v0.22.0`, Axios supports AbortController: + +```js +const controller = new AbortController(); + +axios + .get('/foo/bar', { + signal: controller.signal, + }) + .then(function (response) { + //... + }); +// cancel the request +controller.abort(); +``` + +### CancelToken (deprecated) + +You can also cancel a request using a _CancelToken_. + +> The axios cancel token API is based on the withdrawn [cancellable promises proposal](https://github.com/tc39/proposal-cancelable-promises). + +> This API is deprecated since v0.22.0 and should not be used in new projects. + +Create a cancel token with the `CancelToken.source` factory: + +```js +const CancelToken = axios.CancelToken; +const source = CancelToken.source(); + +axios + .get('/user/12345', { + cancelToken: source.token, + }) + .catch(function (thrown) { + if (axios.isCancel(thrown)) { + console.log('Request canceled', thrown.message); + } else { + // handle error + } + }); + +axios.post( + '/user/12345', + { + name: 'new name', + }, + { + cancelToken: source.token, + } +); + +// cancel the request (the message parameter is optional) +source.cancel('Operation canceled by the user.'); +``` + +You can also pass an executor function to the `CancelToken` constructor: + +```js +const CancelToken = axios.CancelToken; +let cancel; + +axios.get('/user/12345', { + cancelToken: new CancelToken(function executor(c) { + // An executor function receives a cancel function as a parameter + cancel = c; + }), +}); + +// cancel the request +cancel(); +``` + +`CancelToken` also exposes low-level helpers for legacy integrations: + +```js +const source = axios.CancelToken.source(); + +const listener = (cancel) => { + console.log(cancel.message); +}; + +source.token.subscribe(listener); + +const signal = source.token.toAbortSignal(); +// Pass `signal` to APIs that accept AbortSignal. + +source.cancel('Operation canceled by the user.'); +source.token.unsubscribe(listener); +``` + +Canceled requests reject with `axios.CanceledError`. The legacy `axios.Cancel` export is an alias of `axios.CanceledError`, and cancellation errors include `__CANCEL__` for `axios.isCancel` compatibility. + +> Note: You can cancel several requests with the same cancel token or abort controller. +> If a cancellation token is already cancelled when an Axios request starts, Axios cancels the request immediately without making a real request. + +> During the transition period, you can use both cancellation APIs, even for the same request: + +```js +const controller = new AbortController(); +const source = axios.CancelToken.source(); + +axios.get('/user/12345', { + cancelToken: source.token, + signal: controller.signal, +}); + +controller.abort(); +source.cancel('Operation canceled by the user.'); +``` + +## Using `application/x-www-form-urlencoded` format + +### URLSearchParams + +By default, axios serializes JavaScript objects to `JSON`. To send data as [`application/x-www-form-urlencoded`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/POST), use the [`URLSearchParams`](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) API. It works in most browsers and in [Node](https://nodejs.org/api/url.html#url_class_urlsearchparams) v10 and later. + +```js +const params = new URLSearchParams({ foo: 'bar' }); +params.append('extraparam', 'value'); +axios.post('/foo', params); +``` + +### Query string (older browsers) + +For very old browsers, use a [polyfill](https://github.com/WebReflection/url-search-params) and make sure it patches the global environment. + +Alternatively, you can encode data using the [`qs`](https://github.com/ljharb/qs) library: + +```js +const qs = require('qs'); +axios.post('/foo', qs.stringify({ bar: 123 })); +``` + +With ES modules: + +```js +import qs from 'qs'; +const data = { bar: 123 }; +const options = { + method: 'POST', + headers: { 'content-type': 'application/x-www-form-urlencoded' }, + data: qs.stringify(data), + url, +}; +axios(options); +``` + +### Older Node.js versions + +For older Node.js engines, use the [`querystring`](https://nodejs.org/api/querystring.html) module: + +```js +const querystring = require('querystring'); +axios.post('https://something.com/', querystring.stringify({ foo: 'bar' })); +``` + +You can also use the [`qs`](https://github.com/ljharb/qs) library. + +> Note: The `qs` library is preferable if you need to stringify nested objects, as the `querystring` method has [known issues](https://github.com/nodejs/node-v0.x-archive/issues/1665) with that use case. + +### Automatic serialization to URLSearchParams + +Axios automatically serializes the data object to urlencoded format if the content-type header is set to "application/x-www-form-urlencoded". + +```js +const data = { + x: 1, + arr: [1, 2, 3], + arr2: [1, [2], 3], + users: [ + { name: 'Peter', surname: 'Griffin' }, + { name: 'Thomas', surname: 'Anderson' }, + ], +}; + +await axios.postForm('https://postman-echo.com/post', data, { + headers: { 'content-type': 'application/x-www-form-urlencoded' }, +}); +``` + +The server receives these fields: + +```js + { + x: '1', + 'arr[]': [ '1', '2', '3' ], + 'arr2[0]': '1', + 'arr2[1][0]': '2', + 'arr2[2]': '3', + 'arr3[]': [ '1', '2', '3' ], + 'users[0][name]': 'Peter', + 'users[0][surname]': 'griffin', + 'users[1][name]': 'Thomas', + 'users[1][surname]': 'Anderson' + } +``` + +If your backend body parser, such as `body-parser` for `express.js`, supports nested object decoding, the server receives the same object structure: + +```js +const app = express(); + +app.use(bodyParser.urlencoded({ extended: true })); // support encoded bodies + +app.post('/', function (req, res, next) { + // echo body as JSON + res.send(JSON.stringify(req.body)); +}); + +server = app.listen(3000); +``` + +## Using `multipart/form-data` format + +### FormData + +To send data as `multipart/form-data`, pass a FormData instance as the payload. +You do not need to set the `Content-Type` header. Axios detects it from the payload type. +For browser, web worker, and React Native `FormData`, leave `Content-Type` unset so the runtime can add the multipart boundary. + +```js +const formData = new FormData(); +formData.append('foo', 'bar'); + +axios.post('https://httpbin.org/post', formData); +``` + +In node.js, use the [`form-data`](https://github.com/form-data/form-data) library: + +```js +const FormData = require('form-data'); + +const form = new FormData(); +form.append('my_field', 'my value'); +form.append('my_buffer', Buffer.alloc(10)); +form.append('my_file', fs.createReadStream('/foo/bar.jpg')); + +axios.post('https://example.com', form); +``` + +In node.js, when a `FormData` object provides `getHeaders()`, axios copies all returned headers by default for v1 compatibility. If the `FormData` object is custom or not fully trusted, set `formDataHeaderPolicy: 'content-only'` to copy only `Content-Type` and `Content-Length`, and set any other request headers explicitly with the request `headers` config. + +### Automatic serialization to FormData + +Since `v0.27.0`, Axios can serialize an object to FormData if the request `Content-Type` +header is set to `multipart/form-data`. + +This request submits data as FormData in browsers and Node.js: + +```js +import axios from 'axios'; + +axios + .post( + 'https://httpbin.org/post', + { x: 1 }, + { + headers: { + 'Content-Type': 'multipart/form-data', + }, + } + ) + .then(({ data }) => console.log(data)); +``` + +The Node.js build uses the [`form-data`](https://github.com/form-data/form-data) polyfill by default. + +You can override the FormData class with the `env.FormData` config option, but most applications do not need this: + +```js +const axios = require('axios'); +var FormData = require('form-data'); + +axios + .post( + 'https://httpbin.org/post', + { x: 1, buf: Buffer.alloc(10) }, + { + headers: { + 'Content-Type': 'multipart/form-data', + }, + } + ) + .then(({ data }) => console.log(data)); +``` + +The Axios FormData serializer supports these special endings: + +- `{}` - serialize the value with JSON.stringify +- `[]` - unwrap the array-like object as separate fields with the same key + +> Note: Arrays and FileList objects are unwrapped by default. + +FormData serializer supports additional options via `config.formSerializer: object` property to handle rare cases: + +- `visitor: Function` - user-defined visitor function that Axios calls recursively to serialize the data object + to a `FormData` object by following custom rules. + +- `dots: boolean = false` - use dot notation instead of brackets to serialize arrays and objects; + +- `metaTokens: boolean = true` - add the special ending (e.g `user{}: '{"name": "John"}'`) in the FormData key. + A backend body parser can use this meta-information to parse the value as JSON. + +- `indexes: null|false|true = false` - controls how Axios adds indexes to unwrapped keys of `flat` array-like objects. + - `null` - don't add brackets (`arr: 1`, `arr: 2`, `arr: 3`) + - `false`(default) - add empty brackets (`arr[]: 1`, `arr[]: 2`, `arr[]: 3`) + - `true` - add brackets with indexes (`arr[0]: 1`, `arr[1]: 2`, `arr[2]: 3`) +- `maxDepth: number = 100` - maximum object nesting depth the serializer will recurse into. If the + input object exceeds this depth, an `AxiosError` with `code: 'ERR_FORM_DATA_DEPTH_EXCEEDED'` is + thrown instead of overflowing the call stack. This protects server applications from DoS + attacks via deeply nested payloads. Set to `Infinity` to disable the limit and restore pre-fix behaviour. +- `Blob: typeof Blob` - Blob constructor used when converting ArrayBuffer-like values for spec-compliant + `FormData`. Override it only for runtimes that provide a compatible `Blob` constructor under a + different binding. + +```js +// Raise the limit for a schema that genuinely nests deeper than 100 levels: +axios.postForm('/api', data, { formSerializer: { maxDepth: 200 } }); + +// Same protection applies to params serialization: +axios.get('/api', { params: data, paramsSerializer: { maxDepth: 200 } }); +``` + +Given this object: + +```js +const obj = { + x: 1, + arr: [1, 2, 3], + arr2: [1, [2], 3], + users: [ + { name: 'Peter', surname: 'Griffin' }, + { name: 'Thomas', surname: 'Anderson' }, + ], + 'obj2{}': [{ x: 1 }], +}; +``` + +The Axios serializer appends these fields: + +```js +const formData = new FormData(); +formData.append('x', '1'); +formData.append('arr[]', '1'); +formData.append('arr[]', '2'); +formData.append('arr[]', '3'); +formData.append('arr2[0]', '1'); +formData.append('arr2[1][0]', '2'); +formData.append('arr2[2]', '3'); +formData.append('users[0][name]', 'Peter'); +formData.append('users[0][surname]', 'Griffin'); +formData.append('users[1][name]', 'Thomas'); +formData.append('users[1][surname]', 'Anderson'); +formData.append('obj2{}', '[{"x":1}]'); +``` + +### Converting FormData to JSON + +`axios.formToJSON()` converts `FormData` field names that use dot or bracket notation into nested objects and arrays. Only `.`, `[`, and `]` are structural separators. Other characters, including `-`, spaces, `+`, `*`, and `&`, remain part of the literal key. + +```js +const form = new FormData(); +form.append('user-name', 'johndoe'); +form.append('user.name', 'john'); + +console.log(axios.formToJSON(form)); +// { +// 'user-name': 'johndoe', +// user: { name: 'john' } +// } +``` + +`user[name]` also creates `{ user: { name: ... } }`, while `items[]` creates an array. + +Field names are paths, so names that collide are combined rather than kept apart. A repeated name becomes an array: two `account` fields produce `{ account: ['standard', 'admin'] }`. When a name is used both as a plain value and as a parent path, the result depends on field order. `account=standard` followed by `account[role]=admin` produces `{ account: { role: 'admin' } }`, and the plain value is lost. The reverse order produces `{ account: [{ role: 'admin' }, 'standard'] }`. If you validate submitted fields, check the object `formToJSON()` returns, which is also what axios sends when it serializes `FormData` as JSON, rather than the original `FormData` entries. + +Field names can nest at most 100 levels deep. A deeper name throws an `AxiosError` with code `ERR_FORM_DATA_DEPTH_EXCEEDED`, including when axios sends a spec-compliant `FormData` (one with an `entries()` method) or an HTML form as JSON. The limit is fixed, and `formSerializer.maxDepth` and `paramsSerializer.maxDepth` do not change it. + +Axios supports `postForm`, `putForm`, and `patchForm` as shortcuts for the matching HTTP methods with the `Content-Type` header preset to `multipart/form-data`. + +## Posting files + +Submit a single file: + +```js +await axios.postForm('https://httpbin.org/post', { + myVar: 'foo', + file: document.querySelector('#fileInput').files[0], +}); +``` + +or multiple files as `multipart/form-data`: + +```js +await axios.postForm('https://httpbin.org/post', { + 'files[]': document.querySelector('#fileInput').files, +}); +``` + +`FileList` object can be passed directly: + +```js +await axios.postForm('https://httpbin.org/post', document.querySelector('#fileInput').files); +``` + +Axios sends all files with the same field name: `files[]`. + +## HTML form posting (browser) + +Pass an HTML Form element as a payload to submit it as `multipart/form-data` content. + +```js +await axios.postForm('https://httpbin.org/post', document.querySelector('#htmlForm')); +``` + +`FormData` and `HTMLForm` objects can also be posted as `JSON` by explicitly setting the `Content-Type` header to `application/json`: + +```js +await axios.post('https://httpbin.org/post', document.querySelector('#htmlForm'), { + headers: { + 'Content-Type': 'application/json', + }, +}); +``` + +For example, the Form + +```html +
+ + + + + + + + + +
+``` + +submits this JSON object: + +```js +{ + "foo": "1", + "deep": { + "prop": "2" + }, + "deep prop spaced": "3", + "baz": [ + "4", + "5" + ], + "user": { + "age": "value2" + } +} +``` + +Only dot and bracket notation create nested paths when a form is converted to JSON. Spaces and other punctuation remain part of literal field names. + +Sending `Blobs`/`Files` as JSON (`base64`) is not currently supported. + +## Progress capturing + +Axios can capture request upload and download progress in browsers and Node.js. +Progress events are limited to `3` times per second. + +```js +await axios.post(url, data, { + onUploadProgress: function (axiosProgressEvent) { + /*{ + loaded: number; + total?: number; + progress?: number; // in range [0..1] + bytes: number; // how many bytes have been transferred since the last trigger (delta) + estimated?: number; // estimated time in seconds + rate?: number; // upload speed in bytes + upload: true; // upload sign + }*/ + }, + + onDownloadProgress: function (axiosProgressEvent) { + /*{ + loaded: number; + total?: number; + progress?: number; + bytes: number; + estimated?: number; + rate?: number; // download speed in bytes + download: true; // download sign + }*/ + }, +}); +``` + +You can also track stream upload/download progress in node.js: + +```js +const { data } = await axios.post(SERVER_URL, readableStream, { + onUploadProgress: ({ progress }) => { + console.log((progress * 100).toFixed(2)); + }, + + headers: { + 'Content-Length': contentLength, + }, + + maxRedirects: 0, // avoid buffering the entire stream +}); +``` + +> Note: +> Capturing FormData upload progress is not currently supported in node.js environments. + +> Warning: +> Set `maxRedirects: 0` when uploading streams in node.js. +> The follow-redirects package buffers the entire stream in RAM and does not follow the "backpressure" algorithm. + +## Rate limiting + +Download and upload rate limits can only be set for the http adapter (node.js): + +```js +const { data } = await axios.post(LOCAL_SERVER_URL, myBuffer, { + onUploadProgress: ({ progress, rate }) => { + console.log(`Upload [${(progress * 100).toFixed(2)}%]: ${(rate / 1024).toFixed(2)}KB/s`); + }, + + maxRate: [100 * 1024], // 100KB/s limit +}); +``` + +## AxiosHeaders + +Axios includes an `AxiosHeaders` class for working with headers through a Map-like API. +HTTP header names are case-insensitive, but Axios keeps the original header case for style and for servers that incorrectly depend on case. +Directly manipulating the headers object still works, but it is deprecated. + +### Working with headers + +An `AxiosHeaders` instance can contain several internal value types that control setting and merging. +Axios gets the final headers object with string values by calling `toJSON`. + +> Note: By JSON here we mean an object consisting only of string values intended to be sent over the network. + +The header value can be one of the following types: + +- `string` - normal string value sent to the server +- `null` - skip header when rendering to JSON +- `false` - skip header when rendering to JSON. Also indicates that the `set` method must be called with `rewrite` set to `true` + to overwrite this value (Axios uses this internally to allow users to opt out of installing certain headers like `User-Agent` or `Content-Type`) +- `undefined` - value is not set + +> Note: The header value is considered set if it is not equal to undefined. + +The headers object is always initialized inside interceptors and transformers: + +```ts +axios.interceptors.request.use((request: InternalAxiosRequestConfig) => { + request.headers.set('My-header', 'value'); + + request.headers.set({ + 'My-set-header1': 'my-set-value1', + 'My-set-header2': 'my-set-value2', + }); + + request.headers.set('User-Agent', false); // prevent Axios from setting this header later + + request.headers.setContentType('text/plain'); + + request.headers['My-set-header2'] = 'newValue'; // direct access is deprecated + + return request; +}); +``` + +You can iterate over an `AxiosHeaders` instance using a `for...of` statement: + +```js +const headers = new AxiosHeaders({ + foo: '1', + bar: '2', + baz: '3', +}); + +for (const [header, value] of headers) { + console.log(header, value); +} + +// foo 1 +// bar 2 +// baz 3 +``` + +### Preserving a specific header case + +Header names are case-insensitive, but `AxiosHeaders` keeps the case of the first matching key it sees. +If you need a specific case for non-standard case-sensitive servers, define a case preset with `undefined` and then set the value later: + +```js +const api = axios.create(); + +api.defaults.headers.common = { + 'content-type': undefined, + accept: undefined, +}; + +await api.put(url, data, { + headers: { + 'Content-Type': 'application/octet-stream', + Accept: 'application/json', + }, +}); +``` + +You can also compose the same behavior with `AxiosHeaders.concat`: + +```js +const headers = axios.AxiosHeaders.concat( + { 'content-type': undefined }, + { 'Content-Type': 'application/octet-stream' } +); + +await axios.put(url, data, { headers }); +``` + +### new AxiosHeaders(headers?) + +Constructs a new `AxiosHeaders` instance. + +``` +constructor(headers?: RawAxiosHeaders | AxiosHeaders | string); +``` + +If the headers object is a string, Axios parses it as raw HTTP headers. + +```js +const headers = new AxiosHeaders(` +Host: www.bing.com +User-Agent: curl/7.54.0 +Accept: */*`); + +console.log(headers); + +// Object [AxiosHeaders] { +// host: 'www.bing.com', +// 'user-agent': 'curl/7.54.0', +// accept: '*/*' +// } +``` + +### AxiosHeaders#set + +```ts +set(headerName, value: Axios, rewrite?: boolean); +set(headerName, value, rewrite?: (this: AxiosHeaders, value: string, name: string, headers: RawAxiosHeaders) => boolean); +set(headers?: RawAxiosHeaders | AxiosHeaders | string, rewrite?: boolean); +set(headers?: Iterable<[string, AxiosHeaderValue]>, rewrite?: boolean); +``` + +The `rewrite` argument controls the overwriting behavior: + +- `false` - do not overwrite if the header's value is set (is not `undefined`) +- `undefined` (default) - overwrite the header unless its value is set to `false` +- `true` - rewrite anyway + +The option can also accept a user-defined function that determines whether to overwrite the value. + +Empty or whitespace-only header names are ignored. + +Iterable key/value pairs, such as a `Map`, are accepted: + +```js +const headers = new AxiosHeaders(); + +headers.set( + new Map([ + ['X-Trace-Id', 'abc123'], + ['Accept', 'application/json'], + ]) +); +``` + +Returns `this`. + +### AxiosHeaders#get(header) + +``` + get(headerName: string, parser: typeof AxiosHeaders.parseParameters): AxiosHeaderParameters; + get(headerName: string, parser: RegExp): RegExpExecArray | null; + get(headerName: string, matcher?: true | AxiosHeaderParser): AxiosHeaderValue; +``` + +Returns the internal value of the header. It can take an extra argument to parse the header's value with `RegExp.exec`, +matcher function or internal key-value parser. + +```ts +const headers = new AxiosHeaders({ + 'Content-Type': 'multipart/form-data; boundary=Asrf456BGe4h', +}); + +console.log(headers.get('Content-Type')); +// multipart/form-data; boundary=Asrf456BGe4h + +console.log(headers.get('Content-Type', true)); // parse key-value pairs from a string separated with \s,;= delimiters: +// [Object: null prototype] { +// 'multipart/form-data': undefined, +// boundary: 'Asrf456BGe4h' +// } + +const quotedHeaders = new AxiosHeaders({ + 'Content-Type': 'multipart/form-data; boundary="a,b"', +}); + +console.log({ + ...quotedHeaders.get('Content-Type', AxiosHeaders.parseParameters), +}); +// { boundary: 'a,b' } + +console.log( + headers.get('Content-Type', (value, name, headers) => { + return String(value).replace(/a/g, 'ZZZ'); + }) +); +// multipZZZrt/form-dZZZtZZZ; boundZZZry=Asrf456BGe4h + +console.log(headers.get('Content-Type', /boundary=(\w+)/)?.[0]); +// boundary=Asrf456BGe4h +``` + +`AxiosHeaders.parseParameters` is the opt-in parser for normalized HTTP parameter values. It returns a null-prototype map, matches parameter names case-insensitively, removes quoted-string delimiters, decodes escaped quotes and backslashes, preserves commas and semicolons inside quoted values, and removes only HTTP optional whitespace around unquoted values. It omits the unsafe keys `__proto__`, `constructor`, and `prototype`. + +Passing `true` remains the legacy tokenizer and keeps its existing output for backward compatibility. + +Returns the value of the header. + +### AxiosHeaders#has(header, matcher?) + +``` +has(header: string, matcher?: AxiosHeaderMatcher): boolean; +``` + +Returns `true` if the header is set (has no `undefined` value). + +### AxiosHeaders#delete(header, matcher?) + +``` +delete(header: string | string[], matcher?: AxiosHeaderMatcher): boolean; +``` + +Returns `true` if at least one header has been removed. + +### AxiosHeaders#clear(matcher?) + +``` +clear(matcher?: AxiosHeaderMatcher): boolean; +``` + +Removes all headers. +Unlike the `delete` method matcher, this optional matcher matches the header name rather than the value. + +```ts +const headers = new AxiosHeaders({ + foo: '1', + 'x-foo': '2', + 'x-bar': '3', +}); + +console.log(headers.clear(/^x-/)); // true + +console.log(headers.toJSON()); // [Object: null prototype] { foo: '1' } +``` + +Returns `true` if at least one header has been cleared. + +### AxiosHeaders#normalize(format); + +If the headers object was changed directly, it can have duplicates with the same name but in different cases. +This method normalizes the headers object by combining duplicate keys into one. +Axios uses this method internally before calling each request and response transformer, and once more after the transformers run. +Set `format` to true for converting header names to lowercase and capitalizing the initial letters (`cOntEnt-type` => `Content-Type`) + +```js +const headers = new AxiosHeaders({ + foo: '1', +}); + +headers.Foo = '2'; +headers.FOO = '3'; + +console.log(headers.toJSON()); // [Object: null prototype] { foo: '1', Foo: '2', FOO: '3' } +console.log(headers.normalize().toJSON()); // [Object: null prototype] { foo: '3' } +console.log(headers.normalize(true).toJSON()); // [Object: null prototype] { Foo: '3' } +``` + +Returns `this`. + +### AxiosHeaders#concat(...targets) + +``` +concat(...targets: Array): AxiosHeaders; +``` + +Merges the instance with targets into a new `AxiosHeaders` instance. If the target is a string, Axios parses it as raw HTTP headers. + +Returns a new `AxiosHeaders` instance. + +### AxiosHeaders#toJSON(asStrings?) + +``` +toJSON(asStrings: true): Record; +toJSON(asStrings?: false): Record; +``` + +Resolves all internal header values into a new null prototype object. +Set `asStrings` to true to resolve arrays as a string containing all elements, separated by commas. + +### AxiosHeaders#toString() + +``` +toString(): string; +``` + +Returns the headers as a CRLF-free HTTP header block, one `name: value` pair per line. + +### AxiosHeaders.from(thing?) + +``` +from(thing?: AxiosHeaders | RawAxiosHeaders | string): AxiosHeaders; +``` + +Returns a new `AxiosHeaders` instance created from the raw headers passed in, +or returns the given headers object if it's already an `AxiosHeaders` instance. + +### AxiosHeaders.concat(...targets) + +``` +concat(...targets: Array): AxiosHeaders; +``` + +Returns a new `AxiosHeaders` instance created by merging the target objects. + +### Shortcuts + +The following shortcuts are available: + +- `setContentType`, `getContentType`, `hasContentType` + +- `setContentLength`, `getContentLength`, `hasContentLength` + +- `setAccept`, `getAccept`, `hasAccept` + +- `setUserAgent`, `getUserAgent`, `hasUserAgent` + +- `setContentEncoding`, `getContentEncoding`, `hasContentEncoding` + +## Fetch adapter + +Axios introduced the fetch adapter in `v1.7.0`. By default, Axios uses it when the `xhr` and `http` adapters are not available in the build or not supported by the environment. +To use it by default, select it explicitly: + +```js +const { data } = axios.get(url, { + adapter: 'fetch', // by default ['xhr', 'http', 'fetch'] +}); +``` + +You can create a separate instance for this: + +```js +const fetchAxios = axios.create({ + adapter: 'fetch', +}); + +const { data } = fetchAxios.get(url); +``` + +The adapter supports the same features as the `xhr` adapter, including upload and download progress capturing. +It also supports response types such as `stream` and `formdata` when the environment supports them. + +When `auth` is omitted, the fetch adapter can read HTTP Basic auth credentials from the request URL, for example `https://user:pass@example.com`. Percent-encoded URL credentials are decoded before the `Authorization` header is generated, and `auth` takes precedence over URL-embedded credentials. + +### Custom fetch + +Since `v1.12.0`, you can configure the fetch adapter to use a custom fetch API instead of environment globals. +Pass a custom `fetch` function, `Request`, and `Response` constructors through `env` config. +This helps in custom environments and app frameworks. + +When using a custom fetch, you may also need to set custom `Request` and `Response` constructors. If you do not set them, Axios uses the global objects. +If your custom fetch API does not provide these objects and the globals are incompatible with it, pass `null` to disable them inside the fetch adapter. + +> Note: Setting `Request` and `Response` to `null` prevents the fetch adapter from capturing upload and download progress. + +Basic example: + +```js +import customFetchFunction from 'customFetchModule'; + +const instance = axios.create({ + adapter: 'fetch', + onDownloadProgress(e) { + console.log('downloadProgress', e); + }, + env: { + fetch: customFetchFunction, + Request: null, // undefined -> use the global constructor + Response: null, + }, +}); +``` + +#### Using with Tauri + +A minimal example of setting up Axios for use in a [Tauri](https://tauri.app/plugin/http-client/) app with a platform fetch function that ignores CORS policy for requests. + +```js +import { fetch } from '@tauri-apps/plugin-http'; +import axios from 'axios'; + +const instance = axios.create({ + adapter: 'fetch', + onDownloadProgress(e) { + console.log('downloadProgress', e); + }, + env: { + fetch, + }, +}); + +const { data } = await instance.get('https://google.com'); +``` + +#### Using with SvelteKit + +[SvelteKit](https://svelte.dev/docs/kit/web-standards#Fetch-APIs) uses a custom fetch function for server rendering in `load` functions. It also uses relative paths, which are incompatible with the standard URL API. Configure Axios to use SvelteKit's custom fetch API: + +```js +export async function load({ fetch }) { + const { data: post } = await axios.get('https://jsonplaceholder.typicode.com/posts/1', { + adapter: 'fetch', + env: { + fetch, + Request: null, + Response: null, + }, + }); + + return { post }; +} +``` + +#### HTTP/2 support + +Axios supports HTTP/2 through the Node.js `http` adapter, introduced in v1.13.0. + +Support depends on the runtime environment. Axios relies on Node.js APIs, so HTTP/2 works in supported Node.js versions but may not work in other environments such as Bun or Deno. + +Options like `httpVersion` and `http2Options` are adapter-specific and may not behave the same way in every environment. + +Note: HTTP/2 redirects are currently not supported by the HTTP/2 adapter. + +```js +const form = new FormData(); + +form.append('foo', '123'); + +const { data, headers, status } = await axios.post('https://httpbin.org/post', form, { + onUploadProgress(e) { + console.log('upload progress', e); + }, + onDownloadProgress(e) { + console.log('download progress', e); + }, + responseType: 'arraybuffer', +}); +``` + +## Semver + +Axios follows [semver](https://semver.org/) since `v1.0.0`. + +## Promises + +axios depends on a native ES6 Promise implementation to be [supported](https://caniuse.com/promises). +If your environment doesn't support ES6 Promises, you can [polyfill](https://github.com/jakearchibald/es6-promise). + +## TypeScript + +axios includes [TypeScript](https://typescriptlang.org) definitions and a type guard for axios errors. + +```typescript +let user: User = null; +try { + const { data } = await axios.get('/user?ID=12345'); + user = data.userDetails; +} catch (error) { + if (axios.isAxiosError(error)) { + handleAxiosError(error); + } else { + handleUnexpectedError(error); + } +} +``` + +Use `axios.isCancel()` to narrow cancellation errors to `CanceledError`: + +```typescript +const controller = new AbortController(); + +try { + await axios.get('/user?ID=12345', { signal: controller.signal }); +} catch (error) { + if (axios.isCancel(error)) { + handleCancellation(error); + } +} +``` + +### Typing request data and query params + +`AxiosRequestConfig` uses `D` for the request body and `P` for query parameters. The params serializer receives the same `P`, and both types are preserved on the default response config: + +```typescript +import axios, { + type AxiosPromise, + type AxiosRequestConfig, + type InternalAxiosRequestConfig, +} from 'axios'; + +interface RequestBody { + includeArchived: boolean; +} + +interface SearchParams { + query: string; + page?: number; +} + +interface SearchResponse { + results: string[]; +} + +const config: AxiosRequestConfig = { + data: { includeArchived: false }, + params: { query: 'axios', page: 1 }, + paramsSerializer: (params) => `${params.query}:${params.page ?? 1}`, +}; + +const response = await axios.get('/search', config); +response.config.data; // RequestBody | undefined +response.config.params; // SearchParams | undefined + +const invalidConfig: AxiosRequestConfig = { + // @ts-expect-error `query` must be a string + params: { query: 123 }, +}; + +const adapter = ( + adapterConfig: InternalAxiosRequestConfig +): AxiosPromise => + Promise.resolve({ + data: { results: [] }, + status: 200, + statusText: 'OK', + headers: {}, + config: adapterConfig, + }); +``` + +The request methods place `P` last—``—so the existing response data (`T`), custom response (`R`), and request data (`D`) positions do not change. Explicit custom response types still determine the resolved value. `RawAxiosRequestConfig`, `InternalAxiosRequestConfig`, defaults, `AxiosResponse`, `AxiosPromise`, `AxiosError`, `CanceledError`, callable instances, adapters, and `mergeConfig()` also carry `P`. The default is `any` for backward compatibility. + +Use all three public error generics when cancellation narrowing must retain the response, request body, and params types: + +```typescript +declare const error: unknown; + +if (axios.isCancel(error)) { + error.config?.data; // RequestBody | undefined + error.config?.params; // SearchParams | undefined +} +``` + +### Symbol-keyed custom request config + +Own enumerable symbol properties survive config merging, so module-augmented options can reach request interceptors and adapters: + +```typescript +import axios from 'axios'; + +export const someFlag: unique symbol = Symbol( + 'some flag used in request interceptor' +); + +declare module 'axios' { + interface AxiosRequestConfig { + [someFlag]?: boolean; + } +} + +axios.interceptors.request.use((config) => { + if (config[someFlag]) { + config.headers.set('X-Some-Flag', 'enabled'); + } + return config; +}); + +await axios.get('/users', { [someFlag]: true }); +``` + +Only own enumerable symbol properties are copied; inherited and non-enumerable symbol properties are not. + +Because axios publishes an ESM default export and a CJS `module.exports`, TypeScript has a few caveats. +The recommended setting is `"moduleResolution": "node16"`, which is implied by `"module": "node16"`. This requires TypeScript 4.7 or greater. +If you use ESM, your settings should be fine. +If you compile TypeScript to CJS and can't use `"moduleResolution": "node 16"`, enable `esModuleInterop`. +If you use TypeScript to type check CJS JavaScript code, your only option is to use `"moduleResolution": "node16"`. + +You can also create a custom instance with typed interceptors: + +```typescript +import axios, { AxiosInstance, InternalAxiosRequestConfig } from 'axios'; + +const apiClient: AxiosInstance = axios.create({ + baseURL: 'https://api.example.com', + timeout: 10000, +}); + +apiClient.interceptors.request.use((config: InternalAxiosRequestConfig) => { + // Add auth token + return config; +}); +``` + +## Online one-click setup + +You can use Gitpod, a free online IDE for open source projects, to contribute or run the examples online. + +[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/axios/axios/blob/main/examples/server.js) + +## Contributing + +### Local setup + +As a supply-chain hardening measure, this repository ships a project-level `.npmrc` that sets `ignore-scripts=true`. This blocks npm lifecycle scripts (`preinstall`, `install`, `postinstall`, `prepare`) from any direct or transitive dependency when you run `npm install` or `npm ci` inside the repo. See [THREATMODEL.md](./THREATMODEL.md) (threat T-S2) for the rationale. + +One consequence: the repository's own `prepare` hook (which installs Husky's git hooks) will **not** run automatically. After your first install, enable the git hooks manually: + +```bash +npm ci +npm rebuild husky && npx husky +``` + +Run those two commands once per fresh checkout. You do **not** need to re-run them after every subsequent `npm install`. + +Do not remove `ignore-scripts=true` from `.npmrc` to "fix" this. That reopens the lifecycle-script attack surface for every other package in the tree. All CI workflows already invoke npm with `--ignore-scripts`, so local behaviour matches CI. + +## Resources + +- [Changelog](https://github.com/axios/axios/blob/v1.x/CHANGELOG.md) +- [Ecosystem](https://github.com/axios/axios/blob/v1.x/ECOSYSTEM.md) +- [Contributing Guide](https://github.com/axios/axios/blob/v1.x/CONTRIBUTING.md) +- [Code of Conduct](https://github.com/axios/axios/blob/v1.x/CODE_OF_CONDUCT.md) + +## Credits + +axios is heavily inspired by the [$http service](https://docs.angularjs.org/api/ng/service/$http) in [AngularJS](https://angularjs.org/). It provides a standalone `$http`-like service for use outside AngularJS. + +## License + +[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE) diff --git a/node_modules/axios/dist/axios.js b/node_modules/axios/dist/axios.js new file mode 100644 index 0000000..dbf5c59 --- /dev/null +++ b/node_modules/axios/dist/axios.js @@ -0,0 +1,6477 @@ +/*! Axios v1.21.1 Copyright (c) 2026 Matt Zabriskie and contributors */ +(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : + typeof define === 'function' && define.amd ? define(factory) : + (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.axios = factory()); +})(this, (function () { 'use strict'; + + function _OverloadYield(e, d) { + this.v = e, this.k = d; + } + function _arrayLikeToArray(r, a) { + (null == a || a > r.length) && (a = r.length); + for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; + return n; + } + function _arrayWithHoles(r) { + if (Array.isArray(r)) return r; + } + function _arrayWithoutHoles(r) { + if (Array.isArray(r)) return _arrayLikeToArray(r); + } + function _assertThisInitialized(e) { + if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + return e; + } + function _asyncGeneratorDelegate(t) { + var e = {}, + n = false; + function pump(e, r) { + return n = true, r = new Promise(function (n) { + n(t[e](r)); + }), { + done: false, + value: new _OverloadYield(r, 1) + }; + } + return e["undefined" != typeof Symbol && Symbol.iterator || "@@iterator"] = function () { + return this; + }, e.next = function (t) { + return n ? (n = false, t) : pump("next", t); + }, "function" == typeof t.throw && (e.throw = function (t) { + if (n) throw n = false, t; + return pump("throw", t); + }), "function" == typeof t.return && (e.return = function (t) { + return n ? (n = false, t) : pump("return", t); + }), e; + } + function _asyncIterator(r) { + var n, + t, + o, + e = 2; + for ("undefined" != typeof Symbol && (t = Symbol.asyncIterator, o = Symbol.iterator); e--;) { + if (t && null != (n = r[t])) return n.call(r); + if (o && null != (n = r[o])) return new AsyncFromSyncIterator(n.call(r)); + t = "@@asyncIterator", o = "@@iterator"; + } + throw new TypeError("Object is not async iterable"); + } + function AsyncFromSyncIterator(r) { + function AsyncFromSyncIteratorContinuation(r) { + if (Object(r) !== r) return Promise.reject(new TypeError(r + " is not an object.")); + var n = r.done; + return Promise.resolve(r.value).then(function (r) { + return { + value: r, + done: n + }; + }); + } + return AsyncFromSyncIterator = function (r) { + this.s = r, this.n = r.next; + }, AsyncFromSyncIterator.prototype = { + s: null, + n: null, + next: function () { + return AsyncFromSyncIteratorContinuation(this.n.apply(this.s, arguments)); + }, + return: function (r) { + var n = this.s.return; + return void 0 === n ? Promise.resolve({ + value: r, + done: true + }) : AsyncFromSyncIteratorContinuation(n.apply(this.s, arguments)); + }, + throw: function (r) { + var n = this.s.return; + return void 0 === n ? Promise.reject(r) : AsyncFromSyncIteratorContinuation(n.apply(this.s, arguments)); + } + }, new AsyncFromSyncIterator(r); + } + function asyncGeneratorStep(n, t, e, r, o, a, c) { + try { + var i = n[a](c), + u = i.value; + } catch (n) { + return void e(n); + } + i.done ? t(u) : Promise.resolve(u).then(r, o); + } + function _asyncToGenerator(n) { + return function () { + var t = this, + e = arguments; + return new Promise(function (r, o) { + var a = n.apply(t, e); + function _next(n) { + asyncGeneratorStep(a, r, o, _next, _throw, "next", n); + } + function _throw(n) { + asyncGeneratorStep(a, r, o, _next, _throw, "throw", n); + } + _next(void 0); + }); + }; + } + function _awaitAsyncGenerator(e) { + return new _OverloadYield(e, 0); + } + function _callSuper(t, o, e) { + return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); + } + function _classCallCheck(a, n) { + if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); + } + function _construct(t, e, r) { + if (_isNativeReflectConstruct()) return Reflect.construct.apply(null, arguments); + var o = [null]; + o.push.apply(o, e); + var p = new (t.bind.apply(t, o))(); + return r && _setPrototypeOf(p, r.prototype), p; + } + function _defineProperties(e, r) { + for (var t = 0; t < r.length; t++) { + var o = r[t]; + o.enumerable = o.enumerable || false, o.configurable = true, "value" in o && (o.writable = true), Object.defineProperty(e, _toPropertyKey(o.key), o); + } + } + function _createClass(e, r, t) { + return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { + writable: false + }), e; + } + function _createForOfIteratorHelper(r, e) { + var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; + if (!t) { + if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e) { + t && (r = t); + var n = 0, + F = function () {}; + return { + s: F, + n: function () { + return n >= r.length ? { + done: true + } : { + done: false, + value: r[n++] + }; + }, + e: function (r) { + throw r; + }, + f: F + }; + } + throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); + } + var o, + a = true, + u = false; + return { + s: function () { + t = t.call(r); + }, + n: function () { + var r = t.next(); + return a = r.done, r; + }, + e: function (r) { + u = true, o = r; + }, + f: function () { + try { + a || null == t.return || t.return(); + } finally { + if (u) throw o; + } + } + }; + } + function _defineProperty(e, r, t) { + return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { + value: t, + enumerable: true, + configurable: true, + writable: true + }) : e[r] = t, e; + } + function _getPrototypeOf(t) { + return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { + return t.__proto__ || Object.getPrototypeOf(t); + }, _getPrototypeOf(t); + } + function _inherits(t, e) { + if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); + t.prototype = Object.create(e && e.prototype, { + constructor: { + value: t, + writable: true, + configurable: true + } + }), Object.defineProperty(t, "prototype", { + writable: false + }), e && _setPrototypeOf(t, e); + } + function _isNativeFunction(t) { + try { + return -1 !== Function.toString.call(t).indexOf("[native code]"); + } catch (n) { + return "function" == typeof t; + } + } + function _isNativeReflectConstruct() { + try { + var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); + } catch (t) {} + return (_isNativeReflectConstruct = function () { + return !!t; + })(); + } + function _iterableToArray(r) { + if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); + } + function _iterableToArrayLimit(r, l) { + var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; + if (null != t) { + var e, + n, + i, + u, + a = [], + f = true, + o = false; + try { + if (i = (t = t.call(r)).next, 0 === l) { + if (Object(t) !== t) return; + f = !1; + } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); + } catch (r) { + o = true, n = r; + } finally { + try { + if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; + } finally { + if (o) throw n; + } + } + return a; + } + } + function _nonIterableRest() { + throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); + } + function _nonIterableSpread() { + throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); + } + function ownKeys(e, r) { + var t = Object.keys(e); + if (Object.getOwnPropertySymbols) { + var o = Object.getOwnPropertySymbols(e); + r && (o = o.filter(function (r) { + return Object.getOwnPropertyDescriptor(e, r).enumerable; + })), t.push.apply(t, o); + } + return t; + } + function _objectSpread2(e) { + for (var r = 1; r < arguments.length; r++) { + var t = null != arguments[r] ? arguments[r] : {}; + r % 2 ? ownKeys(Object(t), true).forEach(function (r) { + _defineProperty(e, r, t[r]); + }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { + Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); + }); + } + return e; + } + function _possibleConstructorReturn(t, e) { + if (e && ("object" == typeof e || "function" == typeof e)) return e; + if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); + return _assertThisInitialized(t); + } + function _regenerator() { + /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */ + var e, + t, + r = "function" == typeof Symbol ? Symbol : {}, + n = r.iterator || "@@iterator", + o = r.toStringTag || "@@toStringTag"; + function i(r, n, o, i) { + var c = n && n.prototype instanceof Generator ? n : Generator, + u = Object.create(c.prototype); + return _regeneratorDefine(u, "_invoke", function (r, n, o) { + var i, + c, + u, + f = 0, + p = o || [], + y = false, + G = { + p: 0, + n: 0, + v: e, + a: d, + f: d.bind(e, 4), + d: function (t, r) { + return i = t, c = 0, u = e, G.n = r, a; + } + }; + function d(r, n) { + for (c = r, u = n, t = 0; !y && f && !o && t < p.length; t++) { + var o, + i = p[t], + d = G.p, + l = i[2]; + r > 3 ? (o = l === n) && (u = i[(c = i[4]) ? 5 : (c = 3, 3)], i[4] = i[5] = e) : i[0] <= d && ((o = r < 2 && d < i[1]) ? (c = 0, G.v = n, G.n = i[1]) : d < l && (o = r < 3 || i[0] > n || n > l) && (i[4] = r, i[5] = n, G.n = l, c = 0)); + } + if (o || r > 1) return a; + throw y = true, n; + } + return function (o, p, l) { + if (f > 1) throw TypeError("Generator is already running"); + for (y && 1 === p && d(p, l), c = p, u = l; (t = c < 2 ? e : u) || !y;) { + i || (c ? c < 3 ? (c > 1 && (G.n = -1), d(c, u)) : G.n = u : G.v = u); + try { + if (f = 2, i) { + if (c || (o = "next"), t = i[o]) { + if (!(t = t.call(i, u))) throw TypeError("iterator result is not an object"); + if (!t.done) return t; + u = t.value, c < 2 && (c = 0); + } else 1 === c && (t = i.return) && t.call(i), c < 2 && (u = TypeError("The iterator does not provide a '" + o + "' method"), c = 1); + i = e; + } else if ((t = (y = G.n < 0) ? u : r.call(n, G)) !== a) break; + } catch (t) { + i = e, c = 1, u = t; + } finally { + f = 1; + } + } + return { + value: t, + done: y + }; + }; + }(r, o, i), true), u; + } + var a = {}; + function Generator() {} + function GeneratorFunction() {} + function GeneratorFunctionPrototype() {} + t = Object.getPrototypeOf; + var c = [][n] ? t(t([][n]())) : (_regeneratorDefine(t = {}, n, function () { + return this; + }), t), + u = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(c); + function f(e) { + return Object.setPrototypeOf ? Object.setPrototypeOf(e, GeneratorFunctionPrototype) : (e.__proto__ = GeneratorFunctionPrototype, _regeneratorDefine(e, o, "GeneratorFunction")), e.prototype = Object.create(u), e; + } + return GeneratorFunction.prototype = GeneratorFunctionPrototype, _regeneratorDefine(u, "constructor", GeneratorFunctionPrototype), _regeneratorDefine(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = "GeneratorFunction", _regeneratorDefine(GeneratorFunctionPrototype, o, "GeneratorFunction"), _regeneratorDefine(u), _regeneratorDefine(u, o, "Generator"), _regeneratorDefine(u, n, function () { + return this; + }), _regeneratorDefine(u, "toString", function () { + return "[object Generator]"; + }), (_regenerator = function () { + return { + w: i, + m: f + }; + })(); + } + function _regeneratorDefine(e, r, n, t) { + var i = Object.defineProperty; + try { + i({}, "", {}); + } catch (e) { + i = 0; + } + _regeneratorDefine = function (e, r, n, t) { + function o(r, n) { + _regeneratorDefine(e, r, function (e) { + return this._invoke(r, n, e); + }); + } + r ? i ? i(e, r, { + value: n, + enumerable: !t, + configurable: !t, + writable: !t + }) : e[r] = n : (o("next", 0), o("throw", 1), o("return", 2)); + }, _regeneratorDefine(e, r, n, t); + } + function _regeneratorValues(e) { + if (null != e) { + var t = e["function" == typeof Symbol && Symbol.iterator || "@@iterator"], + r = 0; + if (t) return t.call(e); + if ("function" == typeof e.next) return e; + if (!isNaN(e.length)) return { + next: function () { + return e && r >= e.length && (e = void 0), { + value: e && e[r++], + done: !e + }; + } + }; + } + throw new TypeError(typeof e + " is not iterable"); + } + function _setPrototypeOf(t, e) { + return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { + return t.__proto__ = e, t; + }, _setPrototypeOf(t, e); + } + function _slicedToArray(r, e) { + return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); + } + function _toConsumableArray(r) { + return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); + } + function _toPrimitive(t, e) { + if ("object" != typeof t || !t) return t; + var r; + if ("undefined" != typeof Symbol && void 0 !== (r = t[Symbol.toPrimitive])) { + var i = r.call(t, e); + if ("object" != typeof i) return i; + throw new TypeError("@@toPrimitive must return a primitive value."); + } + return ("string" === e ? String : Number)(t); + } + function _toPropertyKey(t) { + var i = _toPrimitive(t, "string"); + return "symbol" == typeof i ? i : i + ""; + } + function _typeof(o) { + "@babel/helpers - typeof"; + + return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { + return typeof o; + } : function (o) { + return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; + }, _typeof(o); + } + function _unsupportedIterableToArray(r, a) { + if (r) { + if ("string" == typeof r) return _arrayLikeToArray(r, a); + var t = {}.toString.call(r).slice(8, -1); + return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; + } + } + function _wrapAsyncGenerator(e) { + return function () { + return new AsyncGenerator(e.apply(this, arguments)); + }; + } + function AsyncGenerator(e) { + var t, n; + function resume(t, n) { + try { + var r = e[t](n), + o = r.value, + u = o instanceof _OverloadYield; + Promise.resolve(u ? o.v : o).then(function (n) { + if (u) { + var i = "return" === t && o.k ? t : "next"; + if (!o.k || n.done) return resume(i, n); + n = e[i](n).value; + } + settle(!!r.done, n); + }, function (e) { + resume("throw", e); + }); + } catch (e) { + settle(2, e); + } + } + function settle(e, r) { + 2 === e ? t.reject(r) : t.resolve({ + value: r, + done: e + }), (t = t.next) ? resume(t.key, t.arg) : n = null; + } + this._invoke = function (e, r) { + return new Promise(function (o, u) { + var i = { + key: e, + arg: r, + resolve: o, + reject: u, + next: null + }; + n ? n = n.next = i : (t = n = i, resume(e, r)); + }); + }, "function" != typeof e.return && (this.return = void 0); + } + AsyncGenerator.prototype["function" == typeof Symbol && Symbol.asyncIterator || "@@asyncIterator"] = function () { + return this; + }, AsyncGenerator.prototype.next = function (e) { + return this._invoke("next", e); + }, AsyncGenerator.prototype.throw = function (e) { + return this._invoke("throw", e); + }, AsyncGenerator.prototype.return = function (e) { + return this._invoke("return", e); + }; + function _wrapNativeSuper(t) { + var r = "function" == typeof Map ? new Map() : void 0; + return _wrapNativeSuper = function (t) { + if (null === t || !_isNativeFunction(t)) return t; + if ("function" != typeof t) throw new TypeError("Super expression must either be null or a function"); + if (void 0 !== r) { + if (r.has(t)) return r.get(t); + r.set(t, Wrapper); + } + function Wrapper() { + return _construct(t, arguments, _getPrototypeOf(this).constructor); + } + return Wrapper.prototype = Object.create(t.prototype, { + constructor: { + value: Wrapper, + enumerable: false, + writable: true, + configurable: true + } + }), _setPrototypeOf(Wrapper, t); + }, _wrapNativeSuper(t); + } + + /** + * Create a bound version of a function with a specified `this` context + * + * @param {Function} fn - The function to bind + * @param {*} thisArg - The value to be passed as the `this` parameter + * @returns {Function} A new function that will call the original function with the specified `this` context + */ + function bind(fn, thisArg) { + return function wrap() { + return fn.apply(thisArg, arguments); + }; + } + + // utils is a library of generic helper functions non-specific to axios + + var toString = Object.prototype.toString; + var getPrototypeOf = Object.getPrototypeOf; + var iterator = Symbol.iterator, + toStringTag = Symbol.toStringTag; + + /* Creating a function that will check if an object has a property. */ + var hasOwnProperty = function (_ref) { + var hasOwnProperty = _ref.hasOwnProperty; + return function (obj, prop) { + return hasOwnProperty.call(obj, prop); + }; + }(Object.prototype); + var isUnsafeObjectKey = function isUnsafeObjectKey(prop) { + return typeof prop === 'string' && (prop === '__proto__' || prop === 'constructor' || prop === 'prototype'); + }; + + /** + * Determine whether an inherited object must be treated as a shared-prototype + * boundary. Cross-realm Object.prototype objects cannot be distinguished + * reliably from application-created null-prototype objects because their + * properties are mutable, so all inherited terminal prototypes are excluded + * as a fail-closed boundary. A null-prototype source still keeps its own + * properties, as produced by mergeConfig and other safe materialization paths. + * + * @param {*} obj The object to inspect + * @param {*} prototype The object's prototype + * @param {boolean} source Whether obj is the original traversal source + * + * @returns {boolean} True when obj is a safe prototype traversal boundary + */ + var isPrototypeBoundary = function isPrototypeBoundary(obj, prototype, source) { + return obj === Object.prototype || !source && prototype === null; + }; + + /** + * Determine whether an object can retain its identity through code paths that + * add, replace, and remove config properties without bypassing unsafe-key + * filtering. Immutable objects, unsafe-key-bearing objects, and objects with + * accessor or restricted data properties must be materialized instead. + * + * @param {*} obj The object to inspect + * + * @returns {boolean} True when every own property is safe and fully mutable + */ + var isSafeAndFullyMutable = function isSafeAndFullyMutable(obj) { + if (!Object.isExtensible(obj)) { + return false; + } + var props = Object.getOwnPropertyNames(obj); + if (Object.getOwnPropertySymbols) { + props.push.apply(props, _toConsumableArray(Object.getOwnPropertySymbols(obj))); + } + return props.every(function (prop) { + if (isUnsafeObjectKey(prop)) { + return false; + } + var descriptor = Object.getOwnPropertyDescriptor(obj, prop); + return !!descriptor && descriptor.configurable && descriptor.writable === true; + }); + }; + + /** + * Walk the prototype chain (excluding the source realm's Object.prototype) + * looking for an own `prop`. This distinguishes genuine own/inherited members + * — including class accessors and template prototypes — from members injected + * via Object.prototype pollution (e.g. `Object.prototype.username = '...'`), + * which live on Object.prototype itself and are therefore never matched. + * + * @param {*} thing The value whose chain to inspect + * @param {string|symbol} prop The property key to look for + * + * @returns {boolean} True when `prop` is owned below Object.prototype + */ + var hasOwnInPrototypeChain = function hasOwnInPrototypeChain(thing, prop) { + var obj = thing; + var seen = []; + while (obj != null) { + if (seen.indexOf(obj) !== -1) { + return false; + } + seen.push(obj); + var prototype = getPrototypeOf(obj); + if (isPrototypeBoundary(obj, prototype, obj === thing)) { + return false; + } + if (hasOwnProperty(obj, prop)) { + return true; + } + obj = prototype; + } + return false; + }; + + /** + * Read `obj[prop]` only when it is safe from Object.prototype pollution. Own + * properties and members inherited from a non-Object.prototype source (a class + * instance or template object) are honored; a value reachable only through a + * polluted Object.prototype is ignored and `undefined` is returned. + * + * @param {*} obj The source object + * @param {string|symbol} prop The property key to read + * + * @returns {*} The resolved value, or undefined when unsafe/absent + */ + var getSafeProp = function getSafeProp(obj, prop) { + return obj != null && hasOwnInPrototypeChain(obj, prop) ? obj[prop] : undefined; + }; + + /** + * Flatten an object and its application-defined prototype chain into a + * null-prototype object. Members inherited only from the source realm's + * Object.prototype are deliberately excluded, while class/template members + * below that boundary are preserved. + * + * @param {*} thing The value to flatten + * + * @returns {*} A null-prototype copy, or the original value when it is already + * structurally safe or is not an object + */ + var toSafeFlatObject = function toSafeFlatObject(thing) { + if (thing == null || _typeof(thing) !== 'object' && typeof thing !== 'function') { + return thing; + } + var sourcePrototype = getPrototypeOf(thing); + if (sourcePrototype === null && isSafeAndFullyMutable(thing)) { + return thing; + } + var result = Object.create(null); + var merged = Object.create(null); + var seen = []; + var current = thing; + while (current != null) { + if (seen.indexOf(current) !== -1) { + break; + } + seen.push(current); + var prototype = current === thing ? sourcePrototype : getPrototypeOf(current); + if (isPrototypeBoundary(current, prototype, current === thing)) { + break; + } + var props = Object.getOwnPropertyNames(current); + if (Object.getOwnPropertySymbols) { + props.push.apply(props, _toConsumableArray(Object.getOwnPropertySymbols(current))); + } + var _iterator2 = _createForOfIteratorHelper(props), + _step; + try { + for (_iterator2.s(); !(_step = _iterator2.n()).done;) { + var prop = _step.value; + if (isUnsafeObjectKey(prop)) { + continue; + } + if (!hasOwnProperty(merged, prop)) { + result[prop] = thing[prop]; + merged[prop] = true; + } + } + } catch (err) { + _iterator2.e(err); + } finally { + _iterator2.f(); + } + current = prototype; + } + return result; + }; + var kindOf = function (cache) { + return function (thing) { + var str = toString.call(thing); + return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase()); + }; + }(Object.create(null)); + var kindOfTest = function kindOfTest(type) { + type = type.toLowerCase(); + return function (thing) { + return kindOf(thing) === type; + }; + }; + var typeOfTest = function typeOfTest(type) { + return function (thing) { + return _typeof(thing) === type; + }; + }; + + /** + * Determine if a value is a non-null object + * + * @param {Object} val The value to test + * + * @returns {boolean} True if value is an Array, otherwise false + */ + var isArray = Array.isArray; + + /** + * Determine if a value is undefined + * + * @param {*} val The value to test + * + * @returns {boolean} True if the value is undefined, otherwise false + */ + var isUndefined = typeOfTest('undefined'); + + /** + * Determine if a value is a Buffer + * + * @param {*} val The value to test + * + * @returns {boolean} True if value is a Buffer, otherwise false + */ + function isBuffer(val) { + return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor) && isFunction$1(val.constructor.isBuffer) && val.constructor.isBuffer(val); + } + + /** + * Determine if a value is an ArrayBuffer + * + * @param {*} val The value to test + * + * @returns {boolean} True if value is an ArrayBuffer, otherwise false + */ + var isArrayBuffer = kindOfTest('ArrayBuffer'); + + /** + * Determine if a value is a view on an ArrayBuffer + * + * @param {*} val The value to test + * + * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false + */ + function isArrayBufferView(val) { + var result; + if (typeof ArrayBuffer !== 'undefined' && ArrayBuffer.isView) { + result = ArrayBuffer.isView(val); + } else { + result = val && val.buffer && isArrayBuffer(val.buffer); + } + return result; + } + + /** + * Determine if a value is a String + * + * @param {*} val The value to test + * + * @returns {boolean} True if value is a String, otherwise false + */ + var isString = typeOfTest('string'); + + /** + * Determine if a value is a Function + * + * @param {*} val The value to test + * @returns {boolean} True if value is a Function, otherwise false + */ + var isFunction$1 = typeOfTest('function'); + + /** + * Determine if a value is a Number + * + * @param {*} val The value to test + * + * @returns {boolean} True if value is a Number, otherwise false + */ + var isNumber = typeOfTest('number'); + + /** + * Determine if a value is an Object + * + * @param {*} thing The value to test + * + * @returns {boolean} True if value is an Object, otherwise false + */ + var isObject = function isObject(thing) { + return thing !== null && _typeof(thing) === 'object'; + }; + + /** + * Determine if a value is a Boolean + * + * @param {*} thing The value to test + * @returns {boolean} True if value is a Boolean, otherwise false + */ + var isBoolean = function isBoolean(thing) { + return thing === true || thing === false; + }; + + /** + * Determine if a value is a plain Object + * + * @param {*} val The value to test + * + * @returns {boolean} True if value is a plain Object, otherwise false + */ + var isPlainObject = function isPlainObject(val) { + if (!isObject(val)) { + return false; + } + var prototype = getPrototypeOf(val); + return (prototype === null || prototype === Object.prototype || getPrototypeOf(prototype) === null) && ( + // Treat own Symbol.toStringTag or Symbol.iterator members as evidence the + // value is tagged/iterable, ignoring members reachable only through shared + // or terminal prototype boundaries. This is exactly what + // hasOwnInPrototypeChain(val, prop) computes here: every prototype admitted + // above (null, Object.prototype, or a terminal null-prototype template) is + // a boundary, so the walk never inspects anything but `val`'s own members, + // and stops before even those when `val` is itself the boundary + // Object.prototype. Checking that inline avoids allocating the walker's + // `seen` list twice per call on the mergeConfig / merge hot path. + isPrototypeBoundary(val, prototype, true) || !hasOwnProperty(val, toStringTag) && !hasOwnProperty(val, iterator)); + }; + + /** + * Determine if a value is an empty object (safely handles Buffers) + * + * @param {*} val The value to test + * + * @returns {boolean} True if value is an empty object, otherwise false + */ + var isEmptyObject = function isEmptyObject(val) { + // Early return for non-objects or Buffers to prevent RangeError + if (!isObject(val) || isBuffer(val)) { + return false; + } + try { + return Object.keys(val).length === 0 && Object.getPrototypeOf(val) === Object.prototype; + } catch (e) { + // Fallback for any other objects that might cause RangeError with Object.keys() + return false; + } + }; + + /** + * Determine if a value is a Date + * + * @param {*} val The value to test + * + * @returns {boolean} True if value is a Date, otherwise false + */ + var isDate = kindOfTest('Date'); + + /** + * Determine if a value is a File + * + * @param {*} val The value to test + * + * @returns {boolean} True if value is a File, otherwise false + */ + var isFile = kindOfTest('File'); + + /** + * Determine if a value is a React Native Blob + * React Native "blob": an object with a `uri` attribute. Optionally, it can + * also have a `name` and `type` attribute to specify filename and content type + * + * @see https://github.com/facebook/react-native/blob/26684cf3adf4094eb6c405d345a75bf8c7c0bf88/Libraries/Network/FormData.js#L68-L71 + * + * @param {*} value The value to test + * + * @returns {boolean} True if value is a React Native Blob, otherwise false + */ + var isReactNativeBlob = function isReactNativeBlob(value) { + return !!(value && typeof value.uri !== 'undefined'); + }; + + /** + * Determine if environment is React Native + * ReactNative `FormData` has a non-standard `getParts()` method + * + * @param {*} formData The formData to test + * + * @returns {boolean} True if environment is React Native, otherwise false + */ + var isReactNative = function isReactNative(formData) { + return formData && typeof formData.getParts !== 'undefined'; + }; + + /** + * Determine if a value is a Blob + * + * @param {*} val The value to test + * + * @returns {boolean} True if value is a Blob, otherwise false + */ + var isBlob = kindOfTest('Blob'); + + /** + * Determine if a value is a FileList + * + * @param {*} val The value to test + * + * @returns {boolean} True if value is a FileList, otherwise false + */ + var isFileList = kindOfTest('FileList'); + var isSet = kindOfTest('Set'); + + /** + * Determine if a value is a Stream + * + * @param {*} val The value to test + * + * @returns {boolean} True if value is a Stream, otherwise false + */ + var isStream = function isStream(val) { + return isObject(val) && isFunction$1(val.pipe); + }; + + /** + * Determine if a value is a FormData + * + * @param {*} thing The value to test + * + * @returns {boolean} True if value is an FormData, otherwise false + */ + function getGlobal() { + if (typeof globalThis !== 'undefined') return globalThis; + if (typeof self !== 'undefined') return self; + if (typeof window !== 'undefined') return window; + if (typeof global !== 'undefined') return global; + return {}; + } + var G = getGlobal(); + var FormDataCtor = typeof G.FormData !== 'undefined' ? G.FormData : undefined; + var isFormData = function isFormData(thing) { + if (!thing) return false; + if (FormDataCtor && thing instanceof FormDataCtor) return true; + // Reject plain objects inheriting directly from Object.prototype so prototype-pollution gadgets can't spoof FormData. + var proto = getPrototypeOf(thing); + if (!proto || proto === Object.prototype) return false; + if (!isFunction$1(thing.append)) return false; + var kind = kindOf(thing); + return kind === 'formdata' || + // detect form-data instance + kind === 'object' && isFunction$1(thing.toString) && thing.toString() === '[object FormData]'; + }; + + /** + * Determine if a value is a URLSearchParams object + * + * @param {*} val The value to test + * + * @returns {boolean} True if value is a URLSearchParams object, otherwise false + */ + var isURLSearchParams = kindOfTest('URLSearchParams'); + var _map = ['ReadableStream', 'Request', 'Response', 'Headers'].map(kindOfTest), + _map2 = _slicedToArray(_map, 4), + isReadableStream = _map2[0], + isRequest = _map2[1], + isResponse = _map2[2], + isHeaders = _map2[3]; + + /** + * Trim excess whitespace off the beginning and end of a string + * + * @param {String} str The String to trim + * + * @returns {String} The String freed of excess whitespace + */ + var trim = function trim(str) { + return str.trim ? str.trim() : str.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, ''); + }; + /** + * Iterate over an Array or an Object invoking a function for each item. + * + * If `obj` is an Array callback will be called passing + * the value, index, and complete array for each item. + * + * If 'obj' is an Object callback will be called passing + * the value, key, and complete object for each property. + * + * @param {Object|Array} obj The object to iterate + * @param {Function} fn The callback to invoke for each item + * + * @param {Object} [options] + * @param {Boolean} [options.allOwnKeys = false] + * @returns {any} + */ + function forEach(obj, fn) { + var _ref2 = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}, + _ref2$allOwnKeys = _ref2.allOwnKeys, + allOwnKeys = _ref2$allOwnKeys === void 0 ? false : _ref2$allOwnKeys; + // Don't bother if no value provided + if (obj === null || typeof obj === 'undefined') { + return; + } + var i; + var l; + + // Force an array if not already something iterable + if (_typeof(obj) !== 'object') { + /*eslint no-param-reassign:0*/ + obj = [obj]; + } + if (isArray(obj)) { + // Iterate over array values + for (i = 0, l = obj.length; i < l; i++) { + fn.call(null, obj[i], i, obj); + } + } else { + // Buffer check + if (isBuffer(obj)) { + return; + } + + // Iterate over object keys + var keys = allOwnKeys ? Object.getOwnPropertyNames(obj) : Object.keys(obj); + var len = keys.length; + var key; + for (i = 0; i < len; i++) { + key = keys[i]; + fn.call(null, obj[key], key, obj); + } + } + } + + /** + * Finds a key in an object, case-insensitive, returning the actual key name. + * Returns null if the object is a Buffer or if no match is found. + * + * @param {Object} obj - The object to search. + * @param {string} key - The key to find (case-insensitive). + * @returns {?string} The actual key name if found, otherwise null. + */ + function findKey(obj, key) { + if (isBuffer(obj)) { + return null; + } + key = key.toLowerCase(); + var keys = Object.keys(obj); + var i = keys.length; + var _key; + while (i-- > 0) { + _key = keys[i]; + if (key === _key.toLowerCase()) { + return _key; + } + } + return null; + } + var _global = function () { + /*eslint no-undef:0*/ + if (typeof globalThis !== 'undefined') return globalThis; + return typeof self !== 'undefined' ? self : typeof window !== 'undefined' ? window : global; + }(); + var isContextDefined = function isContextDefined(context) { + return !isUndefined(context) && context !== _global; + }; + + /** + * Accepts varargs expecting each argument to be an object, then + * immutably merges the properties of each object and returns result. + * + * When multiple objects contain the same key the later object in + * the arguments list will take precedence. + * + * Example: + * + * ```js + * const result = merge({foo: 123}, {foo: 456}); + * console.log(result.foo); // outputs 456 + * ``` + * + * @param {Object} obj1 Object to merge + * + * @returns {Object} Result of all merge properties + */ + function merge() { + var _ref3 = isContextDefined(this) && this || {}, + caseless = _ref3.caseless, + skipUndefined = _ref3.skipUndefined; + var result = {}; + // Caseless lookup only applies to string keys — symbol keys are + // identity-matched. Every string key that reaches `result` passes through + // this index first, so it can never hold two case variants of one key and a + // lowercase -> key map is exactly what findKey(result, key) would rescan + // Object.keys(result) for on each assignment. + var lowerCaseKeys = caseless ? Object.create(null) : null; + var assignValue = function assignValue(val, key) { + // Skip dangerous property names to prevent prototype pollution + if (key === '__proto__' || key === 'constructor' || key === 'prototype') { + return; + } + var targetKey = key; + if (lowerCaseKeys && typeof key === 'string') { + var lowerKey = key.toLowerCase(); + var knownKey = lowerCaseKeys[lowerKey]; + // A key recorded but absent from `result` was skipped by skipUndefined; + // the later spelling wins then, as it does for findKey. + if (knownKey !== undefined && hasOwnProperty(result, knownKey)) { + targetKey = knownKey; + } else { + lowerCaseKeys[lowerKey] = key; + } + } + // Read via own-prop only — a bare `result[targetKey]` walks the prototype + // chain, so a polluted Object.prototype value could surface here and get + // copied into the merged result. + var existing = hasOwnProperty(result, targetKey) ? result[targetKey] : undefined; + if (isPlainObject(existing) && isPlainObject(val)) { + result[targetKey] = merge(existing, val); + } else if (isPlainObject(val)) { + result[targetKey] = merge({}, val); + } else if (isArray(val)) { + result[targetKey] = val.slice(); + } else if (!skipUndefined || !isUndefined(val)) { + result[targetKey] = val; + } + }; + for (var i = 0, l = arguments.length; i < l; i++) { + var source = i < 0 || arguments.length <= i ? undefined : arguments[i]; + if (!source || isBuffer(source)) { + continue; + } + forEach(source, assignValue); + if (_typeof(source) !== 'object' || isArray(source) || !Object.getOwnPropertySymbols) { + continue; + } + var symbols = Object.getOwnPropertySymbols(source); + for (var j = 0; j < symbols.length; j++) { + var symbol = symbols[j]; + if (propertyIsEnumerable.call(source, symbol)) { + assignValue(source[symbol], symbol); + } + } + } + return result; + } + + /** + * Extends object a by mutably adding to it the properties of object b. + * + * @param {Object} a The object to be extended + * @param {Object} b The object to copy properties from + * @param {Object} thisArg The object to bind function to + * + * @param {Object} [options] + * @param {Boolean} [options.allOwnKeys] + * @returns {Object} The resulting value of object a + */ + var extend = function extend(a, b, thisArg) { + var _ref4 = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {}, + allOwnKeys = _ref4.allOwnKeys; + forEach(b, function (val, key) { + if (thisArg && isFunction$1(val)) { + Object.defineProperty(a, key, { + // Null-proto descriptor so a polluted Object.prototype.get cannot + // hijack defineProperty's accessor-vs-data resolution. + __proto__: null, + value: bind(val, thisArg), + writable: true, + enumerable: true, + configurable: true + }); + } else { + Object.defineProperty(a, key, { + __proto__: null, + value: val, + writable: true, + enumerable: true, + configurable: true + }); + } + }, { + allOwnKeys: allOwnKeys + }); + return a; + }; + + /** + * Remove byte order marker. This catches EF BB BF (the UTF-8 BOM) + * + * @param {string} content with BOM + * + * @returns {string} content value without BOM + */ + var stripBOM = function stripBOM(content) { + if (content.charCodeAt(0) === 0xfeff) { + content = content.slice(1); + } + return content; + }; + + /** + * Inherit the prototype methods from one constructor into another + * @param {function} constructor + * @param {function} superConstructor + * @param {object} [props] + * @param {object} [descriptors] + * + * @returns {void} + */ + var inherits = function inherits(constructor, superConstructor, props, descriptors) { + constructor.prototype = Object.create(superConstructor.prototype, descriptors); + Object.defineProperty(constructor.prototype, 'constructor', { + __proto__: null, + value: constructor, + writable: true, + enumerable: false, + configurable: true + }); + Object.defineProperty(constructor, 'super', { + __proto__: null, + value: superConstructor.prototype + }); + props && Object.assign(constructor.prototype, props); + }; + + /** + * Resolve object with deep prototype chain to a flat object + * @param {Object} sourceObj source object + * @param {Object} [destObj] + * @param {Function|Boolean} [filter] + * @param {Function} [propFilter] + * + * @returns {Object} + */ + var toFlatObject = function toFlatObject(sourceObj, destObj, filter, propFilter) { + var props; + var i; + var prop; + var merged = {}; + destObj = destObj || {}; + // eslint-disable-next-line no-eq-null,eqeqeq + if (sourceObj == null) return destObj; + do { + props = Object.getOwnPropertyNames(sourceObj); + i = props.length; + while (i-- > 0) { + prop = props[i]; + if ((!propFilter || propFilter(prop, sourceObj, destObj)) && !merged[prop]) { + destObj[prop] = sourceObj[prop]; + merged[prop] = true; + } + } + sourceObj = filter !== false && getPrototypeOf(sourceObj); + } while (sourceObj && (!filter || filter(sourceObj, destObj)) && sourceObj !== Object.prototype); + return destObj; + }; + + /** + * Determines whether a string ends with the characters of a specified string + * + * @param {String} str + * @param {String} searchString + * @param {Number} [position= 0] + * + * @returns {boolean} + */ + var endsWith = function endsWith(str, searchString, position) { + str = String(str); + if (position === undefined || position > str.length) { + position = str.length; + } + position -= searchString.length; + var lastIndex = str.indexOf(searchString, position); + return lastIndex !== -1 && lastIndex === position; + }; + + /** + * Returns new array from array like object or null if failed + * + * @param {*} [thing] + * + * @returns {?Array} + */ + var toArray = function toArray(thing) { + if (!thing) return null; + if (isArray(thing)) return thing; + var i = thing.length; + if (!Number.isSafeInteger(i) || i < 0 || i > 0xffffffff) return null; + + // Bound the copy by actual indexed properties, including hidden and inherited + // members of array-like collections, rather than by the declared length alone. + var indexes = new Set(); + var seen = new Set(); + var source = thing; + while (source != null && indexes.size < i) { + if (seen.has(source)) return null; + seen.add(source); + var prototype = getPrototypeOf(source); + if (isPrototypeBoundary(source, prototype, source === thing)) break; + Object.getOwnPropertyNames(source).forEach(function (key) { + var index = +key; + if (Number.isInteger(index) && index >= 0 && index < i && String(index) === key && hasOwnProperty(source, key)) { + indexes.add(index); + } + }); + source = prototype; + } + if (indexes.size !== i) return null; + var arr = new Array(i); + while (i-- > 0) { + arr[i] = thing[i]; + } + return arr; + }; + + /** + * Checking if the Uint8Array exists and if it does, it returns a function that checks if the + * thing passed in is an instance of Uint8Array + * + * @param {TypedArray} + * + * @returns {Array} + */ + // eslint-disable-next-line func-names + var isTypedArray = function (TypedArray) { + // eslint-disable-next-line func-names + return function (thing) { + return TypedArray && thing instanceof TypedArray; + }; + }(typeof Uint8Array !== 'undefined' && getPrototypeOf(Uint8Array)); + + /** + * For each entry in the object, call the function with the key and value. + * + * @param {Object} obj - The object to iterate over. + * @param {Function} fn - The function to call for each entry. + * + * @returns {void} + */ + var forEachEntry = function forEachEntry(obj, fn) { + var generator = obj && obj[iterator]; + var _iterator = generator.call(obj); + var result; + while ((result = _iterator.next()) && !result.done) { + var pair = result.value; + fn.call(obj, pair[0], pair[1]); + } + }; + + /** + * It takes a regular expression and a string, and returns an array of all the matches + * + * @param {string} regExp - The regular expression to match against. + * @param {string} str - The string to search. + * + * @returns {Array} + */ + var matchAll = function matchAll(regExp, str) { + var matches; + var arr = []; + while ((matches = regExp.exec(str)) !== null) { + arr.push(matches); + } + return arr; + }; + + /* Checking if the kindOfTest function returns true when passed an HTMLFormElement. */ + var isHTMLForm = kindOfTest('HTMLFormElement'); + var toCamelCase = function toCamelCase(str) { + return str.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g, function replacer(m, p1, p2) { + return p1.toUpperCase() + p2; + }); + }; + var propertyIsEnumerable = Object.prototype.propertyIsEnumerable; + + /** + * Determine if a value is a RegExp object + * + * @param {*} val The value to test + * + * @returns {boolean} True if value is a RegExp object, otherwise false + */ + var isRegExp = kindOfTest('RegExp'); + var reduceDescriptors = function reduceDescriptors(obj, reducer) { + var descriptors = Object.getOwnPropertyDescriptors(obj); + var reducedDescriptors = {}; + forEach(descriptors, function (descriptor, name) { + var ret; + if ((ret = reducer(descriptor, name, obj)) !== false) { + reducedDescriptors[name] = ret || descriptor; + } + }); + Object.defineProperties(obj, reducedDescriptors); + }; + + /** + * Makes all methods read-only + * @param {Object} obj + */ + + var freezeMethods = function freezeMethods(obj) { + reduceDescriptors(obj, function (descriptor, name) { + // skip restricted props in strict mode + if (isFunction$1(obj) && ['arguments', 'caller', 'callee'].includes(name)) { + return false; + } + var value = obj[name]; + if (!isFunction$1(value)) return; + descriptor.enumerable = false; + if ('writable' in descriptor) { + descriptor.writable = false; + return; + } + if (!descriptor.set) { + descriptor.set = function () { + throw Error("Can not rewrite read-only method '" + name + "'"); + }; + } + }); + }; + + /** + * Converts an array or a delimited string into an object set with values as keys and true as values. + * Useful for fast membership checks. + * + * @param {Array|string} arrayOrString - The array or string to convert. + * @param {string} delimiter - The delimiter to use if input is a string. + * @returns {Object} An object with keys from the array or string, values set to true. + */ + var toObjectSet = function toObjectSet(arrayOrString, delimiter) { + var obj = {}; + var define = function define(arr) { + arr.forEach(function (value) { + obj[value] = true; + }); + }; + isArray(arrayOrString) ? define(arrayOrString) : define(String(arrayOrString).split(delimiter)); + return obj; + }; + var noop = function noop() {}; + var toFiniteNumber = function toFiniteNumber(value, defaultValue) { + return value != null && Number.isFinite(value = +value) ? value : defaultValue; + }; + + /** + * If the thing is a FormData object, return true, otherwise return false. + * + * @param {unknown} thing - The thing to check. + * + * @returns {boolean} + */ + function isSpecCompliantForm(thing) { + return !!(thing && isFunction$1(thing.append) && thing[toStringTag] === 'FormData' && thing[iterator]); + } + + /** + * Recursively converts an object to a JSON-compatible object, handling circular references and Buffers. + * + * @param {Object} obj - The object to convert. + * @returns {Object} The JSON-compatible object. + */ + var toJSONObject = function toJSONObject(obj) { + var visited = new WeakSet(); + var _visit = function visit(source) { + if (isObject(source)) { + if (visited.has(source)) { + return; + } + + //Buffer check + if (isBuffer(source)) { + return source; + } + if (!('toJSON' in source)) { + // add-on descent / delete-on-ascent: preserves path semantics, so DAG nodes serialise at every occurrence (see #7230). + visited.add(source); + var target; + if (isSet(source)) { + target = []; + var _iterator3 = _createForOfIteratorHelper(source), + _step2; + try { + for (_iterator3.s(); !(_step2 = _iterator3.n()).done;) { + var value = _step2.value; + var reducedValue = _visit(value); + !isUndefined(reducedValue) && target.push(reducedValue); + } + } catch (err) { + _iterator3.e(err); + } finally { + _iterator3.f(); + } + } else { + target = isArray(source) ? [] : {}; + forEach(source, function (value, key) { + var reducedValue = _visit(value); + !isUndefined(reducedValue) && (target[key] = reducedValue); + }); + } + visited["delete"](source); + return target; + } + } + return source; + }; + return _visit(obj); + }; + + /** + * Determines if a value is an async function. + * + * @param {*} thing - The value to test. + * @returns {boolean} True if value is an async function, otherwise false. + */ + var isAsyncFn = kindOfTest('AsyncFunction'); + + /** + * Determines if a value is thenable (has then and catch methods). + * + * @param {*} thing - The value to test. + * @returns {boolean} True if value is thenable, otherwise false. + */ + var isThenable = function isThenable(thing) { + return thing && (isObject(thing) || isFunction$1(thing)) && isFunction$1(thing.then) && isFunction$1(thing["catch"]); + }; + + // original code + // https://github.com/DigitalBrainJS/AxiosPromise/blob/16deab13710ec09779922131f3fa5954320f83ab/lib/utils.js#L11-L34 + + /** + * Provides a cross-platform setImmediate implementation. + * Uses native setImmediate if available, otherwise falls back to postMessage or setTimeout. + * + * @param {boolean} setImmediateSupported - Whether setImmediate is supported. + * @param {boolean} postMessageSupported - Whether postMessage is supported. + * @returns {Function} A function to schedule a callback asynchronously. + */ + var _setImmediate = function (setImmediateSupported, postMessageSupported) { + if (setImmediateSupported) { + return setImmediate; + } + return postMessageSupported ? function (token, callbacks) { + _global.addEventListener('message', function (_ref5) { + var source = _ref5.source, + data = _ref5.data; + if (source === _global && data === token) { + callbacks.length && callbacks.shift()(); + } + }, false); + return function (cb) { + callbacks.push(cb); + _global.postMessage(token, '*'); + }; + }("axios@".concat(Math.random()), []) : function (cb) { + return setTimeout(cb); + }; + }(typeof setImmediate === 'function', isFunction$1(_global.postMessage)); + + /** + * Schedules a microtask or asynchronous callback as soon as possible. + * Uses queueMicrotask if available, otherwise falls back to process.nextTick or _setImmediate. + * + * @type {Function} + */ + var asap = typeof queueMicrotask !== 'undefined' ? queueMicrotask.bind(_global) : typeof process !== 'undefined' && process.nextTick || _setImmediate; + + // ********************* + + var isIterable = function isIterable(thing) { + return thing != null && isFunction$1(thing[iterator]); + }; + + /** + * Determine if a value is iterable via an iterator that is NOT sourced solely + * from a polluted Object.prototype. Use this instead of `isIterable` whenever + * the iterable comes from untrusted input (e.g. user-supplied header sources), + * so `Object.prototype[Symbol.iterator] = ...` cannot turn an ordinary object + * into an attacker-controlled entries iterator. + * + * @param {*} thing The value to test + * + * @returns {boolean} True if value has a non-polluted iterator + */ + var isSafeIterable = function isSafeIterable(thing) { + return thing != null && hasOwnInPrototypeChain(thing, iterator) && isIterable(thing); + }; + var utils$1 = { + isArray: isArray, + isArrayBuffer: isArrayBuffer, + isBuffer: isBuffer, + isFormData: isFormData, + isArrayBufferView: isArrayBufferView, + isString: isString, + isNumber: isNumber, + isBoolean: isBoolean, + isObject: isObject, + isPlainObject: isPlainObject, + isEmptyObject: isEmptyObject, + isReadableStream: isReadableStream, + isRequest: isRequest, + isResponse: isResponse, + isHeaders: isHeaders, + isUndefined: isUndefined, + isDate: isDate, + isFile: isFile, + isReactNativeBlob: isReactNativeBlob, + isReactNative: isReactNative, + isBlob: isBlob, + isRegExp: isRegExp, + isFunction: isFunction$1, + isStream: isStream, + isURLSearchParams: isURLSearchParams, + isTypedArray: isTypedArray, + isFileList: isFileList, + forEach: forEach, + merge: merge, + extend: extend, + trim: trim, + stripBOM: stripBOM, + inherits: inherits, + toFlatObject: toFlatObject, + kindOf: kindOf, + kindOfTest: kindOfTest, + endsWith: endsWith, + toArray: toArray, + forEachEntry: forEachEntry, + matchAll: matchAll, + isHTMLForm: isHTMLForm, + hasOwnProperty: hasOwnProperty, + hasOwnProp: hasOwnProperty, + // an alias to avoid ESLint no-prototype-builtins detection + hasOwnInPrototypeChain: hasOwnInPrototypeChain, + getSafeProp: getSafeProp, + toSafeFlatObject: toSafeFlatObject, + reduceDescriptors: reduceDescriptors, + freezeMethods: freezeMethods, + toObjectSet: toObjectSet, + toCamelCase: toCamelCase, + noop: noop, + toFiniteNumber: toFiniteNumber, + findKey: findKey, + global: _global, + isContextDefined: isContextDefined, + isSpecCompliantForm: isSpecCompliantForm, + toJSONObject: toJSONObject, + isAsyncFn: isAsyncFn, + isThenable: isThenable, + setImmediate: _setImmediate, + asap: asap, + isIterable: isIterable, + isSafeIterable: isSafeIterable + }; + + // RawAxiosHeaders whose duplicates are ignored by node + // c.f. https://nodejs.org/api/http.html#http_message_headers + var ignoreDuplicateOf = utils$1.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']); + + /** + * Parse headers into an object + * + * ``` + * Date: Wed, 27 Aug 2014 08:58:49 GMT + * Content-Type: application/json + * Connection: keep-alive + * Transfer-Encoding: chunked + * ``` + * + * @param {String} rawHeaders Headers needing to be parsed + * + * @returns {Object} Headers parsed into an object + */ + var parseHeaders = (function (rawHeaders) { + // Header names are data, including __proto__; avoid inherited setters. + var parsed = Object.create(null); + var key; + var val; + var i; + rawHeaders && rawHeaders.split('\n').forEach(function parser(line) { + i = line.indexOf(':'); + key = line.substring(0, i).trim().toLowerCase(); + val = line.substring(i + 1).trim(); + var hasKey = utils$1.hasOwnProp(parsed, key); + if (!key || hasKey && utils$1.hasOwnProp(ignoreDuplicateOf, key)) { + return; + } + if (key === 'set-cookie') { + if (hasKey) { + parsed[key].push(val); + } else { + parsed[key] = [val]; + } + } else { + parsed[key] = hasKey ? parsed[key] + ', ' + val : val; + } + }); + return parsed; + }); + + function trimSPorHTAB(str) { + var start = 0; + var end = str.length; + while (start < end) { + var code = str.charCodeAt(start); + if (code !== 0x09 && code !== 0x20) { + break; + } + start += 1; + } + while (end > start) { + var _code = str.charCodeAt(end - 1); + if (_code !== 0x09 && _code !== 0x20) { + break; + } + end -= 1; + } + return start === 0 && end === str.length ? str : str.slice(start, end); + } + + // The control-code ranges are intentional: header sanitization strips C0/DEL bytes. + // eslint-disable-next-line no-control-regex + var INVALID_UNICODE_HEADER_VALUE_CHARS = new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+", 'g'); + // eslint-disable-next-line no-control-regex + var INVALID_BYTE_STRING_HEADER_VALUE_CHARS = new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+", 'g'); + function sanitizeValue(value, invalidChars) { + if (utils$1.isArray(value)) { + return value.map(function (item) { + return sanitizeValue(item, invalidChars); + }); + } + return trimSPorHTAB(String(value).replace(invalidChars, '')); + } + var sanitizeHeaderValue = function sanitizeHeaderValue(value) { + return sanitizeValue(value, INVALID_UNICODE_HEADER_VALUE_CHARS); + }; + var sanitizeByteStringHeaderValue = function sanitizeByteStringHeaderValue(value) { + return sanitizeValue(value, INVALID_BYTE_STRING_HEADER_VALUE_CHARS); + }; + function toByteStringHeaderObject(headers) { + var byteStringHeaders = Object.create(null); + utils$1.forEach(headers.toJSON(), function (value, header) { + byteStringHeaders[header] = sanitizeByteStringHeaderValue(value); + }); + return byteStringHeaders; + } + + var $internals$1 = Symbol('internals'); + function normalizeHeader(header) { + return header && String(header).trim().toLowerCase(); + } + function normalizeValue(value) { + if (value === false || value == null) { + return value; + } + return utils$1.isArray(value) ? value.map(normalizeValue) : sanitizeHeaderValue(String(value)); + } + function parseTokens(str) { + var tokens = Object.create(null); + var tokensRE = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g; + var match; + while (match = tokensRE.exec(str)) { + tokens[match[1]] = match[2]; + } + return tokens; + } + var parameterNameRE = /^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/; + function trimOWS(value) { + var start = 0; + var end = value.length; + while (start < end) { + var code = value.charCodeAt(start); + if (code !== 0x09 && code !== 0x20) { + break; + } + start += 1; + } + while (end > start) { + var _code = value.charCodeAt(end - 1); + if (_code !== 0x09 && _code !== 0x20) { + break; + } + end -= 1; + } + return start === 0 && end === value.length ? value : value.slice(start, end); + } + function decodeQuotedString(value) { + var last = value.length - 1; + if (last < 1 || value.charCodeAt(0) !== 0x22 || value.charCodeAt(last) !== 0x22) { + return value; + } + var decoded = ''; + for (var i = 1; i < last; i++) { + var code = value.charCodeAt(i); + if (code === 0x22) { + return value; + } + if (code === 0x5c) { + i += 1; + if (i >= last) { + return value; + } + } + decoded += value[i]; + } + return decoded; + } + function _parseParameters(value) { + var parameters = Object.create(null); + var str = String(value); + var start = 0; + var quoted = false; + var escaped = false; + function parseParameter(end) { + var part = trimOWS(str.slice(start, end)); + var equals = part.indexOf('='); + if (equals < 1) { + return; + } + var name = trimOWS(part.slice(0, equals)); + if (!parameterNameRE.test(name)) { + return; + } + var normalizedName = name.toLowerCase(); + if (normalizedName === '__proto__' || normalizedName === 'constructor' || normalizedName === 'prototype') { + return; + } + var parameterValue = trimOWS(part.slice(equals + 1)); + parameters[normalizedName] = decodeQuotedString(parameterValue); + } + for (var i = 0; i < str.length; i++) { + var code = str.charCodeAt(i); + if (quoted) { + if (escaped) { + escaped = false; + } else if (code === 0x5c) { + escaped = true; + } else if (code === 0x22) { + quoted = false; + } + } else if (code === 0x22) { + quoted = true; + } else if (code === 0x2c || code === 0x3b) { + parseParameter(i); + start = i + 1; + } + } + parseParameter(str.length); + return parameters; + } + var isValidHeaderName = function isValidHeaderName(str) { + return /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim()); + }; + + // `__proto__` is a valid field name, and the one name the uppercase mapping at + // the bottom of this file cannot reach: it is inherited from Object.prototype + // instead of being declared on AxiosHeaders.prototype, so `self.__proto__ = v` + // runs the inherited setter. That silently discards the header, and an array + // value replaces the instance prototype, taking every method with it. + // Store it under the same kind of case variant that mapping uses for `set` and + // `constructor`. Header lookup is caseless, so it reads back under either + // spelling, and no own `__proto__` slot is ever created for a later + // `Object.assign` to copy onto a plain object through the same setter. + var PROTO_HEADER_SLOT = '__Proto__'; + var headerSlot = function headerSlot(name) { + return name === '__proto__' ? PROTO_HEADER_SLOT : name; + }; + function matchHeaderValue(context, value, header, filter, isHeaderNameFilter) { + if (utils$1.isFunction(filter)) { + return filter.call(context, value, header); + } + if (isHeaderNameFilter) { + value = header; + } + if (!utils$1.isString(value)) return; + if (utils$1.isString(filter)) { + return value.indexOf(filter) !== -1; + } + if (utils$1.isRegExp(filter)) { + return filter.test(value); + } + } + function formatHeader(header) { + return header.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, function (w, _char, str) { + return _char.toUpperCase() + str; + }); + } + function buildAccessors(obj, header) { + var accessorName = utils$1.toCamelCase(' ' + header); + ['get', 'set', 'has'].forEach(function (methodName) { + Object.defineProperty(obj, methodName + accessorName, { + // Null-proto descriptor so a polluted Object.prototype.get cannot turn + // this data descriptor into an accessor descriptor on the way in. + __proto__: null, + value: function value(arg1, arg2, arg3) { + return this[methodName].call(this, header, arg1, arg2, arg3); + }, + configurable: true + }); + }); + } + var AxiosHeaders = /*#__PURE__*/function () { + function AxiosHeaders(headers) { + _classCallCheck(this, AxiosHeaders); + headers && this.set(headers); + } + return _createClass(AxiosHeaders, [{ + key: "set", + value: function set(header, valueOrRewrite, rewrite) { + var self = this; + function setHeader(_value, _header, _rewrite) { + var lHeader = normalizeHeader(_header); + if (!lHeader) { + return; + } + var key = utils$1.findKey(self, lHeader); + if (!key || self[key] === undefined || _rewrite === true || _rewrite === undefined && self[key] !== false) { + self[headerSlot(key || _header)] = normalizeValue(_value); + } + } + var setHeaders = function setHeaders(headers, _rewrite) { + return utils$1.forEach(headers, function (_value, _header) { + return setHeader(_value, _header, _rewrite); + }); + }; + if (utils$1.isPlainObject(header) || header instanceof this.constructor) { + setHeaders(header, valueOrRewrite); + } else if (utils$1.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) { + setHeaders(parseHeaders(header), valueOrRewrite); + } else if (utils$1.isObject(header) && utils$1.isSafeIterable(header)) { + var obj = Object.create(null), + dest, + key; + var _iterator = _createForOfIteratorHelper(header), + _step; + try { + for (_iterator.s(); !(_step = _iterator.n()).done;) { + var entry = _step.value; + if (!utils$1.isArray(entry)) { + throw new TypeError('Object iterator must return a key-value pair'); + } + key = entry[0]; + if (utils$1.hasOwnProp(obj, key)) { + dest = obj[key]; + obj[key] = utils$1.isArray(dest) ? [].concat(_toConsumableArray(dest), [entry[1]]) : [dest, entry[1]]; + } else { + obj[key] = entry[1]; + } + } + } catch (err) { + _iterator.e(err); + } finally { + _iterator.f(); + } + setHeaders(obj, valueOrRewrite); + } else { + header != null && setHeader(valueOrRewrite, header, rewrite); + } + return this; + } + }, { + key: "get", + value: function get(header, parser) { + header = normalizeHeader(header); + if (header) { + var key = utils$1.findKey(this, header); + if (key) { + var value = this[key]; + if (!parser) { + return value; + } + if (parser === true) { + return parseTokens(value); + } + if (utils$1.isFunction(parser)) { + return parser.call(this, value, key); + } + if (utils$1.isRegExp(parser)) { + return parser.exec(value); + } + throw new TypeError('parser must be boolean|regexp|function'); + } + } + } + }, { + key: "has", + value: function has(header, matcher) { + header = normalizeHeader(header); + if (header) { + var key = utils$1.findKey(this, header); + return !!(key && this[key] !== undefined && (!matcher || matchHeaderValue(this, this[key], key, matcher))); + } + return false; + } + }, { + key: "delete", + value: function _delete(header, matcher) { + var self = this; + var deleted = false; + function deleteHeader(_header) { + _header = normalizeHeader(_header); + if (_header) { + var key = utils$1.findKey(self, _header); + if (key && (!matcher || matchHeaderValue(self, self[key], key, matcher))) { + delete self[key]; + deleted = true; + } + } + } + if (utils$1.isArray(header)) { + header.forEach(deleteHeader); + } else { + deleteHeader(header); + } + return deleted; + } + }, { + key: "clear", + value: function clear(matcher) { + var keys = Object.keys(this); + var i = keys.length; + var deleted = false; + while (i--) { + var key = keys[i]; + if (!matcher || matchHeaderValue(this, this[key], key, matcher, true)) { + delete this[key]; + deleted = true; + } + } + return deleted; + } + }, { + key: "normalize", + value: function normalize(format) { + var self = this; + var headers = Object.create(null); + utils$1.forEach(this, function (value, header) { + var key = utils$1.findKey(headers, header); + if (key) { + self[key] = normalizeValue(value); + delete self[header]; + return; + } + var normalized = headerSlot(format ? formatHeader(header) : String(header).trim()); + if (normalized !== header) { + delete self[header]; + } + self[normalized] = normalizeValue(value); + headers[normalized] = true; + }); + return this; + } + }, { + key: "concat", + value: function concat() { + var _this$constructor; + for (var _len = arguments.length, targets = new Array(_len), _key = 0; _key < _len; _key++) { + targets[_key] = arguments[_key]; + } + return (_this$constructor = this.constructor).concat.apply(_this$constructor, [this].concat(targets)); + } + }, { + key: "toJSON", + value: function toJSON(asStrings) { + var obj = Object.create(null); + utils$1.forEach(this, function (value, header) { + value != null && value !== false && (obj[header] = asStrings && utils$1.isArray(value) ? value.join(', ') : value); + }); + return obj; + } + }, { + key: Symbol.iterator, + value: function value() { + return Object.entries(this.toJSON())[Symbol.iterator](); + } + }, { + key: "toString", + value: function toString() { + return Object.entries(this.toJSON()).map(function (_ref) { + var _ref2 = _slicedToArray(_ref, 2), + header = _ref2[0], + value = _ref2[1]; + return header + ': ' + value; + }).join('\n'); + } + }, { + key: "getSetCookie", + value: function getSetCookie() { + var value = this.get('set-cookie'); + return utils$1.isArray(value) ? value : value == null || value === false ? [] : [value]; + } + }, { + key: Symbol.toStringTag, + get: function get() { + return 'AxiosHeaders'; + } + }], [{ + key: "from", + value: function from(thing) { + return thing instanceof this ? thing : new this(thing); + } + }, { + key: "parseParameters", + value: function parseParameters(value) { + return _parseParameters(value); + } + }, { + key: "concat", + value: function concat(first) { + var computed = new this(first); + for (var _len2 = arguments.length, targets = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) { + targets[_key2 - 1] = arguments[_key2]; + } + targets.forEach(function (target) { + return computed.set(target); + }); + return computed; + } + }, { + key: "accessor", + value: function accessor(header) { + var internals = this[$internals$1] = this[$internals$1] = { + accessors: {} + }; + var accessors = internals.accessors; + var prototype = this.prototype; + function defineAccessor(_header) { + var lHeader = normalizeHeader(_header); + if (!accessors[lHeader]) { + buildAccessors(prototype, _header); + accessors[lHeader] = true; + } + } + utils$1.isArray(header) ? header.forEach(defineAccessor) : defineAccessor(header); + return this; + } + }]); + }(); + AxiosHeaders.accessor(['Content-Type', 'Content-Length', 'Accept', 'Accept-Encoding', 'User-Agent', 'Authorization']); + + // reserved names hotfix + utils$1.reduceDescriptors(AxiosHeaders.prototype, function (_ref3, key) { + var value = _ref3.value; + var mapped = key[0].toUpperCase() + key.slice(1); // map `set` => `Set` + return { + get: function get() { + return value; + }, + set: function set(headerValue) { + this[mapped] = headerValue; + } + }; + }); + utils$1.freezeMethods(AxiosHeaders); + + var REDACTED = '[REDACTED ****]'; + function hasOwnOrPrototypeToJSON(source) { + if (utils$1.hasOwnProp(source, 'toJSON')) { + return true; + } + var prototype = Object.getPrototypeOf(source); + while (prototype && prototype !== Object.prototype) { + if (utils$1.hasOwnProp(prototype, 'toJSON')) { + return true; + } + prototype = Object.getPrototypeOf(prototype); + } + return false; + } + + // Build a plain-object snapshot of `config` and replace the value of any key + // (case-insensitive) listed in `redactKeys` with REDACTED. Walks through arrays + // and AxiosHeaders, and short-circuits on circular references. + function redactConfig(config, redactKeys) { + var lowerKeys = new Set(redactKeys.map(function (k) { + return String(k).toLowerCase(); + })); + var seen = []; + var _visit = function visit(source) { + if (source === null || _typeof(source) !== 'object') return source; + if (utils$1.isBuffer(source)) return source; + if (seen.indexOf(source) !== -1) return undefined; + if (source instanceof AxiosHeaders) { + source = source.toJSON(); + } + seen.push(source); + var result; + if (utils$1.isArray(source)) { + result = []; + source.forEach(function (v, i) { + var reducedValue = _visit(v); + if (!utils$1.isUndefined(reducedValue)) { + result[i] = reducedValue; + } + }); + } else { + if (!utils$1.isPlainObject(source) && hasOwnOrPrototypeToJSON(source)) { + seen.pop(); + return source; + } + result = Object.create(null); + for (var _i = 0, _Object$entries = Object.entries(source); _i < _Object$entries.length; _i++) { + var _Object$entries$_i = _slicedToArray(_Object$entries[_i], 2), + key = _Object$entries$_i[0], + value = _Object$entries$_i[1]; + var reducedValue = lowerKeys.has(key.toLowerCase()) ? REDACTED : _visit(value); + if (!utils$1.isUndefined(reducedValue)) { + result[key] = reducedValue; + } + } + } + seen.pop(); + return result; + }; + return _visit(config); + } + function stringifySafely$1(value) { + try { + return String(value); + } catch (err) { + return ''; + } + } + function aggregateErrorMessage(error) { + var message = error.errors.map(function (entry) { + try { + return entry && entry.message ? stringifySafely$1(entry.message) : stringifySafely$1(entry); + } catch (err) { + return ''; + } + }).filter(Boolean).join('; '); + return message || error.name || 'AggregateError'; + } + + // Shared with `Axios.prototype.request`, which splices the reconstructed + // caller frames in ahead of this marker. + var CAUSED_BY_SEPARATOR = '\nCaused by: '; + var $causeStack = Symbol('causeStack'); + + // Match the section we appended, not marker-like text in an error message or + // a replacement stack supplied by the caller. Do not re-read the cause's stack. + function getCauseStackIndex(error, stack) { + var causeStack = utils$1.hasOwnProp(error, $causeStack) && error[$causeStack]; + return causeStack && stack.endsWith(causeStack) ? stack.length - causeStack.length : -1; + } + + /** + * Append the stack of a wrapped error to `target.stack`. + * + * `cause` already exposes the original error for tooling that walks the standard + * cause chain, but many error reporters read `stack` and nothing else. Inlining + * the wrapped stack there means those reporters surface the underlying failure + * instead of the axios frames that normalized it (see #6670). + * + * Every read is defensive: a custom `Error.prepareStackTrace` hook, a runtime + * without stack support, or a replaced `stack` property can leave the value + * missing, non-string, or read-only, and normalizing an error must not throw + * because of that. + * + * @param {Error} target The AxiosError being built. + * @param {Error} source The error being wrapped. + * + * @returns {void} + */ + function appendCauseStack(target, source) { + try { + var sourceStack = source && source.stack; + if (typeof sourceStack !== 'string' || !sourceStack) { + return; + } + var targetStack = target.stack; + if (typeof targetStack !== 'string' || !targetStack) { + return; + } + + // Each call to `from()` creates a fresh target. Re-wrapping includes the + // previous stack verbatim, adding one cause section per wrap. + var causeStack = CAUSED_BY_SEPARATOR + sourceStack; + target.stack = targetStack + causeStack; + Object.defineProperty(target, $causeStack, { + __proto__: null, + value: causeStack + }); + } catch (e) { + // Ignore failures from custom stack hooks or un-writable stack properties. + } + } + var AxiosError = /*#__PURE__*/function (_Error) { + /** + * Create an Error with the specified message, config, error code, request and response. + * + * @param {string} message The error message. + * @param {string} [code] The error code (for example, 'ECONNABORTED'). + * @param {Object} [config] The config. + * @param {Object} [request] The request. + * @param {Object} [response] The response. + * + * @returns {Error} The created error. + */ + function AxiosError(message, code, config, request, response) { + var _this; + _classCallCheck(this, AxiosError); + _this = _callSuper(this, AxiosError, [message]); + + // Make message enumerable to maintain backward compatibility + // The native Error constructor sets message as non-enumerable, + // but axios < v1.13.3 had it as enumerable + Object.defineProperty(_this, 'message', { + // Null-proto descriptor so a polluted Object.prototype.get cannot turn + // this data descriptor into an accessor descriptor on the way in. + __proto__: null, + value: message, + enumerable: true, + writable: true, + configurable: true + }); + _this.name = 'AxiosError'; + _this.isAxiosError = true; + code && (_this.code = code); + config && (_this.config = config); + request && (_this.request = request); + if (response) { + _this.response = response; + _this.status = response.status; + } + return _this; + } + _inherits(AxiosError, _Error); + return _createClass(AxiosError, [{ + key: "toJSON", + value: function toJSON() { + // Opt-in redaction: when the request config carries a `redact` array, the + // value of any matching key (case-insensitive, at any depth) is replaced + // with REDACTED in the serialized snapshot. Undefined or empty leaves the + // existing serialization behavior unchanged. + var config = this.config; + var redactKeys = config && utils$1.hasOwnProp(config, 'redact') ? config.redact : undefined; + var serializedConfig = utils$1.isArray(redactKeys) && redactKeys.length > 0 ? redactConfig(config, redactKeys) : utils$1.toJSONObject(config); + return { + // Standard + message: this.message, + name: this.name, + // Microsoft + description: this.description, + number: this.number, + // Mozilla + fileName: this.fileName, + lineNumber: this.lineNumber, + columnNumber: this.columnNumber, + stack: this.stack, + // Axios + config: serializedConfig, + code: this.code, + status: this.status + }; + } + }], [{ + key: "from", + value: function from(error, code, config, request, response, customProps) { + // `AggregateError` (thrown by Node on dual-stack/Happy-Eyeballs connection + // failures) has an empty `message`; its detail lives in `errors[]`. Without + // this, the wrapped error surfaces with a blank message (see #6721). + var message = error.message; + if (!message && utils$1.isArray(error.errors) && error.errors.length) { + message = aggregateErrorMessage(error); + } + var axiosError = new AxiosError(message, code || error.code, config, request, response); + // Match native `Error` `cause` semantics: non-enumerable. The wrapped + // error often carries circular internals (sockets, requests, agents), so + // an enumerable `cause` makes structured loggers (pino/winston) and any + // own-property walk throw "Converting circular structure to JSON". + // Regression from #6982; see #7205. `__proto__: null` mirrors the + // `message` descriptor below (prototype-pollution-safe descriptor). + Object.defineProperty(axiosError, 'cause', { + __proto__: null, + value: error, + writable: true, + enumerable: false, + configurable: true + }); + axiosError.name = error.name; + + // Inline the wrapped stack for reporters that read only `stack`; the `cause` + // property above already covers cause-aware tooling. + appendCauseStack(axiosError, error); + + // Preserve status from the original error if not already set from response + if (error.status != null && axiosError.status == null) { + axiosError.status = error.status; + } + customProps && Object.assign(axiosError, customProps); + return axiosError; + } + }]); + }(/*#__PURE__*/_wrapNativeSuper(Error)); // This can be changed to static properties as soon as the parser options in .eslint.cjs are updated. + AxiosError.ERR_BAD_OPTION_VALUE = 'ERR_BAD_OPTION_VALUE'; + AxiosError.ERR_BAD_OPTION = 'ERR_BAD_OPTION'; + AxiosError.ECONNABORTED = 'ECONNABORTED'; + AxiosError.ETIMEDOUT = 'ETIMEDOUT'; + AxiosError.ECONNREFUSED = 'ECONNREFUSED'; + AxiosError.ERR_NETWORK = 'ERR_NETWORK'; + AxiosError.ERR_FR_TOO_MANY_REDIRECTS = 'ERR_FR_TOO_MANY_REDIRECTS'; + AxiosError.ERR_DEPRECATED = 'ERR_DEPRECATED'; + AxiosError.ERR_BAD_RESPONSE = 'ERR_BAD_RESPONSE'; + AxiosError.ERR_BAD_REQUEST = 'ERR_BAD_REQUEST'; + AxiosError.ERR_CANCELED = 'ERR_CANCELED'; + AxiosError.ERR_NOT_SUPPORT = 'ERR_NOT_SUPPORT'; + AxiosError.ERR_INVALID_URL = 'ERR_INVALID_URL'; + AxiosError.ERR_FORM_DATA_DEPTH_EXCEEDED = 'ERR_FORM_DATA_DEPTH_EXCEEDED'; + + // eslint-disable-next-line strict + var httpAdapter = null; + + // Default nesting limit shared with the inverse transform (formDataToJSON) so + // the FormData <-> JSON round-trip stays symmetric. + var DEFAULT_FORM_DATA_MAX_DEPTH = 100; + + /** + * Determines if the given thing is a array or js object. + * + * @param {string} thing - The object or array to be visited. + * + * @returns {boolean} + */ + function isVisitable(thing) { + return utils$1.isPlainObject(thing) || utils$1.isArray(thing); + } + + /** + * It removes the brackets from the end of a string + * + * @param {string} key - The key of the parameter. + * + * @returns {string} the key without the brackets. + */ + function removeBrackets(key) { + return utils$1.endsWith(key, '[]') ? key.slice(0, -2) : key; + } + + /** + * It takes a path, a key, and a boolean, and returns a string + * + * @param {string} path - The path to the current key. + * @param {string} key - The key of the current object being iterated over. + * @param {string} dots - If true, the key will be rendered with dots instead of brackets. + * + * @returns {string} The path to the current key. + */ + function renderKey(path, key, dots) { + if (!path) return key; + return path.concat(key).map(function each(token, i) { + // eslint-disable-next-line no-param-reassign + token = removeBrackets(token); + return !dots && i ? '[' + token + ']' : token; + }).join(dots ? '.' : ''); + } + + /** + * If the array is an array and none of its elements are visitable, then it's a flat array. + * + * @param {Array} arr - The array to check + * + * @returns {boolean} + */ + function isFlatArray(arr) { + return utils$1.isArray(arr) && !arr.some(isVisitable); + } + var predicates = utils$1.toFlatObject(utils$1, {}, null, function filter(prop) { + return /^is[A-Z]/.test(prop); + }); + + /** + * Convert a data object to FormData + * + * @param {Object} obj + * @param {?Object} [formData] + * @param {?Object} [options] + * @param {Function} [options.visitor] + * @param {Boolean} [options.metaTokens = true] + * @param {Boolean} [options.dots = false] + * @param {?Boolean} [options.indexes = false] + * + * @returns {Object} + **/ + + /** + * It converts an object into a FormData object + * + * @param {Object} obj - The object to convert to form data. + * @param {string} formData - The FormData object to append to. + * @param {Object} options + * + * @returns + */ + function toFormData(obj, formData, options) { + if (!utils$1.isObject(obj)) { + throw new TypeError('target must be an object'); + } + + // eslint-disable-next-line no-param-reassign + formData = formData || new (FormData)(); + var option = function option(name, fallback) { + var value = utils$1.getSafeProp(options, name); + return utils$1.isUndefined(value) ? fallback : value; + }; + var metaTokens = option('metaTokens', true); + // eslint-disable-next-line no-use-before-define + var visitor = option('visitor') || defaultVisitor; + var dots = option('dots', false); + var indexes = option('indexes', false); + var _Blob = option('Blob') || typeof Blob !== 'undefined' && Blob; + var maxDepth = option('maxDepth', DEFAULT_FORM_DATA_MAX_DEPTH); + var useBlob = _Blob && utils$1.isSpecCompliantForm(formData); + var stack = []; + if (!utils$1.isFunction(visitor)) { + throw new TypeError('visitor must be a function'); + } + function convertValue(value) { + if (value === null) return ''; + if (utils$1.isDate(value)) { + return value.toISOString(); + } + if (utils$1.isBoolean(value)) { + return value.toString(); + } + if (!useBlob && utils$1.isBlob(value)) { + throw new AxiosError('Blob is not supported. Use a Buffer instead.'); + } + if (utils$1.isArrayBuffer(value) || utils$1.isTypedArray(value)) { + if (useBlob && typeof _Blob === 'function') { + return new _Blob([value]); + } + throw new AxiosError('Blob is not supported. Use a Buffer instead.', AxiosError.ERR_NOT_SUPPORT); + } + return value; + } + function throwIfMaxDepthExceeded(depth) { + if (depth > maxDepth) { + throw new AxiosError('Object is too deeply nested (' + depth + ' levels). Max depth: ' + maxDepth, AxiosError.ERR_FORM_DATA_DEPTH_EXCEEDED); + } + } + function stringifyWithDepthLimit(value, depth) { + if (maxDepth === Infinity) { + return JSON.stringify(value); + } + var ancestors = []; + return JSON.stringify(value, function limitDepth(_key, currentValue) { + if (!utils$1.isObject(currentValue)) { + return currentValue; + } + while (ancestors.length && ancestors[ancestors.length - 1] !== this) { + ancestors.pop(); + } + ancestors.push(currentValue); + throwIfMaxDepthExceeded(depth + ancestors.length - 1); + return currentValue; + }); + } + + /** + * Default visitor. + * + * @param {*} value + * @param {String|Number} key + * @param {Array} path + * @this {FormData} + * + * @returns {boolean} return true to visit the each prop of the value recursively + */ + function defaultVisitor(value, key, path) { + var arr = value; + if (utils$1.isReactNative(formData) && utils$1.isReactNativeBlob(value)) { + formData.append(renderKey(path, key, dots), convertValue(value)); + return false; + } + if (value && !path && _typeof(value) === 'object') { + if (utils$1.endsWith(key, '{}')) { + // eslint-disable-next-line no-param-reassign + key = metaTokens ? key : key.slice(0, -2); + // eslint-disable-next-line no-param-reassign + value = stringifyWithDepthLimit(value, 1); + } else if (utils$1.isArray(value) && isFlatArray(value) || (utils$1.isFileList(value) || utils$1.endsWith(key, '[]')) && (arr = utils$1.toArray(value))) { + // eslint-disable-next-line no-param-reassign + key = removeBrackets(key); + arr.forEach(function each(el, index) { + !(utils$1.isUndefined(el) || el === null) && formData.append( + // eslint-disable-next-line no-nested-ternary + indexes === true ? renderKey([key], index, dots) : indexes === null ? key : key + '[]', convertValue(el)); + }); + return false; + } + } + if (isVisitable(value)) { + return true; + } + formData.append(renderKey(path, key, dots), convertValue(value)); + return false; + } + var exposedHelpers = Object.assign(predicates, { + defaultVisitor: defaultVisitor, + convertValue: convertValue, + isVisitable: isVisitable + }); + function build(value, path) { + var depth = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0; + if (utils$1.isUndefined(value)) return; + throwIfMaxDepthExceeded(depth); + if (stack.indexOf(value) !== -1) { + throw new Error('Circular reference detected in ' + path.join('.')); + } + stack.push(value); + utils$1.forEach(value, function each(el, key) { + var result = !(utils$1.isUndefined(el) || el === null) && visitor.call(formData, el, utils$1.isString(key) ? key.trim() : key, path, exposedHelpers); + if (result === true) { + build(el, path ? path.concat(key) : [key], depth + 1); + } + }); + stack.pop(); + } + if (!utils$1.isObject(obj)) { + throw new TypeError('data must be an object'); + } + build(obj); + return formData; + } + + /** + * It encodes a string by replacing all characters that are not in the unreserved set with + * their percent-encoded equivalents + * + * @param {string} str - The string to encode. + * + * @returns {string} The encoded string. + */ + function encode$1(str) { + var charMap = { + '!': '%21', + "'": '%27', + '(': '%28', + ')': '%29', + '~': '%7E', + '%20': '+' + }; + return encodeURIComponent(str).replace(/[!'()~]|%20/g, function replacer(match) { + return charMap[match]; + }); + } + + /** + * It takes a params object and converts it to a FormData object + * + * @param {Object} params - The parameters to be converted to a FormData object. + * @param {Object} options - The options object passed to the Axios constructor. + * + * @returns {void} + */ + function AxiosURLSearchParams(params, options) { + this._pairs = []; + params && toFormData(params, this, options); + } + var prototype = AxiosURLSearchParams.prototype; + prototype.append = function append(name, value) { + this._pairs.push([name, value]); + }; + prototype.toString = function toString(encoder) { + var _this = this; + var _encode = encoder ? function (value) { + return encoder.call(_this, value, encode$1); + } : encode$1; + return this._pairs.map(function each(pair) { + return _encode(pair[0]) + '=' + _encode(pair[1]); + }, '').join('&'); + }; + + /** + * It replaces URL-encoded forms of `:`, `$`, `,`, and spaces with + * their plain counterparts (`:`, `$`, `,`, `+`). + * + * @param {string} val The value to be encoded. + * + * @returns {string} The encoded value. + */ + function encode(val) { + return encodeURIComponent(val).replace(/%3A/gi, ':').replace(/%24/g, '$').replace(/%2C/gi, ',').replace(/%20/g, '+'); + } + + /** + * Build a URL by appending params to the end + * + * @param {string} url The base of the url (e.g., http://www.google.com) + * @param {object} [params] The params to be appended + * @param {?(object|Function)} options + * + * @returns {string} The formatted url + */ + function buildURL(url, params, options) { + if (!params) { + return url; + } + url = url || ''; + var _options = utils$1.isFunction(options) ? { + serialize: options + } : options; + + // Read serializer options pollution-safely: own properties and methods on a + // class/template prototype are honored, but values injected onto a polluted + // Object.prototype are ignored. + var _encode = utils$1.getSafeProp(_options, 'encode') || encode; + var serializeFn = utils$1.getSafeProp(_options, 'serialize'); + var serializedParams; + if (serializeFn) { + serializedParams = serializeFn(params, _options); + } else { + serializedParams = utils$1.isURLSearchParams(params) ? params.toString() : new AxiosURLSearchParams(params, _options).toString(_encode); + } + if (serializedParams) { + var hashmarkIndex = url.indexOf('#'); + if (hashmarkIndex !== -1) { + url = url.slice(0, hashmarkIndex); + } + url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams; + } + return url; + } + + var $internals = Symbol('internals'); + + // `handlers` is public and may be replaced with a nullish value by user code; + // `clear()` has always tolerated that. Treat it as an empty stack rather than + // dereferencing it. + function countHandlers(handlers) { + return handlers ? handlers.length : 0; + } + function trimHandlers(handlers) { + if (!handlers) { + return; + } + while (handlers.length && handlers[handlers.length - 1] === null) { + handlers.pop(); + } + } + + // Preserve the array-key coercion used before IDs were stored in a Map, without + // treating null, empty strings, or noncanonical numeric strings as ID zero. + function normalizeHandlerId(id) { + if (typeof id === 'string' && id !== '' && String(Number(id)) === id) { + return Number(id); + } + return id; + } + function syncHandlerEntries(manager, internals) { + var handlers = manager.handlers; + var length = countHandlers(handlers); + if (handlers !== internals.handlersRef) { + internals.handlersRef = handlers; + internals.handlerEntries.clear(); + } else if (length !== internals.handlersLength) { + if (!length) { + internals.handlerEntries.clear(); + } else { + internals.handlerEntries.forEach(function removeStaleEntry(entry, id) { + if (handlers[entry.index] !== entry.handler) { + internals.handlerEntries["delete"](id); + } + }); + } + } + internals.handlersLength = length; + } + var InterceptorManager = /*#__PURE__*/function () { + function InterceptorManager() { + _classCallCheck(this, InterceptorManager); + this.handlers = []; + this[$internals] = { + handlersRef: this.handlers, + handlersLength: this.handlers.length, + handlerEntries: new Map(), + iterationDepth: 0, + nextId: 0 + }; + } + + /** + * Add a new interceptor to the stack + * + * @param {Function} fulfilled The function to handle `then` for a `Promise` + * @param {Function} rejected The function to handle `reject` for a `Promise` + * @param {Object} options The options for the interceptor, synchronous and runWhen + * + * @return {Number} An ID used to remove interceptor later + */ + return _createClass(InterceptorManager, [{ + key: "use", + value: function use(fulfilled, rejected, options) { + var handler = { + fulfilled: fulfilled, + rejected: rejected, + synchronous: options ? options.synchronous : false, + runWhen: options ? options.runWhen : null + }; + var internals = this[$internals]; + if (this.handlers == null) { + this.handlers = []; + } + syncHandlerEntries(this, internals); + var id = internals.nextId++; + this.handlers.push(handler); + internals.handlerEntries.set(id, { + handler: handler, + index: this.handlers.length - 1 + }); + internals.handlersLength = this.handlers.length; + return id; + } + + /** + * Remove an interceptor from the stack + * + * @param {Number} id The ID that was returned by `use` + * + * @returns {void} + */ + }, { + key: "eject", + value: function eject(id) { + var internals = this[$internals]; + syncHandlerEntries(this, internals); + var handlerId = normalizeHandlerId(id); + var entry = internals.handlerEntries.get(handlerId); + if (entry) { + internals.handlerEntries["delete"](handlerId); + + // Ignore IDs invalidated by clear or direct replacement of handlers. + if (this.handlers[entry.index] !== entry.handler) { + return; + } + this.handlers[entry.index] = null; + + // Do not reuse an index while forEach is walking its length snapshot. + if (!internals.iterationDepth) { + trimHandlers(this.handlers); + internals.handlersLength = this.handlers.length; + } + } + } + + /** + * Clear all interceptors from the stack + * + * @returns {void} + */ + }, { + key: "clear", + value: function clear() { + if (this.handlers) { + this.handlers = []; + syncHandlerEntries(this, this[$internals]); + } + } + + /** + * Iterate over all the registered interceptors + * + * This method is particularly useful for skipping over any + * interceptors that may have become `null` calling `eject`. + * + * @param {Function} fn The function to call for each interceptor + * + * @returns {void} + */ + }, { + key: "forEach", + value: function forEach(fn) { + var internals = this[$internals]; + syncHandlerEntries(this, internals); + internals.iterationDepth++; + try { + utils$1.forEach(this.handlers, function forEachHandler(h) { + if (h !== null) { + fn(h); + } + }); + } finally { + if (! --internals.iterationDepth) { + syncHandlerEntries(this, internals); + trimHandlers(this.handlers); + internals.handlersLength = countHandlers(this.handlers); + } + } + } + }]); + }(); + + var transitionalDefaults = { + silentJSONParsing: true, + forcedJSONParsing: true, + clarifyTimeoutError: false, + legacyInterceptorReqResOrdering: true, + advertiseZstdAcceptEncoding: false, + validateStatusUndefinedResolves: true, + encodeBasicAuthUsername: false + }; + + var URLSearchParams$1 = typeof URLSearchParams !== 'undefined' ? URLSearchParams : AxiosURLSearchParams; + + var FormData$1 = typeof FormData !== 'undefined' ? FormData : null; + + var Blob$1 = typeof Blob !== 'undefined' ? Blob : null; + + var platform$1 = { + isBrowser: true, + classes: { + URLSearchParams: URLSearchParams$1, + FormData: FormData$1, + Blob: Blob$1 + }, + protocols: ['http', 'https', 'file', 'blob', 'url', 'data'] + }; + + var hasBrowserEnv = typeof window !== 'undefined' && typeof document !== 'undefined'; + var _navigator = (typeof navigator === "undefined" ? "undefined" : _typeof(navigator)) === 'object' && navigator || undefined; + + /** + * Determine if we're running in a standard browser environment + * + * This allows axios to run in a web worker, and react-native. + * Both environments support XMLHttpRequest, but not fully standard globals. + * + * web workers: + * typeof window -> undefined + * typeof document -> undefined + * + * react-native: + * navigator.product -> 'ReactNative' + * nativescript + * navigator.product -> 'NativeScript' or 'NS' + * + * @returns {boolean} + */ + var hasStandardBrowserEnv = hasBrowserEnv && (!_navigator || ['ReactNative', 'NativeScript', 'NS'].indexOf(_navigator.product) < 0); + + /** + * Determine if we're running in a standard browser webWorker environment + * + * Although the `isStandardBrowserEnv` method indicates that + * `allows axios to run in a web worker`, the WebWorker will still be + * filtered out due to its judgment standard + * `typeof window !== 'undefined' && typeof document !== 'undefined'`. + * This leads to a problem when axios post `FormData` in webWorker + */ + var hasStandardBrowserWebWorkerEnv = function () { + return typeof WorkerGlobalScope !== 'undefined' && + // eslint-disable-next-line no-undef + self instanceof WorkerGlobalScope && typeof self.importScripts === 'function'; + }(); + var origin = hasBrowserEnv && window.location.href || 'http://localhost'; + + var utils = /*#__PURE__*/Object.freeze({ + __proto__: null, + hasBrowserEnv: hasBrowserEnv, + hasStandardBrowserEnv: hasStandardBrowserEnv, + hasStandardBrowserWebWorkerEnv: hasStandardBrowserWebWorkerEnv, + navigator: _navigator, + origin: origin + }); + + var platform = _objectSpread2(_objectSpread2({}, utils), platform$1); + + function toURLEncodedForm(data, options) { + return toFormData(data, new platform.classes.URLSearchParams(), _objectSpread2({ + visitor: function visitor(value, key, path, helpers) { + if (platform.isNode && utils$1.isBuffer(value)) { + this.append(key, value.toString('base64')); + return false; + } + return helpers.defaultVisitor.apply(this, arguments); + } + }, options)); + } + + var MAX_DEPTH = DEFAULT_FORM_DATA_MAX_DEPTH; + function throwIfDepthExceeded(index) { + if (index > MAX_DEPTH) { + throw new AxiosError('FormData field is too deeply nested (' + index + ' levels). Max depth: ' + MAX_DEPTH, AxiosError.ERR_FORM_DATA_DEPTH_EXCEEDED); + } + } + + /** + * It takes a string like `foo[x][y][z]` and returns an array like `['foo', 'x', 'y', 'z'] + * + * @param {string} name - The name of the property to get. + * + * @returns An array of strings. + */ + function parsePropPath(name) { + // foo[x][y][z] -> ['foo', 'x', 'y', 'z'] + // foo.x.y.z -> ['foo', 'x', 'y', 'z'] + // A path is split on `.` and on `[...]` groups. A segment — whether written + // in dot notation or captured inside brackets — may contain any character + // except `.`, `[` and `]`, so a key like `user-name` or `user name` is kept + // literal instead of being split (#5402). `.`, `[` and `]` keep their existing + // meaning, e.g. `foo[bar.baz]` -> ['foo', 'bar', 'baz'] and `[]` is an array push. + // Excluding `[` from the bracket group also makes the match fail fast at the + // next `[`, so a malformed name cannot rescan to the end of the string from + // every unmatched `[` — parsing stays linear in the length of the name. + var path = []; + var pattern = /[^.[\]]+|\[([^.[\]]*)]/g; + var match; + while ((match = pattern.exec(name)) !== null) { + throwIfDepthExceeded(path.length); + path.push(match[0] === '[]' ? '' : match[1] || match[0]); + } + return path; + } + + /** + * Convert an array to an object. + * + * @param {Array} arr - The array to convert to an object. + * + * @returns An object with the same keys and values as the array. + */ + function arrayToObject(arr) { + var obj = {}; + var keys = Object.keys(arr); + var i; + var len = keys.length; + var key; + for (i = 0; i < len; i++) { + key = keys[i]; + obj[key] = arr[key]; + } + return obj; + } + function normalizeArray(value) { + if (!utils$1.isArray(value)) return value; + var keys = Object.keys(value); + return keys.length !== value.length || keys.some(function (key, index) { + return key !== String(index); + }) ? arrayToObject(value) : value; + } + function normalizeArrays(obj) { + var pending = [obj]; + var _loop = function _loop() { + var target = pending.pop(); + Object.keys(target).forEach(function (key) { + var value = target[key] = normalizeArray(target[key]); + if (utils$1.isArray(value) || utils$1.isPlainObject(value)) { + pending.push(value); + } + }); + }; + while (pending.length) { + _loop(); + } + return obj; + } + + /** + * It takes a FormData object and returns a JavaScript object + * + * @param {string} formData The FormData object to convert to JSON. + * + * @returns {Object | null} The converted object. + */ + function formDataToJSON(formData) { + function buildPath(path, value, target, index) { + throwIfDepthExceeded(index); + var name = path[index++]; + if (name === '__proto__') return true; + var isNumericKey = Number.isFinite(+name); + var isLast = index >= path.length; + name = !name && utils$1.isArray(target) ? target.length : name; + if (isLast) { + if (utils$1.hasOwnProp(target, name)) { + target[name] = normalizeArray(target[name]); + target[name] = utils$1.isArray(target[name]) ? target[name].concat(value) : [target[name], value]; + } else { + target[name] = value; + } + return !isNumericKey; + } + if (!utils$1.hasOwnProp(target, name) || !utils$1.isObject(target[name])) { + target[name] = []; + } + var result = buildPath(path, value, target[name], index); + if (result && utils$1.isArray(target[name])) { + target[name] = arrayToObject(target[name]); + } + return !isNumericKey; + } + if (utils$1.isFormData(formData) && utils$1.isFunction(formData.entries)) { + var obj = {}; + utils$1.forEachEntry(formData, function (name, value) { + buildPath(parsePropPath(name), value, obj, 0); + }); + return normalizeArrays(obj); + } + return null; + } + + var methodList = Object.freeze(['get', 'delete', 'head', 'options', 'post', 'put', 'patch', 'purge', 'link', 'unlink', 'query']); + + var own = function own(obj, key) { + return obj != null && utils$1.hasOwnProp(obj, key) ? obj[key] : undefined; + }; + + /** + * It takes a string, tries to parse it, and if it fails, it returns the stringified version + * of the input + * + * @param {any} rawValue - The value to be stringified. + * @param {Function} parser - A function that parses a string into a JavaScript object. + * @param {Function} encoder - A function that takes a value and returns a string. + * + * @returns {string} A stringified version of the rawValue. + */ + function stringifySafely(rawValue, parser, encoder) { + if (utils$1.isString(rawValue)) { + try { + (parser || JSON.parse)(rawValue); + return utils$1.trim(rawValue); + } catch (e) { + if (e.name !== 'SyntaxError') { + throw e; + } + } + } + return (encoder || JSON.stringify)(rawValue); + } + var defaults = { + transitional: transitionalDefaults, + adapter: ['xhr', 'http', 'fetch'], + transformRequest: [function transformRequest(data, headers) { + var contentType = headers.getContentType() || ''; + var hasJSONContentType = contentType.indexOf('application/json') > -1; + var isObjectPayload = utils$1.isObject(data); + if (isObjectPayload && utils$1.isHTMLForm(data)) { + data = new FormData(data); + } + var isFormData = utils$1.isFormData(data); + if (isFormData) { + return hasJSONContentType ? JSON.stringify(formDataToJSON(data)) : data; + } + if (utils$1.isArrayBuffer(data) || utils$1.isBuffer(data) || utils$1.isStream(data) || utils$1.isFile(data) || utils$1.isBlob(data) || utils$1.isReadableStream(data)) { + return data; + } + if (utils$1.isArrayBufferView(data)) { + return data.buffer; + } + if (utils$1.isURLSearchParams(data)) { + headers.setContentType('application/x-www-form-urlencoded;charset=utf-8', false); + return data.toString(); + } + var isFileList; + if (isObjectPayload) { + var formSerializer = own(this, 'formSerializer'); + if (contentType.indexOf('application/x-www-form-urlencoded') > -1) { + return toURLEncodedForm(data, formSerializer).toString(); + } + if ((isFileList = utils$1.isFileList(data)) || contentType.indexOf('multipart/form-data') > -1) { + var env = own(this, 'env'); + var _FormData = env && env.FormData; + return toFormData(isFileList ? { + 'files[]': data + } : data, _FormData && new _FormData(), formSerializer); + } + } + if (isObjectPayload || hasJSONContentType) { + headers.setContentType('application/json', false); + return stringifySafely(data); + } + return data; + }], + transformResponse: [function transformResponse(data) { + var transitional = own(this, 'transitional') || defaults.transitional; + var forcedJSONParsing = transitional && transitional.forcedJSONParsing; + var responseType = own(this, 'responseType'); + var JSONRequested = responseType === 'json'; + if (utils$1.isResponse(data) || utils$1.isReadableStream(data)) { + return data; + } + if (data && utils$1.isString(data) && (forcedJSONParsing && !responseType || JSONRequested)) { + var silentJSONParsing = transitional && transitional.silentJSONParsing; + var strictJSONParsing = !silentJSONParsing && JSONRequested; + try { + return JSON.parse(data, own(this, 'parseReviver')); + } catch (e) { + if (strictJSONParsing) { + if (e.name === 'SyntaxError') { + throw AxiosError.from(e, AxiosError.ERR_BAD_RESPONSE, this, null, own(this, 'response')); + } + throw e; + } + } + } + return data; + }], + /** + * A timeout in milliseconds to abort a request. If set to 0 (default) a + * timeout is not created. + */ + timeout: 0, + xsrfCookieName: 'XSRF-TOKEN', + xsrfHeaderName: 'X-XSRF-TOKEN', + maxContentLength: -1, + maxBodyLength: -1, + env: { + FormData: platform.classes.FormData, + Blob: platform.classes.Blob + }, + validateStatus: function validateStatus(status) { + return status >= 200 && status < 300; + }, + headers: { + common: { + Accept: 'application/json, text/plain, */*', + 'Content-Type': undefined + } + } + }; + utils$1.forEach(methodList, function (method) { + defaults.headers[method] = {}; + }); + + /** + * Transform the data for a request or a response + * + * @param {Array|Function} fns A single function or Array of functions + * @param {?Object} response The response object + * + * @returns {*} The resulting transformed data + */ + function transformData(fns, response) { + var config = this || defaults; + var context = response || config; + var headers = AxiosHeaders.from(context.headers); + var data = context.data; + utils$1.forEach(fns, function transform(fn) { + data = fn.call(config, data, headers.normalize(), response ? response.status : undefined); + }); + headers.normalize(); + return data; + } + + function isCancel(value) { + return !!(value && value.__CANCEL__); + } + + var CanceledError = /*#__PURE__*/function (_AxiosError) { + /** + * A `CanceledError` is an object that is thrown when an operation is canceled. + * + * @param {string=} message The message. + * @param {Object=} config The config. + * @param {Object=} request The request. + * + * @returns {CanceledError} The created error. + */ + function CanceledError(message, config, request) { + var _this; + _classCallCheck(this, CanceledError); + _this = _callSuper(this, CanceledError, [message == null ? 'canceled' : message, AxiosError.ERR_CANCELED, config, request]); + _this.name = 'CanceledError'; + _this.__CANCEL__ = true; + return _this; + } + _inherits(CanceledError, _AxiosError); + return _createClass(CanceledError); + }(AxiosError); + + /** + * Resolve or reject a Promise based on response status. + * + * @param {Function} resolve A function that resolves the promise. + * @param {Function} reject A function that rejects the promise. + * @param {object} response The response. + * + * @returns {object} The response. + */ + function settle(resolve, reject, response) { + var validateStatus = response.config.validateStatus; + if (!response.status || !validateStatus || validateStatus(response.status)) { + resolve(response); + } else { + reject(new AxiosError('Request failed with status code ' + response.status, response.status >= 400 && response.status < 500 ? AxiosError.ERR_BAD_REQUEST : AxiosError.ERR_BAD_RESPONSE, response.config, response.request, response)); + } + } + + var urlParserControlCharacters = /[\t\n\r]/g; + + /** + * Match WHATWG URL preprocessing before checking a URL's protocol. + * + * @param {string} url + * + * @returns {string} + */ + function normalizeURLForProtocolCheck(url) { + if (typeof url !== 'string') { + return url; + } + var start = 0; + while (start < url.length && url.charCodeAt(start) <= 0x20) { + start++; + } + return url.slice(start).replace(urlParserControlCharacters, ''); + } + + function parseProtocol(url) { + var match = /^([-+\w]{1,25}):(?:\/\/)?/.exec(url); + return match && match[1].toLowerCase() || ''; + } + + var decodeCookieValue = function decodeCookieValue(value) { + try { + return decodeURIComponent(value); + } catch (e) { + return value; + } + }; + var cookies = platform.hasStandardBrowserEnv ? + // Standard browser envs support document.cookie + { + write: function write(name, value, expires, path, domain, secure, sameSite) { + if (typeof document === 'undefined') return; + var cookie = ["".concat(name, "=").concat(encodeURIComponent(value))]; + if (utils$1.isNumber(expires)) { + cookie.push("expires=".concat(new Date(expires).toUTCString())); + } + if (utils$1.isString(path)) { + cookie.push("path=".concat(path)); + } + if (utils$1.isString(domain)) { + cookie.push("domain=".concat(domain)); + } + if (secure === true) { + cookie.push('secure'); + } + if (utils$1.isString(sameSite)) { + cookie.push("SameSite=".concat(sameSite)); + } + document.cookie = cookie.join('; '); + }, + read: function read(name) { + if (typeof document === 'undefined') return null; + var cookieString = document.cookie; + if (!cookieString) return null; + // Match name=value by splitting on the semicolon separator instead of building a + // RegExp from `name` — interpolating an unescaped string into a RegExp would let + // metacharacters (e.g. `.+?` in an attacker-influenced cookie name) cause ReDoS or + // match the wrong cookie. Browsers may serialize cookie pairs as either ";" or + // "; ", so ignore optional whitespace before each cookie name. + var cookies = cookieString.split(';'); + for (var i = 0; i < cookies.length; i++) { + var cookie = cookies[i].replace(/^\s+/, ''); + var eq = cookie.indexOf('='); + if (eq !== -1 && cookie.slice(0, eq) === name) { + return decodeCookieValue(cookie.slice(eq + 1)); + } + } + return null; + }, + readAsync: function readAsync(name) { + var _this = this; + return _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee() { + var store, cookie; + return _regenerator().w(function (_context) { + while (1) switch (_context.p = _context.n) { + case 0: + _context.p = 0; + store = typeof window !== 'undefined' && window.cookieStore; + if (!(store && utils$1.isFunction(store.get))) { + _context.n = 2; + break; + } + _context.n = 1; + return store.get(name); + case 1: + cookie = _context.v; + return _context.a(2, cookie ? decodeCookieValue(cookie.value) : null); + case 2: + _context.n = 4; + break; + case 3: + _context.p = 3; + _context.v; + case 4: + return _context.a(2, _this.read(name)); + } + }, _callee, null, [[0, 3]]); + }))(); + }, + remove: function remove(name) { + this.write(name, '', Date.now() - 86400000, '/'); + } + } : + // Non-standard browser env (web workers, react-native) lack needed support. + { + write: function write() {}, + read: function read() { + return null; + }, + readAsync: function readAsync() { + return _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee2() { + return _regenerator().w(function (_context2) { + while (1) switch (_context2.n) { + case 0: + return _context2.a(2, null); + } + }, _callee2); + }))(); + }, + remove: function remove() {} + }; + + /** + * Calculate data maxRate + * @param {Number} [samplesCount= 10] + * @param {Number} [min= 1000] + * @returns {Function} + */ + function speedometer(samplesCount, min) { + samplesCount = samplesCount || 10; + var bytes = new Array(samplesCount); + var timestamps = new Array(samplesCount); + var head = 0; + var tail = 0; + var firstSampleTS; + min = min !== undefined ? min : 1000; + return function push(chunkLength) { + var now = Date.now(); + var startedAt = timestamps[tail]; + if (!firstSampleTS) { + firstSampleTS = now; + } + bytes[head] = chunkLength; + timestamps[head] = now; + var i = tail; + var bytesCount = 0; + while (i !== head) { + bytesCount += bytes[i++]; + i = i % samplesCount; + } + head = (head + 1) % samplesCount; + if (head === tail) { + tail = (tail + 1) % samplesCount; + } + if (now - firstSampleTS < min) { + return; + } + var passed = startedAt && now - startedAt; + return passed ? Math.round(bytesCount * 1000 / passed) : undefined; + }; + } + + /** + * Throttle decorator + * @param {Function} fn + * @param {Number} freq + * @return {Array} + */ + function throttle(fn, freq) { + var timestamp = 0; + var threshold = 1000 / freq; + var lastArgs; + var timer; + var invoke = function invoke(args) { + var now = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : Date.now(); + timestamp = now; + lastArgs = null; + if (timer) { + clearTimeout(timer); + timer = null; + } + fn.apply(void 0, _toConsumableArray(args)); + }; + var throttled = function throttled() { + var now = Date.now(); + var passed = now - timestamp; + for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + if (passed >= threshold) { + invoke(args, now); + } else { + lastArgs = args; + if (!timer) { + timer = setTimeout(function () { + timer = null; + invoke(lastArgs); + }, threshold - passed); + } + } + }; + var flush = function flush() { + return lastArgs && invoke(lastArgs); + }; + var flushWith = function flushWith() { + for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { + args[_key2] = arguments[_key2]; + } + return invoke(args); + }; + return [throttled, flush, flushWith]; + } + + var progressEventReducer = function progressEventReducer(listener, isDownloadStream) { + var freq = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 3; + var bytesNotified = 0; + var _speedometer = speedometer(50, 250); + return throttle(function (e) { + if (!e || !utils$1.isNumber(e.loaded)) { + return; + } + var rawLoaded = e.loaded; + var total = e.lengthComputable ? e.total : undefined; + var loaded = Math.max(0, total != null ? Math.min(rawLoaded, total) : rawLoaded); + var progressBytes = Math.max(0, loaded - bytesNotified); + var rate = _speedometer(progressBytes); + bytesNotified = Math.max(bytesNotified, loaded); + var data = _defineProperty({ + loaded: loaded, + total: total, + progress: total ? loaded / total : undefined, + bytes: progressBytes, + rate: rate ? rate : undefined, + estimated: rate && total ? (total - loaded) / rate : undefined, + event: e, + lengthComputable: total != null + }, isDownloadStream ? 'download' : 'upload', true); + listener(data); + }, freq); + }; + var progressEventDecorator = function progressEventDecorator(total, throttled) { + var lengthComputable = total != null; + return [function (loaded) { + return throttled[0]({ + lengthComputable: lengthComputable, + total: total, + loaded: loaded + }); + }, throttled[1]]; + }; + var asyncDecorator = function asyncDecorator(fn) { + var scheduler = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : utils$1.asap; + return function () { + for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + return scheduler(function () { + return fn.apply(void 0, args); + }); + }; + }; + + var isURLSameOrigin = platform.hasStandardBrowserEnv ? function (origin) { + return function (url) { + url = new URL(url, document.baseURI || platform.origin); + return origin.protocol === url.protocol && origin.host === url.host && origin.port === url.port; + }; + }(new URL(platform.origin)) : function () { + return true; + }; + + /** + * Determines whether the specified URL is absolute + * + * @param {string} url The URL to test + * + * @returns {boolean} True if the specified URL is absolute, otherwise false + */ + function isAbsoluteURL(url) { + // A URL is considered absolute if it begins with "://" or "//" (protocol-relative URL). + // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed + // by any combination of letters, digits, plus, period, or hyphen. + if (typeof url !== 'string') { + return false; + } + return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url); + } + + /** + * Creates a new URL by combining the specified URLs + * + * @param {string} baseURL The base URL + * @param {string} relativeURL The relative URL + * + * @returns {string} The combined URL + */ + function combineURLs(baseURL, relativeURL) { + if (!relativeURL) { + return baseURL; + } + var end = baseURL.length; + while (end > 0 && baseURL.charCodeAt(end - 1) === 47) { + end--; + } + return baseURL.slice(0, end) + '/' + relativeURL.replace(/^\/+/, ''); + } + + var malformedHttpProtocol = /^https?:(?!\/\/)/i; + + // Redact the parts of a URL that can carry secrets before it is embedded in an + // error message. AxiosError.toJSON() serializes `message` verbatim and errors + // are commonly logged, while the opt-in `config.redact` model only cleans + // config keys — it cannot reach the message. Redact only the genuinely + // sensitive substrings — userinfo (credentials), query parameter values and + // fragment contents — with the same REDACTED marker the config redaction uses, + // while keeping the scheme, host, path and parameter names so the offending + // request stays accurately identifiable. + function redactFragment(fragment) { + if (!fragment) { + return fragment; + } + return fragment.replace(/(^|&)([^=&]*=)?[^&]+/g, function (match, separator) { + var parameterName = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : ''; + return "".concat(separator).concat(parameterName).concat(REDACTED); + }); + } + function redactSensitiveURLParts(url) { + var redactedURL = url.replace(/^(https?:\/{0,2})[^/?#]*@/i, "$1".concat(REDACTED, "@")); + var fragmentIndex = redactedURL.indexOf('#'); + var urlWithoutFragment = fragmentIndex === -1 ? redactedURL : redactedURL.slice(0, fragmentIndex); + var redactedURLWithoutFragment = urlWithoutFragment.replace(/([?&][^=&#]*=)[^&#]*/g, "$1".concat(REDACTED)); + if (fragmentIndex === -1) { + return redactedURLWithoutFragment; + } + return "".concat(redactedURLWithoutFragment, "#").concat(redactFragment(redactedURL.slice(fragmentIndex + 1))); + } + function assertValidHttpProtocolURL(url, config) { + if (typeof url === 'string') { + var normalizedURL = normalizeURLForProtocolCheck(url); + if (malformedHttpProtocol.test(normalizedURL)) { + throw new AxiosError("Invalid URL ".concat(JSON.stringify(redactSensitiveURLParts(normalizedURL)), ": missing \"//\" after protocol"), AxiosError.ERR_INVALID_URL, config); + } + } + } + + /** + * Creates a new URL by combining the baseURL with the requestedURL, + * only when the requestedURL is not already an absolute URL. + * If the requestURL is absolute, this function returns the requestedURL untouched. + * + * @param {string} baseURL The base URL + * @param {string} requestedURL Absolute or relative URL to combine + * + * @returns {string} The combined full path + */ + function buildFullPath(baseURL, requestedURL, allowAbsoluteUrls, config) { + assertValidHttpProtocolURL(requestedURL, config); + var isRelativeUrl = !isAbsoluteURL(requestedURL); + if (baseURL && (isRelativeUrl || allowAbsoluteUrls === false)) { + assertValidHttpProtocolURL(baseURL, config); + return combineURLs(baseURL, requestedURL); + } + return requestedURL; + } + + function assertParamsAcyclic(params) { + var pending = [{ + value: params + }]; + var active = new WeakSet(); + var visited = new WeakSet(); + var _loop = function _loop() { + var _pending$pop = pending.pop(), + value = _pending$pop.value, + done = _pending$pop.done; + if (!utils$1.isPlainObject(value) && !utils$1.isArray(value)) return 0; // continue + if (done) { + active["delete"](value); + return 0; // continue + } + if (active.has(value)) { + throw new AxiosError('Circular reference detected in params', AxiosError.ERR_BAD_OPTION_VALUE); + } + if (visited.has(value)) return 0; // continue + visited.add(value); + active.add(value); + pending.push({ + value: value, + done: true + }); + var keys = Object.keys(value); + if (Object.getOwnPropertySymbols && Object.getOwnPropertyDescriptor) { + Object.getOwnPropertySymbols(value).forEach(function (key) { + var descriptor = Object.getOwnPropertyDescriptor(value, key); + if (descriptor && descriptor.enumerable) keys.push(key); + }); + } + // Shallow array elements retain fields filtered during plain-object merges. + // Inspect reserved data properties without evaluating their accessors. + keys.forEach(function (key) { + if (key === '__proto__' || key === 'constructor' || key === 'prototype') { + var descriptor = Object.getOwnPropertyDescriptor(value, key); + if (descriptor && utils$1.hasOwnProp(descriptor, 'value')) { + pending.push({ + value: descriptor.value + }); + } + } else { + pending.push({ + value: value[key] + }); + } + }); + }, + _ret; + while (pending.length) { + _ret = _loop(); + if (_ret === 0) continue; + } + } + + var headersToObject = function headersToObject(thing) { + return thing instanceof AxiosHeaders ? _objectSpread2({}, thing) : thing; + }; + var ownEnumerableKeys = function ownEnumerableKeys(thing) { + if (Object.getOwnPropertySymbols && Object.getOwnPropertyDescriptor) { + return Object.keys(thing).concat(Object.getOwnPropertySymbols(thing).filter(function (symbol) { + var descriptor = Object.getOwnPropertyDescriptor(thing, symbol); + return descriptor && descriptor.enumerable; + })); + } + return Object.keys(thing); + }; + + // Copy params without recursive merges so the serializer remains responsible + // for its depth policy. Only visit defaults that contribute to the result. + function mergeParams(a, b) { + var pending = []; + var copies = new WeakMap(); + var empty = {}; + function copy(target, source) { + if (!utils$1.isPlainObject(source)) { + return utils$1.isArray(source) ? source.slice() : source; + } + var base = utils$1.isPlainObject(target) ? target : empty; + var bases = copies.get(source); + if (!bases) { + bases = new WeakMap(); + copies.set(source, bases); + } + if (bases.has(base)) return bases.get(base); + var result = {}; + bases.set(base, result); + pending.push({ + base: base, + source: source, + result: result + }); + return result; + } + var result = utils$1.isUndefined(b) ? copy(undefined, a) : copy(a, b); + var _loop = function _loop() { + var _pending$pop = pending.pop(), + base = _pending$pop.base, + source = _pending$pop.source, + target = _pending$pop.result; + var baseKeys = new Set(ownEnumerableKeys(base)); + var sourceKeys = new Set(ownEnumerableKeys(source)); + var keys = new Set([].concat(_toConsumableArray(baseKeys), _toConsumableArray(sourceKeys))); + keys.forEach(function (key) { + if (key === '__proto__' || key === 'constructor' || key === 'prototype') return; + var hasSource = sourceKeys.has(key); + var value = hasSource ? source[key] : undefined; + var previous = (!hasSource || utils$1.isPlainObject(value)) && baseKeys.has(key) ? base[key] : undefined; + target[key] = hasSource ? copy(previous, value) : copy(undefined, previous); + }); + }; + while (pending.length) { + _loop(); + } + assertParamsAcyclic(result); + return result; + } + function getMergedValue(target, source, prop, caseless) { + if (utils$1.isPlainObject(target) && utils$1.isPlainObject(source)) { + return utils$1.merge.call({ + caseless: caseless + }, target, source); + } else if (utils$1.isPlainObject(source)) { + return utils$1.merge({}, source); + } else if (utils$1.isArray(source)) { + return source.slice(); + } + return source; + } + function mergeDeepProperties(a, b, prop, caseless) { + if (!utils$1.isUndefined(b)) { + return getMergedValue(a, b, prop, caseless); + } else if (!utils$1.isUndefined(a)) { + return getMergedValue(undefined, a, prop, caseless); + } + } + + // eslint-disable-next-line consistent-return + function valueFromConfig2(a, b) { + if (!utils$1.isUndefined(b)) { + return getMergedValue(undefined, b); + } + } + + // eslint-disable-next-line consistent-return + function defaultToConfig2(a, b) { + if (!utils$1.isUndefined(b)) { + return getMergedValue(undefined, b); + } else if (!utils$1.isUndefined(a)) { + return getMergedValue(undefined, a); + } + } + function getMergedTransitionalOption(config1, config2, prop) { + var transitional2 = utils$1.hasOwnProp(config2, 'transitional') ? config2.transitional : undefined; + if (!utils$1.isUndefined(transitional2)) { + if (utils$1.isPlainObject(transitional2)) { + if (utils$1.hasOwnProp(transitional2, prop)) { + return transitional2[prop]; + } + } else { + return undefined; + } + } + var transitional1 = utils$1.hasOwnProp(config1, 'transitional') ? config1.transitional : undefined; + if (utils$1.isPlainObject(transitional1) && utils$1.hasOwnProp(transitional1, prop)) { + return transitional1[prop]; + } + return undefined; + } + + // eslint-disable-next-line consistent-return + function mergeDirectKeys(a, b, prop, config1, config2) { + if (utils$1.hasOwnProp(config2, prop)) { + return getMergedValue(a, b); + } else if (utils$1.hasOwnProp(config1, prop)) { + return getMergedValue(undefined, a); + } + } + function mergeHeaders(a, b, prop) { + return mergeDeepProperties(headersToObject(a), headersToObject(b), prop, true); + } + + // Null-proto, frozen descriptor so a polluted Object.prototype.get cannot turn + // this data descriptor into an accessor descriptor on the way in. + // defineProperty only reads it, so one shared instance serves every call. + var hasOwnPropertyDescriptor = Object.freeze({ + __proto__: null, + value: Object.prototype.hasOwnProperty, + enumerable: false, + writable: true, + configurable: true + }); + + // The strategy table and the strategies above are stateless, so they are + // built once at module load instead of on every call: mergeConfig runs at + // most twice per request (once from a method alias, once from `_request`). + var mergeMap = { + url: valueFromConfig2, + method: valueFromConfig2, + data: valueFromConfig2, + baseURL: defaultToConfig2, + transformRequest: defaultToConfig2, + transformResponse: defaultToConfig2, + params: mergeParams, + paramsSerializer: defaultToConfig2, + timeout: defaultToConfig2, + timeoutErrorMessage: defaultToConfig2, + withCredentials: defaultToConfig2, + withXSRFToken: defaultToConfig2, + adapter: defaultToConfig2, + responseType: defaultToConfig2, + xsrfCookieName: defaultToConfig2, + xsrfHeaderName: defaultToConfig2, + onUploadProgress: defaultToConfig2, + onDownloadProgress: defaultToConfig2, + decompress: defaultToConfig2, + maxContentLength: defaultToConfig2, + maxBodyLength: defaultToConfig2, + beforeRedirect: defaultToConfig2, + transport: defaultToConfig2, + httpAgent: defaultToConfig2, + httpsAgent: defaultToConfig2, + cancelToken: defaultToConfig2, + socketPath: defaultToConfig2, + allowedSocketPaths: defaultToConfig2, + responseEncoding: defaultToConfig2, + validateStatus: mergeDirectKeys, + headers: mergeHeaders + }; + + /** + * Config-specific merge-function which creates a new config-object + * by merging two configuration objects together. + * + * @param {Object} config1 + * @param {Object} config2 + * + * @returns {Object} New object resulting from merging config2 to config1 + */ + function mergeConfig(config1, config2) { + // eslint-disable-next-line no-param-reassign + config1 = config1 || {}; + config2 = config2 || {}; + + // Use a null-prototype object so that downstream reads such as `config.auth` + // or `config.baseURL` cannot inherit polluted values from Object.prototype. + // `hasOwnProperty` is restored as a non-enumerable own slot to preserve + // ergonomics for user code that relies on it. + var config = Object.create(null); + Object.defineProperty(config, 'hasOwnProperty', hasOwnPropertyDescriptor); + var keys = ownEnumerableKeys(_objectSpread2(_objectSpread2({}, config1), config2)); + for (var i = 0, len = keys.length; i < len; i++) { + var prop = keys[i]; + if (prop === '__proto__' || prop === 'constructor' || prop === 'prototype') continue; + var merge = utils$1.hasOwnProp(mergeMap, prop) ? mergeMap[prop] : mergeDeepProperties; + var a = utils$1.hasOwnProp(config1, prop) ? config1[prop] : undefined; + var b = utils$1.hasOwnProp(config2, prop) ? config2[prop] : undefined; + var configValue = merge === mergeDirectKeys ? merge(a, b, prop, config1, config2) : merge(a, b, prop); + utils$1.isUndefined(configValue) && merge !== mergeDirectKeys || (config[prop] = configValue); + } + if (utils$1.hasOwnProp(config2, 'validateStatus') && utils$1.isUndefined(config2.validateStatus) && getMergedTransitionalOption(config1, config2, 'validateStatusUndefinedResolves') === false) { + if (utils$1.hasOwnProp(config1, 'validateStatus')) { + config.validateStatus = getMergedValue(undefined, config1.validateStatus); + } else { + delete config.validateStatus; + } + } + return config; + } + + var FORM_DATA_CONTENT_HEADERS = ['content-type', 'content-length']; + + /** + * Apply the headers generated by a FormData implementation to the request headers, + * honoring the `formDataHeaderPolicy` option: with 'content-only', copy only the + * content-* headers; otherwise merge all of them. + * + * @param {AxiosHeaders} headers - the request headers to mutate + * @param {Object | null | undefined} formHeaders - headers produced by the FormData implementation + * @param {String} [policy] - the resolved `formDataHeaderPolicy` config value + * + * @returns {void} + */ + function setFormDataHeaders(headers, formHeaders, policy) { + if (policy !== 'content-only') { + headers.set(formHeaders); + return; + } + Object.entries(formHeaders || {}).forEach(function (_ref) { + var _ref2 = _slicedToArray(_ref, 2), + key = _ref2[0], + val = _ref2[1]; + if (FORM_DATA_CONTENT_HEADERS.includes(key.toLowerCase())) { + headers.set(key, val); + } + }); + } + + /** + * Encode a UTF-8 string to a Latin-1 byte string for use with btoa(). + * This is a modern replacement for the deprecated unescape(encodeURIComponent(str)) pattern. + * + * @param {string} str The string to encode + * + * @returns {string} UTF-8 bytes as a Latin-1 string + */ + var encodeUTF8$1 = function encodeUTF8(str) { + return encodeURIComponent(str).replace(/%([0-9A-F]{2})/gi, function (_, hex) { + return String.fromCharCode(parseInt(hex, 16)); + }); + }; + var readCookie = function readCookie(name) { + return cookies.read(name); + }; + function resolveConfig(config) { + var readXsrfCookie = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : readCookie; + var newConfig = mergeConfig({}, config); + + // Read only own properties to prevent prototype pollution gadgets + // (e.g. Object.prototype.baseURL = 'https://evil.com'). + var own = function own(key) { + return utils$1.hasOwnProp(newConfig, key) ? newConfig[key] : undefined; + }; + var data = own('data'); + var withXSRFToken = own('withXSRFToken'); + var xsrfHeaderName = own('xsrfHeaderName'); + var xsrfCookieName = own('xsrfCookieName'); + var headers = own('headers'); + var auth = own('auth'); + var baseURL = own('baseURL'); + var allowAbsoluteUrls = own('allowAbsoluteUrls'); + var url = own('url'); + newConfig.headers = headers = AxiosHeaders.from(headers); + newConfig.url = buildURL(buildFullPath(baseURL, url, allowAbsoluteUrls, newConfig), own('params'), own('paramsSerializer')); + + // HTTP basic authentication + if (auth) { + var username = utils$1.getSafeProp(auth, 'username') || ''; + var password = utils$1.getSafeProp(auth, 'password') || ''; + var transitional = own('transitional'); + var encodeUsername = transitional && utils$1.hasOwnProp(transitional, 'encodeBasicAuthUsername') && transitional.encodeBasicAuthUsername === true; + try { + headers.set('Authorization', + // Preserve legacy username bytes unless the caller opts in to UTF-8. + 'Basic ' + btoa((encodeUsername ? encodeUTF8$1(username) : username) + ':' + (password ? encodeUTF8$1(password) : ''))); + } catch (e) { + throw AxiosError.from(e, AxiosError.ERR_BAD_OPTION_VALUE, config); + } + } + if (utils$1.isFormData(data)) { + var getHeaders = utils$1.getSafeProp(data, 'getHeaders'); + if (platform.hasStandardBrowserEnv || platform.hasStandardBrowserWebWorkerEnv || utils$1.isReactNative(data)) { + headers.setContentType(undefined); // browser/web worker/RN handles it + } else if (utils$1.isFunction(getHeaders)) { + // Node.js FormData (like form-data package) + setFormDataHeaders(headers, getHeaders.call(data), own('formDataHeaderPolicy')); + } + } + + // Add xsrf header + // This is only done if running in a standard browser environment. + // Specifically not if we're in a web worker, or react-native. + + if (platform.hasStandardBrowserEnv) { + if (utils$1.isFunction(withXSRFToken)) { + withXSRFToken = withXSRFToken(newConfig); + } + + // Strict boolean check — prevents proto-pollution gadgets (e.g. Object.prototype.withXSRFToken = 1) + // and misconfigurations (e.g. "false") from short-circuiting the same-origin check and leaking + // the XSRF token cross-origin. + var shouldSendXSRF = withXSRFToken === true || withXSRFToken == null && isURLSameOrigin(newConfig.url); + if (shouldSendXSRF) { + var xsrfValue = xsrfHeaderName && xsrfCookieName && readXsrfCookie(xsrfCookieName); + if (xsrfValue) { + headers.set(xsrfHeaderName, xsrfValue); + } + } + } + return newConfig; + } + + var isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined'; + var xhrAdapter = isXHRAdapterSupported && function (config) { + return new Promise(function dispatchXhrRequest(resolve, reject) { + var useAsyncXsrf; + try { + var store = platform.hasStandardBrowserEnv && typeof window !== 'undefined' && window.cookieStore; + useAsyncXsrf = store && utils$1.isFunction(store.get); + } catch (e) { + // A restricted Cookie Store getter must retain the synchronous fallback. + } + var xsrfCookieName; + var _config = resolveConfig(config, useAsyncXsrf ? function (name) { + xsrfCookieName = name; + return null; + } : undefined); + var requestData = _config.data; + var requestHeaders = AxiosHeaders.from(_config.headers).normalize(); + var responseType = _config.responseType, + onUploadProgress = _config.onUploadProgress, + onDownloadProgress = _config.onDownloadProgress; + var onCanceled; + var timeoutId; + var uploadThrottled, downloadThrottled; + var flushUpload, flushDownload, flushDownloadWithEvent; + function done() { + clearTimeout(timeoutId); + // A final progress callback must not prevent the remaining cleanup. + // Report errors asynchronously, as onloadend and the throttle timer do. + try { + flushUpload && flushUpload(); // flush events + } catch (err) { + setTimeout(function () { + throw err; + }); + } + try { + flushDownload && flushDownload(); // flush events + } catch (err) { + setTimeout(function () { + throw err; + }); + } + + // A flush can synchronously cancel the request and reenter done(). + // In that case the inner call has already detached these listeners. + if (request) { + downloadThrottled && request.removeEventListener('progress', downloadThrottled); + if (request.upload) { + uploadThrottled && request.upload.removeEventListener('progress', uploadThrottled); + flushUpload && request.upload.removeEventListener('loadend', flushUpload); + } + } + _config.cancelToken && _config.cancelToken.unsubscribe(onCanceled); + _config.signal && _config.signal.removeEventListener('abort', onCanceled); + } + var request = new XMLHttpRequest(); + request.open(_config.method.toUpperCase(), _config.url, true); + + // Set the request timeout in MS + request.timeout = _config.timeout; + function onloadend(event) { + if (!request) { + return; + } + + // Status 0 means no response was received, which onerror and onabort normally + // reject before this runs. Firefox 152 fires only readystatechange and loadend for + // navigation-canceled requests (https://bugzilla.mozilla.org/show_bug.cgi?id=1505389), + // leaving settle() to resolve them as an empty success. ECONNABORTED is the error + // onabort raised on Firefox 151. Reads over file:, which some environments report as + // status 0 on success, are excluded by the request URL's scheme after browser-style + // preprocessing, by the page origin's scheme for relative URLs (which inherit it), or + // by responseURL where implemented. + if (request.status === 0 && (parseProtocol(normalizeURLForProtocolCheck(_config.url)) || parseProtocol(platform.origin)) !== 'file' && !(request.responseURL && request.responseURL.startsWith('file:'))) { + reject(new AxiosError('Request aborted', AxiosError.ECONNABORTED, config, request)); + done(); + + // Clean up request + request = null; + return; + } + + // When loadend is still dispatching, flushing with it gives progress + // listeners a final delivery whose event has a live target. The legacy + // ready-state fallback has no event, so replay its pending progress. + // A throwing listener must not block settlement; rethrow asynchronously, + // matching how listener errors surface on the throttle timer path. + try { + if (event) { + flushDownloadWithEvent && flushDownloadWithEvent(event); + } else { + flushDownload && flushDownload(); + } + } catch (err) { + setTimeout(function () { + throw err; + }); + } + + // A final progress callback can cancel the request synchronously. + if (!request) { + return; + } + + // Prepare the response + var responseHeaders = AxiosHeaders.from('getAllResponseHeaders' in request && request.getAllResponseHeaders()); + var responseData = !responseType || responseType === 'text' || responseType === 'json' ? request.responseText : request.response; + var response = { + data: responseData, + status: request.status, + statusText: request.statusText, + headers: responseHeaders, + config: config, + request: request + }; + settle(function _resolve(value) { + resolve(value); + done(); + }, function _reject(err) { + reject(err); + done(); + }, response); + + // Clean up request + request = null; + } + if ('onloadend' in request) { + // Use onloadend if available + request.onloadend = onloadend; + } else { + // Listen for ready state to emulate onloadend + request.onreadystatechange = function handleLoad() { + if (!request || request.readyState !== 4) { + return; + } + + // The request errored out and we didn't get a response, this will be + // handled by onerror instead + // With one exception: request that using file: protocol, most browsers + // will return status as 0 even though it's a successful request + if (request.status === 0 && !(request.responseURL && request.responseURL.startsWith('file:'))) { + return; + } + // readystate handler is calling before onerror or ontimeout handlers, + // so we should call onloadend on the next 'tick' + setTimeout(onloadend); + }; + } + + // Handle browser request cancellation (as opposed to a manual cancellation) + request.onabort = function handleAbort() { + if (!request) { + return; + } + reject(new AxiosError('Request aborted', AxiosError.ECONNABORTED, config, request)); + done(); + + // Clean up request + request = null; + }; + + // Handle low level network errors + request.onerror = function handleError(event) { + // Browsers deliver a ProgressEvent in XHR onerror + // (message may be empty; when present, surface it) + // See https://developer.mozilla.org/docs/Web/API/XMLHttpRequest/error_event + var msg = event && event.message ? event.message : 'Network Error'; + var err = new AxiosError(msg, AxiosError.ERR_NETWORK, config, request); + // attach the underlying event for consumers who want details + err.event = event || null; + reject(err); + done(); + request = null; + }; + + // Handle timeout + request.ontimeout = function handleTimeout() { + if (!request) return; + var timeoutErrorMessage = _config.timeout ? 'timeout of ' + _config.timeout + 'ms exceeded' : 'timeout exceeded'; + var transitional = _config.transitional || transitionalDefaults; + if (_config.timeoutErrorMessage) { + timeoutErrorMessage = _config.timeoutErrorMessage; + } + reject(new AxiosError(timeoutErrorMessage, transitional.clarifyTimeoutError ? AxiosError.ETIMEDOUT : AxiosError.ECONNABORTED, config, request)); + done(); + + // Clean up request + request = null; + }; + + // Remove Content-Type if data is undefined + requestData === undefined && requestHeaders.setContentType(null); + + // Add withCredentials to request if needed + if (!utils$1.isUndefined(_config.withCredentials)) { + request.withCredentials = !!_config.withCredentials; + } + + // Add responseType to request if needed + if (responseType && responseType !== 'json') { + request.responseType = _config.responseType; + } + + // Handle progress if needed + if (onDownloadProgress) { + var _progressEventReducer = progressEventReducer(onDownloadProgress, true); + var _progressEventReducer2 = _slicedToArray(_progressEventReducer, 3); + downloadThrottled = _progressEventReducer2[0]; + flushDownload = _progressEventReducer2[1]; + flushDownloadWithEvent = _progressEventReducer2[2]; + request.addEventListener('progress', downloadThrottled); + } + + // Not all browsers support upload events + if (onUploadProgress && request.upload) { + var _progressEventReducer3 = progressEventReducer(onUploadProgress); + var _progressEventReducer4 = _slicedToArray(_progressEventReducer3, 2); + uploadThrottled = _progressEventReducer4[0]; + flushUpload = _progressEventReducer4[1]; + request.upload.addEventListener('progress', uploadThrottled); + request.upload.addEventListener('loadend', flushUpload); + } + if (_config.cancelToken || _config.signal) { + // Handle cancellation + // eslint-disable-next-line func-names + onCanceled = function onCanceled(cancel) { + if (!request) { + return; + } + reject(!cancel || cancel.type ? new CanceledError(null, config, request) : cancel); + var xhr = request; + done(); + request = null; + xhr.abort(); + }; + _config.cancelToken && _config.cancelToken.subscribe(onCanceled); + if (!request) return; + if (_config.signal) { + _config.signal.aborted ? onCanceled() : _config.signal.addEventListener('abort', onCanceled); + } + } + if (!request) return; + var protocol = parseProtocol(_config.url); + if (protocol && !platform.protocols.includes(protocol)) { + reject(new AxiosError('Unsupported protocol ' + protocol + ':', AxiosError.ERR_BAD_REQUEST, config)); + done(); + return; + } + var sendRequest = function sendRequest() { + if (!request) return; + // Apply headers after an asynchronous XSRF read so existing headers are + // replaced through AxiosHeaders rather than appended by the native XHR. + if ('setRequestHeader' in request) { + utils$1.forEach(toByteStringHeaderObject(requestHeaders), function setRequestHeader(val, key) { + request.setRequestHeader(key, val); + }); + } + request.send(requestData || null); + }; + if (xsrfCookieName) { + // Native XHR timeout starts at send(). Cover cookie preparation and the + // subsequent request with the same budget and existing timeout handler. + var now = typeof performance !== 'undefined' && utils$1.isFunction(performance.now) ? function () { + return performance.now(); + } : Date.now; + var deadline = request.timeout > 0 ? now() + Number(request.timeout) : undefined; + var abortOnTimeout = function abortOnTimeout() { + if (!request) return; + var xhr = request; + xhr.ontimeout(); + xhr.abort(); + }; + if (deadline !== undefined) { + var _scheduleTimeout = function scheduleTimeout() { + var remaining = deadline - now(); + if (remaining > 0) { + // Browser timers overflow above the signed 32-bit delay limit. + timeoutId = setTimeout(_scheduleTimeout, Math.min(remaining, 0x7fffffff)); + } else { + abortOnTimeout(); + } + }; + _scheduleTimeout(); + } + cookies.readAsync(xsrfCookieName).then(function (value) { + if (!request) return; + // Promise callbacks may run before an overdue timer after a busy task. + if (deadline !== undefined && now() >= deadline) { + abortOnTimeout(); + return; + } + if (value) { + var headerName = utils$1.hasOwnProp(_config, 'xsrfHeaderName') && _config.xsrfHeaderName; + requestHeaders.set(headerName, value); + } + sendRequest(); + })["catch"](function (error) { + if (!request) return; + reject(AxiosError.from(error, null, config, request)); + done(); + request = null; + }); + } else { + sendRequest(); + } + }); + }; + + var composeSignals = function composeSignals(signals, timeout) { + signals = signals ? signals.filter(Boolean) : []; + if (!timeout && !signals.length) { + return; + } + var controller = new AbortController(); + var aborted = false; + var onabort = function onabort(reason) { + if (!aborted) { + aborted = true; + unsubscribe(); + var err = reason instanceof Error ? reason : this.reason; + controller.abort(err instanceof AxiosError ? err : new CanceledError(err instanceof Error ? err.message : err)); + } + }; + var timer = timeout && setTimeout(function () { + timer = null; + onabort(new AxiosError("timeout of ".concat(timeout, "ms exceeded"), AxiosError.ETIMEDOUT)); + }, timeout); + var unsubscribe = function unsubscribe() { + if (!signals) { + return; + } + timer && clearTimeout(timer); + timer = null; + signals.forEach(function (signal) { + var unsubscribeSignal = utils$1.getSafeProp(signal, 'unsubscribe'); + utils$1.isFunction(unsubscribeSignal) ? unsubscribeSignal.call(signal, onabort) : signal.removeEventListener('abort', onabort); + }); + signals = null; + }; + signals.forEach(function (signal) { + if (aborted) { + return; + } + if (signal.aborted) { + onabort.call(signal); + return; + } + signal.addEventListener('abort', onabort, { + once: true + }); + }); + var signal = controller.signal; + signal.unsubscribe = function () { + return utils$1.asap(unsubscribe); + }; + return signal; + }; + + var streamChunk = /*#__PURE__*/_regenerator().m(function streamChunk(chunk, chunkSize) { + var len, pos, end; + return _regenerator().w(function (_context) { + while (1) switch (_context.n) { + case 0: + len = chunk.byteLength; + if (!(!chunkSize || len < chunkSize)) { + _context.n = 2; + break; + } + _context.n = 1; + return chunk; + case 1: + return _context.a(2); + case 2: + pos = 0; + case 3: + if (!(pos < len)) { + _context.n = 5; + break; + } + end = pos + chunkSize; + _context.n = 4; + return chunk.slice(pos, end); + case 4: + pos = end; + _context.n = 3; + break; + case 5: + return _context.a(2); + } + }, streamChunk); + }); + var readBytes = /*#__PURE__*/function () { + var _ref = _wrapAsyncGenerator(/*#__PURE__*/_regenerator().m(function _callee(iterable, chunkSize) { + var _iteratorAbruptCompletion, _didIteratorError, _iteratorError, _iterator, _step, chunk, _t; + return _regenerator().w(function (_context2) { + while (1) switch (_context2.p = _context2.n) { + case 0: + _iteratorAbruptCompletion = false; + _didIteratorError = false; + _context2.p = 1; + _iterator = _asyncIterator(readStream(iterable)); + case 2: + _context2.n = 3; + return _awaitAsyncGenerator(_iterator.next()); + case 3: + if (!(_iteratorAbruptCompletion = !(_step = _context2.v).done)) { + _context2.n = 5; + break; + } + chunk = _step.value; + return _context2.d(_regeneratorValues(_asyncGeneratorDelegate(_asyncIterator(streamChunk(chunk, chunkSize)))), 4); + case 4: + _iteratorAbruptCompletion = false; + _context2.n = 2; + break; + case 5: + _context2.n = 7; + break; + case 6: + _context2.p = 6; + _t = _context2.v; + _didIteratorError = true; + _iteratorError = _t; + case 7: + _context2.p = 7; + _context2.p = 8; + if (!(_iteratorAbruptCompletion && _iterator["return"] != null)) { + _context2.n = 9; + break; + } + _context2.n = 9; + return _awaitAsyncGenerator(_iterator["return"]()); + case 9: + _context2.p = 9; + if (!_didIteratorError) { + _context2.n = 10; + break; + } + throw _iteratorError; + case 10: + return _context2.f(9); + case 11: + return _context2.f(7); + case 12: + return _context2.a(2); + } + }, _callee, null, [[8,, 9, 11], [1, 6, 7, 12]]); + })); + return function readBytes(_x, _x2) { + return _ref.apply(this, arguments); + }; + }(); + var readStream = /*#__PURE__*/function () { + var _ref2 = _wrapAsyncGenerator(/*#__PURE__*/_regenerator().m(function _callee2(stream) { + var reader, _yield$_awaitAsyncGen, done, value; + return _regenerator().w(function (_context3) { + while (1) switch (_context3.p = _context3.n) { + case 0: + if (!stream[Symbol.asyncIterator]) { + _context3.n = 2; + break; + } + return _context3.d(_regeneratorValues(_asyncGeneratorDelegate(_asyncIterator(stream))), 1); + case 1: + return _context3.a(2); + case 2: + reader = stream.getReader(); + _context3.p = 3; + case 4: + _context3.n = 5; + return _awaitAsyncGenerator(reader.read()); + case 5: + _yield$_awaitAsyncGen = _context3.v; + done = _yield$_awaitAsyncGen.done; + value = _yield$_awaitAsyncGen.value; + if (!done) { + _context3.n = 6; + break; + } + return _context3.a(3, 8); + case 6: + _context3.n = 7; + return value; + case 7: + _context3.n = 4; + break; + case 8: + _context3.p = 8; + _context3.n = 9; + return _awaitAsyncGenerator(reader.cancel()); + case 9: + return _context3.f(8); + case 10: + return _context3.a(2); + } + }, _callee2, null, [[3,, 8, 10]]); + })); + return function readStream(_x3) { + return _ref2.apply(this, arguments); + }; + }(); + var trackStream = function trackStream(stream, chunkSize, onProgress, onFinish) { + var iterator = readBytes(stream, chunkSize); + var bytes = 0; + var done; + var _onFinish = function _onFinish(e) { + if (!done) { + done = true; + onFinish && onFinish(e); + } + }; + return new ReadableStream({ + pull: function pull(controller) { + return _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee3() { + var _yield$iterator$next, _done, value, len, loadedBytes, _t2; + return _regenerator().w(function (_context4) { + while (1) switch (_context4.p = _context4.n) { + case 0: + _context4.p = 0; + _context4.n = 1; + return iterator.next(); + case 1: + _yield$iterator$next = _context4.v; + _done = _yield$iterator$next.done; + value = _yield$iterator$next.value; + if (!_done) { + _context4.n = 2; + break; + } + _onFinish(); + controller.close(); + return _context4.a(2); + case 2: + len = value.byteLength; + if (onProgress) { + loadedBytes = bytes += len; + onProgress(loadedBytes); + } + controller.enqueue(new Uint8Array(value)); + _context4.n = 4; + break; + case 3: + _context4.p = 3; + _t2 = _context4.v; + _onFinish(_t2); + throw _t2; + case 4: + return _context4.a(2); + } + }, _callee3, null, [[0, 3]]); + }))(); + }, + cancel: function cancel(reason) { + _onFinish(reason); + return iterator["return"](); + } + }, { + highWaterMark: 2 + }); + }; + + var CRLF = '\r\n'; + var normalizeLines = function normalizeLines(value) { + return String(value).replace(/\r\n|\r|\n/g, CRLF); + }; + var escapeName = function escapeName(value) { + return String(value).replace(/[\r\n"]/g, function (_char) { + return _char === '\r' ? '%0D' : _char === '\n' ? '%0A' : '%22'; + }); + }; + + // Count UTF-8 bytes without allocating an encoded copy of a field. FormData + // string values normalize line endings; Blob/File contents remain unchanged. + var stringBytes = function stringBytes(value, normalize) { + var length = 0; + for (var i = 0; i < value.length; i++) { + var code = value.charCodeAt(i); + if (normalize && (code === 13 || code === 10)) { + if (code === 13 && value.charCodeAt(i + 1) === 10) i++; + length += 2; + } else if (code < 0x80) { + length++; + } else if (code < 0x800) { + length += 2; + } else if (code >= 0xd800 && code <= 0xdbff && value.charCodeAt(i + 1) >= 0xdc00 && value.charCodeAt(i + 1) <= 0xdfff) { + length += 4; + i++; + } else { + length += 3; + } + } + return length; + }; + + // Describe serialization failures independently of any request library. + var FormDataError = /*#__PURE__*/function (_TypeError) { + function FormDataError(message, reason) { + var _this; + _classCallCheck(this, FormDataError); + _this = _callSuper(this, FormDataError, [message]); + _this.name = 'FormDataError'; + _this.reason = reason; + return _this; + } + _inherits(FormDataError, _TypeError); + return _createClass(FormDataError); + }(/*#__PURE__*/_wrapNativeSuper(TypeError)); + + // The caller supplies the boundary, Blob implementation, and limit error. + function formDataToBlob(form, Blob, limit, limitError, boundary) { + if (!utils$1.isFunction(Blob)) { + throw new FormDataError('Blob is not supported', 'blob'); + } + if (!utils$1.isString(boundary) || !/^[A-Za-z0-9'()+_,./:=? -]{1,70}$/.test(boundary) || / $/.test(boundary)) { + throw new FormDataError('Invalid multipart boundary', 'boundary'); + } + var footer = '--' + boundary + '--' + CRLF; + var length = footer.length; + var parts = []; + var checkLength = function checkLength(extra) { + if (length + extra > limit) throw limitError(); + }; + checkLength(0); + var _iterator = _createForOfIteratorHelper(form), + _step; + try { + for (_iterator.s(); !(_step = _iterator.n()).done;) { + var _step$value = _slicedToArray(_step.value, 2), + name = _step$value[0], + value = _step$value[1]; + var isString = utils$1.isString(value); + var valueLength = isString ? stringBytes(value, true) : value.size; + if (!Number.isFinite(valueLength) || valueLength < 0) { + throw new FormDataError('Unsupported FormData part size', 'part'); + } + // Reject large values and names before building normalized header strings. + checkLength(valueLength + stringBytes(name, true) + (!isString && value.name ? stringBytes(value.name, false) : 0) + (!isString && value.type ? stringBytes(value.type, false) : 0)); + var header = '--' + boundary + CRLF + 'Content-Disposition: form-data; name="' + escapeName(normalizeLines(name)) + '"'; + if (!isString) { + header += '; filename="' + escapeName(utils$1.isString(value.name) ? value.name : 'blob') + '"' + CRLF + 'Content-Type: ' + String(value.type || 'application/octet-stream').replace(/[\r\n]/g, ''); + } + header += CRLF + CRLF; + var partLength = stringBytes(header, false) + valueLength + CRLF.length; + checkLength(partLength); + length += partLength; + parts.push({ + header: header, + value: value, + isString: isString + }); + } + + // Native Blob composition retains existing Blob/File data. No file is read + // and no complete multipart ArrayBuffer is created to determine its length. + } catch (err) { + _iterator.e(err); + } finally { + _iterator.f(); + } + var blobParts = []; + for (var _i = 0, _parts = parts; _i < _parts.length; _i++) { + var part = _parts[_i]; + blobParts.push(part.header, part.isString ? normalizeLines(part.value) : part.value, CRLF); + } + blobParts.push(footer); + return new Blob(blobParts, { + type: 'multipart/form-data; boundary=' + boundary + }); + } + + function createMultipartBody(form, Blob, limit, limitError, boundary) { + // Report missing Blob support before trying to select a random source. + if (!utils$1.isFunction(Blob)) { + throw new AxiosError('Blob is not supported', AxiosError.ERR_NOT_SUPPORT); + } + if (boundary === undefined) { + if (utils$1.isFunction(platform.generateString)) { + boundary = 'axios-' + platform.generateString(36, '0123456789abcdef'); + } else { + var crypto = utils$1.global.crypto; + if (!crypto || !utils$1.isFunction(crypto.getRandomValues)) { + throw new AxiosError('Random byte generation is not supported', AxiosError.ERR_NOT_SUPPORT); + } + var random = new Uint8Array(18); + crypto.getRandomValues(random); + boundary = 'axios-' + Array.from(random, function (value) { + return ('0' + value.toString(16)).slice(-2); + }).join(''); + } + } + try { + return formDataToBlob(form, Blob, limit, limitError, boundary); + } catch (error) { + if (error instanceof FormDataError) { + var code = error.reason === 'boundary' ? AxiosError.ERR_BAD_OPTION_VALUE : AxiosError.ERR_BAD_REQUEST; + throw new AxiosError(error.message, code); + } + throw error; + } + } + + /** + * Estimate data: URL byte lengths *without* allocating large buffers. + * - Fetch percent-decodes a base64 body before decoding it. + * - Node's Buffer.from(body, 'base64') sizes its backing allocation from the + * percent-decoded body, including ignored characters and content after padding. + * - Non-base64 data is percent-decoded and then encoded as UTF-8. + */ + var isHexDigit = function isHexDigit(charCode) { + return charCode >= 48 && charCode <= 57 || charCode >= 65 && charCode <= 70 || charCode >= 97 && charCode <= 102; + }; + var isPercentEncodedByte = function isPercentEncodedByte(str, i, len) { + return i + 2 < len && isHexDigit(str.charCodeAt(i + 1)) && isHexDigit(str.charCodeAt(i + 2)); + }; + var hexValue = function hexValue(charCode) { + return charCode <= 57 ? charCode - 48 : (charCode & 0xdf) - 55; + }; + var isBase64Char = function isBase64Char(charCode) { + return charCode >= 65 && charCode <= 90 || + // A-Z + charCode >= 97 && charCode <= 122 || + // a-z + charCode >= 48 && charCode <= 57 || + // 0-9 + charCode === 43 || + // + + charCode === 47 || + // / + charCode === 45 || + // - (base64url) + charCode === 95; + }; // _ (base64url) + + var isBase64Whitespace = function isBase64Whitespace(charCode) { + return charCode === 9 || charCode === 10 || charCode === 12 || charCode === 13 || charCode === 32; + }; + var base64Bytes = function base64Bytes(significant) { + var groups = Math.floor(significant / 4); + var remainder = significant % 4; + return groups * 3 + (remainder === 2 ? 1 : remainder === 3 ? 2 : 0); + }; + + // Buffer.byteLength(body, 'base64') uses the raw string length as an allocation + // upper bound even when Buffer.from later ignores characters or stops at '='. + var estimateBase64BufferAllocation = function estimateBase64BufferAllocation(body) { + var len = body.length; + var padding = 0; + if (len > 0 && body.charCodeAt(len - 1) === 61 /* '=' */) { + padding++; + if (len > 1 && body.charCodeAt(len - 2) === 61 /* '=' */) { + padding++; + } + } + return Math.floor((len - padding) * 3 / 4); + }; + var estimatePercentDecodedBase64Bytes = function estimatePercentDecodedBase64Bytes(body) { + var len = body.length; + var significant = 0; + var padding = 0; + var invalid = false; + for (var i = 0; i < len; i++) { + var code = body.charCodeAt(i); + if (code === 37 /* '%' */ && isPercentEncodedByte(body, i, len)) { + code = hexValue(body.charCodeAt(i + 1)) * 16 + hexValue(body.charCodeAt(i + 2)); + i += 2; + } + if (isBase64Whitespace(code)) { + continue; + } + if (code === 61 /* '=' */) { + padding++; + continue; + } + if (!isBase64Char(code) || padding > 0) { + invalid = true; + continue; + } + significant++; + } + + // Fetch rejects malformed forgiving-base64 input. Returning the raw-size + // allocation bound keeps that invalid input from becoming a pre-check bypass. + if (invalid || padding > 2 || padding > 0 && (significant + padding) % 4 !== 0 || significant % 4 === 1) { + return estimateBase64BufferAllocation(body); + } + return base64Bytes(significant); + }; + var estimateDataURLBytes = function estimateDataURLBytes(url, estimateBase64, base64Pattern) { + if (!url || typeof url !== 'string') return 0; + if (!/^data:/i.test(url)) return 0; + var comma = url.indexOf(','); + if (comma < 0) return 0; + var meta = url.slice(5, comma); + var body = url.slice(comma + 1); + var isBase64 = base64Pattern.test(meta); + if (isBase64) { + return estimateBase64(body); + } + + // Compute UTF-8 byte length directly from UTF-16 code units without allocating + // a byte buffer (TextEncoder.encode would defeat the DoS guard on large bodies). + // Valid %XX triplets count as one decoded byte; this matches the bytes that + // decodeURIComponent(body) would produce before Buffer re-encodes the string. + var bytes = 0; + for (var i = 0, len = body.length; i < len; i++) { + var c = body.charCodeAt(i); + if (c === 37 /* '%' */ && isPercentEncodedByte(body, i, len)) { + bytes += 1; + i += 2; + } else if (c < 0x80) { + bytes += 1; + } else if (c < 0x800) { + bytes += 2; + } else if (c >= 0xd800 && c <= 0xdbff && i + 1 < len) { + var next = body.charCodeAt(i + 1); + if (next >= 0xdc00 && next <= 0xdfff) { + bytes += 4; + i++; + } else { + bytes += 3; + } + } else { + bytes += 3; + } + } + return bytes; + }; + + /** + * Estimate the percent-decoded payload size used by Fetch data: URLs. + * + * @param {string} url + * @returns {number} + */ + function estimateDataURLDecodedBytes(url) { + // Fetch removes URL fragments before processing a data: URL. + var fragmentIndex = typeof url === 'string' ? url.indexOf('#') : -1; + return estimateDataURLBytes(fragmentIndex === -1 ? url : url.slice(0, fragmentIndex), estimatePercentDecodedBase64Bytes, /; *base64[\t\n\f\r ]*$/i); + } + + var VERSION = "1.21.1"; + + var DEFAULT_CHUNK_SIZE = 64 * 1024; + var DEFAULT_REQUEST_OPTIONS = { + cache: 'default', + redirect: 'follow', + referrer: 'about:client', + referrerPolicy: '', + mode: 'cors', + integrity: '', + keepalive: false, + priority: 'auto', + window: null + }; + var isFunction = utils$1.isFunction; + + /** + * Encode a UTF-8 string to a Latin-1 byte string for use with btoa(). + * This is a modern replacement for the deprecated unescape(encodeURIComponent(str)) pattern. + * + * @param {string} str The string to encode + * + * @returns {string} UTF-8 bytes as a Latin-1 string + */ + var encodeUTF8 = function encodeUTF8(str) { + return encodeURIComponent(str).replace(/%([0-9A-F]{2})/gi, function (_, hex) { + return String.fromCharCode(parseInt(hex, 16)); + }); + }; + + // Node's WHATWG URL parser returns `username` and `password` percent-encoded. + // Decode before composing the `auth` option so credentials such as + // `my%40email.com:pass` are sent as `my@email.com:pass`. Falls back to the + // original value for malformed input so a bad encoding never throws. + var decodeURIComponentSafe = function decodeURIComponentSafe(value) { + if (!utils$1.isString(value)) { + return value; + } + try { + return decodeURIComponent(value); + } catch (error) { + return value; + } + }; + var test = function test(fn) { + try { + for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { + args[_key - 1] = arguments[_key]; + } + return !!fn.apply(void 0, args); + } catch (e) { + return false; + } + }; + var maybeWithAuthCredentials = function maybeWithAuthCredentials(url) { + var protocolIndex = url.indexOf('://'); + var urlToCheck = url; + if (protocolIndex !== -1) { + urlToCheck = urlToCheck.slice(protocolIndex + 3); + } + return urlToCheck.includes('@') || urlToCheck.includes(':'); + }; + var factory = function factory(env) { + var globalObject = utils$1.global !== undefined && utils$1.global !== null ? utils$1.global : globalThis; + var ReadableStream = globalObject.ReadableStream, + TextEncoder = globalObject.TextEncoder; + env = utils$1.merge.call({ + skipUndefined: true + }, { + Request: globalObject.Request, + Response: globalObject.Response, + Blob: globalObject.Blob + }, env); + var envFetch = utils$1.hasOwnProp(env, 'fetch') ? env.fetch : undefined; + var _env = env, + Request = _env.Request, + Response = _env.Response, + Blob = _env.Blob; + var isFetchSupported = envFetch ? isFunction(envFetch) : typeof fetch === 'function'; + var isRequestSupported = isFunction(Request); + var isResponseSupported = isFunction(Response); + if (!isFetchSupported) { + return false; + } + var isReadableStreamSupported = isFetchSupported && isFunction(ReadableStream); + var encodeText = isFetchSupported && (typeof TextEncoder === 'function' ? function (encoder) { + return function (str) { + return encoder.encode(str); + }; + }(new TextEncoder()) : (/*#__PURE__*/function () { + var _ref = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee(str) { + var _t, _t2; + return _regenerator().w(function (_context) { + while (1) switch (_context.n) { + case 0: + _t = Uint8Array; + _context.n = 1; + return new Request(str).arrayBuffer(); + case 1: + _t2 = _context.v; + return _context.a(2, new _t(_t2)); + } + }, _callee); + })); + return function (_x) { + return _ref.apply(this, arguments); + }; + }())); + var supportsRequestStream = isRequestSupported && isReadableStreamSupported && test(function () { + var duplexAccessed = false; + var request = new Request(platform.origin, { + body: new ReadableStream(), + method: 'POST', + get duplex() { + duplexAccessed = true; + return 'half'; + } + }); + var hasContentType = request.headers.has('Content-Type'); + if (request.body != null) { + request.body.cancel(); + } + return duplexAccessed && !hasContentType; + }); + var supportsResponseStream = isResponseSupported && isReadableStreamSupported && test(function () { + return utils$1.isReadableStream(new Response('').body); + }); + + // Some runtimes reject every explicit cache mode. Use own defaults for both + // probes so unrelated polluted options cannot affect cache-mode detection. + var requestDefaults = Object.assign(Object.create(null), DEFAULT_REQUEST_OPTIONS); + if (isRequestSupported && !test(function () { + return new Request(platform.origin, requestDefaults); + })) { + delete requestDefaults.cache; + + // Only omit cache when that makes Request construction succeed. Otherwise + // retain the explicit default that protects supporting runtimes from pollution. + if (!test(function () { + return new Request(platform.origin, requestDefaults); + })) { + requestDefaults.cache = DEFAULT_REQUEST_OPTIONS.cache; + } + } + var resolvers = { + stream: supportsResponseStream && function (res) { + return res.body; + } + }; + isFetchSupported && function () { + ['text', 'arrayBuffer', 'blob', 'formData', 'stream'].forEach(function (type) { + !resolvers[type] && (resolvers[type] = function (res, config) { + var method = res && res[type]; + if (method) { + return method.call(res); + } + throw new AxiosError("Response type '".concat(type, "' is not supported"), AxiosError.ERR_NOT_SUPPORT, config); + }); + }); + }(); + var getBodyLength = /*#__PURE__*/function () { + var _ref2 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee2(body) { + return _regenerator().w(function (_context2) { + while (1) switch (_context2.n) { + case 0: + if (!(body == null)) { + _context2.n = 1; + break; + } + return _context2.a(2, 0); + case 1: + if (!utils$1.isBlob(body)) { + _context2.n = 2; + break; + } + return _context2.a(2, body.size); + case 2: + if (!(utils$1.isArrayBufferView(body) || utils$1.isArrayBuffer(body))) { + _context2.n = 3; + break; + } + return _context2.a(2, body.byteLength); + case 3: + if (utils$1.isURLSearchParams(body)) { + body = body + ''; + } + if (!utils$1.isString(body)) { + _context2.n = 5; + break; + } + _context2.n = 4; + return encodeText(body); + case 4: + return _context2.a(2, _context2.v.byteLength); + case 5: + return _context2.a(2); + } + }, _callee2); + })); + return function getBodyLength(_x2) { + return _ref2.apply(this, arguments); + }; + }(); + var resolveBodyLength = /*#__PURE__*/function () { + var _ref3 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee3(headers, body) { + var length; + return _regenerator().w(function (_context3) { + while (1) switch (_context3.n) { + case 0: + length = utils$1.toFiniteNumber(headers.getContentLength()); + return _context3.a(2, length == null ? getBodyLength(body) : length); + } + }, _callee3); + })); + return function resolveBodyLength(_x3, _x4) { + return _ref3.apply(this, arguments); + }; + }(); + return /*#__PURE__*/function () { + var _ref4 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee4(config) { + var _resolveConfig, url, method, data, signal, cancelToken, timeout, onDownloadProgress, onUploadProgress, responseType, headers, _resolveConfig$withCr, withCredentials, fetchOptions, maxContentLength, maxBodyLength, maxRedirects, hasMaxContentLength, hasMaxBodyLength, own, _fetch, composedSignal, request, unsubscribe, requestContentLength, pendingBodyError, pendingResponseError, maxBodyLengthError, auth, configAuth, username, password, parsedURL, urlUsername, urlPassword, estimated, formContentType, formBoundary, parameters, outboundLength, mustEnforceStreamBody, trackRequestStream, _request, contentTypeHeader, _ref5, _ref6, onProgress, flush, isCredentialsSupported, contentType, safeFetchOptions, resolvedOptions, response, responseHeaders, declaredLength, isStreamResponse, options, responseContentLength, _ref7, _ref8, _onProgress, _flush, bytesRead, onChunkProgress, responseData, materializedSize, canceledError, networkError, _t3, _t4; + return _regenerator().w(function (_context4) { + while (1) switch (_context4.p = _context4.n) { + case 0: + _resolveConfig = resolveConfig(config), url = _resolveConfig.url, method = _resolveConfig.method, data = _resolveConfig.data, signal = _resolveConfig.signal, cancelToken = _resolveConfig.cancelToken, timeout = _resolveConfig.timeout, onDownloadProgress = _resolveConfig.onDownloadProgress, onUploadProgress = _resolveConfig.onUploadProgress, responseType = _resolveConfig.responseType, headers = _resolveConfig.headers, _resolveConfig$withCr = _resolveConfig.withCredentials, withCredentials = _resolveConfig$withCr === void 0 ? 'same-origin' : _resolveConfig$withCr, fetchOptions = _resolveConfig.fetchOptions, maxContentLength = _resolveConfig.maxContentLength, maxBodyLength = _resolveConfig.maxBodyLength, maxRedirects = _resolveConfig.maxRedirects; + hasMaxContentLength = utils$1.isNumber(maxContentLength) && maxContentLength > -1; + hasMaxBodyLength = utils$1.isNumber(maxBodyLength) && maxBodyLength > -1; + own = function own(key) { + return utils$1.hasOwnProp(config, key) ? config[key] : undefined; + }; + _fetch = envFetch || fetch; + responseType = responseType ? (responseType + '').toLowerCase() : 'text'; + composedSignal = composeSignals([signal, cancelToken && cancelToken.toAbortSignal()], timeout); + request = null; + unsubscribe = composedSignal && composedSignal.unsubscribe && function () { + composedSignal.unsubscribe(); + }; + // AxiosErrors we raise while request or response bodies are being streamed. Captured + // by identity so the catch block can surface it directly, regardless of + // how the runtime wraps the resulting fetch rejection (undici exposes it + // as `err.cause`; some browsers drop the original error entirely). + pendingBodyError = null; + pendingResponseError = null; + maxBodyLengthError = function maxBodyLengthError() { + return new AxiosError('Request body larger than maxBodyLength limit', AxiosError.ERR_BAD_REQUEST, config, request); + }; + _context4.p = 1; + // HTTP basic authentication + auth = undefined; + configAuth = own('auth'); + if (configAuth) { + username = utils$1.getSafeProp(configAuth, 'username') || ''; + password = utils$1.getSafeProp(configAuth, 'password') || ''; + auth = { + username: username, + password: password + }; + } + if (maybeWithAuthCredentials(url)) { + parsedURL = new URL(url, platform.origin); + if (!auth && (parsedURL.username || parsedURL.password)) { + urlUsername = decodeURIComponentSafe(parsedURL.username); + urlPassword = decodeURIComponentSafe(parsedURL.password); + auth = { + username: urlUsername, + password: urlPassword + }; + } + if (parsedURL.username || parsedURL.password) { + parsedURL.username = ''; + parsedURL.password = ''; + url = parsedURL.href; + } + } + if (auth) { + headers["delete"]('authorization'); + headers.set('Authorization', 'Basic ' + btoa(encodeUTF8((auth.username || '') + ':' + (auth.password || '')))); + } + + // Enforce maxContentLength for data: URLs up-front so we never materialize + // an oversized payload. The HTTP adapter applies the same check (see http.js + // "if (protocol === 'data:')" branch). + if (!(hasMaxContentLength && parsedURL && parsedURL.protocol === 'data:')) { + _context4.n = 2; + break; + } + estimated = estimateDataURLDecodedBytes(parsedURL.href); + if (!(estimated > maxContentLength)) { + _context4.n = 2; + break; + } + throw new AxiosError('maxContentLength size of ' + maxContentLength + ' exceeded', AxiosError.ERR_BAD_RESPONSE, config, request); + case 2: + formContentType = utils$1.isSpecCompliantForm(data) && AxiosHeaders.from(own('headers')).getContentType(); + if (utils$1.isString(formContentType) && /^multipart\/form-data(?:\s*;|$)/i.test(formContentType.trim())) { + parameters = AxiosHeaders.parseParameters(formContentType); + if (utils$1.hasOwnProp(parameters, 'boundary')) formBoundary = parameters.boundary; + } + if (utils$1.isSpecCompliantForm(data) && method !== 'get' && method !== 'head' && (hasMaxBodyLength || onUploadProgress && supportsRequestStream || formBoundary !== undefined)) { + data = createMultipartBody(data, Blob, hasMaxBodyLength ? maxBodyLength : Infinity, maxBodyLengthError, formBoundary); + // Blob.type lowercases its value, including a case-sensitive boundary. + // Retain the caller's header when an explicit boundary was serialized. + headers.setContentType(formBoundary === undefined ? data.type : formContentType); + requestContentLength = data.size; + } + + // Enforce maxBodyLength against known-size bodies before dispatch using + // the body's *actual* size — never a caller-declared Content-Length, + // which could under-report to slip an oversized body past the check. + // Unknown-size streams return undefined here and are counted per-chunk + // below as fetch consumes them. + if (!(hasMaxBodyLength && method !== 'get' && method !== 'head')) { + _context4.n = 4; + break; + } + _context4.n = 3; + return getBodyLength(data); + case 3: + outboundLength = _context4.v; + if (!(typeof outboundLength === 'number' && isFinite(outboundLength))) { + _context4.n = 4; + break; + } + requestContentLength = outboundLength; + if (!(outboundLength > maxBodyLength)) { + _context4.n = 4; + break; + } + throw maxBodyLengthError(); + case 4: + // A streamed body under maxBodyLength must be counted as fetch consumes + // it; its size is never trusted from a caller-declared Content-Length. + mustEnforceStreamBody = hasMaxBodyLength && (utils$1.isReadableStream(data) || utils$1.isStream(data)); + trackRequestStream = function trackRequestStream(stream, onProgress, flush) { + return trackStream(stream, DEFAULT_CHUNK_SIZE, function (loadedBytes) { + if (hasMaxBodyLength && loadedBytes > maxBodyLength) { + throw pendingBodyError = maxBodyLengthError(); + } + onProgress && onProgress(loadedBytes); + }, flush); + }; + if (!(supportsRequestStream && method !== 'get' && method !== 'head' && (onUploadProgress || mustEnforceStreamBody))) { + _context4.n = 8; + break; + } + if (!(requestContentLength == null)) { + _context4.n = 6; + break; + } + _context4.n = 5; + return resolveBodyLength(headers, data); + case 5: + _t3 = _context4.v; + _context4.n = 7; + break; + case 6: + _t3 = requestContentLength; + case 7: + requestContentLength = _t3; + // A declared length of 0 is only trusted to skip the wrap when we are + // not enforcing a stream limit (which must not rely on that header). + if (requestContentLength !== 0 || mustEnforceStreamBody) { + _request = new Request(url, { + method: 'POST', + body: data, + duplex: 'half' + }); + if (utils$1.isFormData(data) && (contentTypeHeader = _request.headers.get('content-type'))) { + headers.setContentType(contentTypeHeader); + } + if (_request.body) { + _ref5 = onUploadProgress && progressEventDecorator(requestContentLength, progressEventReducer(asyncDecorator(onUploadProgress))) || [], _ref6 = _slicedToArray(_ref5, 2), onProgress = _ref6[0], flush = _ref6[1]; + data = trackRequestStream(_request.body, onProgress, flush); + } + } + _context4.n = 10; + break; + case 8: + if (!(mustEnforceStreamBody && !isRequestSupported && isReadableStreamSupported && method !== 'get' && method !== 'head')) { + _context4.n = 9; + break; + } + data = trackRequestStream(data); + _context4.n = 10; + break; + case 9: + if (!(mustEnforceStreamBody && isRequestSupported && !supportsRequestStream && method !== 'get' && method !== 'head')) { + _context4.n = 10; + break; + } + throw new AxiosError('Stream request bodies are not supported by the current fetch implementation', AxiosError.ERR_NOT_SUPPORT, config, request); + case 10: + if (!utils$1.isString(withCredentials)) { + withCredentials = withCredentials ? 'include' : 'omit'; + } + + // Cloudflare Workers throws when credentials are defined + // see https://github.com/cloudflare/workerd/issues/902 + isCredentialsSupported = isRequestSupported && 'credentials' in Request.prototype; // If data is FormData and Content-Type is multipart/form-data without boundary, + // delete it so fetch can set it correctly with the boundary + if (utils$1.isFormData(data)) { + contentType = headers.getContentType(); + if (contentType && /^multipart\/form-data/i.test(contentType) && !/boundary=/i.test(contentType)) { + headers["delete"]('content-type'); + } + } + + // Set User-Agent header if not already set (fetch defaults to 'node' in Node.js) + headers.set('User-Agent', 'axios/' + VERSION, false); + safeFetchOptions = fetchOptions == null ? fetchOptions : Object.assign(Object.create(null), fetchOptions); + if (safeFetchOptions) { + // These options are owned by Axios and are already reflected in the + // resolved Request passed to fetch. + delete safeFetchOptions.body; + delete safeFetchOptions.headers; + delete safeFetchOptions.method; + delete safeFetchOptions.signal; + delete safeFetchOptions.duplex; + delete safeFetchOptions.credentials; + } + resolvedOptions = Object.assign(Object.create(null), safeFetchOptions, { + signal: composedSignal, + method: method.toUpperCase(), + headers: toByteStringHeaderObject(headers.normalize()), + body: data, + duplex: 'half', + credentials: isCredentialsSupported ? withCredentials : undefined + }); + if (isRequestSupported) { + utils$1.forEach(requestDefaults, function (value, key) { + if (resolvedOptions[key] === undefined) { + resolvedOptions[key] = value; + } + }); + if (resolvedOptions.signal === undefined) { + resolvedOptions.signal = null; + } + if (resolvedOptions.body === undefined) { + resolvedOptions.body = null; + } + } + if (maxRedirects === 0) { + resolvedOptions.redirect = 'manual'; + if (safeFetchOptions) { + safeFetchOptions.redirect = 'manual'; + } + } + request = isRequestSupported && new Request(url, resolvedOptions); + _context4.n = 11; + return isRequestSupported ? _fetch(request, safeFetchOptions) : _fetch(url, resolvedOptions); + case 11: + response = _context4.v; + responseHeaders = AxiosHeaders.from(response.headers); // Cheap pre-check: if the server honestly declares a content-length that + // already exceeds the cap, reject before we start streaming. + if (!hasMaxContentLength) { + _context4.n = 12; + break; + } + declaredLength = utils$1.toFiniteNumber(responseHeaders.getContentLength()); + if (!(declaredLength != null && declaredLength > maxContentLength)) { + _context4.n = 12; + break; + } + throw new AxiosError('maxContentLength size of ' + maxContentLength + ' exceeded', AxiosError.ERR_BAD_RESPONSE, config, request); + case 12: + isStreamResponse = supportsResponseStream && (responseType === 'stream' || responseType === 'response'); + if (supportsResponseStream && response.body && (onDownloadProgress || hasMaxContentLength || isStreamResponse && unsubscribe)) { + options = {}; + ['status', 'statusText', 'headers'].forEach(function (prop) { + options[prop] = response[prop]; + }); + responseContentLength = utils$1.toFiniteNumber(responseHeaders.getContentLength()); + _ref7 = onDownloadProgress && progressEventDecorator(responseContentLength, progressEventReducer(asyncDecorator(onDownloadProgress), true)) || [], _ref8 = _slicedToArray(_ref7, 2), _onProgress = _ref8[0], _flush = _ref8[1]; + bytesRead = 0; + onChunkProgress = function onChunkProgress(loadedBytes) { + if (hasMaxContentLength) { + bytesRead = loadedBytes; + if (bytesRead > maxContentLength) { + throw pendingResponseError = new AxiosError('maxContentLength size of ' + maxContentLength + ' exceeded', AxiosError.ERR_BAD_RESPONSE, config, request); + } + } + _onProgress && _onProgress(loadedBytes); + }; + response = new Response(trackStream(response.body, DEFAULT_CHUNK_SIZE, onChunkProgress, function () { + _flush && _flush(); + unsubscribe && unsubscribe(); + }), options); + } + responseType = responseType || 'text'; + _context4.n = 13; + return resolvers[utils$1.findKey(resolvers, responseType) || 'text'](response, config); + case 13: + responseData = _context4.v; + if (!(hasMaxContentLength && !supportsResponseStream && !isStreamResponse)) { + _context4.n = 14; + break; + } + if (responseData != null) { + if (typeof responseData.byteLength === 'number') { + materializedSize = responseData.byteLength; + } else if (typeof responseData.size === 'number') { + materializedSize = responseData.size; + } else if (typeof responseData === 'string') { + materializedSize = typeof TextEncoder === 'function' ? new TextEncoder().encode(responseData).byteLength : responseData.length; + } + } + if (!(typeof materializedSize === 'number' && materializedSize > maxContentLength)) { + _context4.n = 14; + break; + } + throw new AxiosError('maxContentLength size of ' + maxContentLength + ' exceeded', AxiosError.ERR_BAD_RESPONSE, config, request); + case 14: + !isStreamResponse && unsubscribe && unsubscribe(); + _context4.n = 15; + return new Promise(function (resolve, reject) { + settle(resolve, reject, { + data: responseData, + headers: AxiosHeaders.from(response.headers), + status: response.status, + statusText: response.statusText, + config: config, + request: request + }); + }); + case 15: + return _context4.a(2, _context4.v); + case 16: + _context4.p = 16; + _t4 = _context4.v; + unsubscribe && unsubscribe(); + + // Safari can surface fetch aborts as a DOMException-like object whose + // branded getters throw. Prefer our composed signal reason before reading + // the caught error, preserving timeout vs cancellation semantics. + if (!(composedSignal && composedSignal.aborted && composedSignal.reason instanceof AxiosError)) { + _context4.n = 17; + break; + } + canceledError = composedSignal.reason; + canceledError.config = config; + request && (canceledError.request = request); + if (_t4 !== canceledError) { + // Non-enumerable to match native Error `cause` semantics so loggers + // don't recurse into circular fetch internals (see #7205). + Object.defineProperty(canceledError, 'cause', { + __proto__: null, + value: _t4, + writable: true, + enumerable: false, + configurable: true + }); + } + throw canceledError; + case 17: + if (!pendingBodyError) { + _context4.n = 18; + break; + } + request && !pendingBodyError.request && (pendingBodyError.request = request); + throw pendingBodyError; + case 18: + if (!pendingResponseError) { + _context4.n = 19; + break; + } + throw pendingResponseError; + case 19: + if (!(_t4 instanceof AxiosError)) { + _context4.n = 20; + break; + } + request && !_t4.request && (_t4.request = request); + throw _t4; + case 20: + if (!(_t4 && _t4.name === 'TypeError' && /Load failed|fetch/i.test(_t4.message))) { + _context4.n = 21; + break; + } + networkError = new AxiosError('Network Error', AxiosError.ERR_NETWORK, config, request, _t4 && _t4.response); // Non-enumerable to match native Error `cause` semantics so loggers + // don't recurse into circular fetch internals (see #7205). + Object.defineProperty(networkError, 'cause', { + __proto__: null, + value: _t4.cause || _t4, + writable: true, + enumerable: false, + configurable: true + }); + throw networkError; + case 21: + throw AxiosError.from(_t4, _t4 && _t4.code, config, request, _t4 && _t4.response); + case 22: + return _context4.a(2); + } + }, _callee4, null, [[1, 16]]); + })); + return function (_x5) { + return _ref4.apply(this, arguments); + }; + }(); + }; + var seedCache = new Map(); + var getFetch = function getFetch(config) { + var env = Object.create(null); + var configuredEnv = config && utils$1.hasOwnProp(config, 'env') && config.env; + ['fetch', 'Request', 'Response', 'Blob'].forEach(function (key) { + if (configuredEnv && utils$1.hasOwnProp(configuredEnv, key)) { + env[key] = configuredEnv[key]; + } + }); + var fetch = env.fetch, + Request = env.Request, + Response = env.Response, + Blob = env.Blob; + var seeds = [Request, Response, fetch, Blob]; + var len = seeds.length, + i = len, + seed, + target, + map = seedCache; + while (i--) { + seed = seeds[i]; + target = map.get(seed); + target === undefined && map.set(seed, target = i ? new Map() : factory(env)); + map = target; + } + return target; + }; + getFetch(); + + /** + * Known adapters mapping. + * Provides environment-specific adapters for Axios: + * - `http` for Node.js + * - `xhr` for browsers + * - `fetch` for fetch API-based requests + * + * @type {Object} + */ + var knownAdapters = { + http: httpAdapter, + xhr: xhrAdapter, + fetch: { + get: getFetch + } + }; + + // Assign adapter names for easier debugging and identification + utils$1.forEach(knownAdapters, function (fn, value) { + if (fn) { + try { + // Null-proto descriptors so a polluted Object.prototype.get cannot turn + // these data descriptors into accessor descriptors on the way in. + Object.defineProperty(fn, 'name', { + __proto__: null, + value: value + }); + } catch (e) { + // eslint-disable-next-line no-empty + } + Object.defineProperty(fn, 'adapterName', { + __proto__: null, + value: value + }); + } + }); + + /** + * Render a rejection reason string for unknown or unsupported adapters + * + * @param {string} reason + * @returns {string} + */ + var renderReason = function renderReason(reason) { + return "- ".concat(reason); + }; + + /** + * Check if the adapter is resolved (function, null, or false) + * + * @param {Function|null|false} adapter + * @returns {boolean} + */ + var isResolvedHandle = function isResolvedHandle(adapter) { + return utils$1.isFunction(adapter) || adapter === null || adapter === false; + }; + + /** + * Get the first suitable adapter from the provided list. + * Tries each adapter in order until a supported one is found. + * Throws an AxiosError if no adapter is suitable. + * + * @param {Array|string|Function} adapters - Adapter(s) by name or function. + * @param {Object} config - Axios request configuration + * @throws {AxiosError} If no suitable adapter is available + * @returns {Function} The resolved adapter function + */ + function getAdapter(adapters, config) { + adapters = utils$1.isArray(adapters) ? adapters : [adapters]; + var _adapters = adapters, + length = _adapters.length; + var nameOrAdapter; + var adapter; + var rejectedReasons = {}; + for (var i = 0; i < length; i++) { + nameOrAdapter = adapters[i]; + var id = void 0; + adapter = nameOrAdapter; + if (!isResolvedHandle(nameOrAdapter)) { + adapter = knownAdapters[(id = String(nameOrAdapter)).toLowerCase()]; + if (adapter === undefined) { + throw new AxiosError("Unknown adapter '".concat(id, "'")); + } + } + if (adapter && (utils$1.isFunction(adapter) || (adapter = adapter.get(config)))) { + break; + } + rejectedReasons[id || '#' + i] = adapter; + } + if (!adapter) { + var reasons = Object.entries(rejectedReasons).map(function (_ref) { + var _ref2 = _slicedToArray(_ref, 2), + id = _ref2[0], + state = _ref2[1]; + return "adapter ".concat(id, " ") + (state === false ? 'is not supported by the environment' : 'is not available in the build'); + }); + var s = length ? reasons.length > 1 ? 'since :\n' + reasons.map(renderReason).join('\n') : ' ' + renderReason(reasons[0]) : 'as no adapter specified'; + throw new AxiosError("There is no suitable adapter to dispatch the request " + s, AxiosError.ERR_NOT_SUPPORT); + } + return adapter; + } + + /** + * Exports Axios adapters and utility to resolve an adapter + */ + var adapters = { + /** + * Resolve an adapter from a list of adapter names or functions. + * @type {Function} + */ + getAdapter: getAdapter, + /** + * Exposes all known adapters + * @type {Object} + */ + adapters: knownAdapters + }; + + /** + * Throws a `CanceledError` if cancellation has been requested. + * + * @param {Object} config The config that is to be used for the request + * + * @returns {void} + */ + function throwIfCancellationRequested(config) { + if (config.cancelToken) { + config.cancelToken.throwIfRequested(); + } + if (config.signal && config.signal.aborted) { + throw new CanceledError(null, config); + } + } + + /** + * Resolve the clock used to time adapter execution. + * + * Prefers the monotonic `performance.now()` so wall-clock adjustments do not + * skew the measurement, and so frameworks that forbid reading the current + * time during prerendering (e.g. Next.js Cache Components) accept it. Falls + * back to `Date.now()` in runtimes without the High Resolution Time API. + * + * @returns {() => number} Millisecond clock + */ + function resolveClock() { + return typeof performance !== 'undefined' && utils$1.isFunction(performance.now) ? function () { + return performance.now(); + } : Date.now; + } + + /** + * Whole milliseconds elapsed since `start`, floored at zero. + * + * Rounded so the value stays an integer as with `Date.now()`. The fallback + * wall clock can move backwards mid-request, so the result is clamped. + * + * @param {() => number} now Clock returned by `resolveClock()` + * @param {number} start Timestamp read from `now` + * + * @returns {number} Non-negative elapsed milliseconds + */ + function elapsedSince(now, start) { + return Math.max(0, Math.round(now() - start)); + } + + /** + * Dispatch a request to the server using the configured adapter. + * + * @param {object} config The config that is to be used for the request + * + * @returns {Promise} The Promise to be fulfilled + */ + function dispatchRequest(_config) { + // Interceptors may replace the merged config with an ordinary object. Flatten + // it at the dispatch boundary so shared prototype members cannot become + // request behavior, while preserving intentional template/class members. + var config = utils$1.toSafeFlatObject(_config); + throwIfCancellationRequested(config); + config.headers = AxiosHeaders.from(utils$1.getSafeProp(config, 'headers')); + + // Transform request data + config.data = transformData.call(config, config.transformRequest); + if (['post', 'put', 'patch'].indexOf(config.method) !== -1) { + config.headers.setContentType('application/x-www-form-urlencoded', false); + } + var adapter = adapters.getAdapter(config.adapter || defaults.adapter, config); + var now = resolveClock(); + var start = now(); + return adapter(config).then(function onAdapterResolution(response) { + throwIfCancellationRequested(config); + response.duration = elapsedSince(now, start); + + // Expose the current response on config so that transformResponse can + // attach it to any AxiosError it throws (e.g. on JSON parse failure). + // We clean it up afterwards to avoid polluting the config object. + config.response = response; + try { + response.data = transformData.call(config, config.transformResponse, response); + } finally { + delete config.response; + } + response.headers = AxiosHeaders.from(response.headers); + return response; + }, function onAdapterRejection(reason) { + if (!isCancel(reason)) { + throwIfCancellationRequested(config); + + // Transform response data + if (reason && reason.response) { + reason.response.duration = elapsedSince(now, start); + config.response = reason.response; + try { + reason.response.data = transformData.call(config, config.transformResponse, reason.response); + } finally { + delete config.response; + } + reason.response.headers = AxiosHeaders.from(reason.response.headers); + } + } + return Promise.reject(reason); + }); + } + + var validators$1 = {}; + + // eslint-disable-next-line func-names + ['object', 'boolean', 'number', 'function', 'string', 'symbol'].forEach(function (type, i) { + validators$1[type] = function validator(thing) { + return _typeof(thing) === type || 'a' + (i < 1 ? 'n ' : ' ') + type; + }; + }); + var deprecatedWarnings = {}; + + /** + * Transitional option validator + * + * @param {function|boolean?} validator - set to false if the transitional option has been removed + * @param {string?} version - deprecated version / removed since version + * @param {string?} message - some message with additional info + * + * @returns {function} + */ + validators$1.transitional = function transitional(validator, version, message) { + function formatMessage(opt, desc) { + return '[Axios v' + VERSION + "] Transitional option '" + opt + "'" + desc + (message ? '. ' + message : ''); + } + + // eslint-disable-next-line func-names + return function (value, opt, opts) { + if (validator === false) { + throw new AxiosError(formatMessage(opt, ' has been removed' + (version ? ' in ' + version : '')), AxiosError.ERR_DEPRECATED); + } + if (version && !deprecatedWarnings[opt]) { + deprecatedWarnings[opt] = true; + // eslint-disable-next-line no-console + console.warn(formatMessage(opt, ' has been deprecated since v' + version + ' and will be removed in the near future')); + } + return validator ? validator(value, opt, opts) : true; + }; + }; + validators$1.spelling = function spelling(correctSpelling) { + return function (value, opt) { + // eslint-disable-next-line no-console + console.warn("".concat(opt, " is likely a misspelling of ").concat(correctSpelling)); + return true; + }; + }; + + /** + * Assert object's properties type + * + * @param {object} options + * @param {object} schema + * @param {boolean?} allowUnknown + * + * @returns {object} + */ + + function assertOptions(options, schema, allowUnknown) { + if (_typeof(options) !== 'object' || options === null) { + throw new AxiosError('options must be an object', AxiosError.ERR_BAD_OPTION_VALUE); + } + var keys = Object.keys(options); + var i = keys.length; + while (i-- > 0) { + var opt = keys[i]; + // Use hasOwnProperty so a polluted Object.prototype. cannot supply + // a non-function validator and cause a TypeError. + var validator = Object.prototype.hasOwnProperty.call(schema, opt) ? schema[opt] : undefined; + if (validator) { + var value = options[opt]; + var result = value === undefined || validator(value, opt, options); + if (result !== true) { + throw new AxiosError('option ' + opt + ' must be ' + result, AxiosError.ERR_BAD_OPTION_VALUE); + } + continue; + } + if (allowUnknown !== true) { + throw new AxiosError('Unknown option ' + opt, AxiosError.ERR_BAD_OPTION); + } + } + } + var validator = { + assertOptions: assertOptions, + validators: validators$1 + }; + + var validators = validator.validators; + + // Recognize header maps without consuming objects intended as literal values. + // AxiosHeaders from other builds share a brand and header-container interface, + // but not constructor identity. A tag and toJSON alone can describe a literal. + var isHeadersBucket = function isHeadersBucket(value) { + if (value == null || utils$1.isPlainObject(value) || value instanceof AxiosHeaders) { + return true; + } + try { + return utils$1.isObject(value) && utils$1.getSafeProp(value, Symbol.toStringTag) === 'AxiosHeaders' && ['toJSON', 'set', 'get', 'has', 'delete', 'clear', 'normalize', 'concat', 'toString', Symbol.iterator].every(function (method) { + return utils$1.isFunction(utils$1.getSafeProp(value, method)); + }); + } catch (e) { + // A failed optional brand probe must not prevent literal header serialization. + return false; + } + }; + + /** + * Create a new instance of Axios + * + * @param {Object} instanceConfig The default config for the instance + * + * @return {Axios} A new instance of Axios + */ + var Axios = /*#__PURE__*/function () { + function Axios(instanceConfig) { + _classCallCheck(this, Axios); + this.defaults = instanceConfig || {}; + this.interceptors = { + request: new InterceptorManager(), + response: new InterceptorManager() + }; + } + + /** + * Dispatch a request + * + * @param {String|Object} configOrUrl The config specific for this request (merged with this.defaults) + * @param {?Object} config + * + * @returns {Promise} The Promise to be fulfilled + */ + return _createClass(Axios, [{ + key: "request", + value: (function () { + var _request2 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee(configOrUrl, config) { + var dummy, dummyStack, stack, firstNewlineIndex, _firstNewlineIndex, secondNewlineIndex, duplicateCheckSuffix, currentStack, causeIndex, stackHead, causeSection, _t; + return _regenerator().w(function (_context) { + while (1) switch (_context.p = _context.n) { + case 0: + _context.p = 0; + _context.n = 1; + return this._request(configOrUrl, config); + case 1: + return _context.a(2, _context.v); + case 2: + _context.p = 2; + _t = _context.v; + if (_t instanceof Error) { + try { + dummy = {}; + Error.captureStackTrace ? Error.captureStackTrace(dummy) : dummy = new Error(); + dummyStack = dummy.stack; + stack = ''; // slice off the Error: ... line + if (typeof dummyStack === 'string') { + firstNewlineIndex = dummyStack.indexOf('\n'); + stack = firstNewlineIndex === -1 ? '' : dummyStack.slice(firstNewlineIndex + 1); + } + if (!_t.stack) { + _t.stack = stack; + } else if (stack) { + // Match a common suffix after the 2 top frames when available, + // otherwise compare the full reconstructed stack. + _firstNewlineIndex = stack.indexOf('\n'); + secondNewlineIndex = _firstNewlineIndex === -1 ? -1 : stack.indexOf('\n', _firstNewlineIndex + 1); + duplicateCheckSuffix = secondNewlineIndex === -1 ? stack : stack.slice(secondNewlineIndex + 1); // `AxiosError.from()` may have already inlined the wrapped error's + // stack under a `Caused by:` marker. Keep the reconstructed caller + // frames ahead of that marker so stack-only reporters do not read + // them as part of the low-level cause. + currentStack = String(_t.stack); + causeIndex = getCauseStackIndex(_t, currentStack); + stackHead = causeIndex === -1 ? currentStack : currentStack.slice(0, causeIndex); + causeSection = causeIndex === -1 ? '' : currentStack.slice(causeIndex); + if (!stackHead.endsWith(duplicateCheckSuffix)) { + _t.stack = stackHead + '\n' + stack + causeSection; + } + } + } catch (e) { + // Ignore failures from custom stack hooks or un-writable stack properties. + } + } + throw _t; + case 3: + return _context.a(2); + } + }, _callee, this, [[0, 2]]); + })); + function request(_x, _x2) { + return _request2.apply(this, arguments); + } + return request; + }()) + }, { + key: "_request", + value: function _request(configOrUrl, config) { + var _this = this; + /*eslint no-param-reassign:0*/ + // Allow for axios('example/url'[, config]) a la fetch API + if (typeof configOrUrl === 'string') { + config = config || {}; + config.url = configOrUrl; + } else { + config = configOrUrl || {}; + } + config = mergeConfig(this.defaults, config); + var _config = config, + transitional = _config.transitional, + paramsSerializer = _config.paramsSerializer, + headers = _config.headers; + if (transitional !== undefined) { + validator.assertOptions(transitional, { + silentJSONParsing: validators.transitional(validators["boolean"]), + forcedJSONParsing: validators.transitional(validators["boolean"]), + clarifyTimeoutError: validators.transitional(validators["boolean"]), + legacyInterceptorReqResOrdering: validators.transitional(validators["boolean"]), + advertiseZstdAcceptEncoding: validators.transitional(validators["boolean"]), + validateStatusUndefinedResolves: validators.transitional(validators["boolean"]), + encodeBasicAuthUsername: validators.transitional(validators["boolean"]) + }, false); + } + if (paramsSerializer != null) { + if (utils$1.isFunction(paramsSerializer)) { + config.paramsSerializer = { + serialize: paramsSerializer + }; + } else { + validator.assertOptions(paramsSerializer, { + encode: validators["function"], + serialize: validators["function"] + }, true); + } + } + + // Set config.allowAbsoluteUrls + if (config.allowAbsoluteUrls !== undefined) ; else if (utils$1.hasOwnProp(this.defaults, 'allowAbsoluteUrls') && this.defaults.allowAbsoluteUrls !== undefined) { + config.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls; + } else { + config.allowAbsoluteUrls = true; + } + validator.assertOptions(config, { + baseUrl: validators.spelling('baseURL'), + withXsrfToken: validators.spelling('withXSRFToken') + }, true); + + // Set config.method + config.method = (utils$1.getSafeProp(config, 'method') || utils$1.getSafeProp(this.defaults, 'method') || 'get').toLowerCase(); + + // Flatten header defaults without consuming literal method-named headers. + var commonHeaders = utils$1.getSafeProp(headers, 'common'); + var methodHeaders = utils$1.getSafeProp(headers, config.method); + var contextHeaders = headers && utils$1.merge(isHeadersBucket(commonHeaders) ? commonHeaders : undefined, isHeadersBucket(methodHeaders) ? methodHeaders : undefined); + headers && utils$1.forEach(methodList.concat('common'), function (method) { + if (isHeadersBucket(utils$1.getSafeProp(headers, method))) { + delete headers[method]; + } + }); + config.headers = AxiosHeaders.concat(contextHeaders, headers); + + // filter out skipped interceptors + var requestInterceptorChain = []; + var synchronousRequestInterceptors = true; + this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) { + if (typeof interceptor.runWhen === 'function' && interceptor.runWhen(config) === false) { + return; + } + synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous; + var transitional = config.transitional || transitionalDefaults; + var legacyInterceptorReqResOrdering = transitional && transitional.legacyInterceptorReqResOrdering; + if (legacyInterceptorReqResOrdering) { + requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected); + } else { + requestInterceptorChain.push(interceptor.fulfilled, interceptor.rejected); + } + }); + var responseInterceptorChain = []; + this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) { + responseInterceptorChain.push(interceptor.fulfilled, interceptor.rejected); + }); + var promise; + var i = 0; + var len; + if (!synchronousRequestInterceptors) { + var chain = [dispatchRequest.bind(this), undefined]; + chain.unshift.apply(chain, requestInterceptorChain); + chain.push.apply(chain, responseInterceptorChain); + len = chain.length; + promise = Promise.resolve(config); + while (i < len) { + promise = promise.then(chain[i++], chain[i++]); + } + return promise; + } + len = requestInterceptorChain.length; + var newConfig = config; + while (i < len) { + var onFulfilled = requestInterceptorChain[i++]; + var onRejected = requestInterceptorChain[i++]; + try { + newConfig = onFulfilled ? onFulfilled(newConfig) : newConfig; + } catch (error) { + if (!onRejected) { + promise = Promise.reject(error); + break; + } + try { + var rejectedResult = onRejected.call(this, error); + if (utils$1.isThenable(rejectedResult)) { + promise = Promise.resolve(rejectedResult).then(function () { + return dispatchRequest.call(_this, newConfig); + }); + } + } catch (rejectedError) { + promise = Promise.reject(rejectedError); + } + break; + } + } + if (!promise) { + try { + promise = dispatchRequest.call(this, newConfig); + } catch (error) { + promise = Promise.reject(error); + } + } + i = 0; + len = responseInterceptorChain.length; + while (i < len) { + promise = promise.then(responseInterceptorChain[i++], responseInterceptorChain[i++]); + } + return promise; + } + }, { + key: "getUri", + value: function getUri(config) { + config = mergeConfig(this.defaults, config); + var fullPath = buildFullPath(config.baseURL, config.url, config.allowAbsoluteUrls, config); + return buildURL(fullPath, config.params, config.paramsSerializer); + } + }]); + }(); // Provide aliases for supported request methods + utils$1.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) { + /*eslint func-names:0*/ + Axios.prototype[method] = /*#__PURE__*/function () { + var _ref = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee2(url, config) { + return _regenerator().w(function (_context2) { + while (1) switch (_context2.n) { + case 0: + return _context2.a(2, this.request(mergeConfig(config || {}, { + method: method, + url: url, + data: config && utils$1.hasOwnProp(config, 'data') ? config.data : undefined + }))); + } + }, _callee2, this); + })); + return function (_x3, _x4) { + return _ref.apply(this, arguments); + }; + }(); + }); + utils$1.forEach(['post', 'put', 'patch', 'query'], function forEachMethodWithData(method) { + function generateHTTPMethod(isForm) { + return /*#__PURE__*/function () { + var _httpMethod = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee3(url, data, config) { + return _regenerator().w(function (_context3) { + while (1) switch (_context3.n) { + case 0: + return _context3.a(2, this.request(mergeConfig(config || {}, { + method: method, + headers: isForm ? { + 'Content-Type': 'multipart/form-data' + } : {}, + url: url, + data: data + }))); + } + }, _callee3, this); + })); + function httpMethod(_x5, _x6, _x7) { + return _httpMethod.apply(this, arguments); + } + return httpMethod; + }(); + } + Axios.prototype[method] = generateHTTPMethod(); + + // QUERY is a safe/idempotent read method; multipart form bodies don't fit + // its semantics, so no queryForm shorthand is generated. + if (method !== 'query') { + Axios.prototype[method + 'Form'] = generateHTTPMethod(true); + } + }); + + /** + * A `CancelToken` is an object that can be used to request cancellation of an operation. + * + * @param {Function} executor The executor function. + * + * @returns {CancelToken} + */ + var CancelToken = /*#__PURE__*/function () { + function CancelToken(executor) { + _classCallCheck(this, CancelToken); + if (typeof executor !== 'function') { + throw new TypeError('executor must be a function.'); + } + var resolvePromise; + this.promise = new Promise(function promiseExecutor(resolve) { + resolvePromise = resolve; + }); + var token = this; + + // eslint-disable-next-line func-names + this.promise.then(function (cancel) { + if (!token._listeners) return; + var i = token._listeners.length; + while (i-- > 0) { + token._listeners[i](cancel); + } + token._listeners = null; + }); + + // eslint-disable-next-line func-names + this.promise.then = function (onfulfilled) { + var _resolve; + // eslint-disable-next-line func-names + var promise = new Promise(function (resolve) { + token.subscribe(resolve); + _resolve = resolve; + }).then(onfulfilled); + promise.cancel = function reject() { + token.unsubscribe(_resolve); + }; + return promise; + }; + executor(function cancel(message, config, request) { + if (token.reason) { + // Cancellation has already been requested + return; + } + token.reason = new CanceledError(message, config, request); + resolvePromise(token.reason); + }); + } + + /** + * Throws a `CanceledError` if cancellation has been requested. + */ + return _createClass(CancelToken, [{ + key: "throwIfRequested", + value: function throwIfRequested() { + if (this.reason) { + throw this.reason; + } + } + + /** + * Subscribe to the cancel signal + */ + }, { + key: "subscribe", + value: function subscribe(listener) { + if (this.reason) { + listener(this.reason); + return; + } + if (this._listeners) { + this._listeners.push(listener); + } else { + this._listeners = [listener]; + } + } + + /** + * Unsubscribe from the cancel signal + */ + }, { + key: "unsubscribe", + value: function unsubscribe(listener) { + if (!this._listeners) { + return; + } + var index = this._listeners.indexOf(listener); + if (index !== -1) { + this._listeners.splice(index, 1); + } + } + }, { + key: "toAbortSignal", + value: function toAbortSignal() { + var _this = this; + var controller = new AbortController(); + var abort = function abort(err) { + controller.abort(err); + }; + this.subscribe(abort); + controller.signal.unsubscribe = function () { + return _this.unsubscribe(abort); + }; + return controller.signal; + } + + /** + * Returns an object that contains a new `CancelToken` and a function that, when called, + * cancels the `CancelToken`. + */ + }], [{ + key: "source", + value: function source() { + var cancel; + var token = new CancelToken(function executor(c) { + cancel = c; + }); + return { + token: token, + cancel: cancel + }; + } + }]); + }(); + + /** + * Syntactic sugar for invoking a function and expanding an array for arguments. + * + * Common use case would be to use `Function.prototype.apply`. + * + * ```js + * function f(x, y, z) {} + * const args = [1, 2, 3]; + * f.apply(null, args); + * ``` + * + * With `spread` this example can be re-written. + * + * ```js + * spread(function(x, y, z) {})([1, 2, 3]); + * ``` + * + * @param {Function} callback + * + * @returns {Function} + */ + function spread(callback) { + return function wrap(arr) { + return callback.apply(null, arr); + }; + } + + /** + * Determines whether the payload is an error thrown by Axios + * + * @param {*} payload The value to test + * + * @returns {boolean} True if the payload is an error thrown by Axios, otherwise false + */ + function isAxiosError(payload) { + return utils$1.isObject(payload) && payload.isAxiosError === true; + } + + var HttpStatusCode = { + 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, + /** + * @deprecated Use `ContentTooLarge` instead. + */ + PayloadTooLarge: 413, + ContentTooLarge: 413, + UriTooLong: 414, + UnsupportedMediaType: 415, + RangeNotSatisfiable: 416, + ExpectationFailed: 417, + ImATeapot: 418, + MisdirectedRequest: 421, + /** + * @deprecated Use `UnprocessableContent` instead. + */ + UnprocessableEntity: 422, + UnprocessableContent: 422, + Locked: 423, + FailedDependency: 424, + TooEarly: 425, + UpgradeRequired: 426, + PreconditionRequired: 428, + TooManyRequests: 429, + RequestHeaderFieldsTooLarge: 431, + UnavailableForLegalReasons: 451, + InternalServerError: 500, + NotImplemented: 501, + BadGateway: 502, + ServiceUnavailable: 503, + GatewayTimeout: 504, + HttpVersionNotSupported: 505, + VariantAlsoNegotiates: 506, + InsufficientStorage: 507, + LoopDetected: 508, + NotExtended: 510, + NetworkAuthenticationRequired: 511, + WebServerReturnsAnUnknownError: 520, + WebServerIsDown: 521, + ConnectionTimedOut: 522, + OriginIsUnreachable: 523, + TimeoutOccurred: 524, + SslHandshakeFailed: 525, + InvalidSslCertificate: 526 + }; + Object.entries(HttpStatusCode).forEach(function (_ref) { + var _ref2 = _slicedToArray(_ref, 2), + key = _ref2[0], + value = _ref2[1]; + if (HttpStatusCode[value] === undefined) { + HttpStatusCode[value] = key; + } + }); + + /** + * Create an instance of Axios + * + * @param {Object} defaultConfig The default config for the instance + * + * @returns {Axios} A new instance of Axios + */ + function createInstance(defaultConfig) { + var context = new Axios(defaultConfig); + var instance = bind(Axios.prototype.request, context); + + // Copy axios.prototype to instance + utils$1.extend(instance, Axios.prototype, context, { + allOwnKeys: true + }); + + // Copy context to instance + utils$1.extend(instance, context, null, { + allOwnKeys: true + }); + + // Factory for creating new instances + instance.create = function create(instanceConfig) { + return createInstance(mergeConfig(defaultConfig, instanceConfig)); + }; + return instance; + } + + // Create the default instance to be exported + var axios = createInstance(defaults); + + // Expose Axios class to allow class inheritance + axios.Axios = Axios; + + // Expose Cancel & CancelToken + axios.CanceledError = CanceledError; + axios.CancelToken = CancelToken; + axios.isCancel = isCancel; + axios.VERSION = VERSION; + axios.toFormData = toFormData; + + // Expose AxiosError class + axios.AxiosError = AxiosError; + + // alias for CanceledError for backward compatibility + axios.Cancel = axios.CanceledError; + + // Expose all/spread + axios.all = function all(promises) { + return Promise.all(promises); + }; + axios.spread = spread; + + // Expose isAxiosError + axios.isAxiosError = isAxiosError; + + // Expose mergeConfig + axios.mergeConfig = mergeConfig; + axios.AxiosHeaders = AxiosHeaders; + axios.formToJSON = function (thing) { + return formDataToJSON(utils$1.isHTMLForm(thing) ? new FormData(thing) : thing); + }; + axios.getAdapter = adapters.getAdapter; + axios.HttpStatusCode = HttpStatusCode; + axios["default"] = axios; + + return axios; + +})); diff --git a/node_modules/axios/dist/axios.min.js b/node_modules/axios/dist/axios.min.js new file mode 100644 index 0000000..4c6f677 --- /dev/null +++ b/node_modules/axios/dist/axios.min.js @@ -0,0 +1,5 @@ +/*! Axios v1.21.1 Copyright (c) 2026 Matt Zabriskie and contributors */ +!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).axios=t()}(this,function(){"use strict";function e(e,t){this.v=e,this.k=t}function t(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw i}}}}function p(e,t,n){return(t=_(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function h(e){return h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},h(e)}function v(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&E(e,t)}function y(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(y=function(){return!!e})()}function b(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function m(e){for(var t=1;t3?(o=h===r)&&(s=i[(u=i[4])?5:(u=3,3)],i[4]=i[5]=e):i[0]<=p&&((o=n<2&&pr||r>h)&&(i[4]=n,i[5]=r,d.n=h,u=0))}if(o||n>1)return a;throw l=!0,r}return function(o,f,h){if(c>1)throw TypeError("Generator is already running");for(l&&1===f&&p(f,h),u=f,s=h;(t=u<2?e:s)||!l;){i||(u?u<3?(u>1&&(d.n=-1),p(u,s)):d.n=s:d.v=s);try{if(c=2,i){if(u||(o="next"),t=i[o]){if(!(t=t.call(i,s)))throw TypeError("iterator result is not an object");if(!t.done)return t;s=t.value,u<2&&(u=0)}else 1===u&&(t=i.return)&&t.call(i),u<2&&(s=TypeError("The iterator does not provide a '"+o+"' method"),u=1);i=e}else if((t=(l=d.n<0)?s:n.call(r,d))!==a)break}catch(t){i=e,u=1,s=t}finally{c=1}}return{value:t,done:l}}}(n,o,i),!0),c}var a={};function u(){}function s(){}function c(){}t=Object.getPrototypeOf;var f=[][r]?t(t([][r]())):(w(t={},r,function(){return this}),t),l=c.prototype=u.prototype=Object.create(f);function d(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,w(e,o,"GeneratorFunction")),e.prototype=Object.create(l),e}return s.prototype=c,w(l,"constructor",c),w(c,"constructor",s),s.displayName="GeneratorFunction",w(c,o,"GeneratorFunction"),w(l),w(l,o,"Generator"),w(l,r,function(){return this}),w(l,"toString",function(){return"[object Generator]"}),(g=function(){return{w:i,m:d}})()}function w(e,t,n,r){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}w=function(e,t,n,r){function i(t,n){w(e,t,function(e){return this._invoke(t,n,e)})}t?o?o(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n:(i("next",0),i("throw",1),i("return",2))},w(e,t,n,r)}function O(e){if(null!=e){var t=e["function"==typeof Symbol&&Symbol.iterator||"@@iterator"],n=0;if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length))return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}}}throw new TypeError(typeof e+" is not iterable")}function E(e,t){return E=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},E(e,t)}function S(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,u=[],s=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=i.call(n)).done)&&(u.push(r.value),u.length!==t);s=!0);}catch(e){c=!0,o=e}finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return u}}(e,t)||A(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function R(e){return function(e){if(Array.isArray(e))return t(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||A(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n;if("undefined"!=typeof Symbol&&void 0!==(n=e[Symbol.toPrimitive])){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}function P(e){return P="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},P(e)}function A(e,n){if(e){if("string"==typeof e)return t(e,n);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?t(e,n):void 0}}function j(e){return function(){return new T(e.apply(this,arguments))}}function T(t){var n,r;function o(n,r){try{var a=t[n](r),u=a.value,s=u instanceof e;Promise.resolve(s?u.v:u).then(function(e){if(s){var r="return"===n&&u.k?n:"next";if(!u.k||e.done)return o(r,e);e=t[r](e).value}i(!!a.done,e)},function(e){o("throw",e)})}catch(e){i(2,e)}}function i(e,t){2===e?n.reject(t):n.resolve({value:t,done:e}),(n=n.next)?o(n.key,n.arg):r=null}this._invoke=function(e,t){return new Promise(function(i,a){var u={key:e,arg:t,resolve:i,reject:a,next:null};r?r=r.next=u:(n=r=u,o(e,t))})},"function"!=typeof t.return&&(this.return=void 0)}function k(e){var t="function"==typeof Map?new Map:void 0;return k=function(e){if(null===e||!function(e){try{return-1!==Function.toString.call(e).indexOf("[native code]")}catch(t){return"function"==typeof e}}(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return function(e,t,n){if(y())return Reflect.construct.apply(null,arguments);var r=[null];r.push.apply(r,t);var o=new(e.bind.apply(e,r));return n&&E(o,n.prototype),o}(e,arguments,h(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),E(n,e)},k(e)}function C(e,t){return function(){return e.apply(t,arguments)}}T.prototype["function"==typeof Symbol&&Symbol.asyncIterator||"@@asyncIterator"]=function(){return this},T.prototype.next=function(e){return this._invoke("next",e)},T.prototype.throw=function(e){return this._invoke("throw",e)},T.prototype.return=function(e){return this._invoke("return",e)};var x,N=Object.prototype.toString,U=Object.getPrototypeOf,D=Symbol.iterator,L=Symbol.toStringTag,F=function(){var e=Object.prototype.hasOwnProperty;return function(t,n){return e.call(t,n)}}(),B=function(e){return"string"==typeof e&&("__proto__"===e||"constructor"===e||"prototype"===e)},I=function(e,t,n){return e===Object.prototype||!n&&null===t},q=function(e,t){for(var n=e,r=[];null!=n;){if(-1!==r.indexOf(n))return!1;r.push(n);var o=U(n);if(I(n,o,n===e))return!1;if(F(n,t))return!0;n=o}return!1},M=(x=Object.create(null),function(e){var t=N.call(e);return x[t]||(x[t]=t.slice(8,-1).toLowerCase())}),z=function(e){return e=e.toLowerCase(),function(t){return M(t)===e}},H=function(e){return function(t){return P(t)===e}},W=Array.isArray,J=H("undefined");function V(e){return null!==e&&!J(e)&&null!==e.constructor&&!J(e.constructor)&&$(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}var K=z("ArrayBuffer");var X=H("string"),$=H("function"),G=H("number"),Q=function(e){return null!==e&&"object"===P(e)},Z=function(e){if(!Q(e))return!1;var t=U(e);return(null===t||t===Object.prototype||null===U(t))&&(I(e,t,!0)||!F(e,L)&&!F(e,D))},Y=z("Date"),ee=z("File"),te=z("Blob"),ne=z("FileList"),re=z("Set");var oe="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},ie=void 0!==oe.FormData?oe.FormData:void 0,ae=z("URLSearchParams"),ue=S(["ReadableStream","Request","Response","Headers"].map(z),4),se=ue[0],ce=ue[1],fe=ue[2],le=ue[3];function de(e,t){var n,r,o=(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).allOwnKeys,i=void 0!==o&&o;if(null!=e)if("object"!==P(e)&&(e=[e]),W(e))for(n=0,r=e.length;n3&&void 0!==arguments[3]?arguments[3]:{}).allOwnKeys}),e},trim:function(e){return e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")},stripBOM:function(e){return 65279===e.charCodeAt(0)&&(e=e.slice(1)),e},inherits:function(e,t,n,r){e.prototype=Object.create(t.prototype,r),Object.defineProperty(e.prototype,"constructor",{__proto__:null,value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{__proto__:null,value:t.prototype}),n&&Object.assign(e.prototype,n)},toFlatObject:function(e,t,n,r){var o,i,a,u={};if(t=t||{},null==e)return t;do{for(i=(o=Object.getOwnPropertyNames(e)).length;i-- >0;)a=o[i],r&&!r(a,e,t)||u[a]||(t[a]=e[a],u[a]=!0);e=!1!==n&&U(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:M,kindOfTest:z,endsWith:function(e,t,n){e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;var r=e.indexOf(t,n);return-1!==r&&r===n},toArray:function(e){if(!e)return null;if(W(e))return e;var t=e.length;if(!Number.isSafeInteger(t)||t<0||t>4294967295)return null;for(var n=new Set,r=new Set,o=e;null!=o&&n.size=0&&r0;)a[t]=e[t];return a},forEachEntry:function(e,t){for(var n,r=(e&&e[D]).call(e);(n=r.next())&&!n.done;){var o=n.value;t.call(e,o[0],o[1])}},matchAll:function(e,t){for(var n,r=[];null!==(n=e.exec(t));)r.push(n);return r},isHTMLForm:be,hasOwnProperty:F,hasOwnProp:F,hasOwnInPrototypeChain:q,getSafeProp:function(e,t){return null!=e&&q(e,t)?e[t]:void 0},toSafeFlatObject:function(e){if(null==e||"object"!==P(e)&&"function"!=typeof e)return e;var t=U(e);if(null===t&&function(e){if(!Object.isExtensible(e))return!1;var t=Object.getOwnPropertyNames(e);return Object.getOwnPropertySymbols&&t.push.apply(t,R(Object.getOwnPropertySymbols(e))),t.every(function(t){if(B(t))return!1;var n=Object.getOwnPropertyDescriptor(e,t);return!!n&&n.configurable&&!0===n.writable})}(e))return e;for(var n=Object.create(null),r=Object.create(null),o=[],i=e;null!=i&&-1===o.indexOf(i);){o.push(i);var a=i===e?t:U(i);if(I(i,a,i===e))break;var u=Object.getOwnPropertyNames(i);Object.getOwnPropertySymbols&&u.push.apply(u,R(Object.getOwnPropertySymbols(i)));var s,c=d(u);try{for(c.s();!(s=c.n()).done;){var f=s.value;B(f)||(F(r,f)||(n[f]=e[f],r[f]=!0))}}catch(e){c.e(e)}finally{c.f()}i=a}return n},reduceDescriptors:we,freezeMethods:function(e){we(e,function(t,n){if($(e)&&["arguments","caller","callee"].includes(n))return!1;var r=e[n];$(r)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=function(){throw Error("Can not rewrite read-only method '"+n+"'")}))})},toObjectSet:function(e,t){var n={},r=function(e){e.forEach(function(e){n[e]=!0})};return W(e)?r(e):r(String(e).split(t)),n},toCamelCase:function(e){return e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,t,n){return t.toUpperCase()+n})},noop:function(){},toFiniteNumber:function(e,t){return null!=e&&Number.isFinite(e=+e)?e:t},findKey:function(e,t){if(V(e))return null;t=t.toLowerCase();for(var n,r=Object.keys(e),o=r.length;o-- >0;)if(t===(n=r[o]).toLowerCase())return n;return null},global:pe,isContextDefined:he,isSpecCompliantForm:function(e){return!!(e&&$(e.append)&&"FormData"===e[L]&&e[D])},toJSONObject:function(e){var t=new WeakSet,n=function(e){if(Q(e)){if(t.has(e))return;if(V(e))return e;if(!("toJSON"in e)){var r;if(t.add(e),re(e)){r=[];var o,i=d(e);try{for(i.s();!(o=i.n()).done;){var a=o.value,u=n(a);!J(u)&&r.push(u)}}catch(e){i.e(e)}finally{i.f()}}else r=W(e)?[]:{},de(e,function(e,t){var o=n(e);!J(o)&&(r[t]=o)});return t.delete(e),r}}return e};return n(e)},isAsyncFn:_e,isThenable:function(e){return e&&(Q(e)||$(e))&&$(e.then)&&$(e.catch)},setImmediate:Pe,asap:Ae,isIterable:je,isSafeIterable:function(e){return null!=e&&q(e,D)&&je(e)}},ke=Te.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]);var Ce=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),xe=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function Ne(e,t){return Te.isArray(e)?e.map(function(e){return Ne(e,t)}):function(e){for(var t=0,n=e.length;tt;){var o=e.charCodeAt(n-1);if(9!==o&&32!==o)break;n-=1}return 0===t&&n===e.length?e:e.slice(t,n)}(String(e).replace(t,""))}function Ue(e){var t=Object.create(null);return Te.forEach(e.toJSON(),function(e,n){t[n]=function(e){return Ne(e,xe)}(e)}),t}var De=Symbol("internals");function Le(e){return e&&String(e).trim().toLowerCase()}function Fe(e){return!1===e||null==e?e:Te.isArray(e)?e.map(Fe):function(e){return Ne(e,Ce)}(String(e))}var Be=/^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/;function Ie(e){for(var t=0,n=e.length;tt;){var o=e.charCodeAt(n-1);if(9!==o&&32!==o)break;n-=1}return 0===t&&n===e.length?e:e.slice(t,n)}var qe=function(e){return"__proto__"===e?"__Proto__":e};function Me(e,t,n,r,o){return Te.isFunction(r)?r.call(e,t,n):(o&&(t=n),Te.isString(t)?Te.isString(r)?-1!==t.indexOf(r):Te.isRegExp(r)?r.test(t):void 0:void 0)}var ze=function(){return l(function e(t){c(this,e),t&&this.set(t)},[{key:"set",value:function(e,t,n){var r=this;function o(e,t,n){var o=Le(t);if(o){var i=Te.findKey(r,o);(!i||void 0===r[i]||!0===n||void 0===n&&!1!==r[i])&&(r[qe(i||t)]=Fe(e))}}var i=function(e,t){return Te.forEach(e,function(e,n){return o(e,n,t)})};if(Te.isPlainObject(e)||e instanceof this.constructor)i(e,t);else if(Te.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()))i(function(e){var t,n,r,o=Object.create(null);return e&&e.split("\n").forEach(function(e){r=e.indexOf(":"),t=e.substring(0,r).trim().toLowerCase(),n=e.substring(r+1).trim();var i=Te.hasOwnProp(o,t);!t||i&&Te.hasOwnProp(ke,t)||("set-cookie"===t?i?o[t].push(n):o[t]=[n]:o[t]=i?o[t]+", "+n:n)}),o}(e),t);else if(Te.isObject(e)&&Te.isSafeIterable(e)){var a,u,s,c=Object.create(null),f=d(e);try{for(f.s();!(s=f.n()).done;){var l=s.value;if(!Te.isArray(l))throw new TypeError("Object iterator must return a key-value pair");u=l[0],Te.hasOwnProp(c,u)?(a=c[u],c[u]=Te.isArray(a)?[].concat(R(a),[l[1]]):[a,l[1]]):c[u]=l[1]}}catch(e){f.e(e)}finally{f.f()}i(c,t)}else null!=e&&o(t,e,n);return this}},{key:"get",value:function(e,t){if(e=Le(e)){var n=Te.findKey(this,e);if(n){var r=this[n];if(!t)return r;if(!0===t)return function(e){for(var t,n=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;t=r.exec(e);)n[t[1]]=t[2];return n}(r);if(Te.isFunction(t))return t.call(this,r,n);if(Te.isRegExp(t))return t.exec(r);throw new TypeError("parser must be boolean|regexp|function")}}}},{key:"has",value:function(e,t){if(e=Le(e)){var n=Te.findKey(this,e);return!(!n||void 0===this[n]||t&&!Me(this,this[n],n,t))}return!1}},{key:"delete",value:function(e,t){var n=this,r=!1;function o(e){if(e=Le(e)){var o=Te.findKey(n,e);!o||t&&!Me(n,n[o],o,t)||(delete n[o],r=!0)}}return Te.isArray(e)?e.forEach(o):o(e),r}},{key:"clear",value:function(e){for(var t=Object.keys(this),n=t.length,r=!1;n--;){var o=t[n];e&&!Me(this,this[o],o,e,!0)||(delete this[o],r=!0)}return r}},{key:"normalize",value:function(e){var t=this,n=Object.create(null);return Te.forEach(this,function(r,o){var i=Te.findKey(n,o);if(i)return t[i]=Fe(r),void delete t[o];var a=qe(e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,function(e,t,n){return t.toUpperCase()+n})}(o):String(o).trim());a!==o&&delete t[o],t[a]=Fe(r),n[a]=!0}),this}},{key:"concat",value:function(){for(var e,t=arguments.length,n=new Array(t),r=0;r=t)return e;n+=e[r]}return n}(s)}}}}for(var u=0;u1?n-1:0),o=1;o0?We(e,t):Te.toJSONObject(e);return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:n,code:this.code,status:this.status}}}],[{key:"from",value:function(e,n,r,o,i,a){var u=e.message;!u&&Te.isArray(e.errors)&&e.errors.length&&(u=function(e){return e.errors.map(function(e){try{return e&&e.message?Je(e.message):Je(e)}catch(e){return""}}).filter(Boolean).join("; ")||e.name||"AggregateError"}(e));var s=new t(u,n||e.code,r,o,i);return Object.defineProperty(s,"cause",{__proto__:null,value:e,writable:!0,enumerable:!1,configurable:!0}),s.name=e.name,function(e,t){try{var n=t&&t.stack;if("string"!=typeof n||!n)return;var r=e.stack;if("string"!=typeof r||!r)return;var o="\nCaused by: "+n;e.stack=r+o,Object.defineProperty(e,Ve,{__proto__:null,value:o})}catch(e){}}(s,e),null!=e.status&&null==s.status&&(s.status=e.status),a&&Object.assign(s,a),s}}])}(k(Error));Xe.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE",Xe.ERR_BAD_OPTION="ERR_BAD_OPTION",Xe.ECONNABORTED="ECONNABORTED",Xe.ETIMEDOUT="ETIMEDOUT",Xe.ECONNREFUSED="ECONNREFUSED",Xe.ERR_NETWORK="ERR_NETWORK",Xe.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS",Xe.ERR_DEPRECATED="ERR_DEPRECATED",Xe.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE",Xe.ERR_BAD_REQUEST="ERR_BAD_REQUEST",Xe.ERR_CANCELED="ERR_CANCELED",Xe.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT",Xe.ERR_INVALID_URL="ERR_INVALID_URL",Xe.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";function $e(e){return Te.isPlainObject(e)||Te.isArray(e)}function Ge(e){return Te.endsWith(e,"[]")?e.slice(0,-2):e}function Qe(e,t,n){return e?e.concat(t).map(function(e,t){return e=Ge(e),!n&&t?"["+e+"]":e}).join(n?".":""):t}var Ze=Te.toFlatObject(Te,{},null,function(e){return/^is[A-Z]/.test(e)});function Ye(e,t,n){if(!Te.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;var r=function(e,t){var r=Te.getSafeProp(n,e);return Te.isUndefined(r)?t:r},o=r("metaTokens",!0),i=r("visitor")||h,a=r("dots",!1),u=r("indexes",!1),s=r("Blob")||"undefined"!=typeof Blob&&Blob,c=r("maxDepth",100),f=s&&Te.isSpecCompliantForm(t),l=[];if(!Te.isFunction(i))throw new TypeError("visitor must be a function");function d(e){if(null===e)return"";if(Te.isDate(e))return e.toISOString();if(Te.isBoolean(e))return e.toString();if(!f&&Te.isBlob(e))throw new Xe("Blob is not supported. Use a Buffer instead.");if(Te.isArrayBuffer(e)||Te.isTypedArray(e)){if(f&&"function"==typeof s)return new s([e]);throw new Xe("Blob is not supported. Use a Buffer instead.",Xe.ERR_NOT_SUPPORT)}return e}function p(e){if(e>c)throw new Xe("Object is too deeply nested ("+e+" levels). Max depth: "+c,Xe.ERR_FORM_DATA_DEPTH_EXCEEDED)}function h(e,n,r){var i=e;if(Te.isReactNative(t)&&Te.isReactNativeBlob(e))return t.append(Qe(r,n,a),d(e)),!1;if(e&&!r&&"object"===P(e))if(Te.endsWith(n,"{}"))n=o?n:n.slice(0,-2),e=function(e,t){if(c===1/0)return JSON.stringify(e);var n=[];return JSON.stringify(e,function(e,r){if(!Te.isObject(r))return r;for(;n.length&&n[n.length-1]!==this;)n.pop();return n.push(r),p(t+n.length-1),r})}(e,1);else if(Te.isArray(e)&&function(e){return Te.isArray(e)&&!e.some($e)}(e)||(Te.isFileList(e)||Te.endsWith(n,"[]"))&&(i=Te.toArray(e)))return n=Ge(n),i.forEach(function(e,r){!Te.isUndefined(e)&&null!==e&&t.append(!0===u?Qe([n],r,a):null===u?n:n+"[]",d(e))}),!1;return!!$e(e)||(t.append(Qe(r,n,a),d(e)),!1)}var v=Object.assign(Ze,{defaultVisitor:h,convertValue:d,isVisitable:$e});if(!Te.isObject(e))throw new TypeError("data must be an object");return function e(n,r){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if(!Te.isUndefined(n)){if(p(o),-1!==l.indexOf(n))throw new Error("Circular reference detected in "+r.join("."));l.push(n),Te.forEach(n,function(n,a){!0===(!(Te.isUndefined(n)||null===n)&&i.call(t,n,Te.isString(a)?a.trim():a,r,v))&&e(n,r?r.concat(a):[a],o+1)}),l.pop()}}(e),t}function et(e){var t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(e).replace(/[!'()~]|%20/g,function(e){return t[e]})}function tt(e,t){this._pairs=[],e&&Ye(e,this,t)}var nt=tt.prototype;function rt(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function ot(e,t,n){if(!t)return e;e=e||"";var r,o=Te.isFunction(n)?{serialize:n}:n,i=Te.getSafeProp(o,"encode")||rt,a=Te.getSafeProp(o,"serialize");if(r=a?a(t,o):Te.isURLSearchParams(t)?t.toString():new tt(t,o).toString(i)){var u=e.indexOf("#");-1!==u&&(e=e.slice(0,u)),e+=(-1===e.indexOf("?")?"?":"&")+r}return e}nt.append=function(e,t){this._pairs.push([e,t])},nt.toString=function(e){var t=this,n=e?function(n){return e.call(t,n,et)}:et;return this._pairs.map(function(e){return n(e[0])+"="+n(e[1])},"").join("&")};var it=Symbol("internals");function at(e){return e?e.length:0}function ut(e){if(e)for(;e.length&&null===e[e.length-1];)e.pop()}function st(e,t){var n=e.handlers,r=at(n);n!==t.handlersRef?(t.handlersRef=n,t.handlerEntries.clear()):r!==t.handlersLength&&(r?t.handlerEntries.forEach(function(e,r){n[e.index]!==e.handler&&t.handlerEntries.delete(r)}):t.handlerEntries.clear()),t.handlersLength=r}var ct=function(){return l(function e(){c(this,e),this.handlers=[],this[it]={handlersRef:this.handlers,handlersLength:this.handlers.length,handlerEntries:new Map,iterationDepth:0,nextId:0}},[{key:"use",value:function(e,t,n){var r={fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null},o=this[it];null==this.handlers&&(this.handlers=[]),st(this,o);var i=o.nextId++;return this.handlers.push(r),o.handlerEntries.set(i,{handler:r,index:this.handlers.length-1}),o.handlersLength=this.handlers.length,i}},{key:"eject",value:function(e){var t=this[it];st(this,t);var n=function(e){return"string"==typeof e&&""!==e&&String(Number(e))===e?Number(e):e}(e),r=t.handlerEntries.get(n);if(r){if(t.handlerEntries.delete(n),this.handlers[r.index]!==r.handler)return;this.handlers[r.index]=null,t.iterationDepth||(ut(this.handlers),t.handlersLength=this.handlers.length)}}},{key:"clear",value:function(){this.handlers&&(this.handlers=[],st(this,this[it]))}},{key:"forEach",value:function(e){var t=this[it];st(this,t),t.iterationDepth++;try{Te.forEach(this.handlers,function(t){null!==t&&e(t)})}finally{--t.iterationDepth||(st(this,t),ut(this.handlers),t.handlersLength=at(this.handlers))}}}])}(),ft={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1,validateStatusUndefinedResolves:!0,encodeBasicAuthUsername:!1},lt={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:tt,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]},dt="undefined"!=typeof window&&"undefined"!=typeof document,pt="object"===("undefined"==typeof navigator?"undefined":P(navigator))&&navigator||void 0,ht=dt&&(!pt||["ReactNative","NativeScript","NS"].indexOf(pt.product)<0),vt="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,yt=dt&&window.location.href||"http://localhost",bt=m(m({},Object.freeze({__proto__:null,hasBrowserEnv:dt,hasStandardBrowserEnv:ht,hasStandardBrowserWebWorkerEnv:vt,navigator:pt,origin:yt})),lt);function mt(e){if(e>100)throw new Xe("FormData field is too deeply nested ("+e+" levels). Max depth: 100",Xe.ERR_FORM_DATA_DEPTH_EXCEEDED)}function gt(e){var t,n,r={},o=Object.keys(e),i=o.length;for(t=0;t=e.length;return i=!i&&Te.isArray(r)?r.length:i,u?(Te.hasOwnProp(r,i)?(r[i]=wt(r[i]),r[i]=Te.isArray(r[i])?r[i].concat(n):[r[i],n]):r[i]=n,!a):(Te.hasOwnProp(r,i)&&Te.isObject(r[i])||(r[i]=[]),t(e,n,r[i],o)&&Te.isArray(r[i])&&(r[i]=gt(r[i])),!a)}if(Te.isFormData(e)&&Te.isFunction(e.entries)){var n={};return Te.forEachEntry(e,function(e,r){t(function(e){for(var t,n=[],r=/[^.[\]]+|\[([^.[\]]*)]/g;null!==(t=r.exec(e));)mt(n.length),n.push("[]"===t[0]?"":t[1]||t[0]);return n}(e),r,n,0)}),function(e){for(var t=[e],n=function(){var e=t.pop();Object.keys(e).forEach(function(n){var r=e[n]=wt(e[n]);(Te.isArray(r)||Te.isPlainObject(r))&&t.push(r)})};t.length;)n();return e}(n)}return null}var Et=Object.freeze(["get","delete","head","options","post","put","patch","purge","link","unlink","query"]),St=function(e,t){return null!=e&&Te.hasOwnProp(e,t)?e[t]:void 0};var Rt={transitional:ft,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){var n,r=t.getContentType()||"",o=r.indexOf("application/json")>-1,i=Te.isObject(e);if(i&&Te.isHTMLForm(e)&&(e=new FormData(e)),Te.isFormData(e))return o?JSON.stringify(Ot(e)):e;if(Te.isArrayBuffer(e)||Te.isBuffer(e)||Te.isStream(e)||Te.isFile(e)||Te.isBlob(e)||Te.isReadableStream(e))return e;if(Te.isArrayBufferView(e))return e.buffer;if(Te.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();if(i){var a=St(this,"formSerializer");if(r.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return Ye(e,new bt.classes.URLSearchParams,m({visitor:function(e,t,n,r){return bt.isNode&&Te.isBuffer(e)?(this.append(t,e.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)}},t))}(e,a).toString();if((n=Te.isFileList(e))||r.indexOf("multipart/form-data")>-1){var u=St(this,"env"),s=u&&u.FormData;return Ye(n?{"files[]":e}:e,s&&new s,a)}}return i||o?(t.setContentType("application/json",!1),function(e,t,n){if(Te.isString(e))try{return(t||JSON.parse)(e),Te.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(n||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){var t=St(this,"transitional")||Rt.transitional,n=t&&t.forcedJSONParsing,r=St(this,"responseType"),o="json"===r;if(Te.isResponse(e)||Te.isReadableStream(e))return e;if(e&&Te.isString(e)&&(n&&!r||o)){var i=!(t&&t.silentJSONParsing)&&o;try{return JSON.parse(e,St(this,"parseReviver"))}catch(e){if(i){if("SyntaxError"===e.name)throw Xe.from(e,Xe.ERR_BAD_RESPONSE,this,null,St(this,"response"));throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:bt.classes.FormData,Blob:bt.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};function _t(e,t){var n=this||Rt,r=t||n,o=ze.from(r.headers),i=r.data;return Te.forEach(e,function(e){i=e.call(n,i,o.normalize(),t?t.status:void 0)}),o.normalize(),i}function Pt(e){return!(!e||!e.__CANCEL__)}Te.forEach(Et,function(e){Rt.headers[e]={}});var At=function(e){function t(e,n,r){var o;return c(this,t),(o=s(this,t,[null==e?"canceled":e,Xe.ERR_CANCELED,n,r])).name="CanceledError",o.__CANCEL__=!0,o}return v(t,e),l(t)}(Xe);function jt(e,t,n){var r=n.config.validateStatus;n.status&&r&&!r(n.status)?t(new Xe("Request failed with status code "+n.status,n.status>=400&&n.status<500?Xe.ERR_BAD_REQUEST:Xe.ERR_BAD_RESPONSE,n.config,n.request,n)):e(n)}var Tt=/[\t\n\r]/g;function kt(e){if("string"!=typeof e)return e;for(var t=0;t2&&void 0!==arguments[2]?arguments[2]:3,r=0,o=function(e,t){e=e||10;var n,r=new Array(e),o=new Array(e),i=0,a=0;return t=void 0!==t?t:1e3,function(u){var s=Date.now(),c=o[a];n||(n=s),r[i]=u,o[i]=s;for(var f=a,l=0;f!==i;)l+=r[f++],f%=e;if((i=(i+1)%e)===a&&(a=(a+1)%e),!(s-n1&&void 0!==arguments[1]?arguments[1]:Date.now();o=i,n=null,r&&(clearTimeout(r),r=null),e.apply(void 0,R(t))};return[function(){for(var e=Date.now(),t=e-o,u=arguments.length,s=new Array(u),c=0;c=i?a(s,e):(n=s,r||(r=setTimeout(function(){r=null,a(n)},i-t)))},function(){return n&&a(n)},function(){for(var e=arguments.length,t=new Array(e),n=0;n1&&void 0!==arguments[1]?arguments[1]:Te.asap;return function(){for(var n=arguments.length,r=new Array(n),o=0;o2&&void 0!==arguments[2]?arguments[2]:"";return"".concat(t).concat(n).concat(He)}):t)}function qt(e,t){if("string"==typeof e){var n=kt(e);if(Bt.test(n))throw new Xe("Invalid URL ".concat(JSON.stringify(It(n)),': missing "//" after protocol'),Xe.ERR_INVALID_URL,t)}}function Mt(e,t,n,r){qt(t,r);var o,i=!("string"==typeof(o=t)&&/^([a-z][a-z\d+\-.]*:)?\/\//i.test(o));return e&&(i||!1===n)?(qt(e,r),function(e,t){if(!t)return e;for(var n=e.length;n>0&&47===e.charCodeAt(n-1);)n--;return e.slice(0,n)+"/"+t.replace(/^\/+/,"")}(e,t)):t}var zt=function(e){return e instanceof ze?m({},e):e},Ht=function(e){return Object.getOwnPropertySymbols&&Object.getOwnPropertyDescriptor?Object.keys(e).concat(Object.getOwnPropertySymbols(e).filter(function(t){var n=Object.getOwnPropertyDescriptor(e,t);return n&&n.enumerable})):Object.keys(e)};function Wt(e,t,n,r){return Te.isPlainObject(e)&&Te.isPlainObject(t)?Te.merge.call({caseless:r},e,t):Te.isPlainObject(t)?Te.merge({},t):Te.isArray(t)?t.slice():t}function Jt(e,t,n,r){return Te.isUndefined(t)?Te.isUndefined(e)?void 0:Wt(void 0,e,0,r):Wt(e,t,0,r)}function Vt(e,t){if(!Te.isUndefined(t))return Wt(void 0,t)}function Kt(e,t){return Te.isUndefined(t)?Te.isUndefined(e)?void 0:Wt(void 0,e):Wt(void 0,t)}function Xt(e,t,n,r,o){return Te.hasOwnProp(o,n)?Wt(e,t):Te.hasOwnProp(r,n)?Wt(void 0,e):void 0}var $t=Object.freeze({__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0}),Gt={url:Vt,method:Vt,data:Vt,baseURL:Kt,transformRequest:Kt,transformResponse:Kt,params:function(e,t){var n=[],r=new WeakMap,o={};function i(e,t){if(!Te.isPlainObject(t))return Te.isArray(t)?t.slice():t;var i=Te.isPlainObject(e)?e:o,a=r.get(t);if(a||(a=new WeakMap,r.set(t,a)),a.has(i))return a.get(i);var u={};return a.set(i,u),n.push({base:i,source:t,result:u}),u}for(var a=Te.isUndefined(t)?i(void 0,e):i(e,t),u=function(){var e=n.pop(),t=e.base,r=e.source,o=e.result,a=new Set(Ht(t)),u=new Set(Ht(r));new Set([].concat(R(a),R(u))).forEach(function(e){if("__proto__"!==e&&"constructor"!==e&&"prototype"!==e){var n=u.has(e),s=n?r[e]:void 0,c=n&&!Te.isPlainObject(s)||!a.has(e)?void 0:t[e];o[e]=n?i(c,s):i(void 0,c)}})};n.length;)u();return function(e){for(var t=[{value:e}],n=new WeakSet,r=new WeakSet,o=function(){var e=t.pop(),o=e.value,i=e.done;if(!Te.isPlainObject(o)&&!Te.isArray(o))return 0;if(i)return n.delete(o),0;if(n.has(o))throw new Xe("Circular reference detected in params",Xe.ERR_BAD_OPTION_VALUE);if(r.has(o))return 0;r.add(o),n.add(o),t.push({value:o,done:!0});var a=Object.keys(o);Object.getOwnPropertySymbols&&Object.getOwnPropertyDescriptor&&Object.getOwnPropertySymbols(o).forEach(function(e){var t=Object.getOwnPropertyDescriptor(o,e);t&&t.enumerable&&a.push(e)}),a.forEach(function(e){if("__proto__"===e||"constructor"===e||"prototype"===e){var n=Object.getOwnPropertyDescriptor(o,e);n&&Te.hasOwnProp(n,"value")&&t.push({value:n.value})}else t.push({value:o[e]})})};t.length;)o()}(a),a},paramsSerializer:Kt,timeout:Kt,timeoutErrorMessage:Kt,withCredentials:Kt,withXSRFToken:Kt,adapter:Kt,responseType:Kt,xsrfCookieName:Kt,xsrfHeaderName:Kt,onUploadProgress:Kt,onDownloadProgress:Kt,decompress:Kt,maxContentLength:Kt,maxBodyLength:Kt,beforeRedirect:Kt,transport:Kt,httpAgent:Kt,httpsAgent:Kt,cancelToken:Kt,socketPath:Kt,allowedSocketPaths:Kt,responseEncoding:Kt,validateStatus:Xt,headers:function(e,t,n){return Jt(zt(e),zt(t),0,!0)}};function Qt(e,t){e=e||{},t=t||{};var n=Object.create(null);Object.defineProperty(n,"hasOwnProperty",$t);for(var r=Ht(m(m({},e),t)),o=0,i=r.length;o1&&void 0!==arguments[1]?arguments[1]:en,n=Qt({},e),r=function(e){return Te.hasOwnProp(n,e)?n[e]:void 0},o=r("data"),i=r("withXSRFToken"),a=r("xsrfHeaderName"),u=r("xsrfCookieName"),s=r("headers"),c=r("auth"),f=r("baseURL"),l=r("allowAbsoluteUrls"),d=r("url");if(n.headers=s=ze.from(s),n.url=ot(Mt(f,d,l,n),r("params"),r("paramsSerializer")),c){var p=Te.getSafeProp(c,"username")||"",h=Te.getSafeProp(c,"password")||"",v=r("transitional"),y=v&&Te.hasOwnProp(v,"encodeBasicAuthUsername")&&!0===v.encodeBasicAuthUsername;try{s.set("Authorization","Basic "+btoa((y?Yt(p):p)+":"+(h?Yt(h):"")))}catch(t){throw Xe.from(t,Xe.ERR_BAD_OPTION_VALUE,e)}}if(Te.isFormData(o)){var b=Te.getSafeProp(o,"getHeaders");bt.hasStandardBrowserEnv||bt.hasStandardBrowserWebWorkerEnv||Te.isReactNative(o)?s.setContentType(void 0):Te.isFunction(b)&&function(e,t,n){"content-only"===n?Object.entries(t||{}).forEach(function(t){var n=S(t,2),r=n[0],o=n[1];Zt.includes(r.toLowerCase())&&e.set(r,o)}):e.set(t)}(s,b.call(o),r("formDataHeaderPolicy"))}if(bt.hasStandardBrowserEnv&&(Te.isFunction(i)&&(i=i(n)),!0===i||null==i&&Ft(n.url))){var m=a&&u&&t(u);m&&s.set(a,m)}return n}var nn="undefined"!=typeof XMLHttpRequest&&function(e){return new Promise(function(t,n){var r,o;try{var i=bt.hasStandardBrowserEnv&&"undefined"!=typeof window&&window.cookieStore;r=i&&Te.isFunction(i.get)}catch(e){}var a,u,s,c,f,l,d,p=tn(e,r?function(e){return o=e,null}:void 0),h=p.data,v=ze.from(p.headers).normalize(),y=p.responseType,b=p.onUploadProgress,m=p.onDownloadProgress;function g(){clearTimeout(u);try{f&&f()}catch(e){setTimeout(function(){throw e})}try{l&&l()}catch(e){setTimeout(function(){throw e})}w&&(c&&w.removeEventListener("progress",c),w.upload&&(s&&w.upload.removeEventListener("progress",s),f&&w.upload.removeEventListener("loadend",f))),p.cancelToken&&p.cancelToken.unsubscribe(a),p.signal&&p.signal.removeEventListener("abort",a)}var w=new XMLHttpRequest;function O(r){if(w){if(!(0!==w.status||"file"===(Ct(kt(p.url))||Ct(bt.origin))||w.responseURL&&w.responseURL.startsWith("file:")))return n(new Xe("Request aborted",Xe.ECONNABORTED,e,w)),g(),void(w=null);try{r?d&&d(r):l&&l()}catch(e){setTimeout(function(){throw e})}if(w){var o=ze.from("getAllResponseHeaders"in w&&w.getAllResponseHeaders());jt(function(e){t(e),g()},function(e){n(e),g()},{data:y&&"text"!==y&&"json"!==y?w.response:w.responseText,status:w.status,statusText:w.statusText,headers:o,config:e,request:w}),w=null}}}if(w.open(p.method.toUpperCase(),p.url,!0),w.timeout=p.timeout,"onloadend"in w?w.onloadend=O:w.onreadystatechange=function(){w&&4===w.readyState&&(0!==w.status||w.responseURL&&w.responseURL.startsWith("file:"))&&setTimeout(O)},w.onabort=function(){w&&(n(new Xe("Request aborted",Xe.ECONNABORTED,e,w)),g(),w=null)},w.onerror=function(t){var r=t&&t.message?t.message:"Network Error",o=new Xe(r,Xe.ERR_NETWORK,e,w);o.event=t||null,n(o),g(),w=null},w.ontimeout=function(){if(w){var t=p.timeout?"timeout of "+p.timeout+"ms exceeded":"timeout exceeded",r=p.transitional||ft;p.timeoutErrorMessage&&(t=p.timeoutErrorMessage),n(new Xe(t,r.clarifyTimeoutError?Xe.ETIMEDOUT:Xe.ECONNABORTED,e,w)),g(),w=null}},void 0===h&&v.setContentType(null),Te.isUndefined(p.withCredentials)||(w.withCredentials=!!p.withCredentials),y&&"json"!==y&&(w.responseType=p.responseType),m){var E=S(Ut(m,!0),3);c=E[0],l=E[1],d=E[2],w.addEventListener("progress",c)}if(b&&w.upload){var R=S(Ut(b),2);s=R[0],f=R[1],w.upload.addEventListener("progress",s),w.upload.addEventListener("loadend",f)}if(p.cancelToken||p.signal){if(a=function(t){if(w){n(!t||t.type?new At(null,e,w):t);var r=w;g(),w=null,r.abort()}},p.cancelToken&&p.cancelToken.subscribe(a),!w)return;p.signal&&(p.signal.aborted?a():p.signal.addEventListener("abort",a))}if(w){var _=Ct(p.url);if(_&&!bt.protocols.includes(_))return n(new Xe("Unsupported protocol "+_+":",Xe.ERR_BAD_REQUEST,e)),void g();var P=function(){w&&("setRequestHeader"in w&&Te.forEach(Ue(v),function(e,t){w.setRequestHeader(t,e)}),w.send(h||null))};if(o){var A="undefined"!=typeof performance&&Te.isFunction(performance.now)?function(){return performance.now()}:Date.now,j=w.timeout>0?A()+Number(w.timeout):void 0,T=function(){if(w){var e=w;e.ontimeout(),e.abort()}};if(void 0!==j){var k=function(){var e=j-A();e>0?u=setTimeout(k,Math.min(e,2147483647)):T()};k()}Nt.readAsync(o).then(function(e){if(w)if(void 0!==j&&A()>=j)T();else{if(e){var t=Te.hasOwnProp(p,"xsrfHeaderName")&&p.xsrfHeaderName;v.set(t,e)}P()}}).catch(function(t){w&&(n(Xe.from(t,null,e,w)),g(),w=null)})}else P()}})},rn=function(e,t){if(e=e?e.filter(Boolean):[],t||e.length){var n=new AbortController,r=!1,o=function(e){if(!r){r=!0,a();var t=e instanceof Error?e:this.reason;n.abort(t instanceof Xe?t:new At(t instanceof Error?t.message:t))}},i=t&&setTimeout(function(){i=null,o(new Xe("timeout of ".concat(t,"ms exceeded"),Xe.ETIMEDOUT))},t),a=function(){e&&(i&&clearTimeout(i),i=null,e.forEach(function(e){var t=Te.getSafeProp(e,"unsubscribe");Te.isFunction(t)?t.call(e,o):e.removeEventListener("abort",o)}),e=null)};e.forEach(function(e){r||(e.aborted?o.call(e):e.addEventListener("abort",o,{once:!0}))});var u=n.signal;return u.unsubscribe=function(){return Te.asap(a)},u}},on=g().m(function e(t,n){var r,o,i;return g().w(function(e){for(;;)switch(e.n){case 0:if(r=t.byteLength,n&&!(r=55296&&o<=56319&&e.charCodeAt(r+1)>=56320&&e.charCodeAt(r+1)<=57343?(n+=4,r++):n+=3:(13===o&&10===e.charCodeAt(r+1)&&r++,n+=2)}return n},pn=function(e){function t(e,n){var r;return c(this,t),(r=s(this,t,[e])).name="FormDataError",r.reason=n,r}return v(t,e),l(t)}(k(TypeError));function hn(e,t,n,r,o){if(!Te.isFunction(t))throw new Xe("Blob is not supported",Xe.ERR_NOT_SUPPORT);if(void 0===o)if(Te.isFunction(bt.generateString))o="axios-"+bt.generateString(36,"0123456789abcdef");else{var i=Te.global.crypto;if(!i||!Te.isFunction(i.getRandomValues))throw new Xe("Random byte generation is not supported",Xe.ERR_NOT_SUPPORT);var a=new Uint8Array(18);i.getRandomValues(a),o="axios-"+Array.from(a,function(e){return("0"+e.toString(16)).slice(-2)}).join("")}try{return function(e,t,n,r,o){if(!Te.isFunction(t))throw new pn("Blob is not supported","blob");if(!Te.isString(o)||!/^[A-Za-z0-9'()+_,./:=? -]{1,70}$/.test(o)||/ $/.test(o))throw new pn("Invalid multipart boundary","boundary");var i="--"+o+"--"+cn,a=i.length,u=[],s=function(e){if(a+e>n)throw r()};s(0);var c,f=d(e);try{for(f.s();!(c=f.n()).done;){var l=S(c.value,2),p=l[0],h=l[1],v=Te.isString(h),y=v?dn(h,!0):h.size;if(!Number.isFinite(y)||y<0)throw new pn("Unsupported FormData part size","part");s(y+dn(p,!0)+(!v&&h.name?dn(h.name,!1):0)+(!v&&h.type?dn(h.type,!1):0));var b="--"+o+'\r\nContent-Disposition: form-data; name="'+ln(fn(p))+'"';v||(b+='; filename="'+ln(Te.isString(h.name)?h.name:"blob")+'"\r\nContent-Type: '+String(h.type||"application/octet-stream").replace(/[\r\n]/g,""));var m=dn(b+=cn+cn,!1)+y+2;s(m),a+=m,u.push({header:b,value:h,isString:v})}}catch(e){f.e(e)}finally{f.f()}for(var g=[],w=0,O=u;w=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102},yn=function(e,t,n){return t+2=65&&e<=90||e>=97&&e<=122||e>=48&&e<=57||43===e||47===e||45===e||95===e},gn=function(e){return 9===e||10===e||12===e||13===e||32===e},wn=function(e){for(var t=e.length,n=0,r=0,o=!1,i=0;i0?o=!0:n++:r++)}return o||r>2||r>0&&(n+r)%4!=0||n%4==1?function(e){var t=e.length,n=0;return t>0&&61===e.charCodeAt(t-1)&&(n++,t>1&&61===e.charCodeAt(t-2)&&n++),Math.floor(3*(t-n)/4)}(e):function(e){var t=e%4;return 3*Math.floor(e/4)+(2===t?1:3===t?2:0)}(n)};function On(e){var t="string"==typeof e?e.indexOf("#"):-1;return function(e,t,n){if(!e||"string"!=typeof e)return 0;if(!/^data:/i.test(e))return 0;var r=e.indexOf(",");if(r<0)return 0;var o=e.slice(5,r),i=e.slice(r+1);if(n.test(o))return t(i);for(var a=0,u=0,s=i.length;u=55296&&c<=56319&&u+1=56320&&f<=57343?(a+=4,u++):a+=3}else a+=3}return a}(-1===t?e:e.slice(0,t),wn,/; *base64[\t\n\f\r ]*$/i)}var En="1.21.1",Sn={cache:"default",redirect:"follow",referrer:"about:client",referrerPolicy:"",mode:"cors",integrity:"",keepalive:!1,priority:"auto",window:null},Rn=Te.isFunction,_n=function(e){return encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,function(e,t){return String.fromCharCode(parseInt(t,16))})},Pn=function(e){if(!Te.isString(e))return e;try{return decodeURIComponent(e)}catch(t){return e}},An=function(e){try{for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r-1,D=Te.isNumber(x)&&x>-1,L=function(e){return Te.hasOwnProp(t,e)?t[e]:void 0},F=o||fetch,P=P?(P+"").toLowerCase():"text",B=rn([d,p&&p.toAbortSignal()],v),I=null,q=B&&B.unsubscribe&&function(){B.unsubscribe()},z=null,H=null,W=function(){return new Xe("Request body larger than maxBodyLength limit",Xe.ERR_BAD_REQUEST,t,I)},e.p=1,J=void 0,(V=L("auth"))&&(K=Te.getSafeProp(V,"username")||"",X=Te.getSafeProp(V,"password")||"",J={username:K,password:X}),jn(i)&&($=new URL(i,bt.origin),J||!$.username&&!$.password||(G=Pn($.username),Q=Pn($.password),J={username:G,password:Q}),($.username||$.password)&&($.username="",$.password="",i=$.href)),J&&(A.delete("authorization"),A.set("Authorization","Basic "+btoa(_n((J.username||"")+":"+(J.password||""))))),!U||!$||"data:"!==$.protocol){e.n=2;break}if(!(On($.href)>C)){e.n=2;break}throw new Xe("maxContentLength size of "+C+" exceeded",Xe.ERR_BAD_RESPONSE,t,I);case 2:if(Z=Te.isSpecCompliantForm(f)&&ze.from(L("headers")).getContentType(),Te.isString(Z)&&/^multipart\/form-data(?:\s*;|$)/i.test(Z.trim())&&(ee=ze.parseParameters(Z),Te.hasOwnProp(ee,"boundary")&&(Y=ee.boundary)),Te.isSpecCompliantForm(f)&&"get"!==a&&"head"!==a&&(D||_&&y||void 0!==Y)&&(f=hn(f,c,D?x:1/0,W,Y),A.setContentType(void 0===Y?f.type:Z),M=f.size),!D||"get"===a||"head"===a){e.n=4;break}return e.n=3,O(f);case 3:if("number"!=typeof(te=e.v)||!isFinite(te)){e.n=4;break}if(M=te,!(te>x)){e.n=4;break}throw W();case 4:if(ne=D&&(Te.isReadableStream(f)||Te.isStream(f)),re=function(e,t,n){return sn(e,65536,function(e){if(D&&e>x)throw z=W();t&&t(e)},n)},!y||"get"===a||"head"===a||!_&&!ne){e.n=8;break}if(null!=M){e.n=6;break}return e.n=5,E(A,f);case 5:ke=e.v,e.n=7;break;case 6:ke=M;case 7:(0!==(M=ke)||ne)&&(oe=new u(i,{method:"POST",body:f,duplex:"half"}),Te.isFormData(f)&&(ie=oe.headers.get("content-type"))&&A.setContentType(ie),oe.body&&(ae=_&&Dt(M,Ut(Lt(_)))||[],ue=S(ae,2),se=ue[0],ce=ue[1],f=re(oe.body,se,ce))),e.n=10;break;case 8:if(!ne||l||!h||"get"===a||"head"===a){e.n=9;break}f=re(f),e.n=10;break;case 9:if(!ne||!l||y||"get"===a||"head"===a){e.n=10;break}throw new Xe("Stream request bodies are not supported by the current fetch implementation",Xe.ERR_NOT_SUPPORT,t,I);case 10:return Te.isString(T)||(T=T?"include":"omit"),fe=l&&"credentials"in u.prototype,Te.isFormData(f)&&(le=A.getContentType())&&/^multipart\/form-data/i.test(le)&&!/boundary=/i.test(le)&&A.delete("content-type"),A.set("User-Agent","axios/"+En,!1),(de=null==k?k:Object.assign(Object.create(null),k))&&(delete de.body,delete de.headers,delete de.method,delete de.signal,delete de.duplex,delete de.credentials),pe=Object.assign(Object.create(null),de,{signal:B,method:a.toUpperCase(),headers:Ue(A.normalize()),body:f,duplex:"half",credentials:fe?T:void 0}),l&&(Te.forEach(m,function(e,t){void 0===pe[t]&&(pe[t]=e)}),void 0===pe.signal&&(pe.signal=null),void 0===pe.body&&(pe.body=null)),0===N&&(pe.redirect="manual",de&&(de.redirect="manual")),I=l&&new u(i,pe),e.n=11,l?F(I,de):F(i,pe);case 11:if(he=e.v,ve=ze.from(he.headers),!U){e.n=12;break}if(!(null!=(ye=Te.toFiniteNumber(ve.getContentLength()))&&ye>C)){e.n=12;break}throw new Xe("maxContentLength size of "+C+" exceeded",Xe.ERR_BAD_RESPONSE,t,I);case 12:return be=b&&("stream"===P||"response"===P),b&&he.body&&(R||U||be&&q)&&(me={},["status","statusText","headers"].forEach(function(e){me[e]=he[e]}),ge=Te.toFiniteNumber(ve.getContentLength()),we=R&&Dt(ge,Ut(Lt(R),!0))||[],Oe=S(we,2),Ee=Oe[0],Se=Oe[1],Re=function(e){if(U&&e>C)throw H=new Xe("maxContentLength size of "+C+" exceeded",Xe.ERR_BAD_RESPONSE,t,I);Ee&&Ee(e)},he=new s(sn(he.body,65536,Re,function(){Se&&Se(),q&&q()}),me)),P=P||"text",e.n=13,w[Te.findKey(w,P)||"text"](he,t);case 13:if(_e=e.v,!U||b||be){e.n=14;break}if(null!=_e&&("number"==typeof _e.byteLength?Pe=_e.byteLength:"number"==typeof _e.size?Pe=_e.size:"string"==typeof _e&&(Pe="function"==typeof r?(new r).encode(_e).byteLength:_e.length)),!("number"==typeof Pe&&Pe>C)){e.n=14;break}throw new Xe("maxContentLength size of "+C+" exceeded",Xe.ERR_BAD_RESPONSE,t,I);case 14:return!be&&q&&q(),e.n=15,new Promise(function(e,n){jt(e,n,{data:_e,headers:ze.from(he.headers),status:he.status,statusText:he.statusText,config:t,request:I})});case 15:return e.a(2,e.v);case 16:if(e.p=16,Ce=e.v,q&&q(),!(B&&B.aborted&&B.reason instanceof Xe)){e.n=17;break}throw(Ae=B.reason).config=t,I&&(Ae.request=I),Ce!==Ae&&Object.defineProperty(Ae,"cause",{__proto__:null,value:Ce,writable:!0,enumerable:!1,configurable:!0}),Ae;case 17:if(!z){e.n=18;break}throw I&&!z.request&&(z.request=I),z;case 18:if(!H){e.n=19;break}throw H;case 19:if(!(Ce instanceof Xe)){e.n=20;break}throw I&&!Ce.request&&(Ce.request=I),Ce;case 20:if(!Ce||"TypeError"!==Ce.name||!/Load failed|fetch/i.test(Ce.message)){e.n=21;break}throw je=new Xe("Network Error",Xe.ERR_NETWORK,t,I,Ce&&Ce.response),Object.defineProperty(je,"cause",{__proto__:null,value:Ce.cause||Ce,writable:!0,enumerable:!1,configurable:!0}),je;case 21:throw Xe.from(Ce,Ce&&Ce.code,t,I,Ce&&Ce.response);case 22:return e.a(2)}},e,null,[[1,16]])}));return function(t){return e.apply(this,arguments)}}()},kn=new Map,Cn=function(e){var t=Object.create(null),n=e&&Te.hasOwnProp(e,"env")&&e.env;["fetch","Request","Response","Blob"].forEach(function(e){n&&Te.hasOwnProp(n,e)&&(t[e]=n[e])});for(var r,o,i=t.fetch,a=[t.Request,t.Response,i,t.Blob],u=a.length,s=kn;u--;)r=a[u],void 0===(o=s.get(r))&&s.set(r,o=u?new Map:Tn(t)),s=o;return o};Cn();var xn={http:null,xhr:nn,fetch:{get:Cn}};Te.forEach(xn,function(e,t){if(e){try{Object.defineProperty(e,"name",{__proto__:null,value:t})}catch(e){}Object.defineProperty(e,"adapterName",{__proto__:null,value:t})}});var Nn=function(e){return"- ".concat(e)},Un=function(e){return Te.isFunction(e)||null===e||!1===e};var Dn={getAdapter:function(e,t){for(var n,r,o=(e=Te.isArray(e)?e:[e]).length,i={},a=0;a1?"since :\n"+s.map(Nn).join("\n"):" "+Nn(s[0]):"as no adapter specified";throw new Xe("There is no suitable adapter to dispatch the request "+c,Xe.ERR_NOT_SUPPORT)}return r},adapters:xn};function Ln(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new At(null,e)}function Fn(e,t){return Math.max(0,Math.round(e()-t))}function Bn(e){var t=Te.toSafeFlatObject(e);Ln(t),t.headers=ze.from(Te.getSafeProp(t,"headers")),t.data=_t.call(t,t.transformRequest),-1!==["post","put","patch"].indexOf(t.method)&&t.headers.setContentType("application/x-www-form-urlencoded",!1);var n=Dn.getAdapter(t.adapter||Rt.adapter,t),r="undefined"!=typeof performance&&Te.isFunction(performance.now)?function(){return performance.now()}:Date.now,o=r();return n(t).then(function(e){Ln(t),e.duration=Fn(r,o),t.response=e;try{e.data=_t.call(t,t.transformResponse,e)}finally{delete t.response}return e.headers=ze.from(e.headers),e},function(e){if(!Pt(e)&&(Ln(t),e&&e.response)){e.response.duration=Fn(r,o),t.response=e.response;try{e.response.data=_t.call(t,t.transformResponse,e.response)}finally{delete t.response}e.response.headers=ze.from(e.response.headers)}return Promise.reject(e)})}var In={};["object","boolean","number","function","string","symbol"].forEach(function(e,t){In[e]=function(n){return P(n)===e||"a"+(t<1?"n ":" ")+e}});var qn={};In.transitional=function(e,t,n){function r(e,t){return"[Axios v"+En+"] Transitional option '"+e+"'"+t+(n?". "+n:"")}return function(n,o,i){if(!1===e)throw new Xe(r(o," has been removed"+(t?" in "+t:"")),Xe.ERR_DEPRECATED);return t&&!qn[o]&&(qn[o]=!0,console.warn(r(o," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,o,i)}},In.spelling=function(e){return function(t,n){return console.warn("".concat(n," is likely a misspelling of ").concat(e)),!0}};var Mn={assertOptions:function(e,t,n){if("object"!==P(e)||null===e)throw new Xe("options must be an object",Xe.ERR_BAD_OPTION_VALUE);for(var r=Object.keys(e),o=r.length;o-- >0;){var i=r[o],a=Object.prototype.hasOwnProperty.call(t,i)?t[i]:void 0;if(a){var u=e[i],s=void 0===u||a(u,i,e);if(!0!==s)throw new Xe("option "+i+" must be "+s,Xe.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new Xe("Unknown option "+i,Xe.ERR_BAD_OPTION)}},validators:In},zn=Mn.validators,Hn=function(e){if(null==e||Te.isPlainObject(e)||e instanceof ze)return!0;try{return Te.isObject(e)&&"AxiosHeaders"===Te.getSafeProp(e,Symbol.toStringTag)&&["toJSON","set","get","has","delete","clear","normalize","concat","toString",Symbol.iterator].every(function(t){return Te.isFunction(Te.getSafeProp(e,t))})}catch(e){return!1}},Wn=function(){return l(function e(t){c(this,e),this.defaults=t||{},this.interceptors={request:new ct,response:new ct}},[{key:"request",value:(e=a(g().m(function e(t,n){var r,o,i,a,u,s,c,f,l,d,p,h;return g().w(function(e){for(;;)switch(e.p=e.n){case 0:return e.p=0,e.n=1,this._request(t,n);case 1:return e.a(2,e.v);case 2:if(e.p=2,(h=e.v)instanceof Error)try{r={},Error.captureStackTrace?Error.captureStackTrace(r):r=new Error,o=r.stack,i="","string"==typeof o&&(a=o.indexOf("\n"),i=-1===a?"":o.slice(a+1)),h.stack?i&&(u=i.indexOf("\n"),s=-1===u?-1:i.indexOf("\n",u+1),c=-1===s?i:i.slice(s+1),f=String(h.stack),l=Ke(h,f),d=-1===l?f:f.slice(0,l),p=-1===l?"":f.slice(l),d.endsWith(c)||(h.stack=d+"\n"+i+p)):h.stack=i}catch(e){}throw h;case 3:return e.a(2)}},e,this,[[0,2]])})),function(t,n){return e.apply(this,arguments)})},{key:"_request",value:function(e,t){var n=this;"string"==typeof e?(t=t||{}).url=e:t=e||{};var r=t=Qt(this.defaults,t),o=r.transitional,i=r.paramsSerializer,a=r.headers;void 0!==o&&Mn.assertOptions(o,{silentJSONParsing:zn.transitional(zn.boolean),forcedJSONParsing:zn.transitional(zn.boolean),clarifyTimeoutError:zn.transitional(zn.boolean),legacyInterceptorReqResOrdering:zn.transitional(zn.boolean),advertiseZstdAcceptEncoding:zn.transitional(zn.boolean),validateStatusUndefinedResolves:zn.transitional(zn.boolean),encodeBasicAuthUsername:zn.transitional(zn.boolean)},!1),null!=i&&(Te.isFunction(i)?t.paramsSerializer={serialize:i}:Mn.assertOptions(i,{encode:zn.function,serialize:zn.function},!0)),void 0!==t.allowAbsoluteUrls||(Te.hasOwnProp(this.defaults,"allowAbsoluteUrls")&&void 0!==this.defaults.allowAbsoluteUrls?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),Mn.assertOptions(t,{baseUrl:zn.spelling("baseURL"),withXsrfToken:zn.spelling("withXSRFToken")},!0),t.method=(Te.getSafeProp(t,"method")||Te.getSafeProp(this.defaults,"method")||"get").toLowerCase();var u=Te.getSafeProp(a,"common"),s=Te.getSafeProp(a,t.method),c=a&&Te.merge(Hn(u)?u:void 0,Hn(s)?s:void 0);a&&Te.forEach(Et.concat("common"),function(e){Hn(Te.getSafeProp(a,e))&&delete a[e]}),t.headers=ze.concat(c,a);var f=[],l=!0;this.interceptors.request.forEach(function(e){if("function"!=typeof e.runWhen||!1!==e.runWhen(t)){l=l&&e.synchronous;var n=t.transitional||ft;n&&n.legacyInterceptorReqResOrdering?f.unshift(e.fulfilled,e.rejected):f.push(e.fulfilled,e.rejected)}});var d,p=[];this.interceptors.response.forEach(function(e){p.push(e.fulfilled,e.rejected)});var h,v=0;if(!l){var y=[Bn.bind(this),void 0];for(y.unshift.apply(y,f),y.push.apply(y,p),h=y.length,d=Promise.resolve(t);v0;)r._listeners[t](e);r._listeners=null}}),this.promise.then=function(e){var t,n=new Promise(function(e){r.subscribe(e),t=e}).then(e);return n.cancel=function(){r.unsubscribe(t)},n},t(function(e,t,o){r.reason||(r.reason=new At(e,t,o),n(r.reason))})}return l(e,[{key:"throwIfRequested",value:function(){if(this.reason)throw this.reason}},{key:"subscribe",value:function(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}},{key:"unsubscribe",value:function(e){if(this._listeners){var t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}}},{key:"toAbortSignal",value:function(){var e=this,t=new AbortController,n=function(e){t.abort(e)};return this.subscribe(n),t.signal.unsubscribe=function(){return e.unsubscribe(n)},t.signal}}],[{key:"source",value:function(){var t;return{token:new e(function(e){t=e}),cancel:t}}}])}();var Vn={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,ContentTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,UnprocessableContent:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerReturnsAnUnknownError:520,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(Vn).forEach(function(e){var t=S(e,2),n=t[0],r=t[1];void 0===Vn[r]&&(Vn[r]=n)});var Kn=function e(t){var n=new Wn(t),r=C(Wn.prototype.request,n);return Te.extend(r,Wn.prototype,n,{allOwnKeys:!0}),Te.extend(r,n,null,{allOwnKeys:!0}),r.create=function(n){return e(Qt(t,n))},r}(Rt);return Kn.Axios=Wn,Kn.CanceledError=At,Kn.CancelToken=Jn,Kn.isCancel=Pt,Kn.VERSION=En,Kn.toFormData=Ye,Kn.AxiosError=Xe,Kn.Cancel=Kn.CanceledError,Kn.all=function(e){return Promise.all(e)},Kn.spread=function(e){return function(t){return e.apply(null,t)}},Kn.isAxiosError=function(e){return Te.isObject(e)&&!0===e.isAxiosError},Kn.mergeConfig=Qt,Kn.AxiosHeaders=ze,Kn.formToJSON=function(e){return Ot(Te.isHTMLForm(e)?new FormData(e):e)},Kn.getAdapter=Dn.getAdapter,Kn.HttpStatusCode=Vn,Kn.default=Kn,Kn}); +//# sourceMappingURL=axios.min.js.map diff --git a/node_modules/axios/dist/axios.min.js.map b/node_modules/axios/dist/axios.min.js.map new file mode 100644 index 0000000..43daf0b --- /dev/null +++ b/node_modules/axios/dist/axios.min.js.map @@ -0,0 +1 @@ +{"version":3,"file":"axios.min.js","sources":["../lib/helpers/bind.js","../lib/utils.js","../lib/helpers/parseHeaders.js","../lib/helpers/sanitizeHeaderValue.js","../lib/core/AxiosHeaders.js","../lib/core/AxiosError.js","../lib/helpers/toFormData.js","../lib/helpers/AxiosURLSearchParams.js","../lib/helpers/buildURL.js","../lib/core/InterceptorManager.js","../lib/defaults/transitional.js","../lib/platform/browser/index.js","../lib/platform/browser/classes/URLSearchParams.js","../lib/platform/browser/classes/FormData.js","../lib/platform/browser/classes/Blob.js","../lib/platform/common/utils.js","../lib/platform/index.js","../lib/helpers/formDataToJSON.js","../lib/core/methodList.js","../lib/defaults/index.js","../lib/helpers/toURLEncodedForm.js","../lib/core/transformData.js","../lib/cancel/isCancel.js","../lib/cancel/CanceledError.js","../lib/core/settle.js","../lib/helpers/normalizeURLForProtocolCheck.js","../lib/helpers/parseProtocol.js","../lib/helpers/cookies.js","../lib/helpers/progressEventReducer.js","../lib/helpers/speedometer.js","../lib/helpers/throttle.js","../lib/helpers/isURLSameOrigin.js","../lib/core/buildFullPath.js","../lib/helpers/isAbsoluteURL.js","../lib/helpers/combineURLs.js","../lib/core/mergeConfig.js","../lib/core/assertParamsAcyclic.js","../lib/core/setFormDataHeaders.js","../lib/helpers/resolveConfig.js","../lib/adapters/xhr.js","../lib/helpers/composeSignals.js","../lib/helpers/trackStream.js","../lib/helpers/formDataToBlob.js","../lib/core/createMultipartBody.js","../lib/helpers/estimateDataURLDecodedBytes.js","../lib/env/data.js","../lib/adapters/fetch.js","../lib/adapters/adapters.js","../lib/helpers/null.js","../lib/core/dispatchRequest.js","../lib/helpers/validator.js","../lib/core/Axios.js","../lib/cancel/CancelToken.js","../lib/helpers/HttpStatusCode.js","../lib/axios.js","../lib/helpers/spread.js","../lib/helpers/isAxiosError.js"],"sourcesContent":["'use strict';\n\n/**\n * Create a bound version of a function with a specified `this` context\n *\n * @param {Function} fn - The function to bind\n * @param {*} thisArg - The value to be passed as the `this` parameter\n * @returns {Function} A new function that will call the original function with the specified `this` context\n */\nexport default function bind(fn, thisArg) {\n return function wrap() {\n return fn.apply(thisArg, arguments);\n };\n}\n","'use strict';\n\nimport bind from './helpers/bind.js';\n\n// utils is a library of generic helper functions non-specific to axios\n\nconst { toString } = Object.prototype;\nconst { getPrototypeOf } = Object;\nconst { iterator, toStringTag } = Symbol;\n\n/* Creating a function that will check if an object has a property. */\nconst hasOwnProperty = (\n ({ hasOwnProperty }) =>\n (obj, prop) =>\n hasOwnProperty.call(obj, prop)\n)(Object.prototype);\n\nconst isUnsafeObjectKey = (prop) =>\n typeof prop === 'string' &&\n (prop === '__proto__' || prop === 'constructor' || prop === 'prototype');\n\n/**\n * Determine whether an inherited object must be treated as a shared-prototype\n * boundary. Cross-realm Object.prototype objects cannot be distinguished\n * reliably from application-created null-prototype objects because their\n * properties are mutable, so all inherited terminal prototypes are excluded\n * as a fail-closed boundary. A null-prototype source still keeps its own\n * properties, as produced by mergeConfig and other safe materialization paths.\n *\n * @param {*} obj The object to inspect\n * @param {*} prototype The object's prototype\n * @param {boolean} source Whether obj is the original traversal source\n *\n * @returns {boolean} True when obj is a safe prototype traversal boundary\n */\nconst isPrototypeBoundary = (obj, prototype, source) =>\n obj === Object.prototype || (!source && prototype === null);\n\n/**\n * Determine whether an object can retain its identity through code paths that\n * add, replace, and remove config properties without bypassing unsafe-key\n * filtering. Immutable objects, unsafe-key-bearing objects, and objects with\n * accessor or restricted data properties must be materialized instead.\n *\n * @param {*} obj The object to inspect\n *\n * @returns {boolean} True when every own property is safe and fully mutable\n */\nconst isSafeAndFullyMutable = (obj) => {\n if (!Object.isExtensible(obj)) {\n return false;\n }\n\n const props = Object.getOwnPropertyNames(obj);\n\n if (Object.getOwnPropertySymbols) {\n props.push(...Object.getOwnPropertySymbols(obj));\n }\n\n return props.every((prop) => {\n if (isUnsafeObjectKey(prop)) {\n return false;\n }\n\n const descriptor = Object.getOwnPropertyDescriptor(obj, prop);\n\n return !!descriptor && descriptor.configurable && descriptor.writable === true;\n });\n};\n\n/**\n * Walk the prototype chain (excluding the source realm's Object.prototype)\n * looking for an own `prop`. This distinguishes genuine own/inherited members\n * — including class accessors and template prototypes — from members injected\n * via Object.prototype pollution (e.g. `Object.prototype.username = '...'`),\n * which live on Object.prototype itself and are therefore never matched.\n *\n * @param {*} thing The value whose chain to inspect\n * @param {string|symbol} prop The property key to look for\n *\n * @returns {boolean} True when `prop` is owned below Object.prototype\n */\nconst hasOwnInPrototypeChain = (thing, prop) => {\n let obj = thing;\n const seen = [];\n\n while (obj != null) {\n if (seen.indexOf(obj) !== -1) {\n return false;\n }\n seen.push(obj);\n\n const prototype = getPrototypeOf(obj);\n\n if (isPrototypeBoundary(obj, prototype, obj === thing)) {\n return false;\n }\n\n if (hasOwnProperty(obj, prop)) {\n return true;\n }\n obj = prototype;\n }\n return false;\n};\n\n/**\n * Read `obj[prop]` only when it is safe from Object.prototype pollution. Own\n * properties and members inherited from a non-Object.prototype source (a class\n * instance or template object) are honored; a value reachable only through a\n * polluted Object.prototype is ignored and `undefined` is returned.\n *\n * @param {*} obj The source object\n * @param {string|symbol} prop The property key to read\n *\n * @returns {*} The resolved value, or undefined when unsafe/absent\n */\nconst getSafeProp = (obj, prop) =>\n obj != null && hasOwnInPrototypeChain(obj, prop) ? obj[prop] : undefined;\n\n/**\n * Flatten an object and its application-defined prototype chain into a\n * null-prototype object. Members inherited only from the source realm's\n * Object.prototype are deliberately excluded, while class/template members\n * below that boundary are preserved.\n *\n * @param {*} thing The value to flatten\n *\n * @returns {*} A null-prototype copy, or the original value when it is already\n * structurally safe or is not an object\n */\nconst toSafeFlatObject = (thing) => {\n if (thing == null || (typeof thing !== 'object' && typeof thing !== 'function')) {\n return thing;\n }\n\n const sourcePrototype = getPrototypeOf(thing);\n\n if (sourcePrototype === null && isSafeAndFullyMutable(thing)) {\n return thing;\n }\n\n const result = Object.create(null);\n const merged = Object.create(null);\n const seen = [];\n let current = thing;\n\n while (current != null) {\n if (seen.indexOf(current) !== -1) {\n break;\n }\n\n seen.push(current);\n\n const prototype = current === thing ? sourcePrototype : getPrototypeOf(current);\n\n if (isPrototypeBoundary(current, prototype, current === thing)) {\n break;\n }\n\n const props = Object.getOwnPropertyNames(current);\n\n if (Object.getOwnPropertySymbols) {\n props.push(...Object.getOwnPropertySymbols(current));\n }\n\n for (const prop of props) {\n if (isUnsafeObjectKey(prop)) {\n continue;\n }\n\n if (!hasOwnProperty(merged, prop)) {\n result[prop] = thing[prop];\n merged[prop] = true;\n }\n }\n\n current = prototype;\n }\n\n return result;\n};\n\nconst kindOf = ((cache) => (thing) => {\n const str = toString.call(thing);\n return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase());\n})(Object.create(null));\n\nconst kindOfTest = (type) => {\n type = type.toLowerCase();\n return (thing) => kindOf(thing) === type;\n};\n\nconst typeOfTest = (type) => (thing) => typeof thing === type;\n\n/**\n * Determine if a value is a non-null object\n *\n * @param {Object} val The value to test\n *\n * @returns {boolean} True if value is an Array, otherwise false\n */\nconst { isArray } = Array;\n\n/**\n * Determine if a value is undefined\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if the value is undefined, otherwise false\n */\nconst isUndefined = typeOfTest('undefined');\n\n/**\n * Determine if a value is a Buffer\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Buffer, otherwise false\n */\nfunction isBuffer(val) {\n return (\n val !== null &&\n !isUndefined(val) &&\n val.constructor !== null &&\n !isUndefined(val.constructor) &&\n isFunction(val.constructor.isBuffer) &&\n val.constructor.isBuffer(val)\n );\n}\n\n/**\n * Determine if a value is an ArrayBuffer\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is an ArrayBuffer, otherwise false\n */\nconst isArrayBuffer = kindOfTest('ArrayBuffer');\n\n/**\n * Determine if a value is a view on an ArrayBuffer\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false\n */\nfunction isArrayBufferView(val) {\n let result;\n if (typeof ArrayBuffer !== 'undefined' && ArrayBuffer.isView) {\n result = ArrayBuffer.isView(val);\n } else {\n result = val && val.buffer && isArrayBuffer(val.buffer);\n }\n return result;\n}\n\n/**\n * Determine if a value is a String\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a String, otherwise false\n */\nconst isString = typeOfTest('string');\n\n/**\n * Determine if a value is a Function\n *\n * @param {*} val The value to test\n * @returns {boolean} True if value is a Function, otherwise false\n */\nconst isFunction = typeOfTest('function');\n\n/**\n * Determine if a value is a Number\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Number, otherwise false\n */\nconst isNumber = typeOfTest('number');\n\n/**\n * Determine if a value is an Object\n *\n * @param {*} thing The value to test\n *\n * @returns {boolean} True if value is an Object, otherwise false\n */\nconst isObject = (thing) => thing !== null && typeof thing === 'object';\n\n/**\n * Determine if a value is a Boolean\n *\n * @param {*} thing The value to test\n * @returns {boolean} True if value is a Boolean, otherwise false\n */\nconst isBoolean = (thing) => thing === true || thing === false;\n\n/**\n * Determine if a value is a plain Object\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a plain Object, otherwise false\n */\nconst isPlainObject = (val) => {\n if (!isObject(val)) {\n return false;\n }\n\n const prototype = getPrototypeOf(val);\n return (\n (prototype === null || prototype === Object.prototype || getPrototypeOf(prototype) === null) &&\n // Treat own Symbol.toStringTag or Symbol.iterator members as evidence the\n // value is tagged/iterable, ignoring members reachable only through shared\n // or terminal prototype boundaries. This is exactly what\n // hasOwnInPrototypeChain(val, prop) computes here: every prototype admitted\n // above (null, Object.prototype, or a terminal null-prototype template) is\n // a boundary, so the walk never inspects anything but `val`'s own members,\n // and stops before even those when `val` is itself the boundary\n // Object.prototype. Checking that inline avoids allocating the walker's\n // `seen` list twice per call on the mergeConfig / merge hot path.\n (isPrototypeBoundary(val, prototype, true) ||\n (!hasOwnProperty(val, toStringTag) && !hasOwnProperty(val, iterator)))\n );\n};\n\n/**\n * Determine if a value is an empty object (safely handles Buffers)\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is an empty object, otherwise false\n */\nconst isEmptyObject = (val) => {\n // Early return for non-objects or Buffers to prevent RangeError\n if (!isObject(val) || isBuffer(val)) {\n return false;\n }\n\n try {\n return Object.keys(val).length === 0 && Object.getPrototypeOf(val) === Object.prototype;\n } catch (e) {\n // Fallback for any other objects that might cause RangeError with Object.keys()\n return false;\n }\n};\n\n/**\n * Determine if a value is a Date\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Date, otherwise false\n */\nconst isDate = kindOfTest('Date');\n\n/**\n * Determine if a value is a File\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a File, otherwise false\n */\nconst isFile = kindOfTest('File');\n\n/**\n * Determine if a value is a React Native Blob\n * React Native \"blob\": an object with a `uri` attribute. Optionally, it can\n * also have a `name` and `type` attribute to specify filename and content type\n *\n * @see https://github.com/facebook/react-native/blob/26684cf3adf4094eb6c405d345a75bf8c7c0bf88/Libraries/Network/FormData.js#L68-L71\n *\n * @param {*} value The value to test\n *\n * @returns {boolean} True if value is a React Native Blob, otherwise false\n */\nconst isReactNativeBlob = (value) => {\n return !!(value && typeof value.uri !== 'undefined');\n};\n\n/**\n * Determine if environment is React Native\n * ReactNative `FormData` has a non-standard `getParts()` method\n *\n * @param {*} formData The formData to test\n *\n * @returns {boolean} True if environment is React Native, otherwise false\n */\nconst isReactNative = (formData) => formData && typeof formData.getParts !== 'undefined';\n\n/**\n * Determine if a value is a Blob\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Blob, otherwise false\n */\nconst isBlob = kindOfTest('Blob');\n\n/**\n * Determine if a value is a FileList\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a FileList, otherwise false\n */\nconst isFileList = kindOfTest('FileList');\nconst isSet = kindOfTest('Set');\n\n/**\n * Determine if a value is a Stream\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Stream, otherwise false\n */\nconst isStream = (val) => isObject(val) && isFunction(val.pipe);\n\n/**\n * Determine if a value is a FormData\n *\n * @param {*} thing The value to test\n *\n * @returns {boolean} True if value is an FormData, otherwise false\n */\nfunction getGlobal() {\n if (typeof globalThis !== 'undefined') return globalThis;\n if (typeof self !== 'undefined') return self;\n if (typeof window !== 'undefined') return window;\n if (typeof global !== 'undefined') return global;\n return {};\n}\n\nconst G = getGlobal();\nconst FormDataCtor = typeof G.FormData !== 'undefined' ? G.FormData : undefined;\n\nconst isFormData = (thing) => {\n if (!thing) return false;\n if (FormDataCtor && thing instanceof FormDataCtor) return true;\n // Reject plain objects inheriting directly from Object.prototype so prototype-pollution gadgets can't spoof FormData.\n const proto = getPrototypeOf(thing);\n if (!proto || proto === Object.prototype) return false;\n if (!isFunction(thing.append)) return false;\n const kind = kindOf(thing);\n return (\n kind === 'formdata' ||\n // detect form-data instance\n (kind === 'object' && isFunction(thing.toString) && thing.toString() === '[object FormData]')\n );\n};\n\n/**\n * Determine if a value is a URLSearchParams object\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a URLSearchParams object, otherwise false\n */\nconst isURLSearchParams = kindOfTest('URLSearchParams');\n\nconst [isReadableStream, isRequest, isResponse, isHeaders] = [\n 'ReadableStream',\n 'Request',\n 'Response',\n 'Headers',\n].map(kindOfTest);\n\n/**\n * Trim excess whitespace off the beginning and end of a string\n *\n * @param {String} str The String to trim\n *\n * @returns {String} The String freed of excess whitespace\n */\nconst trim = (str) => {\n return str.trim ? str.trim() : str.replace(/^[\\s\\uFEFF\\xA0]+|[\\s\\uFEFF\\xA0]+$/g, '');\n};\n/**\n * Iterate over an Array or an Object invoking a function for each item.\n *\n * If `obj` is an Array callback will be called passing\n * the value, index, and complete array for each item.\n *\n * If 'obj' is an Object callback will be called passing\n * the value, key, and complete object for each property.\n *\n * @param {Object|Array} obj The object to iterate\n * @param {Function} fn The callback to invoke for each item\n *\n * @param {Object} [options]\n * @param {Boolean} [options.allOwnKeys = false]\n * @returns {any}\n */\nfunction forEach(obj, fn, { allOwnKeys = false } = {}) {\n // Don't bother if no value provided\n if (obj === null || typeof obj === 'undefined') {\n return;\n }\n\n let i;\n let l;\n\n // Force an array if not already something iterable\n if (typeof obj !== 'object') {\n /*eslint no-param-reassign:0*/\n obj = [obj];\n }\n\n if (isArray(obj)) {\n // Iterate over array values\n for (i = 0, l = obj.length; i < l; i++) {\n fn.call(null, obj[i], i, obj);\n }\n } else {\n // Buffer check\n if (isBuffer(obj)) {\n return;\n }\n\n // Iterate over object keys\n const keys = allOwnKeys ? Object.getOwnPropertyNames(obj) : Object.keys(obj);\n const len = keys.length;\n let key;\n\n for (i = 0; i < len; i++) {\n key = keys[i];\n fn.call(null, obj[key], key, obj);\n }\n }\n}\n\n/**\n * Finds a key in an object, case-insensitive, returning the actual key name.\n * Returns null if the object is a Buffer or if no match is found.\n *\n * @param {Object} obj - The object to search.\n * @param {string} key - The key to find (case-insensitive).\n * @returns {?string} The actual key name if found, otherwise null.\n */\nfunction findKey(obj, key) {\n if (isBuffer(obj)) {\n return null;\n }\n\n key = key.toLowerCase();\n const keys = Object.keys(obj);\n let i = keys.length;\n let _key;\n while (i-- > 0) {\n _key = keys[i];\n if (key === _key.toLowerCase()) {\n return _key;\n }\n }\n return null;\n}\n\nconst _global = (() => {\n /*eslint no-undef:0*/\n if (typeof globalThis !== 'undefined') return globalThis;\n return typeof self !== 'undefined' ? self : typeof window !== 'undefined' ? window : global;\n})();\n\nconst isContextDefined = (context) => !isUndefined(context) && context !== _global;\n\n/**\n * Accepts varargs expecting each argument to be an object, then\n * immutably merges the properties of each object and returns result.\n *\n * When multiple objects contain the same key the later object in\n * the arguments list will take precedence.\n *\n * Example:\n *\n * ```js\n * const result = merge({foo: 123}, {foo: 456});\n * console.log(result.foo); // outputs 456\n * ```\n *\n * @param {Object} obj1 Object to merge\n *\n * @returns {Object} Result of all merge properties\n */\nfunction merge(...objs) {\n const { caseless, skipUndefined } = (isContextDefined(this) && this) || {};\n const result = {};\n // Caseless lookup only applies to string keys — symbol keys are\n // identity-matched. Every string key that reaches `result` passes through\n // this index first, so it can never hold two case variants of one key and a\n // lowercase -> key map is exactly what findKey(result, key) would rescan\n // Object.keys(result) for on each assignment.\n const lowerCaseKeys = caseless ? Object.create(null) : null;\n const assignValue = (val, key) => {\n // Skip dangerous property names to prevent prototype pollution\n if (key === '__proto__' || key === 'constructor' || key === 'prototype') {\n return;\n }\n\n let targetKey = key;\n if (lowerCaseKeys && typeof key === 'string') {\n const lowerKey = key.toLowerCase();\n const knownKey = lowerCaseKeys[lowerKey];\n // A key recorded but absent from `result` was skipped by skipUndefined;\n // the later spelling wins then, as it does for findKey.\n if (knownKey !== undefined && hasOwnProperty(result, knownKey)) {\n targetKey = knownKey;\n } else {\n lowerCaseKeys[lowerKey] = key;\n }\n }\n // Read via own-prop only — a bare `result[targetKey]` walks the prototype\n // chain, so a polluted Object.prototype value could surface here and get\n // copied into the merged result.\n const existing = hasOwnProperty(result, targetKey) ? result[targetKey] : undefined;\n if (isPlainObject(existing) && isPlainObject(val)) {\n result[targetKey] = merge(existing, val);\n } else if (isPlainObject(val)) {\n result[targetKey] = merge({}, val);\n } else if (isArray(val)) {\n result[targetKey] = val.slice();\n } else if (!skipUndefined || !isUndefined(val)) {\n result[targetKey] = val;\n }\n };\n\n for (let i = 0, l = objs.length; i < l; i++) {\n const source = objs[i];\n if (!source || isBuffer(source)) {\n continue;\n }\n\n forEach(source, assignValue);\n\n if (typeof source !== 'object' || isArray(source) || !Object.getOwnPropertySymbols) {\n continue;\n }\n\n const symbols = Object.getOwnPropertySymbols(source);\n for (let j = 0; j < symbols.length; j++) {\n const symbol = symbols[j];\n if (propertyIsEnumerable.call(source, symbol)) {\n assignValue(source[symbol], symbol);\n }\n }\n }\n return result;\n}\n\n/**\n * Extends object a by mutably adding to it the properties of object b.\n *\n * @param {Object} a The object to be extended\n * @param {Object} b The object to copy properties from\n * @param {Object} thisArg The object to bind function to\n *\n * @param {Object} [options]\n * @param {Boolean} [options.allOwnKeys]\n * @returns {Object} The resulting value of object a\n */\nconst extend = (a, b, thisArg, { allOwnKeys } = {}) => {\n forEach(\n b,\n (val, key) => {\n if (thisArg && isFunction(val)) {\n Object.defineProperty(a, key, {\n // Null-proto descriptor so a polluted Object.prototype.get cannot\n // hijack defineProperty's accessor-vs-data resolution.\n __proto__: null,\n value: bind(val, thisArg),\n writable: true,\n enumerable: true,\n configurable: true,\n });\n } else {\n Object.defineProperty(a, key, {\n __proto__: null,\n value: val,\n writable: true,\n enumerable: true,\n configurable: true,\n });\n }\n },\n { allOwnKeys }\n );\n return a;\n};\n\n/**\n * Remove byte order marker. This catches EF BB BF (the UTF-8 BOM)\n *\n * @param {string} content with BOM\n *\n * @returns {string} content value without BOM\n */\nconst stripBOM = (content) => {\n if (content.charCodeAt(0) === 0xfeff) {\n content = content.slice(1);\n }\n return content;\n};\n\n/**\n * Inherit the prototype methods from one constructor into another\n * @param {function} constructor\n * @param {function} superConstructor\n * @param {object} [props]\n * @param {object} [descriptors]\n *\n * @returns {void}\n */\nconst inherits = (constructor, superConstructor, props, descriptors) => {\n constructor.prototype = Object.create(superConstructor.prototype, descriptors);\n Object.defineProperty(constructor.prototype, 'constructor', {\n __proto__: null,\n value: constructor,\n writable: true,\n enumerable: false,\n configurable: true,\n });\n Object.defineProperty(constructor, 'super', {\n __proto__: null,\n value: superConstructor.prototype,\n });\n props && Object.assign(constructor.prototype, props);\n};\n\n/**\n * Resolve object with deep prototype chain to a flat object\n * @param {Object} sourceObj source object\n * @param {Object} [destObj]\n * @param {Function|Boolean} [filter]\n * @param {Function} [propFilter]\n *\n * @returns {Object}\n */\nconst toFlatObject = (sourceObj, destObj, filter, propFilter) => {\n let props;\n let i;\n let prop;\n const merged = {};\n\n destObj = destObj || {};\n // eslint-disable-next-line no-eq-null,eqeqeq\n if (sourceObj == null) return destObj;\n\n do {\n props = Object.getOwnPropertyNames(sourceObj);\n i = props.length;\n while (i-- > 0) {\n prop = props[i];\n if ((!propFilter || propFilter(prop, sourceObj, destObj)) && !merged[prop]) {\n destObj[prop] = sourceObj[prop];\n merged[prop] = true;\n }\n }\n sourceObj = filter !== false && getPrototypeOf(sourceObj);\n } while (sourceObj && (!filter || filter(sourceObj, destObj)) && sourceObj !== Object.prototype);\n\n return destObj;\n};\n\n/**\n * Determines whether a string ends with the characters of a specified string\n *\n * @param {String} str\n * @param {String} searchString\n * @param {Number} [position= 0]\n *\n * @returns {boolean}\n */\nconst endsWith = (str, searchString, position) => {\n str = String(str);\n if (position === undefined || position > str.length) {\n position = str.length;\n }\n position -= searchString.length;\n const lastIndex = str.indexOf(searchString, position);\n return lastIndex !== -1 && lastIndex === position;\n};\n\n/**\n * Returns new array from array like object or null if failed\n *\n * @param {*} [thing]\n *\n * @returns {?Array}\n */\nconst toArray = (thing) => {\n if (!thing) return null;\n if (isArray(thing)) return thing;\n let i = thing.length;\n if (!Number.isSafeInteger(i) || i < 0 || i > 0xffffffff) return null;\n\n // Bound the copy by actual indexed properties, including hidden and inherited\n // members of array-like collections, rather than by the declared length alone.\n const indexes = new Set();\n const seen = new Set();\n let source = thing;\n\n while (source != null && indexes.size < i) {\n if (seen.has(source)) return null;\n seen.add(source);\n\n const prototype = getPrototypeOf(source);\n if (isPrototypeBoundary(source, prototype, source === thing)) break;\n\n Object.getOwnPropertyNames(source).forEach((key) => {\n const index = +key;\n if (\n Number.isInteger(index) &&\n index >= 0 &&\n index < i &&\n String(index) === key &&\n hasOwnProperty(source, key)\n ) {\n indexes.add(index);\n }\n });\n source = prototype;\n }\n\n if (indexes.size !== i) return null;\n const arr = new Array(i);\n while (i-- > 0) {\n arr[i] = thing[i];\n }\n return arr;\n};\n\n/**\n * Checking if the Uint8Array exists and if it does, it returns a function that checks if the\n * thing passed in is an instance of Uint8Array\n *\n * @param {TypedArray}\n *\n * @returns {Array}\n */\n// eslint-disable-next-line func-names\nconst isTypedArray = ((TypedArray) => {\n // eslint-disable-next-line func-names\n return (thing) => {\n return TypedArray && thing instanceof TypedArray;\n };\n})(typeof Uint8Array !== 'undefined' && getPrototypeOf(Uint8Array));\n\n/**\n * For each entry in the object, call the function with the key and value.\n *\n * @param {Object} obj - The object to iterate over.\n * @param {Function} fn - The function to call for each entry.\n *\n * @returns {void}\n */\nconst forEachEntry = (obj, fn) => {\n const generator = obj && obj[iterator];\n\n const _iterator = generator.call(obj);\n\n let result;\n\n while ((result = _iterator.next()) && !result.done) {\n const pair = result.value;\n fn.call(obj, pair[0], pair[1]);\n }\n};\n\n/**\n * It takes a regular expression and a string, and returns an array of all the matches\n *\n * @param {string} regExp - The regular expression to match against.\n * @param {string} str - The string to search.\n *\n * @returns {Array}\n */\nconst matchAll = (regExp, str) => {\n let matches;\n const arr = [];\n\n while ((matches = regExp.exec(str)) !== null) {\n arr.push(matches);\n }\n\n return arr;\n};\n\n/* Checking if the kindOfTest function returns true when passed an HTMLFormElement. */\nconst isHTMLForm = kindOfTest('HTMLFormElement');\n\nconst toCamelCase = (str) => {\n return str.toLowerCase().replace(/[-_\\s]([a-z\\d])(\\w*)/g, function replacer(m, p1, p2) {\n return p1.toUpperCase() + p2;\n });\n};\n\nconst { propertyIsEnumerable } = Object.prototype;\n\n/**\n * Determine if a value is a RegExp object\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a RegExp object, otherwise false\n */\nconst isRegExp = kindOfTest('RegExp');\n\nconst reduceDescriptors = (obj, reducer) => {\n const descriptors = Object.getOwnPropertyDescriptors(obj);\n const reducedDescriptors = {};\n\n forEach(descriptors, (descriptor, name) => {\n let ret;\n if ((ret = reducer(descriptor, name, obj)) !== false) {\n reducedDescriptors[name] = ret || descriptor;\n }\n });\n\n Object.defineProperties(obj, reducedDescriptors);\n};\n\n/**\n * Makes all methods read-only\n * @param {Object} obj\n */\n\nconst freezeMethods = (obj) => {\n reduceDescriptors(obj, (descriptor, name) => {\n // skip restricted props in strict mode\n if (isFunction(obj) && ['arguments', 'caller', 'callee'].includes(name)) {\n return false;\n }\n\n const value = obj[name];\n\n if (!isFunction(value)) return;\n\n descriptor.enumerable = false;\n\n if ('writable' in descriptor) {\n descriptor.writable = false;\n return;\n }\n\n if (!descriptor.set) {\n descriptor.set = () => {\n throw Error(\"Can not rewrite read-only method '\" + name + \"'\");\n };\n }\n });\n};\n\n/**\n * Converts an array or a delimited string into an object set with values as keys and true as values.\n * Useful for fast membership checks.\n *\n * @param {Array|string} arrayOrString - The array or string to convert.\n * @param {string} delimiter - The delimiter to use if input is a string.\n * @returns {Object} An object with keys from the array or string, values set to true.\n */\nconst toObjectSet = (arrayOrString, delimiter) => {\n const obj = {};\n\n const define = (arr) => {\n arr.forEach((value) => {\n obj[value] = true;\n });\n };\n\n isArray(arrayOrString) ? define(arrayOrString) : define(String(arrayOrString).split(delimiter));\n\n return obj;\n};\n\nconst noop = () => {};\n\nconst toFiniteNumber = (value, defaultValue) => {\n return value != null && Number.isFinite((value = +value)) ? value : defaultValue;\n};\n\n/**\n * If the thing is a FormData object, return true, otherwise return false.\n *\n * @param {unknown} thing - The thing to check.\n *\n * @returns {boolean}\n */\nfunction isSpecCompliantForm(thing) {\n return !!(\n thing &&\n isFunction(thing.append) &&\n thing[toStringTag] === 'FormData' &&\n thing[iterator]\n );\n}\n\n/**\n * Recursively converts an object to a JSON-compatible object, handling circular references and Buffers.\n *\n * @param {Object} obj - The object to convert.\n * @returns {Object} The JSON-compatible object.\n */\nconst toJSONObject = (obj) => {\n const visited = new WeakSet();\n\n const visit = (source) => {\n if (isObject(source)) {\n if (visited.has(source)) {\n return;\n }\n\n //Buffer check\n if (isBuffer(source)) {\n return source;\n }\n\n if (!('toJSON' in source)) {\n // add-on descent / delete-on-ascent: preserves path semantics, so DAG nodes serialise at every occurrence (see #7230).\n visited.add(source);\n\n let target;\n\n if (isSet(source)) {\n target = [];\n for (const value of source) {\n const reducedValue = visit(value);\n !isUndefined(reducedValue) && target.push(reducedValue);\n }\n } else {\n target = isArray(source) ? [] : {};\n\n forEach(source, (value, key) => {\n const reducedValue = visit(value);\n !isUndefined(reducedValue) && (target[key] = reducedValue);\n });\n }\n\n visited.delete(source);\n\n return target;\n }\n }\n\n return source;\n };\n\n return visit(obj);\n};\n\n/**\n * Determines if a value is an async function.\n *\n * @param {*} thing - The value to test.\n * @returns {boolean} True if value is an async function, otherwise false.\n */\nconst isAsyncFn = kindOfTest('AsyncFunction');\n\n/**\n * Determines if a value is thenable (has then and catch methods).\n *\n * @param {*} thing - The value to test.\n * @returns {boolean} True if value is thenable, otherwise false.\n */\nconst isThenable = (thing) =>\n thing &&\n (isObject(thing) || isFunction(thing)) &&\n isFunction(thing.then) &&\n isFunction(thing.catch);\n\n// original code\n// https://github.com/DigitalBrainJS/AxiosPromise/blob/16deab13710ec09779922131f3fa5954320f83ab/lib/utils.js#L11-L34\n\n/**\n * Provides a cross-platform setImmediate implementation.\n * Uses native setImmediate if available, otherwise falls back to postMessage or setTimeout.\n *\n * @param {boolean} setImmediateSupported - Whether setImmediate is supported.\n * @param {boolean} postMessageSupported - Whether postMessage is supported.\n * @returns {Function} A function to schedule a callback asynchronously.\n */\nconst _setImmediate = ((setImmediateSupported, postMessageSupported) => {\n if (setImmediateSupported) {\n return setImmediate;\n }\n\n return postMessageSupported\n ? ((token, callbacks) => {\n _global.addEventListener(\n 'message',\n ({ source, data }) => {\n if (source === _global && data === token) {\n callbacks.length && callbacks.shift()();\n }\n },\n false\n );\n\n return (cb) => {\n callbacks.push(cb);\n _global.postMessage(token, '*');\n };\n })(`axios@${Math.random()}`, [])\n : (cb) => setTimeout(cb);\n})(typeof setImmediate === 'function', isFunction(_global.postMessage));\n\n/**\n * Schedules a microtask or asynchronous callback as soon as possible.\n * Uses queueMicrotask if available, otherwise falls back to process.nextTick or _setImmediate.\n *\n * @type {Function}\n */\nconst asap =\n typeof queueMicrotask !== 'undefined'\n ? queueMicrotask.bind(_global)\n : (typeof process !== 'undefined' && process.nextTick) || _setImmediate;\n\n// *********************\n\nconst isIterable = (thing) => thing != null && isFunction(thing[iterator]);\n\n/**\n * Determine if a value is iterable via an iterator that is NOT sourced solely\n * from a polluted Object.prototype. Use this instead of `isIterable` whenever\n * the iterable comes from untrusted input (e.g. user-supplied header sources),\n * so `Object.prototype[Symbol.iterator] = ...` cannot turn an ordinary object\n * into an attacker-controlled entries iterator.\n *\n * @param {*} thing The value to test\n *\n * @returns {boolean} True if value has a non-polluted iterator\n */\nconst isSafeIterable = (thing) =>\n thing != null && hasOwnInPrototypeChain(thing, iterator) && isIterable(thing);\n\nexport default {\n isArray,\n isArrayBuffer,\n isBuffer,\n isFormData,\n isArrayBufferView,\n isString,\n isNumber,\n isBoolean,\n isObject,\n isPlainObject,\n isEmptyObject,\n isReadableStream,\n isRequest,\n isResponse,\n isHeaders,\n isUndefined,\n isDate,\n isFile,\n isReactNativeBlob,\n isReactNative,\n isBlob,\n isRegExp,\n isFunction,\n isStream,\n isURLSearchParams,\n isTypedArray,\n isFileList,\n forEach,\n merge,\n extend,\n trim,\n stripBOM,\n inherits,\n toFlatObject,\n kindOf,\n kindOfTest,\n endsWith,\n toArray,\n forEachEntry,\n matchAll,\n isHTMLForm,\n hasOwnProperty,\n hasOwnProp: hasOwnProperty, // an alias to avoid ESLint no-prototype-builtins detection\n hasOwnInPrototypeChain,\n getSafeProp,\n toSafeFlatObject,\n reduceDescriptors,\n freezeMethods,\n toObjectSet,\n toCamelCase,\n noop,\n toFiniteNumber,\n findKey,\n global: _global,\n isContextDefined,\n isSpecCompliantForm,\n toJSONObject,\n isAsyncFn,\n isThenable,\n setImmediate: _setImmediate,\n asap,\n isIterable,\n isSafeIterable,\n};\n","'use strict';\n\nimport utils from '../utils.js';\n\n// RawAxiosHeaders whose duplicates are ignored by node\n// c.f. https://nodejs.org/api/http.html#http_message_headers\nconst ignoreDuplicateOf = utils.toObjectSet([\n 'age',\n 'authorization',\n 'content-length',\n 'content-type',\n 'etag',\n 'expires',\n 'from',\n 'host',\n 'if-modified-since',\n 'if-unmodified-since',\n 'last-modified',\n 'location',\n 'max-forwards',\n 'proxy-authorization',\n 'referer',\n 'retry-after',\n 'user-agent',\n]);\n\n/**\n * Parse headers into an object\n *\n * ```\n * Date: Wed, 27 Aug 2014 08:58:49 GMT\n * Content-Type: application/json\n * Connection: keep-alive\n * Transfer-Encoding: chunked\n * ```\n *\n * @param {String} rawHeaders Headers needing to be parsed\n *\n * @returns {Object} Headers parsed into an object\n */\nexport default (rawHeaders) => {\n // Header names are data, including __proto__; avoid inherited setters.\n const parsed = Object.create(null);\n let key;\n let val;\n let i;\n\n rawHeaders &&\n rawHeaders.split('\\n').forEach(function parser(line) {\n i = line.indexOf(':');\n key = line.substring(0, i).trim().toLowerCase();\n val = line.substring(i + 1).trim();\n\n const hasKey = utils.hasOwnProp(parsed, key);\n\n if (!key || (hasKey && utils.hasOwnProp(ignoreDuplicateOf, key))) {\n return;\n }\n\n if (key === 'set-cookie') {\n if (hasKey) {\n parsed[key].push(val);\n } else {\n parsed[key] = [val];\n }\n } else {\n parsed[key] = hasKey ? parsed[key] + ', ' + val : val;\n }\n });\n\n return parsed;\n};\n","'use strict';\n\nimport utils from '../utils.js';\n\nfunction trimSPorHTAB(str) {\n let start = 0;\n let end = str.length;\n\n while (start < end) {\n const code = str.charCodeAt(start);\n\n if (code !== 0x09 && code !== 0x20) {\n break;\n }\n\n start += 1;\n }\n\n while (end > start) {\n const code = str.charCodeAt(end - 1);\n\n if (code !== 0x09 && code !== 0x20) {\n break;\n }\n\n end -= 1;\n }\n\n return start === 0 && end === str.length ? str : str.slice(start, end);\n}\n\n// The control-code ranges are intentional: header sanitization strips C0/DEL bytes.\n// eslint-disable-next-line no-control-regex\nconst INVALID_UNICODE_HEADER_VALUE_CHARS = new RegExp('[\\\\u0000-\\\\u0008\\\\u000a-\\\\u001f\\\\u007f]+', 'g');\n// eslint-disable-next-line no-control-regex\nconst INVALID_BYTE_STRING_HEADER_VALUE_CHARS = new RegExp('[^\\\\u0009\\\\u0020-\\\\u007e\\\\u0080-\\\\u00ff]+', 'g');\n\nfunction sanitizeValue(value, invalidChars) {\n if (utils.isArray(value)) {\n return value.map((item) => sanitizeValue(item, invalidChars));\n }\n\n return trimSPorHTAB(String(value).replace(invalidChars, ''));\n}\n\nexport const sanitizeHeaderValue = (value) =>\n sanitizeValue(value, INVALID_UNICODE_HEADER_VALUE_CHARS);\n\nexport const sanitizeByteStringHeaderValue = (value) =>\n sanitizeValue(value, INVALID_BYTE_STRING_HEADER_VALUE_CHARS);\n\nexport function toByteStringHeaderObject(headers) {\n const byteStringHeaders = Object.create(null);\n\n utils.forEach(headers.toJSON(), (value, header) => {\n byteStringHeaders[header] = sanitizeByteStringHeaderValue(value);\n });\n\n return byteStringHeaders;\n}\n","'use strict';\n\nimport utils from '../utils.js';\nimport parseHeaders from '../helpers/parseHeaders.js';\nimport { sanitizeHeaderValue } from '../helpers/sanitizeHeaderValue.js';\n\nconst $internals = Symbol('internals');\n\nfunction normalizeHeader(header) {\n return header && String(header).trim().toLowerCase();\n}\n\nfunction normalizeValue(value) {\n if (value === false || value == null) {\n return value;\n }\n\n return utils.isArray(value) ? value.map(normalizeValue) : sanitizeHeaderValue(String(value));\n}\n\nfunction parseTokens(str) {\n const tokens = Object.create(null);\n const tokensRE = /([^\\s,;=]+)\\s*(?:=\\s*([^,;]+))?/g;\n let match;\n\n while ((match = tokensRE.exec(str))) {\n tokens[match[1]] = match[2];\n }\n\n return tokens;\n}\n\nconst parameterNameRE = /^[!#$%&'*+\\-.^_`|~0-9A-Za-z]+$/;\n\nfunction trimOWS(value) {\n let start = 0;\n let end = value.length;\n\n while (start < end) {\n const code = value.charCodeAt(start);\n\n if (code !== 0x09 && code !== 0x20) {\n break;\n }\n\n start += 1;\n }\n\n while (end > start) {\n const code = value.charCodeAt(end - 1);\n\n if (code !== 0x09 && code !== 0x20) {\n break;\n }\n\n end -= 1;\n }\n\n return start === 0 && end === value.length ? value : value.slice(start, end);\n}\n\nfunction decodeQuotedString(value) {\n const last = value.length - 1;\n\n if (last < 1 || value.charCodeAt(0) !== 0x22 || value.charCodeAt(last) !== 0x22) {\n return value;\n }\n\n let decoded = '';\n\n for (let i = 1; i < last; i++) {\n const code = value.charCodeAt(i);\n\n if (code === 0x22) {\n return value;\n }\n\n if (code === 0x5c) {\n i += 1;\n\n if (i >= last) {\n return value;\n }\n }\n\n decoded += value[i];\n }\n\n return decoded;\n}\n\nfunction parseParameters(value) {\n const parameters = Object.create(null);\n const str = String(value);\n let start = 0;\n let quoted = false;\n let escaped = false;\n\n function parseParameter(end) {\n const part = trimOWS(str.slice(start, end));\n const equals = part.indexOf('=');\n\n if (equals < 1) {\n return;\n }\n\n const name = trimOWS(part.slice(0, equals));\n\n if (!parameterNameRE.test(name)) {\n return;\n }\n\n const normalizedName = name.toLowerCase();\n\n if (\n normalizedName === '__proto__' ||\n normalizedName === 'constructor' ||\n normalizedName === 'prototype'\n ) {\n return;\n }\n\n const parameterValue = trimOWS(part.slice(equals + 1));\n parameters[normalizedName] = decodeQuotedString(parameterValue);\n }\n\n for (let i = 0; i < str.length; i++) {\n const code = str.charCodeAt(i);\n\n if (quoted) {\n if (escaped) {\n escaped = false;\n } else if (code === 0x5c) {\n escaped = true;\n } else if (code === 0x22) {\n quoted = false;\n }\n } else if (code === 0x22) {\n quoted = true;\n } else if (code === 0x2c || code === 0x3b) {\n parseParameter(i);\n start = i + 1;\n }\n }\n\n parseParameter(str.length);\n\n return parameters;\n}\n\nconst isValidHeaderName = (str) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim());\n\n// `__proto__` is a valid field name, and the one name the uppercase mapping at\n// the bottom of this file cannot reach: it is inherited from Object.prototype\n// instead of being declared on AxiosHeaders.prototype, so `self.__proto__ = v`\n// runs the inherited setter. That silently discards the header, and an array\n// value replaces the instance prototype, taking every method with it.\n// Store it under the same kind of case variant that mapping uses for `set` and\n// `constructor`. Header lookup is caseless, so it reads back under either\n// spelling, and no own `__proto__` slot is ever created for a later\n// `Object.assign` to copy onto a plain object through the same setter.\nconst PROTO_HEADER_SLOT = '__Proto__';\n\nconst headerSlot = (name) => (name === '__proto__' ? PROTO_HEADER_SLOT : name);\n\nfunction matchHeaderValue(context, value, header, filter, isHeaderNameFilter) {\n if (utils.isFunction(filter)) {\n return filter.call(context, value, header);\n }\n\n if (isHeaderNameFilter) {\n value = header;\n }\n\n if (!utils.isString(value)) return;\n\n if (utils.isString(filter)) {\n return value.indexOf(filter) !== -1;\n }\n\n if (utils.isRegExp(filter)) {\n return filter.test(value);\n }\n}\n\nfunction formatHeader(header) {\n return header\n .trim()\n .toLowerCase()\n .replace(/([a-z\\d])(\\w*)/g, (w, char, str) => {\n return char.toUpperCase() + str;\n });\n}\n\nfunction buildAccessors(obj, header) {\n const accessorName = utils.toCamelCase(' ' + header);\n\n ['get', 'set', 'has'].forEach((methodName) => {\n Object.defineProperty(obj, methodName + accessorName, {\n // Null-proto descriptor so a polluted Object.prototype.get cannot turn\n // this data descriptor into an accessor descriptor on the way in.\n __proto__: null,\n value: function (arg1, arg2, arg3) {\n return this[methodName].call(this, header, arg1, arg2, arg3);\n },\n configurable: true,\n });\n });\n}\n\nclass AxiosHeaders {\n constructor(headers) {\n headers && this.set(headers);\n }\n\n set(header, valueOrRewrite, rewrite) {\n const self = this;\n\n function setHeader(_value, _header, _rewrite) {\n const lHeader = normalizeHeader(_header);\n\n if (!lHeader) {\n return;\n }\n\n const key = utils.findKey(self, lHeader);\n\n if (\n !key ||\n self[key] === undefined ||\n _rewrite === true ||\n (_rewrite === undefined && self[key] !== false)\n ) {\n self[headerSlot(key || _header)] = normalizeValue(_value);\n }\n }\n\n const setHeaders = (headers, _rewrite) =>\n utils.forEach(headers, (_value, _header) => setHeader(_value, _header, _rewrite));\n\n if (utils.isPlainObject(header) || header instanceof this.constructor) {\n setHeaders(header, valueOrRewrite);\n } else if (utils.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {\n setHeaders(parseHeaders(header), valueOrRewrite);\n } else if (utils.isObject(header) && utils.isSafeIterable(header)) {\n let obj = Object.create(null),\n dest,\n key;\n for (const entry of header) {\n if (!utils.isArray(entry)) {\n throw new TypeError('Object iterator must return a key-value pair');\n }\n\n key = entry[0];\n\n if (utils.hasOwnProp(obj, key)) {\n dest = obj[key];\n obj[key] = utils.isArray(dest) ? [...dest, entry[1]] : [dest, entry[1]];\n } else {\n obj[key] = entry[1];\n }\n }\n\n setHeaders(obj, valueOrRewrite);\n } else {\n header != null && setHeader(valueOrRewrite, header, rewrite);\n }\n\n return this;\n }\n\n get(header, parser) {\n header = normalizeHeader(header);\n\n if (header) {\n const key = utils.findKey(this, header);\n\n if (key) {\n const value = this[key];\n\n if (!parser) {\n return value;\n }\n\n if (parser === true) {\n return parseTokens(value);\n }\n\n if (utils.isFunction(parser)) {\n return parser.call(this, value, key);\n }\n\n if (utils.isRegExp(parser)) {\n return parser.exec(value);\n }\n\n throw new TypeError('parser must be boolean|regexp|function');\n }\n }\n }\n\n has(header, matcher) {\n header = normalizeHeader(header);\n\n if (header) {\n const key = utils.findKey(this, header);\n\n return !!(\n key &&\n this[key] !== undefined &&\n (!matcher || matchHeaderValue(this, this[key], key, matcher))\n );\n }\n\n return false;\n }\n\n delete(header, matcher) {\n const self = this;\n let deleted = false;\n\n function deleteHeader(_header) {\n _header = normalizeHeader(_header);\n\n if (_header) {\n const key = utils.findKey(self, _header);\n\n if (key && (!matcher || matchHeaderValue(self, self[key], key, matcher))) {\n delete self[key];\n\n deleted = true;\n }\n }\n }\n\n if (utils.isArray(header)) {\n header.forEach(deleteHeader);\n } else {\n deleteHeader(header);\n }\n\n return deleted;\n }\n\n clear(matcher) {\n const keys = Object.keys(this);\n let i = keys.length;\n let deleted = false;\n\n while (i--) {\n const key = keys[i];\n if (!matcher || matchHeaderValue(this, this[key], key, matcher, true)) {\n delete this[key];\n deleted = true;\n }\n }\n\n return deleted;\n }\n\n normalize(format) {\n const self = this;\n const headers = Object.create(null);\n\n utils.forEach(this, (value, header) => {\n const key = utils.findKey(headers, header);\n\n if (key) {\n self[key] = normalizeValue(value);\n delete self[header];\n return;\n }\n\n const normalized = headerSlot(format ? formatHeader(header) : String(header).trim());\n\n if (normalized !== header) {\n delete self[header];\n }\n\n self[normalized] = normalizeValue(value);\n\n headers[normalized] = true;\n });\n\n return this;\n }\n\n concat(...targets) {\n return this.constructor.concat(this, ...targets);\n }\n\n toJSON(asStrings) {\n const obj = Object.create(null);\n\n utils.forEach(this, (value, header) => {\n value != null &&\n value !== false &&\n (obj[header] = asStrings && utils.isArray(value) ? value.join(', ') : value);\n });\n\n return obj;\n }\n\n [Symbol.iterator]() {\n return Object.entries(this.toJSON())[Symbol.iterator]();\n }\n\n toString() {\n return Object.entries(this.toJSON())\n .map(([header, value]) => header + ': ' + value)\n .join('\\n');\n }\n\n getSetCookie() {\n const value = this.get('set-cookie');\n return utils.isArray(value) ? value : value == null || value === false ? [] : [value];\n }\n\n get [Symbol.toStringTag]() {\n return 'AxiosHeaders';\n }\n\n static from(thing) {\n return thing instanceof this ? thing : new this(thing);\n }\n\n static parseParameters(value) {\n return parseParameters(value);\n }\n\n static concat(first, ...targets) {\n const computed = new this(first);\n\n targets.forEach((target) => computed.set(target));\n\n return computed;\n }\n\n static accessor(header) {\n const internals =\n (this[$internals] =\n this[$internals] =\n {\n accessors: {},\n });\n\n const accessors = internals.accessors;\n const prototype = this.prototype;\n\n function defineAccessor(_header) {\n const lHeader = normalizeHeader(_header);\n\n if (!accessors[lHeader]) {\n buildAccessors(prototype, _header);\n accessors[lHeader] = true;\n }\n }\n\n utils.isArray(header) ? header.forEach(defineAccessor) : defineAccessor(header);\n\n return this;\n }\n}\n\nAxiosHeaders.accessor([\n 'Content-Type',\n 'Content-Length',\n 'Accept',\n 'Accept-Encoding',\n 'User-Agent',\n 'Authorization',\n]);\n\n// reserved names hotfix\nutils.reduceDescriptors(AxiosHeaders.prototype, ({ value }, key) => {\n let mapped = key[0].toUpperCase() + key.slice(1); // map `set` => `Set`\n return {\n get: () => value,\n set(headerValue) {\n this[mapped] = headerValue;\n },\n };\n});\n\nutils.freezeMethods(AxiosHeaders);\n\nexport default AxiosHeaders;\n","'use strict';\n\nimport utils from '../utils.js';\nimport AxiosHeaders from './AxiosHeaders.js';\n\nexport const REDACTED = '[REDACTED ****]';\n\nfunction hasOwnOrPrototypeToJSON(source) {\n if (utils.hasOwnProp(source, 'toJSON')) {\n return true;\n }\n\n let prototype = Object.getPrototypeOf(source);\n\n while (prototype && prototype !== Object.prototype) {\n if (utils.hasOwnProp(prototype, 'toJSON')) {\n return true;\n }\n\n prototype = Object.getPrototypeOf(prototype);\n }\n\n return false;\n}\n\n// Build a plain-object snapshot of `config` and replace the value of any key\n// (case-insensitive) listed in `redactKeys` with REDACTED. Walks through arrays\n// and AxiosHeaders, and short-circuits on circular references.\nfunction redactConfig(config, redactKeys) {\n const lowerKeys = new Set(redactKeys.map((k) => String(k).toLowerCase()));\n const seen = [];\n\n const visit = (source) => {\n if (source === null || typeof source !== 'object') return source;\n if (utils.isBuffer(source)) return source;\n if (seen.indexOf(source) !== -1) return undefined;\n\n if (source instanceof AxiosHeaders) {\n source = source.toJSON();\n }\n\n seen.push(source);\n\n let result;\n if (utils.isArray(source)) {\n result = [];\n source.forEach((v, i) => {\n const reducedValue = visit(v);\n if (!utils.isUndefined(reducedValue)) {\n result[i] = reducedValue;\n }\n });\n } else {\n if (!utils.isPlainObject(source) && hasOwnOrPrototypeToJSON(source)) {\n seen.pop();\n return source;\n }\n\n result = Object.create(null);\n for (const [key, value] of Object.entries(source)) {\n const reducedValue = lowerKeys.has(key.toLowerCase()) ? REDACTED : visit(value);\n if (!utils.isUndefined(reducedValue)) {\n result[key] = reducedValue;\n }\n }\n }\n\n seen.pop();\n return result;\n };\n\n return visit(config);\n}\n\nfunction stringifySafely(value) {\n try {\n return String(value);\n } catch (err) {\n return '';\n }\n}\n\nfunction aggregateErrorMessage(error) {\n const message = error.errors\n .map((entry) => {\n try {\n return entry && entry.message ? stringifySafely(entry.message) : stringifySafely(entry);\n } catch (err) {\n return '';\n }\n })\n .filter(Boolean)\n .join('; ');\n\n return message || error.name || 'AggregateError';\n}\n\n// Shared with `Axios.prototype.request`, which splices the reconstructed\n// caller frames in ahead of this marker.\nexport const CAUSED_BY_SEPARATOR = '\\nCaused by: ';\nconst $causeStack = Symbol('causeStack');\n\n// Match the section we appended, not marker-like text in an error message or\n// a replacement stack supplied by the caller. Do not re-read the cause's stack.\nexport function getCauseStackIndex(error, stack) {\n const causeStack = utils.hasOwnProp(error, $causeStack) && error[$causeStack];\n\n return causeStack && stack.endsWith(causeStack) ? stack.length - causeStack.length : -1;\n}\n\n/**\n * Append the stack of a wrapped error to `target.stack`.\n *\n * `cause` already exposes the original error for tooling that walks the standard\n * cause chain, but many error reporters read `stack` and nothing else. Inlining\n * the wrapped stack there means those reporters surface the underlying failure\n * instead of the axios frames that normalized it (see #6670).\n *\n * Every read is defensive: a custom `Error.prepareStackTrace` hook, a runtime\n * without stack support, or a replaced `stack` property can leave the value\n * missing, non-string, or read-only, and normalizing an error must not throw\n * because of that.\n *\n * @param {Error} target The AxiosError being built.\n * @param {Error} source The error being wrapped.\n *\n * @returns {void}\n */\nfunction appendCauseStack(target, source) {\n try {\n const sourceStack = source && source.stack;\n\n if (typeof sourceStack !== 'string' || !sourceStack) {\n return;\n }\n\n const targetStack = target.stack;\n\n if (typeof targetStack !== 'string' || !targetStack) {\n return;\n }\n\n // Each call to `from()` creates a fresh target. Re-wrapping includes the\n // previous stack verbatim, adding one cause section per wrap.\n const causeStack = CAUSED_BY_SEPARATOR + sourceStack;\n target.stack = targetStack + causeStack;\n Object.defineProperty(target, $causeStack, { __proto__: null, value: causeStack });\n } catch (e) {\n // Ignore failures from custom stack hooks or un-writable stack properties.\n }\n}\n\nclass AxiosError extends Error {\n static from(error, code, config, request, response, customProps) {\n // `AggregateError` (thrown by Node on dual-stack/Happy-Eyeballs connection\n // failures) has an empty `message`; its detail lives in `errors[]`. Without\n // this, the wrapped error surfaces with a blank message (see #6721).\n let message = error.message;\n if (!message && utils.isArray(error.errors) && error.errors.length) {\n message = aggregateErrorMessage(error);\n }\n\n const axiosError = new AxiosError(message, code || error.code, config, request, response);\n // Match native `Error` `cause` semantics: non-enumerable. The wrapped\n // error often carries circular internals (sockets, requests, agents), so\n // an enumerable `cause` makes structured loggers (pino/winston) and any\n // own-property walk throw \"Converting circular structure to JSON\".\n // Regression from #6982; see #7205. `__proto__: null` mirrors the\n // `message` descriptor below (prototype-pollution-safe descriptor).\n Object.defineProperty(axiosError, 'cause', {\n __proto__: null,\n value: error,\n writable: true,\n enumerable: false,\n configurable: true,\n });\n axiosError.name = error.name;\n\n // Inline the wrapped stack for reporters that read only `stack`; the `cause`\n // property above already covers cause-aware tooling.\n appendCauseStack(axiosError, error);\n\n // Preserve status from the original error if not already set from response\n if (error.status != null && axiosError.status == null) {\n axiosError.status = error.status;\n }\n\n customProps && Object.assign(axiosError, customProps);\n return axiosError;\n }\n\n /**\n * Create an Error with the specified message, config, error code, request and response.\n *\n * @param {string} message The error message.\n * @param {string} [code] The error code (for example, 'ECONNABORTED').\n * @param {Object} [config] The config.\n * @param {Object} [request] The request.\n * @param {Object} [response] The response.\n *\n * @returns {Error} The created error.\n */\n constructor(message, code, config, request, response) {\n super(message);\n\n // Make message enumerable to maintain backward compatibility\n // The native Error constructor sets message as non-enumerable,\n // but axios < v1.13.3 had it as enumerable\n Object.defineProperty(this, 'message', {\n // Null-proto descriptor so a polluted Object.prototype.get cannot turn\n // this data descriptor into an accessor descriptor on the way in.\n __proto__: null,\n value: message,\n enumerable: true,\n writable: true,\n configurable: true,\n });\n\n this.name = 'AxiosError';\n this.isAxiosError = true;\n code && (this.code = code);\n config && (this.config = config);\n request && (this.request = request);\n if (response) {\n this.response = response;\n this.status = response.status;\n }\n }\n\n toJSON() {\n // Opt-in redaction: when the request config carries a `redact` array, the\n // value of any matching key (case-insensitive, at any depth) is replaced\n // with REDACTED in the serialized snapshot. Undefined or empty leaves the\n // existing serialization behavior unchanged.\n const config = this.config;\n const redactKeys = config && utils.hasOwnProp(config, 'redact') ? config.redact : undefined;\n const serializedConfig =\n utils.isArray(redactKeys) && redactKeys.length > 0\n ? redactConfig(config, redactKeys)\n : utils.toJSONObject(config);\n\n return {\n // Standard\n message: this.message,\n name: this.name,\n // Microsoft\n description: this.description,\n number: this.number,\n // Mozilla\n fileName: this.fileName,\n lineNumber: this.lineNumber,\n columnNumber: this.columnNumber,\n stack: this.stack,\n // Axios\n config: serializedConfig,\n code: this.code,\n status: this.status,\n };\n }\n}\n\n// This can be changed to static properties as soon as the parser options in .eslint.cjs are updated.\nAxiosError.ERR_BAD_OPTION_VALUE = 'ERR_BAD_OPTION_VALUE';\nAxiosError.ERR_BAD_OPTION = 'ERR_BAD_OPTION';\nAxiosError.ECONNABORTED = 'ECONNABORTED';\nAxiosError.ETIMEDOUT = 'ETIMEDOUT';\nAxiosError.ECONNREFUSED = 'ECONNREFUSED';\nAxiosError.ERR_NETWORK = 'ERR_NETWORK';\nAxiosError.ERR_FR_TOO_MANY_REDIRECTS = 'ERR_FR_TOO_MANY_REDIRECTS';\nAxiosError.ERR_DEPRECATED = 'ERR_DEPRECATED';\nAxiosError.ERR_BAD_RESPONSE = 'ERR_BAD_RESPONSE';\nAxiosError.ERR_BAD_REQUEST = 'ERR_BAD_REQUEST';\nAxiosError.ERR_CANCELED = 'ERR_CANCELED';\nAxiosError.ERR_NOT_SUPPORT = 'ERR_NOT_SUPPORT';\nAxiosError.ERR_INVALID_URL = 'ERR_INVALID_URL';\nAxiosError.ERR_FORM_DATA_DEPTH_EXCEEDED = 'ERR_FORM_DATA_DEPTH_EXCEEDED';\n\nexport default AxiosError;\n","'use strict';\n\nimport utils from '../utils.js';\nimport AxiosError from '../core/AxiosError.js';\n// temporary hotfix to avoid circular references until AxiosURLSearchParams is refactored\nimport PlatformFormData from '../platform/node/classes/FormData.js';\nimport PlatformBuffer from '../platform/node/classes/Buffer.js';\n\n// Default nesting limit shared with the inverse transform (formDataToJSON) so\n// the FormData <-> JSON round-trip stays symmetric.\nexport const DEFAULT_FORM_DATA_MAX_DEPTH = 100;\n\n/**\n * Determines if the given thing is a array or js object.\n *\n * @param {string} thing - The object or array to be visited.\n *\n * @returns {boolean}\n */\nfunction isVisitable(thing) {\n return utils.isPlainObject(thing) || utils.isArray(thing);\n}\n\n/**\n * It removes the brackets from the end of a string\n *\n * @param {string} key - The key of the parameter.\n *\n * @returns {string} the key without the brackets.\n */\nfunction removeBrackets(key) {\n return utils.endsWith(key, '[]') ? key.slice(0, -2) : key;\n}\n\n/**\n * It takes a path, a key, and a boolean, and returns a string\n *\n * @param {string} path - The path to the current key.\n * @param {string} key - The key of the current object being iterated over.\n * @param {string} dots - If true, the key will be rendered with dots instead of brackets.\n *\n * @returns {string} The path to the current key.\n */\nfunction renderKey(path, key, dots) {\n if (!path) return key;\n return path\n .concat(key)\n .map(function each(token, i) {\n // eslint-disable-next-line no-param-reassign\n token = removeBrackets(token);\n return !dots && i ? '[' + token + ']' : token;\n })\n .join(dots ? '.' : '');\n}\n\n/**\n * If the array is an array and none of its elements are visitable, then it's a flat array.\n *\n * @param {Array} arr - The array to check\n *\n * @returns {boolean}\n */\nfunction isFlatArray(arr) {\n return utils.isArray(arr) && !arr.some(isVisitable);\n}\n\nconst predicates = utils.toFlatObject(utils, {}, null, function filter(prop) {\n return /^is[A-Z]/.test(prop);\n});\n\n/**\n * Convert a data object to FormData\n *\n * @param {Object} obj\n * @param {?Object} [formData]\n * @param {?Object} [options]\n * @param {Function} [options.visitor]\n * @param {Boolean} [options.metaTokens = true]\n * @param {Boolean} [options.dots = false]\n * @param {?Boolean} [options.indexes = false]\n *\n * @returns {Object}\n **/\n\n/**\n * It converts an object into a FormData object\n *\n * @param {Object} obj - The object to convert to form data.\n * @param {string} formData - The FormData object to append to.\n * @param {Object} options\n *\n * @returns\n */\nfunction toFormData(obj, formData, options) {\n if (!utils.isObject(obj)) {\n throw new TypeError('target must be an object');\n }\n\n // eslint-disable-next-line no-param-reassign\n formData = formData || new (PlatformFormData || FormData)();\n\n const option = (name, fallback) => {\n const value = utils.getSafeProp(options, name);\n return utils.isUndefined(value) ? fallback : value;\n };\n\n const metaTokens = option('metaTokens', true);\n // eslint-disable-next-line no-use-before-define\n const visitor = option('visitor') || defaultVisitor;\n const dots = option('dots', false);\n const indexes = option('indexes', false);\n const _Blob = option('Blob') || (typeof Blob !== 'undefined' && Blob);\n const maxDepth = option('maxDepth', DEFAULT_FORM_DATA_MAX_DEPTH);\n const useBlob = _Blob && utils.isSpecCompliantForm(formData);\n const stack = [];\n\n if (!utils.isFunction(visitor)) {\n throw new TypeError('visitor must be a function');\n }\n\n function convertValue(value) {\n if (value === null) return '';\n\n if (utils.isDate(value)) {\n return value.toISOString();\n }\n\n if (utils.isBoolean(value)) {\n return value.toString();\n }\n\n if (!useBlob && utils.isBlob(value)) {\n throw new AxiosError('Blob is not supported. Use a Buffer instead.');\n }\n\n if (utils.isArrayBuffer(value) || utils.isTypedArray(value)) {\n if (useBlob && typeof _Blob === 'function') {\n return new _Blob([value]);\n }\n if (PlatformBuffer && PlatformBuffer.isBufferAvailable()) {\n return PlatformBuffer.from(value);\n }\n throw new AxiosError(\n 'Blob is not supported. Use a Buffer instead.',\n AxiosError.ERR_NOT_SUPPORT\n );\n }\n\n return value;\n }\n\n function throwIfMaxDepthExceeded(depth) {\n if (depth > maxDepth) {\n throw new AxiosError(\n 'Object is too deeply nested (' + depth + ' levels). Max depth: ' + maxDepth,\n AxiosError.ERR_FORM_DATA_DEPTH_EXCEEDED\n );\n }\n }\n\n function stringifyWithDepthLimit(value, depth) {\n if (maxDepth === Infinity) {\n return JSON.stringify(value);\n }\n\n const ancestors = [];\n\n return JSON.stringify(value, function limitDepth(_key, currentValue) {\n if (!utils.isObject(currentValue)) {\n return currentValue;\n }\n\n while (ancestors.length && ancestors[ancestors.length - 1] !== this) {\n ancestors.pop();\n }\n\n ancestors.push(currentValue);\n throwIfMaxDepthExceeded(depth + ancestors.length - 1);\n\n return currentValue;\n });\n }\n\n /**\n * Default visitor.\n *\n * @param {*} value\n * @param {String|Number} key\n * @param {Array} path\n * @this {FormData}\n *\n * @returns {boolean} return true to visit the each prop of the value recursively\n */\n function defaultVisitor(value, key, path) {\n let arr = value;\n\n if (utils.isReactNative(formData) && utils.isReactNativeBlob(value)) {\n formData.append(renderKey(path, key, dots), convertValue(value));\n return false;\n }\n\n if (value && !path && typeof value === 'object') {\n if (utils.endsWith(key, '{}')) {\n // eslint-disable-next-line no-param-reassign\n key = metaTokens ? key : key.slice(0, -2);\n // eslint-disable-next-line no-param-reassign\n value = stringifyWithDepthLimit(value, 1);\n } else if (\n (utils.isArray(value) && isFlatArray(value)) ||\n ((utils.isFileList(value) || utils.endsWith(key, '[]')) && (arr = utils.toArray(value)))\n ) {\n // eslint-disable-next-line no-param-reassign\n key = removeBrackets(key);\n\n arr.forEach(function each(el, index) {\n !(utils.isUndefined(el) || el === null) &&\n formData.append(\n // eslint-disable-next-line no-nested-ternary\n indexes === true\n ? renderKey([key], index, dots)\n : indexes === null\n ? key\n : key + '[]',\n convertValue(el)\n );\n });\n return false;\n }\n }\n\n if (isVisitable(value)) {\n return true;\n }\n\n formData.append(renderKey(path, key, dots), convertValue(value));\n\n return false;\n }\n\n const exposedHelpers = Object.assign(predicates, {\n defaultVisitor,\n convertValue,\n isVisitable,\n });\n\n function build(value, path, depth = 0) {\n if (utils.isUndefined(value)) return;\n\n throwIfMaxDepthExceeded(depth);\n\n if (stack.indexOf(value) !== -1) {\n throw new Error('Circular reference detected in ' + path.join('.'));\n }\n\n stack.push(value);\n\n utils.forEach(value, function each(el, key) {\n const result =\n !(utils.isUndefined(el) || el === null) &&\n visitor.call(formData, el, utils.isString(key) ? key.trim() : key, path, exposedHelpers);\n\n if (result === true) {\n build(el, path ? path.concat(key) : [key], depth + 1);\n }\n });\n\n stack.pop();\n }\n\n if (!utils.isObject(obj)) {\n throw new TypeError('data must be an object');\n }\n\n build(obj);\n\n return formData;\n}\n\nexport default toFormData;\n","'use strict';\n\nimport toFormData from './toFormData.js';\n\n/**\n * It encodes a string by replacing all characters that are not in the unreserved set with\n * their percent-encoded equivalents\n *\n * @param {string} str - The string to encode.\n *\n * @returns {string} The encoded string.\n */\nfunction encode(str) {\n const charMap = {\n '!': '%21',\n \"'\": '%27',\n '(': '%28',\n ')': '%29',\n '~': '%7E',\n '%20': '+',\n };\n return encodeURIComponent(str).replace(/[!'()~]|%20/g, function replacer(match) {\n return charMap[match];\n });\n}\n\n/**\n * It takes a params object and converts it to a FormData object\n *\n * @param {Object} params - The parameters to be converted to a FormData object.\n * @param {Object} options - The options object passed to the Axios constructor.\n *\n * @returns {void}\n */\nfunction AxiosURLSearchParams(params, options) {\n this._pairs = [];\n\n params && toFormData(params, this, options);\n}\n\nconst prototype = AxiosURLSearchParams.prototype;\n\nprototype.append = function append(name, value) {\n this._pairs.push([name, value]);\n};\n\nprototype.toString = function toString(encoder) {\n const _encode = encoder\n ? (value) => encoder.call(this, value, encode)\n : encode;\n\n return this._pairs\n .map(function each(pair) {\n return _encode(pair[0]) + '=' + _encode(pair[1]);\n }, '')\n .join('&');\n};\n\nexport default AxiosURLSearchParams;\n","'use strict';\n\nimport utils from '../utils.js';\nimport AxiosURLSearchParams from './AxiosURLSearchParams.js';\n\n/**\n * It replaces URL-encoded forms of `:`, `$`, `,`, and spaces with\n * their plain counterparts (`:`, `$`, `,`, `+`).\n *\n * @param {string} val The value to be encoded.\n *\n * @returns {string} The encoded value.\n */\nexport function encode(val) {\n return encodeURIComponent(val)\n .replace(/%3A/gi, ':')\n .replace(/%24/g, '$')\n .replace(/%2C/gi, ',')\n .replace(/%20/g, '+');\n}\n\n/**\n * Build a URL by appending params to the end\n *\n * @param {string} url The base of the url (e.g., http://www.google.com)\n * @param {object} [params] The params to be appended\n * @param {?(object|Function)} options\n *\n * @returns {string} The formatted url\n */\nexport default function buildURL(url, params, options) {\n if (!params) {\n return url;\n }\n url = url || '';\n\n const _options = utils.isFunction(options)\n ? {\n serialize: options,\n }\n : options;\n\n // Read serializer options pollution-safely: own properties and methods on a\n // class/template prototype are honored, but values injected onto a polluted\n // Object.prototype are ignored.\n const _encode = utils.getSafeProp(_options, 'encode') || encode;\n const serializeFn = utils.getSafeProp(_options, 'serialize');\n\n let serializedParams;\n\n if (serializeFn) {\n serializedParams = serializeFn(params, _options);\n } else {\n serializedParams = utils.isURLSearchParams(params)\n ? params.toString()\n : new AxiosURLSearchParams(params, _options).toString(_encode);\n }\n\n if (serializedParams) {\n const hashmarkIndex = url.indexOf('#');\n\n if (hashmarkIndex !== -1) {\n url = url.slice(0, hashmarkIndex);\n }\n url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;\n }\n\n return url;\n}\n","'use strict';\n\nimport utils from '../utils.js';\n\nconst $internals = Symbol('internals');\n\n// `handlers` is public and may be replaced with a nullish value by user code;\n// `clear()` has always tolerated that. Treat it as an empty stack rather than\n// dereferencing it.\nfunction countHandlers(handlers) {\n return handlers ? handlers.length : 0;\n}\n\nfunction trimHandlers(handlers) {\n if (!handlers) {\n return;\n }\n\n while (handlers.length && handlers[handlers.length - 1] === null) {\n handlers.pop();\n }\n}\n\n// Preserve the array-key coercion used before IDs were stored in a Map, without\n// treating null, empty strings, or noncanonical numeric strings as ID zero.\nfunction normalizeHandlerId(id) {\n if (typeof id === 'string' && id !== '' && String(Number(id)) === id) {\n return Number(id);\n }\n\n return id;\n}\n\nfunction syncHandlerEntries(manager, internals) {\n const handlers = manager.handlers;\n const length = countHandlers(handlers);\n\n if (handlers !== internals.handlersRef) {\n internals.handlersRef = handlers;\n internals.handlerEntries.clear();\n } else if (length !== internals.handlersLength) {\n if (!length) {\n internals.handlerEntries.clear();\n } else {\n internals.handlerEntries.forEach(function removeStaleEntry(entry, id) {\n if (handlers[entry.index] !== entry.handler) {\n internals.handlerEntries.delete(id);\n }\n });\n }\n }\n\n internals.handlersLength = length;\n}\n\nclass InterceptorManager {\n constructor() {\n this.handlers = [];\n this[$internals] = {\n handlersRef: this.handlers,\n handlersLength: this.handlers.length,\n handlerEntries: new Map(),\n iterationDepth: 0,\n nextId: 0,\n };\n }\n\n /**\n * Add a new interceptor to the stack\n *\n * @param {Function} fulfilled The function to handle `then` for a `Promise`\n * @param {Function} rejected The function to handle `reject` for a `Promise`\n * @param {Object} options The options for the interceptor, synchronous and runWhen\n *\n * @return {Number} An ID used to remove interceptor later\n */\n use(fulfilled, rejected, options) {\n const handler = {\n fulfilled,\n rejected,\n synchronous: options ? options.synchronous : false,\n runWhen: options ? options.runWhen : null,\n };\n const internals = this[$internals];\n\n if (this.handlers == null) {\n this.handlers = [];\n }\n\n syncHandlerEntries(this, internals);\n\n const id = internals.nextId++;\n\n this.handlers.push(handler);\n internals.handlerEntries.set(id, {\n handler,\n index: this.handlers.length - 1,\n });\n internals.handlersLength = this.handlers.length;\n\n return id;\n }\n\n /**\n * Remove an interceptor from the stack\n *\n * @param {Number} id The ID that was returned by `use`\n *\n * @returns {void}\n */\n eject(id) {\n const internals = this[$internals];\n\n syncHandlerEntries(this, internals);\n\n const handlerId = normalizeHandlerId(id);\n const entry = internals.handlerEntries.get(handlerId);\n\n if (entry) {\n internals.handlerEntries.delete(handlerId);\n\n // Ignore IDs invalidated by clear or direct replacement of handlers.\n if (this.handlers[entry.index] !== entry.handler) {\n return;\n }\n\n this.handlers[entry.index] = null;\n\n // Do not reuse an index while forEach is walking its length snapshot.\n if (!internals.iterationDepth) {\n trimHandlers(this.handlers);\n internals.handlersLength = this.handlers.length;\n }\n }\n }\n\n /**\n * Clear all interceptors from the stack\n *\n * @returns {void}\n */\n clear() {\n if (this.handlers) {\n this.handlers = [];\n syncHandlerEntries(this, this[$internals]);\n }\n }\n\n /**\n * Iterate over all the registered interceptors\n *\n * This method is particularly useful for skipping over any\n * interceptors that may have become `null` calling `eject`.\n *\n * @param {Function} fn The function to call for each interceptor\n *\n * @returns {void}\n */\n forEach(fn) {\n const internals = this[$internals];\n\n syncHandlerEntries(this, internals);\n\n internals.iterationDepth++;\n\n try {\n utils.forEach(this.handlers, function forEachHandler(h) {\n if (h !== null) {\n fn(h);\n }\n });\n } finally {\n if (!--internals.iterationDepth) {\n syncHandlerEntries(this, internals);\n trimHandlers(this.handlers);\n internals.handlersLength = countHandlers(this.handlers);\n }\n }\n }\n}\n\nexport default InterceptorManager;\n","'use strict';\n\nexport default {\n silentJSONParsing: true,\n forcedJSONParsing: true,\n clarifyTimeoutError: false,\n legacyInterceptorReqResOrdering: true,\n advertiseZstdAcceptEncoding: false,\n validateStatusUndefinedResolves: true,\n encodeBasicAuthUsername: false,\n};\n","import URLSearchParams from './classes/URLSearchParams.js';\nimport FormData from './classes/FormData.js';\nimport Blob from './classes/Blob.js';\n\nexport default {\n isBrowser: true,\n classes: {\n URLSearchParams,\n FormData,\n Blob,\n },\n protocols: ['http', 'https', 'file', 'blob', 'url', 'data'],\n};\n","'use strict';\n\nimport AxiosURLSearchParams from '../../../helpers/AxiosURLSearchParams.js';\nexport default typeof URLSearchParams !== 'undefined' ? URLSearchParams : AxiosURLSearchParams;\n","'use strict';\n\nexport default typeof FormData !== 'undefined' ? FormData : null;\n","'use strict';\n\nexport default typeof Blob !== 'undefined' ? Blob : null;\n","const hasBrowserEnv = typeof window !== 'undefined' && typeof document !== 'undefined';\n\nconst _navigator = (typeof navigator === 'object' && navigator) || undefined;\n\n/**\n * Determine if we're running in a standard browser environment\n *\n * This allows axios to run in a web worker, and react-native.\n * Both environments support XMLHttpRequest, but not fully standard globals.\n *\n * web workers:\n * typeof window -> undefined\n * typeof document -> undefined\n *\n * react-native:\n * navigator.product -> 'ReactNative'\n * nativescript\n * navigator.product -> 'NativeScript' or 'NS'\n *\n * @returns {boolean}\n */\nconst hasStandardBrowserEnv =\n hasBrowserEnv &&\n (!_navigator || ['ReactNative', 'NativeScript', 'NS'].indexOf(_navigator.product) < 0);\n\n/**\n * Determine if we're running in a standard browser webWorker environment\n *\n * Although the `isStandardBrowserEnv` method indicates that\n * `allows axios to run in a web worker`, the WebWorker will still be\n * filtered out due to its judgment standard\n * `typeof window !== 'undefined' && typeof document !== 'undefined'`.\n * This leads to a problem when axios post `FormData` in webWorker\n */\nconst hasStandardBrowserWebWorkerEnv = (() => {\n return (\n typeof WorkerGlobalScope !== 'undefined' &&\n // eslint-disable-next-line no-undef\n self instanceof WorkerGlobalScope &&\n typeof self.importScripts === 'function'\n );\n})();\n\nconst origin = (hasBrowserEnv && window.location.href) || 'http://localhost';\n\nexport {\n hasBrowserEnv,\n hasStandardBrowserWebWorkerEnv,\n hasStandardBrowserEnv,\n _navigator as navigator,\n origin,\n};\n","import platform from './node/index.js';\nimport * as utils from './common/utils.js';\n\nexport default {\n ...utils,\n ...platform,\n};\n","'use strict';\n\nimport utils from '../utils.js';\nimport AxiosError from '../core/AxiosError.js';\nimport { DEFAULT_FORM_DATA_MAX_DEPTH } from './toFormData.js';\n\nconst MAX_DEPTH = DEFAULT_FORM_DATA_MAX_DEPTH;\n\nfunction throwIfDepthExceeded(index) {\n if (index > MAX_DEPTH) {\n throw new AxiosError(\n 'FormData field is too deeply nested (' + index + ' levels). Max depth: ' + MAX_DEPTH,\n AxiosError.ERR_FORM_DATA_DEPTH_EXCEEDED\n );\n }\n}\n\n/**\n * It takes a string like `foo[x][y][z]` and returns an array like `['foo', 'x', 'y', 'z']\n *\n * @param {string} name - The name of the property to get.\n *\n * @returns An array of strings.\n */\nfunction parsePropPath(name) {\n // foo[x][y][z] -> ['foo', 'x', 'y', 'z']\n // foo.x.y.z -> ['foo', 'x', 'y', 'z']\n // A path is split on `.` and on `[...]` groups. A segment — whether written\n // in dot notation or captured inside brackets — may contain any character\n // except `.`, `[` and `]`, so a key like `user-name` or `user name` is kept\n // literal instead of being split (#5402). `.`, `[` and `]` keep their existing\n // meaning, e.g. `foo[bar.baz]` -> ['foo', 'bar', 'baz'] and `[]` is an array push.\n // Excluding `[` from the bracket group also makes the match fail fast at the\n // next `[`, so a malformed name cannot rescan to the end of the string from\n // every unmatched `[` — parsing stays linear in the length of the name.\n const path = [];\n const pattern = /[^.[\\]]+|\\[([^.[\\]]*)]/g;\n let match;\n\n while ((match = pattern.exec(name)) !== null) {\n throwIfDepthExceeded(path.length);\n path.push(match[0] === '[]' ? '' : match[1] || match[0]);\n }\n\n return path;\n}\n\n/**\n * Convert an array to an object.\n *\n * @param {Array} arr - The array to convert to an object.\n *\n * @returns An object with the same keys and values as the array.\n */\nfunction arrayToObject(arr) {\n const obj = {};\n const keys = Object.keys(arr);\n let i;\n const len = keys.length;\n let key;\n for (i = 0; i < len; i++) {\n key = keys[i];\n obj[key] = arr[key];\n }\n return obj;\n}\n\nfunction normalizeArray(value) {\n if (!utils.isArray(value)) return value;\n\n const keys = Object.keys(value);\n return keys.length !== value.length || keys.some((key, index) => key !== String(index))\n ? arrayToObject(value)\n : value;\n}\n\nfunction normalizeArrays(obj) {\n const pending = [obj];\n while (pending.length) {\n const target = pending.pop();\n Object.keys(target).forEach((key) => {\n const value = (target[key] = normalizeArray(target[key]));\n if (utils.isArray(value) || utils.isPlainObject(value)) {\n pending.push(value);\n }\n });\n }\n return obj;\n}\n\n/**\n * It takes a FormData object and returns a JavaScript object\n *\n * @param {string} formData The FormData object to convert to JSON.\n *\n * @returns {Object | null} The converted object.\n */\nfunction formDataToJSON(formData) {\n function buildPath(path, value, target, index) {\n throwIfDepthExceeded(index);\n\n let name = path[index++];\n\n if (name === '__proto__') return true;\n\n const isNumericKey = Number.isFinite(+name);\n const isLast = index >= path.length;\n name = !name && utils.isArray(target) ? target.length : name;\n\n if (isLast) {\n if (utils.hasOwnProp(target, name)) {\n target[name] = normalizeArray(target[name]);\n target[name] = utils.isArray(target[name])\n ? target[name].concat(value)\n : [target[name], value];\n } else {\n target[name] = value;\n }\n\n return !isNumericKey;\n }\n\n if (!utils.hasOwnProp(target, name) || !utils.isObject(target[name])) {\n target[name] = [];\n }\n\n const result = buildPath(path, value, target[name], index);\n\n if (result && utils.isArray(target[name])) {\n target[name] = arrayToObject(target[name]);\n }\n\n return !isNumericKey;\n }\n\n if (utils.isFormData(formData) && utils.isFunction(formData.entries)) {\n const obj = {};\n\n utils.forEachEntry(formData, (name, value) => {\n buildPath(parsePropPath(name), value, obj, 0);\n });\n\n return normalizeArrays(obj);\n }\n\n return null;\n}\n\nexport default formDataToJSON;\n","'use strict';\n\nconst methodList = Object.freeze([\n 'get',\n 'delete',\n 'head',\n 'options',\n 'post',\n 'put',\n 'patch',\n 'purge',\n 'link',\n 'unlink',\n 'query',\n]);\n\nexport default methodList;\n","'use strict';\n\nimport utils from '../utils.js';\nimport AxiosError from '../core/AxiosError.js';\nimport transitionalDefaults from './transitional.js';\nimport toFormData from '../helpers/toFormData.js';\nimport toURLEncodedForm from '../helpers/toURLEncodedForm.js';\nimport platform from '../platform/index.js';\nimport formDataToJSON from '../helpers/formDataToJSON.js';\nimport methodList from '../core/methodList.js';\n\nconst own = (obj, key) => (obj != null && utils.hasOwnProp(obj, key) ? obj[key] : undefined);\n\n/**\n * It takes a string, tries to parse it, and if it fails, it returns the stringified version\n * of the input\n *\n * @param {any} rawValue - The value to be stringified.\n * @param {Function} parser - A function that parses a string into a JavaScript object.\n * @param {Function} encoder - A function that takes a value and returns a string.\n *\n * @returns {string} A stringified version of the rawValue.\n */\nfunction stringifySafely(rawValue, parser, encoder) {\n if (utils.isString(rawValue)) {\n try {\n (parser || JSON.parse)(rawValue);\n return utils.trim(rawValue);\n } catch (e) {\n if (e.name !== 'SyntaxError') {\n throw e;\n }\n }\n }\n\n return (encoder || JSON.stringify)(rawValue);\n}\n\nconst defaults = {\n transitional: transitionalDefaults,\n\n adapter: ['xhr', 'http', 'fetch'],\n\n transformRequest: [\n function transformRequest(data, headers) {\n const contentType = headers.getContentType() || '';\n const hasJSONContentType = contentType.indexOf('application/json') > -1;\n const isObjectPayload = utils.isObject(data);\n\n if (isObjectPayload && utils.isHTMLForm(data)) {\n data = new FormData(data);\n }\n\n const isFormData = utils.isFormData(data);\n\n if (isFormData) {\n return hasJSONContentType ? JSON.stringify(formDataToJSON(data)) : data;\n }\n\n if (\n utils.isArrayBuffer(data) ||\n utils.isBuffer(data) ||\n utils.isStream(data) ||\n utils.isFile(data) ||\n utils.isBlob(data) ||\n utils.isReadableStream(data)\n ) {\n return data;\n }\n if (utils.isArrayBufferView(data)) {\n return data.buffer;\n }\n if (utils.isURLSearchParams(data)) {\n headers.setContentType('application/x-www-form-urlencoded;charset=utf-8', false);\n return data.toString();\n }\n\n let isFileList;\n\n if (isObjectPayload) {\n const formSerializer = own(this, 'formSerializer');\n if (contentType.indexOf('application/x-www-form-urlencoded') > -1) {\n return toURLEncodedForm(data, formSerializer).toString();\n }\n\n if (\n (isFileList = utils.isFileList(data)) ||\n contentType.indexOf('multipart/form-data') > -1\n ) {\n const env = own(this, 'env');\n const _FormData = env && env.FormData;\n\n return toFormData(\n isFileList ? { 'files[]': data } : data,\n _FormData && new _FormData(),\n formSerializer\n );\n }\n }\n\n if (isObjectPayload || hasJSONContentType) {\n headers.setContentType('application/json', false);\n return stringifySafely(data);\n }\n\n return data;\n },\n ],\n\n transformResponse: [\n function transformResponse(data) {\n const transitional = own(this, 'transitional') || defaults.transitional;\n const forcedJSONParsing = transitional && transitional.forcedJSONParsing;\n const responseType = own(this, 'responseType');\n const JSONRequested = responseType === 'json';\n\n if (utils.isResponse(data) || utils.isReadableStream(data)) {\n return data;\n }\n\n if (\n data &&\n utils.isString(data) &&\n ((forcedJSONParsing && !responseType) || JSONRequested)\n ) {\n const silentJSONParsing = transitional && transitional.silentJSONParsing;\n const strictJSONParsing = !silentJSONParsing && JSONRequested;\n\n try {\n return JSON.parse(data, own(this, 'parseReviver'));\n } catch (e) {\n if (strictJSONParsing) {\n if (e.name === 'SyntaxError') {\n throw AxiosError.from(e, AxiosError.ERR_BAD_RESPONSE, this, null, own(this, 'response'));\n }\n throw e;\n }\n }\n }\n\n return data;\n },\n ],\n\n /**\n * A timeout in milliseconds to abort a request. If set to 0 (default) a\n * timeout is not created.\n */\n timeout: 0,\n\n xsrfCookieName: 'XSRF-TOKEN',\n xsrfHeaderName: 'X-XSRF-TOKEN',\n\n maxContentLength: -1,\n maxBodyLength: -1,\n\n env: {\n FormData: platform.classes.FormData,\n Blob: platform.classes.Blob,\n },\n\n validateStatus: function validateStatus(status) {\n return status >= 200 && status < 300;\n },\n\n headers: {\n common: {\n Accept: 'application/json, text/plain, */*',\n 'Content-Type': undefined,\n },\n },\n};\n\nutils.forEach(methodList, (method) => {\n defaults.headers[method] = {};\n});\n\nexport default defaults;\n","'use strict';\n\nimport utils from '../utils.js';\nimport toFormData from './toFormData.js';\nimport platform from '../platform/index.js';\n\nexport default function toURLEncodedForm(data, options) {\n return toFormData(data, new platform.classes.URLSearchParams(), {\n visitor: function (value, key, path, helpers) {\n if (platform.isNode && utils.isBuffer(value)) {\n this.append(key, value.toString('base64'));\n return false;\n }\n\n return helpers.defaultVisitor.apply(this, arguments);\n },\n ...options,\n });\n}\n","'use strict';\n\nimport utils from '../utils.js';\nimport defaults from '../defaults/index.js';\nimport AxiosHeaders from '../core/AxiosHeaders.js';\n\n/**\n * Transform the data for a request or a response\n *\n * @param {Array|Function} fns A single function or Array of functions\n * @param {?Object} response The response object\n *\n * @returns {*} The resulting transformed data\n */\nexport default function transformData(fns, response) {\n const config = this || defaults;\n const context = response || config;\n const headers = AxiosHeaders.from(context.headers);\n let data = context.data;\n\n utils.forEach(fns, function transform(fn) {\n data = fn.call(config, data, headers.normalize(), response ? response.status : undefined);\n });\n\n headers.normalize();\n\n return data;\n}\n","'use strict';\n\nexport default function isCancel(value) {\n return !!(value && value.__CANCEL__);\n}\n","'use strict';\n\nimport AxiosError from '../core/AxiosError.js';\n\nclass CanceledError extends AxiosError {\n /**\n * A `CanceledError` is an object that is thrown when an operation is canceled.\n *\n * @param {string=} message The message.\n * @param {Object=} config The config.\n * @param {Object=} request The request.\n *\n * @returns {CanceledError} The created error.\n */\n constructor(message, config, request) {\n super(message == null ? 'canceled' : message, AxiosError.ERR_CANCELED, config, request);\n this.name = 'CanceledError';\n this.__CANCEL__ = true;\n }\n}\n\nexport default CanceledError;\n","'use strict';\n\nimport AxiosError from './AxiosError.js';\n\n/**\n * Resolve or reject a Promise based on response status.\n *\n * @param {Function} resolve A function that resolves the promise.\n * @param {Function} reject A function that rejects the promise.\n * @param {object} response The response.\n *\n * @returns {object} The response.\n */\nexport default function settle(resolve, reject, response) {\n const validateStatus = response.config.validateStatus;\n if (!response.status || !validateStatus || validateStatus(response.status)) {\n resolve(response);\n } else {\n reject(new AxiosError(\n 'Request failed with status code ' + response.status,\n response.status >= 400 && response.status < 500 ? AxiosError.ERR_BAD_REQUEST : AxiosError.ERR_BAD_RESPONSE,\n response.config,\n response.request,\n response\n ));\n }\n}\n","'use strict';\n\nconst urlParserControlCharacters = /[\\t\\n\\r]/g;\n\n/**\n * Match WHATWG URL preprocessing before checking a URL's protocol.\n *\n * @param {string} url\n *\n * @returns {string}\n */\nexport default function normalizeURLForProtocolCheck(url) {\n if (typeof url !== 'string') {\n return url;\n }\n\n let start = 0;\n\n while (start < url.length && url.charCodeAt(start) <= 0x20) {\n start++;\n }\n\n return url.slice(start).replace(urlParserControlCharacters, '');\n}\n","'use strict';\n\nexport default function parseProtocol(url) {\n const match = /^([-+\\w]{1,25}):(?:\\/\\/)?/.exec(url);\n return (match && match[1].toLowerCase()) || '';\n}\n","import utils from '../utils.js';\nimport platform from '../platform/index.js';\n\nconst decodeCookieValue = (value) => {\n try {\n return decodeURIComponent(value);\n } catch (e) {\n return value;\n }\n};\n\nexport default platform.hasStandardBrowserEnv\n ? // Standard browser envs support document.cookie\n {\n write(name, value, expires, path, domain, secure, sameSite) {\n if (typeof document === 'undefined') return;\n\n const cookie = [`${name}=${encodeURIComponent(value)}`];\n\n if (utils.isNumber(expires)) {\n cookie.push(`expires=${new Date(expires).toUTCString()}`);\n }\n if (utils.isString(path)) {\n cookie.push(`path=${path}`);\n }\n if (utils.isString(domain)) {\n cookie.push(`domain=${domain}`);\n }\n if (secure === true) {\n cookie.push('secure');\n }\n if (utils.isString(sameSite)) {\n cookie.push(`SameSite=${sameSite}`);\n }\n\n document.cookie = cookie.join('; ');\n },\n\n read(name) {\n if (typeof document === 'undefined') return null;\n const cookieString = document.cookie;\n if (!cookieString) return null;\n // Match name=value by splitting on the semicolon separator instead of building a\n // RegExp from `name` — interpolating an unescaped string into a RegExp would let\n // metacharacters (e.g. `.+?` in an attacker-influenced cookie name) cause ReDoS or\n // match the wrong cookie. Browsers may serialize cookie pairs as either \";\" or\n // \"; \", so ignore optional whitespace before each cookie name.\n const cookies = cookieString.split(';');\n for (let i = 0; i < cookies.length; i++) {\n const cookie = cookies[i].replace(/^\\s+/, '');\n const eq = cookie.indexOf('=');\n if (eq !== -1 && cookie.slice(0, eq) === name) {\n return decodeCookieValue(cookie.slice(eq + 1));\n }\n }\n return null;\n },\n\n async readAsync(name) {\n try {\n const store = typeof window !== 'undefined' && window.cookieStore;\n if (store && utils.isFunction(store.get)) {\n const cookie = await store.get(name);\n // Both APIs expose stored bytes; preserve Axios's existing URI decoding.\n return cookie ? decodeCookieValue(cookie.value) : null;\n }\n } catch (e) {\n // Restricted or unavailable storage retains the synchronous fallback.\n }\n\n return this.read(name);\n },\n\n remove(name) {\n this.write(name, '', Date.now() - 86400000, '/');\n },\n }\n : // Non-standard browser env (web workers, react-native) lack needed support.\n {\n write() {},\n read() {\n return null;\n },\n async readAsync() {\n return null;\n },\n remove() {},\n };\n","import speedometer from './speedometer.js';\nimport throttle from './throttle.js';\nimport utils from '../utils.js';\n\nexport const progressEventReducer = (listener, isDownloadStream, freq = 3) => {\n let bytesNotified = 0;\n const _speedometer = speedometer(50, 250);\n\n return throttle((e) => {\n if (!e || !utils.isNumber(e.loaded)) {\n return;\n }\n const rawLoaded = e.loaded;\n const total = e.lengthComputable ? e.total : undefined;\n const loaded = Math.max(0, total != null ? Math.min(rawLoaded, total) : rawLoaded);\n const progressBytes = Math.max(0, loaded - bytesNotified);\n const rate = _speedometer(progressBytes);\n\n bytesNotified = Math.max(bytesNotified, loaded);\n\n const data = {\n loaded,\n total,\n progress: total ? loaded / total : undefined,\n bytes: progressBytes,\n rate: rate ? rate : undefined,\n estimated: rate && total ? (total - loaded) / rate : undefined,\n event: e,\n lengthComputable: total != null,\n [isDownloadStream ? 'download' : 'upload']: true,\n };\n\n listener(data);\n }, freq);\n};\n\nexport const progressEventDecorator = (total, throttled) => {\n const lengthComputable = total != null;\n\n return [\n (loaded) =>\n throttled[0]({\n lengthComputable,\n total,\n loaded,\n }),\n throttled[1],\n ];\n};\n\nexport const asyncDecorator =\n (fn, scheduler = utils.asap) =>\n (...args) =>\n scheduler(() => fn(...args));\n","'use strict';\n\n/**\n * Calculate data maxRate\n * @param {Number} [samplesCount= 10]\n * @param {Number} [min= 1000]\n * @returns {Function}\n */\nfunction speedometer(samplesCount, min) {\n samplesCount = samplesCount || 10;\n const bytes = new Array(samplesCount);\n const timestamps = new Array(samplesCount);\n let head = 0;\n let tail = 0;\n let firstSampleTS;\n\n min = min !== undefined ? min : 1000;\n\n return function push(chunkLength) {\n const now = Date.now();\n\n const startedAt = timestamps[tail];\n\n if (!firstSampleTS) {\n firstSampleTS = now;\n }\n\n bytes[head] = chunkLength;\n timestamps[head] = now;\n\n let i = tail;\n let bytesCount = 0;\n\n while (i !== head) {\n bytesCount += bytes[i++];\n i = i % samplesCount;\n }\n\n head = (head + 1) % samplesCount;\n\n if (head === tail) {\n tail = (tail + 1) % samplesCount;\n }\n\n if (now - firstSampleTS < min) {\n return;\n }\n\n const passed = startedAt && now - startedAt;\n\n return passed ? Math.round((bytesCount * 1000) / passed) : undefined;\n };\n}\n\nexport default speedometer;\n","/**\n * Throttle decorator\n * @param {Function} fn\n * @param {Number} freq\n * @return {Array}\n */\nfunction throttle(fn, freq) {\n let timestamp = 0;\n let threshold = 1000 / freq;\n let lastArgs;\n let timer;\n\n const invoke = (args, now = Date.now()) => {\n timestamp = now;\n lastArgs = null;\n if (timer) {\n clearTimeout(timer);\n timer = null;\n }\n fn(...args);\n };\n\n const throttled = (...args) => {\n const now = Date.now();\n const passed = now - timestamp;\n if (passed >= threshold) {\n invoke(args, now);\n } else {\n lastArgs = args;\n if (!timer) {\n timer = setTimeout(() => {\n timer = null;\n invoke(lastArgs);\n }, threshold - passed);\n }\n }\n };\n\n const flush = () => lastArgs && invoke(lastArgs);\n const flushWith = (...args) => invoke(args);\n\n return [throttled, flush, flushWith];\n}\n\nexport default throttle;\n","import platform from '../platform/index.js';\n\nexport default platform.hasStandardBrowserEnv\n ? ((origin) => (url) => {\n url = new URL(url, document.baseURI || platform.origin);\n\n return (\n origin.protocol === url.protocol && origin.host === url.host && origin.port === url.port\n );\n })(new URL(platform.origin))\n : () => true;\n","'use strict';\n\nimport AxiosError, { REDACTED } from './AxiosError.js';\nimport isAbsoluteURL from '../helpers/isAbsoluteURL.js';\nimport combineURLs from '../helpers/combineURLs.js';\nimport normalizeURLForProtocolCheck from '../helpers/normalizeURLForProtocolCheck.js';\n\nconst malformedHttpProtocol = /^https?:(?!\\/\\/)/i;\n\n// Redact the parts of a URL that can carry secrets before it is embedded in an\n// error message. AxiosError.toJSON() serializes `message` verbatim and errors\n// are commonly logged, while the opt-in `config.redact` model only cleans\n// config keys — it cannot reach the message. Redact only the genuinely\n// sensitive substrings — userinfo (credentials), query parameter values and\n// fragment contents — with the same REDACTED marker the config redaction uses,\n// while keeping the scheme, host, path and parameter names so the offending\n// request stays accurately identifiable.\nfunction redactFragment(fragment) {\n if (!fragment) {\n return fragment;\n }\n\n return fragment.replace(/(^|&)([^=&]*=)?[^&]+/g, (match, separator, parameterName = '') => {\n return `${separator}${parameterName}${REDACTED}`;\n });\n}\n\nfunction redactSensitiveURLParts(url) {\n const redactedURL = url.replace(/^(https?:\\/{0,2})[^/?#]*@/i, `$1${REDACTED}@`);\n const fragmentIndex = redactedURL.indexOf('#');\n const urlWithoutFragment =\n fragmentIndex === -1 ? redactedURL : redactedURL.slice(0, fragmentIndex);\n const redactedURLWithoutFragment = urlWithoutFragment.replace(\n /([?&][^=&#]*=)[^&#]*/g,\n `$1${REDACTED}`\n );\n\n if (fragmentIndex === -1) {\n return redactedURLWithoutFragment;\n }\n\n return `${redactedURLWithoutFragment}#${redactFragment(redactedURL.slice(fragmentIndex + 1))}`;\n}\n\nfunction assertValidHttpProtocolURL(url, config) {\n if (typeof url === 'string') {\n const normalizedURL = normalizeURLForProtocolCheck(url);\n if (malformedHttpProtocol.test(normalizedURL)) {\n throw new AxiosError(\n `Invalid URL ${JSON.stringify(redactSensitiveURLParts(normalizedURL))}: missing \"//\" after protocol`,\n AxiosError.ERR_INVALID_URL,\n config\n );\n }\n }\n}\n\n/**\n * Creates a new URL by combining the baseURL with the requestedURL,\n * only when the requestedURL is not already an absolute URL.\n * If the requestURL is absolute, this function returns the requestedURL untouched.\n *\n * @param {string} baseURL The base URL\n * @param {string} requestedURL Absolute or relative URL to combine\n *\n * @returns {string} The combined full path\n */\nexport default function buildFullPath(baseURL, requestedURL, allowAbsoluteUrls, config) {\n assertValidHttpProtocolURL(requestedURL, config);\n let isRelativeUrl = !isAbsoluteURL(requestedURL);\n if (baseURL && (isRelativeUrl || allowAbsoluteUrls === false)) {\n assertValidHttpProtocolURL(baseURL, config);\n return combineURLs(baseURL, requestedURL);\n }\n return requestedURL;\n}\n","'use strict';\n\n/**\n * Determines whether the specified URL is absolute\n *\n * @param {string} url The URL to test\n *\n * @returns {boolean} True if the specified URL is absolute, otherwise false\n */\nexport default function isAbsoluteURL(url) {\n // A URL is considered absolute if it begins with \"://\" or \"//\" (protocol-relative URL).\n // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed\n // by any combination of letters, digits, plus, period, or hyphen.\n if (typeof url !== 'string') {\n return false;\n }\n\n return /^([a-z][a-z\\d+\\-.]*:)?\\/\\//i.test(url);\n}\n","'use strict';\n\n/**\n * Creates a new URL by combining the specified URLs\n *\n * @param {string} baseURL The base URL\n * @param {string} relativeURL The relative URL\n *\n * @returns {string} The combined URL\n */\nexport default function combineURLs(baseURL, relativeURL) {\n if (!relativeURL) {\n return baseURL;\n }\n\n let end = baseURL.length;\n\n while (end > 0 && baseURL.charCodeAt(end - 1) === 47) {\n end--;\n }\n\n return baseURL.slice(0, end) + '/' + relativeURL.replace(/^\\/+/, '');\n}\n","'use strict';\n\nimport utils from '../utils.js';\nimport AxiosHeaders from './AxiosHeaders.js';\nimport assertParamsAcyclic from './assertParamsAcyclic.js';\n\nconst headersToObject = (thing) => (thing instanceof AxiosHeaders ? { ...thing } : thing);\n\nconst ownEnumerableKeys = (thing) => {\n if (Object.getOwnPropertySymbols && Object.getOwnPropertyDescriptor) {\n return Object.keys(thing).concat(\n Object.getOwnPropertySymbols(thing).filter((symbol) => {\n const descriptor = Object.getOwnPropertyDescriptor(thing, symbol);\n return descriptor && descriptor.enumerable;\n })\n );\n }\n return Object.keys(thing);\n};\n\n// Copy params without recursive merges so the serializer remains responsible\n// for its depth policy. Only visit defaults that contribute to the result.\nfunction mergeParams(a, b) {\n const pending = [];\n const copies = new WeakMap();\n const empty = {};\n\n function copy(target, source) {\n if (!utils.isPlainObject(source)) {\n return utils.isArray(source) ? source.slice() : source;\n }\n\n const base = utils.isPlainObject(target) ? target : empty;\n let bases = copies.get(source);\n if (!bases) {\n bases = new WeakMap();\n copies.set(source, bases);\n }\n if (bases.has(base)) return bases.get(base);\n\n const result = {};\n bases.set(base, result);\n pending.push({ base, source, result });\n return result;\n }\n\n const result = utils.isUndefined(b) ? copy(undefined, a) : copy(a, b);\n while (pending.length) {\n const { base, source, result: target } = pending.pop();\n const baseKeys = new Set(ownEnumerableKeys(base));\n const sourceKeys = new Set(ownEnumerableKeys(source));\n const keys = new Set([...baseKeys, ...sourceKeys]);\n\n keys.forEach((key) => {\n if (key === '__proto__' || key === 'constructor' || key === 'prototype') return;\n const hasSource = sourceKeys.has(key);\n const value = hasSource ? source[key] : undefined;\n const previous =\n (!hasSource || utils.isPlainObject(value)) && baseKeys.has(key) ? base[key] : undefined;\n target[key] = hasSource ? copy(previous, value) : copy(undefined, previous);\n });\n }\n\n assertParamsAcyclic(result);\n return result;\n}\n\nfunction getMergedValue(target, source, prop, caseless) {\n if (utils.isPlainObject(target) && utils.isPlainObject(source)) {\n return utils.merge.call({ caseless }, target, source);\n } else if (utils.isPlainObject(source)) {\n return utils.merge({}, source);\n } else if (utils.isArray(source)) {\n return source.slice();\n }\n return source;\n}\n\nfunction mergeDeepProperties(a, b, prop, caseless) {\n if (!utils.isUndefined(b)) {\n return getMergedValue(a, b, prop, caseless);\n } else if (!utils.isUndefined(a)) {\n return getMergedValue(undefined, a, prop, caseless);\n }\n}\n\n// eslint-disable-next-line consistent-return\nfunction valueFromConfig2(a, b) {\n if (!utils.isUndefined(b)) {\n return getMergedValue(undefined, b);\n }\n}\n\n// eslint-disable-next-line consistent-return\nfunction defaultToConfig2(a, b) {\n if (!utils.isUndefined(b)) {\n return getMergedValue(undefined, b);\n } else if (!utils.isUndefined(a)) {\n return getMergedValue(undefined, a);\n }\n}\n\nfunction getMergedTransitionalOption(config1, config2, prop) {\n const transitional2 = utils.hasOwnProp(config2, 'transitional')\n ? config2.transitional\n : undefined;\n\n if (!utils.isUndefined(transitional2)) {\n if (utils.isPlainObject(transitional2)) {\n if (utils.hasOwnProp(transitional2, prop)) {\n return transitional2[prop];\n }\n } else {\n return undefined;\n }\n }\n\n const transitional1 = utils.hasOwnProp(config1, 'transitional')\n ? config1.transitional\n : undefined;\n\n if (utils.isPlainObject(transitional1) && utils.hasOwnProp(transitional1, prop)) {\n return transitional1[prop];\n }\n\n return undefined;\n}\n\n// eslint-disable-next-line consistent-return\nfunction mergeDirectKeys(a, b, prop, config1, config2) {\n if (utils.hasOwnProp(config2, prop)) {\n return getMergedValue(a, b);\n } else if (utils.hasOwnProp(config1, prop)) {\n return getMergedValue(undefined, a);\n }\n}\n\nfunction mergeHeaders(a, b, prop) {\n return mergeDeepProperties(headersToObject(a), headersToObject(b), prop, true);\n}\n\n// Null-proto, frozen descriptor so a polluted Object.prototype.get cannot turn\n// this data descriptor into an accessor descriptor on the way in.\n// defineProperty only reads it, so one shared instance serves every call.\nconst hasOwnPropertyDescriptor = Object.freeze({\n __proto__: null,\n value: Object.prototype.hasOwnProperty,\n enumerable: false,\n writable: true,\n configurable: true,\n});\n\n// The strategy table and the strategies above are stateless, so they are\n// built once at module load instead of on every call: mergeConfig runs at\n// most twice per request (once from a method alias, once from `_request`).\nconst mergeMap = {\n url: valueFromConfig2,\n method: valueFromConfig2,\n data: valueFromConfig2,\n baseURL: defaultToConfig2,\n transformRequest: defaultToConfig2,\n transformResponse: defaultToConfig2,\n params: mergeParams,\n paramsSerializer: defaultToConfig2,\n timeout: defaultToConfig2,\n timeoutErrorMessage: defaultToConfig2,\n withCredentials: defaultToConfig2,\n withXSRFToken: defaultToConfig2,\n adapter: defaultToConfig2,\n responseType: defaultToConfig2,\n xsrfCookieName: defaultToConfig2,\n xsrfHeaderName: defaultToConfig2,\n onUploadProgress: defaultToConfig2,\n onDownloadProgress: defaultToConfig2,\n decompress: defaultToConfig2,\n maxContentLength: defaultToConfig2,\n maxBodyLength: defaultToConfig2,\n beforeRedirect: defaultToConfig2,\n transport: defaultToConfig2,\n httpAgent: defaultToConfig2,\n httpsAgent: defaultToConfig2,\n cancelToken: defaultToConfig2,\n socketPath: defaultToConfig2,\n allowedSocketPaths: defaultToConfig2,\n responseEncoding: defaultToConfig2,\n validateStatus: mergeDirectKeys,\n headers: mergeHeaders,\n};\n\n/**\n * Config-specific merge-function which creates a new config-object\n * by merging two configuration objects together.\n *\n * @param {Object} config1\n * @param {Object} config2\n *\n * @returns {Object} New object resulting from merging config2 to config1\n */\nexport default function mergeConfig(config1, config2) {\n // eslint-disable-next-line no-param-reassign\n config1 = config1 || {};\n config2 = config2 || {};\n\n // Use a null-prototype object so that downstream reads such as `config.auth`\n // or `config.baseURL` cannot inherit polluted values from Object.prototype.\n // `hasOwnProperty` is restored as a non-enumerable own slot to preserve\n // ergonomics for user code that relies on it.\n const config = Object.create(null);\n Object.defineProperty(config, 'hasOwnProperty', hasOwnPropertyDescriptor);\n\n const keys = ownEnumerableKeys({ ...config1, ...config2 });\n\n for (let i = 0, len = keys.length; i < len; i++) {\n const prop = keys[i];\n if (prop === '__proto__' || prop === 'constructor' || prop === 'prototype') continue;\n const merge = utils.hasOwnProp(mergeMap, prop) ? mergeMap[prop] : mergeDeepProperties;\n const a = utils.hasOwnProp(config1, prop) ? config1[prop] : undefined;\n const b = utils.hasOwnProp(config2, prop) ? config2[prop] : undefined;\n const configValue =\n merge === mergeDirectKeys ? merge(a, b, prop, config1, config2) : merge(a, b, prop);\n (utils.isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue);\n }\n\n if (\n utils.hasOwnProp(config2, 'validateStatus') &&\n utils.isUndefined(config2.validateStatus) &&\n getMergedTransitionalOption(config1, config2, 'validateStatusUndefinedResolves') === false\n ) {\n if (utils.hasOwnProp(config1, 'validateStatus')) {\n config.validateStatus = getMergedValue(undefined, config1.validateStatus);\n } else {\n delete config.validateStatus;\n }\n }\n\n return config;\n}\n","'use strict';\n\nimport utils from '../utils.js';\nimport AxiosError from './AxiosError.js';\n\nexport default function assertParamsAcyclic(params) {\n const pending = [{ value: params }];\n const active = new WeakSet();\n const visited = new WeakSet();\n\n while (pending.length) {\n const { value, done } = pending.pop();\n if (!utils.isPlainObject(value) && !utils.isArray(value)) continue;\n if (done) {\n active.delete(value);\n continue;\n }\n if (active.has(value)) {\n throw new AxiosError(\n 'Circular reference detected in params',\n AxiosError.ERR_BAD_OPTION_VALUE\n );\n }\n if (visited.has(value)) continue;\n visited.add(value);\n active.add(value);\n pending.push({ value, done: true });\n\n const keys = Object.keys(value);\n if (Object.getOwnPropertySymbols && Object.getOwnPropertyDescriptor) {\n Object.getOwnPropertySymbols(value).forEach((key) => {\n const descriptor = Object.getOwnPropertyDescriptor(value, key);\n if (descriptor && descriptor.enumerable) keys.push(key);\n });\n }\n // Shallow array elements retain fields filtered during plain-object merges.\n // Inspect reserved data properties without evaluating their accessors.\n keys.forEach((key) => {\n if (key === '__proto__' || key === 'constructor' || key === 'prototype') {\n const descriptor = Object.getOwnPropertyDescriptor(value, key);\n if (descriptor && utils.hasOwnProp(descriptor, 'value')) {\n pending.push({ value: descriptor.value });\n }\n } else {\n pending.push({ value: value[key] });\n }\n });\n }\n}\n","'use strict';\n\nconst FORM_DATA_CONTENT_HEADERS = ['content-type', 'content-length'];\n\n/**\n * Apply the headers generated by a FormData implementation to the request headers,\n * honoring the `formDataHeaderPolicy` option: with 'content-only', copy only the\n * content-* headers; otherwise merge all of them.\n *\n * @param {AxiosHeaders} headers - the request headers to mutate\n * @param {Object | null | undefined} formHeaders - headers produced by the FormData implementation\n * @param {String} [policy] - the resolved `formDataHeaderPolicy` config value\n *\n * @returns {void}\n */\nexport default function setFormDataHeaders(headers, formHeaders, policy) {\n if (policy !== 'content-only') {\n headers.set(formHeaders);\n return;\n }\n\n Object.entries(formHeaders || {}).forEach(([key, val]) => {\n if (FORM_DATA_CONTENT_HEADERS.includes(key.toLowerCase())) {\n headers.set(key, val);\n }\n });\n}\n","import platform from '../platform/index.js';\nimport utils from '../utils.js';\nimport AxiosError from '../core/AxiosError.js';\nimport isURLSameOrigin from './isURLSameOrigin.js';\nimport cookies from './cookies.js';\nimport buildFullPath from '../core/buildFullPath.js';\nimport mergeConfig from '../core/mergeConfig.js';\nimport AxiosHeaders from '../core/AxiosHeaders.js';\nimport setFormDataHeaders from '../core/setFormDataHeaders.js';\nimport buildURL from './buildURL.js';\n\n/**\n * Encode a UTF-8 string to a Latin-1 byte string for use with btoa().\n * This is a modern replacement for the deprecated unescape(encodeURIComponent(str)) pattern.\n *\n * @param {string} str The string to encode\n *\n * @returns {string} UTF-8 bytes as a Latin-1 string\n */\nconst encodeUTF8 = (str) =>\n encodeURIComponent(str).replace(/%([0-9A-F]{2})/gi, (_, hex) =>\n String.fromCharCode(parseInt(hex, 16))\n );\n\nconst readCookie = (name) => cookies.read(name);\n\nfunction resolveConfig(config, readXsrfCookie = readCookie) {\n const newConfig = mergeConfig({}, config);\n\n // Read only own properties to prevent prototype pollution gadgets\n // (e.g. Object.prototype.baseURL = 'https://evil.com').\n const own = (key) => (utils.hasOwnProp(newConfig, key) ? newConfig[key] : undefined);\n\n const data = own('data');\n let withXSRFToken = own('withXSRFToken');\n const xsrfHeaderName = own('xsrfHeaderName');\n const xsrfCookieName = own('xsrfCookieName');\n let headers = own('headers');\n const auth = own('auth');\n const baseURL = own('baseURL');\n const allowAbsoluteUrls = own('allowAbsoluteUrls');\n const url = own('url');\n\n newConfig.headers = headers = AxiosHeaders.from(headers);\n\n newConfig.url = buildURL(\n buildFullPath(baseURL, url, allowAbsoluteUrls, newConfig),\n own('params'),\n own('paramsSerializer')\n );\n\n // HTTP basic authentication\n if (auth) {\n const username = utils.getSafeProp(auth, 'username') || '';\n const password = utils.getSafeProp(auth, 'password') || '';\n const transitional = own('transitional');\n const encodeUsername =\n transitional &&\n utils.hasOwnProp(transitional, 'encodeBasicAuthUsername') &&\n transitional.encodeBasicAuthUsername === true;\n\n try {\n headers.set(\n 'Authorization',\n // Preserve legacy username bytes unless the caller opts in to UTF-8.\n 'Basic ' +\n btoa(\n (encodeUsername ? encodeUTF8(username) : username) +\n ':' +\n (password ? encodeUTF8(password) : '')\n )\n );\n } catch (e) {\n throw AxiosError.from(e, AxiosError.ERR_BAD_OPTION_VALUE, config);\n }\n }\n\n if (utils.isFormData(data)) {\n const getHeaders = utils.getSafeProp(data, 'getHeaders');\n\n if (\n platform.hasStandardBrowserEnv ||\n platform.hasStandardBrowserWebWorkerEnv ||\n utils.isReactNative(data)\n ) {\n headers.setContentType(undefined); // browser/web worker/RN handles it\n } else if (utils.isFunction(getHeaders)) {\n // Node.js FormData (like form-data package)\n setFormDataHeaders(headers, getHeaders.call(data), own('formDataHeaderPolicy'));\n }\n }\n\n // Add xsrf header\n // This is only done if running in a standard browser environment.\n // Specifically not if we're in a web worker, or react-native.\n\n if (platform.hasStandardBrowserEnv) {\n if (utils.isFunction(withXSRFToken)) {\n withXSRFToken = withXSRFToken(newConfig);\n }\n\n // Strict boolean check — prevents proto-pollution gadgets (e.g. Object.prototype.withXSRFToken = 1)\n // and misconfigurations (e.g. \"false\") from short-circuiting the same-origin check and leaking\n // the XSRF token cross-origin.\n const shouldSendXSRF =\n withXSRFToken === true || (withXSRFToken == null && isURLSameOrigin(newConfig.url));\n\n if (shouldSendXSRF) {\n const xsrfValue = xsrfHeaderName && xsrfCookieName && readXsrfCookie(xsrfCookieName);\n\n if (xsrfValue) {\n headers.set(xsrfHeaderName, xsrfValue);\n }\n }\n }\n\n return newConfig;\n}\n\nexport default resolveConfig;\n","import utils from '../utils.js';\nimport settle from '../core/settle.js';\nimport transitionalDefaults from '../defaults/transitional.js';\nimport AxiosError from '../core/AxiosError.js';\nimport CanceledError from '../cancel/CanceledError.js';\nimport normalizeURLForProtocolCheck from '../helpers/normalizeURLForProtocolCheck.js';\nimport parseProtocol from '../helpers/parseProtocol.js';\nimport platform from '../platform/index.js';\nimport AxiosHeaders from '../core/AxiosHeaders.js';\nimport cookies from '../helpers/cookies.js';\nimport { progressEventReducer } from '../helpers/progressEventReducer.js';\nimport resolveConfig from '../helpers/resolveConfig.js';\nimport { toByteStringHeaderObject } from '../helpers/sanitizeHeaderValue.js';\n\nconst isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined';\n\nexport default isXHRAdapterSupported &&\n function (config) {\n return new Promise(function dispatchXhrRequest(resolve, reject) {\n let useAsyncXsrf;\n try {\n const store =\n platform.hasStandardBrowserEnv && typeof window !== 'undefined' && window.cookieStore;\n useAsyncXsrf = store && utils.isFunction(store.get);\n } catch (e) {\n // A restricted Cookie Store getter must retain the synchronous fallback.\n }\n let xsrfCookieName;\n const _config = resolveConfig(\n config,\n useAsyncXsrf\n ? (name) => {\n xsrfCookieName = name;\n return null;\n }\n : undefined\n );\n let requestData = _config.data;\n const requestHeaders = AxiosHeaders.from(_config.headers).normalize();\n let { responseType, onUploadProgress, onDownloadProgress } = _config;\n let onCanceled;\n let timeoutId;\n let uploadThrottled, downloadThrottled;\n let flushUpload, flushDownload, flushDownloadWithEvent;\n\n function done() {\n clearTimeout(timeoutId);\n // A final progress callback must not prevent the remaining cleanup.\n // Report errors asynchronously, as onloadend and the throttle timer do.\n try {\n flushUpload && flushUpload(); // flush events\n } catch (err) {\n setTimeout(() => {\n throw err;\n });\n }\n try {\n flushDownload && flushDownload(); // flush events\n } catch (err) {\n setTimeout(() => {\n throw err;\n });\n }\n\n // A flush can synchronously cancel the request and reenter done().\n // In that case the inner call has already detached these listeners.\n if (request) {\n downloadThrottled && request.removeEventListener('progress', downloadThrottled);\n if (request.upload) {\n uploadThrottled && request.upload.removeEventListener('progress', uploadThrottled);\n flushUpload && request.upload.removeEventListener('loadend', flushUpload);\n }\n }\n\n _config.cancelToken && _config.cancelToken.unsubscribe(onCanceled);\n\n _config.signal && _config.signal.removeEventListener('abort', onCanceled);\n }\n\n let request = new XMLHttpRequest();\n\n request.open(_config.method.toUpperCase(), _config.url, true);\n\n // Set the request timeout in MS\n request.timeout = _config.timeout;\n\n function onloadend(event) {\n if (!request) {\n return;\n }\n\n // Status 0 means no response was received, which onerror and onabort normally\n // reject before this runs. Firefox 152 fires only readystatechange and loadend for\n // navigation-canceled requests (https://bugzilla.mozilla.org/show_bug.cgi?id=1505389),\n // leaving settle() to resolve them as an empty success. ECONNABORTED is the error\n // onabort raised on Firefox 151. Reads over file:, which some environments report as\n // status 0 on success, are excluded by the request URL's scheme after browser-style\n // preprocessing, by the page origin's scheme for relative URLs (which inherit it), or\n // by responseURL where implemented.\n if (\n request.status === 0 &&\n (parseProtocol(normalizeURLForProtocolCheck(_config.url)) ||\n parseProtocol(platform.origin)) !== 'file' &&\n !(request.responseURL && request.responseURL.startsWith('file:'))\n ) {\n reject(new AxiosError('Request aborted', AxiosError.ECONNABORTED, config, request));\n done();\n\n // Clean up request\n request = null;\n return;\n }\n\n // When loadend is still dispatching, flushing with it gives progress\n // listeners a final delivery whose event has a live target. The legacy\n // ready-state fallback has no event, so replay its pending progress.\n // A throwing listener must not block settlement; rethrow asynchronously,\n // matching how listener errors surface on the throttle timer path.\n try {\n if (event) {\n flushDownloadWithEvent && flushDownloadWithEvent(event);\n } else {\n flushDownload && flushDownload();\n }\n } catch (err) {\n setTimeout(() => {\n throw err;\n });\n }\n\n // A final progress callback can cancel the request synchronously.\n if (!request) {\n return;\n }\n\n // Prepare the response\n const responseHeaders = AxiosHeaders.from(\n 'getAllResponseHeaders' in request && request.getAllResponseHeaders()\n );\n const responseData =\n !responseType || responseType === 'text' || responseType === 'json'\n ? request.responseText\n : request.response;\n const response = {\n data: responseData,\n status: request.status,\n statusText: request.statusText,\n headers: responseHeaders,\n config,\n request,\n };\n\n settle(\n function _resolve(value) {\n resolve(value);\n done();\n },\n function _reject(err) {\n reject(err);\n done();\n },\n response\n );\n\n // Clean up request\n request = null;\n }\n\n if ('onloadend' in request) {\n // Use onloadend if available\n request.onloadend = onloadend;\n } else {\n // Listen for ready state to emulate onloadend\n request.onreadystatechange = function handleLoad() {\n if (!request || request.readyState !== 4) {\n return;\n }\n\n // The request errored out and we didn't get a response, this will be\n // handled by onerror instead\n // With one exception: request that using file: protocol, most browsers\n // will return status as 0 even though it's a successful request\n if (\n request.status === 0 &&\n !(request.responseURL && request.responseURL.startsWith('file:'))\n ) {\n return;\n }\n // readystate handler is calling before onerror or ontimeout handlers,\n // so we should call onloadend on the next 'tick'\n setTimeout(onloadend);\n };\n }\n\n // Handle browser request cancellation (as opposed to a manual cancellation)\n request.onabort = function handleAbort() {\n if (!request) {\n return;\n }\n\n reject(new AxiosError('Request aborted', AxiosError.ECONNABORTED, config, request));\n done();\n\n // Clean up request\n request = null;\n };\n\n // Handle low level network errors\n request.onerror = function handleError(event) {\n // Browsers deliver a ProgressEvent in XHR onerror\n // (message may be empty; when present, surface it)\n // See https://developer.mozilla.org/docs/Web/API/XMLHttpRequest/error_event\n const msg = event && event.message ? event.message : 'Network Error';\n const err = new AxiosError(msg, AxiosError.ERR_NETWORK, config, request);\n // attach the underlying event for consumers who want details\n err.event = event || null;\n reject(err);\n done();\n request = null;\n };\n\n // Handle timeout\n request.ontimeout = function handleTimeout() {\n if (!request) return;\n let timeoutErrorMessage = _config.timeout\n ? 'timeout of ' + _config.timeout + 'ms exceeded'\n : 'timeout exceeded';\n const transitional = _config.transitional || transitionalDefaults;\n if (_config.timeoutErrorMessage) {\n timeoutErrorMessage = _config.timeoutErrorMessage;\n }\n reject(\n new AxiosError(\n timeoutErrorMessage,\n transitional.clarifyTimeoutError ? AxiosError.ETIMEDOUT : AxiosError.ECONNABORTED,\n config,\n request\n )\n );\n done();\n\n // Clean up request\n request = null;\n };\n\n // Remove Content-Type if data is undefined\n requestData === undefined && requestHeaders.setContentType(null);\n\n // Add withCredentials to request if needed\n if (!utils.isUndefined(_config.withCredentials)) {\n request.withCredentials = !!_config.withCredentials;\n }\n\n // Add responseType to request if needed\n if (responseType && responseType !== 'json') {\n request.responseType = _config.responseType;\n }\n\n // Handle progress if needed\n if (onDownloadProgress) {\n [downloadThrottled, flushDownload, flushDownloadWithEvent] = progressEventReducer(\n onDownloadProgress,\n true\n );\n request.addEventListener('progress', downloadThrottled);\n }\n\n // Not all browsers support upload events\n if (onUploadProgress && request.upload) {\n [uploadThrottled, flushUpload] = progressEventReducer(onUploadProgress);\n\n request.upload.addEventListener('progress', uploadThrottled);\n\n request.upload.addEventListener('loadend', flushUpload);\n }\n\n if (_config.cancelToken || _config.signal) {\n // Handle cancellation\n // eslint-disable-next-line func-names\n onCanceled = (cancel) => {\n if (!request) {\n return;\n }\n reject(!cancel || cancel.type ? new CanceledError(null, config, request) : cancel);\n const xhr = request;\n done();\n request = null;\n xhr.abort();\n };\n\n _config.cancelToken && _config.cancelToken.subscribe(onCanceled);\n if (!request) return;\n if (_config.signal) {\n _config.signal.aborted\n ? onCanceled()\n : _config.signal.addEventListener('abort', onCanceled);\n }\n }\n\n if (!request) return;\n\n const protocol = parseProtocol(_config.url);\n\n if (protocol && !platform.protocols.includes(protocol)) {\n reject(\n new AxiosError(\n 'Unsupported protocol ' + protocol + ':',\n AxiosError.ERR_BAD_REQUEST,\n config\n )\n );\n done();\n return;\n }\n\n const sendRequest = () => {\n if (!request) return;\n // Apply headers after an asynchronous XSRF read so existing headers are\n // replaced through AxiosHeaders rather than appended by the native XHR.\n if ('setRequestHeader' in request) {\n utils.forEach(\n toByteStringHeaderObject(requestHeaders),\n function setRequestHeader(val, key) {\n request.setRequestHeader(key, val);\n }\n );\n }\n request.send(requestData || null);\n };\n\n if (xsrfCookieName) {\n // Native XHR timeout starts at send(). Cover cookie preparation and the\n // subsequent request with the same budget and existing timeout handler.\n const now =\n typeof performance !== 'undefined' && utils.isFunction(performance.now)\n ? () => performance.now()\n : Date.now;\n const deadline = request.timeout > 0 ? now() + Number(request.timeout) : undefined;\n const abortOnTimeout = () => {\n if (!request) return;\n const xhr = request;\n xhr.ontimeout();\n xhr.abort();\n };\n if (deadline !== undefined) {\n const scheduleTimeout = () => {\n const remaining = deadline - now();\n if (remaining > 0) {\n // Browser timers overflow above the signed 32-bit delay limit.\n timeoutId = setTimeout(scheduleTimeout, Math.min(remaining, 0x7fffffff));\n } else {\n abortOnTimeout();\n }\n };\n scheduleTimeout();\n }\n\n cookies\n .readAsync(xsrfCookieName)\n .then((value) => {\n if (!request) return;\n // Promise callbacks may run before an overdue timer after a busy task.\n if (deadline !== undefined && now() >= deadline) {\n abortOnTimeout();\n return;\n }\n if (value) {\n const headerName =\n utils.hasOwnProp(_config, 'xsrfHeaderName') && _config.xsrfHeaderName;\n requestHeaders.set(headerName, value);\n }\n sendRequest();\n })\n .catch((error) => {\n if (!request) return;\n reject(AxiosError.from(error, null, config, request));\n done();\n request = null;\n });\n } else {\n sendRequest();\n }\n });\n };\n","import CanceledError from '../cancel/CanceledError.js';\nimport AxiosError from '../core/AxiosError.js';\nimport utils from '../utils.js';\n\nconst composeSignals = (signals, timeout) => {\n signals = signals ? signals.filter(Boolean) : [];\n\n if (!timeout && !signals.length) {\n return;\n }\n\n const controller = new AbortController();\n\n let aborted = false;\n\n const onabort = function (reason) {\n if (!aborted) {\n aborted = true;\n unsubscribe();\n const err = reason instanceof Error ? reason : this.reason;\n controller.abort(\n err instanceof AxiosError\n ? err\n : new CanceledError(err instanceof Error ? err.message : err)\n );\n }\n };\n\n let timer =\n timeout &&\n setTimeout(() => {\n timer = null;\n onabort(new AxiosError(`timeout of ${timeout}ms exceeded`, AxiosError.ETIMEDOUT));\n }, timeout);\n\n const unsubscribe = () => {\n if (!signals) {\n return;\n }\n timer && clearTimeout(timer);\n timer = null;\n signals.forEach((signal) => {\n const unsubscribeSignal = utils.getSafeProp(signal, 'unsubscribe');\n utils.isFunction(unsubscribeSignal)\n ? unsubscribeSignal.call(signal, onabort)\n : signal.removeEventListener('abort', onabort);\n });\n signals = null;\n };\n\n signals.forEach((signal) => {\n if (aborted) {\n return;\n }\n\n if (signal.aborted) {\n onabort.call(signal);\n return;\n }\n\n signal.addEventListener('abort', onabort, { once: true });\n });\n\n const { signal } = controller;\n\n signal.unsubscribe = () => utils.asap(unsubscribe);\n\n return signal;\n};\n\nexport default composeSignals;\n","export const streamChunk = function* (chunk, chunkSize) {\n let len = chunk.byteLength;\n\n if (!chunkSize || len < chunkSize) {\n yield chunk;\n return;\n }\n\n let pos = 0;\n let end;\n\n while (pos < len) {\n end = pos + chunkSize;\n yield chunk.slice(pos, end);\n pos = end;\n }\n};\n\nexport const readBytes = async function* (iterable, chunkSize) {\n for await (const chunk of readStream(iterable)) {\n yield* streamChunk(chunk, chunkSize);\n }\n};\n\nconst readStream = async function* (stream) {\n if (stream[Symbol.asyncIterator]) {\n yield* stream;\n return;\n }\n\n const reader = stream.getReader();\n try {\n for (;;) {\n const { done, value } = await reader.read();\n if (done) {\n break;\n }\n yield value;\n }\n } finally {\n await reader.cancel();\n }\n};\n\nexport const trackStream = (stream, chunkSize, onProgress, onFinish) => {\n const iterator = readBytes(stream, chunkSize);\n\n let bytes = 0;\n let done;\n let _onFinish = (e) => {\n if (!done) {\n done = true;\n onFinish && onFinish(e);\n }\n };\n\n return new ReadableStream(\n {\n async pull(controller) {\n try {\n const { done, value } = await iterator.next();\n\n if (done) {\n _onFinish();\n controller.close();\n return;\n }\n\n let len = value.byteLength;\n if (onProgress) {\n let loadedBytes = (bytes += len);\n onProgress(loadedBytes);\n }\n controller.enqueue(new Uint8Array(value));\n } catch (err) {\n _onFinish(err);\n throw err;\n }\n },\n cancel(reason) {\n _onFinish(reason);\n return iterator.return();\n },\n },\n {\n highWaterMark: 2,\n }\n );\n};\n","import utils from '../utils.js';\n\nconst CRLF = '\\r\\n';\nconst normalizeLines = (value) => String(value).replace(/\\r\\n|\\r|\\n/g, CRLF);\nconst escapeName = (value) =>\n String(value).replace(/[\\r\\n\"]/g, (char) =>\n char === '\\r' ? '%0D' : char === '\\n' ? '%0A' : '%22'\n );\n\n// Count UTF-8 bytes without allocating an encoded copy of a field. FormData\n// string values normalize line endings; Blob/File contents remain unchanged.\nconst stringBytes = (value, normalize) => {\n let length = 0;\n for (let i = 0; i < value.length; i++) {\n const code = value.charCodeAt(i);\n if (normalize && (code === 13 || code === 10)) {\n if (code === 13 && value.charCodeAt(i + 1) === 10) i++;\n length += 2;\n } else if (code < 0x80) {\n length++;\n } else if (code < 0x800) {\n length += 2;\n } else if (\n code >= 0xd800 &&\n code <= 0xdbff &&\n value.charCodeAt(i + 1) >= 0xdc00 &&\n value.charCodeAt(i + 1) <= 0xdfff\n ) {\n length += 4;\n i++;\n } else {\n length += 3;\n }\n }\n return length;\n};\n\n// Describe serialization failures independently of any request library.\nexport class FormDataError extends TypeError {\n constructor(message, reason) {\n super(message);\n this.name = 'FormDataError';\n this.reason = reason;\n }\n}\n\n// The caller supplies the boundary, Blob implementation, and limit error.\nexport default function formDataToBlob(form, Blob, limit, limitError, boundary) {\n if (!utils.isFunction(Blob)) {\n throw new FormDataError('Blob is not supported', 'blob');\n }\n\n if (\n !utils.isString(boundary) ||\n !/^[A-Za-z0-9'()+_,./:=? -]{1,70}$/.test(boundary) ||\n / $/.test(boundary)\n ) {\n throw new FormDataError('Invalid multipart boundary', 'boundary');\n }\n const footer = '--' + boundary + '--' + CRLF;\n let length = footer.length;\n const parts = [];\n const checkLength = (extra) => {\n if (length + extra > limit) throw limitError();\n };\n checkLength(0);\n\n for (const [name, value] of form) {\n const isString = utils.isString(value);\n const valueLength = isString ? stringBytes(value, true) : value.size;\n if (!Number.isFinite(valueLength) || valueLength < 0) {\n throw new FormDataError('Unsupported FormData part size', 'part');\n }\n // Reject large values and names before building normalized header strings.\n checkLength(\n valueLength +\n stringBytes(name, true) +\n (!isString && value.name ? stringBytes(value.name, false) : 0) +\n (!isString && value.type ? stringBytes(value.type, false) : 0)\n );\n\n let header =\n '--' +\n boundary +\n CRLF +\n 'Content-Disposition: form-data; name=\"' +\n escapeName(normalizeLines(name)) +\n '\"';\n if (!isString) {\n header +=\n '; filename=\"' +\n escapeName(utils.isString(value.name) ? value.name : 'blob') +\n '\"' +\n CRLF +\n 'Content-Type: ' +\n String(value.type || 'application/octet-stream').replace(/[\\r\\n]/g, '');\n }\n header += CRLF + CRLF;\n const partLength = stringBytes(header, false) + valueLength + CRLF.length;\n checkLength(partLength);\n length += partLength;\n parts.push({ header, value, isString });\n }\n\n // Native Blob composition retains existing Blob/File data. No file is read\n // and no complete multipart ArrayBuffer is created to determine its length.\n const blobParts = [];\n for (const part of parts) {\n blobParts.push(part.header, part.isString ? normalizeLines(part.value) : part.value, CRLF);\n }\n blobParts.push(footer);\n return new Blob(blobParts, { type: 'multipart/form-data; boundary=' + boundary });\n}\n","import utils from '../utils.js';\nimport platform from '../platform/index.js';\nimport AxiosError from './AxiosError.js';\nimport formDataToBlob, { FormDataError } from '../helpers/formDataToBlob.js';\n\nexport default function createMultipartBody(form, Blob, limit, limitError, boundary) {\n // Report missing Blob support before trying to select a random source.\n if (!utils.isFunction(Blob)) {\n throw new AxiosError('Blob is not supported', AxiosError.ERR_NOT_SUPPORT);\n }\n\n if (boundary === undefined) {\n if (utils.isFunction(platform.generateString)) {\n boundary = 'axios-' + platform.generateString(36, '0123456789abcdef');\n } else {\n const crypto = utils.global.crypto;\n if (!crypto || !utils.isFunction(crypto.getRandomValues)) {\n throw new AxiosError('Random byte generation is not supported', AxiosError.ERR_NOT_SUPPORT);\n }\n const random = new Uint8Array(18);\n crypto.getRandomValues(random);\n boundary =\n 'axios-' + Array.from(random, (value) => ('0' + value.toString(16)).slice(-2)).join('');\n }\n }\n\n try {\n return formDataToBlob(form, Blob, limit, limitError, boundary);\n } catch (error) {\n if (error instanceof FormDataError) {\n const code =\n error.reason === 'boundary' ? AxiosError.ERR_BAD_OPTION_VALUE : AxiosError.ERR_BAD_REQUEST;\n throw new AxiosError(error.message, code);\n }\n throw error;\n }\n}\n","/**\n * Estimate data: URL byte lengths *without* allocating large buffers.\n * - Fetch percent-decodes a base64 body before decoding it.\n * - Node's Buffer.from(body, 'base64') sizes its backing allocation from the\n * percent-decoded body, including ignored characters and content after padding.\n * - Non-base64 data is percent-decoded and then encoded as UTF-8.\n */\nconst isHexDigit = (charCode) =>\n (charCode >= 48 && charCode <= 57) ||\n (charCode >= 65 && charCode <= 70) ||\n (charCode >= 97 && charCode <= 102);\n\nconst isPercentEncodedByte = (str, i, len) =>\n i + 2 < len && isHexDigit(str.charCodeAt(i + 1)) && isHexDigit(str.charCodeAt(i + 2));\n\nconst hexValue = (charCode) => (charCode <= 57 ? charCode - 48 : (charCode & 0xdf) - 55);\n\nconst isBase64Char = (charCode) =>\n (charCode >= 65 && charCode <= 90) || // A-Z\n (charCode >= 97 && charCode <= 122) || // a-z\n (charCode >= 48 && charCode <= 57) || // 0-9\n charCode === 43 || // +\n charCode === 47 || // /\n charCode === 45 || // - (base64url)\n charCode === 95; // _ (base64url)\n\nconst isBase64Whitespace = (charCode) =>\n charCode === 9 || charCode === 10 || charCode === 12 || charCode === 13 || charCode === 32;\n\nconst base64Bytes = (significant) => {\n const groups = Math.floor(significant / 4);\n const remainder = significant % 4;\n return groups * 3 + (remainder === 2 ? 1 : remainder === 3 ? 2 : 0);\n};\n\n// Buffer.byteLength(body, 'base64') uses the raw string length as an allocation\n// upper bound even when Buffer.from later ignores characters or stops at '='.\nconst estimateBase64BufferAllocation = (body) => {\n const len = body.length;\n let padding = 0;\n\n if (len > 0 && body.charCodeAt(len - 1) === 61 /* '=' */) {\n padding++;\n\n if (len > 1 && body.charCodeAt(len - 2) === 61 /* '=' */) {\n padding++;\n }\n }\n\n return Math.floor(((len - padding) * 3) / 4);\n};\n\nconst estimatePercentDecodedBase64BufferAllocation = (body) => {\n // Ordinary Base64 needs only its length and trailing padding.\n if (body.indexOf('%') === -1) {\n return estimateBase64BufferAllocation(body);\n }\n\n let length = 0;\n let previous = 0;\n let last = 0;\n\n for (let i = 0, len = body.length; i < len; i++) {\n let code = body.charCodeAt(i);\n if (code === 37 /* '%' */ && isPercentEncodedByte(body, i, len)) {\n code = hexValue(body.charCodeAt(i + 1)) * 16 + hexValue(body.charCodeAt(i + 2));\n i += 2;\n }\n length++;\n previous = last;\n last = code;\n }\n\n const padding = last === 61 ? (previous === 61 ? 2 : 1) : 0;\n return Math.floor(((length - padding) * 3) / 4);\n};\n\nconst estimatePercentDecodedBase64Bytes = (body) => {\n const len = body.length;\n let significant = 0;\n let padding = 0;\n let invalid = false;\n\n for (let i = 0; i < len; i++) {\n let code = body.charCodeAt(i);\n\n if (code === 37 /* '%' */ && isPercentEncodedByte(body, i, len)) {\n code = hexValue(body.charCodeAt(i + 1)) * 16 + hexValue(body.charCodeAt(i + 2));\n i += 2;\n }\n\n if (isBase64Whitespace(code)) {\n continue;\n }\n\n if (code === 61 /* '=' */) {\n padding++;\n continue;\n }\n\n if (!isBase64Char(code) || padding > 0) {\n invalid = true;\n continue;\n }\n\n significant++;\n }\n\n // Fetch rejects malformed forgiving-base64 input. Returning the raw-size\n // allocation bound keeps that invalid input from becoming a pre-check bypass.\n if (\n invalid ||\n padding > 2 ||\n (padding > 0 && (significant + padding) % 4 !== 0) ||\n significant % 4 === 1\n ) {\n return estimateBase64BufferAllocation(body);\n }\n\n return base64Bytes(significant);\n};\n\nconst estimateDataURLBytes = (url, estimateBase64, base64Pattern) => {\n if (!url || typeof url !== 'string') return 0;\n if (!/^data:/i.test(url)) return 0;\n\n const comma = url.indexOf(',');\n if (comma < 0) return 0;\n\n const meta = url.slice(5, comma);\n const body = url.slice(comma + 1);\n const isBase64 = base64Pattern.test(meta);\n\n if (isBase64) {\n return estimateBase64(body);\n }\n\n // Compute UTF-8 byte length directly from UTF-16 code units without allocating\n // a byte buffer (TextEncoder.encode would defeat the DoS guard on large bodies).\n // Valid %XX triplets count as one decoded byte; this matches the bytes that\n // decodeURIComponent(body) would produce before Buffer re-encodes the string.\n let bytes = 0;\n for (let i = 0, len = body.length; i < len; i++) {\n const c = body.charCodeAt(i);\n if (c === 37 /* '%' */ && isPercentEncodedByte(body, i, len)) {\n bytes += 1;\n i += 2;\n } else if (c < 0x80) {\n bytes += 1;\n } else if (c < 0x800) {\n bytes += 2;\n } else if (c >= 0xd800 && c <= 0xdbff && i + 1 < len) {\n const next = body.charCodeAt(i + 1);\n if (next >= 0xdc00 && next <= 0xdfff) {\n bytes += 4;\n i++;\n } else {\n bytes += 3;\n }\n } else {\n bytes += 3;\n }\n }\n return bytes;\n};\n\n/**\n * Estimate the percent-decoded payload size used by Fetch data: URLs.\n *\n * @param {string} url\n * @returns {number}\n */\nexport default function estimateDataURLDecodedBytes(url) {\n // Fetch removes URL fragments before processing a data: URL.\n const fragmentIndex = typeof url === 'string' ? url.indexOf('#') : -1;\n\n return estimateDataURLBytes(\n fragmentIndex === -1 ? url : url.slice(0, fragmentIndex),\n estimatePercentDecodedBase64Bytes,\n /; *base64[\\t\\n\\f\\r ]*$/i\n );\n}\n\n/**\n * Estimate the Buffer backing allocation used after Node's percent-decoding step.\n *\n * @param {string} url\n * @returns {number}\n */\nexport function estimateDataURLBufferAllocation(url) {\n // Match fromDataURI's case-insensitive protocol and encoding suffix.\n return estimateDataURLBytes(url, estimatePercentDecodedBase64BufferAllocation, /;base64$/i);\n}\n","export const VERSION = \"1.21.1\";","import platform from '../platform/index.js';\nimport utils from '../utils.js';\nimport AxiosError from '../core/AxiosError.js';\nimport composeSignals from '../helpers/composeSignals.js';\nimport { trackStream } from '../helpers/trackStream.js';\nimport createMultipartBody from '../core/createMultipartBody.js';\nimport AxiosHeaders from '../core/AxiosHeaders.js';\nimport {\n progressEventReducer,\n progressEventDecorator,\n asyncDecorator,\n} from '../helpers/progressEventReducer.js';\nimport resolveConfig from '../helpers/resolveConfig.js';\nimport settle from '../core/settle.js';\nimport estimateDataURLDecodedBytes from '../helpers/estimateDataURLDecodedBytes.js';\nimport { VERSION } from '../env/data.js';\nimport { toByteStringHeaderObject } from '../helpers/sanitizeHeaderValue.js';\n\nconst DEFAULT_CHUNK_SIZE = 64 * 1024;\n\nconst DEFAULT_REQUEST_OPTIONS = {\n cache: 'default',\n redirect: 'follow',\n referrer: 'about:client',\n referrerPolicy: '',\n mode: 'cors',\n integrity: '',\n keepalive: false,\n priority: 'auto',\n window: null,\n};\n\nconst { isFunction } = utils;\n\n/**\n * Encode a UTF-8 string to a Latin-1 byte string for use with btoa().\n * This is a modern replacement for the deprecated unescape(encodeURIComponent(str)) pattern.\n *\n * @param {string} str The string to encode\n *\n * @returns {string} UTF-8 bytes as a Latin-1 string\n */\nconst encodeUTF8 = (str) =>\n encodeURIComponent(str).replace(/%([0-9A-F]{2})/gi, (_, hex) =>\n String.fromCharCode(parseInt(hex, 16))\n );\n\n// Node's WHATWG URL parser returns `username` and `password` percent-encoded.\n// Decode before composing the `auth` option so credentials such as\n// `my%40email.com:pass` are sent as `my@email.com:pass`. Falls back to the\n// original value for malformed input so a bad encoding never throws.\nconst decodeURIComponentSafe = (value) => {\n if (!utils.isString(value)) {\n return value;\n }\n\n try {\n return decodeURIComponent(value);\n } catch (error) {\n return value;\n }\n};\n\nconst test = (fn, ...args) => {\n try {\n return !!fn(...args);\n } catch (e) {\n return false;\n }\n};\n\nconst maybeWithAuthCredentials = (url) => {\n const protocolIndex = url.indexOf('://');\n let urlToCheck = url;\n if (protocolIndex !== -1) {\n urlToCheck = urlToCheck.slice(protocolIndex + 3);\n }\n return urlToCheck.includes('@') || urlToCheck.includes(':');\n};\n\nconst factory = (env) => {\n const globalObject =\n utils.global !== undefined && utils.global !== null ? utils.global : globalThis;\n const { ReadableStream, TextEncoder } = globalObject;\n\n env = utils.merge.call(\n {\n skipUndefined: true,\n },\n {\n Request: globalObject.Request,\n Response: globalObject.Response,\n Blob: globalObject.Blob,\n },\n env\n );\n\n const envFetch = utils.hasOwnProp(env, 'fetch') ? env.fetch : undefined;\n const { Request, Response, Blob } = env;\n const isFetchSupported = envFetch ? isFunction(envFetch) : typeof fetch === 'function';\n const isRequestSupported = isFunction(Request);\n const isResponseSupported = isFunction(Response);\n\n if (!isFetchSupported) {\n return false;\n }\n\n const isReadableStreamSupported = isFetchSupported && isFunction(ReadableStream);\n\n const encodeText =\n isFetchSupported &&\n (typeof TextEncoder === 'function'\n ? (\n (encoder) => (str) =>\n encoder.encode(str)\n )(new TextEncoder())\n : async (str) => new Uint8Array(await new Request(str).arrayBuffer()));\n\n const supportsRequestStream =\n isRequestSupported &&\n isReadableStreamSupported &&\n test(() => {\n let duplexAccessed = false;\n\n const request = new Request(platform.origin, {\n body: new ReadableStream(),\n method: 'POST',\n get duplex() {\n duplexAccessed = true;\n return 'half';\n },\n });\n\n const hasContentType = request.headers.has('Content-Type');\n\n if (request.body != null) {\n request.body.cancel();\n }\n\n return duplexAccessed && !hasContentType;\n });\n\n const supportsResponseStream =\n isResponseSupported &&\n isReadableStreamSupported &&\n test(() => utils.isReadableStream(new Response('').body));\n\n // Some runtimes reject every explicit cache mode. Use own defaults for both\n // probes so unrelated polluted options cannot affect cache-mode detection.\n const requestDefaults = Object.assign(Object.create(null), DEFAULT_REQUEST_OPTIONS);\n\n if (isRequestSupported && !test(() => new Request(platform.origin, requestDefaults))) {\n delete requestDefaults.cache;\n\n // Only omit cache when that makes Request construction succeed. Otherwise\n // retain the explicit default that protects supporting runtimes from pollution.\n if (!test(() => new Request(platform.origin, requestDefaults))) {\n requestDefaults.cache = DEFAULT_REQUEST_OPTIONS.cache;\n }\n }\n\n const resolvers = {\n stream: supportsResponseStream && ((res) => res.body),\n };\n\n isFetchSupported &&\n (() => {\n ['text', 'arrayBuffer', 'blob', 'formData', 'stream'].forEach((type) => {\n !resolvers[type] &&\n (resolvers[type] = (res, config) => {\n let method = res && res[type];\n\n if (method) {\n return method.call(res);\n }\n\n throw new AxiosError(\n `Response type '${type}' is not supported`,\n AxiosError.ERR_NOT_SUPPORT,\n config\n );\n });\n });\n })();\n\n const getBodyLength = async (body) => {\n if (body == null) {\n return 0;\n }\n\n if (utils.isBlob(body)) {\n return body.size;\n }\n\n if (utils.isArrayBufferView(body) || utils.isArrayBuffer(body)) {\n return body.byteLength;\n }\n\n if (utils.isURLSearchParams(body)) {\n body = body + '';\n }\n\n if (utils.isString(body)) {\n return (await encodeText(body)).byteLength;\n }\n };\n\n const resolveBodyLength = async (headers, body) => {\n const length = utils.toFiniteNumber(headers.getContentLength());\n\n return length == null ? getBodyLength(body) : length;\n };\n\n return async (config) => {\n let {\n url,\n method,\n data,\n signal,\n cancelToken,\n timeout,\n onDownloadProgress,\n onUploadProgress,\n responseType,\n headers,\n withCredentials = 'same-origin',\n fetchOptions,\n maxContentLength,\n maxBodyLength,\n maxRedirects,\n } = resolveConfig(config);\n\n const hasMaxContentLength = utils.isNumber(maxContentLength) && maxContentLength > -1;\n const hasMaxBodyLength = utils.isNumber(maxBodyLength) && maxBodyLength > -1;\n const own = (key) => (utils.hasOwnProp(config, key) ? config[key] : undefined);\n\n let _fetch = envFetch || fetch;\n\n responseType = responseType ? (responseType + '').toLowerCase() : 'text';\n\n let composedSignal = composeSignals(\n [signal, cancelToken && cancelToken.toAbortSignal()],\n timeout\n );\n\n let request = null;\n\n const unsubscribe =\n composedSignal &&\n composedSignal.unsubscribe &&\n (() => {\n composedSignal.unsubscribe();\n });\n\n let requestContentLength;\n\n // AxiosErrors we raise while request or response bodies are being streamed. Captured\n // by identity so the catch block can surface it directly, regardless of\n // how the runtime wraps the resulting fetch rejection (undici exposes it\n // as `err.cause`; some browsers drop the original error entirely).\n let pendingBodyError = null;\n let pendingResponseError = null;\n\n const maxBodyLengthError = () =>\n new AxiosError(\n 'Request body larger than maxBodyLength limit',\n AxiosError.ERR_BAD_REQUEST,\n config,\n request\n );\n\n try {\n // HTTP basic authentication\n let auth = undefined;\n const configAuth = own('auth');\n\n if (configAuth) {\n const username = utils.getSafeProp(configAuth, 'username') || '';\n const password = utils.getSafeProp(configAuth, 'password') || '';\n auth = {\n username,\n password,\n };\n }\n\n let parsedURL;\n if (maybeWithAuthCredentials(url)) {\n parsedURL = new URL(url, platform.origin);\n\n if (!auth && (parsedURL.username || parsedURL.password)) {\n const urlUsername = decodeURIComponentSafe(parsedURL.username);\n const urlPassword = decodeURIComponentSafe(parsedURL.password);\n auth = {\n username: urlUsername,\n password: urlPassword,\n };\n }\n\n if (parsedURL.username || parsedURL.password) {\n parsedURL.username = '';\n parsedURL.password = '';\n url = parsedURL.href;\n }\n }\n\n if (auth) {\n headers.delete('authorization');\n headers.set(\n 'Authorization',\n 'Basic ' + btoa(encodeUTF8((auth.username || '') + ':' + (auth.password || '')))\n );\n }\n\n // Enforce maxContentLength for data: URLs up-front so we never materialize\n // an oversized payload. The HTTP adapter applies the same check (see http.js\n // \"if (protocol === 'data:')\" branch).\n if (hasMaxContentLength && parsedURL && parsedURL.protocol === 'data:') {\n const estimated = estimateDataURLDecodedBytes(parsedURL.href);\n if (estimated > maxContentLength) {\n throw new AxiosError(\n 'maxContentLength size of ' + maxContentLength + ' exceeded',\n AxiosError.ERR_BAD_RESPONSE,\n config,\n request\n );\n }\n }\n\n const formContentType =\n utils.isSpecCompliantForm(data) && AxiosHeaders.from(own('headers')).getContentType();\n let formBoundary;\n if (\n utils.isString(formContentType) &&\n /^multipart\\/form-data(?:\\s*;|$)/i.test(formContentType.trim())\n ) {\n const parameters = AxiosHeaders.parseParameters(formContentType);\n if (utils.hasOwnProp(parameters, 'boundary')) formBoundary = parameters.boundary;\n }\n\n if (\n utils.isSpecCompliantForm(data) &&\n method !== 'get' &&\n method !== 'head' &&\n (hasMaxBodyLength ||\n (onUploadProgress && supportsRequestStream) ||\n formBoundary !== undefined)\n ) {\n data = createMultipartBody(\n data,\n Blob,\n hasMaxBodyLength ? maxBodyLength : Infinity,\n maxBodyLengthError,\n formBoundary\n );\n // Blob.type lowercases its value, including a case-sensitive boundary.\n // Retain the caller's header when an explicit boundary was serialized.\n headers.setContentType(formBoundary === undefined ? data.type : formContentType);\n requestContentLength = data.size;\n }\n\n // Enforce maxBodyLength against known-size bodies before dispatch using\n // the body's *actual* size — never a caller-declared Content-Length,\n // which could under-report to slip an oversized body past the check.\n // Unknown-size streams return undefined here and are counted per-chunk\n // below as fetch consumes them.\n if (hasMaxBodyLength && method !== 'get' && method !== 'head') {\n const outboundLength = await getBodyLength(data);\n if (typeof outboundLength === 'number' && isFinite(outboundLength)) {\n requestContentLength = outboundLength;\n if (outboundLength > maxBodyLength) {\n throw maxBodyLengthError();\n }\n }\n }\n\n // A streamed body under maxBodyLength must be counted as fetch consumes\n // it; its size is never trusted from a caller-declared Content-Length.\n const mustEnforceStreamBody =\n hasMaxBodyLength && (utils.isReadableStream(data) || utils.isStream(data));\n\n const trackRequestStream = (stream, onProgress, flush) =>\n trackStream(\n stream,\n DEFAULT_CHUNK_SIZE,\n (loadedBytes) => {\n if (hasMaxBodyLength && loadedBytes > maxBodyLength) {\n throw (pendingBodyError = maxBodyLengthError());\n }\n onProgress && onProgress(loadedBytes);\n },\n flush\n );\n\n if (\n supportsRequestStream &&\n method !== 'get' &&\n method !== 'head' &&\n (onUploadProgress || mustEnforceStreamBody)\n ) {\n requestContentLength =\n requestContentLength == null\n ? await resolveBodyLength(headers, data)\n : requestContentLength;\n\n // A declared length of 0 is only trusted to skip the wrap when we are\n // not enforcing a stream limit (which must not rely on that header).\n if (requestContentLength !== 0 || mustEnforceStreamBody) {\n let _request = new Request(url, {\n method: 'POST',\n body: data,\n duplex: 'half',\n });\n\n let contentTypeHeader;\n\n if (\n utils.isFormData(data) &&\n (contentTypeHeader = _request.headers.get('content-type'))\n ) {\n headers.setContentType(contentTypeHeader);\n }\n\n if (_request.body) {\n const [onProgress, flush] =\n (onUploadProgress &&\n progressEventDecorator(\n requestContentLength,\n progressEventReducer(asyncDecorator(onUploadProgress))\n )) ||\n [];\n\n data = trackRequestStream(_request.body, onProgress, flush);\n }\n }\n } else if (\n mustEnforceStreamBody &&\n !isRequestSupported &&\n isReadableStreamSupported &&\n method !== 'get' &&\n method !== 'head'\n ) {\n data = trackRequestStream(data);\n } else if (\n mustEnforceStreamBody &&\n isRequestSupported &&\n !supportsRequestStream &&\n method !== 'get' &&\n method !== 'head'\n ) {\n throw new AxiosError(\n 'Stream request bodies are not supported by the current fetch implementation',\n AxiosError.ERR_NOT_SUPPORT,\n config,\n request\n );\n }\n\n if (!utils.isString(withCredentials)) {\n withCredentials = withCredentials ? 'include' : 'omit';\n }\n\n // Cloudflare Workers throws when credentials are defined\n // see https://github.com/cloudflare/workerd/issues/902\n const isCredentialsSupported = isRequestSupported && 'credentials' in Request.prototype;\n\n // If data is FormData and Content-Type is multipart/form-data without boundary,\n // delete it so fetch can set it correctly with the boundary\n if (utils.isFormData(data)) {\n const contentType = headers.getContentType();\n if (\n contentType &&\n /^multipart\\/form-data/i.test(contentType) &&\n !/boundary=/i.test(contentType)\n ) {\n headers.delete('content-type');\n }\n }\n\n // Set User-Agent header if not already set (fetch defaults to 'node' in Node.js)\n headers.set('User-Agent', 'axios/' + VERSION, false);\n\n const safeFetchOptions =\n fetchOptions == null ? fetchOptions : Object.assign(Object.create(null), fetchOptions);\n\n if (safeFetchOptions) {\n // These options are owned by Axios and are already reflected in the\n // resolved Request passed to fetch.\n delete safeFetchOptions.body;\n delete safeFetchOptions.headers;\n delete safeFetchOptions.method;\n delete safeFetchOptions.signal;\n delete safeFetchOptions.duplex;\n delete safeFetchOptions.credentials;\n }\n\n const resolvedOptions = Object.assign(Object.create(null), safeFetchOptions, {\n signal: composedSignal,\n method: method.toUpperCase(),\n headers: toByteStringHeaderObject(headers.normalize()),\n body: data,\n duplex: 'half',\n credentials: isCredentialsSupported ? withCredentials : undefined,\n });\n\n if (isRequestSupported) {\n utils.forEach(requestDefaults, (value, key) => {\n if (resolvedOptions[key] === undefined) {\n resolvedOptions[key] = value;\n }\n });\n\n if (resolvedOptions.signal === undefined) {\n resolvedOptions.signal = null;\n }\n\n if (resolvedOptions.body === undefined) {\n resolvedOptions.body = null;\n }\n }\n\n if (maxRedirects === 0) {\n resolvedOptions.redirect = 'manual';\n\n if (safeFetchOptions) {\n safeFetchOptions.redirect = 'manual';\n }\n }\n\n request = isRequestSupported && new Request(url, resolvedOptions);\n\n let response = await (isRequestSupported\n ? _fetch(request, safeFetchOptions)\n : _fetch(url, resolvedOptions));\n\n const responseHeaders = AxiosHeaders.from(response.headers);\n\n // Cheap pre-check: if the server honestly declares a content-length that\n // already exceeds the cap, reject before we start streaming.\n if (hasMaxContentLength) {\n const declaredLength = utils.toFiniteNumber(responseHeaders.getContentLength());\n if (declaredLength != null && declaredLength > maxContentLength) {\n throw new AxiosError(\n 'maxContentLength size of ' + maxContentLength + ' exceeded',\n AxiosError.ERR_BAD_RESPONSE,\n config,\n request\n );\n }\n }\n\n const isStreamResponse =\n supportsResponseStream && (responseType === 'stream' || responseType === 'response');\n\n if (\n supportsResponseStream &&\n response.body &&\n (onDownloadProgress || hasMaxContentLength || (isStreamResponse && unsubscribe))\n ) {\n const options = {};\n\n ['status', 'statusText', 'headers'].forEach((prop) => {\n options[prop] = response[prop];\n });\n\n const responseContentLength = utils.toFiniteNumber(responseHeaders.getContentLength());\n\n const [onProgress, flush] =\n (onDownloadProgress &&\n progressEventDecorator(\n responseContentLength,\n progressEventReducer(asyncDecorator(onDownloadProgress), true)\n )) ||\n [];\n\n let bytesRead = 0;\n const onChunkProgress = (loadedBytes) => {\n if (hasMaxContentLength) {\n bytesRead = loadedBytes;\n if (bytesRead > maxContentLength) {\n throw (pendingResponseError = new AxiosError(\n 'maxContentLength size of ' + maxContentLength + ' exceeded',\n AxiosError.ERR_BAD_RESPONSE,\n config,\n request\n ));\n }\n }\n onProgress && onProgress(loadedBytes);\n };\n\n response = new Response(\n trackStream(response.body, DEFAULT_CHUNK_SIZE, onChunkProgress, () => {\n flush && flush();\n unsubscribe && unsubscribe();\n }),\n options\n );\n }\n\n responseType = responseType || 'text';\n\n let responseData = await resolvers[utils.findKey(resolvers, responseType) || 'text'](\n response,\n config\n );\n\n // Fallback enforcement for environments without ReadableStream support\n // (legacy runtimes). Detect materialized size from typed output; skip\n // streams/Response passthrough since the user will read those themselves.\n if (hasMaxContentLength && !supportsResponseStream && !isStreamResponse) {\n let materializedSize;\n if (responseData != null) {\n if (typeof responseData.byteLength === 'number') {\n materializedSize = responseData.byteLength;\n } else if (typeof responseData.size === 'number') {\n materializedSize = responseData.size;\n } else if (typeof responseData === 'string') {\n materializedSize =\n typeof TextEncoder === 'function'\n ? new TextEncoder().encode(responseData).byteLength\n : responseData.length;\n }\n }\n if (typeof materializedSize === 'number' && materializedSize > maxContentLength) {\n throw new AxiosError(\n 'maxContentLength size of ' + maxContentLength + ' exceeded',\n AxiosError.ERR_BAD_RESPONSE,\n config,\n request\n );\n }\n }\n\n !isStreamResponse && unsubscribe && unsubscribe();\n\n return await new Promise((resolve, reject) => {\n settle(resolve, reject, {\n data: responseData,\n headers: AxiosHeaders.from(response.headers),\n status: response.status,\n statusText: response.statusText,\n config,\n request,\n });\n });\n } catch (err) {\n unsubscribe && unsubscribe();\n\n // Safari can surface fetch aborts as a DOMException-like object whose\n // branded getters throw. Prefer our composed signal reason before reading\n // the caught error, preserving timeout vs cancellation semantics.\n if (composedSignal && composedSignal.aborted && composedSignal.reason instanceof AxiosError) {\n const canceledError = composedSignal.reason;\n canceledError.config = config;\n request && (canceledError.request = request);\n if (err !== canceledError) {\n // Non-enumerable to match native Error `cause` semantics so loggers\n // don't recurse into circular fetch internals (see #7205).\n Object.defineProperty(canceledError, 'cause', {\n __proto__: null,\n value: err,\n writable: true,\n enumerable: false,\n configurable: true,\n });\n }\n throw canceledError;\n }\n\n // Surface a maxBodyLength violation we raised while the request body was\n // being streamed. Keeping the original error (rather than reading\n // `err.cause.isAxiosError`) keeps the error deterministic across runtimes\n // and avoids both prototype-pollution reads and mis-attributing a foreign\n // AxiosError that merely happened to land in `err.cause`.\n if (pendingBodyError) {\n request && !pendingBodyError.request && (pendingBodyError.request = request);\n throw pendingBodyError;\n }\n\n if (pendingResponseError) {\n throw pendingResponseError;\n }\n\n // Re-throw AxiosErrors we raised synchronously (data: URL / content-length\n // pre-checks, response size enforcement) without re-wrapping them.\n if (err instanceof AxiosError) {\n request && !err.request && (err.request = request);\n throw err;\n }\n\n if (err && err.name === 'TypeError' && /Load failed|fetch/i.test(err.message)) {\n const networkError = new AxiosError(\n 'Network Error',\n AxiosError.ERR_NETWORK,\n config,\n request,\n err && err.response\n );\n // Non-enumerable to match native Error `cause` semantics so loggers\n // don't recurse into circular fetch internals (see #7205).\n Object.defineProperty(networkError, 'cause', {\n __proto__: null,\n value: err.cause || err,\n writable: true,\n enumerable: false,\n configurable: true,\n });\n throw networkError;\n }\n\n throw AxiosError.from(err, err && err.code, config, request, err && err.response);\n }\n };\n};\n\nconst seedCache = new Map();\n\nexport const getFetch = (config) => {\n const env = Object.create(null);\n const configuredEnv = config && utils.hasOwnProp(config, 'env') && config.env;\n ['fetch', 'Request', 'Response', 'Blob'].forEach((key) => {\n if (configuredEnv && utils.hasOwnProp(configuredEnv, key)) {\n env[key] = configuredEnv[key];\n }\n });\n const { fetch, Request, Response, Blob } = env;\n const seeds = [Request, Response, fetch, Blob];\n\n let len = seeds.length,\n i = len,\n seed,\n target,\n map = seedCache;\n\n while (i--) {\n seed = seeds[i];\n target = map.get(seed);\n\n target === undefined && map.set(seed, (target = i ? new Map() : factory(env)));\n\n map = target;\n }\n\n return target;\n};\n\nconst adapter = getFetch();\n\nexport default adapter;\n","import utils from '../utils.js';\nimport httpAdapter from './http.js';\nimport xhrAdapter from './xhr.js';\nimport * as fetchAdapter from './fetch.js';\nimport AxiosError from '../core/AxiosError.js';\n\n/**\n * Known adapters mapping.\n * Provides environment-specific adapters for Axios:\n * - `http` for Node.js\n * - `xhr` for browsers\n * - `fetch` for fetch API-based requests\n *\n * @type {Object}\n */\nconst knownAdapters = {\n http: httpAdapter,\n xhr: xhrAdapter,\n fetch: {\n get: fetchAdapter.getFetch,\n },\n};\n\n// Assign adapter names for easier debugging and identification\nutils.forEach(knownAdapters, (fn, value) => {\n if (fn) {\n try {\n // Null-proto descriptors so a polluted Object.prototype.get cannot turn\n // these data descriptors into accessor descriptors on the way in.\n Object.defineProperty(fn, 'name', { __proto__: null, value });\n } catch (e) {\n // eslint-disable-next-line no-empty\n }\n Object.defineProperty(fn, 'adapterName', { __proto__: null, value });\n }\n});\n\n/**\n * Render a rejection reason string for unknown or unsupported adapters\n *\n * @param {string} reason\n * @returns {string}\n */\nconst renderReason = (reason) => `- ${reason}`;\n\n/**\n * Check if the adapter is resolved (function, null, or false)\n *\n * @param {Function|null|false} adapter\n * @returns {boolean}\n */\nconst isResolvedHandle = (adapter) =>\n utils.isFunction(adapter) || adapter === null || adapter === false;\n\n/**\n * Get the first suitable adapter from the provided list.\n * Tries each adapter in order until a supported one is found.\n * Throws an AxiosError if no adapter is suitable.\n *\n * @param {Array|string|Function} adapters - Adapter(s) by name or function.\n * @param {Object} config - Axios request configuration\n * @throws {AxiosError} If no suitable adapter is available\n * @returns {Function} The resolved adapter function\n */\nfunction getAdapter(adapters, config) {\n adapters = utils.isArray(adapters) ? adapters : [adapters];\n\n const { length } = adapters;\n let nameOrAdapter;\n let adapter;\n\n const rejectedReasons = {};\n\n for (let i = 0; i < length; i++) {\n nameOrAdapter = adapters[i];\n let id;\n\n adapter = nameOrAdapter;\n\n if (!isResolvedHandle(nameOrAdapter)) {\n adapter = knownAdapters[(id = String(nameOrAdapter)).toLowerCase()];\n\n if (adapter === undefined) {\n throw new AxiosError(`Unknown adapter '${id}'`);\n }\n }\n\n if (adapter && (utils.isFunction(adapter) || (adapter = adapter.get(config)))) {\n break;\n }\n\n rejectedReasons[id || '#' + i] = adapter;\n }\n\n if (!adapter) {\n const reasons = Object.entries(rejectedReasons).map(\n ([id, state]) =>\n `adapter ${id} ` +\n (state === false ? 'is not supported by the environment' : 'is not available in the build')\n );\n\n let s = length\n ? reasons.length > 1\n ? 'since :\\n' + reasons.map(renderReason).join('\\n')\n : ' ' + renderReason(reasons[0])\n : 'as no adapter specified';\n\n throw new AxiosError(\n `There is no suitable adapter to dispatch the request ` + s,\n AxiosError.ERR_NOT_SUPPORT\n );\n }\n\n return adapter;\n}\n\n/**\n * Exports Axios adapters and utility to resolve an adapter\n */\nexport default {\n /**\n * Resolve an adapter from a list of adapter names or functions.\n * @type {Function}\n */\n getAdapter,\n\n /**\n * Exposes all known adapters\n * @type {Object}\n */\n adapters: knownAdapters,\n};\n","// eslint-disable-next-line strict\nexport default null;\n","'use strict';\n\nimport transformData from './transformData.js';\nimport isCancel from '../cancel/isCancel.js';\nimport defaults from '../defaults/index.js';\nimport CanceledError from '../cancel/CanceledError.js';\nimport AxiosHeaders from '../core/AxiosHeaders.js';\nimport adapters from '../adapters/adapters.js';\nimport utils from '../utils.js';\n\n/**\n * Throws a `CanceledError` if cancellation has been requested.\n *\n * @param {Object} config The config that is to be used for the request\n *\n * @returns {void}\n */\nfunction throwIfCancellationRequested(config) {\n if (config.cancelToken) {\n config.cancelToken.throwIfRequested();\n }\n\n if (config.signal && config.signal.aborted) {\n throw new CanceledError(null, config);\n }\n}\n\n/**\n * Resolve the clock used to time adapter execution.\n *\n * Prefers the monotonic `performance.now()` so wall-clock adjustments do not\n * skew the measurement, and so frameworks that forbid reading the current\n * time during prerendering (e.g. Next.js Cache Components) accept it. Falls\n * back to `Date.now()` in runtimes without the High Resolution Time API.\n *\n * @returns {() => number} Millisecond clock\n */\nfunction resolveClock() {\n return typeof performance !== 'undefined' && utils.isFunction(performance.now)\n ? () => performance.now()\n : Date.now;\n}\n\n/**\n * Whole milliseconds elapsed since `start`, floored at zero.\n *\n * Rounded so the value stays an integer as with `Date.now()`. The fallback\n * wall clock can move backwards mid-request, so the result is clamped.\n *\n * @param {() => number} now Clock returned by `resolveClock()`\n * @param {number} start Timestamp read from `now`\n *\n * @returns {number} Non-negative elapsed milliseconds\n */\nfunction elapsedSince(now, start) {\n return Math.max(0, Math.round(now() - start));\n}\n\n/**\n * Dispatch a request to the server using the configured adapter.\n *\n * @param {object} config The config that is to be used for the request\n *\n * @returns {Promise} The Promise to be fulfilled\n */\nexport default function dispatchRequest(_config) {\n // Interceptors may replace the merged config with an ordinary object. Flatten\n // it at the dispatch boundary so shared prototype members cannot become\n // request behavior, while preserving intentional template/class members.\n const config = utils.toSafeFlatObject(_config);\n\n throwIfCancellationRequested(config);\n\n config.headers = AxiosHeaders.from(utils.getSafeProp(config, 'headers'));\n\n // Transform request data\n config.data = transformData.call(config, config.transformRequest);\n\n if (['post', 'put', 'patch'].indexOf(config.method) !== -1) {\n config.headers.setContentType('application/x-www-form-urlencoded', false);\n }\n\n const adapter = adapters.getAdapter(config.adapter || defaults.adapter, config);\n\n const now = resolveClock();\n const start = now();\n\n return adapter(config).then(\n function onAdapterResolution(response) {\n throwIfCancellationRequested(config);\n\n response.duration = elapsedSince(now, start);\n\n // Expose the current response on config so that transformResponse can\n // attach it to any AxiosError it throws (e.g. on JSON parse failure).\n // We clean it up afterwards to avoid polluting the config object.\n config.response = response;\n try {\n response.data = transformData.call(config, config.transformResponse, response);\n } finally {\n delete config.response;\n }\n\n response.headers = AxiosHeaders.from(response.headers);\n\n return response;\n },\n function onAdapterRejection(reason) {\n if (!isCancel(reason)) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n if (reason && reason.response) {\n reason.response.duration = elapsedSince(now, start);\n config.response = reason.response;\n try {\n reason.response.data = transformData.call(\n config,\n config.transformResponse,\n reason.response\n );\n } finally {\n delete config.response;\n }\n reason.response.headers = AxiosHeaders.from(reason.response.headers);\n }\n }\n\n return Promise.reject(reason);\n }\n );\n}\n","'use strict';\n\nimport { VERSION } from '../env/data.js';\nimport AxiosError from '../core/AxiosError.js';\n\nconst validators = {};\n\n// eslint-disable-next-line func-names\n['object', 'boolean', 'number', 'function', 'string', 'symbol'].forEach((type, i) => {\n validators[type] = function validator(thing) {\n return typeof thing === type || 'a' + (i < 1 ? 'n ' : ' ') + type;\n };\n});\n\nconst deprecatedWarnings = {};\n\n/**\n * Transitional option validator\n *\n * @param {function|boolean?} validator - set to false if the transitional option has been removed\n * @param {string?} version - deprecated version / removed since version\n * @param {string?} message - some message with additional info\n *\n * @returns {function}\n */\nvalidators.transitional = function transitional(validator, version, message) {\n function formatMessage(opt, desc) {\n return (\n '[Axios v' +\n VERSION +\n \"] Transitional option '\" +\n opt +\n \"'\" +\n desc +\n (message ? '. ' + message : '')\n );\n }\n\n // eslint-disable-next-line func-names\n return (value, opt, opts) => {\n if (validator === false) {\n throw new AxiosError(\n formatMessage(opt, ' has been removed' + (version ? ' in ' + version : '')),\n AxiosError.ERR_DEPRECATED\n );\n }\n\n if (version && !deprecatedWarnings[opt]) {\n deprecatedWarnings[opt] = true;\n // eslint-disable-next-line no-console\n console.warn(\n formatMessage(\n opt,\n ' has been deprecated since v' + version + ' and will be removed in the near future'\n )\n );\n }\n\n return validator ? validator(value, opt, opts) : true;\n };\n};\n\nvalidators.spelling = function spelling(correctSpelling) {\n return (value, opt) => {\n // eslint-disable-next-line no-console\n console.warn(`${opt} is likely a misspelling of ${correctSpelling}`);\n return true;\n };\n};\n\n/**\n * Assert object's properties type\n *\n * @param {object} options\n * @param {object} schema\n * @param {boolean?} allowUnknown\n *\n * @returns {object}\n */\n\nfunction assertOptions(options, schema, allowUnknown) {\n if (typeof options !== 'object' || options === null) {\n throw new AxiosError('options must be an object', AxiosError.ERR_BAD_OPTION_VALUE);\n }\n const keys = Object.keys(options);\n let i = keys.length;\n while (i-- > 0) {\n const opt = keys[i];\n // Use hasOwnProperty so a polluted Object.prototype. cannot supply\n // a non-function validator and cause a TypeError.\n const validator = Object.prototype.hasOwnProperty.call(schema, opt) ? schema[opt] : undefined;\n if (validator) {\n const value = options[opt];\n const result = value === undefined || validator(value, opt, options);\n if (result !== true) {\n throw new AxiosError(\n 'option ' + opt + ' must be ' + result,\n AxiosError.ERR_BAD_OPTION_VALUE\n );\n }\n continue;\n }\n if (allowUnknown !== true) {\n throw new AxiosError('Unknown option ' + opt, AxiosError.ERR_BAD_OPTION);\n }\n }\n}\n\nexport default {\n assertOptions,\n validators,\n};\n","'use strict';\n\nimport utils from '../utils.js';\nimport buildURL from '../helpers/buildURL.js';\nimport InterceptorManager from './InterceptorManager.js';\nimport dispatchRequest from './dispatchRequest.js';\nimport mergeConfig from './mergeConfig.js';\nimport buildFullPath from './buildFullPath.js';\nimport methodList from './methodList.js';\nimport validator from '../helpers/validator.js';\nimport AxiosHeaders from './AxiosHeaders.js';\nimport transitionalDefaults from '../defaults/transitional.js';\nimport { getCauseStackIndex } from './AxiosError.js';\n\nconst validators = validator.validators;\n\n// Recognize header maps without consuming objects intended as literal values.\n// AxiosHeaders from other builds share a brand and header-container interface,\n// but not constructor identity. A tag and toJSON alone can describe a literal.\nconst isHeadersBucket = (value) => {\n if (value == null || utils.isPlainObject(value) || value instanceof AxiosHeaders) {\n return true;\n }\n\n try {\n return (\n utils.isObject(value) &&\n utils.getSafeProp(value, Symbol.toStringTag) === 'AxiosHeaders' &&\n [\n 'toJSON',\n 'set',\n 'get',\n 'has',\n 'delete',\n 'clear',\n 'normalize',\n 'concat',\n 'toString',\n Symbol.iterator,\n ].every((method) => utils.isFunction(utils.getSafeProp(value, method)))\n );\n } catch (e) {\n // A failed optional brand probe must not prevent literal header serialization.\n return false;\n }\n};\n\n/**\n * Create a new instance of Axios\n *\n * @param {Object} instanceConfig The default config for the instance\n *\n * @return {Axios} A new instance of Axios\n */\nclass Axios {\n constructor(instanceConfig) {\n this.defaults = instanceConfig || {};\n this.interceptors = {\n request: new InterceptorManager(),\n response: new InterceptorManager(),\n };\n }\n\n /**\n * Dispatch a request\n *\n * @param {String|Object} configOrUrl The config specific for this request (merged with this.defaults)\n * @param {?Object} config\n *\n * @returns {Promise} The Promise to be fulfilled\n */\n async request(configOrUrl, config) {\n try {\n return await this._request(configOrUrl, config);\n } catch (err) {\n if (err instanceof Error) {\n try {\n let dummy = {};\n\n Error.captureStackTrace ? Error.captureStackTrace(dummy) : (dummy = new Error());\n\n const dummyStack = dummy.stack;\n let stack = '';\n\n // slice off the Error: ... line\n if (typeof dummyStack === 'string') {\n const firstNewlineIndex = dummyStack.indexOf('\\n');\n\n stack = firstNewlineIndex === -1 ? '' : dummyStack.slice(firstNewlineIndex + 1);\n }\n\n if (!err.stack) {\n err.stack = stack;\n } else if (stack) {\n // Match a common suffix after the 2 top frames when available,\n // otherwise compare the full reconstructed stack.\n const firstNewlineIndex = stack.indexOf('\\n');\n const secondNewlineIndex =\n firstNewlineIndex === -1 ? -1 : stack.indexOf('\\n', firstNewlineIndex + 1);\n const duplicateCheckSuffix =\n secondNewlineIndex === -1 ? stack : stack.slice(secondNewlineIndex + 1);\n\n // `AxiosError.from()` may have already inlined the wrapped error's\n // stack under a `Caused by:` marker. Keep the reconstructed caller\n // frames ahead of that marker so stack-only reporters do not read\n // them as part of the low-level cause.\n const currentStack = String(err.stack);\n const causeIndex = getCauseStackIndex(err, currentStack);\n const stackHead = causeIndex === -1 ? currentStack : currentStack.slice(0, causeIndex);\n const causeSection = causeIndex === -1 ? '' : currentStack.slice(causeIndex);\n\n if (!stackHead.endsWith(duplicateCheckSuffix)) {\n err.stack = stackHead + '\\n' + stack + causeSection;\n }\n }\n } catch (e) {\n // Ignore failures from custom stack hooks or un-writable stack properties.\n }\n }\n\n throw err;\n }\n }\n\n _request(configOrUrl, config) {\n /*eslint no-param-reassign:0*/\n // Allow for axios('example/url'[, config]) a la fetch API\n if (typeof configOrUrl === 'string') {\n config = config || {};\n config.url = configOrUrl;\n } else {\n config = configOrUrl || {};\n }\n\n config = mergeConfig(this.defaults, config);\n\n const { transitional, paramsSerializer, headers } = config;\n\n if (transitional !== undefined) {\n validator.assertOptions(\n transitional,\n {\n silentJSONParsing: validators.transitional(validators.boolean),\n forcedJSONParsing: validators.transitional(validators.boolean),\n clarifyTimeoutError: validators.transitional(validators.boolean),\n legacyInterceptorReqResOrdering: validators.transitional(validators.boolean),\n advertiseZstdAcceptEncoding: validators.transitional(validators.boolean),\n validateStatusUndefinedResolves: validators.transitional(validators.boolean),\n encodeBasicAuthUsername: validators.transitional(validators.boolean),\n },\n false\n );\n }\n\n if (paramsSerializer != null) {\n if (utils.isFunction(paramsSerializer)) {\n config.paramsSerializer = {\n serialize: paramsSerializer,\n };\n } else {\n validator.assertOptions(\n paramsSerializer,\n {\n encode: validators.function,\n serialize: validators.function,\n },\n true\n );\n }\n }\n\n // Set config.allowAbsoluteUrls\n if (config.allowAbsoluteUrls !== undefined) {\n // do nothing\n } else if (\n utils.hasOwnProp(this.defaults, 'allowAbsoluteUrls') &&\n this.defaults.allowAbsoluteUrls !== undefined\n ) {\n config.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls;\n } else {\n config.allowAbsoluteUrls = true;\n }\n\n validator.assertOptions(\n config,\n {\n baseUrl: validators.spelling('baseURL'),\n withXsrfToken: validators.spelling('withXSRFToken'),\n },\n true\n );\n\n // Set config.method\n config.method = (\n utils.getSafeProp(config, 'method') ||\n utils.getSafeProp(this.defaults, 'method') ||\n 'get'\n ).toLowerCase();\n\n // Flatten header defaults without consuming literal method-named headers.\n const commonHeaders = utils.getSafeProp(headers, 'common');\n const methodHeaders = utils.getSafeProp(headers, config.method);\n const contextHeaders =\n headers &&\n utils.merge(\n isHeadersBucket(commonHeaders) ? commonHeaders : undefined,\n isHeadersBucket(methodHeaders) ? methodHeaders : undefined\n );\n\n headers &&\n utils.forEach(methodList.concat('common'), (method) => {\n if (isHeadersBucket(utils.getSafeProp(headers, method))) {\n delete headers[method];\n }\n });\n\n config.headers = AxiosHeaders.concat(contextHeaders, headers);\n\n // filter out skipped interceptors\n const requestInterceptorChain = [];\n let synchronousRequestInterceptors = true;\n this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {\n if (typeof interceptor.runWhen === 'function' && interceptor.runWhen(config) === false) {\n return;\n }\n\n synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous;\n\n const transitional = config.transitional || transitionalDefaults;\n const legacyInterceptorReqResOrdering =\n transitional && transitional.legacyInterceptorReqResOrdering;\n\n if (legacyInterceptorReqResOrdering) {\n requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected);\n } else {\n requestInterceptorChain.push(interceptor.fulfilled, interceptor.rejected);\n }\n });\n\n const responseInterceptorChain = [];\n this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {\n responseInterceptorChain.push(interceptor.fulfilled, interceptor.rejected);\n });\n\n let promise;\n let i = 0;\n let len;\n\n if (!synchronousRequestInterceptors) {\n const chain = [dispatchRequest.bind(this), undefined];\n chain.unshift(...requestInterceptorChain);\n chain.push(...responseInterceptorChain);\n len = chain.length;\n\n promise = Promise.resolve(config);\n\n while (i < len) {\n promise = promise.then(chain[i++], chain[i++]);\n }\n\n return promise;\n }\n\n len = requestInterceptorChain.length;\n\n let newConfig = config;\n\n while (i < len) {\n const onFulfilled = requestInterceptorChain[i++];\n const onRejected = requestInterceptorChain[i++];\n try {\n newConfig = onFulfilled ? onFulfilled(newConfig) : newConfig;\n } catch (error) {\n if (!onRejected) {\n promise = Promise.reject(error);\n break;\n }\n\n try {\n const rejectedResult = onRejected.call(this, error);\n\n if (utils.isThenable(rejectedResult)) {\n promise = Promise.resolve(rejectedResult).then(() =>\n dispatchRequest.call(this, newConfig)\n );\n }\n } catch (rejectedError) {\n promise = Promise.reject(rejectedError);\n }\n\n break;\n }\n }\n\n if (!promise) {\n try {\n promise = dispatchRequest.call(this, newConfig);\n } catch (error) {\n promise = Promise.reject(error);\n }\n }\n\n i = 0;\n len = responseInterceptorChain.length;\n\n while (i < len) {\n promise = promise.then(responseInterceptorChain[i++], responseInterceptorChain[i++]);\n }\n\n return promise;\n }\n\n getUri(config) {\n config = mergeConfig(this.defaults, config);\n const fullPath = buildFullPath(config.baseURL, config.url, config.allowAbsoluteUrls, config);\n return buildURL(fullPath, config.params, config.paramsSerializer);\n }\n}\n\n// Provide aliases for supported request methods\nutils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {\n /*eslint func-names:0*/\n Axios.prototype[method] = async function (url, config) {\n return this.request(\n mergeConfig(config || {}, {\n method,\n url,\n data: config && utils.hasOwnProp(config, 'data') ? config.data : undefined,\n })\n );\n };\n});\n\nutils.forEach(['post', 'put', 'patch', 'query'], function forEachMethodWithData(method) {\n function generateHTTPMethod(isForm) {\n return async function httpMethod(url, data, config) {\n return this.request(\n mergeConfig(config || {}, {\n method,\n headers: isForm\n ? {\n 'Content-Type': 'multipart/form-data',\n }\n : {},\n url,\n data,\n })\n );\n };\n }\n\n Axios.prototype[method] = generateHTTPMethod();\n\n // QUERY is a safe/idempotent read method; multipart form bodies don't fit\n // its semantics, so no queryForm shorthand is generated.\n if (method !== 'query') {\n Axios.prototype[method + 'Form'] = generateHTTPMethod(true);\n }\n});\n\nexport default Axios;\n","'use strict';\n\nimport CanceledError from './CanceledError.js';\n\n/**\n * A `CancelToken` is an object that can be used to request cancellation of an operation.\n *\n * @param {Function} executor The executor function.\n *\n * @returns {CancelToken}\n */\nclass CancelToken {\n constructor(executor) {\n if (typeof executor !== 'function') {\n throw new TypeError('executor must be a function.');\n }\n\n let resolvePromise;\n\n this.promise = new Promise(function promiseExecutor(resolve) {\n resolvePromise = resolve;\n });\n\n const token = this;\n\n // eslint-disable-next-line func-names\n this.promise.then((cancel) => {\n if (!token._listeners) return;\n\n let i = token._listeners.length;\n\n while (i-- > 0) {\n token._listeners[i](cancel);\n }\n token._listeners = null;\n });\n\n // eslint-disable-next-line func-names\n this.promise.then = (onfulfilled) => {\n let _resolve;\n // eslint-disable-next-line func-names\n const promise = new Promise((resolve) => {\n token.subscribe(resolve);\n _resolve = resolve;\n }).then(onfulfilled);\n\n promise.cancel = function reject() {\n token.unsubscribe(_resolve);\n };\n\n return promise;\n };\n\n executor(function cancel(message, config, request) {\n if (token.reason) {\n // Cancellation has already been requested\n return;\n }\n\n token.reason = new CanceledError(message, config, request);\n resolvePromise(token.reason);\n });\n }\n\n /**\n * Throws a `CanceledError` if cancellation has been requested.\n */\n throwIfRequested() {\n if (this.reason) {\n throw this.reason;\n }\n }\n\n /**\n * Subscribe to the cancel signal\n */\n\n subscribe(listener) {\n if (this.reason) {\n listener(this.reason);\n return;\n }\n\n if (this._listeners) {\n this._listeners.push(listener);\n } else {\n this._listeners = [listener];\n }\n }\n\n /**\n * Unsubscribe from the cancel signal\n */\n\n unsubscribe(listener) {\n if (!this._listeners) {\n return;\n }\n const index = this._listeners.indexOf(listener);\n if (index !== -1) {\n this._listeners.splice(index, 1);\n }\n }\n\n toAbortSignal() {\n const controller = new AbortController();\n\n const abort = (err) => {\n controller.abort(err);\n };\n\n this.subscribe(abort);\n\n controller.signal.unsubscribe = () => this.unsubscribe(abort);\n\n return controller.signal;\n }\n\n /**\n * Returns an object that contains a new `CancelToken` and a function that, when called,\n * cancels the `CancelToken`.\n */\n static source() {\n let cancel;\n const token = new CancelToken(function executor(c) {\n cancel = c;\n });\n return {\n token,\n cancel,\n };\n }\n}\n\nexport default CancelToken;\n","const HttpStatusCode = {\n Continue: 100,\n SwitchingProtocols: 101,\n Processing: 102,\n EarlyHints: 103,\n Ok: 200,\n Created: 201,\n Accepted: 202,\n NonAuthoritativeInformation: 203,\n NoContent: 204,\n ResetContent: 205,\n PartialContent: 206,\n MultiStatus: 207,\n AlreadyReported: 208,\n ImUsed: 226,\n MultipleChoices: 300,\n MovedPermanently: 301,\n Found: 302,\n SeeOther: 303,\n NotModified: 304,\n UseProxy: 305,\n Unused: 306,\n TemporaryRedirect: 307,\n PermanentRedirect: 308,\n BadRequest: 400,\n Unauthorized: 401,\n PaymentRequired: 402,\n Forbidden: 403,\n NotFound: 404,\n MethodNotAllowed: 405,\n NotAcceptable: 406,\n ProxyAuthenticationRequired: 407,\n RequestTimeout: 408,\n Conflict: 409,\n Gone: 410,\n LengthRequired: 411,\n PreconditionFailed: 412,\n /**\n * @deprecated Use `ContentTooLarge` instead.\n */\n PayloadTooLarge: 413,\n ContentTooLarge: 413,\n UriTooLong: 414,\n UnsupportedMediaType: 415,\n RangeNotSatisfiable: 416,\n ExpectationFailed: 417,\n ImATeapot: 418,\n MisdirectedRequest: 421,\n /**\n * @deprecated Use `UnprocessableContent` instead.\n */\n UnprocessableEntity: 422,\n UnprocessableContent: 422,\n Locked: 423,\n FailedDependency: 424,\n TooEarly: 425,\n UpgradeRequired: 426,\n PreconditionRequired: 428,\n TooManyRequests: 429,\n RequestHeaderFieldsTooLarge: 431,\n UnavailableForLegalReasons: 451,\n InternalServerError: 500,\n NotImplemented: 501,\n BadGateway: 502,\n ServiceUnavailable: 503,\n GatewayTimeout: 504,\n HttpVersionNotSupported: 505,\n VariantAlsoNegotiates: 506,\n InsufficientStorage: 507,\n LoopDetected: 508,\n NotExtended: 510,\n NetworkAuthenticationRequired: 511,\n WebServerReturnsAnUnknownError: 520,\n WebServerIsDown: 521,\n ConnectionTimedOut: 522,\n OriginIsUnreachable: 523,\n TimeoutOccurred: 524,\n SslHandshakeFailed: 525,\n InvalidSslCertificate: 526,\n};\n\nObject.entries(HttpStatusCode).forEach(([key, value]) => {\n if (HttpStatusCode[value] === undefined) {\n HttpStatusCode[value] = key;\n }\n});\n\nexport default HttpStatusCode;\n","'use strict';\n\nimport utils from './utils.js';\nimport bind from './helpers/bind.js';\nimport Axios from './core/Axios.js';\nimport mergeConfig from './core/mergeConfig.js';\nimport defaults from './defaults/index.js';\nimport formDataToJSON from './helpers/formDataToJSON.js';\nimport CanceledError from './cancel/CanceledError.js';\nimport CancelToken from './cancel/CancelToken.js';\nimport isCancel from './cancel/isCancel.js';\nimport { VERSION } from './env/data.js';\nimport toFormData from './helpers/toFormData.js';\nimport AxiosError from './core/AxiosError.js';\nimport spread from './helpers/spread.js';\nimport isAxiosError from './helpers/isAxiosError.js';\nimport AxiosHeaders from './core/AxiosHeaders.js';\nimport adapters from './adapters/adapters.js';\nimport HttpStatusCode from './helpers/HttpStatusCode.js';\n\n/**\n * Create an instance of Axios\n *\n * @param {Object} defaultConfig The default config for the instance\n *\n * @returns {Axios} A new instance of Axios\n */\nfunction createInstance(defaultConfig) {\n const context = new Axios(defaultConfig);\n const instance = bind(Axios.prototype.request, context);\n\n // Copy axios.prototype to instance\n utils.extend(instance, Axios.prototype, context, { allOwnKeys: true });\n\n // Copy context to instance\n utils.extend(instance, context, null, { allOwnKeys: true });\n\n // Factory for creating new instances\n instance.create = function create(instanceConfig) {\n return createInstance(mergeConfig(defaultConfig, instanceConfig));\n };\n\n return instance;\n}\n\n// Create the default instance to be exported\nconst axios = createInstance(defaults);\n\n// Expose Axios class to allow class inheritance\naxios.Axios = Axios;\n\n// Expose Cancel & CancelToken\naxios.CanceledError = CanceledError;\naxios.CancelToken = CancelToken;\naxios.isCancel = isCancel;\naxios.VERSION = VERSION;\naxios.toFormData = toFormData;\n\n// Expose AxiosError class\naxios.AxiosError = AxiosError;\n\n// alias for CanceledError for backward compatibility\naxios.Cancel = axios.CanceledError;\n\n// Expose all/spread\naxios.all = function all(promises) {\n return Promise.all(promises);\n};\n\naxios.spread = spread;\n\n// Expose isAxiosError\naxios.isAxiosError = isAxiosError;\n\n// Expose mergeConfig\naxios.mergeConfig = mergeConfig;\n\naxios.AxiosHeaders = AxiosHeaders;\n\naxios.formToJSON = (thing) => formDataToJSON(utils.isHTMLForm(thing) ? new FormData(thing) : thing);\n\naxios.getAdapter = adapters.getAdapter;\n\naxios.HttpStatusCode = HttpStatusCode;\n\naxios.default = axios;\n\n// this module should only have a default export\nexport default axios;\n","'use strict';\n\n/**\n * Syntactic sugar for invoking a function and expanding an array for arguments.\n *\n * Common use case would be to use `Function.prototype.apply`.\n *\n * ```js\n * function f(x, y, z) {}\n * const args = [1, 2, 3];\n * f.apply(null, args);\n * ```\n *\n * With `spread` this example can be re-written.\n *\n * ```js\n * spread(function(x, y, z) {})([1, 2, 3]);\n * ```\n *\n * @param {Function} callback\n *\n * @returns {Function}\n */\nexport default function spread(callback) {\n return function wrap(arr) {\n return callback.apply(null, arr);\n };\n}\n","'use strict';\n\nimport utils from '../utils.js';\n\n/**\n * Determines whether the payload is an error thrown by Axios\n *\n * @param {*} payload The value to test\n *\n * @returns {boolean} True if the payload is an error thrown by Axios, otherwise false\n */\nexport default function isAxiosError(payload) {\n return utils.isObject(payload) && payload.isAxiosError === true;\n}\n"],"names":["bind","fn","thisArg","apply","arguments","cache","toString","Object","prototype","getPrototypeOf","iterator","Symbol","toStringTag","hasOwnProperty","obj","prop","call","isUnsafeObjectKey","isPrototypeBoundary","source","hasOwnInPrototypeChain","thing","seen","indexOf","push","kindOf","create","str","slice","toLowerCase","kindOfTest","type","typeOfTest","_typeof","isArray","Array","isUndefined","isBuffer","val","constructor","isFunction","isArrayBuffer","isString","isNumber","isObject","isPlainObject","isDate","isFile","isBlob","isFileList","isSet","G","globalThis","self","window","global","FormDataCtor","FormData","undefined","isURLSearchParams","_map2","_slicedToArray","map","isReadableStream","isRequest","isResponse","isHeaders","forEach","i","l","_ref2$allOwnKeys","length","allOwnKeys","key","keys","getOwnPropertyNames","len","_global","isContextDefined","context","TypedArray","isTypedArray","Uint8Array","isHTMLForm","propertyIsEnumerable","isRegExp","reduceDescriptors","reducer","descriptors","getOwnPropertyDescriptors","reducedDescriptors","descriptor","name","ret","defineProperties","setImmediateSupported","postMessageSupported","token","callbacks","isAsyncFn","_setImmediate","setImmediate","postMessage","concat","Math","random","addEventListener","_ref5","data","shift","cb","setTimeout","asap","queueMicrotask","process","nextTick","isIterable","utils$1","isFormData","proto","append","kind","isArrayBufferView","ArrayBuffer","isView","buffer","isBoolean","isEmptyObject","e","isReactNativeBlob","value","uri","isReactNative","formData","getParts","isStream","pipe","merge","_ref3","this","caseless","skipUndefined","result","lowerCaseKeys","assignValue","targetKey","lowerKey","knownKey","existing","getOwnPropertySymbols","symbols","j","symbol","extend","a","b","defineProperty","__proto__","writable","enumerable","configurable","trim","replace","stripBOM","content","charCodeAt","inherits","superConstructor","props","assign","toFlatObject","sourceObj","destObj","filter","propFilter","merged","endsWith","searchString","position","String","lastIndex","toArray","Number","isSafeInteger","indexes","Set","size","has","add","index","isInteger","arr","forEachEntry","_iterator","next","done","pair","matchAll","regExp","matches","exec","hasOwnProp","getSafeProp","toSafeFlatObject","sourcePrototype","isExtensible","_toConsumableArray","every","getOwnPropertyDescriptor","isSafeAndFullyMutable","current","_step","_iterator2","_createForOfIteratorHelper","s","n","err","f","freezeMethods","includes","set","Error","toObjectSet","arrayOrString","delimiter","define","split","toCamelCase","m","p1","p2","toUpperCase","noop","toFiniteNumber","defaultValue","isFinite","findKey","_key","isSpecCompliantForm","toJSONObject","visited","WeakSet","visit","target","_step2","_iterator3","reducedValue","isThenable","then","isSafeIterable","ignoreDuplicateOf","utils","INVALID_UNICODE_HEADER_VALUE_CHARS","RegExp","INVALID_BYTE_STRING_HEADER_VALUE_CHARS","sanitizeValue","invalidChars","item","start","end","code","trimSPorHTAB","toByteStringHeaderObject","headers","byteStringHeaders","toJSON","header","sanitizeByteStringHeaderValue","$internals","normalizeHeader","normalizeValue","sanitizeHeaderValue","parameterNameRE","trimOWS","headerSlot","matchHeaderValue","isHeaderNameFilter","test","AxiosHeaders","_createClass","_classCallCheck","valueOrRewrite","rewrite","setHeader","_value","_header","_rewrite","lHeader","setHeaders","rawHeaders","parsed","line","substring","hasKey","parseHeaders","dest","entry","TypeError","parser","match","tokens","tokensRE","parseTokens","matcher","deleted","deleteHeader","format","normalized","w","char","formatHeader","_this$constructor","_len","targets","asStrings","join","entries","_ref","_ref2","get","parameters","quoted","escaped","parseParameter","part","equals","normalizedName","parameterValue","last","decoded","decodeQuotedString","parseParameters","first","computed","_len2","_key2","accessors","defineAccessor","accessorName","methodName","arg1","arg2","arg3","buildAccessors","accessor","mapped","headerValue","REDACTED","redactConfig","config","redactKeys","lowerKeys","k","v","hasOwnOrPrototypeToJSON","pop","_i","_Object$entries","_Object$entries$_i","stringifySafely","$causeStack","getCauseStackIndex","error","stack","causeStack","AxiosError","_Error","message","request","response","_this","_callSuper","isAxiosError","status","_inherits","redact","serializedConfig","description","number","fileName","lineNumber","columnNumber","customProps","errors","Boolean","aggregateErrorMessage","axiosError","sourceStack","targetStack","appendCauseStack","_wrapNativeSuper","ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ECONNREFUSED","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL","ERR_FORM_DATA_DEPTH_EXCEEDED","isVisitable","removeBrackets","renderKey","path","dots","predicates","toFormData","options","option","fallback","metaTokens","visitor","defaultVisitor","_Blob","Blob","maxDepth","useBlob","convertValue","toISOString","throwIfMaxDepthExceeded","depth","Infinity","JSON","stringify","ancestors","currentValue","stringifyWithDepthLimit","some","isFlatArray","el","exposedHelpers","build","encode","charMap","encodeURIComponent","AxiosURLSearchParams","params","_pairs","buildURL","url","serializedParams","_options","serialize","_encode","serializeFn","hashmarkIndex","encoder","countHandlers","handlers","trimHandlers","syncHandlerEntries","manager","internals","handlersRef","handlerEntries","clear","handlersLength","id","handler","InterceptorManager","Map","iterationDepth","nextId","fulfilled","rejected","synchronous","runWhen","handlerId","normalizeHandlerId","h","transitionalDefaults","silentJSONParsing","forcedJSONParsing","clarifyTimeoutError","legacyInterceptorReqResOrdering","advertiseZstdAcceptEncoding","validateStatusUndefinedResolves","encodeBasicAuthUsername","platform$1","isBrowser","classes","URLSearchParams","protocols","hasBrowserEnv","document","_navigator","navigator","hasStandardBrowserEnv","product","hasStandardBrowserWebWorkerEnv","WorkerGlobalScope","importScripts","origin","location","href","platform","_objectSpread","throwIfDepthExceeded","arrayToObject","normalizeArray","formDataToJSON","buildPath","isNumericKey","isLast","pattern","parsePropPath","pending","_loop","normalizeArrays","methodList","freeze","own","defaults","transitional","adapter","transformRequest","contentType","getContentType","hasJSONContentType","isObjectPayload","setContentType","formSerializer","helpers","isNode","toURLEncodedForm","env","_FormData","rawValue","parse","transformResponse","responseType","JSONRequested","strictJSONParsing","from","timeout","xsrfCookieName","xsrfHeaderName","maxContentLength","maxBodyLength","validateStatus","common","Accept","transformData","fns","normalize","isCancel","__CANCEL__","method","CanceledError","_AxiosError","settle","resolve","reject","urlParserControlCharacters","normalizeURLForProtocolCheck","parseProtocol","decodeCookieValue","decodeURIComponent","cookies","write","expires","domain","secure","sameSite","cookie","Date","toUTCString","read","cookieString","eq","readAsync","_asyncToGenerator","_regenerator","_callee","store","_context","p","cookieStore","remove","now","_callee2","_context2","progressEventReducer","listener","isDownloadStream","freq","bytesNotified","_speedometer","samplesCount","min","firstSampleTS","bytes","timestamps","head","tail","chunkLength","startedAt","bytesCount","passed","round","speedometer","lastArgs","timer","timestamp","threshold","invoke","args","clearTimeout","throttle","loaded","rawLoaded","total","lengthComputable","max","progressBytes","rate","_defineProperty","progress","estimated","event","progressEventDecorator","throttled","asyncDecorator","scheduler","isURLSameOrigin","URL","baseURI","protocol","host","port","malformedHttpProtocol","redactSensitiveURLParts","fragment","redactedURL","fragmentIndex","redactedURLWithoutFragment","separator","parameterName","assertValidHttpProtocolURL","normalizedURL","buildFullPath","baseURL","requestedURL","allowAbsoluteUrls","isRelativeUrl","relativeURL","combineURLs","headersToObject","ownEnumerableKeys","getMergedValue","mergeDeepProperties","valueFromConfig2","defaultToConfig2","mergeDirectKeys","config1","config2","hasOwnPropertyDescriptor","mergeMap","copies","WeakMap","empty","copy","base","bases","_pending$pop","baseKeys","sourceKeys","hasSource","previous","active","assertParamsAcyclic","paramsSerializer","timeoutErrorMessage","withCredentials","withXSRFToken","onUploadProgress","onDownloadProgress","decompress","beforeRedirect","transport","httpAgent","httpsAgent","cancelToken","socketPath","allowedSocketPaths","responseEncoding","mergeConfig","configValue","transitional2","transitional1","getMergedTransitionalOption","FORM_DATA_CONTENT_HEADERS","encodeUTF8","_","hex","fromCharCode","parseInt","readCookie","resolveConfig","readXsrfCookie","newConfig","auth","username","password","encodeUsername","btoa","getHeaders","formHeaders","policy","setFormDataHeaders","xsrfValue","xhrAdapter","XMLHttpRequest","Promise","useAsyncXsrf","onCanceled","timeoutId","uploadThrottled","downloadThrottled","flushUpload","flushDownload","flushDownloadWithEvent","_config","requestData","requestHeaders","removeEventListener","upload","unsubscribe","signal","onloadend","responseURL","startsWith","responseHeaders","getAllResponseHeaders","responseText","statusText","open","onreadystatechange","readyState","onabort","onerror","msg","ontimeout","_progressEventReducer2","_progressEventReducer4","cancel","xhr","abort","subscribe","aborted","sendRequest","setRequestHeader","send","performance","deadline","abortOnTimeout","scheduleTimeout","remaining","headerName","composeSignals","signals","controller","AbortController","reason","unsubscribeSignal","once","streamChunk","chunk","chunkSize","pos","byteLength","readBytes","_wrapAsyncGenerator","iterable","_iteratorAbruptCompletion","_didIteratorError","_iteratorError","_t","_asyncIterator","readStream","_awaitAsyncGenerator","d","_regeneratorValues","_asyncGeneratorDelegate","_x","_x2","stream","reader","_yield$_awaitAsyncGen","_context3","asyncIterator","getReader","_x3","trackStream","onProgress","onFinish","_onFinish","ReadableStream","pull","_callee3","_yield$iterator$next","_done","loadedBytes","_t2","_context4","close","enqueue","highWaterMark","CRLF","normalizeLines","escapeName","stringBytes","FormDataError","_TypeError","createMultipartBody","form","limit","limitError","boundary","generateString","crypto","getRandomValues","footer","parts","checkLength","extra","_step$value","valueLength","partLength","blobParts","_parts","formDataToBlob","isHexDigit","charCode","isPercentEncodedByte","hexValue","isBase64Char","isBase64Whitespace","estimatePercentDecodedBase64Bytes","body","significant","padding","invalid","floor","estimateBase64BufferAllocation","remainder","base64Bytes","estimateDataURLDecodedBytes","estimateBase64","base64Pattern","comma","meta","c","estimateDataURLBytes","VERSION","DEFAULT_REQUEST_OPTIONS","redirect","referrer","referrerPolicy","mode","integrity","keepalive","priority","decodeURIComponentSafe","maybeWithAuthCredentials","protocolIndex","urlToCheck","factory","globalObject","TextEncoder","Request","Response","envFetch","fetch","_env","isFetchSupported","isRequestSupported","isResponseSupported","isReadableStreamSupported","encodeText","arrayBuffer","supportsRequestStream","duplexAccessed","duplex","hasContentType","supportsResponseStream","requestDefaults","resolvers","res","getBodyLength","resolveBodyLength","getContentLength","_x4","_ref4","_callee4","_resolveConfig","_resolveConfig$withCr","fetchOptions","maxRedirects","hasMaxContentLength","hasMaxBodyLength","_fetch","composedSignal","requestContentLength","pendingBodyError","pendingResponseError","maxBodyLengthError","configAuth","parsedURL","urlUsername","urlPassword","formContentType","formBoundary","outboundLength","mustEnforceStreamBody","trackRequestStream","_request","contentTypeHeader","_ref6","flush","isCredentialsSupported","safeFetchOptions","resolvedOptions","declaredLength","isStreamResponse","responseContentLength","_ref7","_ref8","_onProgress","_flush","onChunkProgress","responseData","materializedSize","canceledError","networkError","_t3","_t4","toAbortSignal","credentials","cause","_x5","seedCache","getFetch","configuredEnv","seed","seeds","knownAdapters","http","fetchAdapter","renderReason","isResolvedHandle","adapters","getAdapter","nameOrAdapter","rejectedReasons","reasons","state","throwIfCancellationRequested","throwIfRequested","elapsedSince","dispatchRequest","duration","validators","deprecatedWarnings","validator","version","formatMessage","opt","desc","opts","console","warn","spelling","correctSpelling","assertOptions","schema","allowUnknown","isHeadersBucket","Axios","instanceConfig","interceptors","_request2","configOrUrl","dummy","dummyStack","firstNewlineIndex","_firstNewlineIndex","secondNewlineIndex","duplicateCheckSuffix","currentStack","causeIndex","stackHead","causeSection","captureStackTrace","baseUrl","withXsrfToken","commonHeaders","methodHeaders","contextHeaders","requestInterceptorChain","synchronousRequestInterceptors","interceptor","unshift","promise","responseInterceptorChain","chain","onFulfilled","onRejected","rejectedResult","rejectedError","generateHTTPMethod","isForm","_httpMethod","_x6","_x7","CancelToken","executor","resolvePromise","_listeners","onfulfilled","_resolve","splice","HttpStatusCode","Continue","SwitchingProtocols","Processing","EarlyHints","Ok","Created","Accepted","NonAuthoritativeInformation","NoContent","ResetContent","PartialContent","MultiStatus","AlreadyReported","ImUsed","MultipleChoices","MovedPermanently","Found","SeeOther","NotModified","UseProxy","Unused","TemporaryRedirect","PermanentRedirect","BadRequest","Unauthorized","PaymentRequired","Forbidden","NotFound","MethodNotAllowed","NotAcceptable","ProxyAuthenticationRequired","RequestTimeout","Conflict","Gone","LengthRequired","PreconditionFailed","PayloadTooLarge","ContentTooLarge","UriTooLong","UnsupportedMediaType","RangeNotSatisfiable","ExpectationFailed","ImATeapot","MisdirectedRequest","UnprocessableEntity","UnprocessableContent","Locked","FailedDependency","TooEarly","UpgradeRequired","PreconditionRequired","TooManyRequests","RequestHeaderFieldsTooLarge","UnavailableForLegalReasons","InternalServerError","NotImplemented","BadGateway","ServiceUnavailable","GatewayTimeout","HttpVersionNotSupported","VariantAlsoNegotiates","InsufficientStorage","LoopDetected","NotExtended","NetworkAuthenticationRequired","WebServerReturnsAnUnknownError","WebServerIsDown","ConnectionTimedOut","OriginIsUnreachable","TimeoutOccurred","SslHandshakeFailed","InvalidSslCertificate","axios","createInstance","defaultConfig","instance","Cancel","all","promises","spread","callback","payload","formToJSON"],"mappings":";;;giLASe,SAASA,EAAKC,EAAIC,GAC/B,OAAO,WACL,OAAOD,EAAGE,MAAMD,EAASE,UAC3B,CACF,mSCPA,IAiLiBC,EAjLTC,EAAaC,OAAOC,UAApBF,SACAG,EAAmBF,OAAnBE,eACAC,EAA0BC,OAA1BD,SAAUE,EAAgBD,OAAhBC,YAGZC,EACJ,WAAA,IAAGA,EAGHN,OAAOC,UAHJK,eAAc,OACjB,SAACC,EAAKC,GAAI,OACRF,EAAeG,KAAKF,EAAKC,EAAK,CAAA,CAFhC,GAKIE,EAAoB,SAACF,GAAI,MACb,iBAATA,IACG,cAATA,GAAiC,gBAATA,GAAmC,cAATA,EAAqB,EAgBpEG,EAAsB,SAACJ,EAAKN,EAAWW,GAAM,OACjDL,IAAQP,OAAOC,YAAeW,GAAwB,OAAdX,CAAmB,EA8CvDY,EAAyB,SAACC,EAAON,GAIrC,IAHA,IAAID,EAAMO,EACJC,EAAO,GAEC,MAAPR,GAAa,CAClB,IAA0B,IAAtBQ,EAAKC,QAAQT,GACf,OAAO,EAETQ,EAAKE,KAAKV,GAEV,IAAMN,EAAYC,EAAeK,GAEjC,GAAII,EAAoBJ,EAAKN,EAAWM,IAAQO,GAC9C,OAAO,EAGT,GAAIR,EAAeC,EAAKC,GACtB,OAAO,EAETD,EAAMN,CACR,CACA,OAAO,CACT,EA+EMiB,GAAWpB,EAGdE,OA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ASJ,GAAMniB,cAGrBmiB,GAAMK,IAAM,SAAaC,GACvB,OAAOpY,QAAQmY,IAAIC,EACrB,EAEAN,GAAMO,OC9CS,SAAgBC,GAC7B,OAAO,SAAcr5B,GACnB,OAAOq5B,EAASjlC,MAAM,KAAM4L,EAC9B,CACF,ED6CA64B,GAAMxtB,aE7DS,SAAsBiuB,GACnC,OAAO11B,GAAM/M,SAASyiC,KAAqC,IAAzBA,EAAQjuB,YAC5C,EF8DAwtB,GAAMzZ,YAAcA,GAEpByZ,GAAMtzB,aAAeA,GAErBszB,GAAMU,WAAa,SAACjkC,GAAK,OAAKoe,GAAe9P,GAAMxK,WAAW9D,GAAS,IAAIoC,SAASpC,GAASA,EAAM,EAEnGujC,GAAM/I,WAAaD,GAASC,WAE5B+I,GAAMzE,eAAiBA,GAEvByE,GAAK,QAAWA"} \ No newline at end of file diff --git a/node_modules/axios/dist/browser/axios.cjs b/node_modules/axios/dist/browser/axios.cjs new file mode 100644 index 0000000..9752cf7 --- /dev/null +++ b/node_modules/axios/dist/browser/axios.cjs @@ -0,0 +1,6526 @@ +/*! Axios v1.21.1 Copyright (c) 2026 Matt Zabriskie and contributors */ +'use strict'; + +/** + * Create a bound version of a function with a specified `this` context + * + * @param {Function} fn - The function to bind + * @param {*} thisArg - The value to be passed as the `this` parameter + * @returns {Function} A new function that will call the original function with the specified `this` context + */ +function bind(fn, thisArg) { + return function wrap() { + return fn.apply(thisArg, arguments); + }; +} + +// utils is a library of generic helper functions non-specific to axios + +const { toString } = Object.prototype; +const { getPrototypeOf } = Object; +const { iterator, toStringTag } = Symbol; + +/* Creating a function that will check if an object has a property. */ +const hasOwnProperty = ( + ({ hasOwnProperty }) => + (obj, prop) => + hasOwnProperty.call(obj, prop) +)(Object.prototype); + +const isUnsafeObjectKey = (prop) => + typeof prop === 'string' && + (prop === '__proto__' || prop === 'constructor' || prop === 'prototype'); + +/** + * Determine whether an inherited object must be treated as a shared-prototype + * boundary. Cross-realm Object.prototype objects cannot be distinguished + * reliably from application-created null-prototype objects because their + * properties are mutable, so all inherited terminal prototypes are excluded + * as a fail-closed boundary. A null-prototype source still keeps its own + * properties, as produced by mergeConfig and other safe materialization paths. + * + * @param {*} obj The object to inspect + * @param {*} prototype The object's prototype + * @param {boolean} source Whether obj is the original traversal source + * + * @returns {boolean} True when obj is a safe prototype traversal boundary + */ +const isPrototypeBoundary = (obj, prototype, source) => + obj === Object.prototype || (!source && prototype === null); + +/** + * Determine whether an object can retain its identity through code paths that + * add, replace, and remove config properties without bypassing unsafe-key + * filtering. Immutable objects, unsafe-key-bearing objects, and objects with + * accessor or restricted data properties must be materialized instead. + * + * @param {*} obj The object to inspect + * + * @returns {boolean} True when every own property is safe and fully mutable + */ +const isSafeAndFullyMutable = (obj) => { + if (!Object.isExtensible(obj)) { + return false; + } + + const props = Object.getOwnPropertyNames(obj); + + if (Object.getOwnPropertySymbols) { + props.push(...Object.getOwnPropertySymbols(obj)); + } + + return props.every((prop) => { + if (isUnsafeObjectKey(prop)) { + return false; + } + + const descriptor = Object.getOwnPropertyDescriptor(obj, prop); + + return !!descriptor && descriptor.configurable && descriptor.writable === true; + }); +}; + +/** + * Walk the prototype chain (excluding the source realm's Object.prototype) + * looking for an own `prop`. This distinguishes genuine own/inherited members + * — including class accessors and template prototypes — from members injected + * via Object.prototype pollution (e.g. `Object.prototype.username = '...'`), + * which live on Object.prototype itself and are therefore never matched. + * + * @param {*} thing The value whose chain to inspect + * @param {string|symbol} prop The property key to look for + * + * @returns {boolean} True when `prop` is owned below Object.prototype + */ +const hasOwnInPrototypeChain = (thing, prop) => { + let obj = thing; + const seen = []; + + while (obj != null) { + if (seen.indexOf(obj) !== -1) { + return false; + } + seen.push(obj); + + const prototype = getPrototypeOf(obj); + + if (isPrototypeBoundary(obj, prototype, obj === thing)) { + return false; + } + + if (hasOwnProperty(obj, prop)) { + return true; + } + obj = prototype; + } + return false; +}; + +/** + * Read `obj[prop]` only when it is safe from Object.prototype pollution. Own + * properties and members inherited from a non-Object.prototype source (a class + * instance or template object) are honored; a value reachable only through a + * polluted Object.prototype is ignored and `undefined` is returned. + * + * @param {*} obj The source object + * @param {string|symbol} prop The property key to read + * + * @returns {*} The resolved value, or undefined when unsafe/absent + */ +const getSafeProp = (obj, prop) => + obj != null && hasOwnInPrototypeChain(obj, prop) ? obj[prop] : undefined; + +/** + * Flatten an object and its application-defined prototype chain into a + * null-prototype object. Members inherited only from the source realm's + * Object.prototype are deliberately excluded, while class/template members + * below that boundary are preserved. + * + * @param {*} thing The value to flatten + * + * @returns {*} A null-prototype copy, or the original value when it is already + * structurally safe or is not an object + */ +const toSafeFlatObject = (thing) => { + if (thing == null || (typeof thing !== 'object' && typeof thing !== 'function')) { + return thing; + } + + const sourcePrototype = getPrototypeOf(thing); + + if (sourcePrototype === null && isSafeAndFullyMutable(thing)) { + return thing; + } + + const result = Object.create(null); + const merged = Object.create(null); + const seen = []; + let current = thing; + + while (current != null) { + if (seen.indexOf(current) !== -1) { + break; + } + + seen.push(current); + + const prototype = current === thing ? sourcePrototype : getPrototypeOf(current); + + if (isPrototypeBoundary(current, prototype, current === thing)) { + break; + } + + const props = Object.getOwnPropertyNames(current); + + if (Object.getOwnPropertySymbols) { + props.push(...Object.getOwnPropertySymbols(current)); + } + + for (const prop of props) { + if (isUnsafeObjectKey(prop)) { + continue; + } + + if (!hasOwnProperty(merged, prop)) { + result[prop] = thing[prop]; + merged[prop] = true; + } + } + + current = prototype; + } + + return result; +}; + +const kindOf = ((cache) => (thing) => { + const str = toString.call(thing); + return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase()); +})(Object.create(null)); + +const kindOfTest = (type) => { + type = type.toLowerCase(); + return (thing) => kindOf(thing) === type; +}; + +const typeOfTest = (type) => (thing) => typeof thing === type; + +/** + * Determine if a value is a non-null object + * + * @param {Object} val The value to test + * + * @returns {boolean} True if value is an Array, otherwise false + */ +const { isArray } = Array; + +/** + * Determine if a value is undefined + * + * @param {*} val The value to test + * + * @returns {boolean} True if the value is undefined, otherwise false + */ +const isUndefined = typeOfTest('undefined'); + +/** + * Determine if a value is a Buffer + * + * @param {*} val The value to test + * + * @returns {boolean} True if value is a Buffer, otherwise false + */ +function isBuffer(val) { + return ( + val !== null && + !isUndefined(val) && + val.constructor !== null && + !isUndefined(val.constructor) && + isFunction$1(val.constructor.isBuffer) && + val.constructor.isBuffer(val) + ); +} + +/** + * Determine if a value is an ArrayBuffer + * + * @param {*} val The value to test + * + * @returns {boolean} True if value is an ArrayBuffer, otherwise false + */ +const isArrayBuffer = kindOfTest('ArrayBuffer'); + +/** + * Determine if a value is a view on an ArrayBuffer + * + * @param {*} val The value to test + * + * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false + */ +function isArrayBufferView(val) { + let result; + if (typeof ArrayBuffer !== 'undefined' && ArrayBuffer.isView) { + result = ArrayBuffer.isView(val); + } else { + result = val && val.buffer && isArrayBuffer(val.buffer); + } + return result; +} + +/** + * Determine if a value is a String + * + * @param {*} val The value to test + * + * @returns {boolean} True if value is a String, otherwise false + */ +const isString = typeOfTest('string'); + +/** + * Determine if a value is a Function + * + * @param {*} val The value to test + * @returns {boolean} True if value is a Function, otherwise false + */ +const isFunction$1 = typeOfTest('function'); + +/** + * Determine if a value is a Number + * + * @param {*} val The value to test + * + * @returns {boolean} True if value is a Number, otherwise false + */ +const isNumber = typeOfTest('number'); + +/** + * Determine if a value is an Object + * + * @param {*} thing The value to test + * + * @returns {boolean} True if value is an Object, otherwise false + */ +const isObject = (thing) => thing !== null && typeof thing === 'object'; + +/** + * Determine if a value is a Boolean + * + * @param {*} thing The value to test + * @returns {boolean} True if value is a Boolean, otherwise false + */ +const isBoolean = (thing) => thing === true || thing === false; + +/** + * Determine if a value is a plain Object + * + * @param {*} val The value to test + * + * @returns {boolean} True if value is a plain Object, otherwise false + */ +const isPlainObject = (val) => { + if (!isObject(val)) { + return false; + } + + const prototype = getPrototypeOf(val); + return ( + (prototype === null || prototype === Object.prototype || getPrototypeOf(prototype) === null) && + // Treat own Symbol.toStringTag or Symbol.iterator members as evidence the + // value is tagged/iterable, ignoring members reachable only through shared + // or terminal prototype boundaries. This is exactly what + // hasOwnInPrototypeChain(val, prop) computes here: every prototype admitted + // above (null, Object.prototype, or a terminal null-prototype template) is + // a boundary, so the walk never inspects anything but `val`'s own members, + // and stops before even those when `val` is itself the boundary + // Object.prototype. Checking that inline avoids allocating the walker's + // `seen` list twice per call on the mergeConfig / merge hot path. + (isPrototypeBoundary(val, prototype, true) || + (!hasOwnProperty(val, toStringTag) && !hasOwnProperty(val, iterator))) + ); +}; + +/** + * Determine if a value is an empty object (safely handles Buffers) + * + * @param {*} val The value to test + * + * @returns {boolean} True if value is an empty object, otherwise false + */ +const isEmptyObject = (val) => { + // Early return for non-objects or Buffers to prevent RangeError + if (!isObject(val) || isBuffer(val)) { + return false; + } + + try { + return Object.keys(val).length === 0 && Object.getPrototypeOf(val) === Object.prototype; + } catch (e) { + // Fallback for any other objects that might cause RangeError with Object.keys() + return false; + } +}; + +/** + * Determine if a value is a Date + * + * @param {*} val The value to test + * + * @returns {boolean} True if value is a Date, otherwise false + */ +const isDate = kindOfTest('Date'); + +/** + * Determine if a value is a File + * + * @param {*} val The value to test + * + * @returns {boolean} True if value is a File, otherwise false + */ +const isFile = kindOfTest('File'); + +/** + * Determine if a value is a React Native Blob + * React Native "blob": an object with a `uri` attribute. Optionally, it can + * also have a `name` and `type` attribute to specify filename and content type + * + * @see https://github.com/facebook/react-native/blob/26684cf3adf4094eb6c405d345a75bf8c7c0bf88/Libraries/Network/FormData.js#L68-L71 + * + * @param {*} value The value to test + * + * @returns {boolean} True if value is a React Native Blob, otherwise false + */ +const isReactNativeBlob = (value) => { + return !!(value && typeof value.uri !== 'undefined'); +}; + +/** + * Determine if environment is React Native + * ReactNative `FormData` has a non-standard `getParts()` method + * + * @param {*} formData The formData to test + * + * @returns {boolean} True if environment is React Native, otherwise false + */ +const isReactNative = (formData) => formData && typeof formData.getParts !== 'undefined'; + +/** + * Determine if a value is a Blob + * + * @param {*} val The value to test + * + * @returns {boolean} True if value is a Blob, otherwise false + */ +const isBlob = kindOfTest('Blob'); + +/** + * Determine if a value is a FileList + * + * @param {*} val The value to test + * + * @returns {boolean} True if value is a FileList, otherwise false + */ +const isFileList = kindOfTest('FileList'); +const isSet = kindOfTest('Set'); + +/** + * Determine if a value is a Stream + * + * @param {*} val The value to test + * + * @returns {boolean} True if value is a Stream, otherwise false + */ +const isStream = (val) => isObject(val) && isFunction$1(val.pipe); + +/** + * Determine if a value is a FormData + * + * @param {*} thing The value to test + * + * @returns {boolean} True if value is an FormData, otherwise false + */ +function getGlobal() { + if (typeof globalThis !== 'undefined') return globalThis; + if (typeof self !== 'undefined') return self; + if (typeof window !== 'undefined') return window; + if (typeof global !== 'undefined') return global; + return {}; +} + +const G = getGlobal(); +const FormDataCtor = typeof G.FormData !== 'undefined' ? G.FormData : undefined; + +const isFormData = (thing) => { + if (!thing) return false; + if (FormDataCtor && thing instanceof FormDataCtor) return true; + // Reject plain objects inheriting directly from Object.prototype so prototype-pollution gadgets can't spoof FormData. + const proto = getPrototypeOf(thing); + if (!proto || proto === Object.prototype) return false; + if (!isFunction$1(thing.append)) return false; + const kind = kindOf(thing); + return ( + kind === 'formdata' || + // detect form-data instance + (kind === 'object' && isFunction$1(thing.toString) && thing.toString() === '[object FormData]') + ); +}; + +/** + * Determine if a value is a URLSearchParams object + * + * @param {*} val The value to test + * + * @returns {boolean} True if value is a URLSearchParams object, otherwise false + */ +const isURLSearchParams = kindOfTest('URLSearchParams'); + +const [isReadableStream, isRequest, isResponse, isHeaders] = [ + 'ReadableStream', + 'Request', + 'Response', + 'Headers', +].map(kindOfTest); + +/** + * Trim excess whitespace off the beginning and end of a string + * + * @param {String} str The String to trim + * + * @returns {String} The String freed of excess whitespace + */ +const trim = (str) => { + return str.trim ? str.trim() : str.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, ''); +}; +/** + * Iterate over an Array or an Object invoking a function for each item. + * + * If `obj` is an Array callback will be called passing + * the value, index, and complete array for each item. + * + * If 'obj' is an Object callback will be called passing + * the value, key, and complete object for each property. + * + * @param {Object|Array} obj The object to iterate + * @param {Function} fn The callback to invoke for each item + * + * @param {Object} [options] + * @param {Boolean} [options.allOwnKeys = false] + * @returns {any} + */ +function forEach(obj, fn, { allOwnKeys = false } = {}) { + // Don't bother if no value provided + if (obj === null || typeof obj === 'undefined') { + return; + } + + let i; + let l; + + // Force an array if not already something iterable + if (typeof obj !== 'object') { + /*eslint no-param-reassign:0*/ + obj = [obj]; + } + + if (isArray(obj)) { + // Iterate over array values + for (i = 0, l = obj.length; i < l; i++) { + fn.call(null, obj[i], i, obj); + } + } else { + // Buffer check + if (isBuffer(obj)) { + return; + } + + // Iterate over object keys + const keys = allOwnKeys ? Object.getOwnPropertyNames(obj) : Object.keys(obj); + const len = keys.length; + let key; + + for (i = 0; i < len; i++) { + key = keys[i]; + fn.call(null, obj[key], key, obj); + } + } +} + +/** + * Finds a key in an object, case-insensitive, returning the actual key name. + * Returns null if the object is a Buffer or if no match is found. + * + * @param {Object} obj - The object to search. + * @param {string} key - The key to find (case-insensitive). + * @returns {?string} The actual key name if found, otherwise null. + */ +function findKey(obj, key) { + if (isBuffer(obj)) { + return null; + } + + key = key.toLowerCase(); + const keys = Object.keys(obj); + let i = keys.length; + let _key; + while (i-- > 0) { + _key = keys[i]; + if (key === _key.toLowerCase()) { + return _key; + } + } + return null; +} + +const _global = (() => { + /*eslint no-undef:0*/ + if (typeof globalThis !== 'undefined') return globalThis; + return typeof self !== 'undefined' ? self : typeof window !== 'undefined' ? window : global; +})(); + +const isContextDefined = (context) => !isUndefined(context) && context !== _global; + +/** + * Accepts varargs expecting each argument to be an object, then + * immutably merges the properties of each object and returns result. + * + * When multiple objects contain the same key the later object in + * the arguments list will take precedence. + * + * Example: + * + * ```js + * const result = merge({foo: 123}, {foo: 456}); + * console.log(result.foo); // outputs 456 + * ``` + * + * @param {Object} obj1 Object to merge + * + * @returns {Object} Result of all merge properties + */ +function merge(...objs) { + const { caseless, skipUndefined } = (isContextDefined(this) && this) || {}; + const result = {}; + // Caseless lookup only applies to string keys — symbol keys are + // identity-matched. Every string key that reaches `result` passes through + // this index first, so it can never hold two case variants of one key and a + // lowercase -> key map is exactly what findKey(result, key) would rescan + // Object.keys(result) for on each assignment. + const lowerCaseKeys = caseless ? Object.create(null) : null; + const assignValue = (val, key) => { + // Skip dangerous property names to prevent prototype pollution + if (key === '__proto__' || key === 'constructor' || key === 'prototype') { + return; + } + + let targetKey = key; + if (lowerCaseKeys && typeof key === 'string') { + const lowerKey = key.toLowerCase(); + const knownKey = lowerCaseKeys[lowerKey]; + // A key recorded but absent from `result` was skipped by skipUndefined; + // the later spelling wins then, as it does for findKey. + if (knownKey !== undefined && hasOwnProperty(result, knownKey)) { + targetKey = knownKey; + } else { + lowerCaseKeys[lowerKey] = key; + } + } + // Read via own-prop only — a bare `result[targetKey]` walks the prototype + // chain, so a polluted Object.prototype value could surface here and get + // copied into the merged result. + const existing = hasOwnProperty(result, targetKey) ? result[targetKey] : undefined; + if (isPlainObject(existing) && isPlainObject(val)) { + result[targetKey] = merge(existing, val); + } else if (isPlainObject(val)) { + result[targetKey] = merge({}, val); + } else if (isArray(val)) { + result[targetKey] = val.slice(); + } else if (!skipUndefined || !isUndefined(val)) { + result[targetKey] = val; + } + }; + + for (let i = 0, l = objs.length; i < l; i++) { + const source = objs[i]; + if (!source || isBuffer(source)) { + continue; + } + + forEach(source, assignValue); + + if (typeof source !== 'object' || isArray(source) || !Object.getOwnPropertySymbols) { + continue; + } + + const symbols = Object.getOwnPropertySymbols(source); + for (let j = 0; j < symbols.length; j++) { + const symbol = symbols[j]; + if (propertyIsEnumerable.call(source, symbol)) { + assignValue(source[symbol], symbol); + } + } + } + return result; +} + +/** + * Extends object a by mutably adding to it the properties of object b. + * + * @param {Object} a The object to be extended + * @param {Object} b The object to copy properties from + * @param {Object} thisArg The object to bind function to + * + * @param {Object} [options] + * @param {Boolean} [options.allOwnKeys] + * @returns {Object} The resulting value of object a + */ +const extend = (a, b, thisArg, { allOwnKeys } = {}) => { + forEach( + b, + (val, key) => { + if (thisArg && isFunction$1(val)) { + Object.defineProperty(a, key, { + // Null-proto descriptor so a polluted Object.prototype.get cannot + // hijack defineProperty's accessor-vs-data resolution. + __proto__: null, + value: bind(val, thisArg), + writable: true, + enumerable: true, + configurable: true, + }); + } else { + Object.defineProperty(a, key, { + __proto__: null, + value: val, + writable: true, + enumerable: true, + configurable: true, + }); + } + }, + { allOwnKeys } + ); + return a; +}; + +/** + * Remove byte order marker. This catches EF BB BF (the UTF-8 BOM) + * + * @param {string} content with BOM + * + * @returns {string} content value without BOM + */ +const stripBOM = (content) => { + if (content.charCodeAt(0) === 0xfeff) { + content = content.slice(1); + } + return content; +}; + +/** + * Inherit the prototype methods from one constructor into another + * @param {function} constructor + * @param {function} superConstructor + * @param {object} [props] + * @param {object} [descriptors] + * + * @returns {void} + */ +const inherits = (constructor, superConstructor, props, descriptors) => { + constructor.prototype = Object.create(superConstructor.prototype, descriptors); + Object.defineProperty(constructor.prototype, 'constructor', { + __proto__: null, + value: constructor, + writable: true, + enumerable: false, + configurable: true, + }); + Object.defineProperty(constructor, 'super', { + __proto__: null, + value: superConstructor.prototype, + }); + props && Object.assign(constructor.prototype, props); +}; + +/** + * Resolve object with deep prototype chain to a flat object + * @param {Object} sourceObj source object + * @param {Object} [destObj] + * @param {Function|Boolean} [filter] + * @param {Function} [propFilter] + * + * @returns {Object} + */ +const toFlatObject = (sourceObj, destObj, filter, propFilter) => { + let props; + let i; + let prop; + const merged = {}; + + destObj = destObj || {}; + // eslint-disable-next-line no-eq-null,eqeqeq + if (sourceObj == null) return destObj; + + do { + props = Object.getOwnPropertyNames(sourceObj); + i = props.length; + while (i-- > 0) { + prop = props[i]; + if ((!propFilter || propFilter(prop, sourceObj, destObj)) && !merged[prop]) { + destObj[prop] = sourceObj[prop]; + merged[prop] = true; + } + } + sourceObj = filter !== false && getPrototypeOf(sourceObj); + } while (sourceObj && (!filter || filter(sourceObj, destObj)) && sourceObj !== Object.prototype); + + return destObj; +}; + +/** + * Determines whether a string ends with the characters of a specified string + * + * @param {String} str + * @param {String} searchString + * @param {Number} [position= 0] + * + * @returns {boolean} + */ +const endsWith = (str, searchString, position) => { + str = String(str); + if (position === undefined || position > str.length) { + position = str.length; + } + position -= searchString.length; + const lastIndex = str.indexOf(searchString, position); + return lastIndex !== -1 && lastIndex === position; +}; + +/** + * Returns new array from array like object or null if failed + * + * @param {*} [thing] + * + * @returns {?Array} + */ +const toArray = (thing) => { + if (!thing) return null; + if (isArray(thing)) return thing; + let i = thing.length; + if (!Number.isSafeInteger(i) || i < 0 || i > 0xffffffff) return null; + + // Bound the copy by actual indexed properties, including hidden and inherited + // members of array-like collections, rather than by the declared length alone. + const indexes = new Set(); + const seen = new Set(); + let source = thing; + + while (source != null && indexes.size < i) { + if (seen.has(source)) return null; + seen.add(source); + + const prototype = getPrototypeOf(source); + if (isPrototypeBoundary(source, prototype, source === thing)) break; + + Object.getOwnPropertyNames(source).forEach((key) => { + const index = +key; + if ( + Number.isInteger(index) && + index >= 0 && + index < i && + String(index) === key && + hasOwnProperty(source, key) + ) { + indexes.add(index); + } + }); + source = prototype; + } + + if (indexes.size !== i) return null; + const arr = new Array(i); + while (i-- > 0) { + arr[i] = thing[i]; + } + return arr; +}; + +/** + * Checking if the Uint8Array exists and if it does, it returns a function that checks if the + * thing passed in is an instance of Uint8Array + * + * @param {TypedArray} + * + * @returns {Array} + */ +// eslint-disable-next-line func-names +const isTypedArray = ((TypedArray) => { + // eslint-disable-next-line func-names + return (thing) => { + return TypedArray && thing instanceof TypedArray; + }; +})(typeof Uint8Array !== 'undefined' && getPrototypeOf(Uint8Array)); + +/** + * For each entry in the object, call the function with the key and value. + * + * @param {Object} obj - The object to iterate over. + * @param {Function} fn - The function to call for each entry. + * + * @returns {void} + */ +const forEachEntry = (obj, fn) => { + const generator = obj && obj[iterator]; + + const _iterator = generator.call(obj); + + let result; + + while ((result = _iterator.next()) && !result.done) { + const pair = result.value; + fn.call(obj, pair[0], pair[1]); + } +}; + +/** + * It takes a regular expression and a string, and returns an array of all the matches + * + * @param {string} regExp - The regular expression to match against. + * @param {string} str - The string to search. + * + * @returns {Array} + */ +const matchAll = (regExp, str) => { + let matches; + const arr = []; + + while ((matches = regExp.exec(str)) !== null) { + arr.push(matches); + } + + return arr; +}; + +/* Checking if the kindOfTest function returns true when passed an HTMLFormElement. */ +const isHTMLForm = kindOfTest('HTMLFormElement'); + +const toCamelCase = (str) => { + return str.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g, function replacer(m, p1, p2) { + return p1.toUpperCase() + p2; + }); +}; + +const { propertyIsEnumerable } = Object.prototype; + +/** + * Determine if a value is a RegExp object + * + * @param {*} val The value to test + * + * @returns {boolean} True if value is a RegExp object, otherwise false + */ +const isRegExp = kindOfTest('RegExp'); + +const reduceDescriptors = (obj, reducer) => { + const descriptors = Object.getOwnPropertyDescriptors(obj); + const reducedDescriptors = {}; + + forEach(descriptors, (descriptor, name) => { + let ret; + if ((ret = reducer(descriptor, name, obj)) !== false) { + reducedDescriptors[name] = ret || descriptor; + } + }); + + Object.defineProperties(obj, reducedDescriptors); +}; + +/** + * Makes all methods read-only + * @param {Object} obj + */ + +const freezeMethods = (obj) => { + reduceDescriptors(obj, (descriptor, name) => { + // skip restricted props in strict mode + if (isFunction$1(obj) && ['arguments', 'caller', 'callee'].includes(name)) { + return false; + } + + const value = obj[name]; + + if (!isFunction$1(value)) return; + + descriptor.enumerable = false; + + if ('writable' in descriptor) { + descriptor.writable = false; + return; + } + + if (!descriptor.set) { + descriptor.set = () => { + throw Error("Can not rewrite read-only method '" + name + "'"); + }; + } + }); +}; + +/** + * Converts an array or a delimited string into an object set with values as keys and true as values. + * Useful for fast membership checks. + * + * @param {Array|string} arrayOrString - The array or string to convert. + * @param {string} delimiter - The delimiter to use if input is a string. + * @returns {Object} An object with keys from the array or string, values set to true. + */ +const toObjectSet = (arrayOrString, delimiter) => { + const obj = {}; + + const define = (arr) => { + arr.forEach((value) => { + obj[value] = true; + }); + }; + + isArray(arrayOrString) ? define(arrayOrString) : define(String(arrayOrString).split(delimiter)); + + return obj; +}; + +const noop = () => {}; + +const toFiniteNumber = (value, defaultValue) => { + return value != null && Number.isFinite((value = +value)) ? value : defaultValue; +}; + +/** + * If the thing is a FormData object, return true, otherwise return false. + * + * @param {unknown} thing - The thing to check. + * + * @returns {boolean} + */ +function isSpecCompliantForm(thing) { + return !!( + thing && + isFunction$1(thing.append) && + thing[toStringTag] === 'FormData' && + thing[iterator] + ); +} + +/** + * Recursively converts an object to a JSON-compatible object, handling circular references and Buffers. + * + * @param {Object} obj - The object to convert. + * @returns {Object} The JSON-compatible object. + */ +const toJSONObject = (obj) => { + const visited = new WeakSet(); + + const visit = (source) => { + if (isObject(source)) { + if (visited.has(source)) { + return; + } + + //Buffer check + if (isBuffer(source)) { + return source; + } + + if (!('toJSON' in source)) { + // add-on descent / delete-on-ascent: preserves path semantics, so DAG nodes serialise at every occurrence (see #7230). + visited.add(source); + + let target; + + if (isSet(source)) { + target = []; + for (const value of source) { + const reducedValue = visit(value); + !isUndefined(reducedValue) && target.push(reducedValue); + } + } else { + target = isArray(source) ? [] : {}; + + forEach(source, (value, key) => { + const reducedValue = visit(value); + !isUndefined(reducedValue) && (target[key] = reducedValue); + }); + } + + visited.delete(source); + + return target; + } + } + + return source; + }; + + return visit(obj); +}; + +/** + * Determines if a value is an async function. + * + * @param {*} thing - The value to test. + * @returns {boolean} True if value is an async function, otherwise false. + */ +const isAsyncFn = kindOfTest('AsyncFunction'); + +/** + * Determines if a value is thenable (has then and catch methods). + * + * @param {*} thing - The value to test. + * @returns {boolean} True if value is thenable, otherwise false. + */ +const isThenable = (thing) => + thing && + (isObject(thing) || isFunction$1(thing)) && + isFunction$1(thing.then) && + isFunction$1(thing.catch); + +// original code +// https://github.com/DigitalBrainJS/AxiosPromise/blob/16deab13710ec09779922131f3fa5954320f83ab/lib/utils.js#L11-L34 + +/** + * Provides a cross-platform setImmediate implementation. + * Uses native setImmediate if available, otherwise falls back to postMessage or setTimeout. + * + * @param {boolean} setImmediateSupported - Whether setImmediate is supported. + * @param {boolean} postMessageSupported - Whether postMessage is supported. + * @returns {Function} A function to schedule a callback asynchronously. + */ +const _setImmediate = ((setImmediateSupported, postMessageSupported) => { + if (setImmediateSupported) { + return setImmediate; + } + + return postMessageSupported + ? ((token, callbacks) => { + _global.addEventListener( + 'message', + ({ source, data }) => { + if (source === _global && data === token) { + callbacks.length && callbacks.shift()(); + } + }, + false + ); + + return (cb) => { + callbacks.push(cb); + _global.postMessage(token, '*'); + }; + })(`axios@${Math.random()}`, []) + : (cb) => setTimeout(cb); +})(typeof setImmediate === 'function', isFunction$1(_global.postMessage)); + +/** + * Schedules a microtask or asynchronous callback as soon as possible. + * Uses queueMicrotask if available, otherwise falls back to process.nextTick or _setImmediate. + * + * @type {Function} + */ +const asap = + typeof queueMicrotask !== 'undefined' + ? queueMicrotask.bind(_global) + : (typeof process !== 'undefined' && process.nextTick) || _setImmediate; + +// ********************* + +const isIterable = (thing) => thing != null && isFunction$1(thing[iterator]); + +/** + * Determine if a value is iterable via an iterator that is NOT sourced solely + * from a polluted Object.prototype. Use this instead of `isIterable` whenever + * the iterable comes from untrusted input (e.g. user-supplied header sources), + * so `Object.prototype[Symbol.iterator] = ...` cannot turn an ordinary object + * into an attacker-controlled entries iterator. + * + * @param {*} thing The value to test + * + * @returns {boolean} True if value has a non-polluted iterator + */ +const isSafeIterable = (thing) => + thing != null && hasOwnInPrototypeChain(thing, iterator) && isIterable(thing); + +var utils$1 = { + isArray, + isArrayBuffer, + isBuffer, + isFormData, + isArrayBufferView, + isString, + isNumber, + isBoolean, + isObject, + isPlainObject, + isEmptyObject, + isReadableStream, + isRequest, + isResponse, + isHeaders, + isUndefined, + isDate, + isFile, + isReactNativeBlob, + isReactNative, + isBlob, + isRegExp, + isFunction: isFunction$1, + isStream, + isURLSearchParams, + isTypedArray, + isFileList, + forEach, + merge, + extend, + trim, + stripBOM, + inherits, + toFlatObject, + kindOf, + kindOfTest, + endsWith, + toArray, + forEachEntry, + matchAll, + isHTMLForm, + hasOwnProperty, + hasOwnProp: hasOwnProperty, // an alias to avoid ESLint no-prototype-builtins detection + hasOwnInPrototypeChain, + getSafeProp, + toSafeFlatObject, + reduceDescriptors, + freezeMethods, + toObjectSet, + toCamelCase, + noop, + toFiniteNumber, + findKey, + global: _global, + isContextDefined, + isSpecCompliantForm, + toJSONObject, + isAsyncFn, + isThenable, + setImmediate: _setImmediate, + asap, + isIterable, + isSafeIterable, +}; + +// RawAxiosHeaders whose duplicates are ignored by node +// c.f. https://nodejs.org/api/http.html#http_message_headers +const ignoreDuplicateOf = utils$1.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', +]); + +/** + * Parse headers into an object + * + * ``` + * Date: Wed, 27 Aug 2014 08:58:49 GMT + * Content-Type: application/json + * Connection: keep-alive + * Transfer-Encoding: chunked + * ``` + * + * @param {String} rawHeaders Headers needing to be parsed + * + * @returns {Object} Headers parsed into an object + */ +var parseHeaders = (rawHeaders) => { + // Header names are data, including __proto__; avoid inherited setters. + const parsed = Object.create(null); + let key; + let val; + let i; + + rawHeaders && + rawHeaders.split('\n').forEach(function parser(line) { + i = line.indexOf(':'); + key = line.substring(0, i).trim().toLowerCase(); + val = line.substring(i + 1).trim(); + + const hasKey = utils$1.hasOwnProp(parsed, key); + + if (!key || (hasKey && utils$1.hasOwnProp(ignoreDuplicateOf, key))) { + return; + } + + if (key === 'set-cookie') { + if (hasKey) { + parsed[key].push(val); + } else { + parsed[key] = [val]; + } + } else { + parsed[key] = hasKey ? parsed[key] + ', ' + val : val; + } + }); + + return parsed; +}; + +function trimSPorHTAB(str) { + let start = 0; + let end = str.length; + + while (start < end) { + const code = str.charCodeAt(start); + + if (code !== 0x09 && code !== 0x20) { + break; + } + + start += 1; + } + + while (end > start) { + const code = str.charCodeAt(end - 1); + + if (code !== 0x09 && code !== 0x20) { + break; + } + + end -= 1; + } + + return start === 0 && end === str.length ? str : str.slice(start, end); +} + +// The control-code ranges are intentional: header sanitization strips C0/DEL bytes. +// eslint-disable-next-line no-control-regex +const INVALID_UNICODE_HEADER_VALUE_CHARS = new RegExp('[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+', 'g'); +// eslint-disable-next-line no-control-regex +const INVALID_BYTE_STRING_HEADER_VALUE_CHARS = new RegExp('[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+', 'g'); + +function sanitizeValue(value, invalidChars) { + if (utils$1.isArray(value)) { + return value.map((item) => sanitizeValue(item, invalidChars)); + } + + return trimSPorHTAB(String(value).replace(invalidChars, '')); +} + +const sanitizeHeaderValue = (value) => + sanitizeValue(value, INVALID_UNICODE_HEADER_VALUE_CHARS); + +const sanitizeByteStringHeaderValue = (value) => + sanitizeValue(value, INVALID_BYTE_STRING_HEADER_VALUE_CHARS); + +function toByteStringHeaderObject(headers) { + const byteStringHeaders = Object.create(null); + + utils$1.forEach(headers.toJSON(), (value, header) => { + byteStringHeaders[header] = sanitizeByteStringHeaderValue(value); + }); + + return byteStringHeaders; +} + +const $internals$1 = Symbol('internals'); + +function normalizeHeader(header) { + return header && String(header).trim().toLowerCase(); +} + +function normalizeValue(value) { + if (value === false || value == null) { + return value; + } + + return utils$1.isArray(value) ? value.map(normalizeValue) : sanitizeHeaderValue(String(value)); +} + +function parseTokens(str) { + const tokens = Object.create(null); + const tokensRE = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g; + let match; + + while ((match = tokensRE.exec(str))) { + tokens[match[1]] = match[2]; + } + + return tokens; +} + +const parameterNameRE = /^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/; + +function trimOWS(value) { + let start = 0; + let end = value.length; + + while (start < end) { + const code = value.charCodeAt(start); + + if (code !== 0x09 && code !== 0x20) { + break; + } + + start += 1; + } + + while (end > start) { + const code = value.charCodeAt(end - 1); + + if (code !== 0x09 && code !== 0x20) { + break; + } + + end -= 1; + } + + return start === 0 && end === value.length ? value : value.slice(start, end); +} + +function decodeQuotedString(value) { + const last = value.length - 1; + + if (last < 1 || value.charCodeAt(0) !== 0x22 || value.charCodeAt(last) !== 0x22) { + return value; + } + + let decoded = ''; + + for (let i = 1; i < last; i++) { + const code = value.charCodeAt(i); + + if (code === 0x22) { + return value; + } + + if (code === 0x5c) { + i += 1; + + if (i >= last) { + return value; + } + } + + decoded += value[i]; + } + + return decoded; +} + +function parseParameters(value) { + const parameters = Object.create(null); + const str = String(value); + let start = 0; + let quoted = false; + let escaped = false; + + function parseParameter(end) { + const part = trimOWS(str.slice(start, end)); + const equals = part.indexOf('='); + + if (equals < 1) { + return; + } + + const name = trimOWS(part.slice(0, equals)); + + if (!parameterNameRE.test(name)) { + return; + } + + const normalizedName = name.toLowerCase(); + + if ( + normalizedName === '__proto__' || + normalizedName === 'constructor' || + normalizedName === 'prototype' + ) { + return; + } + + const parameterValue = trimOWS(part.slice(equals + 1)); + parameters[normalizedName] = decodeQuotedString(parameterValue); + } + + for (let i = 0; i < str.length; i++) { + const code = str.charCodeAt(i); + + if (quoted) { + if (escaped) { + escaped = false; + } else if (code === 0x5c) { + escaped = true; + } else if (code === 0x22) { + quoted = false; + } + } else if (code === 0x22) { + quoted = true; + } else if (code === 0x2c || code === 0x3b) { + parseParameter(i); + start = i + 1; + } + } + + parseParameter(str.length); + + return parameters; +} + +const isValidHeaderName = (str) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim()); + +// `__proto__` is a valid field name, and the one name the uppercase mapping at +// the bottom of this file cannot reach: it is inherited from Object.prototype +// instead of being declared on AxiosHeaders.prototype, so `self.__proto__ = v` +// runs the inherited setter. That silently discards the header, and an array +// value replaces the instance prototype, taking every method with it. +// Store it under the same kind of case variant that mapping uses for `set` and +// `constructor`. Header lookup is caseless, so it reads back under either +// spelling, and no own `__proto__` slot is ever created for a later +// `Object.assign` to copy onto a plain object through the same setter. +const PROTO_HEADER_SLOT = '__Proto__'; + +const headerSlot = (name) => (name === '__proto__' ? PROTO_HEADER_SLOT : name); + +function matchHeaderValue(context, value, header, filter, isHeaderNameFilter) { + if (utils$1.isFunction(filter)) { + return filter.call(context, value, header); + } + + if (isHeaderNameFilter) { + value = header; + } + + if (!utils$1.isString(value)) return; + + if (utils$1.isString(filter)) { + return value.indexOf(filter) !== -1; + } + + if (utils$1.isRegExp(filter)) { + return filter.test(value); + } +} + +function formatHeader(header) { + return header + .trim() + .toLowerCase() + .replace(/([a-z\d])(\w*)/g, (w, char, str) => { + return char.toUpperCase() + str; + }); +} + +function buildAccessors(obj, header) { + const accessorName = utils$1.toCamelCase(' ' + header); + + ['get', 'set', 'has'].forEach((methodName) => { + Object.defineProperty(obj, methodName + accessorName, { + // Null-proto descriptor so a polluted Object.prototype.get cannot turn + // this data descriptor into an accessor descriptor on the way in. + __proto__: null, + value: function (arg1, arg2, arg3) { + return this[methodName].call(this, header, arg1, arg2, arg3); + }, + configurable: true, + }); + }); +} + +class AxiosHeaders { + constructor(headers) { + headers && this.set(headers); + } + + set(header, valueOrRewrite, rewrite) { + const self = this; + + function setHeader(_value, _header, _rewrite) { + const lHeader = normalizeHeader(_header); + + if (!lHeader) { + return; + } + + const key = utils$1.findKey(self, lHeader); + + if ( + !key || + self[key] === undefined || + _rewrite === true || + (_rewrite === undefined && self[key] !== false) + ) { + self[headerSlot(key || _header)] = normalizeValue(_value); + } + } + + const setHeaders = (headers, _rewrite) => + utils$1.forEach(headers, (_value, _header) => setHeader(_value, _header, _rewrite)); + + if (utils$1.isPlainObject(header) || header instanceof this.constructor) { + setHeaders(header, valueOrRewrite); + } else if (utils$1.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) { + setHeaders(parseHeaders(header), valueOrRewrite); + } else if (utils$1.isObject(header) && utils$1.isSafeIterable(header)) { + let obj = Object.create(null), + dest, + key; + for (const entry of header) { + if (!utils$1.isArray(entry)) { + throw new TypeError('Object iterator must return a key-value pair'); + } + + key = entry[0]; + + if (utils$1.hasOwnProp(obj, key)) { + dest = obj[key]; + obj[key] = utils$1.isArray(dest) ? [...dest, entry[1]] : [dest, entry[1]]; + } else { + obj[key] = entry[1]; + } + } + + setHeaders(obj, valueOrRewrite); + } else { + header != null && setHeader(valueOrRewrite, header, rewrite); + } + + return this; + } + + get(header, parser) { + header = normalizeHeader(header); + + if (header) { + const key = utils$1.findKey(this, header); + + if (key) { + const value = this[key]; + + if (!parser) { + return value; + } + + if (parser === true) { + return parseTokens(value); + } + + if (utils$1.isFunction(parser)) { + return parser.call(this, value, key); + } + + if (utils$1.isRegExp(parser)) { + return parser.exec(value); + } + + throw new TypeError('parser must be boolean|regexp|function'); + } + } + } + + has(header, matcher) { + header = normalizeHeader(header); + + if (header) { + const key = utils$1.findKey(this, header); + + return !!( + key && + this[key] !== undefined && + (!matcher || matchHeaderValue(this, this[key], key, matcher)) + ); + } + + return false; + } + + delete(header, matcher) { + const self = this; + let deleted = false; + + function deleteHeader(_header) { + _header = normalizeHeader(_header); + + if (_header) { + const key = utils$1.findKey(self, _header); + + if (key && (!matcher || matchHeaderValue(self, self[key], key, matcher))) { + delete self[key]; + + deleted = true; + } + } + } + + if (utils$1.isArray(header)) { + header.forEach(deleteHeader); + } else { + deleteHeader(header); + } + + return deleted; + } + + clear(matcher) { + const keys = Object.keys(this); + let i = keys.length; + let deleted = false; + + while (i--) { + const key = keys[i]; + if (!matcher || matchHeaderValue(this, this[key], key, matcher, true)) { + delete this[key]; + deleted = true; + } + } + + return deleted; + } + + normalize(format) { + const self = this; + const headers = Object.create(null); + + utils$1.forEach(this, (value, header) => { + const key = utils$1.findKey(headers, header); + + if (key) { + self[key] = normalizeValue(value); + delete self[header]; + return; + } + + const normalized = headerSlot(format ? formatHeader(header) : String(header).trim()); + + if (normalized !== header) { + delete self[header]; + } + + self[normalized] = normalizeValue(value); + + headers[normalized] = true; + }); + + return this; + } + + concat(...targets) { + return this.constructor.concat(this, ...targets); + } + + toJSON(asStrings) { + const obj = Object.create(null); + + utils$1.forEach(this, (value, header) => { + value != null && + value !== false && + (obj[header] = asStrings && utils$1.isArray(value) ? value.join(', ') : value); + }); + + return obj; + } + + [Symbol.iterator]() { + return Object.entries(this.toJSON())[Symbol.iterator](); + } + + toString() { + return Object.entries(this.toJSON()) + .map(([header, value]) => header + ': ' + value) + .join('\n'); + } + + getSetCookie() { + const value = this.get('set-cookie'); + return utils$1.isArray(value) ? value : value == null || value === false ? [] : [value]; + } + + get [Symbol.toStringTag]() { + return 'AxiosHeaders'; + } + + static from(thing) { + return thing instanceof this ? thing : new this(thing); + } + + static parseParameters(value) { + return parseParameters(value); + } + + static concat(first, ...targets) { + const computed = new this(first); + + targets.forEach((target) => computed.set(target)); + + return computed; + } + + static accessor(header) { + const internals = + (this[$internals$1] = + this[$internals$1] = + { + accessors: {}, + }); + + const accessors = internals.accessors; + const prototype = this.prototype; + + function defineAccessor(_header) { + const lHeader = normalizeHeader(_header); + + if (!accessors[lHeader]) { + buildAccessors(prototype, _header); + accessors[lHeader] = true; + } + } + + utils$1.isArray(header) ? header.forEach(defineAccessor) : defineAccessor(header); + + return this; + } +} + +AxiosHeaders.accessor([ + 'Content-Type', + 'Content-Length', + 'Accept', + 'Accept-Encoding', + 'User-Agent', + 'Authorization', +]); + +// reserved names hotfix +utils$1.reduceDescriptors(AxiosHeaders.prototype, ({ value }, key) => { + let mapped = key[0].toUpperCase() + key.slice(1); // map `set` => `Set` + return { + get: () => value, + set(headerValue) { + this[mapped] = headerValue; + }, + }; +}); + +utils$1.freezeMethods(AxiosHeaders); + +const REDACTED = '[REDACTED ****]'; + +function hasOwnOrPrototypeToJSON(source) { + if (utils$1.hasOwnProp(source, 'toJSON')) { + return true; + } + + let prototype = Object.getPrototypeOf(source); + + while (prototype && prototype !== Object.prototype) { + if (utils$1.hasOwnProp(prototype, 'toJSON')) { + return true; + } + + prototype = Object.getPrototypeOf(prototype); + } + + return false; +} + +// Build a plain-object snapshot of `config` and replace the value of any key +// (case-insensitive) listed in `redactKeys` with REDACTED. Walks through arrays +// and AxiosHeaders, and short-circuits on circular references. +function redactConfig(config, redactKeys) { + const lowerKeys = new Set(redactKeys.map((k) => String(k).toLowerCase())); + const seen = []; + + const visit = (source) => { + if (source === null || typeof source !== 'object') return source; + if (utils$1.isBuffer(source)) return source; + if (seen.indexOf(source) !== -1) return undefined; + + if (source instanceof AxiosHeaders) { + source = source.toJSON(); + } + + seen.push(source); + + let result; + if (utils$1.isArray(source)) { + result = []; + source.forEach((v, i) => { + const reducedValue = visit(v); + if (!utils$1.isUndefined(reducedValue)) { + result[i] = reducedValue; + } + }); + } else { + if (!utils$1.isPlainObject(source) && hasOwnOrPrototypeToJSON(source)) { + seen.pop(); + return source; + } + + result = Object.create(null); + for (const [key, value] of Object.entries(source)) { + const reducedValue = lowerKeys.has(key.toLowerCase()) ? REDACTED : visit(value); + if (!utils$1.isUndefined(reducedValue)) { + result[key] = reducedValue; + } + } + } + + seen.pop(); + return result; + }; + + return visit(config); +} + +function stringifySafely$1(value) { + try { + return String(value); + } catch (err) { + return ''; + } +} + +function aggregateErrorMessage(error) { + const message = error.errors + .map((entry) => { + try { + return entry && entry.message ? stringifySafely$1(entry.message) : stringifySafely$1(entry); + } catch (err) { + return ''; + } + }) + .filter(Boolean) + .join('; '); + + return message || error.name || 'AggregateError'; +} + +// Shared with `Axios.prototype.request`, which splices the reconstructed +// caller frames in ahead of this marker. +const CAUSED_BY_SEPARATOR = '\nCaused by: '; +const $causeStack = Symbol('causeStack'); + +// Match the section we appended, not marker-like text in an error message or +// a replacement stack supplied by the caller. Do not re-read the cause's stack. +function getCauseStackIndex(error, stack) { + const causeStack = utils$1.hasOwnProp(error, $causeStack) && error[$causeStack]; + + return causeStack && stack.endsWith(causeStack) ? stack.length - causeStack.length : -1; +} + +/** + * Append the stack of a wrapped error to `target.stack`. + * + * `cause` already exposes the original error for tooling that walks the standard + * cause chain, but many error reporters read `stack` and nothing else. Inlining + * the wrapped stack there means those reporters surface the underlying failure + * instead of the axios frames that normalized it (see #6670). + * + * Every read is defensive: a custom `Error.prepareStackTrace` hook, a runtime + * without stack support, or a replaced `stack` property can leave the value + * missing, non-string, or read-only, and normalizing an error must not throw + * because of that. + * + * @param {Error} target The AxiosError being built. + * @param {Error} source The error being wrapped. + * + * @returns {void} + */ +function appendCauseStack(target, source) { + try { + const sourceStack = source && source.stack; + + if (typeof sourceStack !== 'string' || !sourceStack) { + return; + } + + const targetStack = target.stack; + + if (typeof targetStack !== 'string' || !targetStack) { + return; + } + + // Each call to `from()` creates a fresh target. Re-wrapping includes the + // previous stack verbatim, adding one cause section per wrap. + const causeStack = CAUSED_BY_SEPARATOR + sourceStack; + target.stack = targetStack + causeStack; + Object.defineProperty(target, $causeStack, { __proto__: null, value: causeStack }); + } catch (e) { + // Ignore failures from custom stack hooks or un-writable stack properties. + } +} + +class AxiosError extends Error { + static from(error, code, config, request, response, customProps) { + // `AggregateError` (thrown by Node on dual-stack/Happy-Eyeballs connection + // failures) has an empty `message`; its detail lives in `errors[]`. Without + // this, the wrapped error surfaces with a blank message (see #6721). + let message = error.message; + if (!message && utils$1.isArray(error.errors) && error.errors.length) { + message = aggregateErrorMessage(error); + } + + const axiosError = new AxiosError(message, code || error.code, config, request, response); + // Match native `Error` `cause` semantics: non-enumerable. The wrapped + // error often carries circular internals (sockets, requests, agents), so + // an enumerable `cause` makes structured loggers (pino/winston) and any + // own-property walk throw "Converting circular structure to JSON". + // Regression from #6982; see #7205. `__proto__: null` mirrors the + // `message` descriptor below (prototype-pollution-safe descriptor). + Object.defineProperty(axiosError, 'cause', { + __proto__: null, + value: error, + writable: true, + enumerable: false, + configurable: true, + }); + axiosError.name = error.name; + + // Inline the wrapped stack for reporters that read only `stack`; the `cause` + // property above already covers cause-aware tooling. + appendCauseStack(axiosError, error); + + // Preserve status from the original error if not already set from response + if (error.status != null && axiosError.status == null) { + axiosError.status = error.status; + } + + customProps && Object.assign(axiosError, customProps); + return axiosError; + } + + /** + * Create an Error with the specified message, config, error code, request and response. + * + * @param {string} message The error message. + * @param {string} [code] The error code (for example, 'ECONNABORTED'). + * @param {Object} [config] The config. + * @param {Object} [request] The request. + * @param {Object} [response] The response. + * + * @returns {Error} The created error. + */ + constructor(message, code, config, request, response) { + super(message); + + // Make message enumerable to maintain backward compatibility + // The native Error constructor sets message as non-enumerable, + // but axios < v1.13.3 had it as enumerable + Object.defineProperty(this, 'message', { + // Null-proto descriptor so a polluted Object.prototype.get cannot turn + // this data descriptor into an accessor descriptor on the way in. + __proto__: null, + value: message, + enumerable: true, + writable: true, + configurable: true, + }); + + this.name = 'AxiosError'; + this.isAxiosError = true; + code && (this.code = code); + config && (this.config = config); + request && (this.request = request); + if (response) { + this.response = response; + this.status = response.status; + } + } + + toJSON() { + // Opt-in redaction: when the request config carries a `redact` array, the + // value of any matching key (case-insensitive, at any depth) is replaced + // with REDACTED in the serialized snapshot. Undefined or empty leaves the + // existing serialization behavior unchanged. + const config = this.config; + const redactKeys = config && utils$1.hasOwnProp(config, 'redact') ? config.redact : undefined; + const serializedConfig = + utils$1.isArray(redactKeys) && redactKeys.length > 0 + ? redactConfig(config, redactKeys) + : utils$1.toJSONObject(config); + + return { + // Standard + message: this.message, + name: this.name, + // Microsoft + description: this.description, + number: this.number, + // Mozilla + fileName: this.fileName, + lineNumber: this.lineNumber, + columnNumber: this.columnNumber, + stack: this.stack, + // Axios + config: serializedConfig, + code: this.code, + status: this.status, + }; + } +} + +// This can be changed to static properties as soon as the parser options in .eslint.cjs are updated. +AxiosError.ERR_BAD_OPTION_VALUE = 'ERR_BAD_OPTION_VALUE'; +AxiosError.ERR_BAD_OPTION = 'ERR_BAD_OPTION'; +AxiosError.ECONNABORTED = 'ECONNABORTED'; +AxiosError.ETIMEDOUT = 'ETIMEDOUT'; +AxiosError.ECONNREFUSED = 'ECONNREFUSED'; +AxiosError.ERR_NETWORK = 'ERR_NETWORK'; +AxiosError.ERR_FR_TOO_MANY_REDIRECTS = 'ERR_FR_TOO_MANY_REDIRECTS'; +AxiosError.ERR_DEPRECATED = 'ERR_DEPRECATED'; +AxiosError.ERR_BAD_RESPONSE = 'ERR_BAD_RESPONSE'; +AxiosError.ERR_BAD_REQUEST = 'ERR_BAD_REQUEST'; +AxiosError.ERR_CANCELED = 'ERR_CANCELED'; +AxiosError.ERR_NOT_SUPPORT = 'ERR_NOT_SUPPORT'; +AxiosError.ERR_INVALID_URL = 'ERR_INVALID_URL'; +AxiosError.ERR_FORM_DATA_DEPTH_EXCEEDED = 'ERR_FORM_DATA_DEPTH_EXCEEDED'; + +// eslint-disable-next-line strict +var httpAdapter = null; + +// Default nesting limit shared with the inverse transform (formDataToJSON) so +// the FormData <-> JSON round-trip stays symmetric. +const DEFAULT_FORM_DATA_MAX_DEPTH = 100; + +/** + * Determines if the given thing is a array or js object. + * + * @param {string} thing - The object or array to be visited. + * + * @returns {boolean} + */ +function isVisitable(thing) { + return utils$1.isPlainObject(thing) || utils$1.isArray(thing); +} + +/** + * It removes the brackets from the end of a string + * + * @param {string} key - The key of the parameter. + * + * @returns {string} the key without the brackets. + */ +function removeBrackets(key) { + return utils$1.endsWith(key, '[]') ? key.slice(0, -2) : key; +} + +/** + * It takes a path, a key, and a boolean, and returns a string + * + * @param {string} path - The path to the current key. + * @param {string} key - The key of the current object being iterated over. + * @param {string} dots - If true, the key will be rendered with dots instead of brackets. + * + * @returns {string} The path to the current key. + */ +function renderKey(path, key, dots) { + if (!path) return key; + return path + .concat(key) + .map(function each(token, i) { + // eslint-disable-next-line no-param-reassign + token = removeBrackets(token); + return !dots && i ? '[' + token + ']' : token; + }) + .join(dots ? '.' : ''); +} + +/** + * If the array is an array and none of its elements are visitable, then it's a flat array. + * + * @param {Array} arr - The array to check + * + * @returns {boolean} + */ +function isFlatArray(arr) { + return utils$1.isArray(arr) && !arr.some(isVisitable); +} + +const predicates = utils$1.toFlatObject(utils$1, {}, null, function filter(prop) { + return /^is[A-Z]/.test(prop); +}); + +/** + * Convert a data object to FormData + * + * @param {Object} obj + * @param {?Object} [formData] + * @param {?Object} [options] + * @param {Function} [options.visitor] + * @param {Boolean} [options.metaTokens = true] + * @param {Boolean} [options.dots = false] + * @param {?Boolean} [options.indexes = false] + * + * @returns {Object} + **/ + +/** + * It converts an object into a FormData object + * + * @param {Object} obj - The object to convert to form data. + * @param {string} formData - The FormData object to append to. + * @param {Object} options + * + * @returns + */ +function toFormData(obj, formData, options) { + if (!utils$1.isObject(obj)) { + throw new TypeError('target must be an object'); + } + + // eslint-disable-next-line no-param-reassign + formData = formData || new (FormData)(); + + const option = (name, fallback) => { + const value = utils$1.getSafeProp(options, name); + return utils$1.isUndefined(value) ? fallback : value; + }; + + const metaTokens = option('metaTokens', true); + // eslint-disable-next-line no-use-before-define + const visitor = option('visitor') || defaultVisitor; + const dots = option('dots', false); + const indexes = option('indexes', false); + const _Blob = option('Blob') || (typeof Blob !== 'undefined' && Blob); + const maxDepth = option('maxDepth', DEFAULT_FORM_DATA_MAX_DEPTH); + const useBlob = _Blob && utils$1.isSpecCompliantForm(formData); + const stack = []; + + if (!utils$1.isFunction(visitor)) { + throw new TypeError('visitor must be a function'); + } + + function convertValue(value) { + if (value === null) return ''; + + if (utils$1.isDate(value)) { + return value.toISOString(); + } + + if (utils$1.isBoolean(value)) { + return value.toString(); + } + + if (!useBlob && utils$1.isBlob(value)) { + throw new AxiosError('Blob is not supported. Use a Buffer instead.'); + } + + if (utils$1.isArrayBuffer(value) || utils$1.isTypedArray(value)) { + if (useBlob && typeof _Blob === 'function') { + return new _Blob([value]); + } + throw new AxiosError( + 'Blob is not supported. Use a Buffer instead.', + AxiosError.ERR_NOT_SUPPORT + ); + } + + return value; + } + + function throwIfMaxDepthExceeded(depth) { + if (depth > maxDepth) { + throw new AxiosError( + 'Object is too deeply nested (' + depth + ' levels). Max depth: ' + maxDepth, + AxiosError.ERR_FORM_DATA_DEPTH_EXCEEDED + ); + } + } + + function stringifyWithDepthLimit(value, depth) { + if (maxDepth === Infinity) { + return JSON.stringify(value); + } + + const ancestors = []; + + return JSON.stringify(value, function limitDepth(_key, currentValue) { + if (!utils$1.isObject(currentValue)) { + return currentValue; + } + + while (ancestors.length && ancestors[ancestors.length - 1] !== this) { + ancestors.pop(); + } + + ancestors.push(currentValue); + throwIfMaxDepthExceeded(depth + ancestors.length - 1); + + return currentValue; + }); + } + + /** + * Default visitor. + * + * @param {*} value + * @param {String|Number} key + * @param {Array} path + * @this {FormData} + * + * @returns {boolean} return true to visit the each prop of the value recursively + */ + function defaultVisitor(value, key, path) { + let arr = value; + + if (utils$1.isReactNative(formData) && utils$1.isReactNativeBlob(value)) { + formData.append(renderKey(path, key, dots), convertValue(value)); + return false; + } + + if (value && !path && typeof value === 'object') { + if (utils$1.endsWith(key, '{}')) { + // eslint-disable-next-line no-param-reassign + key = metaTokens ? key : key.slice(0, -2); + // eslint-disable-next-line no-param-reassign + value = stringifyWithDepthLimit(value, 1); + } else if ( + (utils$1.isArray(value) && isFlatArray(value)) || + ((utils$1.isFileList(value) || utils$1.endsWith(key, '[]')) && (arr = utils$1.toArray(value))) + ) { + // eslint-disable-next-line no-param-reassign + key = removeBrackets(key); + + arr.forEach(function each(el, index) { + !(utils$1.isUndefined(el) || el === null) && + formData.append( + // eslint-disable-next-line no-nested-ternary + indexes === true + ? renderKey([key], index, dots) + : indexes === null + ? key + : key + '[]', + convertValue(el) + ); + }); + return false; + } + } + + if (isVisitable(value)) { + return true; + } + + formData.append(renderKey(path, key, dots), convertValue(value)); + + return false; + } + + const exposedHelpers = Object.assign(predicates, { + defaultVisitor, + convertValue, + isVisitable, + }); + + function build(value, path, depth = 0) { + if (utils$1.isUndefined(value)) return; + + throwIfMaxDepthExceeded(depth); + + if (stack.indexOf(value) !== -1) { + throw new Error('Circular reference detected in ' + path.join('.')); + } + + stack.push(value); + + utils$1.forEach(value, function each(el, key) { + const result = + !(utils$1.isUndefined(el) || el === null) && + visitor.call(formData, el, utils$1.isString(key) ? key.trim() : key, path, exposedHelpers); + + if (result === true) { + build(el, path ? path.concat(key) : [key], depth + 1); + } + }); + + stack.pop(); + } + + if (!utils$1.isObject(obj)) { + throw new TypeError('data must be an object'); + } + + build(obj); + + return formData; +} + +/** + * It encodes a string by replacing all characters that are not in the unreserved set with + * their percent-encoded equivalents + * + * @param {string} str - The string to encode. + * + * @returns {string} The encoded string. + */ +function encode$1(str) { + const charMap = { + '!': '%21', + "'": '%27', + '(': '%28', + ')': '%29', + '~': '%7E', + '%20': '+', + }; + return encodeURIComponent(str).replace(/[!'()~]|%20/g, function replacer(match) { + return charMap[match]; + }); +} + +/** + * It takes a params object and converts it to a FormData object + * + * @param {Object} params - The parameters to be converted to a FormData object. + * @param {Object} options - The options object passed to the Axios constructor. + * + * @returns {void} + */ +function AxiosURLSearchParams(params, options) { + this._pairs = []; + + params && toFormData(params, this, options); +} + +const prototype = AxiosURLSearchParams.prototype; + +prototype.append = function append(name, value) { + this._pairs.push([name, value]); +}; + +prototype.toString = function toString(encoder) { + const _encode = encoder + ? (value) => encoder.call(this, value, encode$1) + : encode$1; + + return this._pairs + .map(function each(pair) { + return _encode(pair[0]) + '=' + _encode(pair[1]); + }, '') + .join('&'); +}; + +/** + * It replaces URL-encoded forms of `:`, `$`, `,`, and spaces with + * their plain counterparts (`:`, `$`, `,`, `+`). + * + * @param {string} val The value to be encoded. + * + * @returns {string} The encoded value. + */ +function encode(val) { + return encodeURIComponent(val) + .replace(/%3A/gi, ':') + .replace(/%24/g, '$') + .replace(/%2C/gi, ',') + .replace(/%20/g, '+'); +} + +/** + * Build a URL by appending params to the end + * + * @param {string} url The base of the url (e.g., http://www.google.com) + * @param {object} [params] The params to be appended + * @param {?(object|Function)} options + * + * @returns {string} The formatted url + */ +function buildURL(url, params, options) { + if (!params) { + return url; + } + url = url || ''; + + const _options = utils$1.isFunction(options) + ? { + serialize: options, + } + : options; + + // Read serializer options pollution-safely: own properties and methods on a + // class/template prototype are honored, but values injected onto a polluted + // Object.prototype are ignored. + const _encode = utils$1.getSafeProp(_options, 'encode') || encode; + const serializeFn = utils$1.getSafeProp(_options, 'serialize'); + + let serializedParams; + + if (serializeFn) { + serializedParams = serializeFn(params, _options); + } else { + serializedParams = utils$1.isURLSearchParams(params) + ? params.toString() + : new AxiosURLSearchParams(params, _options).toString(_encode); + } + + if (serializedParams) { + const hashmarkIndex = url.indexOf('#'); + + if (hashmarkIndex !== -1) { + url = url.slice(0, hashmarkIndex); + } + url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams; + } + + return url; +} + +const $internals = Symbol('internals'); + +// `handlers` is public and may be replaced with a nullish value by user code; +// `clear()` has always tolerated that. Treat it as an empty stack rather than +// dereferencing it. +function countHandlers(handlers) { + return handlers ? handlers.length : 0; +} + +function trimHandlers(handlers) { + if (!handlers) { + return; + } + + while (handlers.length && handlers[handlers.length - 1] === null) { + handlers.pop(); + } +} + +// Preserve the array-key coercion used before IDs were stored in a Map, without +// treating null, empty strings, or noncanonical numeric strings as ID zero. +function normalizeHandlerId(id) { + if (typeof id === 'string' && id !== '' && String(Number(id)) === id) { + return Number(id); + } + + return id; +} + +function syncHandlerEntries(manager, internals) { + const handlers = manager.handlers; + const length = countHandlers(handlers); + + if (handlers !== internals.handlersRef) { + internals.handlersRef = handlers; + internals.handlerEntries.clear(); + } else if (length !== internals.handlersLength) { + if (!length) { + internals.handlerEntries.clear(); + } else { + internals.handlerEntries.forEach(function removeStaleEntry(entry, id) { + if (handlers[entry.index] !== entry.handler) { + internals.handlerEntries.delete(id); + } + }); + } + } + + internals.handlersLength = length; +} + +class InterceptorManager { + constructor() { + this.handlers = []; + this[$internals] = { + handlersRef: this.handlers, + handlersLength: this.handlers.length, + handlerEntries: new Map(), + iterationDepth: 0, + nextId: 0, + }; + } + + /** + * Add a new interceptor to the stack + * + * @param {Function} fulfilled The function to handle `then` for a `Promise` + * @param {Function} rejected The function to handle `reject` for a `Promise` + * @param {Object} options The options for the interceptor, synchronous and runWhen + * + * @return {Number} An ID used to remove interceptor later + */ + use(fulfilled, rejected, options) { + const handler = { + fulfilled, + rejected, + synchronous: options ? options.synchronous : false, + runWhen: options ? options.runWhen : null, + }; + const internals = this[$internals]; + + if (this.handlers == null) { + this.handlers = []; + } + + syncHandlerEntries(this, internals); + + const id = internals.nextId++; + + this.handlers.push(handler); + internals.handlerEntries.set(id, { + handler, + index: this.handlers.length - 1, + }); + internals.handlersLength = this.handlers.length; + + return id; + } + + /** + * Remove an interceptor from the stack + * + * @param {Number} id The ID that was returned by `use` + * + * @returns {void} + */ + eject(id) { + const internals = this[$internals]; + + syncHandlerEntries(this, internals); + + const handlerId = normalizeHandlerId(id); + const entry = internals.handlerEntries.get(handlerId); + + if (entry) { + internals.handlerEntries.delete(handlerId); + + // Ignore IDs invalidated by clear or direct replacement of handlers. + if (this.handlers[entry.index] !== entry.handler) { + return; + } + + this.handlers[entry.index] = null; + + // Do not reuse an index while forEach is walking its length snapshot. + if (!internals.iterationDepth) { + trimHandlers(this.handlers); + internals.handlersLength = this.handlers.length; + } + } + } + + /** + * Clear all interceptors from the stack + * + * @returns {void} + */ + clear() { + if (this.handlers) { + this.handlers = []; + syncHandlerEntries(this, this[$internals]); + } + } + + /** + * Iterate over all the registered interceptors + * + * This method is particularly useful for skipping over any + * interceptors that may have become `null` calling `eject`. + * + * @param {Function} fn The function to call for each interceptor + * + * @returns {void} + */ + forEach(fn) { + const internals = this[$internals]; + + syncHandlerEntries(this, internals); + + internals.iterationDepth++; + + try { + utils$1.forEach(this.handlers, function forEachHandler(h) { + if (h !== null) { + fn(h); + } + }); + } finally { + if (!--internals.iterationDepth) { + syncHandlerEntries(this, internals); + trimHandlers(this.handlers); + internals.handlersLength = countHandlers(this.handlers); + } + } + } +} + +var transitionalDefaults = { + silentJSONParsing: true, + forcedJSONParsing: true, + clarifyTimeoutError: false, + legacyInterceptorReqResOrdering: true, + advertiseZstdAcceptEncoding: false, + validateStatusUndefinedResolves: true, + encodeBasicAuthUsername: false, +}; + +var URLSearchParams$1 = typeof URLSearchParams !== 'undefined' ? URLSearchParams : AxiosURLSearchParams; + +var FormData$1 = typeof FormData !== 'undefined' ? FormData : null; + +var Blob$1 = typeof Blob !== 'undefined' ? Blob : null; + +var platform$1 = { + isBrowser: true, + classes: { + URLSearchParams: URLSearchParams$1, + FormData: FormData$1, + Blob: Blob$1, + }, + protocols: ['http', 'https', 'file', 'blob', 'url', 'data'], +}; + +const hasBrowserEnv = typeof window !== 'undefined' && typeof document !== 'undefined'; + +const _navigator = (typeof navigator === 'object' && navigator) || undefined; + +/** + * Determine if we're running in a standard browser environment + * + * This allows axios to run in a web worker, and react-native. + * Both environments support XMLHttpRequest, but not fully standard globals. + * + * web workers: + * typeof window -> undefined + * typeof document -> undefined + * + * react-native: + * navigator.product -> 'ReactNative' + * nativescript + * navigator.product -> 'NativeScript' or 'NS' + * + * @returns {boolean} + */ +const hasStandardBrowserEnv = + hasBrowserEnv && + (!_navigator || ['ReactNative', 'NativeScript', 'NS'].indexOf(_navigator.product) < 0); + +/** + * Determine if we're running in a standard browser webWorker environment + * + * Although the `isStandardBrowserEnv` method indicates that + * `allows axios to run in a web worker`, the WebWorker will still be + * filtered out due to its judgment standard + * `typeof window !== 'undefined' && typeof document !== 'undefined'`. + * This leads to a problem when axios post `FormData` in webWorker + */ +const hasStandardBrowserWebWorkerEnv = (() => { + return ( + typeof WorkerGlobalScope !== 'undefined' && + // eslint-disable-next-line no-undef + self instanceof WorkerGlobalScope && + typeof self.importScripts === 'function' + ); +})(); + +const origin = (hasBrowserEnv && window.location.href) || 'http://localhost'; + +var utils = /*#__PURE__*/Object.freeze({ + __proto__: null, + hasBrowserEnv: hasBrowserEnv, + hasStandardBrowserEnv: hasStandardBrowserEnv, + hasStandardBrowserWebWorkerEnv: hasStandardBrowserWebWorkerEnv, + navigator: _navigator, + origin: origin +}); + +var platform = { + ...utils, + ...platform$1, +}; + +function toURLEncodedForm(data, options) { + return toFormData(data, new platform.classes.URLSearchParams(), { + visitor: function (value, key, path, helpers) { + if (platform.isNode && utils$1.isBuffer(value)) { + this.append(key, value.toString('base64')); + return false; + } + + return helpers.defaultVisitor.apply(this, arguments); + }, + ...options, + }); +} + +const MAX_DEPTH = DEFAULT_FORM_DATA_MAX_DEPTH; + +function throwIfDepthExceeded(index) { + if (index > MAX_DEPTH) { + throw new AxiosError( + 'FormData field is too deeply nested (' + index + ' levels). Max depth: ' + MAX_DEPTH, + AxiosError.ERR_FORM_DATA_DEPTH_EXCEEDED + ); + } +} + +/** + * It takes a string like `foo[x][y][z]` and returns an array like `['foo', 'x', 'y', 'z'] + * + * @param {string} name - The name of the property to get. + * + * @returns An array of strings. + */ +function parsePropPath(name) { + // foo[x][y][z] -> ['foo', 'x', 'y', 'z'] + // foo.x.y.z -> ['foo', 'x', 'y', 'z'] + // A path is split on `.` and on `[...]` groups. A segment — whether written + // in dot notation or captured inside brackets — may contain any character + // except `.`, `[` and `]`, so a key like `user-name` or `user name` is kept + // literal instead of being split (#5402). `.`, `[` and `]` keep their existing + // meaning, e.g. `foo[bar.baz]` -> ['foo', 'bar', 'baz'] and `[]` is an array push. + // Excluding `[` from the bracket group also makes the match fail fast at the + // next `[`, so a malformed name cannot rescan to the end of the string from + // every unmatched `[` — parsing stays linear in the length of the name. + const path = []; + const pattern = /[^.[\]]+|\[([^.[\]]*)]/g; + let match; + + while ((match = pattern.exec(name)) !== null) { + throwIfDepthExceeded(path.length); + path.push(match[0] === '[]' ? '' : match[1] || match[0]); + } + + return path; +} + +/** + * Convert an array to an object. + * + * @param {Array} arr - The array to convert to an object. + * + * @returns An object with the same keys and values as the array. + */ +function arrayToObject(arr) { + const obj = {}; + const keys = Object.keys(arr); + let i; + const len = keys.length; + let key; + for (i = 0; i < len; i++) { + key = keys[i]; + obj[key] = arr[key]; + } + return obj; +} + +function normalizeArray(value) { + if (!utils$1.isArray(value)) return value; + + const keys = Object.keys(value); + return keys.length !== value.length || keys.some((key, index) => key !== String(index)) + ? arrayToObject(value) + : value; +} + +function normalizeArrays(obj) { + const pending = [obj]; + while (pending.length) { + const target = pending.pop(); + Object.keys(target).forEach((key) => { + const value = (target[key] = normalizeArray(target[key])); + if (utils$1.isArray(value) || utils$1.isPlainObject(value)) { + pending.push(value); + } + }); + } + return obj; +} + +/** + * It takes a FormData object and returns a JavaScript object + * + * @param {string} formData The FormData object to convert to JSON. + * + * @returns {Object | null} The converted object. + */ +function formDataToJSON(formData) { + function buildPath(path, value, target, index) { + throwIfDepthExceeded(index); + + let name = path[index++]; + + if (name === '__proto__') return true; + + const isNumericKey = Number.isFinite(+name); + const isLast = index >= path.length; + name = !name && utils$1.isArray(target) ? target.length : name; + + if (isLast) { + if (utils$1.hasOwnProp(target, name)) { + target[name] = normalizeArray(target[name]); + target[name] = utils$1.isArray(target[name]) + ? target[name].concat(value) + : [target[name], value]; + } else { + target[name] = value; + } + + return !isNumericKey; + } + + if (!utils$1.hasOwnProp(target, name) || !utils$1.isObject(target[name])) { + target[name] = []; + } + + const result = buildPath(path, value, target[name], index); + + if (result && utils$1.isArray(target[name])) { + target[name] = arrayToObject(target[name]); + } + + return !isNumericKey; + } + + if (utils$1.isFormData(formData) && utils$1.isFunction(formData.entries)) { + const obj = {}; + + utils$1.forEachEntry(formData, (name, value) => { + buildPath(parsePropPath(name), value, obj, 0); + }); + + return normalizeArrays(obj); + } + + return null; +} + +const methodList = Object.freeze([ + 'get', + 'delete', + 'head', + 'options', + 'post', + 'put', + 'patch', + 'purge', + 'link', + 'unlink', + 'query', +]); + +const own = (obj, key) => (obj != null && utils$1.hasOwnProp(obj, key) ? obj[key] : undefined); + +/** + * It takes a string, tries to parse it, and if it fails, it returns the stringified version + * of the input + * + * @param {any} rawValue - The value to be stringified. + * @param {Function} parser - A function that parses a string into a JavaScript object. + * @param {Function} encoder - A function that takes a value and returns a string. + * + * @returns {string} A stringified version of the rawValue. + */ +function stringifySafely(rawValue, parser, encoder) { + if (utils$1.isString(rawValue)) { + try { + (parser || JSON.parse)(rawValue); + return utils$1.trim(rawValue); + } catch (e) { + if (e.name !== 'SyntaxError') { + throw e; + } + } + } + + return (encoder || JSON.stringify)(rawValue); +} + +const defaults = { + transitional: transitionalDefaults, + + adapter: ['xhr', 'http', 'fetch'], + + transformRequest: [ + function transformRequest(data, headers) { + const contentType = headers.getContentType() || ''; + const hasJSONContentType = contentType.indexOf('application/json') > -1; + const isObjectPayload = utils$1.isObject(data); + + if (isObjectPayload && utils$1.isHTMLForm(data)) { + data = new FormData(data); + } + + const isFormData = utils$1.isFormData(data); + + if (isFormData) { + return hasJSONContentType ? JSON.stringify(formDataToJSON(data)) : data; + } + + if ( + utils$1.isArrayBuffer(data) || + utils$1.isBuffer(data) || + utils$1.isStream(data) || + utils$1.isFile(data) || + utils$1.isBlob(data) || + utils$1.isReadableStream(data) + ) { + return data; + } + if (utils$1.isArrayBufferView(data)) { + return data.buffer; + } + if (utils$1.isURLSearchParams(data)) { + headers.setContentType('application/x-www-form-urlencoded;charset=utf-8', false); + return data.toString(); + } + + let isFileList; + + if (isObjectPayload) { + const formSerializer = own(this, 'formSerializer'); + if (contentType.indexOf('application/x-www-form-urlencoded') > -1) { + return toURLEncodedForm(data, formSerializer).toString(); + } + + if ( + (isFileList = utils$1.isFileList(data)) || + contentType.indexOf('multipart/form-data') > -1 + ) { + const env = own(this, 'env'); + const _FormData = env && env.FormData; + + return toFormData( + isFileList ? { 'files[]': data } : data, + _FormData && new _FormData(), + formSerializer + ); + } + } + + if (isObjectPayload || hasJSONContentType) { + headers.setContentType('application/json', false); + return stringifySafely(data); + } + + return data; + }, + ], + + transformResponse: [ + function transformResponse(data) { + const transitional = own(this, 'transitional') || defaults.transitional; + const forcedJSONParsing = transitional && transitional.forcedJSONParsing; + const responseType = own(this, 'responseType'); + const JSONRequested = responseType === 'json'; + + if (utils$1.isResponse(data) || utils$1.isReadableStream(data)) { + return data; + } + + if ( + data && + utils$1.isString(data) && + ((forcedJSONParsing && !responseType) || JSONRequested) + ) { + const silentJSONParsing = transitional && transitional.silentJSONParsing; + const strictJSONParsing = !silentJSONParsing && JSONRequested; + + try { + return JSON.parse(data, own(this, 'parseReviver')); + } catch (e) { + if (strictJSONParsing) { + if (e.name === 'SyntaxError') { + throw AxiosError.from(e, AxiosError.ERR_BAD_RESPONSE, this, null, own(this, 'response')); + } + throw e; + } + } + } + + return data; + }, + ], + + /** + * A timeout in milliseconds to abort a request. If set to 0 (default) a + * timeout is not created. + */ + timeout: 0, + + xsrfCookieName: 'XSRF-TOKEN', + xsrfHeaderName: 'X-XSRF-TOKEN', + + maxContentLength: -1, + maxBodyLength: -1, + + env: { + FormData: platform.classes.FormData, + Blob: platform.classes.Blob, + }, + + validateStatus: function validateStatus(status) { + return status >= 200 && status < 300; + }, + + headers: { + common: { + Accept: 'application/json, text/plain, */*', + 'Content-Type': undefined, + }, + }, +}; + +utils$1.forEach(methodList, (method) => { + defaults.headers[method] = {}; +}); + +/** + * Transform the data for a request or a response + * + * @param {Array|Function} fns A single function or Array of functions + * @param {?Object} response The response object + * + * @returns {*} The resulting transformed data + */ +function transformData(fns, response) { + const config = this || defaults; + const context = response || config; + const headers = AxiosHeaders.from(context.headers); + let data = context.data; + + utils$1.forEach(fns, function transform(fn) { + data = fn.call(config, data, headers.normalize(), response ? response.status : undefined); + }); + + headers.normalize(); + + return data; +} + +function isCancel(value) { + return !!(value && value.__CANCEL__); +} + +class CanceledError extends AxiosError { + /** + * A `CanceledError` is an object that is thrown when an operation is canceled. + * + * @param {string=} message The message. + * @param {Object=} config The config. + * @param {Object=} request The request. + * + * @returns {CanceledError} The created error. + */ + constructor(message, config, request) { + super(message == null ? 'canceled' : message, AxiosError.ERR_CANCELED, config, request); + this.name = 'CanceledError'; + this.__CANCEL__ = true; + } +} + +/** + * Resolve or reject a Promise based on response status. + * + * @param {Function} resolve A function that resolves the promise. + * @param {Function} reject A function that rejects the promise. + * @param {object} response The response. + * + * @returns {object} The response. + */ +function settle(resolve, reject, response) { + const validateStatus = response.config.validateStatus; + if (!response.status || !validateStatus || validateStatus(response.status)) { + resolve(response); + } else { + reject(new AxiosError( + 'Request failed with status code ' + response.status, + response.status >= 400 && response.status < 500 ? AxiosError.ERR_BAD_REQUEST : AxiosError.ERR_BAD_RESPONSE, + response.config, + response.request, + response + )); + } +} + +const urlParserControlCharacters = /[\t\n\r]/g; + +/** + * Match WHATWG URL preprocessing before checking a URL's protocol. + * + * @param {string} url + * + * @returns {string} + */ +function normalizeURLForProtocolCheck(url) { + if (typeof url !== 'string') { + return url; + } + + let start = 0; + + while (start < url.length && url.charCodeAt(start) <= 0x20) { + start++; + } + + return url.slice(start).replace(urlParserControlCharacters, ''); +} + +function parseProtocol(url) { + const match = /^([-+\w]{1,25}):(?:\/\/)?/.exec(url); + return (match && match[1].toLowerCase()) || ''; +} + +const decodeCookieValue = (value) => { + try { + return decodeURIComponent(value); + } catch (e) { + return value; + } +}; + +var cookies = platform.hasStandardBrowserEnv + ? // Standard browser envs support document.cookie + { + write(name, value, expires, path, domain, secure, sameSite) { + if (typeof document === 'undefined') return; + + const cookie = [`${name}=${encodeURIComponent(value)}`]; + + if (utils$1.isNumber(expires)) { + cookie.push(`expires=${new Date(expires).toUTCString()}`); + } + if (utils$1.isString(path)) { + cookie.push(`path=${path}`); + } + if (utils$1.isString(domain)) { + cookie.push(`domain=${domain}`); + } + if (secure === true) { + cookie.push('secure'); + } + if (utils$1.isString(sameSite)) { + cookie.push(`SameSite=${sameSite}`); + } + + document.cookie = cookie.join('; '); + }, + + read(name) { + if (typeof document === 'undefined') return null; + const cookieString = document.cookie; + if (!cookieString) return null; + // Match name=value by splitting on the semicolon separator instead of building a + // RegExp from `name` — interpolating an unescaped string into a RegExp would let + // metacharacters (e.g. `.+?` in an attacker-influenced cookie name) cause ReDoS or + // match the wrong cookie. Browsers may serialize cookie pairs as either ";" or + // "; ", so ignore optional whitespace before each cookie name. + const cookies = cookieString.split(';'); + for (let i = 0; i < cookies.length; i++) { + const cookie = cookies[i].replace(/^\s+/, ''); + const eq = cookie.indexOf('='); + if (eq !== -1 && cookie.slice(0, eq) === name) { + return decodeCookieValue(cookie.slice(eq + 1)); + } + } + return null; + }, + + async readAsync(name) { + try { + const store = typeof window !== 'undefined' && window.cookieStore; + if (store && utils$1.isFunction(store.get)) { + const cookie = await store.get(name); + // Both APIs expose stored bytes; preserve Axios's existing URI decoding. + return cookie ? decodeCookieValue(cookie.value) : null; + } + } catch (e) { + // Restricted or unavailable storage retains the synchronous fallback. + } + + return this.read(name); + }, + + remove(name) { + this.write(name, '', Date.now() - 86400000, '/'); + }, + } + : // Non-standard browser env (web workers, react-native) lack needed support. + { + write() {}, + read() { + return null; + }, + async readAsync() { + return null; + }, + remove() {}, + }; + +/** + * Calculate data maxRate + * @param {Number} [samplesCount= 10] + * @param {Number} [min= 1000] + * @returns {Function} + */ +function speedometer(samplesCount, min) { + samplesCount = samplesCount || 10; + const bytes = new Array(samplesCount); + const timestamps = new Array(samplesCount); + let head = 0; + let tail = 0; + let firstSampleTS; + + min = min !== undefined ? min : 1000; + + return function push(chunkLength) { + const now = Date.now(); + + const startedAt = timestamps[tail]; + + if (!firstSampleTS) { + firstSampleTS = now; + } + + bytes[head] = chunkLength; + timestamps[head] = now; + + let i = tail; + let bytesCount = 0; + + while (i !== head) { + bytesCount += bytes[i++]; + i = i % samplesCount; + } + + head = (head + 1) % samplesCount; + + if (head === tail) { + tail = (tail + 1) % samplesCount; + } + + if (now - firstSampleTS < min) { + return; + } + + const passed = startedAt && now - startedAt; + + return passed ? Math.round((bytesCount * 1000) / passed) : undefined; + }; +} + +/** + * Throttle decorator + * @param {Function} fn + * @param {Number} freq + * @return {Array} + */ +function throttle(fn, freq) { + let timestamp = 0; + let threshold = 1000 / freq; + let lastArgs; + let timer; + + const invoke = (args, now = Date.now()) => { + timestamp = now; + lastArgs = null; + if (timer) { + clearTimeout(timer); + timer = null; + } + fn(...args); + }; + + const throttled = (...args) => { + const now = Date.now(); + const passed = now - timestamp; + if (passed >= threshold) { + invoke(args, now); + } else { + lastArgs = args; + if (!timer) { + timer = setTimeout(() => { + timer = null; + invoke(lastArgs); + }, threshold - passed); + } + } + }; + + const flush = () => lastArgs && invoke(lastArgs); + const flushWith = (...args) => invoke(args); + + return [throttled, flush, flushWith]; +} + +const progressEventReducer = (listener, isDownloadStream, freq = 3) => { + let bytesNotified = 0; + const _speedometer = speedometer(50, 250); + + return throttle((e) => { + if (!e || !utils$1.isNumber(e.loaded)) { + return; + } + const rawLoaded = e.loaded; + const total = e.lengthComputable ? e.total : undefined; + const loaded = Math.max(0, total != null ? Math.min(rawLoaded, total) : rawLoaded); + const progressBytes = Math.max(0, loaded - bytesNotified); + const rate = _speedometer(progressBytes); + + bytesNotified = Math.max(bytesNotified, loaded); + + const data = { + loaded, + total, + progress: total ? loaded / total : undefined, + bytes: progressBytes, + rate: rate ? rate : undefined, + estimated: rate && total ? (total - loaded) / rate : undefined, + event: e, + lengthComputable: total != null, + [isDownloadStream ? 'download' : 'upload']: true, + }; + + listener(data); + }, freq); +}; + +const progressEventDecorator = (total, throttled) => { + const lengthComputable = total != null; + + return [ + (loaded) => + throttled[0]({ + lengthComputable, + total, + loaded, + }), + throttled[1], + ]; +}; + +const asyncDecorator = + (fn, scheduler = utils$1.asap) => + (...args) => + scheduler(() => fn(...args)); + +var isURLSameOrigin = platform.hasStandardBrowserEnv + ? ((origin) => (url) => { + url = new URL(url, document.baseURI || platform.origin); + + return ( + origin.protocol === url.protocol && origin.host === url.host && origin.port === url.port + ); + })(new URL(platform.origin)) + : () => true; + +/** + * Determines whether the specified URL is absolute + * + * @param {string} url The URL to test + * + * @returns {boolean} True if the specified URL is absolute, otherwise false + */ +function isAbsoluteURL(url) { + // A URL is considered absolute if it begins with "://" or "//" (protocol-relative URL). + // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed + // by any combination of letters, digits, plus, period, or hyphen. + if (typeof url !== 'string') { + return false; + } + + return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url); +} + +/** + * Creates a new URL by combining the specified URLs + * + * @param {string} baseURL The base URL + * @param {string} relativeURL The relative URL + * + * @returns {string} The combined URL + */ +function combineURLs(baseURL, relativeURL) { + if (!relativeURL) { + return baseURL; + } + + let end = baseURL.length; + + while (end > 0 && baseURL.charCodeAt(end - 1) === 47) { + end--; + } + + return baseURL.slice(0, end) + '/' + relativeURL.replace(/^\/+/, ''); +} + +const malformedHttpProtocol = /^https?:(?!\/\/)/i; + +// Redact the parts of a URL that can carry secrets before it is embedded in an +// error message. AxiosError.toJSON() serializes `message` verbatim and errors +// are commonly logged, while the opt-in `config.redact` model only cleans +// config keys — it cannot reach the message. Redact only the genuinely +// sensitive substrings — userinfo (credentials), query parameter values and +// fragment contents — with the same REDACTED marker the config redaction uses, +// while keeping the scheme, host, path and parameter names so the offending +// request stays accurately identifiable. +function redactFragment(fragment) { + if (!fragment) { + return fragment; + } + + return fragment.replace(/(^|&)([^=&]*=)?[^&]+/g, (match, separator, parameterName = '') => { + return `${separator}${parameterName}${REDACTED}`; + }); +} + +function redactSensitiveURLParts(url) { + const redactedURL = url.replace(/^(https?:\/{0,2})[^/?#]*@/i, `$1${REDACTED}@`); + const fragmentIndex = redactedURL.indexOf('#'); + const urlWithoutFragment = + fragmentIndex === -1 ? redactedURL : redactedURL.slice(0, fragmentIndex); + const redactedURLWithoutFragment = urlWithoutFragment.replace( + /([?&][^=&#]*=)[^&#]*/g, + `$1${REDACTED}` + ); + + if (fragmentIndex === -1) { + return redactedURLWithoutFragment; + } + + return `${redactedURLWithoutFragment}#${redactFragment(redactedURL.slice(fragmentIndex + 1))}`; +} + +function assertValidHttpProtocolURL(url, config) { + if (typeof url === 'string') { + const normalizedURL = normalizeURLForProtocolCheck(url); + if (malformedHttpProtocol.test(normalizedURL)) { + throw new AxiosError( + `Invalid URL ${JSON.stringify(redactSensitiveURLParts(normalizedURL))}: missing "//" after protocol`, + AxiosError.ERR_INVALID_URL, + config + ); + } + } +} + +/** + * Creates a new URL by combining the baseURL with the requestedURL, + * only when the requestedURL is not already an absolute URL. + * If the requestURL is absolute, this function returns the requestedURL untouched. + * + * @param {string} baseURL The base URL + * @param {string} requestedURL Absolute or relative URL to combine + * + * @returns {string} The combined full path + */ +function buildFullPath(baseURL, requestedURL, allowAbsoluteUrls, config) { + assertValidHttpProtocolURL(requestedURL, config); + let isRelativeUrl = !isAbsoluteURL(requestedURL); + if (baseURL && (isRelativeUrl || allowAbsoluteUrls === false)) { + assertValidHttpProtocolURL(baseURL, config); + return combineURLs(baseURL, requestedURL); + } + return requestedURL; +} + +function assertParamsAcyclic(params) { + const pending = [{ value: params }]; + const active = new WeakSet(); + const visited = new WeakSet(); + + while (pending.length) { + const { value, done } = pending.pop(); + if (!utils$1.isPlainObject(value) && !utils$1.isArray(value)) continue; + if (done) { + active.delete(value); + continue; + } + if (active.has(value)) { + throw new AxiosError( + 'Circular reference detected in params', + AxiosError.ERR_BAD_OPTION_VALUE + ); + } + if (visited.has(value)) continue; + visited.add(value); + active.add(value); + pending.push({ value, done: true }); + + const keys = Object.keys(value); + if (Object.getOwnPropertySymbols && Object.getOwnPropertyDescriptor) { + Object.getOwnPropertySymbols(value).forEach((key) => { + const descriptor = Object.getOwnPropertyDescriptor(value, key); + if (descriptor && descriptor.enumerable) keys.push(key); + }); + } + // Shallow array elements retain fields filtered during plain-object merges. + // Inspect reserved data properties without evaluating their accessors. + keys.forEach((key) => { + if (key === '__proto__' || key === 'constructor' || key === 'prototype') { + const descriptor = Object.getOwnPropertyDescriptor(value, key); + if (descriptor && utils$1.hasOwnProp(descriptor, 'value')) { + pending.push({ value: descriptor.value }); + } + } else { + pending.push({ value: value[key] }); + } + }); + } +} + +const headersToObject = (thing) => (thing instanceof AxiosHeaders ? { ...thing } : thing); + +const ownEnumerableKeys = (thing) => { + if (Object.getOwnPropertySymbols && Object.getOwnPropertyDescriptor) { + return Object.keys(thing).concat( + Object.getOwnPropertySymbols(thing).filter((symbol) => { + const descriptor = Object.getOwnPropertyDescriptor(thing, symbol); + return descriptor && descriptor.enumerable; + }) + ); + } + return Object.keys(thing); +}; + +// Copy params without recursive merges so the serializer remains responsible +// for its depth policy. Only visit defaults that contribute to the result. +function mergeParams(a, b) { + const pending = []; + const copies = new WeakMap(); + const empty = {}; + + function copy(target, source) { + if (!utils$1.isPlainObject(source)) { + return utils$1.isArray(source) ? source.slice() : source; + } + + const base = utils$1.isPlainObject(target) ? target : empty; + let bases = copies.get(source); + if (!bases) { + bases = new WeakMap(); + copies.set(source, bases); + } + if (bases.has(base)) return bases.get(base); + + const result = {}; + bases.set(base, result); + pending.push({ base, source, result }); + return result; + } + + const result = utils$1.isUndefined(b) ? copy(undefined, a) : copy(a, b); + while (pending.length) { + const { base, source, result: target } = pending.pop(); + const baseKeys = new Set(ownEnumerableKeys(base)); + const sourceKeys = new Set(ownEnumerableKeys(source)); + const keys = new Set([...baseKeys, ...sourceKeys]); + + keys.forEach((key) => { + if (key === '__proto__' || key === 'constructor' || key === 'prototype') return; + const hasSource = sourceKeys.has(key); + const value = hasSource ? source[key] : undefined; + const previous = + (!hasSource || utils$1.isPlainObject(value)) && baseKeys.has(key) ? base[key] : undefined; + target[key] = hasSource ? copy(previous, value) : copy(undefined, previous); + }); + } + + assertParamsAcyclic(result); + return result; +} + +function getMergedValue(target, source, prop, caseless) { + if (utils$1.isPlainObject(target) && utils$1.isPlainObject(source)) { + return utils$1.merge.call({ caseless }, target, source); + } else if (utils$1.isPlainObject(source)) { + return utils$1.merge({}, source); + } else if (utils$1.isArray(source)) { + return source.slice(); + } + return source; +} + +function mergeDeepProperties(a, b, prop, caseless) { + if (!utils$1.isUndefined(b)) { + return getMergedValue(a, b, prop, caseless); + } else if (!utils$1.isUndefined(a)) { + return getMergedValue(undefined, a, prop, caseless); + } +} + +// eslint-disable-next-line consistent-return +function valueFromConfig2(a, b) { + if (!utils$1.isUndefined(b)) { + return getMergedValue(undefined, b); + } +} + +// eslint-disable-next-line consistent-return +function defaultToConfig2(a, b) { + if (!utils$1.isUndefined(b)) { + return getMergedValue(undefined, b); + } else if (!utils$1.isUndefined(a)) { + return getMergedValue(undefined, a); + } +} + +function getMergedTransitionalOption(config1, config2, prop) { + const transitional2 = utils$1.hasOwnProp(config2, 'transitional') + ? config2.transitional + : undefined; + + if (!utils$1.isUndefined(transitional2)) { + if (utils$1.isPlainObject(transitional2)) { + if (utils$1.hasOwnProp(transitional2, prop)) { + return transitional2[prop]; + } + } else { + return undefined; + } + } + + const transitional1 = utils$1.hasOwnProp(config1, 'transitional') + ? config1.transitional + : undefined; + + if (utils$1.isPlainObject(transitional1) && utils$1.hasOwnProp(transitional1, prop)) { + return transitional1[prop]; + } + + return undefined; +} + +// eslint-disable-next-line consistent-return +function mergeDirectKeys(a, b, prop, config1, config2) { + if (utils$1.hasOwnProp(config2, prop)) { + return getMergedValue(a, b); + } else if (utils$1.hasOwnProp(config1, prop)) { + return getMergedValue(undefined, a); + } +} + +function mergeHeaders(a, b, prop) { + return mergeDeepProperties(headersToObject(a), headersToObject(b), prop, true); +} + +// Null-proto, frozen descriptor so a polluted Object.prototype.get cannot turn +// this data descriptor into an accessor descriptor on the way in. +// defineProperty only reads it, so one shared instance serves every call. +const hasOwnPropertyDescriptor = Object.freeze({ + __proto__: null, + value: Object.prototype.hasOwnProperty, + enumerable: false, + writable: true, + configurable: true, +}); + +// The strategy table and the strategies above are stateless, so they are +// built once at module load instead of on every call: mergeConfig runs at +// most twice per request (once from a method alias, once from `_request`). +const mergeMap = { + url: valueFromConfig2, + method: valueFromConfig2, + data: valueFromConfig2, + baseURL: defaultToConfig2, + transformRequest: defaultToConfig2, + transformResponse: defaultToConfig2, + params: mergeParams, + paramsSerializer: defaultToConfig2, + timeout: defaultToConfig2, + timeoutErrorMessage: defaultToConfig2, + withCredentials: defaultToConfig2, + withXSRFToken: defaultToConfig2, + adapter: defaultToConfig2, + responseType: defaultToConfig2, + xsrfCookieName: defaultToConfig2, + xsrfHeaderName: defaultToConfig2, + onUploadProgress: defaultToConfig2, + onDownloadProgress: defaultToConfig2, + decompress: defaultToConfig2, + maxContentLength: defaultToConfig2, + maxBodyLength: defaultToConfig2, + beforeRedirect: defaultToConfig2, + transport: defaultToConfig2, + httpAgent: defaultToConfig2, + httpsAgent: defaultToConfig2, + cancelToken: defaultToConfig2, + socketPath: defaultToConfig2, + allowedSocketPaths: defaultToConfig2, + responseEncoding: defaultToConfig2, + validateStatus: mergeDirectKeys, + headers: mergeHeaders, +}; + +/** + * Config-specific merge-function which creates a new config-object + * by merging two configuration objects together. + * + * @param {Object} config1 + * @param {Object} config2 + * + * @returns {Object} New object resulting from merging config2 to config1 + */ +function mergeConfig(config1, config2) { + // eslint-disable-next-line no-param-reassign + config1 = config1 || {}; + config2 = config2 || {}; + + // Use a null-prototype object so that downstream reads such as `config.auth` + // or `config.baseURL` cannot inherit polluted values from Object.prototype. + // `hasOwnProperty` is restored as a non-enumerable own slot to preserve + // ergonomics for user code that relies on it. + const config = Object.create(null); + Object.defineProperty(config, 'hasOwnProperty', hasOwnPropertyDescriptor); + + const keys = ownEnumerableKeys({ ...config1, ...config2 }); + + for (let i = 0, len = keys.length; i < len; i++) { + const prop = keys[i]; + if (prop === '__proto__' || prop === 'constructor' || prop === 'prototype') continue; + const merge = utils$1.hasOwnProp(mergeMap, prop) ? mergeMap[prop] : mergeDeepProperties; + const a = utils$1.hasOwnProp(config1, prop) ? config1[prop] : undefined; + const b = utils$1.hasOwnProp(config2, prop) ? config2[prop] : undefined; + const configValue = + merge === mergeDirectKeys ? merge(a, b, prop, config1, config2) : merge(a, b, prop); + (utils$1.isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue); + } + + if ( + utils$1.hasOwnProp(config2, 'validateStatus') && + utils$1.isUndefined(config2.validateStatus) && + getMergedTransitionalOption(config1, config2, 'validateStatusUndefinedResolves') === false + ) { + if (utils$1.hasOwnProp(config1, 'validateStatus')) { + config.validateStatus = getMergedValue(undefined, config1.validateStatus); + } else { + delete config.validateStatus; + } + } + + return config; +} + +const FORM_DATA_CONTENT_HEADERS = ['content-type', 'content-length']; + +/** + * Apply the headers generated by a FormData implementation to the request headers, + * honoring the `formDataHeaderPolicy` option: with 'content-only', copy only the + * content-* headers; otherwise merge all of them. + * + * @param {AxiosHeaders} headers - the request headers to mutate + * @param {Object | null | undefined} formHeaders - headers produced by the FormData implementation + * @param {String} [policy] - the resolved `formDataHeaderPolicy` config value + * + * @returns {void} + */ +function setFormDataHeaders(headers, formHeaders, policy) { + if (policy !== 'content-only') { + headers.set(formHeaders); + return; + } + + Object.entries(formHeaders || {}).forEach(([key, val]) => { + if (FORM_DATA_CONTENT_HEADERS.includes(key.toLowerCase())) { + headers.set(key, val); + } + }); +} + +/** + * Encode a UTF-8 string to a Latin-1 byte string for use with btoa(). + * This is a modern replacement for the deprecated unescape(encodeURIComponent(str)) pattern. + * + * @param {string} str The string to encode + * + * @returns {string} UTF-8 bytes as a Latin-1 string + */ +const encodeUTF8$1 = (str) => + encodeURIComponent(str).replace(/%([0-9A-F]{2})/gi, (_, hex) => + String.fromCharCode(parseInt(hex, 16)) + ); + +const readCookie = (name) => cookies.read(name); + +function resolveConfig(config, readXsrfCookie = readCookie) { + const newConfig = mergeConfig({}, config); + + // Read only own properties to prevent prototype pollution gadgets + // (e.g. Object.prototype.baseURL = 'https://evil.com'). + const own = (key) => (utils$1.hasOwnProp(newConfig, key) ? newConfig[key] : undefined); + + const data = own('data'); + let withXSRFToken = own('withXSRFToken'); + const xsrfHeaderName = own('xsrfHeaderName'); + const xsrfCookieName = own('xsrfCookieName'); + let headers = own('headers'); + const auth = own('auth'); + const baseURL = own('baseURL'); + const allowAbsoluteUrls = own('allowAbsoluteUrls'); + const url = own('url'); + + newConfig.headers = headers = AxiosHeaders.from(headers); + + newConfig.url = buildURL( + buildFullPath(baseURL, url, allowAbsoluteUrls, newConfig), + own('params'), + own('paramsSerializer') + ); + + // HTTP basic authentication + if (auth) { + const username = utils$1.getSafeProp(auth, 'username') || ''; + const password = utils$1.getSafeProp(auth, 'password') || ''; + const transitional = own('transitional'); + const encodeUsername = + transitional && + utils$1.hasOwnProp(transitional, 'encodeBasicAuthUsername') && + transitional.encodeBasicAuthUsername === true; + + try { + headers.set( + 'Authorization', + // Preserve legacy username bytes unless the caller opts in to UTF-8. + 'Basic ' + + btoa( + (encodeUsername ? encodeUTF8$1(username) : username) + + ':' + + (password ? encodeUTF8$1(password) : '') + ) + ); + } catch (e) { + throw AxiosError.from(e, AxiosError.ERR_BAD_OPTION_VALUE, config); + } + } + + if (utils$1.isFormData(data)) { + const getHeaders = utils$1.getSafeProp(data, 'getHeaders'); + + if ( + platform.hasStandardBrowserEnv || + platform.hasStandardBrowserWebWorkerEnv || + utils$1.isReactNative(data) + ) { + headers.setContentType(undefined); // browser/web worker/RN handles it + } else if (utils$1.isFunction(getHeaders)) { + // Node.js FormData (like form-data package) + setFormDataHeaders(headers, getHeaders.call(data), own('formDataHeaderPolicy')); + } + } + + // Add xsrf header + // This is only done if running in a standard browser environment. + // Specifically not if we're in a web worker, or react-native. + + if (platform.hasStandardBrowserEnv) { + if (utils$1.isFunction(withXSRFToken)) { + withXSRFToken = withXSRFToken(newConfig); + } + + // Strict boolean check — prevents proto-pollution gadgets (e.g. Object.prototype.withXSRFToken = 1) + // and misconfigurations (e.g. "false") from short-circuiting the same-origin check and leaking + // the XSRF token cross-origin. + const shouldSendXSRF = + withXSRFToken === true || (withXSRFToken == null && isURLSameOrigin(newConfig.url)); + + if (shouldSendXSRF) { + const xsrfValue = xsrfHeaderName && xsrfCookieName && readXsrfCookie(xsrfCookieName); + + if (xsrfValue) { + headers.set(xsrfHeaderName, xsrfValue); + } + } + } + + return newConfig; +} + +const isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined'; + +var xhrAdapter = isXHRAdapterSupported && + function (config) { + return new Promise(function dispatchXhrRequest(resolve, reject) { + let useAsyncXsrf; + try { + const store = + platform.hasStandardBrowserEnv && typeof window !== 'undefined' && window.cookieStore; + useAsyncXsrf = store && utils$1.isFunction(store.get); + } catch (e) { + // A restricted Cookie Store getter must retain the synchronous fallback. + } + let xsrfCookieName; + const _config = resolveConfig( + config, + useAsyncXsrf + ? (name) => { + xsrfCookieName = name; + return null; + } + : undefined + ); + let requestData = _config.data; + const requestHeaders = AxiosHeaders.from(_config.headers).normalize(); + let { responseType, onUploadProgress, onDownloadProgress } = _config; + let onCanceled; + let timeoutId; + let uploadThrottled, downloadThrottled; + let flushUpload, flushDownload, flushDownloadWithEvent; + + function done() { + clearTimeout(timeoutId); + // A final progress callback must not prevent the remaining cleanup. + // Report errors asynchronously, as onloadend and the throttle timer do. + try { + flushUpload && flushUpload(); // flush events + } catch (err) { + setTimeout(() => { + throw err; + }); + } + try { + flushDownload && flushDownload(); // flush events + } catch (err) { + setTimeout(() => { + throw err; + }); + } + + // A flush can synchronously cancel the request and reenter done(). + // In that case the inner call has already detached these listeners. + if (request) { + downloadThrottled && request.removeEventListener('progress', downloadThrottled); + if (request.upload) { + uploadThrottled && request.upload.removeEventListener('progress', uploadThrottled); + flushUpload && request.upload.removeEventListener('loadend', flushUpload); + } + } + + _config.cancelToken && _config.cancelToken.unsubscribe(onCanceled); + + _config.signal && _config.signal.removeEventListener('abort', onCanceled); + } + + let request = new XMLHttpRequest(); + + request.open(_config.method.toUpperCase(), _config.url, true); + + // Set the request timeout in MS + request.timeout = _config.timeout; + + function onloadend(event) { + if (!request) { + return; + } + + // Status 0 means no response was received, which onerror and onabort normally + // reject before this runs. Firefox 152 fires only readystatechange and loadend for + // navigation-canceled requests (https://bugzilla.mozilla.org/show_bug.cgi?id=1505389), + // leaving settle() to resolve them as an empty success. ECONNABORTED is the error + // onabort raised on Firefox 151. Reads over file:, which some environments report as + // status 0 on success, are excluded by the request URL's scheme after browser-style + // preprocessing, by the page origin's scheme for relative URLs (which inherit it), or + // by responseURL where implemented. + if ( + request.status === 0 && + (parseProtocol(normalizeURLForProtocolCheck(_config.url)) || + parseProtocol(platform.origin)) !== 'file' && + !(request.responseURL && request.responseURL.startsWith('file:')) + ) { + reject(new AxiosError('Request aborted', AxiosError.ECONNABORTED, config, request)); + done(); + + // Clean up request + request = null; + return; + } + + // When loadend is still dispatching, flushing with it gives progress + // listeners a final delivery whose event has a live target. The legacy + // ready-state fallback has no event, so replay its pending progress. + // A throwing listener must not block settlement; rethrow asynchronously, + // matching how listener errors surface on the throttle timer path. + try { + if (event) { + flushDownloadWithEvent && flushDownloadWithEvent(event); + } else { + flushDownload && flushDownload(); + } + } catch (err) { + setTimeout(() => { + throw err; + }); + } + + // A final progress callback can cancel the request synchronously. + if (!request) { + return; + } + + // Prepare the response + const responseHeaders = AxiosHeaders.from( + 'getAllResponseHeaders' in request && request.getAllResponseHeaders() + ); + const responseData = + !responseType || responseType === 'text' || responseType === 'json' + ? request.responseText + : request.response; + const response = { + data: responseData, + status: request.status, + statusText: request.statusText, + headers: responseHeaders, + config, + request, + }; + + settle( + function _resolve(value) { + resolve(value); + done(); + }, + function _reject(err) { + reject(err); + done(); + }, + response + ); + + // Clean up request + request = null; + } + + if ('onloadend' in request) { + // Use onloadend if available + request.onloadend = onloadend; + } else { + // Listen for ready state to emulate onloadend + request.onreadystatechange = function handleLoad() { + if (!request || request.readyState !== 4) { + return; + } + + // The request errored out and we didn't get a response, this will be + // handled by onerror instead + // With one exception: request that using file: protocol, most browsers + // will return status as 0 even though it's a successful request + if ( + request.status === 0 && + !(request.responseURL && request.responseURL.startsWith('file:')) + ) { + return; + } + // readystate handler is calling before onerror or ontimeout handlers, + // so we should call onloadend on the next 'tick' + setTimeout(onloadend); + }; + } + + // Handle browser request cancellation (as opposed to a manual cancellation) + request.onabort = function handleAbort() { + if (!request) { + return; + } + + reject(new AxiosError('Request aborted', AxiosError.ECONNABORTED, config, request)); + done(); + + // Clean up request + request = null; + }; + + // Handle low level network errors + request.onerror = function handleError(event) { + // Browsers deliver a ProgressEvent in XHR onerror + // (message may be empty; when present, surface it) + // See https://developer.mozilla.org/docs/Web/API/XMLHttpRequest/error_event + const msg = event && event.message ? event.message : 'Network Error'; + const err = new AxiosError(msg, AxiosError.ERR_NETWORK, config, request); + // attach the underlying event for consumers who want details + err.event = event || null; + reject(err); + done(); + request = null; + }; + + // Handle timeout + request.ontimeout = function handleTimeout() { + if (!request) return; + let timeoutErrorMessage = _config.timeout + ? 'timeout of ' + _config.timeout + 'ms exceeded' + : 'timeout exceeded'; + const transitional = _config.transitional || transitionalDefaults; + if (_config.timeoutErrorMessage) { + timeoutErrorMessage = _config.timeoutErrorMessage; + } + reject( + new AxiosError( + timeoutErrorMessage, + transitional.clarifyTimeoutError ? AxiosError.ETIMEDOUT : AxiosError.ECONNABORTED, + config, + request + ) + ); + done(); + + // Clean up request + request = null; + }; + + // Remove Content-Type if data is undefined + requestData === undefined && requestHeaders.setContentType(null); + + // Add withCredentials to request if needed + if (!utils$1.isUndefined(_config.withCredentials)) { + request.withCredentials = !!_config.withCredentials; + } + + // Add responseType to request if needed + if (responseType && responseType !== 'json') { + request.responseType = _config.responseType; + } + + // Handle progress if needed + if (onDownloadProgress) { + [downloadThrottled, flushDownload, flushDownloadWithEvent] = progressEventReducer( + onDownloadProgress, + true + ); + request.addEventListener('progress', downloadThrottled); + } + + // Not all browsers support upload events + if (onUploadProgress && request.upload) { + [uploadThrottled, flushUpload] = progressEventReducer(onUploadProgress); + + request.upload.addEventListener('progress', uploadThrottled); + + request.upload.addEventListener('loadend', flushUpload); + } + + if (_config.cancelToken || _config.signal) { + // Handle cancellation + // eslint-disable-next-line func-names + onCanceled = (cancel) => { + if (!request) { + return; + } + reject(!cancel || cancel.type ? new CanceledError(null, config, request) : cancel); + const xhr = request; + done(); + request = null; + xhr.abort(); + }; + + _config.cancelToken && _config.cancelToken.subscribe(onCanceled); + if (!request) return; + if (_config.signal) { + _config.signal.aborted + ? onCanceled() + : _config.signal.addEventListener('abort', onCanceled); + } + } + + if (!request) return; + + const protocol = parseProtocol(_config.url); + + if (protocol && !platform.protocols.includes(protocol)) { + reject( + new AxiosError( + 'Unsupported protocol ' + protocol + ':', + AxiosError.ERR_BAD_REQUEST, + config + ) + ); + done(); + return; + } + + const sendRequest = () => { + if (!request) return; + // Apply headers after an asynchronous XSRF read so existing headers are + // replaced through AxiosHeaders rather than appended by the native XHR. + if ('setRequestHeader' in request) { + utils$1.forEach( + toByteStringHeaderObject(requestHeaders), + function setRequestHeader(val, key) { + request.setRequestHeader(key, val); + } + ); + } + request.send(requestData || null); + }; + + if (xsrfCookieName) { + // Native XHR timeout starts at send(). Cover cookie preparation and the + // subsequent request with the same budget and existing timeout handler. + const now = + typeof performance !== 'undefined' && utils$1.isFunction(performance.now) + ? () => performance.now() + : Date.now; + const deadline = request.timeout > 0 ? now() + Number(request.timeout) : undefined; + const abortOnTimeout = () => { + if (!request) return; + const xhr = request; + xhr.ontimeout(); + xhr.abort(); + }; + if (deadline !== undefined) { + const scheduleTimeout = () => { + const remaining = deadline - now(); + if (remaining > 0) { + // Browser timers overflow above the signed 32-bit delay limit. + timeoutId = setTimeout(scheduleTimeout, Math.min(remaining, 0x7fffffff)); + } else { + abortOnTimeout(); + } + }; + scheduleTimeout(); + } + + cookies + .readAsync(xsrfCookieName) + .then((value) => { + if (!request) return; + // Promise callbacks may run before an overdue timer after a busy task. + if (deadline !== undefined && now() >= deadline) { + abortOnTimeout(); + return; + } + if (value) { + const headerName = + utils$1.hasOwnProp(_config, 'xsrfHeaderName') && _config.xsrfHeaderName; + requestHeaders.set(headerName, value); + } + sendRequest(); + }) + .catch((error) => { + if (!request) return; + reject(AxiosError.from(error, null, config, request)); + done(); + request = null; + }); + } else { + sendRequest(); + } + }); + }; + +const composeSignals = (signals, timeout) => { + signals = signals ? signals.filter(Boolean) : []; + + if (!timeout && !signals.length) { + return; + } + + const controller = new AbortController(); + + let aborted = false; + + const onabort = function (reason) { + if (!aborted) { + aborted = true; + unsubscribe(); + const err = reason instanceof Error ? reason : this.reason; + controller.abort( + err instanceof AxiosError + ? err + : new CanceledError(err instanceof Error ? err.message : err) + ); + } + }; + + let timer = + timeout && + setTimeout(() => { + timer = null; + onabort(new AxiosError(`timeout of ${timeout}ms exceeded`, AxiosError.ETIMEDOUT)); + }, timeout); + + const unsubscribe = () => { + if (!signals) { + return; + } + timer && clearTimeout(timer); + timer = null; + signals.forEach((signal) => { + const unsubscribeSignal = utils$1.getSafeProp(signal, 'unsubscribe'); + utils$1.isFunction(unsubscribeSignal) + ? unsubscribeSignal.call(signal, onabort) + : signal.removeEventListener('abort', onabort); + }); + signals = null; + }; + + signals.forEach((signal) => { + if (aborted) { + return; + } + + if (signal.aborted) { + onabort.call(signal); + return; + } + + signal.addEventListener('abort', onabort, { once: true }); + }); + + const { signal } = controller; + + signal.unsubscribe = () => utils$1.asap(unsubscribe); + + return signal; +}; + +const streamChunk = function* (chunk, chunkSize) { + let len = chunk.byteLength; + + if (len < chunkSize) { + yield chunk; + return; + } + + let pos = 0; + let end; + + while (pos < len) { + end = pos + chunkSize; + yield chunk.slice(pos, end); + pos = end; + } +}; + +const readBytes = async function* (iterable, chunkSize) { + for await (const chunk of readStream(iterable)) { + yield* streamChunk(chunk, chunkSize); + } +}; + +const readStream = async function* (stream) { + if (stream[Symbol.asyncIterator]) { + yield* stream; + return; + } + + const reader = stream.getReader(); + try { + for (;;) { + const { done, value } = await reader.read(); + if (done) { + break; + } + yield value; + } + } finally { + await reader.cancel(); + } +}; + +const trackStream = (stream, chunkSize, onProgress, onFinish) => { + const iterator = readBytes(stream, chunkSize); + + let bytes = 0; + let done; + let _onFinish = (e) => { + if (!done) { + done = true; + onFinish && onFinish(e); + } + }; + + return new ReadableStream( + { + async pull(controller) { + try { + const { done, value } = await iterator.next(); + + if (done) { + _onFinish(); + controller.close(); + return; + } + + let len = value.byteLength; + if (onProgress) { + let loadedBytes = (bytes += len); + onProgress(loadedBytes); + } + controller.enqueue(new Uint8Array(value)); + } catch (err) { + _onFinish(err); + throw err; + } + }, + cancel(reason) { + _onFinish(reason); + return iterator.return(); + }, + }, + { + highWaterMark: 2, + } + ); +}; + +const CRLF = '\r\n'; +const normalizeLines = (value) => String(value).replace(/\r\n|\r|\n/g, CRLF); +const escapeName = (value) => + String(value).replace(/[\r\n"]/g, (char) => + char === '\r' ? '%0D' : char === '\n' ? '%0A' : '%22' + ); + +// Count UTF-8 bytes without allocating an encoded copy of a field. FormData +// string values normalize line endings; Blob/File contents remain unchanged. +const stringBytes = (value, normalize) => { + let length = 0; + for (let i = 0; i < value.length; i++) { + const code = value.charCodeAt(i); + if (normalize && (code === 13 || code === 10)) { + if (code === 13 && value.charCodeAt(i + 1) === 10) i++; + length += 2; + } else if (code < 0x80) { + length++; + } else if (code < 0x800) { + length += 2; + } else if ( + code >= 0xd800 && + code <= 0xdbff && + value.charCodeAt(i + 1) >= 0xdc00 && + value.charCodeAt(i + 1) <= 0xdfff + ) { + length += 4; + i++; + } else { + length += 3; + } + } + return length; +}; + +// Describe serialization failures independently of any request library. +class FormDataError extends TypeError { + constructor(message, reason) { + super(message); + this.name = 'FormDataError'; + this.reason = reason; + } +} + +// The caller supplies the boundary, Blob implementation, and limit error. +function formDataToBlob(form, Blob, limit, limitError, boundary) { + if (!utils$1.isFunction(Blob)) { + throw new FormDataError('Blob is not supported', 'blob'); + } + + if ( + !utils$1.isString(boundary) || + !/^[A-Za-z0-9'()+_,./:=? -]{1,70}$/.test(boundary) || + / $/.test(boundary) + ) { + throw new FormDataError('Invalid multipart boundary', 'boundary'); + } + const footer = '--' + boundary + '--' + CRLF; + let length = footer.length; + const parts = []; + const checkLength = (extra) => { + if (length + extra > limit) throw limitError(); + }; + checkLength(0); + + for (const [name, value] of form) { + const isString = utils$1.isString(value); + const valueLength = isString ? stringBytes(value, true) : value.size; + if (!Number.isFinite(valueLength) || valueLength < 0) { + throw new FormDataError('Unsupported FormData part size', 'part'); + } + // Reject large values and names before building normalized header strings. + checkLength( + valueLength + + stringBytes(name, true) + + (!isString && value.name ? stringBytes(value.name, false) : 0) + + (!isString && value.type ? stringBytes(value.type, false) : 0) + ); + + let header = + '--' + + boundary + + CRLF + + 'Content-Disposition: form-data; name="' + + escapeName(normalizeLines(name)) + + '"'; + if (!isString) { + header += + '; filename="' + + escapeName(utils$1.isString(value.name) ? value.name : 'blob') + + '"' + + CRLF + + 'Content-Type: ' + + String(value.type || 'application/octet-stream').replace(/[\r\n]/g, ''); + } + header += CRLF + CRLF; + const partLength = stringBytes(header, false) + valueLength + CRLF.length; + checkLength(partLength); + length += partLength; + parts.push({ header, value, isString }); + } + + // Native Blob composition retains existing Blob/File data. No file is read + // and no complete multipart ArrayBuffer is created to determine its length. + const blobParts = []; + for (const part of parts) { + blobParts.push(part.header, part.isString ? normalizeLines(part.value) : part.value, CRLF); + } + blobParts.push(footer); + return new Blob(blobParts, { type: 'multipart/form-data; boundary=' + boundary }); +} + +function createMultipartBody(form, Blob, limit, limitError, boundary) { + // Report missing Blob support before trying to select a random source. + if (!utils$1.isFunction(Blob)) { + throw new AxiosError('Blob is not supported', AxiosError.ERR_NOT_SUPPORT); + } + + if (boundary === undefined) { + if (utils$1.isFunction(platform.generateString)) { + boundary = 'axios-' + platform.generateString(36, '0123456789abcdef'); + } else { + const crypto = utils$1.global.crypto; + if (!crypto || !utils$1.isFunction(crypto.getRandomValues)) { + throw new AxiosError('Random byte generation is not supported', AxiosError.ERR_NOT_SUPPORT); + } + const random = new Uint8Array(18); + crypto.getRandomValues(random); + boundary = + 'axios-' + Array.from(random, (value) => ('0' + value.toString(16)).slice(-2)).join(''); + } + } + + try { + return formDataToBlob(form, Blob, limit, limitError, boundary); + } catch (error) { + if (error instanceof FormDataError) { + const code = + error.reason === 'boundary' ? AxiosError.ERR_BAD_OPTION_VALUE : AxiosError.ERR_BAD_REQUEST; + throw new AxiosError(error.message, code); + } + throw error; + } +} + +/** + * Estimate data: URL byte lengths *without* allocating large buffers. + * - Fetch percent-decodes a base64 body before decoding it. + * - Node's Buffer.from(body, 'base64') sizes its backing allocation from the + * percent-decoded body, including ignored characters and content after padding. + * - Non-base64 data is percent-decoded and then encoded as UTF-8. + */ +const isHexDigit = (charCode) => + (charCode >= 48 && charCode <= 57) || + (charCode >= 65 && charCode <= 70) || + (charCode >= 97 && charCode <= 102); + +const isPercentEncodedByte = (str, i, len) => + i + 2 < len && isHexDigit(str.charCodeAt(i + 1)) && isHexDigit(str.charCodeAt(i + 2)); + +const hexValue = (charCode) => (charCode <= 57 ? charCode - 48 : (charCode & 0xdf) - 55); + +const isBase64Char = (charCode) => + (charCode >= 65 && charCode <= 90) || // A-Z + (charCode >= 97 && charCode <= 122) || // a-z + (charCode >= 48 && charCode <= 57) || // 0-9 + charCode === 43 || // + + charCode === 47 || // / + charCode === 45 || // - (base64url) + charCode === 95; // _ (base64url) + +const isBase64Whitespace = (charCode) => + charCode === 9 || charCode === 10 || charCode === 12 || charCode === 13 || charCode === 32; + +const base64Bytes = (significant) => { + const groups = Math.floor(significant / 4); + const remainder = significant % 4; + return groups * 3 + (remainder === 2 ? 1 : remainder === 3 ? 2 : 0); +}; + +// Buffer.byteLength(body, 'base64') uses the raw string length as an allocation +// upper bound even when Buffer.from later ignores characters or stops at '='. +const estimateBase64BufferAllocation = (body) => { + const len = body.length; + let padding = 0; + + if (len > 0 && body.charCodeAt(len - 1) === 61 /* '=' */) { + padding++; + + if (len > 1 && body.charCodeAt(len - 2) === 61 /* '=' */) { + padding++; + } + } + + return Math.floor(((len - padding) * 3) / 4); +}; + +const estimatePercentDecodedBase64Bytes = (body) => { + const len = body.length; + let significant = 0; + let padding = 0; + let invalid = false; + + for (let i = 0; i < len; i++) { + let code = body.charCodeAt(i); + + if (code === 37 /* '%' */ && isPercentEncodedByte(body, i, len)) { + code = hexValue(body.charCodeAt(i + 1)) * 16 + hexValue(body.charCodeAt(i + 2)); + i += 2; + } + + if (isBase64Whitespace(code)) { + continue; + } + + if (code === 61 /* '=' */) { + padding++; + continue; + } + + if (!isBase64Char(code) || padding > 0) { + invalid = true; + continue; + } + + significant++; + } + + // Fetch rejects malformed forgiving-base64 input. Returning the raw-size + // allocation bound keeps that invalid input from becoming a pre-check bypass. + if ( + invalid || + padding > 2 || + (padding > 0 && (significant + padding) % 4 !== 0) || + significant % 4 === 1 + ) { + return estimateBase64BufferAllocation(body); + } + + return base64Bytes(significant); +}; + +const estimateDataURLBytes = (url, estimateBase64, base64Pattern) => { + if (!url || typeof url !== 'string') return 0; + if (!/^data:/i.test(url)) return 0; + + const comma = url.indexOf(','); + if (comma < 0) return 0; + + const meta = url.slice(5, comma); + const body = url.slice(comma + 1); + const isBase64 = base64Pattern.test(meta); + + if (isBase64) { + return estimateBase64(body); + } + + // Compute UTF-8 byte length directly from UTF-16 code units without allocating + // a byte buffer (TextEncoder.encode would defeat the DoS guard on large bodies). + // Valid %XX triplets count as one decoded byte; this matches the bytes that + // decodeURIComponent(body) would produce before Buffer re-encodes the string. + let bytes = 0; + for (let i = 0, len = body.length; i < len; i++) { + const c = body.charCodeAt(i); + if (c === 37 /* '%' */ && isPercentEncodedByte(body, i, len)) { + bytes += 1; + i += 2; + } else if (c < 0x80) { + bytes += 1; + } else if (c < 0x800) { + bytes += 2; + } else if (c >= 0xd800 && c <= 0xdbff && i + 1 < len) { + const next = body.charCodeAt(i + 1); + if (next >= 0xdc00 && next <= 0xdfff) { + bytes += 4; + i++; + } else { + bytes += 3; + } + } else { + bytes += 3; + } + } + return bytes; +}; + +/** + * Estimate the percent-decoded payload size used by Fetch data: URLs. + * + * @param {string} url + * @returns {number} + */ +function estimateDataURLDecodedBytes(url) { + // Fetch removes URL fragments before processing a data: URL. + const fragmentIndex = typeof url === 'string' ? url.indexOf('#') : -1; + + return estimateDataURLBytes( + fragmentIndex === -1 ? url : url.slice(0, fragmentIndex), + estimatePercentDecodedBase64Bytes, + /; *base64[\t\n\f\r ]*$/i + ); +} + +const VERSION = "1.21.1"; + +const DEFAULT_CHUNK_SIZE = 64 * 1024; + +const DEFAULT_REQUEST_OPTIONS = { + cache: 'default', + redirect: 'follow', + referrer: 'about:client', + referrerPolicy: '', + mode: 'cors', + integrity: '', + keepalive: false, + priority: 'auto', + window: null, +}; + +const { isFunction } = utils$1; + +/** + * Encode a UTF-8 string to a Latin-1 byte string for use with btoa(). + * This is a modern replacement for the deprecated unescape(encodeURIComponent(str)) pattern. + * + * @param {string} str The string to encode + * + * @returns {string} UTF-8 bytes as a Latin-1 string + */ +const encodeUTF8 = (str) => + encodeURIComponent(str).replace(/%([0-9A-F]{2})/gi, (_, hex) => + String.fromCharCode(parseInt(hex, 16)) + ); + +// Node's WHATWG URL parser returns `username` and `password` percent-encoded. +// Decode before composing the `auth` option so credentials such as +// `my%40email.com:pass` are sent as `my@email.com:pass`. Falls back to the +// original value for malformed input so a bad encoding never throws. +const decodeURIComponentSafe = (value) => { + if (!utils$1.isString(value)) { + return value; + } + + try { + return decodeURIComponent(value); + } catch (error) { + return value; + } +}; + +const test = (fn, ...args) => { + try { + return !!fn(...args); + } catch (e) { + return false; + } +}; + +const maybeWithAuthCredentials = (url) => { + const protocolIndex = url.indexOf('://'); + let urlToCheck = url; + if (protocolIndex !== -1) { + urlToCheck = urlToCheck.slice(protocolIndex + 3); + } + return urlToCheck.includes('@') || urlToCheck.includes(':'); +}; + +const factory = (env) => { + const globalObject = + utils$1.global !== undefined && utils$1.global !== null ? utils$1.global : globalThis; + const { ReadableStream, TextEncoder } = globalObject; + + env = utils$1.merge.call( + { + skipUndefined: true, + }, + { + Request: globalObject.Request, + Response: globalObject.Response, + Blob: globalObject.Blob, + }, + env + ); + + const envFetch = utils$1.hasOwnProp(env, 'fetch') ? env.fetch : undefined; + const { Request, Response, Blob } = env; + const isFetchSupported = envFetch ? isFunction(envFetch) : typeof fetch === 'function'; + const isRequestSupported = isFunction(Request); + const isResponseSupported = isFunction(Response); + + if (!isFetchSupported) { + return false; + } + + const isReadableStreamSupported = isFetchSupported && isFunction(ReadableStream); + + const encodeText = + isFetchSupported && + (typeof TextEncoder === 'function' + ? ( + (encoder) => (str) => + encoder.encode(str) + )(new TextEncoder()) + : async (str) => new Uint8Array(await new Request(str).arrayBuffer())); + + const supportsRequestStream = + isRequestSupported && + isReadableStreamSupported && + test(() => { + let duplexAccessed = false; + + const request = new Request(platform.origin, { + body: new ReadableStream(), + method: 'POST', + get duplex() { + duplexAccessed = true; + return 'half'; + }, + }); + + const hasContentType = request.headers.has('Content-Type'); + + if (request.body != null) { + request.body.cancel(); + } + + return duplexAccessed && !hasContentType; + }); + + const supportsResponseStream = + isResponseSupported && + isReadableStreamSupported && + test(() => utils$1.isReadableStream(new Response('').body)); + + // Some runtimes reject every explicit cache mode. Use own defaults for both + // probes so unrelated polluted options cannot affect cache-mode detection. + const requestDefaults = Object.assign(Object.create(null), DEFAULT_REQUEST_OPTIONS); + + if (isRequestSupported && !test(() => new Request(platform.origin, requestDefaults))) { + delete requestDefaults.cache; + + // Only omit cache when that makes Request construction succeed. Otherwise + // retain the explicit default that protects supporting runtimes from pollution. + if (!test(() => new Request(platform.origin, requestDefaults))) { + requestDefaults.cache = DEFAULT_REQUEST_OPTIONS.cache; + } + } + + const resolvers = { + stream: supportsResponseStream && ((res) => res.body), + }; + + isFetchSupported && + (() => { + ['text', 'arrayBuffer', 'blob', 'formData', 'stream'].forEach((type) => { + !resolvers[type] && + (resolvers[type] = (res, config) => { + let method = res && res[type]; + + if (method) { + return method.call(res); + } + + throw new AxiosError( + `Response type '${type}' is not supported`, + AxiosError.ERR_NOT_SUPPORT, + config + ); + }); + }); + })(); + + const getBodyLength = async (body) => { + if (body == null) { + return 0; + } + + if (utils$1.isBlob(body)) { + return body.size; + } + + if (utils$1.isArrayBufferView(body) || utils$1.isArrayBuffer(body)) { + return body.byteLength; + } + + if (utils$1.isURLSearchParams(body)) { + body = body + ''; + } + + if (utils$1.isString(body)) { + return (await encodeText(body)).byteLength; + } + }; + + const resolveBodyLength = async (headers, body) => { + const length = utils$1.toFiniteNumber(headers.getContentLength()); + + return length == null ? getBodyLength(body) : length; + }; + + return async (config) => { + let { + url, + method, + data, + signal, + cancelToken, + timeout, + onDownloadProgress, + onUploadProgress, + responseType, + headers, + withCredentials = 'same-origin', + fetchOptions, + maxContentLength, + maxBodyLength, + maxRedirects, + } = resolveConfig(config); + + const hasMaxContentLength = utils$1.isNumber(maxContentLength) && maxContentLength > -1; + const hasMaxBodyLength = utils$1.isNumber(maxBodyLength) && maxBodyLength > -1; + const own = (key) => (utils$1.hasOwnProp(config, key) ? config[key] : undefined); + + let _fetch = envFetch || fetch; + + responseType = responseType ? (responseType + '').toLowerCase() : 'text'; + + let composedSignal = composeSignals( + [signal, cancelToken && cancelToken.toAbortSignal()], + timeout + ); + + let request = null; + + const unsubscribe = + composedSignal && + composedSignal.unsubscribe && + (() => { + composedSignal.unsubscribe(); + }); + + let requestContentLength; + + // AxiosErrors we raise while request or response bodies are being streamed. Captured + // by identity so the catch block can surface it directly, regardless of + // how the runtime wraps the resulting fetch rejection (undici exposes it + // as `err.cause`; some browsers drop the original error entirely). + let pendingBodyError = null; + let pendingResponseError = null; + + const maxBodyLengthError = () => + new AxiosError( + 'Request body larger than maxBodyLength limit', + AxiosError.ERR_BAD_REQUEST, + config, + request + ); + + try { + // HTTP basic authentication + let auth = undefined; + const configAuth = own('auth'); + + if (configAuth) { + const username = utils$1.getSafeProp(configAuth, 'username') || ''; + const password = utils$1.getSafeProp(configAuth, 'password') || ''; + auth = { + username, + password, + }; + } + + let parsedURL; + if (maybeWithAuthCredentials(url)) { + parsedURL = new URL(url, platform.origin); + + if (!auth && (parsedURL.username || parsedURL.password)) { + const urlUsername = decodeURIComponentSafe(parsedURL.username); + const urlPassword = decodeURIComponentSafe(parsedURL.password); + auth = { + username: urlUsername, + password: urlPassword, + }; + } + + if (parsedURL.username || parsedURL.password) { + parsedURL.username = ''; + parsedURL.password = ''; + url = parsedURL.href; + } + } + + if (auth) { + headers.delete('authorization'); + headers.set( + 'Authorization', + 'Basic ' + btoa(encodeUTF8((auth.username || '') + ':' + (auth.password || ''))) + ); + } + + // Enforce maxContentLength for data: URLs up-front so we never materialize + // an oversized payload. The HTTP adapter applies the same check (see http.js + // "if (protocol === 'data:')" branch). + if (hasMaxContentLength && parsedURL && parsedURL.protocol === 'data:') { + const estimated = estimateDataURLDecodedBytes(parsedURL.href); + if (estimated > maxContentLength) { + throw new AxiosError( + 'maxContentLength size of ' + maxContentLength + ' exceeded', + AxiosError.ERR_BAD_RESPONSE, + config, + request + ); + } + } + + const formContentType = + utils$1.isSpecCompliantForm(data) && AxiosHeaders.from(own('headers')).getContentType(); + let formBoundary; + if ( + utils$1.isString(formContentType) && + /^multipart\/form-data(?:\s*;|$)/i.test(formContentType.trim()) + ) { + const parameters = AxiosHeaders.parseParameters(formContentType); + if (utils$1.hasOwnProp(parameters, 'boundary')) formBoundary = parameters.boundary; + } + + if ( + utils$1.isSpecCompliantForm(data) && + method !== 'get' && + method !== 'head' && + (hasMaxBodyLength || + (onUploadProgress && supportsRequestStream) || + formBoundary !== undefined) + ) { + data = createMultipartBody( + data, + Blob, + hasMaxBodyLength ? maxBodyLength : Infinity, + maxBodyLengthError, + formBoundary + ); + // Blob.type lowercases its value, including a case-sensitive boundary. + // Retain the caller's header when an explicit boundary was serialized. + headers.setContentType(formBoundary === undefined ? data.type : formContentType); + requestContentLength = data.size; + } + + // Enforce maxBodyLength against known-size bodies before dispatch using + // the body's *actual* size — never a caller-declared Content-Length, + // which could under-report to slip an oversized body past the check. + // Unknown-size streams return undefined here and are counted per-chunk + // below as fetch consumes them. + if (hasMaxBodyLength && method !== 'get' && method !== 'head') { + const outboundLength = await getBodyLength(data); + if (typeof outboundLength === 'number' && isFinite(outboundLength)) { + requestContentLength = outboundLength; + if (outboundLength > maxBodyLength) { + throw maxBodyLengthError(); + } + } + } + + // A streamed body under maxBodyLength must be counted as fetch consumes + // it; its size is never trusted from a caller-declared Content-Length. + const mustEnforceStreamBody = + hasMaxBodyLength && (utils$1.isReadableStream(data) || utils$1.isStream(data)); + + const trackRequestStream = (stream, onProgress, flush) => + trackStream( + stream, + DEFAULT_CHUNK_SIZE, + (loadedBytes) => { + if (hasMaxBodyLength && loadedBytes > maxBodyLength) { + throw (pendingBodyError = maxBodyLengthError()); + } + onProgress && onProgress(loadedBytes); + }, + flush + ); + + if ( + supportsRequestStream && + method !== 'get' && + method !== 'head' && + (onUploadProgress || mustEnforceStreamBody) + ) { + requestContentLength = + requestContentLength == null + ? await resolveBodyLength(headers, data) + : requestContentLength; + + // A declared length of 0 is only trusted to skip the wrap when we are + // not enforcing a stream limit (which must not rely on that header). + if (requestContentLength !== 0 || mustEnforceStreamBody) { + let _request = new Request(url, { + method: 'POST', + body: data, + duplex: 'half', + }); + + let contentTypeHeader; + + if ( + utils$1.isFormData(data) && + (contentTypeHeader = _request.headers.get('content-type')) + ) { + headers.setContentType(contentTypeHeader); + } + + if (_request.body) { + const [onProgress, flush] = + (onUploadProgress && + progressEventDecorator( + requestContentLength, + progressEventReducer(asyncDecorator(onUploadProgress)) + )) || + []; + + data = trackRequestStream(_request.body, onProgress, flush); + } + } + } else if ( + mustEnforceStreamBody && + !isRequestSupported && + isReadableStreamSupported && + method !== 'get' && + method !== 'head' + ) { + data = trackRequestStream(data); + } else if ( + mustEnforceStreamBody && + isRequestSupported && + !supportsRequestStream && + method !== 'get' && + method !== 'head' + ) { + throw new AxiosError( + 'Stream request bodies are not supported by the current fetch implementation', + AxiosError.ERR_NOT_SUPPORT, + config, + request + ); + } + + if (!utils$1.isString(withCredentials)) { + withCredentials = withCredentials ? 'include' : 'omit'; + } + + // Cloudflare Workers throws when credentials are defined + // see https://github.com/cloudflare/workerd/issues/902 + const isCredentialsSupported = isRequestSupported && 'credentials' in Request.prototype; + + // If data is FormData and Content-Type is multipart/form-data without boundary, + // delete it so fetch can set it correctly with the boundary + if (utils$1.isFormData(data)) { + const contentType = headers.getContentType(); + if ( + contentType && + /^multipart\/form-data/i.test(contentType) && + !/boundary=/i.test(contentType) + ) { + headers.delete('content-type'); + } + } + + // Set User-Agent header if not already set (fetch defaults to 'node' in Node.js) + headers.set('User-Agent', 'axios/' + VERSION, false); + + const safeFetchOptions = + fetchOptions == null ? fetchOptions : Object.assign(Object.create(null), fetchOptions); + + if (safeFetchOptions) { + // These options are owned by Axios and are already reflected in the + // resolved Request passed to fetch. + delete safeFetchOptions.body; + delete safeFetchOptions.headers; + delete safeFetchOptions.method; + delete safeFetchOptions.signal; + delete safeFetchOptions.duplex; + delete safeFetchOptions.credentials; + } + + const resolvedOptions = Object.assign(Object.create(null), safeFetchOptions, { + signal: composedSignal, + method: method.toUpperCase(), + headers: toByteStringHeaderObject(headers.normalize()), + body: data, + duplex: 'half', + credentials: isCredentialsSupported ? withCredentials : undefined, + }); + + if (isRequestSupported) { + utils$1.forEach(requestDefaults, (value, key) => { + if (resolvedOptions[key] === undefined) { + resolvedOptions[key] = value; + } + }); + + if (resolvedOptions.signal === undefined) { + resolvedOptions.signal = null; + } + + if (resolvedOptions.body === undefined) { + resolvedOptions.body = null; + } + } + + if (maxRedirects === 0) { + resolvedOptions.redirect = 'manual'; + + if (safeFetchOptions) { + safeFetchOptions.redirect = 'manual'; + } + } + + request = isRequestSupported && new Request(url, resolvedOptions); + + let response = await (isRequestSupported + ? _fetch(request, safeFetchOptions) + : _fetch(url, resolvedOptions)); + + const responseHeaders = AxiosHeaders.from(response.headers); + + // Cheap pre-check: if the server honestly declares a content-length that + // already exceeds the cap, reject before we start streaming. + if (hasMaxContentLength) { + const declaredLength = utils$1.toFiniteNumber(responseHeaders.getContentLength()); + if (declaredLength != null && declaredLength > maxContentLength) { + throw new AxiosError( + 'maxContentLength size of ' + maxContentLength + ' exceeded', + AxiosError.ERR_BAD_RESPONSE, + config, + request + ); + } + } + + const isStreamResponse = + supportsResponseStream && (responseType === 'stream' || responseType === 'response'); + + if ( + supportsResponseStream && + response.body && + (onDownloadProgress || hasMaxContentLength || (isStreamResponse && unsubscribe)) + ) { + const options = {}; + + ['status', 'statusText', 'headers'].forEach((prop) => { + options[prop] = response[prop]; + }); + + const responseContentLength = utils$1.toFiniteNumber(responseHeaders.getContentLength()); + + const [onProgress, flush] = + (onDownloadProgress && + progressEventDecorator( + responseContentLength, + progressEventReducer(asyncDecorator(onDownloadProgress), true) + )) || + []; + + let bytesRead = 0; + const onChunkProgress = (loadedBytes) => { + if (hasMaxContentLength) { + bytesRead = loadedBytes; + if (bytesRead > maxContentLength) { + throw (pendingResponseError = new AxiosError( + 'maxContentLength size of ' + maxContentLength + ' exceeded', + AxiosError.ERR_BAD_RESPONSE, + config, + request + )); + } + } + onProgress && onProgress(loadedBytes); + }; + + response = new Response( + trackStream(response.body, DEFAULT_CHUNK_SIZE, onChunkProgress, () => { + flush && flush(); + unsubscribe && unsubscribe(); + }), + options + ); + } + + responseType = responseType || 'text'; + + let responseData = await resolvers[utils$1.findKey(resolvers, responseType) || 'text']( + response, + config + ); + + // Fallback enforcement for environments without ReadableStream support + // (legacy runtimes). Detect materialized size from typed output; skip + // streams/Response passthrough since the user will read those themselves. + if (hasMaxContentLength && !supportsResponseStream && !isStreamResponse) { + let materializedSize; + if (responseData != null) { + if (typeof responseData.byteLength === 'number') { + materializedSize = responseData.byteLength; + } else if (typeof responseData.size === 'number') { + materializedSize = responseData.size; + } else if (typeof responseData === 'string') { + materializedSize = + typeof TextEncoder === 'function' + ? new TextEncoder().encode(responseData).byteLength + : responseData.length; + } + } + if (typeof materializedSize === 'number' && materializedSize > maxContentLength) { + throw new AxiosError( + 'maxContentLength size of ' + maxContentLength + ' exceeded', + AxiosError.ERR_BAD_RESPONSE, + config, + request + ); + } + } + + !isStreamResponse && unsubscribe && unsubscribe(); + + return await new Promise((resolve, reject) => { + settle(resolve, reject, { + data: responseData, + headers: AxiosHeaders.from(response.headers), + status: response.status, + statusText: response.statusText, + config, + request, + }); + }); + } catch (err) { + unsubscribe && unsubscribe(); + + // Safari can surface fetch aborts as a DOMException-like object whose + // branded getters throw. Prefer our composed signal reason before reading + // the caught error, preserving timeout vs cancellation semantics. + if (composedSignal && composedSignal.aborted && composedSignal.reason instanceof AxiosError) { + const canceledError = composedSignal.reason; + canceledError.config = config; + request && (canceledError.request = request); + if (err !== canceledError) { + // Non-enumerable to match native Error `cause` semantics so loggers + // don't recurse into circular fetch internals (see #7205). + Object.defineProperty(canceledError, 'cause', { + __proto__: null, + value: err, + writable: true, + enumerable: false, + configurable: true, + }); + } + throw canceledError; + } + + // Surface a maxBodyLength violation we raised while the request body was + // being streamed. Keeping the original error (rather than reading + // `err.cause.isAxiosError`) keeps the error deterministic across runtimes + // and avoids both prototype-pollution reads and mis-attributing a foreign + // AxiosError that merely happened to land in `err.cause`. + if (pendingBodyError) { + request && !pendingBodyError.request && (pendingBodyError.request = request); + throw pendingBodyError; + } + + if (pendingResponseError) { + throw pendingResponseError; + } + + // Re-throw AxiosErrors we raised synchronously (data: URL / content-length + // pre-checks, response size enforcement) without re-wrapping them. + if (err instanceof AxiosError) { + request && !err.request && (err.request = request); + throw err; + } + + if (err && err.name === 'TypeError' && /Load failed|fetch/i.test(err.message)) { + const networkError = new AxiosError( + 'Network Error', + AxiosError.ERR_NETWORK, + config, + request, + err && err.response + ); + // Non-enumerable to match native Error `cause` semantics so loggers + // don't recurse into circular fetch internals (see #7205). + Object.defineProperty(networkError, 'cause', { + __proto__: null, + value: err.cause || err, + writable: true, + enumerable: false, + configurable: true, + }); + throw networkError; + } + + throw AxiosError.from(err, err && err.code, config, request, err && err.response); + } + }; +}; + +const seedCache = new Map(); + +const getFetch = (config) => { + const env = Object.create(null); + const configuredEnv = config && utils$1.hasOwnProp(config, 'env') && config.env; + ['fetch', 'Request', 'Response', 'Blob'].forEach((key) => { + if (configuredEnv && utils$1.hasOwnProp(configuredEnv, key)) { + env[key] = configuredEnv[key]; + } + }); + const { fetch, Request, Response, Blob } = env; + const seeds = [Request, Response, fetch, Blob]; + + let len = seeds.length, + i = len, + seed, + target, + map = seedCache; + + while (i--) { + seed = seeds[i]; + target = map.get(seed); + + target === undefined && map.set(seed, (target = i ? new Map() : factory(env))); + + map = target; + } + + return target; +}; + +getFetch(); + +/** + * Known adapters mapping. + * Provides environment-specific adapters for Axios: + * - `http` for Node.js + * - `xhr` for browsers + * - `fetch` for fetch API-based requests + * + * @type {Object} + */ +const knownAdapters = { + http: httpAdapter, + xhr: xhrAdapter, + fetch: { + get: getFetch, + }, +}; + +// Assign adapter names for easier debugging and identification +utils$1.forEach(knownAdapters, (fn, value) => { + if (fn) { + try { + // Null-proto descriptors so a polluted Object.prototype.get cannot turn + // these data descriptors into accessor descriptors on the way in. + Object.defineProperty(fn, 'name', { __proto__: null, value }); + } catch (e) { + // eslint-disable-next-line no-empty + } + Object.defineProperty(fn, 'adapterName', { __proto__: null, value }); + } +}); + +/** + * Render a rejection reason string for unknown or unsupported adapters + * + * @param {string} reason + * @returns {string} + */ +const renderReason = (reason) => `- ${reason}`; + +/** + * Check if the adapter is resolved (function, null, or false) + * + * @param {Function|null|false} adapter + * @returns {boolean} + */ +const isResolvedHandle = (adapter) => + utils$1.isFunction(adapter) || adapter === null || adapter === false; + +/** + * Get the first suitable adapter from the provided list. + * Tries each adapter in order until a supported one is found. + * Throws an AxiosError if no adapter is suitable. + * + * @param {Array|string|Function} adapters - Adapter(s) by name or function. + * @param {Object} config - Axios request configuration + * @throws {AxiosError} If no suitable adapter is available + * @returns {Function} The resolved adapter function + */ +function getAdapter(adapters, config) { + adapters = utils$1.isArray(adapters) ? adapters : [adapters]; + + const { length } = adapters; + let nameOrAdapter; + let adapter; + + const rejectedReasons = {}; + + for (let i = 0; i < length; i++) { + nameOrAdapter = adapters[i]; + let id; + + adapter = nameOrAdapter; + + if (!isResolvedHandle(nameOrAdapter)) { + adapter = knownAdapters[(id = String(nameOrAdapter)).toLowerCase()]; + + if (adapter === undefined) { + throw new AxiosError(`Unknown adapter '${id}'`); + } + } + + if (adapter && (utils$1.isFunction(adapter) || (adapter = adapter.get(config)))) { + break; + } + + rejectedReasons[id || '#' + i] = adapter; + } + + if (!adapter) { + const reasons = Object.entries(rejectedReasons).map( + ([id, state]) => + `adapter ${id} ` + + (state === false ? 'is not supported by the environment' : 'is not available in the build') + ); + + let s = length + ? reasons.length > 1 + ? 'since :\n' + reasons.map(renderReason).join('\n') + : ' ' + renderReason(reasons[0]) + : 'as no adapter specified'; + + throw new AxiosError( + `There is no suitable adapter to dispatch the request ` + s, + AxiosError.ERR_NOT_SUPPORT + ); + } + + return adapter; +} + +/** + * Exports Axios adapters and utility to resolve an adapter + */ +var adapters = { + /** + * Resolve an adapter from a list of adapter names or functions. + * @type {Function} + */ + getAdapter, + + /** + * Exposes all known adapters + * @type {Object} + */ + adapters: knownAdapters, +}; + +/** + * Throws a `CanceledError` if cancellation has been requested. + * + * @param {Object} config The config that is to be used for the request + * + * @returns {void} + */ +function throwIfCancellationRequested(config) { + if (config.cancelToken) { + config.cancelToken.throwIfRequested(); + } + + if (config.signal && config.signal.aborted) { + throw new CanceledError(null, config); + } +} + +/** + * Resolve the clock used to time adapter execution. + * + * Prefers the monotonic `performance.now()` so wall-clock adjustments do not + * skew the measurement, and so frameworks that forbid reading the current + * time during prerendering (e.g. Next.js Cache Components) accept it. Falls + * back to `Date.now()` in runtimes without the High Resolution Time API. + * + * @returns {() => number} Millisecond clock + */ +function resolveClock() { + return typeof performance !== 'undefined' && utils$1.isFunction(performance.now) + ? () => performance.now() + : Date.now; +} + +/** + * Whole milliseconds elapsed since `start`, floored at zero. + * + * Rounded so the value stays an integer as with `Date.now()`. The fallback + * wall clock can move backwards mid-request, so the result is clamped. + * + * @param {() => number} now Clock returned by `resolveClock()` + * @param {number} start Timestamp read from `now` + * + * @returns {number} Non-negative elapsed milliseconds + */ +function elapsedSince(now, start) { + return Math.max(0, Math.round(now() - start)); +} + +/** + * Dispatch a request to the server using the configured adapter. + * + * @param {object} config The config that is to be used for the request + * + * @returns {Promise} The Promise to be fulfilled + */ +function dispatchRequest(_config) { + // Interceptors may replace the merged config with an ordinary object. Flatten + // it at the dispatch boundary so shared prototype members cannot become + // request behavior, while preserving intentional template/class members. + const config = utils$1.toSafeFlatObject(_config); + + throwIfCancellationRequested(config); + + config.headers = AxiosHeaders.from(utils$1.getSafeProp(config, 'headers')); + + // Transform request data + config.data = transformData.call(config, config.transformRequest); + + if (['post', 'put', 'patch'].indexOf(config.method) !== -1) { + config.headers.setContentType('application/x-www-form-urlencoded', false); + } + + const adapter = adapters.getAdapter(config.adapter || defaults.adapter, config); + + const now = resolveClock(); + const start = now(); + + return adapter(config).then( + function onAdapterResolution(response) { + throwIfCancellationRequested(config); + + response.duration = elapsedSince(now, start); + + // Expose the current response on config so that transformResponse can + // attach it to any AxiosError it throws (e.g. on JSON parse failure). + // We clean it up afterwards to avoid polluting the config object. + config.response = response; + try { + response.data = transformData.call(config, config.transformResponse, response); + } finally { + delete config.response; + } + + response.headers = AxiosHeaders.from(response.headers); + + return response; + }, + function onAdapterRejection(reason) { + if (!isCancel(reason)) { + throwIfCancellationRequested(config); + + // Transform response data + if (reason && reason.response) { + reason.response.duration = elapsedSince(now, start); + config.response = reason.response; + try { + reason.response.data = transformData.call( + config, + config.transformResponse, + reason.response + ); + } finally { + delete config.response; + } + reason.response.headers = AxiosHeaders.from(reason.response.headers); + } + } + + return Promise.reject(reason); + } + ); +} + +const validators$1 = {}; + +// eslint-disable-next-line func-names +['object', 'boolean', 'number', 'function', 'string', 'symbol'].forEach((type, i) => { + validators$1[type] = function validator(thing) { + return typeof thing === type || 'a' + (i < 1 ? 'n ' : ' ') + type; + }; +}); + +const deprecatedWarnings = {}; + +/** + * Transitional option validator + * + * @param {function|boolean?} validator - set to false if the transitional option has been removed + * @param {string?} version - deprecated version / removed since version + * @param {string?} message - some message with additional info + * + * @returns {function} + */ +validators$1.transitional = function transitional(validator, version, message) { + function formatMessage(opt, desc) { + return ( + '[Axios v' + + VERSION + + "] Transitional option '" + + opt + + "'" + + desc + + (message ? '. ' + message : '') + ); + } + + // eslint-disable-next-line func-names + return (value, opt, opts) => { + if (validator === false) { + throw new AxiosError( + formatMessage(opt, ' has been removed' + (version ? ' in ' + version : '')), + AxiosError.ERR_DEPRECATED + ); + } + + if (version && !deprecatedWarnings[opt]) { + deprecatedWarnings[opt] = true; + // eslint-disable-next-line no-console + console.warn( + formatMessage( + opt, + ' has been deprecated since v' + version + ' and will be removed in the near future' + ) + ); + } + + return validator ? validator(value, opt, opts) : true; + }; +}; + +validators$1.spelling = function spelling(correctSpelling) { + return (value, opt) => { + // eslint-disable-next-line no-console + console.warn(`${opt} is likely a misspelling of ${correctSpelling}`); + return true; + }; +}; + +/** + * Assert object's properties type + * + * @param {object} options + * @param {object} schema + * @param {boolean?} allowUnknown + * + * @returns {object} + */ + +function assertOptions(options, schema, allowUnknown) { + if (typeof options !== 'object' || options === null) { + throw new AxiosError('options must be an object', AxiosError.ERR_BAD_OPTION_VALUE); + } + const keys = Object.keys(options); + let i = keys.length; + while (i-- > 0) { + const opt = keys[i]; + // Use hasOwnProperty so a polluted Object.prototype. cannot supply + // a non-function validator and cause a TypeError. + const validator = Object.prototype.hasOwnProperty.call(schema, opt) ? schema[opt] : undefined; + if (validator) { + const value = options[opt]; + const result = value === undefined || validator(value, opt, options); + if (result !== true) { + throw new AxiosError( + 'option ' + opt + ' must be ' + result, + AxiosError.ERR_BAD_OPTION_VALUE + ); + } + continue; + } + if (allowUnknown !== true) { + throw new AxiosError('Unknown option ' + opt, AxiosError.ERR_BAD_OPTION); + } + } +} + +var validator = { + assertOptions, + validators: validators$1, +}; + +const validators = validator.validators; + +// Recognize header maps without consuming objects intended as literal values. +// AxiosHeaders from other builds share a brand and header-container interface, +// but not constructor identity. A tag and toJSON alone can describe a literal. +const isHeadersBucket = (value) => { + if (value == null || utils$1.isPlainObject(value) || value instanceof AxiosHeaders) { + return true; + } + + try { + return ( + utils$1.isObject(value) && + utils$1.getSafeProp(value, Symbol.toStringTag) === 'AxiosHeaders' && + [ + 'toJSON', + 'set', + 'get', + 'has', + 'delete', + 'clear', + 'normalize', + 'concat', + 'toString', + Symbol.iterator, + ].every((method) => utils$1.isFunction(utils$1.getSafeProp(value, method))) + ); + } catch (e) { + // A failed optional brand probe must not prevent literal header serialization. + return false; + } +}; + +/** + * Create a new instance of Axios + * + * @param {Object} instanceConfig The default config for the instance + * + * @return {Axios} A new instance of Axios + */ +class Axios { + constructor(instanceConfig) { + this.defaults = instanceConfig || {}; + this.interceptors = { + request: new InterceptorManager(), + response: new InterceptorManager(), + }; + } + + /** + * Dispatch a request + * + * @param {String|Object} configOrUrl The config specific for this request (merged with this.defaults) + * @param {?Object} config + * + * @returns {Promise} The Promise to be fulfilled + */ + async request(configOrUrl, config) { + try { + return await this._request(configOrUrl, config); + } catch (err) { + if (err instanceof Error) { + try { + let dummy = {}; + + Error.captureStackTrace ? Error.captureStackTrace(dummy) : (dummy = new Error()); + + const dummyStack = dummy.stack; + let stack = ''; + + // slice off the Error: ... line + if (typeof dummyStack === 'string') { + const firstNewlineIndex = dummyStack.indexOf('\n'); + + stack = firstNewlineIndex === -1 ? '' : dummyStack.slice(firstNewlineIndex + 1); + } + + if (!err.stack) { + err.stack = stack; + } else if (stack) { + // Match a common suffix after the 2 top frames when available, + // otherwise compare the full reconstructed stack. + const firstNewlineIndex = stack.indexOf('\n'); + const secondNewlineIndex = + firstNewlineIndex === -1 ? -1 : stack.indexOf('\n', firstNewlineIndex + 1); + const duplicateCheckSuffix = + secondNewlineIndex === -1 ? stack : stack.slice(secondNewlineIndex + 1); + + // `AxiosError.from()` may have already inlined the wrapped error's + // stack under a `Caused by:` marker. Keep the reconstructed caller + // frames ahead of that marker so stack-only reporters do not read + // them as part of the low-level cause. + const currentStack = String(err.stack); + const causeIndex = getCauseStackIndex(err, currentStack); + const stackHead = causeIndex === -1 ? currentStack : currentStack.slice(0, causeIndex); + const causeSection = causeIndex === -1 ? '' : currentStack.slice(causeIndex); + + if (!stackHead.endsWith(duplicateCheckSuffix)) { + err.stack = stackHead + '\n' + stack + causeSection; + } + } + } catch (e) { + // Ignore failures from custom stack hooks or un-writable stack properties. + } + } + + throw err; + } + } + + _request(configOrUrl, config) { + /*eslint no-param-reassign:0*/ + // Allow for axios('example/url'[, config]) a la fetch API + if (typeof configOrUrl === 'string') { + config = config || {}; + config.url = configOrUrl; + } else { + config = configOrUrl || {}; + } + + config = mergeConfig(this.defaults, config); + + const { transitional, paramsSerializer, headers } = config; + + if (transitional !== undefined) { + validator.assertOptions( + transitional, + { + silentJSONParsing: validators.transitional(validators.boolean), + forcedJSONParsing: validators.transitional(validators.boolean), + clarifyTimeoutError: validators.transitional(validators.boolean), + legacyInterceptorReqResOrdering: validators.transitional(validators.boolean), + advertiseZstdAcceptEncoding: validators.transitional(validators.boolean), + validateStatusUndefinedResolves: validators.transitional(validators.boolean), + encodeBasicAuthUsername: validators.transitional(validators.boolean), + }, + false + ); + } + + if (paramsSerializer != null) { + if (utils$1.isFunction(paramsSerializer)) { + config.paramsSerializer = { + serialize: paramsSerializer, + }; + } else { + validator.assertOptions( + paramsSerializer, + { + encode: validators.function, + serialize: validators.function, + }, + true + ); + } + } + + // Set config.allowAbsoluteUrls + if (config.allowAbsoluteUrls !== undefined) ; else if ( + utils$1.hasOwnProp(this.defaults, 'allowAbsoluteUrls') && + this.defaults.allowAbsoluteUrls !== undefined + ) { + config.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls; + } else { + config.allowAbsoluteUrls = true; + } + + validator.assertOptions( + config, + { + baseUrl: validators.spelling('baseURL'), + withXsrfToken: validators.spelling('withXSRFToken'), + }, + true + ); + + // Set config.method + config.method = ( + utils$1.getSafeProp(config, 'method') || + utils$1.getSafeProp(this.defaults, 'method') || + 'get' + ).toLowerCase(); + + // Flatten header defaults without consuming literal method-named headers. + const commonHeaders = utils$1.getSafeProp(headers, 'common'); + const methodHeaders = utils$1.getSafeProp(headers, config.method); + const contextHeaders = + headers && + utils$1.merge( + isHeadersBucket(commonHeaders) ? commonHeaders : undefined, + isHeadersBucket(methodHeaders) ? methodHeaders : undefined + ); + + headers && + utils$1.forEach(methodList.concat('common'), (method) => { + if (isHeadersBucket(utils$1.getSafeProp(headers, method))) { + delete headers[method]; + } + }); + + config.headers = AxiosHeaders.concat(contextHeaders, headers); + + // filter out skipped interceptors + const requestInterceptorChain = []; + let synchronousRequestInterceptors = true; + this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) { + if (typeof interceptor.runWhen === 'function' && interceptor.runWhen(config) === false) { + return; + } + + synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous; + + const transitional = config.transitional || transitionalDefaults; + const legacyInterceptorReqResOrdering = + transitional && transitional.legacyInterceptorReqResOrdering; + + if (legacyInterceptorReqResOrdering) { + requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected); + } else { + requestInterceptorChain.push(interceptor.fulfilled, interceptor.rejected); + } + }); + + const responseInterceptorChain = []; + this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) { + responseInterceptorChain.push(interceptor.fulfilled, interceptor.rejected); + }); + + let promise; + let i = 0; + let len; + + if (!synchronousRequestInterceptors) { + const chain = [dispatchRequest.bind(this), undefined]; + chain.unshift(...requestInterceptorChain); + chain.push(...responseInterceptorChain); + len = chain.length; + + promise = Promise.resolve(config); + + while (i < len) { + promise = promise.then(chain[i++], chain[i++]); + } + + return promise; + } + + len = requestInterceptorChain.length; + + let newConfig = config; + + while (i < len) { + const onFulfilled = requestInterceptorChain[i++]; + const onRejected = requestInterceptorChain[i++]; + try { + newConfig = onFulfilled ? onFulfilled(newConfig) : newConfig; + } catch (error) { + if (!onRejected) { + promise = Promise.reject(error); + break; + } + + try { + const rejectedResult = onRejected.call(this, error); + + if (utils$1.isThenable(rejectedResult)) { + promise = Promise.resolve(rejectedResult).then(() => + dispatchRequest.call(this, newConfig) + ); + } + } catch (rejectedError) { + promise = Promise.reject(rejectedError); + } + + break; + } + } + + if (!promise) { + try { + promise = dispatchRequest.call(this, newConfig); + } catch (error) { + promise = Promise.reject(error); + } + } + + i = 0; + len = responseInterceptorChain.length; + + while (i < len) { + promise = promise.then(responseInterceptorChain[i++], responseInterceptorChain[i++]); + } + + return promise; + } + + getUri(config) { + config = mergeConfig(this.defaults, config); + const fullPath = buildFullPath(config.baseURL, config.url, config.allowAbsoluteUrls, config); + return buildURL(fullPath, config.params, config.paramsSerializer); + } +} + +// Provide aliases for supported request methods +utils$1.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) { + /*eslint func-names:0*/ + Axios.prototype[method] = async function (url, config) { + return this.request( + mergeConfig(config || {}, { + method, + url, + data: config && utils$1.hasOwnProp(config, 'data') ? config.data : undefined, + }) + ); + }; +}); + +utils$1.forEach(['post', 'put', 'patch', 'query'], function forEachMethodWithData(method) { + function generateHTTPMethod(isForm) { + return async function httpMethod(url, data, config) { + return this.request( + mergeConfig(config || {}, { + method, + headers: isForm + ? { + 'Content-Type': 'multipart/form-data', + } + : {}, + url, + data, + }) + ); + }; + } + + Axios.prototype[method] = generateHTTPMethod(); + + // QUERY is a safe/idempotent read method; multipart form bodies don't fit + // its semantics, so no queryForm shorthand is generated. + if (method !== 'query') { + Axios.prototype[method + 'Form'] = generateHTTPMethod(true); + } +}); + +/** + * A `CancelToken` is an object that can be used to request cancellation of an operation. + * + * @param {Function} executor The executor function. + * + * @returns {CancelToken} + */ +class CancelToken { + constructor(executor) { + if (typeof executor !== 'function') { + throw new TypeError('executor must be a function.'); + } + + let resolvePromise; + + this.promise = new Promise(function promiseExecutor(resolve) { + resolvePromise = resolve; + }); + + const token = this; + + // eslint-disable-next-line func-names + this.promise.then((cancel) => { + if (!token._listeners) return; + + let i = token._listeners.length; + + while (i-- > 0) { + token._listeners[i](cancel); + } + token._listeners = null; + }); + + // eslint-disable-next-line func-names + this.promise.then = (onfulfilled) => { + let _resolve; + // eslint-disable-next-line func-names + const promise = new Promise((resolve) => { + token.subscribe(resolve); + _resolve = resolve; + }).then(onfulfilled); + + promise.cancel = function reject() { + token.unsubscribe(_resolve); + }; + + return promise; + }; + + executor(function cancel(message, config, request) { + if (token.reason) { + // Cancellation has already been requested + return; + } + + token.reason = new CanceledError(message, config, request); + resolvePromise(token.reason); + }); + } + + /** + * Throws a `CanceledError` if cancellation has been requested. + */ + throwIfRequested() { + if (this.reason) { + throw this.reason; + } + } + + /** + * Subscribe to the cancel signal + */ + + subscribe(listener) { + if (this.reason) { + listener(this.reason); + return; + } + + if (this._listeners) { + this._listeners.push(listener); + } else { + this._listeners = [listener]; + } + } + + /** + * Unsubscribe from the cancel signal + */ + + unsubscribe(listener) { + if (!this._listeners) { + return; + } + const index = this._listeners.indexOf(listener); + if (index !== -1) { + this._listeners.splice(index, 1); + } + } + + toAbortSignal() { + const controller = new AbortController(); + + const abort = (err) => { + controller.abort(err); + }; + + this.subscribe(abort); + + controller.signal.unsubscribe = () => this.unsubscribe(abort); + + return controller.signal; + } + + /** + * Returns an object that contains a new `CancelToken` and a function that, when called, + * cancels the `CancelToken`. + */ + static source() { + let cancel; + const token = new CancelToken(function executor(c) { + cancel = c; + }); + return { + token, + cancel, + }; + } +} + +/** + * Syntactic sugar for invoking a function and expanding an array for arguments. + * + * Common use case would be to use `Function.prototype.apply`. + * + * ```js + * function f(x, y, z) {} + * const args = [1, 2, 3]; + * f.apply(null, args); + * ``` + * + * With `spread` this example can be re-written. + * + * ```js + * spread(function(x, y, z) {})([1, 2, 3]); + * ``` + * + * @param {Function} callback + * + * @returns {Function} + */ +function spread(callback) { + return function wrap(arr) { + return callback.apply(null, arr); + }; +} + +/** + * Determines whether the payload is an error thrown by Axios + * + * @param {*} payload The value to test + * + * @returns {boolean} True if the payload is an error thrown by Axios, otherwise false + */ +function isAxiosError(payload) { + return utils$1.isObject(payload) && payload.isAxiosError === true; +} + +const HttpStatusCode = { + 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, + /** + * @deprecated Use `ContentTooLarge` instead. + */ + PayloadTooLarge: 413, + ContentTooLarge: 413, + UriTooLong: 414, + UnsupportedMediaType: 415, + RangeNotSatisfiable: 416, + ExpectationFailed: 417, + ImATeapot: 418, + MisdirectedRequest: 421, + /** + * @deprecated Use `UnprocessableContent` instead. + */ + UnprocessableEntity: 422, + UnprocessableContent: 422, + Locked: 423, + FailedDependency: 424, + TooEarly: 425, + UpgradeRequired: 426, + PreconditionRequired: 428, + TooManyRequests: 429, + RequestHeaderFieldsTooLarge: 431, + UnavailableForLegalReasons: 451, + InternalServerError: 500, + NotImplemented: 501, + BadGateway: 502, + ServiceUnavailable: 503, + GatewayTimeout: 504, + HttpVersionNotSupported: 505, + VariantAlsoNegotiates: 506, + InsufficientStorage: 507, + LoopDetected: 508, + NotExtended: 510, + NetworkAuthenticationRequired: 511, + WebServerReturnsAnUnknownError: 520, + WebServerIsDown: 521, + ConnectionTimedOut: 522, + OriginIsUnreachable: 523, + TimeoutOccurred: 524, + SslHandshakeFailed: 525, + InvalidSslCertificate: 526, +}; + +Object.entries(HttpStatusCode).forEach(([key, value]) => { + if (HttpStatusCode[value] === undefined) { + HttpStatusCode[value] = key; + } +}); + +/** + * Create an instance of Axios + * + * @param {Object} defaultConfig The default config for the instance + * + * @returns {Axios} A new instance of Axios + */ +function createInstance(defaultConfig) { + const context = new Axios(defaultConfig); + const instance = bind(Axios.prototype.request, context); + + // Copy axios.prototype to instance + utils$1.extend(instance, Axios.prototype, context, { allOwnKeys: true }); + + // Copy context to instance + utils$1.extend(instance, context, null, { allOwnKeys: true }); + + // Factory for creating new instances + instance.create = function create(instanceConfig) { + return createInstance(mergeConfig(defaultConfig, instanceConfig)); + }; + + return instance; +} + +// Create the default instance to be exported +const axios = createInstance(defaults); + +// Expose Axios class to allow class inheritance +axios.Axios = Axios; + +// Expose Cancel & CancelToken +axios.CanceledError = CanceledError; +axios.CancelToken = CancelToken; +axios.isCancel = isCancel; +axios.VERSION = VERSION; +axios.toFormData = toFormData; + +// Expose AxiosError class +axios.AxiosError = AxiosError; + +// alias for CanceledError for backward compatibility +axios.Cancel = axios.CanceledError; + +// Expose all/spread +axios.all = function all(promises) { + return Promise.all(promises); +}; + +axios.spread = spread; + +// Expose isAxiosError +axios.isAxiosError = isAxiosError; + +// Expose mergeConfig +axios.mergeConfig = mergeConfig; + +axios.AxiosHeaders = AxiosHeaders; + +axios.formToJSON = (thing) => formDataToJSON(utils$1.isHTMLForm(thing) ? new FormData(thing) : thing); + +axios.getAdapter = adapters.getAdapter; + +axios.HttpStatusCode = HttpStatusCode; + +axios.default = axios; + +module.exports = axios; diff --git a/node_modules/axios/dist/esm/axios.js b/node_modules/axios/dist/esm/axios.js new file mode 100644 index 0000000..a669496 --- /dev/null +++ b/node_modules/axios/dist/esm/axios.js @@ -0,0 +1,6547 @@ +/*! Axios v1.21.1 Copyright (c) 2026 Matt Zabriskie and contributors */ +/** + * Create a bound version of a function with a specified `this` context + * + * @param {Function} fn - The function to bind + * @param {*} thisArg - The value to be passed as the `this` parameter + * @returns {Function} A new function that will call the original function with the specified `this` context + */ +function bind(fn, thisArg) { + return function wrap() { + return fn.apply(thisArg, arguments); + }; +} + +// utils is a library of generic helper functions non-specific to axios + +const { toString } = Object.prototype; +const { getPrototypeOf } = Object; +const { iterator, toStringTag } = Symbol; + +/* Creating a function that will check if an object has a property. */ +const hasOwnProperty = ( + ({ hasOwnProperty }) => + (obj, prop) => + hasOwnProperty.call(obj, prop) +)(Object.prototype); + +const isUnsafeObjectKey = (prop) => + typeof prop === 'string' && + (prop === '__proto__' || prop === 'constructor' || prop === 'prototype'); + +/** + * Determine whether an inherited object must be treated as a shared-prototype + * boundary. Cross-realm Object.prototype objects cannot be distinguished + * reliably from application-created null-prototype objects because their + * properties are mutable, so all inherited terminal prototypes are excluded + * as a fail-closed boundary. A null-prototype source still keeps its own + * properties, as produced by mergeConfig and other safe materialization paths. + * + * @param {*} obj The object to inspect + * @param {*} prototype The object's prototype + * @param {boolean} source Whether obj is the original traversal source + * + * @returns {boolean} True when obj is a safe prototype traversal boundary + */ +const isPrototypeBoundary = (obj, prototype, source) => + obj === Object.prototype || (!source && prototype === null); + +/** + * Determine whether an object can retain its identity through code paths that + * add, replace, and remove config properties without bypassing unsafe-key + * filtering. Immutable objects, unsafe-key-bearing objects, and objects with + * accessor or restricted data properties must be materialized instead. + * + * @param {*} obj The object to inspect + * + * @returns {boolean} True when every own property is safe and fully mutable + */ +const isSafeAndFullyMutable = (obj) => { + if (!Object.isExtensible(obj)) { + return false; + } + + const props = Object.getOwnPropertyNames(obj); + + if (Object.getOwnPropertySymbols) { + props.push(...Object.getOwnPropertySymbols(obj)); + } + + return props.every((prop) => { + if (isUnsafeObjectKey(prop)) { + return false; + } + + const descriptor = Object.getOwnPropertyDescriptor(obj, prop); + + return !!descriptor && descriptor.configurable && descriptor.writable === true; + }); +}; + +/** + * Walk the prototype chain (excluding the source realm's Object.prototype) + * looking for an own `prop`. This distinguishes genuine own/inherited members + * — including class accessors and template prototypes — from members injected + * via Object.prototype pollution (e.g. `Object.prototype.username = '...'`), + * which live on Object.prototype itself and are therefore never matched. + * + * @param {*} thing The value whose chain to inspect + * @param {string|symbol} prop The property key to look for + * + * @returns {boolean} True when `prop` is owned below Object.prototype + */ +const hasOwnInPrototypeChain = (thing, prop) => { + let obj = thing; + const seen = []; + + while (obj != null) { + if (seen.indexOf(obj) !== -1) { + return false; + } + seen.push(obj); + + const prototype = getPrototypeOf(obj); + + if (isPrototypeBoundary(obj, prototype, obj === thing)) { + return false; + } + + if (hasOwnProperty(obj, prop)) { + return true; + } + obj = prototype; + } + return false; +}; + +/** + * Read `obj[prop]` only when it is safe from Object.prototype pollution. Own + * properties and members inherited from a non-Object.prototype source (a class + * instance or template object) are honored; a value reachable only through a + * polluted Object.prototype is ignored and `undefined` is returned. + * + * @param {*} obj The source object + * @param {string|symbol} prop The property key to read + * + * @returns {*} The resolved value, or undefined when unsafe/absent + */ +const getSafeProp = (obj, prop) => + obj != null && hasOwnInPrototypeChain(obj, prop) ? obj[prop] : undefined; + +/** + * Flatten an object and its application-defined prototype chain into a + * null-prototype object. Members inherited only from the source realm's + * Object.prototype are deliberately excluded, while class/template members + * below that boundary are preserved. + * + * @param {*} thing The value to flatten + * + * @returns {*} A null-prototype copy, or the original value when it is already + * structurally safe or is not an object + */ +const toSafeFlatObject = (thing) => { + if (thing == null || (typeof thing !== 'object' && typeof thing !== 'function')) { + return thing; + } + + const sourcePrototype = getPrototypeOf(thing); + + if (sourcePrototype === null && isSafeAndFullyMutable(thing)) { + return thing; + } + + const result = Object.create(null); + const merged = Object.create(null); + const seen = []; + let current = thing; + + while (current != null) { + if (seen.indexOf(current) !== -1) { + break; + } + + seen.push(current); + + const prototype = current === thing ? sourcePrototype : getPrototypeOf(current); + + if (isPrototypeBoundary(current, prototype, current === thing)) { + break; + } + + const props = Object.getOwnPropertyNames(current); + + if (Object.getOwnPropertySymbols) { + props.push(...Object.getOwnPropertySymbols(current)); + } + + for (const prop of props) { + if (isUnsafeObjectKey(prop)) { + continue; + } + + if (!hasOwnProperty(merged, prop)) { + result[prop] = thing[prop]; + merged[prop] = true; + } + } + + current = prototype; + } + + return result; +}; + +const kindOf = ((cache) => (thing) => { + const str = toString.call(thing); + return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase()); +})(Object.create(null)); + +const kindOfTest = (type) => { + type = type.toLowerCase(); + return (thing) => kindOf(thing) === type; +}; + +const typeOfTest = (type) => (thing) => typeof thing === type; + +/** + * Determine if a value is a non-null object + * + * @param {Object} val The value to test + * + * @returns {boolean} True if value is an Array, otherwise false + */ +const { isArray } = Array; + +/** + * Determine if a value is undefined + * + * @param {*} val The value to test + * + * @returns {boolean} True if the value is undefined, otherwise false + */ +const isUndefined = typeOfTest('undefined'); + +/** + * Determine if a value is a Buffer + * + * @param {*} val The value to test + * + * @returns {boolean} True if value is a Buffer, otherwise false + */ +function isBuffer(val) { + return ( + val !== null && + !isUndefined(val) && + val.constructor !== null && + !isUndefined(val.constructor) && + isFunction$1(val.constructor.isBuffer) && + val.constructor.isBuffer(val) + ); +} + +/** + * Determine if a value is an ArrayBuffer + * + * @param {*} val The value to test + * + * @returns {boolean} True if value is an ArrayBuffer, otherwise false + */ +const isArrayBuffer = kindOfTest('ArrayBuffer'); + +/** + * Determine if a value is a view on an ArrayBuffer + * + * @param {*} val The value to test + * + * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false + */ +function isArrayBufferView(val) { + let result; + if (typeof ArrayBuffer !== 'undefined' && ArrayBuffer.isView) { + result = ArrayBuffer.isView(val); + } else { + result = val && val.buffer && isArrayBuffer(val.buffer); + } + return result; +} + +/** + * Determine if a value is a String + * + * @param {*} val The value to test + * + * @returns {boolean} True if value is a String, otherwise false + */ +const isString = typeOfTest('string'); + +/** + * Determine if a value is a Function + * + * @param {*} val The value to test + * @returns {boolean} True if value is a Function, otherwise false + */ +const isFunction$1 = typeOfTest('function'); + +/** + * Determine if a value is a Number + * + * @param {*} val The value to test + * + * @returns {boolean} True if value is a Number, otherwise false + */ +const isNumber = typeOfTest('number'); + +/** + * Determine if a value is an Object + * + * @param {*} thing The value to test + * + * @returns {boolean} True if value is an Object, otherwise false + */ +const isObject = (thing) => thing !== null && typeof thing === 'object'; + +/** + * Determine if a value is a Boolean + * + * @param {*} thing The value to test + * @returns {boolean} True if value is a Boolean, otherwise false + */ +const isBoolean = (thing) => thing === true || thing === false; + +/** + * Determine if a value is a plain Object + * + * @param {*} val The value to test + * + * @returns {boolean} True if value is a plain Object, otherwise false + */ +const isPlainObject = (val) => { + if (!isObject(val)) { + return false; + } + + const prototype = getPrototypeOf(val); + return ( + (prototype === null || prototype === Object.prototype || getPrototypeOf(prototype) === null) && + // Treat own Symbol.toStringTag or Symbol.iterator members as evidence the + // value is tagged/iterable, ignoring members reachable only through shared + // or terminal prototype boundaries. This is exactly what + // hasOwnInPrototypeChain(val, prop) computes here: every prototype admitted + // above (null, Object.prototype, or a terminal null-prototype template) is + // a boundary, so the walk never inspects anything but `val`'s own members, + // and stops before even those when `val` is itself the boundary + // Object.prototype. Checking that inline avoids allocating the walker's + // `seen` list twice per call on the mergeConfig / merge hot path. + (isPrototypeBoundary(val, prototype, true) || + (!hasOwnProperty(val, toStringTag) && !hasOwnProperty(val, iterator))) + ); +}; + +/** + * Determine if a value is an empty object (safely handles Buffers) + * + * @param {*} val The value to test + * + * @returns {boolean} True if value is an empty object, otherwise false + */ +const isEmptyObject = (val) => { + // Early return for non-objects or Buffers to prevent RangeError + if (!isObject(val) || isBuffer(val)) { + return false; + } + + try { + return Object.keys(val).length === 0 && Object.getPrototypeOf(val) === Object.prototype; + } catch (e) { + // Fallback for any other objects that might cause RangeError with Object.keys() + return false; + } +}; + +/** + * Determine if a value is a Date + * + * @param {*} val The value to test + * + * @returns {boolean} True if value is a Date, otherwise false + */ +const isDate = kindOfTest('Date'); + +/** + * Determine if a value is a File + * + * @param {*} val The value to test + * + * @returns {boolean} True if value is a File, otherwise false + */ +const isFile = kindOfTest('File'); + +/** + * Determine if a value is a React Native Blob + * React Native "blob": an object with a `uri` attribute. Optionally, it can + * also have a `name` and `type` attribute to specify filename and content type + * + * @see https://github.com/facebook/react-native/blob/26684cf3adf4094eb6c405d345a75bf8c7c0bf88/Libraries/Network/FormData.js#L68-L71 + * + * @param {*} value The value to test + * + * @returns {boolean} True if value is a React Native Blob, otherwise false + */ +const isReactNativeBlob = (value) => { + return !!(value && typeof value.uri !== 'undefined'); +}; + +/** + * Determine if environment is React Native + * ReactNative `FormData` has a non-standard `getParts()` method + * + * @param {*} formData The formData to test + * + * @returns {boolean} True if environment is React Native, otherwise false + */ +const isReactNative = (formData) => formData && typeof formData.getParts !== 'undefined'; + +/** + * Determine if a value is a Blob + * + * @param {*} val The value to test + * + * @returns {boolean} True if value is a Blob, otherwise false + */ +const isBlob = kindOfTest('Blob'); + +/** + * Determine if a value is a FileList + * + * @param {*} val The value to test + * + * @returns {boolean} True if value is a FileList, otherwise false + */ +const isFileList = kindOfTest('FileList'); +const isSet = kindOfTest('Set'); + +/** + * Determine if a value is a Stream + * + * @param {*} val The value to test + * + * @returns {boolean} True if value is a Stream, otherwise false + */ +const isStream = (val) => isObject(val) && isFunction$1(val.pipe); + +/** + * Determine if a value is a FormData + * + * @param {*} thing The value to test + * + * @returns {boolean} True if value is an FormData, otherwise false + */ +function getGlobal() { + if (typeof globalThis !== 'undefined') return globalThis; + if (typeof self !== 'undefined') return self; + if (typeof window !== 'undefined') return window; + if (typeof global !== 'undefined') return global; + return {}; +} + +const G = getGlobal(); +const FormDataCtor = typeof G.FormData !== 'undefined' ? G.FormData : undefined; + +const isFormData = (thing) => { + if (!thing) return false; + if (FormDataCtor && thing instanceof FormDataCtor) return true; + // Reject plain objects inheriting directly from Object.prototype so prototype-pollution gadgets can't spoof FormData. + const proto = getPrototypeOf(thing); + if (!proto || proto === Object.prototype) return false; + if (!isFunction$1(thing.append)) return false; + const kind = kindOf(thing); + return ( + kind === 'formdata' || + // detect form-data instance + (kind === 'object' && isFunction$1(thing.toString) && thing.toString() === '[object FormData]') + ); +}; + +/** + * Determine if a value is a URLSearchParams object + * + * @param {*} val The value to test + * + * @returns {boolean} True if value is a URLSearchParams object, otherwise false + */ +const isURLSearchParams = kindOfTest('URLSearchParams'); + +const [isReadableStream, isRequest, isResponse, isHeaders] = [ + 'ReadableStream', + 'Request', + 'Response', + 'Headers', +].map(kindOfTest); + +/** + * Trim excess whitespace off the beginning and end of a string + * + * @param {String} str The String to trim + * + * @returns {String} The String freed of excess whitespace + */ +const trim = (str) => { + return str.trim ? str.trim() : str.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, ''); +}; +/** + * Iterate over an Array or an Object invoking a function for each item. + * + * If `obj` is an Array callback will be called passing + * the value, index, and complete array for each item. + * + * If 'obj' is an Object callback will be called passing + * the value, key, and complete object for each property. + * + * @param {Object|Array} obj The object to iterate + * @param {Function} fn The callback to invoke for each item + * + * @param {Object} [options] + * @param {Boolean} [options.allOwnKeys = false] + * @returns {any} + */ +function forEach(obj, fn, { allOwnKeys = false } = {}) { + // Don't bother if no value provided + if (obj === null || typeof obj === 'undefined') { + return; + } + + let i; + let l; + + // Force an array if not already something iterable + if (typeof obj !== 'object') { + /*eslint no-param-reassign:0*/ + obj = [obj]; + } + + if (isArray(obj)) { + // Iterate over array values + for (i = 0, l = obj.length; i < l; i++) { + fn.call(null, obj[i], i, obj); + } + } else { + // Buffer check + if (isBuffer(obj)) { + return; + } + + // Iterate over object keys + const keys = allOwnKeys ? Object.getOwnPropertyNames(obj) : Object.keys(obj); + const len = keys.length; + let key; + + for (i = 0; i < len; i++) { + key = keys[i]; + fn.call(null, obj[key], key, obj); + } + } +} + +/** + * Finds a key in an object, case-insensitive, returning the actual key name. + * Returns null if the object is a Buffer or if no match is found. + * + * @param {Object} obj - The object to search. + * @param {string} key - The key to find (case-insensitive). + * @returns {?string} The actual key name if found, otherwise null. + */ +function findKey(obj, key) { + if (isBuffer(obj)) { + return null; + } + + key = key.toLowerCase(); + const keys = Object.keys(obj); + let i = keys.length; + let _key; + while (i-- > 0) { + _key = keys[i]; + if (key === _key.toLowerCase()) { + return _key; + } + } + return null; +} + +const _global = (() => { + /*eslint no-undef:0*/ + if (typeof globalThis !== 'undefined') return globalThis; + return typeof self !== 'undefined' ? self : typeof window !== 'undefined' ? window : global; +})(); + +const isContextDefined = (context) => !isUndefined(context) && context !== _global; + +/** + * Accepts varargs expecting each argument to be an object, then + * immutably merges the properties of each object and returns result. + * + * When multiple objects contain the same key the later object in + * the arguments list will take precedence. + * + * Example: + * + * ```js + * const result = merge({foo: 123}, {foo: 456}); + * console.log(result.foo); // outputs 456 + * ``` + * + * @param {Object} obj1 Object to merge + * + * @returns {Object} Result of all merge properties + */ +function merge(...objs) { + const { caseless, skipUndefined } = (isContextDefined(this) && this) || {}; + const result = {}; + // Caseless lookup only applies to string keys — symbol keys are + // identity-matched. Every string key that reaches `result` passes through + // this index first, so it can never hold two case variants of one key and a + // lowercase -> key map is exactly what findKey(result, key) would rescan + // Object.keys(result) for on each assignment. + const lowerCaseKeys = caseless ? Object.create(null) : null; + const assignValue = (val, key) => { + // Skip dangerous property names to prevent prototype pollution + if (key === '__proto__' || key === 'constructor' || key === 'prototype') { + return; + } + + let targetKey = key; + if (lowerCaseKeys && typeof key === 'string') { + const lowerKey = key.toLowerCase(); + const knownKey = lowerCaseKeys[lowerKey]; + // A key recorded but absent from `result` was skipped by skipUndefined; + // the later spelling wins then, as it does for findKey. + if (knownKey !== undefined && hasOwnProperty(result, knownKey)) { + targetKey = knownKey; + } else { + lowerCaseKeys[lowerKey] = key; + } + } + // Read via own-prop only — a bare `result[targetKey]` walks the prototype + // chain, so a polluted Object.prototype value could surface here and get + // copied into the merged result. + const existing = hasOwnProperty(result, targetKey) ? result[targetKey] : undefined; + if (isPlainObject(existing) && isPlainObject(val)) { + result[targetKey] = merge(existing, val); + } else if (isPlainObject(val)) { + result[targetKey] = merge({}, val); + } else if (isArray(val)) { + result[targetKey] = val.slice(); + } else if (!skipUndefined || !isUndefined(val)) { + result[targetKey] = val; + } + }; + + for (let i = 0, l = objs.length; i < l; i++) { + const source = objs[i]; + if (!source || isBuffer(source)) { + continue; + } + + forEach(source, assignValue); + + if (typeof source !== 'object' || isArray(source) || !Object.getOwnPropertySymbols) { + continue; + } + + const symbols = Object.getOwnPropertySymbols(source); + for (let j = 0; j < symbols.length; j++) { + const symbol = symbols[j]; + if (propertyIsEnumerable.call(source, symbol)) { + assignValue(source[symbol], symbol); + } + } + } + return result; +} + +/** + * Extends object a by mutably adding to it the properties of object b. + * + * @param {Object} a The object to be extended + * @param {Object} b The object to copy properties from + * @param {Object} thisArg The object to bind function to + * + * @param {Object} [options] + * @param {Boolean} [options.allOwnKeys] + * @returns {Object} The resulting value of object a + */ +const extend = (a, b, thisArg, { allOwnKeys } = {}) => { + forEach( + b, + (val, key) => { + if (thisArg && isFunction$1(val)) { + Object.defineProperty(a, key, { + // Null-proto descriptor so a polluted Object.prototype.get cannot + // hijack defineProperty's accessor-vs-data resolution. + __proto__: null, + value: bind(val, thisArg), + writable: true, + enumerable: true, + configurable: true, + }); + } else { + Object.defineProperty(a, key, { + __proto__: null, + value: val, + writable: true, + enumerable: true, + configurable: true, + }); + } + }, + { allOwnKeys } + ); + return a; +}; + +/** + * Remove byte order marker. This catches EF BB BF (the UTF-8 BOM) + * + * @param {string} content with BOM + * + * @returns {string} content value without BOM + */ +const stripBOM = (content) => { + if (content.charCodeAt(0) === 0xfeff) { + content = content.slice(1); + } + return content; +}; + +/** + * Inherit the prototype methods from one constructor into another + * @param {function} constructor + * @param {function} superConstructor + * @param {object} [props] + * @param {object} [descriptors] + * + * @returns {void} + */ +const inherits = (constructor, superConstructor, props, descriptors) => { + constructor.prototype = Object.create(superConstructor.prototype, descriptors); + Object.defineProperty(constructor.prototype, 'constructor', { + __proto__: null, + value: constructor, + writable: true, + enumerable: false, + configurable: true, + }); + Object.defineProperty(constructor, 'super', { + __proto__: null, + value: superConstructor.prototype, + }); + props && Object.assign(constructor.prototype, props); +}; + +/** + * Resolve object with deep prototype chain to a flat object + * @param {Object} sourceObj source object + * @param {Object} [destObj] + * @param {Function|Boolean} [filter] + * @param {Function} [propFilter] + * + * @returns {Object} + */ +const toFlatObject = (sourceObj, destObj, filter, propFilter) => { + let props; + let i; + let prop; + const merged = {}; + + destObj = destObj || {}; + // eslint-disable-next-line no-eq-null,eqeqeq + if (sourceObj == null) return destObj; + + do { + props = Object.getOwnPropertyNames(sourceObj); + i = props.length; + while (i-- > 0) { + prop = props[i]; + if ((!propFilter || propFilter(prop, sourceObj, destObj)) && !merged[prop]) { + destObj[prop] = sourceObj[prop]; + merged[prop] = true; + } + } + sourceObj = filter !== false && getPrototypeOf(sourceObj); + } while (sourceObj && (!filter || filter(sourceObj, destObj)) && sourceObj !== Object.prototype); + + return destObj; +}; + +/** + * Determines whether a string ends with the characters of a specified string + * + * @param {String} str + * @param {String} searchString + * @param {Number} [position= 0] + * + * @returns {boolean} + */ +const endsWith = (str, searchString, position) => { + str = String(str); + if (position === undefined || position > str.length) { + position = str.length; + } + position -= searchString.length; + const lastIndex = str.indexOf(searchString, position); + return lastIndex !== -1 && lastIndex === position; +}; + +/** + * Returns new array from array like object or null if failed + * + * @param {*} [thing] + * + * @returns {?Array} + */ +const toArray = (thing) => { + if (!thing) return null; + if (isArray(thing)) return thing; + let i = thing.length; + if (!Number.isSafeInteger(i) || i < 0 || i > 0xffffffff) return null; + + // Bound the copy by actual indexed properties, including hidden and inherited + // members of array-like collections, rather than by the declared length alone. + const indexes = new Set(); + const seen = new Set(); + let source = thing; + + while (source != null && indexes.size < i) { + if (seen.has(source)) return null; + seen.add(source); + + const prototype = getPrototypeOf(source); + if (isPrototypeBoundary(source, prototype, source === thing)) break; + + Object.getOwnPropertyNames(source).forEach((key) => { + const index = +key; + if ( + Number.isInteger(index) && + index >= 0 && + index < i && + String(index) === key && + hasOwnProperty(source, key) + ) { + indexes.add(index); + } + }); + source = prototype; + } + + if (indexes.size !== i) return null; + const arr = new Array(i); + while (i-- > 0) { + arr[i] = thing[i]; + } + return arr; +}; + +/** + * Checking if the Uint8Array exists and if it does, it returns a function that checks if the + * thing passed in is an instance of Uint8Array + * + * @param {TypedArray} + * + * @returns {Array} + */ +// eslint-disable-next-line func-names +const isTypedArray = ((TypedArray) => { + // eslint-disable-next-line func-names + return (thing) => { + return TypedArray && thing instanceof TypedArray; + }; +})(typeof Uint8Array !== 'undefined' && getPrototypeOf(Uint8Array)); + +/** + * For each entry in the object, call the function with the key and value. + * + * @param {Object} obj - The object to iterate over. + * @param {Function} fn - The function to call for each entry. + * + * @returns {void} + */ +const forEachEntry = (obj, fn) => { + const generator = obj && obj[iterator]; + + const _iterator = generator.call(obj); + + let result; + + while ((result = _iterator.next()) && !result.done) { + const pair = result.value; + fn.call(obj, pair[0], pair[1]); + } +}; + +/** + * It takes a regular expression and a string, and returns an array of all the matches + * + * @param {string} regExp - The regular expression to match against. + * @param {string} str - The string to search. + * + * @returns {Array} + */ +const matchAll = (regExp, str) => { + let matches; + const arr = []; + + while ((matches = regExp.exec(str)) !== null) { + arr.push(matches); + } + + return arr; +}; + +/* Checking if the kindOfTest function returns true when passed an HTMLFormElement. */ +const isHTMLForm = kindOfTest('HTMLFormElement'); + +const toCamelCase = (str) => { + return str.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g, function replacer(m, p1, p2) { + return p1.toUpperCase() + p2; + }); +}; + +const { propertyIsEnumerable } = Object.prototype; + +/** + * Determine if a value is a RegExp object + * + * @param {*} val The value to test + * + * @returns {boolean} True if value is a RegExp object, otherwise false + */ +const isRegExp = kindOfTest('RegExp'); + +const reduceDescriptors = (obj, reducer) => { + const descriptors = Object.getOwnPropertyDescriptors(obj); + const reducedDescriptors = {}; + + forEach(descriptors, (descriptor, name) => { + let ret; + if ((ret = reducer(descriptor, name, obj)) !== false) { + reducedDescriptors[name] = ret || descriptor; + } + }); + + Object.defineProperties(obj, reducedDescriptors); +}; + +/** + * Makes all methods read-only + * @param {Object} obj + */ + +const freezeMethods = (obj) => { + reduceDescriptors(obj, (descriptor, name) => { + // skip restricted props in strict mode + if (isFunction$1(obj) && ['arguments', 'caller', 'callee'].includes(name)) { + return false; + } + + const value = obj[name]; + + if (!isFunction$1(value)) return; + + descriptor.enumerable = false; + + if ('writable' in descriptor) { + descriptor.writable = false; + return; + } + + if (!descriptor.set) { + descriptor.set = () => { + throw Error("Can not rewrite read-only method '" + name + "'"); + }; + } + }); +}; + +/** + * Converts an array or a delimited string into an object set with values as keys and true as values. + * Useful for fast membership checks. + * + * @param {Array|string} arrayOrString - The array or string to convert. + * @param {string} delimiter - The delimiter to use if input is a string. + * @returns {Object} An object with keys from the array or string, values set to true. + */ +const toObjectSet = (arrayOrString, delimiter) => { + const obj = {}; + + const define = (arr) => { + arr.forEach((value) => { + obj[value] = true; + }); + }; + + isArray(arrayOrString) ? define(arrayOrString) : define(String(arrayOrString).split(delimiter)); + + return obj; +}; + +const noop = () => {}; + +const toFiniteNumber = (value, defaultValue) => { + return value != null && Number.isFinite((value = +value)) ? value : defaultValue; +}; + +/** + * If the thing is a FormData object, return true, otherwise return false. + * + * @param {unknown} thing - The thing to check. + * + * @returns {boolean} + */ +function isSpecCompliantForm(thing) { + return !!( + thing && + isFunction$1(thing.append) && + thing[toStringTag] === 'FormData' && + thing[iterator] + ); +} + +/** + * Recursively converts an object to a JSON-compatible object, handling circular references and Buffers. + * + * @param {Object} obj - The object to convert. + * @returns {Object} The JSON-compatible object. + */ +const toJSONObject = (obj) => { + const visited = new WeakSet(); + + const visit = (source) => { + if (isObject(source)) { + if (visited.has(source)) { + return; + } + + //Buffer check + if (isBuffer(source)) { + return source; + } + + if (!('toJSON' in source)) { + // add-on descent / delete-on-ascent: preserves path semantics, so DAG nodes serialise at every occurrence (see #7230). + visited.add(source); + + let target; + + if (isSet(source)) { + target = []; + for (const value of source) { + const reducedValue = visit(value); + !isUndefined(reducedValue) && target.push(reducedValue); + } + } else { + target = isArray(source) ? [] : {}; + + forEach(source, (value, key) => { + const reducedValue = visit(value); + !isUndefined(reducedValue) && (target[key] = reducedValue); + }); + } + + visited.delete(source); + + return target; + } + } + + return source; + }; + + return visit(obj); +}; + +/** + * Determines if a value is an async function. + * + * @param {*} thing - The value to test. + * @returns {boolean} True if value is an async function, otherwise false. + */ +const isAsyncFn = kindOfTest('AsyncFunction'); + +/** + * Determines if a value is thenable (has then and catch methods). + * + * @param {*} thing - The value to test. + * @returns {boolean} True if value is thenable, otherwise false. + */ +const isThenable = (thing) => + thing && + (isObject(thing) || isFunction$1(thing)) && + isFunction$1(thing.then) && + isFunction$1(thing.catch); + +// original code +// https://github.com/DigitalBrainJS/AxiosPromise/blob/16deab13710ec09779922131f3fa5954320f83ab/lib/utils.js#L11-L34 + +/** + * Provides a cross-platform setImmediate implementation. + * Uses native setImmediate if available, otherwise falls back to postMessage or setTimeout. + * + * @param {boolean} setImmediateSupported - Whether setImmediate is supported. + * @param {boolean} postMessageSupported - Whether postMessage is supported. + * @returns {Function} A function to schedule a callback asynchronously. + */ +const _setImmediate = ((setImmediateSupported, postMessageSupported) => { + if (setImmediateSupported) { + return setImmediate; + } + + return postMessageSupported + ? ((token, callbacks) => { + _global.addEventListener( + 'message', + ({ source, data }) => { + if (source === _global && data === token) { + callbacks.length && callbacks.shift()(); + } + }, + false + ); + + return (cb) => { + callbacks.push(cb); + _global.postMessage(token, '*'); + }; + })(`axios@${Math.random()}`, []) + : (cb) => setTimeout(cb); +})(typeof setImmediate === 'function', isFunction$1(_global.postMessage)); + +/** + * Schedules a microtask or asynchronous callback as soon as possible. + * Uses queueMicrotask if available, otherwise falls back to process.nextTick or _setImmediate. + * + * @type {Function} + */ +const asap = + typeof queueMicrotask !== 'undefined' + ? queueMicrotask.bind(_global) + : (typeof process !== 'undefined' && process.nextTick) || _setImmediate; + +// ********************* + +const isIterable = (thing) => thing != null && isFunction$1(thing[iterator]); + +/** + * Determine if a value is iterable via an iterator that is NOT sourced solely + * from a polluted Object.prototype. Use this instead of `isIterable` whenever + * the iterable comes from untrusted input (e.g. user-supplied header sources), + * so `Object.prototype[Symbol.iterator] = ...` cannot turn an ordinary object + * into an attacker-controlled entries iterator. + * + * @param {*} thing The value to test + * + * @returns {boolean} True if value has a non-polluted iterator + */ +const isSafeIterable = (thing) => + thing != null && hasOwnInPrototypeChain(thing, iterator) && isIterable(thing); + +var utils$1 = { + isArray, + isArrayBuffer, + isBuffer, + isFormData, + isArrayBufferView, + isString, + isNumber, + isBoolean, + isObject, + isPlainObject, + isEmptyObject, + isReadableStream, + isRequest, + isResponse, + isHeaders, + isUndefined, + isDate, + isFile, + isReactNativeBlob, + isReactNative, + isBlob, + isRegExp, + isFunction: isFunction$1, + isStream, + isURLSearchParams, + isTypedArray, + isFileList, + forEach, + merge, + extend, + trim, + stripBOM, + inherits, + toFlatObject, + kindOf, + kindOfTest, + endsWith, + toArray, + forEachEntry, + matchAll, + isHTMLForm, + hasOwnProperty, + hasOwnProp: hasOwnProperty, // an alias to avoid ESLint no-prototype-builtins detection + hasOwnInPrototypeChain, + getSafeProp, + toSafeFlatObject, + reduceDescriptors, + freezeMethods, + toObjectSet, + toCamelCase, + noop, + toFiniteNumber, + findKey, + global: _global, + isContextDefined, + isSpecCompliantForm, + toJSONObject, + isAsyncFn, + isThenable, + setImmediate: _setImmediate, + asap, + isIterable, + isSafeIterable, +}; + +// RawAxiosHeaders whose duplicates are ignored by node +// c.f. https://nodejs.org/api/http.html#http_message_headers +const ignoreDuplicateOf = utils$1.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', +]); + +/** + * Parse headers into an object + * + * ``` + * Date: Wed, 27 Aug 2014 08:58:49 GMT + * Content-Type: application/json + * Connection: keep-alive + * Transfer-Encoding: chunked + * ``` + * + * @param {String} rawHeaders Headers needing to be parsed + * + * @returns {Object} Headers parsed into an object + */ +var parseHeaders = (rawHeaders) => { + // Header names are data, including __proto__; avoid inherited setters. + const parsed = Object.create(null); + let key; + let val; + let i; + + rawHeaders && + rawHeaders.split('\n').forEach(function parser(line) { + i = line.indexOf(':'); + key = line.substring(0, i).trim().toLowerCase(); + val = line.substring(i + 1).trim(); + + const hasKey = utils$1.hasOwnProp(parsed, key); + + if (!key || (hasKey && utils$1.hasOwnProp(ignoreDuplicateOf, key))) { + return; + } + + if (key === 'set-cookie') { + if (hasKey) { + parsed[key].push(val); + } else { + parsed[key] = [val]; + } + } else { + parsed[key] = hasKey ? parsed[key] + ', ' + val : val; + } + }); + + return parsed; +}; + +function trimSPorHTAB(str) { + let start = 0; + let end = str.length; + + while (start < end) { + const code = str.charCodeAt(start); + + if (code !== 0x09 && code !== 0x20) { + break; + } + + start += 1; + } + + while (end > start) { + const code = str.charCodeAt(end - 1); + + if (code !== 0x09 && code !== 0x20) { + break; + } + + end -= 1; + } + + return start === 0 && end === str.length ? str : str.slice(start, end); +} + +// The control-code ranges are intentional: header sanitization strips C0/DEL bytes. +// eslint-disable-next-line no-control-regex +const INVALID_UNICODE_HEADER_VALUE_CHARS = new RegExp('[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+', 'g'); +// eslint-disable-next-line no-control-regex +const INVALID_BYTE_STRING_HEADER_VALUE_CHARS = new RegExp('[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+', 'g'); + +function sanitizeValue(value, invalidChars) { + if (utils$1.isArray(value)) { + return value.map((item) => sanitizeValue(item, invalidChars)); + } + + return trimSPorHTAB(String(value).replace(invalidChars, '')); +} + +const sanitizeHeaderValue = (value) => + sanitizeValue(value, INVALID_UNICODE_HEADER_VALUE_CHARS); + +const sanitizeByteStringHeaderValue = (value) => + sanitizeValue(value, INVALID_BYTE_STRING_HEADER_VALUE_CHARS); + +function toByteStringHeaderObject(headers) { + const byteStringHeaders = Object.create(null); + + utils$1.forEach(headers.toJSON(), (value, header) => { + byteStringHeaders[header] = sanitizeByteStringHeaderValue(value); + }); + + return byteStringHeaders; +} + +const $internals$1 = Symbol('internals'); + +function normalizeHeader(header) { + return header && String(header).trim().toLowerCase(); +} + +function normalizeValue(value) { + if (value === false || value == null) { + return value; + } + + return utils$1.isArray(value) ? value.map(normalizeValue) : sanitizeHeaderValue(String(value)); +} + +function parseTokens(str) { + const tokens = Object.create(null); + const tokensRE = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g; + let match; + + while ((match = tokensRE.exec(str))) { + tokens[match[1]] = match[2]; + } + + return tokens; +} + +const parameterNameRE = /^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/; + +function trimOWS(value) { + let start = 0; + let end = value.length; + + while (start < end) { + const code = value.charCodeAt(start); + + if (code !== 0x09 && code !== 0x20) { + break; + } + + start += 1; + } + + while (end > start) { + const code = value.charCodeAt(end - 1); + + if (code !== 0x09 && code !== 0x20) { + break; + } + + end -= 1; + } + + return start === 0 && end === value.length ? value : value.slice(start, end); +} + +function decodeQuotedString(value) { + const last = value.length - 1; + + if (last < 1 || value.charCodeAt(0) !== 0x22 || value.charCodeAt(last) !== 0x22) { + return value; + } + + let decoded = ''; + + for (let i = 1; i < last; i++) { + const code = value.charCodeAt(i); + + if (code === 0x22) { + return value; + } + + if (code === 0x5c) { + i += 1; + + if (i >= last) { + return value; + } + } + + decoded += value[i]; + } + + return decoded; +} + +function parseParameters(value) { + const parameters = Object.create(null); + const str = String(value); + let start = 0; + let quoted = false; + let escaped = false; + + function parseParameter(end) { + const part = trimOWS(str.slice(start, end)); + const equals = part.indexOf('='); + + if (equals < 1) { + return; + } + + const name = trimOWS(part.slice(0, equals)); + + if (!parameterNameRE.test(name)) { + return; + } + + const normalizedName = name.toLowerCase(); + + if ( + normalizedName === '__proto__' || + normalizedName === 'constructor' || + normalizedName === 'prototype' + ) { + return; + } + + const parameterValue = trimOWS(part.slice(equals + 1)); + parameters[normalizedName] = decodeQuotedString(parameterValue); + } + + for (let i = 0; i < str.length; i++) { + const code = str.charCodeAt(i); + + if (quoted) { + if (escaped) { + escaped = false; + } else if (code === 0x5c) { + escaped = true; + } else if (code === 0x22) { + quoted = false; + } + } else if (code === 0x22) { + quoted = true; + } else if (code === 0x2c || code === 0x3b) { + parseParameter(i); + start = i + 1; + } + } + + parseParameter(str.length); + + return parameters; +} + +const isValidHeaderName = (str) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim()); + +// `__proto__` is a valid field name, and the one name the uppercase mapping at +// the bottom of this file cannot reach: it is inherited from Object.prototype +// instead of being declared on AxiosHeaders.prototype, so `self.__proto__ = v` +// runs the inherited setter. That silently discards the header, and an array +// value replaces the instance prototype, taking every method with it. +// Store it under the same kind of case variant that mapping uses for `set` and +// `constructor`. Header lookup is caseless, so it reads back under either +// spelling, and no own `__proto__` slot is ever created for a later +// `Object.assign` to copy onto a plain object through the same setter. +const PROTO_HEADER_SLOT = '__Proto__'; + +const headerSlot = (name) => (name === '__proto__' ? PROTO_HEADER_SLOT : name); + +function matchHeaderValue(context, value, header, filter, isHeaderNameFilter) { + if (utils$1.isFunction(filter)) { + return filter.call(context, value, header); + } + + if (isHeaderNameFilter) { + value = header; + } + + if (!utils$1.isString(value)) return; + + if (utils$1.isString(filter)) { + return value.indexOf(filter) !== -1; + } + + if (utils$1.isRegExp(filter)) { + return filter.test(value); + } +} + +function formatHeader(header) { + return header + .trim() + .toLowerCase() + .replace(/([a-z\d])(\w*)/g, (w, char, str) => { + return char.toUpperCase() + str; + }); +} + +function buildAccessors(obj, header) { + const accessorName = utils$1.toCamelCase(' ' + header); + + ['get', 'set', 'has'].forEach((methodName) => { + Object.defineProperty(obj, methodName + accessorName, { + // Null-proto descriptor so a polluted Object.prototype.get cannot turn + // this data descriptor into an accessor descriptor on the way in. + __proto__: null, + value: function (arg1, arg2, arg3) { + return this[methodName].call(this, header, arg1, arg2, arg3); + }, + configurable: true, + }); + }); +} + +let AxiosHeaders$1 = class AxiosHeaders { + constructor(headers) { + headers && this.set(headers); + } + + set(header, valueOrRewrite, rewrite) { + const self = this; + + function setHeader(_value, _header, _rewrite) { + const lHeader = normalizeHeader(_header); + + if (!lHeader) { + return; + } + + const key = utils$1.findKey(self, lHeader); + + if ( + !key || + self[key] === undefined || + _rewrite === true || + (_rewrite === undefined && self[key] !== false) + ) { + self[headerSlot(key || _header)] = normalizeValue(_value); + } + } + + const setHeaders = (headers, _rewrite) => + utils$1.forEach(headers, (_value, _header) => setHeader(_value, _header, _rewrite)); + + if (utils$1.isPlainObject(header) || header instanceof this.constructor) { + setHeaders(header, valueOrRewrite); + } else if (utils$1.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) { + setHeaders(parseHeaders(header), valueOrRewrite); + } else if (utils$1.isObject(header) && utils$1.isSafeIterable(header)) { + let obj = Object.create(null), + dest, + key; + for (const entry of header) { + if (!utils$1.isArray(entry)) { + throw new TypeError('Object iterator must return a key-value pair'); + } + + key = entry[0]; + + if (utils$1.hasOwnProp(obj, key)) { + dest = obj[key]; + obj[key] = utils$1.isArray(dest) ? [...dest, entry[1]] : [dest, entry[1]]; + } else { + obj[key] = entry[1]; + } + } + + setHeaders(obj, valueOrRewrite); + } else { + header != null && setHeader(valueOrRewrite, header, rewrite); + } + + return this; + } + + get(header, parser) { + header = normalizeHeader(header); + + if (header) { + const key = utils$1.findKey(this, header); + + if (key) { + const value = this[key]; + + if (!parser) { + return value; + } + + if (parser === true) { + return parseTokens(value); + } + + if (utils$1.isFunction(parser)) { + return parser.call(this, value, key); + } + + if (utils$1.isRegExp(parser)) { + return parser.exec(value); + } + + throw new TypeError('parser must be boolean|regexp|function'); + } + } + } + + has(header, matcher) { + header = normalizeHeader(header); + + if (header) { + const key = utils$1.findKey(this, header); + + return !!( + key && + this[key] !== undefined && + (!matcher || matchHeaderValue(this, this[key], key, matcher)) + ); + } + + return false; + } + + delete(header, matcher) { + const self = this; + let deleted = false; + + function deleteHeader(_header) { + _header = normalizeHeader(_header); + + if (_header) { + const key = utils$1.findKey(self, _header); + + if (key && (!matcher || matchHeaderValue(self, self[key], key, matcher))) { + delete self[key]; + + deleted = true; + } + } + } + + if (utils$1.isArray(header)) { + header.forEach(deleteHeader); + } else { + deleteHeader(header); + } + + return deleted; + } + + clear(matcher) { + const keys = Object.keys(this); + let i = keys.length; + let deleted = false; + + while (i--) { + const key = keys[i]; + if (!matcher || matchHeaderValue(this, this[key], key, matcher, true)) { + delete this[key]; + deleted = true; + } + } + + return deleted; + } + + normalize(format) { + const self = this; + const headers = Object.create(null); + + utils$1.forEach(this, (value, header) => { + const key = utils$1.findKey(headers, header); + + if (key) { + self[key] = normalizeValue(value); + delete self[header]; + return; + } + + const normalized = headerSlot(format ? formatHeader(header) : String(header).trim()); + + if (normalized !== header) { + delete self[header]; + } + + self[normalized] = normalizeValue(value); + + headers[normalized] = true; + }); + + return this; + } + + concat(...targets) { + return this.constructor.concat(this, ...targets); + } + + toJSON(asStrings) { + const obj = Object.create(null); + + utils$1.forEach(this, (value, header) => { + value != null && + value !== false && + (obj[header] = asStrings && utils$1.isArray(value) ? value.join(', ') : value); + }); + + return obj; + } + + [Symbol.iterator]() { + return Object.entries(this.toJSON())[Symbol.iterator](); + } + + toString() { + return Object.entries(this.toJSON()) + .map(([header, value]) => header + ': ' + value) + .join('\n'); + } + + getSetCookie() { + const value = this.get('set-cookie'); + return utils$1.isArray(value) ? value : value == null || value === false ? [] : [value]; + } + + get [Symbol.toStringTag]() { + return 'AxiosHeaders'; + } + + static from(thing) { + return thing instanceof this ? thing : new this(thing); + } + + static parseParameters(value) { + return parseParameters(value); + } + + static concat(first, ...targets) { + const computed = new this(first); + + targets.forEach((target) => computed.set(target)); + + return computed; + } + + static accessor(header) { + const internals = + (this[$internals$1] = + this[$internals$1] = + { + accessors: {}, + }); + + const accessors = internals.accessors; + const prototype = this.prototype; + + function defineAccessor(_header) { + const lHeader = normalizeHeader(_header); + + if (!accessors[lHeader]) { + buildAccessors(prototype, _header); + accessors[lHeader] = true; + } + } + + utils$1.isArray(header) ? header.forEach(defineAccessor) : defineAccessor(header); + + return this; + } +}; + +AxiosHeaders$1.accessor([ + 'Content-Type', + 'Content-Length', + 'Accept', + 'Accept-Encoding', + 'User-Agent', + 'Authorization', +]); + +// reserved names hotfix +utils$1.reduceDescriptors(AxiosHeaders$1.prototype, ({ value }, key) => { + let mapped = key[0].toUpperCase() + key.slice(1); // map `set` => `Set` + return { + get: () => value, + set(headerValue) { + this[mapped] = headerValue; + }, + }; +}); + +utils$1.freezeMethods(AxiosHeaders$1); + +const REDACTED = '[REDACTED ****]'; + +function hasOwnOrPrototypeToJSON(source) { + if (utils$1.hasOwnProp(source, 'toJSON')) { + return true; + } + + let prototype = Object.getPrototypeOf(source); + + while (prototype && prototype !== Object.prototype) { + if (utils$1.hasOwnProp(prototype, 'toJSON')) { + return true; + } + + prototype = Object.getPrototypeOf(prototype); + } + + return false; +} + +// Build a plain-object snapshot of `config` and replace the value of any key +// (case-insensitive) listed in `redactKeys` with REDACTED. Walks through arrays +// and AxiosHeaders, and short-circuits on circular references. +function redactConfig(config, redactKeys) { + const lowerKeys = new Set(redactKeys.map((k) => String(k).toLowerCase())); + const seen = []; + + const visit = (source) => { + if (source === null || typeof source !== 'object') return source; + if (utils$1.isBuffer(source)) return source; + if (seen.indexOf(source) !== -1) return undefined; + + if (source instanceof AxiosHeaders$1) { + source = source.toJSON(); + } + + seen.push(source); + + let result; + if (utils$1.isArray(source)) { + result = []; + source.forEach((v, i) => { + const reducedValue = visit(v); + if (!utils$1.isUndefined(reducedValue)) { + result[i] = reducedValue; + } + }); + } else { + if (!utils$1.isPlainObject(source) && hasOwnOrPrototypeToJSON(source)) { + seen.pop(); + return source; + } + + result = Object.create(null); + for (const [key, value] of Object.entries(source)) { + const reducedValue = lowerKeys.has(key.toLowerCase()) ? REDACTED : visit(value); + if (!utils$1.isUndefined(reducedValue)) { + result[key] = reducedValue; + } + } + } + + seen.pop(); + return result; + }; + + return visit(config); +} + +function stringifySafely$1(value) { + try { + return String(value); + } catch (err) { + return ''; + } +} + +function aggregateErrorMessage(error) { + const message = error.errors + .map((entry) => { + try { + return entry && entry.message ? stringifySafely$1(entry.message) : stringifySafely$1(entry); + } catch (err) { + return ''; + } + }) + .filter(Boolean) + .join('; '); + + return message || error.name || 'AggregateError'; +} + +// Shared with `Axios.prototype.request`, which splices the reconstructed +// caller frames in ahead of this marker. +const CAUSED_BY_SEPARATOR = '\nCaused by: '; +const $causeStack = Symbol('causeStack'); + +// Match the section we appended, not marker-like text in an error message or +// a replacement stack supplied by the caller. Do not re-read the cause's stack. +function getCauseStackIndex(error, stack) { + const causeStack = utils$1.hasOwnProp(error, $causeStack) && error[$causeStack]; + + return causeStack && stack.endsWith(causeStack) ? stack.length - causeStack.length : -1; +} + +/** + * Append the stack of a wrapped error to `target.stack`. + * + * `cause` already exposes the original error for tooling that walks the standard + * cause chain, but many error reporters read `stack` and nothing else. Inlining + * the wrapped stack there means those reporters surface the underlying failure + * instead of the axios frames that normalized it (see #6670). + * + * Every read is defensive: a custom `Error.prepareStackTrace` hook, a runtime + * without stack support, or a replaced `stack` property can leave the value + * missing, non-string, or read-only, and normalizing an error must not throw + * because of that. + * + * @param {Error} target The AxiosError being built. + * @param {Error} source The error being wrapped. + * + * @returns {void} + */ +function appendCauseStack(target, source) { + try { + const sourceStack = source && source.stack; + + if (typeof sourceStack !== 'string' || !sourceStack) { + return; + } + + const targetStack = target.stack; + + if (typeof targetStack !== 'string' || !targetStack) { + return; + } + + // Each call to `from()` creates a fresh target. Re-wrapping includes the + // previous stack verbatim, adding one cause section per wrap. + const causeStack = CAUSED_BY_SEPARATOR + sourceStack; + target.stack = targetStack + causeStack; + Object.defineProperty(target, $causeStack, { __proto__: null, value: causeStack }); + } catch (e) { + // Ignore failures from custom stack hooks or un-writable stack properties. + } +} + +let AxiosError$1 = class AxiosError extends Error { + static from(error, code, config, request, response, customProps) { + // `AggregateError` (thrown by Node on dual-stack/Happy-Eyeballs connection + // failures) has an empty `message`; its detail lives in `errors[]`. Without + // this, the wrapped error surfaces with a blank message (see #6721). + let message = error.message; + if (!message && utils$1.isArray(error.errors) && error.errors.length) { + message = aggregateErrorMessage(error); + } + + const axiosError = new AxiosError(message, code || error.code, config, request, response); + // Match native `Error` `cause` semantics: non-enumerable. The wrapped + // error often carries circular internals (sockets, requests, agents), so + // an enumerable `cause` makes structured loggers (pino/winston) and any + // own-property walk throw "Converting circular structure to JSON". + // Regression from #6982; see #7205. `__proto__: null` mirrors the + // `message` descriptor below (prototype-pollution-safe descriptor). + Object.defineProperty(axiosError, 'cause', { + __proto__: null, + value: error, + writable: true, + enumerable: false, + configurable: true, + }); + axiosError.name = error.name; + + // Inline the wrapped stack for reporters that read only `stack`; the `cause` + // property above already covers cause-aware tooling. + appendCauseStack(axiosError, error); + + // Preserve status from the original error if not already set from response + if (error.status != null && axiosError.status == null) { + axiosError.status = error.status; + } + + customProps && Object.assign(axiosError, customProps); + return axiosError; + } + + /** + * Create an Error with the specified message, config, error code, request and response. + * + * @param {string} message The error message. + * @param {string} [code] The error code (for example, 'ECONNABORTED'). + * @param {Object} [config] The config. + * @param {Object} [request] The request. + * @param {Object} [response] The response. + * + * @returns {Error} The created error. + */ + constructor(message, code, config, request, response) { + super(message); + + // Make message enumerable to maintain backward compatibility + // The native Error constructor sets message as non-enumerable, + // but axios < v1.13.3 had it as enumerable + Object.defineProperty(this, 'message', { + // Null-proto descriptor so a polluted Object.prototype.get cannot turn + // this data descriptor into an accessor descriptor on the way in. + __proto__: null, + value: message, + enumerable: true, + writable: true, + configurable: true, + }); + + this.name = 'AxiosError'; + this.isAxiosError = true; + code && (this.code = code); + config && (this.config = config); + request && (this.request = request); + if (response) { + this.response = response; + this.status = response.status; + } + } + + toJSON() { + // Opt-in redaction: when the request config carries a `redact` array, the + // value of any matching key (case-insensitive, at any depth) is replaced + // with REDACTED in the serialized snapshot. Undefined or empty leaves the + // existing serialization behavior unchanged. + const config = this.config; + const redactKeys = config && utils$1.hasOwnProp(config, 'redact') ? config.redact : undefined; + const serializedConfig = + utils$1.isArray(redactKeys) && redactKeys.length > 0 + ? redactConfig(config, redactKeys) + : utils$1.toJSONObject(config); + + return { + // Standard + message: this.message, + name: this.name, + // Microsoft + description: this.description, + number: this.number, + // Mozilla + fileName: this.fileName, + lineNumber: this.lineNumber, + columnNumber: this.columnNumber, + stack: this.stack, + // Axios + config: serializedConfig, + code: this.code, + status: this.status, + }; + } +}; + +// This can be changed to static properties as soon as the parser options in .eslint.cjs are updated. +AxiosError$1.ERR_BAD_OPTION_VALUE = 'ERR_BAD_OPTION_VALUE'; +AxiosError$1.ERR_BAD_OPTION = 'ERR_BAD_OPTION'; +AxiosError$1.ECONNABORTED = 'ECONNABORTED'; +AxiosError$1.ETIMEDOUT = 'ETIMEDOUT'; +AxiosError$1.ECONNREFUSED = 'ECONNREFUSED'; +AxiosError$1.ERR_NETWORK = 'ERR_NETWORK'; +AxiosError$1.ERR_FR_TOO_MANY_REDIRECTS = 'ERR_FR_TOO_MANY_REDIRECTS'; +AxiosError$1.ERR_DEPRECATED = 'ERR_DEPRECATED'; +AxiosError$1.ERR_BAD_RESPONSE = 'ERR_BAD_RESPONSE'; +AxiosError$1.ERR_BAD_REQUEST = 'ERR_BAD_REQUEST'; +AxiosError$1.ERR_CANCELED = 'ERR_CANCELED'; +AxiosError$1.ERR_NOT_SUPPORT = 'ERR_NOT_SUPPORT'; +AxiosError$1.ERR_INVALID_URL = 'ERR_INVALID_URL'; +AxiosError$1.ERR_FORM_DATA_DEPTH_EXCEEDED = 'ERR_FORM_DATA_DEPTH_EXCEEDED'; + +// eslint-disable-next-line strict +var httpAdapter = null; + +// Default nesting limit shared with the inverse transform (formDataToJSON) so +// the FormData <-> JSON round-trip stays symmetric. +const DEFAULT_FORM_DATA_MAX_DEPTH = 100; + +/** + * Determines if the given thing is a array or js object. + * + * @param {string} thing - The object or array to be visited. + * + * @returns {boolean} + */ +function isVisitable(thing) { + return utils$1.isPlainObject(thing) || utils$1.isArray(thing); +} + +/** + * It removes the brackets from the end of a string + * + * @param {string} key - The key of the parameter. + * + * @returns {string} the key without the brackets. + */ +function removeBrackets(key) { + return utils$1.endsWith(key, '[]') ? key.slice(0, -2) : key; +} + +/** + * It takes a path, a key, and a boolean, and returns a string + * + * @param {string} path - The path to the current key. + * @param {string} key - The key of the current object being iterated over. + * @param {string} dots - If true, the key will be rendered with dots instead of brackets. + * + * @returns {string} The path to the current key. + */ +function renderKey(path, key, dots) { + if (!path) return key; + return path + .concat(key) + .map(function each(token, i) { + // eslint-disable-next-line no-param-reassign + token = removeBrackets(token); + return !dots && i ? '[' + token + ']' : token; + }) + .join(dots ? '.' : ''); +} + +/** + * If the array is an array and none of its elements are visitable, then it's a flat array. + * + * @param {Array} arr - The array to check + * + * @returns {boolean} + */ +function isFlatArray(arr) { + return utils$1.isArray(arr) && !arr.some(isVisitable); +} + +const predicates = utils$1.toFlatObject(utils$1, {}, null, function filter(prop) { + return /^is[A-Z]/.test(prop); +}); + +/** + * Convert a data object to FormData + * + * @param {Object} obj + * @param {?Object} [formData] + * @param {?Object} [options] + * @param {Function} [options.visitor] + * @param {Boolean} [options.metaTokens = true] + * @param {Boolean} [options.dots = false] + * @param {?Boolean} [options.indexes = false] + * + * @returns {Object} + **/ + +/** + * It converts an object into a FormData object + * + * @param {Object} obj - The object to convert to form data. + * @param {string} formData - The FormData object to append to. + * @param {Object} options + * + * @returns + */ +function toFormData$1(obj, formData, options) { + if (!utils$1.isObject(obj)) { + throw new TypeError('target must be an object'); + } + + // eslint-disable-next-line no-param-reassign + formData = formData || new (FormData)(); + + const option = (name, fallback) => { + const value = utils$1.getSafeProp(options, name); + return utils$1.isUndefined(value) ? fallback : value; + }; + + const metaTokens = option('metaTokens', true); + // eslint-disable-next-line no-use-before-define + const visitor = option('visitor') || defaultVisitor; + const dots = option('dots', false); + const indexes = option('indexes', false); + const _Blob = option('Blob') || (typeof Blob !== 'undefined' && Blob); + const maxDepth = option('maxDepth', DEFAULT_FORM_DATA_MAX_DEPTH); + const useBlob = _Blob && utils$1.isSpecCompliantForm(formData); + const stack = []; + + if (!utils$1.isFunction(visitor)) { + throw new TypeError('visitor must be a function'); + } + + function convertValue(value) { + if (value === null) return ''; + + if (utils$1.isDate(value)) { + return value.toISOString(); + } + + if (utils$1.isBoolean(value)) { + return value.toString(); + } + + if (!useBlob && utils$1.isBlob(value)) { + throw new AxiosError$1('Blob is not supported. Use a Buffer instead.'); + } + + if (utils$1.isArrayBuffer(value) || utils$1.isTypedArray(value)) { + if (useBlob && typeof _Blob === 'function') { + return new _Blob([value]); + } + throw new AxiosError$1( + 'Blob is not supported. Use a Buffer instead.', + AxiosError$1.ERR_NOT_SUPPORT + ); + } + + return value; + } + + function throwIfMaxDepthExceeded(depth) { + if (depth > maxDepth) { + throw new AxiosError$1( + 'Object is too deeply nested (' + depth + ' levels). Max depth: ' + maxDepth, + AxiosError$1.ERR_FORM_DATA_DEPTH_EXCEEDED + ); + } + } + + function stringifyWithDepthLimit(value, depth) { + if (maxDepth === Infinity) { + return JSON.stringify(value); + } + + const ancestors = []; + + return JSON.stringify(value, function limitDepth(_key, currentValue) { + if (!utils$1.isObject(currentValue)) { + return currentValue; + } + + while (ancestors.length && ancestors[ancestors.length - 1] !== this) { + ancestors.pop(); + } + + ancestors.push(currentValue); + throwIfMaxDepthExceeded(depth + ancestors.length - 1); + + return currentValue; + }); + } + + /** + * Default visitor. + * + * @param {*} value + * @param {String|Number} key + * @param {Array} path + * @this {FormData} + * + * @returns {boolean} return true to visit the each prop of the value recursively + */ + function defaultVisitor(value, key, path) { + let arr = value; + + if (utils$1.isReactNative(formData) && utils$1.isReactNativeBlob(value)) { + formData.append(renderKey(path, key, dots), convertValue(value)); + return false; + } + + if (value && !path && typeof value === 'object') { + if (utils$1.endsWith(key, '{}')) { + // eslint-disable-next-line no-param-reassign + key = metaTokens ? key : key.slice(0, -2); + // eslint-disable-next-line no-param-reassign + value = stringifyWithDepthLimit(value, 1); + } else if ( + (utils$1.isArray(value) && isFlatArray(value)) || + ((utils$1.isFileList(value) || utils$1.endsWith(key, '[]')) && (arr = utils$1.toArray(value))) + ) { + // eslint-disable-next-line no-param-reassign + key = removeBrackets(key); + + arr.forEach(function each(el, index) { + !(utils$1.isUndefined(el) || el === null) && + formData.append( + // eslint-disable-next-line no-nested-ternary + indexes === true + ? renderKey([key], index, dots) + : indexes === null + ? key + : key + '[]', + convertValue(el) + ); + }); + return false; + } + } + + if (isVisitable(value)) { + return true; + } + + formData.append(renderKey(path, key, dots), convertValue(value)); + + return false; + } + + const exposedHelpers = Object.assign(predicates, { + defaultVisitor, + convertValue, + isVisitable, + }); + + function build(value, path, depth = 0) { + if (utils$1.isUndefined(value)) return; + + throwIfMaxDepthExceeded(depth); + + if (stack.indexOf(value) !== -1) { + throw new Error('Circular reference detected in ' + path.join('.')); + } + + stack.push(value); + + utils$1.forEach(value, function each(el, key) { + const result = + !(utils$1.isUndefined(el) || el === null) && + visitor.call(formData, el, utils$1.isString(key) ? key.trim() : key, path, exposedHelpers); + + if (result === true) { + build(el, path ? path.concat(key) : [key], depth + 1); + } + }); + + stack.pop(); + } + + if (!utils$1.isObject(obj)) { + throw new TypeError('data must be an object'); + } + + build(obj); + + return formData; +} + +/** + * It encodes a string by replacing all characters that are not in the unreserved set with + * their percent-encoded equivalents + * + * @param {string} str - The string to encode. + * + * @returns {string} The encoded string. + */ +function encode$1(str) { + const charMap = { + '!': '%21', + "'": '%27', + '(': '%28', + ')': '%29', + '~': '%7E', + '%20': '+', + }; + return encodeURIComponent(str).replace(/[!'()~]|%20/g, function replacer(match) { + return charMap[match]; + }); +} + +/** + * It takes a params object and converts it to a FormData object + * + * @param {Object} params - The parameters to be converted to a FormData object. + * @param {Object} options - The options object passed to the Axios constructor. + * + * @returns {void} + */ +function AxiosURLSearchParams(params, options) { + this._pairs = []; + + params && toFormData$1(params, this, options); +} + +const prototype = AxiosURLSearchParams.prototype; + +prototype.append = function append(name, value) { + this._pairs.push([name, value]); +}; + +prototype.toString = function toString(encoder) { + const _encode = encoder + ? (value) => encoder.call(this, value, encode$1) + : encode$1; + + return this._pairs + .map(function each(pair) { + return _encode(pair[0]) + '=' + _encode(pair[1]); + }, '') + .join('&'); +}; + +/** + * It replaces URL-encoded forms of `:`, `$`, `,`, and spaces with + * their plain counterparts (`:`, `$`, `,`, `+`). + * + * @param {string} val The value to be encoded. + * + * @returns {string} The encoded value. + */ +function encode(val) { + return encodeURIComponent(val) + .replace(/%3A/gi, ':') + .replace(/%24/g, '$') + .replace(/%2C/gi, ',') + .replace(/%20/g, '+'); +} + +/** + * Build a URL by appending params to the end + * + * @param {string} url The base of the url (e.g., http://www.google.com) + * @param {object} [params] The params to be appended + * @param {?(object|Function)} options + * + * @returns {string} The formatted url + */ +function buildURL(url, params, options) { + if (!params) { + return url; + } + url = url || ''; + + const _options = utils$1.isFunction(options) + ? { + serialize: options, + } + : options; + + // Read serializer options pollution-safely: own properties and methods on a + // class/template prototype are honored, but values injected onto a polluted + // Object.prototype are ignored. + const _encode = utils$1.getSafeProp(_options, 'encode') || encode; + const serializeFn = utils$1.getSafeProp(_options, 'serialize'); + + let serializedParams; + + if (serializeFn) { + serializedParams = serializeFn(params, _options); + } else { + serializedParams = utils$1.isURLSearchParams(params) + ? params.toString() + : new AxiosURLSearchParams(params, _options).toString(_encode); + } + + if (serializedParams) { + const hashmarkIndex = url.indexOf('#'); + + if (hashmarkIndex !== -1) { + url = url.slice(0, hashmarkIndex); + } + url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams; + } + + return url; +} + +const $internals = Symbol('internals'); + +// `handlers` is public and may be replaced with a nullish value by user code; +// `clear()` has always tolerated that. Treat it as an empty stack rather than +// dereferencing it. +function countHandlers(handlers) { + return handlers ? handlers.length : 0; +} + +function trimHandlers(handlers) { + if (!handlers) { + return; + } + + while (handlers.length && handlers[handlers.length - 1] === null) { + handlers.pop(); + } +} + +// Preserve the array-key coercion used before IDs were stored in a Map, without +// treating null, empty strings, or noncanonical numeric strings as ID zero. +function normalizeHandlerId(id) { + if (typeof id === 'string' && id !== '' && String(Number(id)) === id) { + return Number(id); + } + + return id; +} + +function syncHandlerEntries(manager, internals) { + const handlers = manager.handlers; + const length = countHandlers(handlers); + + if (handlers !== internals.handlersRef) { + internals.handlersRef = handlers; + internals.handlerEntries.clear(); + } else if (length !== internals.handlersLength) { + if (!length) { + internals.handlerEntries.clear(); + } else { + internals.handlerEntries.forEach(function removeStaleEntry(entry, id) { + if (handlers[entry.index] !== entry.handler) { + internals.handlerEntries.delete(id); + } + }); + } + } + + internals.handlersLength = length; +} + +class InterceptorManager { + constructor() { + this.handlers = []; + this[$internals] = { + handlersRef: this.handlers, + handlersLength: this.handlers.length, + handlerEntries: new Map(), + iterationDepth: 0, + nextId: 0, + }; + } + + /** + * Add a new interceptor to the stack + * + * @param {Function} fulfilled The function to handle `then` for a `Promise` + * @param {Function} rejected The function to handle `reject` for a `Promise` + * @param {Object} options The options for the interceptor, synchronous and runWhen + * + * @return {Number} An ID used to remove interceptor later + */ + use(fulfilled, rejected, options) { + const handler = { + fulfilled, + rejected, + synchronous: options ? options.synchronous : false, + runWhen: options ? options.runWhen : null, + }; + const internals = this[$internals]; + + if (this.handlers == null) { + this.handlers = []; + } + + syncHandlerEntries(this, internals); + + const id = internals.nextId++; + + this.handlers.push(handler); + internals.handlerEntries.set(id, { + handler, + index: this.handlers.length - 1, + }); + internals.handlersLength = this.handlers.length; + + return id; + } + + /** + * Remove an interceptor from the stack + * + * @param {Number} id The ID that was returned by `use` + * + * @returns {void} + */ + eject(id) { + const internals = this[$internals]; + + syncHandlerEntries(this, internals); + + const handlerId = normalizeHandlerId(id); + const entry = internals.handlerEntries.get(handlerId); + + if (entry) { + internals.handlerEntries.delete(handlerId); + + // Ignore IDs invalidated by clear or direct replacement of handlers. + if (this.handlers[entry.index] !== entry.handler) { + return; + } + + this.handlers[entry.index] = null; + + // Do not reuse an index while forEach is walking its length snapshot. + if (!internals.iterationDepth) { + trimHandlers(this.handlers); + internals.handlersLength = this.handlers.length; + } + } + } + + /** + * Clear all interceptors from the stack + * + * @returns {void} + */ + clear() { + if (this.handlers) { + this.handlers = []; + syncHandlerEntries(this, this[$internals]); + } + } + + /** + * Iterate over all the registered interceptors + * + * This method is particularly useful for skipping over any + * interceptors that may have become `null` calling `eject`. + * + * @param {Function} fn The function to call for each interceptor + * + * @returns {void} + */ + forEach(fn) { + const internals = this[$internals]; + + syncHandlerEntries(this, internals); + + internals.iterationDepth++; + + try { + utils$1.forEach(this.handlers, function forEachHandler(h) { + if (h !== null) { + fn(h); + } + }); + } finally { + if (!--internals.iterationDepth) { + syncHandlerEntries(this, internals); + trimHandlers(this.handlers); + internals.handlersLength = countHandlers(this.handlers); + } + } + } +} + +var transitionalDefaults = { + silentJSONParsing: true, + forcedJSONParsing: true, + clarifyTimeoutError: false, + legacyInterceptorReqResOrdering: true, + advertiseZstdAcceptEncoding: false, + validateStatusUndefinedResolves: true, + encodeBasicAuthUsername: false, +}; + +var URLSearchParams$1 = typeof URLSearchParams !== 'undefined' ? URLSearchParams : AxiosURLSearchParams; + +var FormData$1 = typeof FormData !== 'undefined' ? FormData : null; + +var Blob$1 = typeof Blob !== 'undefined' ? Blob : null; + +var platform$1 = { + isBrowser: true, + classes: { + URLSearchParams: URLSearchParams$1, + FormData: FormData$1, + Blob: Blob$1, + }, + protocols: ['http', 'https', 'file', 'blob', 'url', 'data'], +}; + +const hasBrowserEnv = typeof window !== 'undefined' && typeof document !== 'undefined'; + +const _navigator = (typeof navigator === 'object' && navigator) || undefined; + +/** + * Determine if we're running in a standard browser environment + * + * This allows axios to run in a web worker, and react-native. + * Both environments support XMLHttpRequest, but not fully standard globals. + * + * web workers: + * typeof window -> undefined + * typeof document -> undefined + * + * react-native: + * navigator.product -> 'ReactNative' + * nativescript + * navigator.product -> 'NativeScript' or 'NS' + * + * @returns {boolean} + */ +const hasStandardBrowserEnv = + hasBrowserEnv && + (!_navigator || ['ReactNative', 'NativeScript', 'NS'].indexOf(_navigator.product) < 0); + +/** + * Determine if we're running in a standard browser webWorker environment + * + * Although the `isStandardBrowserEnv` method indicates that + * `allows axios to run in a web worker`, the WebWorker will still be + * filtered out due to its judgment standard + * `typeof window !== 'undefined' && typeof document !== 'undefined'`. + * This leads to a problem when axios post `FormData` in webWorker + */ +const hasStandardBrowserWebWorkerEnv = (() => { + return ( + typeof WorkerGlobalScope !== 'undefined' && + // eslint-disable-next-line no-undef + self instanceof WorkerGlobalScope && + typeof self.importScripts === 'function' + ); +})(); + +const origin = (hasBrowserEnv && window.location.href) || 'http://localhost'; + +var utils = /*#__PURE__*/Object.freeze({ + __proto__: null, + hasBrowserEnv: hasBrowserEnv, + hasStandardBrowserEnv: hasStandardBrowserEnv, + hasStandardBrowserWebWorkerEnv: hasStandardBrowserWebWorkerEnv, + navigator: _navigator, + origin: origin +}); + +var platform = { + ...utils, + ...platform$1, +}; + +function toURLEncodedForm(data, options) { + return toFormData$1(data, new platform.classes.URLSearchParams(), { + visitor: function (value, key, path, helpers) { + if (platform.isNode && utils$1.isBuffer(value)) { + this.append(key, value.toString('base64')); + return false; + } + + return helpers.defaultVisitor.apply(this, arguments); + }, + ...options, + }); +} + +const MAX_DEPTH = DEFAULT_FORM_DATA_MAX_DEPTH; + +function throwIfDepthExceeded(index) { + if (index > MAX_DEPTH) { + throw new AxiosError$1( + 'FormData field is too deeply nested (' + index + ' levels). Max depth: ' + MAX_DEPTH, + AxiosError$1.ERR_FORM_DATA_DEPTH_EXCEEDED + ); + } +} + +/** + * It takes a string like `foo[x][y][z]` and returns an array like `['foo', 'x', 'y', 'z'] + * + * @param {string} name - The name of the property to get. + * + * @returns An array of strings. + */ +function parsePropPath(name) { + // foo[x][y][z] -> ['foo', 'x', 'y', 'z'] + // foo.x.y.z -> ['foo', 'x', 'y', 'z'] + // A path is split on `.` and on `[...]` groups. A segment — whether written + // in dot notation or captured inside brackets — may contain any character + // except `.`, `[` and `]`, so a key like `user-name` or `user name` is kept + // literal instead of being split (#5402). `.`, `[` and `]` keep their existing + // meaning, e.g. `foo[bar.baz]` -> ['foo', 'bar', 'baz'] and `[]` is an array push. + // Excluding `[` from the bracket group also makes the match fail fast at the + // next `[`, so a malformed name cannot rescan to the end of the string from + // every unmatched `[` — parsing stays linear in the length of the name. + const path = []; + const pattern = /[^.[\]]+|\[([^.[\]]*)]/g; + let match; + + while ((match = pattern.exec(name)) !== null) { + throwIfDepthExceeded(path.length); + path.push(match[0] === '[]' ? '' : match[1] || match[0]); + } + + return path; +} + +/** + * Convert an array to an object. + * + * @param {Array} arr - The array to convert to an object. + * + * @returns An object with the same keys and values as the array. + */ +function arrayToObject(arr) { + const obj = {}; + const keys = Object.keys(arr); + let i; + const len = keys.length; + let key; + for (i = 0; i < len; i++) { + key = keys[i]; + obj[key] = arr[key]; + } + return obj; +} + +function normalizeArray(value) { + if (!utils$1.isArray(value)) return value; + + const keys = Object.keys(value); + return keys.length !== value.length || keys.some((key, index) => key !== String(index)) + ? arrayToObject(value) + : value; +} + +function normalizeArrays(obj) { + const pending = [obj]; + while (pending.length) { + const target = pending.pop(); + Object.keys(target).forEach((key) => { + const value = (target[key] = normalizeArray(target[key])); + if (utils$1.isArray(value) || utils$1.isPlainObject(value)) { + pending.push(value); + } + }); + } + return obj; +} + +/** + * It takes a FormData object and returns a JavaScript object + * + * @param {string} formData The FormData object to convert to JSON. + * + * @returns {Object | null} The converted object. + */ +function formDataToJSON(formData) { + function buildPath(path, value, target, index) { + throwIfDepthExceeded(index); + + let name = path[index++]; + + if (name === '__proto__') return true; + + const isNumericKey = Number.isFinite(+name); + const isLast = index >= path.length; + name = !name && utils$1.isArray(target) ? target.length : name; + + if (isLast) { + if (utils$1.hasOwnProp(target, name)) { + target[name] = normalizeArray(target[name]); + target[name] = utils$1.isArray(target[name]) + ? target[name].concat(value) + : [target[name], value]; + } else { + target[name] = value; + } + + return !isNumericKey; + } + + if (!utils$1.hasOwnProp(target, name) || !utils$1.isObject(target[name])) { + target[name] = []; + } + + const result = buildPath(path, value, target[name], index); + + if (result && utils$1.isArray(target[name])) { + target[name] = arrayToObject(target[name]); + } + + return !isNumericKey; + } + + if (utils$1.isFormData(formData) && utils$1.isFunction(formData.entries)) { + const obj = {}; + + utils$1.forEachEntry(formData, (name, value) => { + buildPath(parsePropPath(name), value, obj, 0); + }); + + return normalizeArrays(obj); + } + + return null; +} + +const methodList = Object.freeze([ + 'get', + 'delete', + 'head', + 'options', + 'post', + 'put', + 'patch', + 'purge', + 'link', + 'unlink', + 'query', +]); + +const own = (obj, key) => (obj != null && utils$1.hasOwnProp(obj, key) ? obj[key] : undefined); + +/** + * It takes a string, tries to parse it, and if it fails, it returns the stringified version + * of the input + * + * @param {any} rawValue - The value to be stringified. + * @param {Function} parser - A function that parses a string into a JavaScript object. + * @param {Function} encoder - A function that takes a value and returns a string. + * + * @returns {string} A stringified version of the rawValue. + */ +function stringifySafely(rawValue, parser, encoder) { + if (utils$1.isString(rawValue)) { + try { + (parser || JSON.parse)(rawValue); + return utils$1.trim(rawValue); + } catch (e) { + if (e.name !== 'SyntaxError') { + throw e; + } + } + } + + return (encoder || JSON.stringify)(rawValue); +} + +const defaults = { + transitional: transitionalDefaults, + + adapter: ['xhr', 'http', 'fetch'], + + transformRequest: [ + function transformRequest(data, headers) { + const contentType = headers.getContentType() || ''; + const hasJSONContentType = contentType.indexOf('application/json') > -1; + const isObjectPayload = utils$1.isObject(data); + + if (isObjectPayload && utils$1.isHTMLForm(data)) { + data = new FormData(data); + } + + const isFormData = utils$1.isFormData(data); + + if (isFormData) { + return hasJSONContentType ? JSON.stringify(formDataToJSON(data)) : data; + } + + if ( + utils$1.isArrayBuffer(data) || + utils$1.isBuffer(data) || + utils$1.isStream(data) || + utils$1.isFile(data) || + utils$1.isBlob(data) || + utils$1.isReadableStream(data) + ) { + return data; + } + if (utils$1.isArrayBufferView(data)) { + return data.buffer; + } + if (utils$1.isURLSearchParams(data)) { + headers.setContentType('application/x-www-form-urlencoded;charset=utf-8', false); + return data.toString(); + } + + let isFileList; + + if (isObjectPayload) { + const formSerializer = own(this, 'formSerializer'); + if (contentType.indexOf('application/x-www-form-urlencoded') > -1) { + return toURLEncodedForm(data, formSerializer).toString(); + } + + if ( + (isFileList = utils$1.isFileList(data)) || + contentType.indexOf('multipart/form-data') > -1 + ) { + const env = own(this, 'env'); + const _FormData = env && env.FormData; + + return toFormData$1( + isFileList ? { 'files[]': data } : data, + _FormData && new _FormData(), + formSerializer + ); + } + } + + if (isObjectPayload || hasJSONContentType) { + headers.setContentType('application/json', false); + return stringifySafely(data); + } + + return data; + }, + ], + + transformResponse: [ + function transformResponse(data) { + const transitional = own(this, 'transitional') || defaults.transitional; + const forcedJSONParsing = transitional && transitional.forcedJSONParsing; + const responseType = own(this, 'responseType'); + const JSONRequested = responseType === 'json'; + + if (utils$1.isResponse(data) || utils$1.isReadableStream(data)) { + return data; + } + + if ( + data && + utils$1.isString(data) && + ((forcedJSONParsing && !responseType) || JSONRequested) + ) { + const silentJSONParsing = transitional && transitional.silentJSONParsing; + const strictJSONParsing = !silentJSONParsing && JSONRequested; + + try { + return JSON.parse(data, own(this, 'parseReviver')); + } catch (e) { + if (strictJSONParsing) { + if (e.name === 'SyntaxError') { + throw AxiosError$1.from(e, AxiosError$1.ERR_BAD_RESPONSE, this, null, own(this, 'response')); + } + throw e; + } + } + } + + return data; + }, + ], + + /** + * A timeout in milliseconds to abort a request. If set to 0 (default) a + * timeout is not created. + */ + timeout: 0, + + xsrfCookieName: 'XSRF-TOKEN', + xsrfHeaderName: 'X-XSRF-TOKEN', + + maxContentLength: -1, + maxBodyLength: -1, + + env: { + FormData: platform.classes.FormData, + Blob: platform.classes.Blob, + }, + + validateStatus: function validateStatus(status) { + return status >= 200 && status < 300; + }, + + headers: { + common: { + Accept: 'application/json, text/plain, */*', + 'Content-Type': undefined, + }, + }, +}; + +utils$1.forEach(methodList, (method) => { + defaults.headers[method] = {}; +}); + +/** + * Transform the data for a request or a response + * + * @param {Array|Function} fns A single function or Array of functions + * @param {?Object} response The response object + * + * @returns {*} The resulting transformed data + */ +function transformData(fns, response) { + const config = this || defaults; + const context = response || config; + const headers = AxiosHeaders$1.from(context.headers); + let data = context.data; + + utils$1.forEach(fns, function transform(fn) { + data = fn.call(config, data, headers.normalize(), response ? response.status : undefined); + }); + + headers.normalize(); + + return data; +} + +function isCancel$1(value) { + return !!(value && value.__CANCEL__); +} + +let CanceledError$1 = class CanceledError extends AxiosError$1 { + /** + * A `CanceledError` is an object that is thrown when an operation is canceled. + * + * @param {string=} message The message. + * @param {Object=} config The config. + * @param {Object=} request The request. + * + * @returns {CanceledError} The created error. + */ + constructor(message, config, request) { + super(message == null ? 'canceled' : message, AxiosError$1.ERR_CANCELED, config, request); + this.name = 'CanceledError'; + this.__CANCEL__ = true; + } +}; + +/** + * Resolve or reject a Promise based on response status. + * + * @param {Function} resolve A function that resolves the promise. + * @param {Function} reject A function that rejects the promise. + * @param {object} response The response. + * + * @returns {object} The response. + */ +function settle(resolve, reject, response) { + const validateStatus = response.config.validateStatus; + if (!response.status || !validateStatus || validateStatus(response.status)) { + resolve(response); + } else { + reject(new AxiosError$1( + 'Request failed with status code ' + response.status, + response.status >= 400 && response.status < 500 ? AxiosError$1.ERR_BAD_REQUEST : AxiosError$1.ERR_BAD_RESPONSE, + response.config, + response.request, + response + )); + } +} + +const urlParserControlCharacters = /[\t\n\r]/g; + +/** + * Match WHATWG URL preprocessing before checking a URL's protocol. + * + * @param {string} url + * + * @returns {string} + */ +function normalizeURLForProtocolCheck(url) { + if (typeof url !== 'string') { + return url; + } + + let start = 0; + + while (start < url.length && url.charCodeAt(start) <= 0x20) { + start++; + } + + return url.slice(start).replace(urlParserControlCharacters, ''); +} + +function parseProtocol(url) { + const match = /^([-+\w]{1,25}):(?:\/\/)?/.exec(url); + return (match && match[1].toLowerCase()) || ''; +} + +const decodeCookieValue = (value) => { + try { + return decodeURIComponent(value); + } catch (e) { + return value; + } +}; + +var cookies = platform.hasStandardBrowserEnv + ? // Standard browser envs support document.cookie + { + write(name, value, expires, path, domain, secure, sameSite) { + if (typeof document === 'undefined') return; + + const cookie = [`${name}=${encodeURIComponent(value)}`]; + + if (utils$1.isNumber(expires)) { + cookie.push(`expires=${new Date(expires).toUTCString()}`); + } + if (utils$1.isString(path)) { + cookie.push(`path=${path}`); + } + if (utils$1.isString(domain)) { + cookie.push(`domain=${domain}`); + } + if (secure === true) { + cookie.push('secure'); + } + if (utils$1.isString(sameSite)) { + cookie.push(`SameSite=${sameSite}`); + } + + document.cookie = cookie.join('; '); + }, + + read(name) { + if (typeof document === 'undefined') return null; + const cookieString = document.cookie; + if (!cookieString) return null; + // Match name=value by splitting on the semicolon separator instead of building a + // RegExp from `name` — interpolating an unescaped string into a RegExp would let + // metacharacters (e.g. `.+?` in an attacker-influenced cookie name) cause ReDoS or + // match the wrong cookie. Browsers may serialize cookie pairs as either ";" or + // "; ", so ignore optional whitespace before each cookie name. + const cookies = cookieString.split(';'); + for (let i = 0; i < cookies.length; i++) { + const cookie = cookies[i].replace(/^\s+/, ''); + const eq = cookie.indexOf('='); + if (eq !== -1 && cookie.slice(0, eq) === name) { + return decodeCookieValue(cookie.slice(eq + 1)); + } + } + return null; + }, + + async readAsync(name) { + try { + const store = typeof window !== 'undefined' && window.cookieStore; + if (store && utils$1.isFunction(store.get)) { + const cookie = await store.get(name); + // Both APIs expose stored bytes; preserve Axios's existing URI decoding. + return cookie ? decodeCookieValue(cookie.value) : null; + } + } catch (e) { + // Restricted or unavailable storage retains the synchronous fallback. + } + + return this.read(name); + }, + + remove(name) { + this.write(name, '', Date.now() - 86400000, '/'); + }, + } + : // Non-standard browser env (web workers, react-native) lack needed support. + { + write() {}, + read() { + return null; + }, + async readAsync() { + return null; + }, + remove() {}, + }; + +/** + * Calculate data maxRate + * @param {Number} [samplesCount= 10] + * @param {Number} [min= 1000] + * @returns {Function} + */ +function speedometer(samplesCount, min) { + samplesCount = samplesCount || 10; + const bytes = new Array(samplesCount); + const timestamps = new Array(samplesCount); + let head = 0; + let tail = 0; + let firstSampleTS; + + min = min !== undefined ? min : 1000; + + return function push(chunkLength) { + const now = Date.now(); + + const startedAt = timestamps[tail]; + + if (!firstSampleTS) { + firstSampleTS = now; + } + + bytes[head] = chunkLength; + timestamps[head] = now; + + let i = tail; + let bytesCount = 0; + + while (i !== head) { + bytesCount += bytes[i++]; + i = i % samplesCount; + } + + head = (head + 1) % samplesCount; + + if (head === tail) { + tail = (tail + 1) % samplesCount; + } + + if (now - firstSampleTS < min) { + return; + } + + const passed = startedAt && now - startedAt; + + return passed ? Math.round((bytesCount * 1000) / passed) : undefined; + }; +} + +/** + * Throttle decorator + * @param {Function} fn + * @param {Number} freq + * @return {Array} + */ +function throttle(fn, freq) { + let timestamp = 0; + let threshold = 1000 / freq; + let lastArgs; + let timer; + + const invoke = (args, now = Date.now()) => { + timestamp = now; + lastArgs = null; + if (timer) { + clearTimeout(timer); + timer = null; + } + fn(...args); + }; + + const throttled = (...args) => { + const now = Date.now(); + const passed = now - timestamp; + if (passed >= threshold) { + invoke(args, now); + } else { + lastArgs = args; + if (!timer) { + timer = setTimeout(() => { + timer = null; + invoke(lastArgs); + }, threshold - passed); + } + } + }; + + const flush = () => lastArgs && invoke(lastArgs); + const flushWith = (...args) => invoke(args); + + return [throttled, flush, flushWith]; +} + +const progressEventReducer = (listener, isDownloadStream, freq = 3) => { + let bytesNotified = 0; + const _speedometer = speedometer(50, 250); + + return throttle((e) => { + if (!e || !utils$1.isNumber(e.loaded)) { + return; + } + const rawLoaded = e.loaded; + const total = e.lengthComputable ? e.total : undefined; + const loaded = Math.max(0, total != null ? Math.min(rawLoaded, total) : rawLoaded); + const progressBytes = Math.max(0, loaded - bytesNotified); + const rate = _speedometer(progressBytes); + + bytesNotified = Math.max(bytesNotified, loaded); + + const data = { + loaded, + total, + progress: total ? loaded / total : undefined, + bytes: progressBytes, + rate: rate ? rate : undefined, + estimated: rate && total ? (total - loaded) / rate : undefined, + event: e, + lengthComputable: total != null, + [isDownloadStream ? 'download' : 'upload']: true, + }; + + listener(data); + }, freq); +}; + +const progressEventDecorator = (total, throttled) => { + const lengthComputable = total != null; + + return [ + (loaded) => + throttled[0]({ + lengthComputable, + total, + loaded, + }), + throttled[1], + ]; +}; + +const asyncDecorator = + (fn, scheduler = utils$1.asap) => + (...args) => + scheduler(() => fn(...args)); + +var isURLSameOrigin = platform.hasStandardBrowserEnv + ? ((origin) => (url) => { + url = new URL(url, document.baseURI || platform.origin); + + return ( + origin.protocol === url.protocol && origin.host === url.host && origin.port === url.port + ); + })(new URL(platform.origin)) + : () => true; + +/** + * Determines whether the specified URL is absolute + * + * @param {string} url The URL to test + * + * @returns {boolean} True if the specified URL is absolute, otherwise false + */ +function isAbsoluteURL(url) { + // A URL is considered absolute if it begins with "://" or "//" (protocol-relative URL). + // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed + // by any combination of letters, digits, plus, period, or hyphen. + if (typeof url !== 'string') { + return false; + } + + return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url); +} + +/** + * Creates a new URL by combining the specified URLs + * + * @param {string} baseURL The base URL + * @param {string} relativeURL The relative URL + * + * @returns {string} The combined URL + */ +function combineURLs(baseURL, relativeURL) { + if (!relativeURL) { + return baseURL; + } + + let end = baseURL.length; + + while (end > 0 && baseURL.charCodeAt(end - 1) === 47) { + end--; + } + + return baseURL.slice(0, end) + '/' + relativeURL.replace(/^\/+/, ''); +} + +const malformedHttpProtocol = /^https?:(?!\/\/)/i; + +// Redact the parts of a URL that can carry secrets before it is embedded in an +// error message. AxiosError.toJSON() serializes `message` verbatim and errors +// are commonly logged, while the opt-in `config.redact` model only cleans +// config keys — it cannot reach the message. Redact only the genuinely +// sensitive substrings — userinfo (credentials), query parameter values and +// fragment contents — with the same REDACTED marker the config redaction uses, +// while keeping the scheme, host, path and parameter names so the offending +// request stays accurately identifiable. +function redactFragment(fragment) { + if (!fragment) { + return fragment; + } + + return fragment.replace(/(^|&)([^=&]*=)?[^&]+/g, (match, separator, parameterName = '') => { + return `${separator}${parameterName}${REDACTED}`; + }); +} + +function redactSensitiveURLParts(url) { + const redactedURL = url.replace(/^(https?:\/{0,2})[^/?#]*@/i, `$1${REDACTED}@`); + const fragmentIndex = redactedURL.indexOf('#'); + const urlWithoutFragment = + fragmentIndex === -1 ? redactedURL : redactedURL.slice(0, fragmentIndex); + const redactedURLWithoutFragment = urlWithoutFragment.replace( + /([?&][^=&#]*=)[^&#]*/g, + `$1${REDACTED}` + ); + + if (fragmentIndex === -1) { + return redactedURLWithoutFragment; + } + + return `${redactedURLWithoutFragment}#${redactFragment(redactedURL.slice(fragmentIndex + 1))}`; +} + +function assertValidHttpProtocolURL(url, config) { + if (typeof url === 'string') { + const normalizedURL = normalizeURLForProtocolCheck(url); + if (malformedHttpProtocol.test(normalizedURL)) { + throw new AxiosError$1( + `Invalid URL ${JSON.stringify(redactSensitiveURLParts(normalizedURL))}: missing "//" after protocol`, + AxiosError$1.ERR_INVALID_URL, + config + ); + } + } +} + +/** + * Creates a new URL by combining the baseURL with the requestedURL, + * only when the requestedURL is not already an absolute URL. + * If the requestURL is absolute, this function returns the requestedURL untouched. + * + * @param {string} baseURL The base URL + * @param {string} requestedURL Absolute or relative URL to combine + * + * @returns {string} The combined full path + */ +function buildFullPath(baseURL, requestedURL, allowAbsoluteUrls, config) { + assertValidHttpProtocolURL(requestedURL, config); + let isRelativeUrl = !isAbsoluteURL(requestedURL); + if (baseURL && (isRelativeUrl || allowAbsoluteUrls === false)) { + assertValidHttpProtocolURL(baseURL, config); + return combineURLs(baseURL, requestedURL); + } + return requestedURL; +} + +function assertParamsAcyclic(params) { + const pending = [{ value: params }]; + const active = new WeakSet(); + const visited = new WeakSet(); + + while (pending.length) { + const { value, done } = pending.pop(); + if (!utils$1.isPlainObject(value) && !utils$1.isArray(value)) continue; + if (done) { + active.delete(value); + continue; + } + if (active.has(value)) { + throw new AxiosError$1( + 'Circular reference detected in params', + AxiosError$1.ERR_BAD_OPTION_VALUE + ); + } + if (visited.has(value)) continue; + visited.add(value); + active.add(value); + pending.push({ value, done: true }); + + const keys = Object.keys(value); + if (Object.getOwnPropertySymbols && Object.getOwnPropertyDescriptor) { + Object.getOwnPropertySymbols(value).forEach((key) => { + const descriptor = Object.getOwnPropertyDescriptor(value, key); + if (descriptor && descriptor.enumerable) keys.push(key); + }); + } + // Shallow array elements retain fields filtered during plain-object merges. + // Inspect reserved data properties without evaluating their accessors. + keys.forEach((key) => { + if (key === '__proto__' || key === 'constructor' || key === 'prototype') { + const descriptor = Object.getOwnPropertyDescriptor(value, key); + if (descriptor && utils$1.hasOwnProp(descriptor, 'value')) { + pending.push({ value: descriptor.value }); + } + } else { + pending.push({ value: value[key] }); + } + }); + } +} + +const headersToObject = (thing) => (thing instanceof AxiosHeaders$1 ? { ...thing } : thing); + +const ownEnumerableKeys = (thing) => { + if (Object.getOwnPropertySymbols && Object.getOwnPropertyDescriptor) { + return Object.keys(thing).concat( + Object.getOwnPropertySymbols(thing).filter((symbol) => { + const descriptor = Object.getOwnPropertyDescriptor(thing, symbol); + return descriptor && descriptor.enumerable; + }) + ); + } + return Object.keys(thing); +}; + +// Copy params without recursive merges so the serializer remains responsible +// for its depth policy. Only visit defaults that contribute to the result. +function mergeParams(a, b) { + const pending = []; + const copies = new WeakMap(); + const empty = {}; + + function copy(target, source) { + if (!utils$1.isPlainObject(source)) { + return utils$1.isArray(source) ? source.slice() : source; + } + + const base = utils$1.isPlainObject(target) ? target : empty; + let bases = copies.get(source); + if (!bases) { + bases = new WeakMap(); + copies.set(source, bases); + } + if (bases.has(base)) return bases.get(base); + + const result = {}; + bases.set(base, result); + pending.push({ base, source, result }); + return result; + } + + const result = utils$1.isUndefined(b) ? copy(undefined, a) : copy(a, b); + while (pending.length) { + const { base, source, result: target } = pending.pop(); + const baseKeys = new Set(ownEnumerableKeys(base)); + const sourceKeys = new Set(ownEnumerableKeys(source)); + const keys = new Set([...baseKeys, ...sourceKeys]); + + keys.forEach((key) => { + if (key === '__proto__' || key === 'constructor' || key === 'prototype') return; + const hasSource = sourceKeys.has(key); + const value = hasSource ? source[key] : undefined; + const previous = + (!hasSource || utils$1.isPlainObject(value)) && baseKeys.has(key) ? base[key] : undefined; + target[key] = hasSource ? copy(previous, value) : copy(undefined, previous); + }); + } + + assertParamsAcyclic(result); + return result; +} + +function getMergedValue(target, source, prop, caseless) { + if (utils$1.isPlainObject(target) && utils$1.isPlainObject(source)) { + return utils$1.merge.call({ caseless }, target, source); + } else if (utils$1.isPlainObject(source)) { + return utils$1.merge({}, source); + } else if (utils$1.isArray(source)) { + return source.slice(); + } + return source; +} + +function mergeDeepProperties(a, b, prop, caseless) { + if (!utils$1.isUndefined(b)) { + return getMergedValue(a, b, prop, caseless); + } else if (!utils$1.isUndefined(a)) { + return getMergedValue(undefined, a, prop, caseless); + } +} + +// eslint-disable-next-line consistent-return +function valueFromConfig2(a, b) { + if (!utils$1.isUndefined(b)) { + return getMergedValue(undefined, b); + } +} + +// eslint-disable-next-line consistent-return +function defaultToConfig2(a, b) { + if (!utils$1.isUndefined(b)) { + return getMergedValue(undefined, b); + } else if (!utils$1.isUndefined(a)) { + return getMergedValue(undefined, a); + } +} + +function getMergedTransitionalOption(config1, config2, prop) { + const transitional2 = utils$1.hasOwnProp(config2, 'transitional') + ? config2.transitional + : undefined; + + if (!utils$1.isUndefined(transitional2)) { + if (utils$1.isPlainObject(transitional2)) { + if (utils$1.hasOwnProp(transitional2, prop)) { + return transitional2[prop]; + } + } else { + return undefined; + } + } + + const transitional1 = utils$1.hasOwnProp(config1, 'transitional') + ? config1.transitional + : undefined; + + if (utils$1.isPlainObject(transitional1) && utils$1.hasOwnProp(transitional1, prop)) { + return transitional1[prop]; + } + + return undefined; +} + +// eslint-disable-next-line consistent-return +function mergeDirectKeys(a, b, prop, config1, config2) { + if (utils$1.hasOwnProp(config2, prop)) { + return getMergedValue(a, b); + } else if (utils$1.hasOwnProp(config1, prop)) { + return getMergedValue(undefined, a); + } +} + +function mergeHeaders(a, b, prop) { + return mergeDeepProperties(headersToObject(a), headersToObject(b), prop, true); +} + +// Null-proto, frozen descriptor so a polluted Object.prototype.get cannot turn +// this data descriptor into an accessor descriptor on the way in. +// defineProperty only reads it, so one shared instance serves every call. +const hasOwnPropertyDescriptor = Object.freeze({ + __proto__: null, + value: Object.prototype.hasOwnProperty, + enumerable: false, + writable: true, + configurable: true, +}); + +// The strategy table and the strategies above are stateless, so they are +// built once at module load instead of on every call: mergeConfig runs at +// most twice per request (once from a method alias, once from `_request`). +const mergeMap = { + url: valueFromConfig2, + method: valueFromConfig2, + data: valueFromConfig2, + baseURL: defaultToConfig2, + transformRequest: defaultToConfig2, + transformResponse: defaultToConfig2, + params: mergeParams, + paramsSerializer: defaultToConfig2, + timeout: defaultToConfig2, + timeoutErrorMessage: defaultToConfig2, + withCredentials: defaultToConfig2, + withXSRFToken: defaultToConfig2, + adapter: defaultToConfig2, + responseType: defaultToConfig2, + xsrfCookieName: defaultToConfig2, + xsrfHeaderName: defaultToConfig2, + onUploadProgress: defaultToConfig2, + onDownloadProgress: defaultToConfig2, + decompress: defaultToConfig2, + maxContentLength: defaultToConfig2, + maxBodyLength: defaultToConfig2, + beforeRedirect: defaultToConfig2, + transport: defaultToConfig2, + httpAgent: defaultToConfig2, + httpsAgent: defaultToConfig2, + cancelToken: defaultToConfig2, + socketPath: defaultToConfig2, + allowedSocketPaths: defaultToConfig2, + responseEncoding: defaultToConfig2, + validateStatus: mergeDirectKeys, + headers: mergeHeaders, +}; + +/** + * Config-specific merge-function which creates a new config-object + * by merging two configuration objects together. + * + * @param {Object} config1 + * @param {Object} config2 + * + * @returns {Object} New object resulting from merging config2 to config1 + */ +function mergeConfig$1(config1, config2) { + // eslint-disable-next-line no-param-reassign + config1 = config1 || {}; + config2 = config2 || {}; + + // Use a null-prototype object so that downstream reads such as `config.auth` + // or `config.baseURL` cannot inherit polluted values from Object.prototype. + // `hasOwnProperty` is restored as a non-enumerable own slot to preserve + // ergonomics for user code that relies on it. + const config = Object.create(null); + Object.defineProperty(config, 'hasOwnProperty', hasOwnPropertyDescriptor); + + const keys = ownEnumerableKeys({ ...config1, ...config2 }); + + for (let i = 0, len = keys.length; i < len; i++) { + const prop = keys[i]; + if (prop === '__proto__' || prop === 'constructor' || prop === 'prototype') continue; + const merge = utils$1.hasOwnProp(mergeMap, prop) ? mergeMap[prop] : mergeDeepProperties; + const a = utils$1.hasOwnProp(config1, prop) ? config1[prop] : undefined; + const b = utils$1.hasOwnProp(config2, prop) ? config2[prop] : undefined; + const configValue = + merge === mergeDirectKeys ? merge(a, b, prop, config1, config2) : merge(a, b, prop); + (utils$1.isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue); + } + + if ( + utils$1.hasOwnProp(config2, 'validateStatus') && + utils$1.isUndefined(config2.validateStatus) && + getMergedTransitionalOption(config1, config2, 'validateStatusUndefinedResolves') === false + ) { + if (utils$1.hasOwnProp(config1, 'validateStatus')) { + config.validateStatus = getMergedValue(undefined, config1.validateStatus); + } else { + delete config.validateStatus; + } + } + + return config; +} + +const FORM_DATA_CONTENT_HEADERS = ['content-type', 'content-length']; + +/** + * Apply the headers generated by a FormData implementation to the request headers, + * honoring the `formDataHeaderPolicy` option: with 'content-only', copy only the + * content-* headers; otherwise merge all of them. + * + * @param {AxiosHeaders} headers - the request headers to mutate + * @param {Object | null | undefined} formHeaders - headers produced by the FormData implementation + * @param {String} [policy] - the resolved `formDataHeaderPolicy` config value + * + * @returns {void} + */ +function setFormDataHeaders(headers, formHeaders, policy) { + if (policy !== 'content-only') { + headers.set(formHeaders); + return; + } + + Object.entries(formHeaders || {}).forEach(([key, val]) => { + if (FORM_DATA_CONTENT_HEADERS.includes(key.toLowerCase())) { + headers.set(key, val); + } + }); +} + +/** + * Encode a UTF-8 string to a Latin-1 byte string for use with btoa(). + * This is a modern replacement for the deprecated unescape(encodeURIComponent(str)) pattern. + * + * @param {string} str The string to encode + * + * @returns {string} UTF-8 bytes as a Latin-1 string + */ +const encodeUTF8$1 = (str) => + encodeURIComponent(str).replace(/%([0-9A-F]{2})/gi, (_, hex) => + String.fromCharCode(parseInt(hex, 16)) + ); + +const readCookie = (name) => cookies.read(name); + +function resolveConfig(config, readXsrfCookie = readCookie) { + const newConfig = mergeConfig$1({}, config); + + // Read only own properties to prevent prototype pollution gadgets + // (e.g. Object.prototype.baseURL = 'https://evil.com'). + const own = (key) => (utils$1.hasOwnProp(newConfig, key) ? newConfig[key] : undefined); + + const data = own('data'); + let withXSRFToken = own('withXSRFToken'); + const xsrfHeaderName = own('xsrfHeaderName'); + const xsrfCookieName = own('xsrfCookieName'); + let headers = own('headers'); + const auth = own('auth'); + const baseURL = own('baseURL'); + const allowAbsoluteUrls = own('allowAbsoluteUrls'); + const url = own('url'); + + newConfig.headers = headers = AxiosHeaders$1.from(headers); + + newConfig.url = buildURL( + buildFullPath(baseURL, url, allowAbsoluteUrls, newConfig), + own('params'), + own('paramsSerializer') + ); + + // HTTP basic authentication + if (auth) { + const username = utils$1.getSafeProp(auth, 'username') || ''; + const password = utils$1.getSafeProp(auth, 'password') || ''; + const transitional = own('transitional'); + const encodeUsername = + transitional && + utils$1.hasOwnProp(transitional, 'encodeBasicAuthUsername') && + transitional.encodeBasicAuthUsername === true; + + try { + headers.set( + 'Authorization', + // Preserve legacy username bytes unless the caller opts in to UTF-8. + 'Basic ' + + btoa( + (encodeUsername ? encodeUTF8$1(username) : username) + + ':' + + (password ? encodeUTF8$1(password) : '') + ) + ); + } catch (e) { + throw AxiosError$1.from(e, AxiosError$1.ERR_BAD_OPTION_VALUE, config); + } + } + + if (utils$1.isFormData(data)) { + const getHeaders = utils$1.getSafeProp(data, 'getHeaders'); + + if ( + platform.hasStandardBrowserEnv || + platform.hasStandardBrowserWebWorkerEnv || + utils$1.isReactNative(data) + ) { + headers.setContentType(undefined); // browser/web worker/RN handles it + } else if (utils$1.isFunction(getHeaders)) { + // Node.js FormData (like form-data package) + setFormDataHeaders(headers, getHeaders.call(data), own('formDataHeaderPolicy')); + } + } + + // Add xsrf header + // This is only done if running in a standard browser environment. + // Specifically not if we're in a web worker, or react-native. + + if (platform.hasStandardBrowserEnv) { + if (utils$1.isFunction(withXSRFToken)) { + withXSRFToken = withXSRFToken(newConfig); + } + + // Strict boolean check — prevents proto-pollution gadgets (e.g. Object.prototype.withXSRFToken = 1) + // and misconfigurations (e.g. "false") from short-circuiting the same-origin check and leaking + // the XSRF token cross-origin. + const shouldSendXSRF = + withXSRFToken === true || (withXSRFToken == null && isURLSameOrigin(newConfig.url)); + + if (shouldSendXSRF) { + const xsrfValue = xsrfHeaderName && xsrfCookieName && readXsrfCookie(xsrfCookieName); + + if (xsrfValue) { + headers.set(xsrfHeaderName, xsrfValue); + } + } + } + + return newConfig; +} + +const isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined'; + +var xhrAdapter = isXHRAdapterSupported && + function (config) { + return new Promise(function dispatchXhrRequest(resolve, reject) { + let useAsyncXsrf; + try { + const store = + platform.hasStandardBrowserEnv && typeof window !== 'undefined' && window.cookieStore; + useAsyncXsrf = store && utils$1.isFunction(store.get); + } catch (e) { + // A restricted Cookie Store getter must retain the synchronous fallback. + } + let xsrfCookieName; + const _config = resolveConfig( + config, + useAsyncXsrf + ? (name) => { + xsrfCookieName = name; + return null; + } + : undefined + ); + let requestData = _config.data; + const requestHeaders = AxiosHeaders$1.from(_config.headers).normalize(); + let { responseType, onUploadProgress, onDownloadProgress } = _config; + let onCanceled; + let timeoutId; + let uploadThrottled, downloadThrottled; + let flushUpload, flushDownload, flushDownloadWithEvent; + + function done() { + clearTimeout(timeoutId); + // A final progress callback must not prevent the remaining cleanup. + // Report errors asynchronously, as onloadend and the throttle timer do. + try { + flushUpload && flushUpload(); // flush events + } catch (err) { + setTimeout(() => { + throw err; + }); + } + try { + flushDownload && flushDownload(); // flush events + } catch (err) { + setTimeout(() => { + throw err; + }); + } + + // A flush can synchronously cancel the request and reenter done(). + // In that case the inner call has already detached these listeners. + if (request) { + downloadThrottled && request.removeEventListener('progress', downloadThrottled); + if (request.upload) { + uploadThrottled && request.upload.removeEventListener('progress', uploadThrottled); + flushUpload && request.upload.removeEventListener('loadend', flushUpload); + } + } + + _config.cancelToken && _config.cancelToken.unsubscribe(onCanceled); + + _config.signal && _config.signal.removeEventListener('abort', onCanceled); + } + + let request = new XMLHttpRequest(); + + request.open(_config.method.toUpperCase(), _config.url, true); + + // Set the request timeout in MS + request.timeout = _config.timeout; + + function onloadend(event) { + if (!request) { + return; + } + + // Status 0 means no response was received, which onerror and onabort normally + // reject before this runs. Firefox 152 fires only readystatechange and loadend for + // navigation-canceled requests (https://bugzilla.mozilla.org/show_bug.cgi?id=1505389), + // leaving settle() to resolve them as an empty success. ECONNABORTED is the error + // onabort raised on Firefox 151. Reads over file:, which some environments report as + // status 0 on success, are excluded by the request URL's scheme after browser-style + // preprocessing, by the page origin's scheme for relative URLs (which inherit it), or + // by responseURL where implemented. + if ( + request.status === 0 && + (parseProtocol(normalizeURLForProtocolCheck(_config.url)) || + parseProtocol(platform.origin)) !== 'file' && + !(request.responseURL && request.responseURL.startsWith('file:')) + ) { + reject(new AxiosError$1('Request aborted', AxiosError$1.ECONNABORTED, config, request)); + done(); + + // Clean up request + request = null; + return; + } + + // When loadend is still dispatching, flushing with it gives progress + // listeners a final delivery whose event has a live target. The legacy + // ready-state fallback has no event, so replay its pending progress. + // A throwing listener must not block settlement; rethrow asynchronously, + // matching how listener errors surface on the throttle timer path. + try { + if (event) { + flushDownloadWithEvent && flushDownloadWithEvent(event); + } else { + flushDownload && flushDownload(); + } + } catch (err) { + setTimeout(() => { + throw err; + }); + } + + // A final progress callback can cancel the request synchronously. + if (!request) { + return; + } + + // Prepare the response + const responseHeaders = AxiosHeaders$1.from( + 'getAllResponseHeaders' in request && request.getAllResponseHeaders() + ); + const responseData = + !responseType || responseType === 'text' || responseType === 'json' + ? request.responseText + : request.response; + const response = { + data: responseData, + status: request.status, + statusText: request.statusText, + headers: responseHeaders, + config, + request, + }; + + settle( + function _resolve(value) { + resolve(value); + done(); + }, + function _reject(err) { + reject(err); + done(); + }, + response + ); + + // Clean up request + request = null; + } + + if ('onloadend' in request) { + // Use onloadend if available + request.onloadend = onloadend; + } else { + // Listen for ready state to emulate onloadend + request.onreadystatechange = function handleLoad() { + if (!request || request.readyState !== 4) { + return; + } + + // The request errored out and we didn't get a response, this will be + // handled by onerror instead + // With one exception: request that using file: protocol, most browsers + // will return status as 0 even though it's a successful request + if ( + request.status === 0 && + !(request.responseURL && request.responseURL.startsWith('file:')) + ) { + return; + } + // readystate handler is calling before onerror or ontimeout handlers, + // so we should call onloadend on the next 'tick' + setTimeout(onloadend); + }; + } + + // Handle browser request cancellation (as opposed to a manual cancellation) + request.onabort = function handleAbort() { + if (!request) { + return; + } + + reject(new AxiosError$1('Request aborted', AxiosError$1.ECONNABORTED, config, request)); + done(); + + // Clean up request + request = null; + }; + + // Handle low level network errors + request.onerror = function handleError(event) { + // Browsers deliver a ProgressEvent in XHR onerror + // (message may be empty; when present, surface it) + // See https://developer.mozilla.org/docs/Web/API/XMLHttpRequest/error_event + const msg = event && event.message ? event.message : 'Network Error'; + const err = new AxiosError$1(msg, AxiosError$1.ERR_NETWORK, config, request); + // attach the underlying event for consumers who want details + err.event = event || null; + reject(err); + done(); + request = null; + }; + + // Handle timeout + request.ontimeout = function handleTimeout() { + if (!request) return; + let timeoutErrorMessage = _config.timeout + ? 'timeout of ' + _config.timeout + 'ms exceeded' + : 'timeout exceeded'; + const transitional = _config.transitional || transitionalDefaults; + if (_config.timeoutErrorMessage) { + timeoutErrorMessage = _config.timeoutErrorMessage; + } + reject( + new AxiosError$1( + timeoutErrorMessage, + transitional.clarifyTimeoutError ? AxiosError$1.ETIMEDOUT : AxiosError$1.ECONNABORTED, + config, + request + ) + ); + done(); + + // Clean up request + request = null; + }; + + // Remove Content-Type if data is undefined + requestData === undefined && requestHeaders.setContentType(null); + + // Add withCredentials to request if needed + if (!utils$1.isUndefined(_config.withCredentials)) { + request.withCredentials = !!_config.withCredentials; + } + + // Add responseType to request if needed + if (responseType && responseType !== 'json') { + request.responseType = _config.responseType; + } + + // Handle progress if needed + if (onDownloadProgress) { + [downloadThrottled, flushDownload, flushDownloadWithEvent] = progressEventReducer( + onDownloadProgress, + true + ); + request.addEventListener('progress', downloadThrottled); + } + + // Not all browsers support upload events + if (onUploadProgress && request.upload) { + [uploadThrottled, flushUpload] = progressEventReducer(onUploadProgress); + + request.upload.addEventListener('progress', uploadThrottled); + + request.upload.addEventListener('loadend', flushUpload); + } + + if (_config.cancelToken || _config.signal) { + // Handle cancellation + // eslint-disable-next-line func-names + onCanceled = (cancel) => { + if (!request) { + return; + } + reject(!cancel || cancel.type ? new CanceledError$1(null, config, request) : cancel); + const xhr = request; + done(); + request = null; + xhr.abort(); + }; + + _config.cancelToken && _config.cancelToken.subscribe(onCanceled); + if (!request) return; + if (_config.signal) { + _config.signal.aborted + ? onCanceled() + : _config.signal.addEventListener('abort', onCanceled); + } + } + + if (!request) return; + + const protocol = parseProtocol(_config.url); + + if (protocol && !platform.protocols.includes(protocol)) { + reject( + new AxiosError$1( + 'Unsupported protocol ' + protocol + ':', + AxiosError$1.ERR_BAD_REQUEST, + config + ) + ); + done(); + return; + } + + const sendRequest = () => { + if (!request) return; + // Apply headers after an asynchronous XSRF read so existing headers are + // replaced through AxiosHeaders rather than appended by the native XHR. + if ('setRequestHeader' in request) { + utils$1.forEach( + toByteStringHeaderObject(requestHeaders), + function setRequestHeader(val, key) { + request.setRequestHeader(key, val); + } + ); + } + request.send(requestData || null); + }; + + if (xsrfCookieName) { + // Native XHR timeout starts at send(). Cover cookie preparation and the + // subsequent request with the same budget and existing timeout handler. + const now = + typeof performance !== 'undefined' && utils$1.isFunction(performance.now) + ? () => performance.now() + : Date.now; + const deadline = request.timeout > 0 ? now() + Number(request.timeout) : undefined; + const abortOnTimeout = () => { + if (!request) return; + const xhr = request; + xhr.ontimeout(); + xhr.abort(); + }; + if (deadline !== undefined) { + const scheduleTimeout = () => { + const remaining = deadline - now(); + if (remaining > 0) { + // Browser timers overflow above the signed 32-bit delay limit. + timeoutId = setTimeout(scheduleTimeout, Math.min(remaining, 0x7fffffff)); + } else { + abortOnTimeout(); + } + }; + scheduleTimeout(); + } + + cookies + .readAsync(xsrfCookieName) + .then((value) => { + if (!request) return; + // Promise callbacks may run before an overdue timer after a busy task. + if (deadline !== undefined && now() >= deadline) { + abortOnTimeout(); + return; + } + if (value) { + const headerName = + utils$1.hasOwnProp(_config, 'xsrfHeaderName') && _config.xsrfHeaderName; + requestHeaders.set(headerName, value); + } + sendRequest(); + }) + .catch((error) => { + if (!request) return; + reject(AxiosError$1.from(error, null, config, request)); + done(); + request = null; + }); + } else { + sendRequest(); + } + }); + }; + +const composeSignals = (signals, timeout) => { + signals = signals ? signals.filter(Boolean) : []; + + if (!timeout && !signals.length) { + return; + } + + const controller = new AbortController(); + + let aborted = false; + + const onabort = function (reason) { + if (!aborted) { + aborted = true; + unsubscribe(); + const err = reason instanceof Error ? reason : this.reason; + controller.abort( + err instanceof AxiosError$1 + ? err + : new CanceledError$1(err instanceof Error ? err.message : err) + ); + } + }; + + let timer = + timeout && + setTimeout(() => { + timer = null; + onabort(new AxiosError$1(`timeout of ${timeout}ms exceeded`, AxiosError$1.ETIMEDOUT)); + }, timeout); + + const unsubscribe = () => { + if (!signals) { + return; + } + timer && clearTimeout(timer); + timer = null; + signals.forEach((signal) => { + const unsubscribeSignal = utils$1.getSafeProp(signal, 'unsubscribe'); + utils$1.isFunction(unsubscribeSignal) + ? unsubscribeSignal.call(signal, onabort) + : signal.removeEventListener('abort', onabort); + }); + signals = null; + }; + + signals.forEach((signal) => { + if (aborted) { + return; + } + + if (signal.aborted) { + onabort.call(signal); + return; + } + + signal.addEventListener('abort', onabort, { once: true }); + }); + + const { signal } = controller; + + signal.unsubscribe = () => utils$1.asap(unsubscribe); + + return signal; +}; + +const streamChunk = function* (chunk, chunkSize) { + let len = chunk.byteLength; + + if (len < chunkSize) { + yield chunk; + return; + } + + let pos = 0; + let end; + + while (pos < len) { + end = pos + chunkSize; + yield chunk.slice(pos, end); + pos = end; + } +}; + +const readBytes = async function* (iterable, chunkSize) { + for await (const chunk of readStream(iterable)) { + yield* streamChunk(chunk, chunkSize); + } +}; + +const readStream = async function* (stream) { + if (stream[Symbol.asyncIterator]) { + yield* stream; + return; + } + + const reader = stream.getReader(); + try { + for (;;) { + const { done, value } = await reader.read(); + if (done) { + break; + } + yield value; + } + } finally { + await reader.cancel(); + } +}; + +const trackStream = (stream, chunkSize, onProgress, onFinish) => { + const iterator = readBytes(stream, chunkSize); + + let bytes = 0; + let done; + let _onFinish = (e) => { + if (!done) { + done = true; + onFinish && onFinish(e); + } + }; + + return new ReadableStream( + { + async pull(controller) { + try { + const { done, value } = await iterator.next(); + + if (done) { + _onFinish(); + controller.close(); + return; + } + + let len = value.byteLength; + if (onProgress) { + let loadedBytes = (bytes += len); + onProgress(loadedBytes); + } + controller.enqueue(new Uint8Array(value)); + } catch (err) { + _onFinish(err); + throw err; + } + }, + cancel(reason) { + _onFinish(reason); + return iterator.return(); + }, + }, + { + highWaterMark: 2, + } + ); +}; + +const CRLF = '\r\n'; +const normalizeLines = (value) => String(value).replace(/\r\n|\r|\n/g, CRLF); +const escapeName = (value) => + String(value).replace(/[\r\n"]/g, (char) => + char === '\r' ? '%0D' : char === '\n' ? '%0A' : '%22' + ); + +// Count UTF-8 bytes without allocating an encoded copy of a field. FormData +// string values normalize line endings; Blob/File contents remain unchanged. +const stringBytes = (value, normalize) => { + let length = 0; + for (let i = 0; i < value.length; i++) { + const code = value.charCodeAt(i); + if (normalize && (code === 13 || code === 10)) { + if (code === 13 && value.charCodeAt(i + 1) === 10) i++; + length += 2; + } else if (code < 0x80) { + length++; + } else if (code < 0x800) { + length += 2; + } else if ( + code >= 0xd800 && + code <= 0xdbff && + value.charCodeAt(i + 1) >= 0xdc00 && + value.charCodeAt(i + 1) <= 0xdfff + ) { + length += 4; + i++; + } else { + length += 3; + } + } + return length; +}; + +// Describe serialization failures independently of any request library. +class FormDataError extends TypeError { + constructor(message, reason) { + super(message); + this.name = 'FormDataError'; + this.reason = reason; + } +} + +// The caller supplies the boundary, Blob implementation, and limit error. +function formDataToBlob(form, Blob, limit, limitError, boundary) { + if (!utils$1.isFunction(Blob)) { + throw new FormDataError('Blob is not supported', 'blob'); + } + + if ( + !utils$1.isString(boundary) || + !/^[A-Za-z0-9'()+_,./:=? -]{1,70}$/.test(boundary) || + / $/.test(boundary) + ) { + throw new FormDataError('Invalid multipart boundary', 'boundary'); + } + const footer = '--' + boundary + '--' + CRLF; + let length = footer.length; + const parts = []; + const checkLength = (extra) => { + if (length + extra > limit) throw limitError(); + }; + checkLength(0); + + for (const [name, value] of form) { + const isString = utils$1.isString(value); + const valueLength = isString ? stringBytes(value, true) : value.size; + if (!Number.isFinite(valueLength) || valueLength < 0) { + throw new FormDataError('Unsupported FormData part size', 'part'); + } + // Reject large values and names before building normalized header strings. + checkLength( + valueLength + + stringBytes(name, true) + + (!isString && value.name ? stringBytes(value.name, false) : 0) + + (!isString && value.type ? stringBytes(value.type, false) : 0) + ); + + let header = + '--' + + boundary + + CRLF + + 'Content-Disposition: form-data; name="' + + escapeName(normalizeLines(name)) + + '"'; + if (!isString) { + header += + '; filename="' + + escapeName(utils$1.isString(value.name) ? value.name : 'blob') + + '"' + + CRLF + + 'Content-Type: ' + + String(value.type || 'application/octet-stream').replace(/[\r\n]/g, ''); + } + header += CRLF + CRLF; + const partLength = stringBytes(header, false) + valueLength + CRLF.length; + checkLength(partLength); + length += partLength; + parts.push({ header, value, isString }); + } + + // Native Blob composition retains existing Blob/File data. No file is read + // and no complete multipart ArrayBuffer is created to determine its length. + const blobParts = []; + for (const part of parts) { + blobParts.push(part.header, part.isString ? normalizeLines(part.value) : part.value, CRLF); + } + blobParts.push(footer); + return new Blob(blobParts, { type: 'multipart/form-data; boundary=' + boundary }); +} + +function createMultipartBody(form, Blob, limit, limitError, boundary) { + // Report missing Blob support before trying to select a random source. + if (!utils$1.isFunction(Blob)) { + throw new AxiosError$1('Blob is not supported', AxiosError$1.ERR_NOT_SUPPORT); + } + + if (boundary === undefined) { + if (utils$1.isFunction(platform.generateString)) { + boundary = 'axios-' + platform.generateString(36, '0123456789abcdef'); + } else { + const crypto = utils$1.global.crypto; + if (!crypto || !utils$1.isFunction(crypto.getRandomValues)) { + throw new AxiosError$1('Random byte generation is not supported', AxiosError$1.ERR_NOT_SUPPORT); + } + const random = new Uint8Array(18); + crypto.getRandomValues(random); + boundary = + 'axios-' + Array.from(random, (value) => ('0' + value.toString(16)).slice(-2)).join(''); + } + } + + try { + return formDataToBlob(form, Blob, limit, limitError, boundary); + } catch (error) { + if (error instanceof FormDataError) { + const code = + error.reason === 'boundary' ? AxiosError$1.ERR_BAD_OPTION_VALUE : AxiosError$1.ERR_BAD_REQUEST; + throw new AxiosError$1(error.message, code); + } + throw error; + } +} + +/** + * Estimate data: URL byte lengths *without* allocating large buffers. + * - Fetch percent-decodes a base64 body before decoding it. + * - Node's Buffer.from(body, 'base64') sizes its backing allocation from the + * percent-decoded body, including ignored characters and content after padding. + * - Non-base64 data is percent-decoded and then encoded as UTF-8. + */ +const isHexDigit = (charCode) => + (charCode >= 48 && charCode <= 57) || + (charCode >= 65 && charCode <= 70) || + (charCode >= 97 && charCode <= 102); + +const isPercentEncodedByte = (str, i, len) => + i + 2 < len && isHexDigit(str.charCodeAt(i + 1)) && isHexDigit(str.charCodeAt(i + 2)); + +const hexValue = (charCode) => (charCode <= 57 ? charCode - 48 : (charCode & 0xdf) - 55); + +const isBase64Char = (charCode) => + (charCode >= 65 && charCode <= 90) || // A-Z + (charCode >= 97 && charCode <= 122) || // a-z + (charCode >= 48 && charCode <= 57) || // 0-9 + charCode === 43 || // + + charCode === 47 || // / + charCode === 45 || // - (base64url) + charCode === 95; // _ (base64url) + +const isBase64Whitespace = (charCode) => + charCode === 9 || charCode === 10 || charCode === 12 || charCode === 13 || charCode === 32; + +const base64Bytes = (significant) => { + const groups = Math.floor(significant / 4); + const remainder = significant % 4; + return groups * 3 + (remainder === 2 ? 1 : remainder === 3 ? 2 : 0); +}; + +// Buffer.byteLength(body, 'base64') uses the raw string length as an allocation +// upper bound even when Buffer.from later ignores characters or stops at '='. +const estimateBase64BufferAllocation = (body) => { + const len = body.length; + let padding = 0; + + if (len > 0 && body.charCodeAt(len - 1) === 61 /* '=' */) { + padding++; + + if (len > 1 && body.charCodeAt(len - 2) === 61 /* '=' */) { + padding++; + } + } + + return Math.floor(((len - padding) * 3) / 4); +}; + +const estimatePercentDecodedBase64Bytes = (body) => { + const len = body.length; + let significant = 0; + let padding = 0; + let invalid = false; + + for (let i = 0; i < len; i++) { + let code = body.charCodeAt(i); + + if (code === 37 /* '%' */ && isPercentEncodedByte(body, i, len)) { + code = hexValue(body.charCodeAt(i + 1)) * 16 + hexValue(body.charCodeAt(i + 2)); + i += 2; + } + + if (isBase64Whitespace(code)) { + continue; + } + + if (code === 61 /* '=' */) { + padding++; + continue; + } + + if (!isBase64Char(code) || padding > 0) { + invalid = true; + continue; + } + + significant++; + } + + // Fetch rejects malformed forgiving-base64 input. Returning the raw-size + // allocation bound keeps that invalid input from becoming a pre-check bypass. + if ( + invalid || + padding > 2 || + (padding > 0 && (significant + padding) % 4 !== 0) || + significant % 4 === 1 + ) { + return estimateBase64BufferAllocation(body); + } + + return base64Bytes(significant); +}; + +const estimateDataURLBytes = (url, estimateBase64, base64Pattern) => { + if (!url || typeof url !== 'string') return 0; + if (!/^data:/i.test(url)) return 0; + + const comma = url.indexOf(','); + if (comma < 0) return 0; + + const meta = url.slice(5, comma); + const body = url.slice(comma + 1); + const isBase64 = base64Pattern.test(meta); + + if (isBase64) { + return estimateBase64(body); + } + + // Compute UTF-8 byte length directly from UTF-16 code units without allocating + // a byte buffer (TextEncoder.encode would defeat the DoS guard on large bodies). + // Valid %XX triplets count as one decoded byte; this matches the bytes that + // decodeURIComponent(body) would produce before Buffer re-encodes the string. + let bytes = 0; + for (let i = 0, len = body.length; i < len; i++) { + const c = body.charCodeAt(i); + if (c === 37 /* '%' */ && isPercentEncodedByte(body, i, len)) { + bytes += 1; + i += 2; + } else if (c < 0x80) { + bytes += 1; + } else if (c < 0x800) { + bytes += 2; + } else if (c >= 0xd800 && c <= 0xdbff && i + 1 < len) { + const next = body.charCodeAt(i + 1); + if (next >= 0xdc00 && next <= 0xdfff) { + bytes += 4; + i++; + } else { + bytes += 3; + } + } else { + bytes += 3; + } + } + return bytes; +}; + +/** + * Estimate the percent-decoded payload size used by Fetch data: URLs. + * + * @param {string} url + * @returns {number} + */ +function estimateDataURLDecodedBytes(url) { + // Fetch removes URL fragments before processing a data: URL. + const fragmentIndex = typeof url === 'string' ? url.indexOf('#') : -1; + + return estimateDataURLBytes( + fragmentIndex === -1 ? url : url.slice(0, fragmentIndex), + estimatePercentDecodedBase64Bytes, + /; *base64[\t\n\f\r ]*$/i + ); +} + +const VERSION$1 = "1.21.1"; + +const DEFAULT_CHUNK_SIZE = 64 * 1024; + +const DEFAULT_REQUEST_OPTIONS = { + cache: 'default', + redirect: 'follow', + referrer: 'about:client', + referrerPolicy: '', + mode: 'cors', + integrity: '', + keepalive: false, + priority: 'auto', + window: null, +}; + +const { isFunction } = utils$1; + +/** + * Encode a UTF-8 string to a Latin-1 byte string for use with btoa(). + * This is a modern replacement for the deprecated unescape(encodeURIComponent(str)) pattern. + * + * @param {string} str The string to encode + * + * @returns {string} UTF-8 bytes as a Latin-1 string + */ +const encodeUTF8 = (str) => + encodeURIComponent(str).replace(/%([0-9A-F]{2})/gi, (_, hex) => + String.fromCharCode(parseInt(hex, 16)) + ); + +// Node's WHATWG URL parser returns `username` and `password` percent-encoded. +// Decode before composing the `auth` option so credentials such as +// `my%40email.com:pass` are sent as `my@email.com:pass`. Falls back to the +// original value for malformed input so a bad encoding never throws. +const decodeURIComponentSafe = (value) => { + if (!utils$1.isString(value)) { + return value; + } + + try { + return decodeURIComponent(value); + } catch (error) { + return value; + } +}; + +const test = (fn, ...args) => { + try { + return !!fn(...args); + } catch (e) { + return false; + } +}; + +const maybeWithAuthCredentials = (url) => { + const protocolIndex = url.indexOf('://'); + let urlToCheck = url; + if (protocolIndex !== -1) { + urlToCheck = urlToCheck.slice(protocolIndex + 3); + } + return urlToCheck.includes('@') || urlToCheck.includes(':'); +}; + +const factory = (env) => { + const globalObject = + utils$1.global !== undefined && utils$1.global !== null ? utils$1.global : globalThis; + const { ReadableStream, TextEncoder } = globalObject; + + env = utils$1.merge.call( + { + skipUndefined: true, + }, + { + Request: globalObject.Request, + Response: globalObject.Response, + Blob: globalObject.Blob, + }, + env + ); + + const envFetch = utils$1.hasOwnProp(env, 'fetch') ? env.fetch : undefined; + const { Request, Response, Blob } = env; + const isFetchSupported = envFetch ? isFunction(envFetch) : typeof fetch === 'function'; + const isRequestSupported = isFunction(Request); + const isResponseSupported = isFunction(Response); + + if (!isFetchSupported) { + return false; + } + + const isReadableStreamSupported = isFetchSupported && isFunction(ReadableStream); + + const encodeText = + isFetchSupported && + (typeof TextEncoder === 'function' + ? ( + (encoder) => (str) => + encoder.encode(str) + )(new TextEncoder()) + : async (str) => new Uint8Array(await new Request(str).arrayBuffer())); + + const supportsRequestStream = + isRequestSupported && + isReadableStreamSupported && + test(() => { + let duplexAccessed = false; + + const request = new Request(platform.origin, { + body: new ReadableStream(), + method: 'POST', + get duplex() { + duplexAccessed = true; + return 'half'; + }, + }); + + const hasContentType = request.headers.has('Content-Type'); + + if (request.body != null) { + request.body.cancel(); + } + + return duplexAccessed && !hasContentType; + }); + + const supportsResponseStream = + isResponseSupported && + isReadableStreamSupported && + test(() => utils$1.isReadableStream(new Response('').body)); + + // Some runtimes reject every explicit cache mode. Use own defaults for both + // probes so unrelated polluted options cannot affect cache-mode detection. + const requestDefaults = Object.assign(Object.create(null), DEFAULT_REQUEST_OPTIONS); + + if (isRequestSupported && !test(() => new Request(platform.origin, requestDefaults))) { + delete requestDefaults.cache; + + // Only omit cache when that makes Request construction succeed. Otherwise + // retain the explicit default that protects supporting runtimes from pollution. + if (!test(() => new Request(platform.origin, requestDefaults))) { + requestDefaults.cache = DEFAULT_REQUEST_OPTIONS.cache; + } + } + + const resolvers = { + stream: supportsResponseStream && ((res) => res.body), + }; + + isFetchSupported && + (() => { + ['text', 'arrayBuffer', 'blob', 'formData', 'stream'].forEach((type) => { + !resolvers[type] && + (resolvers[type] = (res, config) => { + let method = res && res[type]; + + if (method) { + return method.call(res); + } + + throw new AxiosError$1( + `Response type '${type}' is not supported`, + AxiosError$1.ERR_NOT_SUPPORT, + config + ); + }); + }); + })(); + + const getBodyLength = async (body) => { + if (body == null) { + return 0; + } + + if (utils$1.isBlob(body)) { + return body.size; + } + + if (utils$1.isArrayBufferView(body) || utils$1.isArrayBuffer(body)) { + return body.byteLength; + } + + if (utils$1.isURLSearchParams(body)) { + body = body + ''; + } + + if (utils$1.isString(body)) { + return (await encodeText(body)).byteLength; + } + }; + + const resolveBodyLength = async (headers, body) => { + const length = utils$1.toFiniteNumber(headers.getContentLength()); + + return length == null ? getBodyLength(body) : length; + }; + + return async (config) => { + let { + url, + method, + data, + signal, + cancelToken, + timeout, + onDownloadProgress, + onUploadProgress, + responseType, + headers, + withCredentials = 'same-origin', + fetchOptions, + maxContentLength, + maxBodyLength, + maxRedirects, + } = resolveConfig(config); + + const hasMaxContentLength = utils$1.isNumber(maxContentLength) && maxContentLength > -1; + const hasMaxBodyLength = utils$1.isNumber(maxBodyLength) && maxBodyLength > -1; + const own = (key) => (utils$1.hasOwnProp(config, key) ? config[key] : undefined); + + let _fetch = envFetch || fetch; + + responseType = responseType ? (responseType + '').toLowerCase() : 'text'; + + let composedSignal = composeSignals( + [signal, cancelToken && cancelToken.toAbortSignal()], + timeout + ); + + let request = null; + + const unsubscribe = + composedSignal && + composedSignal.unsubscribe && + (() => { + composedSignal.unsubscribe(); + }); + + let requestContentLength; + + // AxiosErrors we raise while request or response bodies are being streamed. Captured + // by identity so the catch block can surface it directly, regardless of + // how the runtime wraps the resulting fetch rejection (undici exposes it + // as `err.cause`; some browsers drop the original error entirely). + let pendingBodyError = null; + let pendingResponseError = null; + + const maxBodyLengthError = () => + new AxiosError$1( + 'Request body larger than maxBodyLength limit', + AxiosError$1.ERR_BAD_REQUEST, + config, + request + ); + + try { + // HTTP basic authentication + let auth = undefined; + const configAuth = own('auth'); + + if (configAuth) { + const username = utils$1.getSafeProp(configAuth, 'username') || ''; + const password = utils$1.getSafeProp(configAuth, 'password') || ''; + auth = { + username, + password, + }; + } + + let parsedURL; + if (maybeWithAuthCredentials(url)) { + parsedURL = new URL(url, platform.origin); + + if (!auth && (parsedURL.username || parsedURL.password)) { + const urlUsername = decodeURIComponentSafe(parsedURL.username); + const urlPassword = decodeURIComponentSafe(parsedURL.password); + auth = { + username: urlUsername, + password: urlPassword, + }; + } + + if (parsedURL.username || parsedURL.password) { + parsedURL.username = ''; + parsedURL.password = ''; + url = parsedURL.href; + } + } + + if (auth) { + headers.delete('authorization'); + headers.set( + 'Authorization', + 'Basic ' + btoa(encodeUTF8((auth.username || '') + ':' + (auth.password || ''))) + ); + } + + // Enforce maxContentLength for data: URLs up-front so we never materialize + // an oversized payload. The HTTP adapter applies the same check (see http.js + // "if (protocol === 'data:')" branch). + if (hasMaxContentLength && parsedURL && parsedURL.protocol === 'data:') { + const estimated = estimateDataURLDecodedBytes(parsedURL.href); + if (estimated > maxContentLength) { + throw new AxiosError$1( + 'maxContentLength size of ' + maxContentLength + ' exceeded', + AxiosError$1.ERR_BAD_RESPONSE, + config, + request + ); + } + } + + const formContentType = + utils$1.isSpecCompliantForm(data) && AxiosHeaders$1.from(own('headers')).getContentType(); + let formBoundary; + if ( + utils$1.isString(formContentType) && + /^multipart\/form-data(?:\s*;|$)/i.test(formContentType.trim()) + ) { + const parameters = AxiosHeaders$1.parseParameters(formContentType); + if (utils$1.hasOwnProp(parameters, 'boundary')) formBoundary = parameters.boundary; + } + + if ( + utils$1.isSpecCompliantForm(data) && + method !== 'get' && + method !== 'head' && + (hasMaxBodyLength || + (onUploadProgress && supportsRequestStream) || + formBoundary !== undefined) + ) { + data = createMultipartBody( + data, + Blob, + hasMaxBodyLength ? maxBodyLength : Infinity, + maxBodyLengthError, + formBoundary + ); + // Blob.type lowercases its value, including a case-sensitive boundary. + // Retain the caller's header when an explicit boundary was serialized. + headers.setContentType(formBoundary === undefined ? data.type : formContentType); + requestContentLength = data.size; + } + + // Enforce maxBodyLength against known-size bodies before dispatch using + // the body's *actual* size — never a caller-declared Content-Length, + // which could under-report to slip an oversized body past the check. + // Unknown-size streams return undefined here and are counted per-chunk + // below as fetch consumes them. + if (hasMaxBodyLength && method !== 'get' && method !== 'head') { + const outboundLength = await getBodyLength(data); + if (typeof outboundLength === 'number' && isFinite(outboundLength)) { + requestContentLength = outboundLength; + if (outboundLength > maxBodyLength) { + throw maxBodyLengthError(); + } + } + } + + // A streamed body under maxBodyLength must be counted as fetch consumes + // it; its size is never trusted from a caller-declared Content-Length. + const mustEnforceStreamBody = + hasMaxBodyLength && (utils$1.isReadableStream(data) || utils$1.isStream(data)); + + const trackRequestStream = (stream, onProgress, flush) => + trackStream( + stream, + DEFAULT_CHUNK_SIZE, + (loadedBytes) => { + if (hasMaxBodyLength && loadedBytes > maxBodyLength) { + throw (pendingBodyError = maxBodyLengthError()); + } + onProgress && onProgress(loadedBytes); + }, + flush + ); + + if ( + supportsRequestStream && + method !== 'get' && + method !== 'head' && + (onUploadProgress || mustEnforceStreamBody) + ) { + requestContentLength = + requestContentLength == null + ? await resolveBodyLength(headers, data) + : requestContentLength; + + // A declared length of 0 is only trusted to skip the wrap when we are + // not enforcing a stream limit (which must not rely on that header). + if (requestContentLength !== 0 || mustEnforceStreamBody) { + let _request = new Request(url, { + method: 'POST', + body: data, + duplex: 'half', + }); + + let contentTypeHeader; + + if ( + utils$1.isFormData(data) && + (contentTypeHeader = _request.headers.get('content-type')) + ) { + headers.setContentType(contentTypeHeader); + } + + if (_request.body) { + const [onProgress, flush] = + (onUploadProgress && + progressEventDecorator( + requestContentLength, + progressEventReducer(asyncDecorator(onUploadProgress)) + )) || + []; + + data = trackRequestStream(_request.body, onProgress, flush); + } + } + } else if ( + mustEnforceStreamBody && + !isRequestSupported && + isReadableStreamSupported && + method !== 'get' && + method !== 'head' + ) { + data = trackRequestStream(data); + } else if ( + mustEnforceStreamBody && + isRequestSupported && + !supportsRequestStream && + method !== 'get' && + method !== 'head' + ) { + throw new AxiosError$1( + 'Stream request bodies are not supported by the current fetch implementation', + AxiosError$1.ERR_NOT_SUPPORT, + config, + request + ); + } + + if (!utils$1.isString(withCredentials)) { + withCredentials = withCredentials ? 'include' : 'omit'; + } + + // Cloudflare Workers throws when credentials are defined + // see https://github.com/cloudflare/workerd/issues/902 + const isCredentialsSupported = isRequestSupported && 'credentials' in Request.prototype; + + // If data is FormData and Content-Type is multipart/form-data without boundary, + // delete it so fetch can set it correctly with the boundary + if (utils$1.isFormData(data)) { + const contentType = headers.getContentType(); + if ( + contentType && + /^multipart\/form-data/i.test(contentType) && + !/boundary=/i.test(contentType) + ) { + headers.delete('content-type'); + } + } + + // Set User-Agent header if not already set (fetch defaults to 'node' in Node.js) + headers.set('User-Agent', 'axios/' + VERSION$1, false); + + const safeFetchOptions = + fetchOptions == null ? fetchOptions : Object.assign(Object.create(null), fetchOptions); + + if (safeFetchOptions) { + // These options are owned by Axios and are already reflected in the + // resolved Request passed to fetch. + delete safeFetchOptions.body; + delete safeFetchOptions.headers; + delete safeFetchOptions.method; + delete safeFetchOptions.signal; + delete safeFetchOptions.duplex; + delete safeFetchOptions.credentials; + } + + const resolvedOptions = Object.assign(Object.create(null), safeFetchOptions, { + signal: composedSignal, + method: method.toUpperCase(), + headers: toByteStringHeaderObject(headers.normalize()), + body: data, + duplex: 'half', + credentials: isCredentialsSupported ? withCredentials : undefined, + }); + + if (isRequestSupported) { + utils$1.forEach(requestDefaults, (value, key) => { + if (resolvedOptions[key] === undefined) { + resolvedOptions[key] = value; + } + }); + + if (resolvedOptions.signal === undefined) { + resolvedOptions.signal = null; + } + + if (resolvedOptions.body === undefined) { + resolvedOptions.body = null; + } + } + + if (maxRedirects === 0) { + resolvedOptions.redirect = 'manual'; + + if (safeFetchOptions) { + safeFetchOptions.redirect = 'manual'; + } + } + + request = isRequestSupported && new Request(url, resolvedOptions); + + let response = await (isRequestSupported + ? _fetch(request, safeFetchOptions) + : _fetch(url, resolvedOptions)); + + const responseHeaders = AxiosHeaders$1.from(response.headers); + + // Cheap pre-check: if the server honestly declares a content-length that + // already exceeds the cap, reject before we start streaming. + if (hasMaxContentLength) { + const declaredLength = utils$1.toFiniteNumber(responseHeaders.getContentLength()); + if (declaredLength != null && declaredLength > maxContentLength) { + throw new AxiosError$1( + 'maxContentLength size of ' + maxContentLength + ' exceeded', + AxiosError$1.ERR_BAD_RESPONSE, + config, + request + ); + } + } + + const isStreamResponse = + supportsResponseStream && (responseType === 'stream' || responseType === 'response'); + + if ( + supportsResponseStream && + response.body && + (onDownloadProgress || hasMaxContentLength || (isStreamResponse && unsubscribe)) + ) { + const options = {}; + + ['status', 'statusText', 'headers'].forEach((prop) => { + options[prop] = response[prop]; + }); + + const responseContentLength = utils$1.toFiniteNumber(responseHeaders.getContentLength()); + + const [onProgress, flush] = + (onDownloadProgress && + progressEventDecorator( + responseContentLength, + progressEventReducer(asyncDecorator(onDownloadProgress), true) + )) || + []; + + let bytesRead = 0; + const onChunkProgress = (loadedBytes) => { + if (hasMaxContentLength) { + bytesRead = loadedBytes; + if (bytesRead > maxContentLength) { + throw (pendingResponseError = new AxiosError$1( + 'maxContentLength size of ' + maxContentLength + ' exceeded', + AxiosError$1.ERR_BAD_RESPONSE, + config, + request + )); + } + } + onProgress && onProgress(loadedBytes); + }; + + response = new Response( + trackStream(response.body, DEFAULT_CHUNK_SIZE, onChunkProgress, () => { + flush && flush(); + unsubscribe && unsubscribe(); + }), + options + ); + } + + responseType = responseType || 'text'; + + let responseData = await resolvers[utils$1.findKey(resolvers, responseType) || 'text']( + response, + config + ); + + // Fallback enforcement for environments without ReadableStream support + // (legacy runtimes). Detect materialized size from typed output; skip + // streams/Response passthrough since the user will read those themselves. + if (hasMaxContentLength && !supportsResponseStream && !isStreamResponse) { + let materializedSize; + if (responseData != null) { + if (typeof responseData.byteLength === 'number') { + materializedSize = responseData.byteLength; + } else if (typeof responseData.size === 'number') { + materializedSize = responseData.size; + } else if (typeof responseData === 'string') { + materializedSize = + typeof TextEncoder === 'function' + ? new TextEncoder().encode(responseData).byteLength + : responseData.length; + } + } + if (typeof materializedSize === 'number' && materializedSize > maxContentLength) { + throw new AxiosError$1( + 'maxContentLength size of ' + maxContentLength + ' exceeded', + AxiosError$1.ERR_BAD_RESPONSE, + config, + request + ); + } + } + + !isStreamResponse && unsubscribe && unsubscribe(); + + return await new Promise((resolve, reject) => { + settle(resolve, reject, { + data: responseData, + headers: AxiosHeaders$1.from(response.headers), + status: response.status, + statusText: response.statusText, + config, + request, + }); + }); + } catch (err) { + unsubscribe && unsubscribe(); + + // Safari can surface fetch aborts as a DOMException-like object whose + // branded getters throw. Prefer our composed signal reason before reading + // the caught error, preserving timeout vs cancellation semantics. + if (composedSignal && composedSignal.aborted && composedSignal.reason instanceof AxiosError$1) { + const canceledError = composedSignal.reason; + canceledError.config = config; + request && (canceledError.request = request); + if (err !== canceledError) { + // Non-enumerable to match native Error `cause` semantics so loggers + // don't recurse into circular fetch internals (see #7205). + Object.defineProperty(canceledError, 'cause', { + __proto__: null, + value: err, + writable: true, + enumerable: false, + configurable: true, + }); + } + throw canceledError; + } + + // Surface a maxBodyLength violation we raised while the request body was + // being streamed. Keeping the original error (rather than reading + // `err.cause.isAxiosError`) keeps the error deterministic across runtimes + // and avoids both prototype-pollution reads and mis-attributing a foreign + // AxiosError that merely happened to land in `err.cause`. + if (pendingBodyError) { + request && !pendingBodyError.request && (pendingBodyError.request = request); + throw pendingBodyError; + } + + if (pendingResponseError) { + throw pendingResponseError; + } + + // Re-throw AxiosErrors we raised synchronously (data: URL / content-length + // pre-checks, response size enforcement) without re-wrapping them. + if (err instanceof AxiosError$1) { + request && !err.request && (err.request = request); + throw err; + } + + if (err && err.name === 'TypeError' && /Load failed|fetch/i.test(err.message)) { + const networkError = new AxiosError$1( + 'Network Error', + AxiosError$1.ERR_NETWORK, + config, + request, + err && err.response + ); + // Non-enumerable to match native Error `cause` semantics so loggers + // don't recurse into circular fetch internals (see #7205). + Object.defineProperty(networkError, 'cause', { + __proto__: null, + value: err.cause || err, + writable: true, + enumerable: false, + configurable: true, + }); + throw networkError; + } + + throw AxiosError$1.from(err, err && err.code, config, request, err && err.response); + } + }; +}; + +const seedCache = new Map(); + +const getFetch = (config) => { + const env = Object.create(null); + const configuredEnv = config && utils$1.hasOwnProp(config, 'env') && config.env; + ['fetch', 'Request', 'Response', 'Blob'].forEach((key) => { + if (configuredEnv && utils$1.hasOwnProp(configuredEnv, key)) { + env[key] = configuredEnv[key]; + } + }); + const { fetch, Request, Response, Blob } = env; + const seeds = [Request, Response, fetch, Blob]; + + let len = seeds.length, + i = len, + seed, + target, + map = seedCache; + + while (i--) { + seed = seeds[i]; + target = map.get(seed); + + target === undefined && map.set(seed, (target = i ? new Map() : factory(env))); + + map = target; + } + + return target; +}; + +getFetch(); + +/** + * Known adapters mapping. + * Provides environment-specific adapters for Axios: + * - `http` for Node.js + * - `xhr` for browsers + * - `fetch` for fetch API-based requests + * + * @type {Object} + */ +const knownAdapters = { + http: httpAdapter, + xhr: xhrAdapter, + fetch: { + get: getFetch, + }, +}; + +// Assign adapter names for easier debugging and identification +utils$1.forEach(knownAdapters, (fn, value) => { + if (fn) { + try { + // Null-proto descriptors so a polluted Object.prototype.get cannot turn + // these data descriptors into accessor descriptors on the way in. + Object.defineProperty(fn, 'name', { __proto__: null, value }); + } catch (e) { + // eslint-disable-next-line no-empty + } + Object.defineProperty(fn, 'adapterName', { __proto__: null, value }); + } +}); + +/** + * Render a rejection reason string for unknown or unsupported adapters + * + * @param {string} reason + * @returns {string} + */ +const renderReason = (reason) => `- ${reason}`; + +/** + * Check if the adapter is resolved (function, null, or false) + * + * @param {Function|null|false} adapter + * @returns {boolean} + */ +const isResolvedHandle = (adapter) => + utils$1.isFunction(adapter) || adapter === null || adapter === false; + +/** + * Get the first suitable adapter from the provided list. + * Tries each adapter in order until a supported one is found. + * Throws an AxiosError if no adapter is suitable. + * + * @param {Array|string|Function} adapters - Adapter(s) by name or function. + * @param {Object} config - Axios request configuration + * @throws {AxiosError} If no suitable adapter is available + * @returns {Function} The resolved adapter function + */ +function getAdapter$1(adapters, config) { + adapters = utils$1.isArray(adapters) ? adapters : [adapters]; + + const { length } = adapters; + let nameOrAdapter; + let adapter; + + const rejectedReasons = {}; + + for (let i = 0; i < length; i++) { + nameOrAdapter = adapters[i]; + let id; + + adapter = nameOrAdapter; + + if (!isResolvedHandle(nameOrAdapter)) { + adapter = knownAdapters[(id = String(nameOrAdapter)).toLowerCase()]; + + if (adapter === undefined) { + throw new AxiosError$1(`Unknown adapter '${id}'`); + } + } + + if (adapter && (utils$1.isFunction(adapter) || (adapter = adapter.get(config)))) { + break; + } + + rejectedReasons[id || '#' + i] = adapter; + } + + if (!adapter) { + const reasons = Object.entries(rejectedReasons).map( + ([id, state]) => + `adapter ${id} ` + + (state === false ? 'is not supported by the environment' : 'is not available in the build') + ); + + let s = length + ? reasons.length > 1 + ? 'since :\n' + reasons.map(renderReason).join('\n') + : ' ' + renderReason(reasons[0]) + : 'as no adapter specified'; + + throw new AxiosError$1( + `There is no suitable adapter to dispatch the request ` + s, + AxiosError$1.ERR_NOT_SUPPORT + ); + } + + return adapter; +} + +/** + * Exports Axios adapters and utility to resolve an adapter + */ +var adapters = { + /** + * Resolve an adapter from a list of adapter names or functions. + * @type {Function} + */ + getAdapter: getAdapter$1, + + /** + * Exposes all known adapters + * @type {Object} + */ + adapters: knownAdapters, +}; + +/** + * Throws a `CanceledError` if cancellation has been requested. + * + * @param {Object} config The config that is to be used for the request + * + * @returns {void} + */ +function throwIfCancellationRequested(config) { + if (config.cancelToken) { + config.cancelToken.throwIfRequested(); + } + + if (config.signal && config.signal.aborted) { + throw new CanceledError$1(null, config); + } +} + +/** + * Resolve the clock used to time adapter execution. + * + * Prefers the monotonic `performance.now()` so wall-clock adjustments do not + * skew the measurement, and so frameworks that forbid reading the current + * time during prerendering (e.g. Next.js Cache Components) accept it. Falls + * back to `Date.now()` in runtimes without the High Resolution Time API. + * + * @returns {() => number} Millisecond clock + */ +function resolveClock() { + return typeof performance !== 'undefined' && utils$1.isFunction(performance.now) + ? () => performance.now() + : Date.now; +} + +/** + * Whole milliseconds elapsed since `start`, floored at zero. + * + * Rounded so the value stays an integer as with `Date.now()`. The fallback + * wall clock can move backwards mid-request, so the result is clamped. + * + * @param {() => number} now Clock returned by `resolveClock()` + * @param {number} start Timestamp read from `now` + * + * @returns {number} Non-negative elapsed milliseconds + */ +function elapsedSince(now, start) { + return Math.max(0, Math.round(now() - start)); +} + +/** + * Dispatch a request to the server using the configured adapter. + * + * @param {object} config The config that is to be used for the request + * + * @returns {Promise} The Promise to be fulfilled + */ +function dispatchRequest(_config) { + // Interceptors may replace the merged config with an ordinary object. Flatten + // it at the dispatch boundary so shared prototype members cannot become + // request behavior, while preserving intentional template/class members. + const config = utils$1.toSafeFlatObject(_config); + + throwIfCancellationRequested(config); + + config.headers = AxiosHeaders$1.from(utils$1.getSafeProp(config, 'headers')); + + // Transform request data + config.data = transformData.call(config, config.transformRequest); + + if (['post', 'put', 'patch'].indexOf(config.method) !== -1) { + config.headers.setContentType('application/x-www-form-urlencoded', false); + } + + const adapter = adapters.getAdapter(config.adapter || defaults.adapter, config); + + const now = resolveClock(); + const start = now(); + + return adapter(config).then( + function onAdapterResolution(response) { + throwIfCancellationRequested(config); + + response.duration = elapsedSince(now, start); + + // Expose the current response on config so that transformResponse can + // attach it to any AxiosError it throws (e.g. on JSON parse failure). + // We clean it up afterwards to avoid polluting the config object. + config.response = response; + try { + response.data = transformData.call(config, config.transformResponse, response); + } finally { + delete config.response; + } + + response.headers = AxiosHeaders$1.from(response.headers); + + return response; + }, + function onAdapterRejection(reason) { + if (!isCancel$1(reason)) { + throwIfCancellationRequested(config); + + // Transform response data + if (reason && reason.response) { + reason.response.duration = elapsedSince(now, start); + config.response = reason.response; + try { + reason.response.data = transformData.call( + config, + config.transformResponse, + reason.response + ); + } finally { + delete config.response; + } + reason.response.headers = AxiosHeaders$1.from(reason.response.headers); + } + } + + return Promise.reject(reason); + } + ); +} + +const validators$1 = {}; + +// eslint-disable-next-line func-names +['object', 'boolean', 'number', 'function', 'string', 'symbol'].forEach((type, i) => { + validators$1[type] = function validator(thing) { + return typeof thing === type || 'a' + (i < 1 ? 'n ' : ' ') + type; + }; +}); + +const deprecatedWarnings = {}; + +/** + * Transitional option validator + * + * @param {function|boolean?} validator - set to false if the transitional option has been removed + * @param {string?} version - deprecated version / removed since version + * @param {string?} message - some message with additional info + * + * @returns {function} + */ +validators$1.transitional = function transitional(validator, version, message) { + function formatMessage(opt, desc) { + return ( + '[Axios v' + + VERSION$1 + + "] Transitional option '" + + opt + + "'" + + desc + + (message ? '. ' + message : '') + ); + } + + // eslint-disable-next-line func-names + return (value, opt, opts) => { + if (validator === false) { + throw new AxiosError$1( + formatMessage(opt, ' has been removed' + (version ? ' in ' + version : '')), + AxiosError$1.ERR_DEPRECATED + ); + } + + if (version && !deprecatedWarnings[opt]) { + deprecatedWarnings[opt] = true; + // eslint-disable-next-line no-console + console.warn( + formatMessage( + opt, + ' has been deprecated since v' + version + ' and will be removed in the near future' + ) + ); + } + + return validator ? validator(value, opt, opts) : true; + }; +}; + +validators$1.spelling = function spelling(correctSpelling) { + return (value, opt) => { + // eslint-disable-next-line no-console + console.warn(`${opt} is likely a misspelling of ${correctSpelling}`); + return true; + }; +}; + +/** + * Assert object's properties type + * + * @param {object} options + * @param {object} schema + * @param {boolean?} allowUnknown + * + * @returns {object} + */ + +function assertOptions(options, schema, allowUnknown) { + if (typeof options !== 'object' || options === null) { + throw new AxiosError$1('options must be an object', AxiosError$1.ERR_BAD_OPTION_VALUE); + } + const keys = Object.keys(options); + let i = keys.length; + while (i-- > 0) { + const opt = keys[i]; + // Use hasOwnProperty so a polluted Object.prototype. cannot supply + // a non-function validator and cause a TypeError. + const validator = Object.prototype.hasOwnProperty.call(schema, opt) ? schema[opt] : undefined; + if (validator) { + const value = options[opt]; + const result = value === undefined || validator(value, opt, options); + if (result !== true) { + throw new AxiosError$1( + 'option ' + opt + ' must be ' + result, + AxiosError$1.ERR_BAD_OPTION_VALUE + ); + } + continue; + } + if (allowUnknown !== true) { + throw new AxiosError$1('Unknown option ' + opt, AxiosError$1.ERR_BAD_OPTION); + } + } +} + +var validator = { + assertOptions, + validators: validators$1, +}; + +const validators = validator.validators; + +// Recognize header maps without consuming objects intended as literal values. +// AxiosHeaders from other builds share a brand and header-container interface, +// but not constructor identity. A tag and toJSON alone can describe a literal. +const isHeadersBucket = (value) => { + if (value == null || utils$1.isPlainObject(value) || value instanceof AxiosHeaders$1) { + return true; + } + + try { + return ( + utils$1.isObject(value) && + utils$1.getSafeProp(value, Symbol.toStringTag) === 'AxiosHeaders' && + [ + 'toJSON', + 'set', + 'get', + 'has', + 'delete', + 'clear', + 'normalize', + 'concat', + 'toString', + Symbol.iterator, + ].every((method) => utils$1.isFunction(utils$1.getSafeProp(value, method))) + ); + } catch (e) { + // A failed optional brand probe must not prevent literal header serialization. + return false; + } +}; + +/** + * Create a new instance of Axios + * + * @param {Object} instanceConfig The default config for the instance + * + * @return {Axios} A new instance of Axios + */ +let Axios$1 = class Axios { + constructor(instanceConfig) { + this.defaults = instanceConfig || {}; + this.interceptors = { + request: new InterceptorManager(), + response: new InterceptorManager(), + }; + } + + /** + * Dispatch a request + * + * @param {String|Object} configOrUrl The config specific for this request (merged with this.defaults) + * @param {?Object} config + * + * @returns {Promise} The Promise to be fulfilled + */ + async request(configOrUrl, config) { + try { + return await this._request(configOrUrl, config); + } catch (err) { + if (err instanceof Error) { + try { + let dummy = {}; + + Error.captureStackTrace ? Error.captureStackTrace(dummy) : (dummy = new Error()); + + const dummyStack = dummy.stack; + let stack = ''; + + // slice off the Error: ... line + if (typeof dummyStack === 'string') { + const firstNewlineIndex = dummyStack.indexOf('\n'); + + stack = firstNewlineIndex === -1 ? '' : dummyStack.slice(firstNewlineIndex + 1); + } + + if (!err.stack) { + err.stack = stack; + } else if (stack) { + // Match a common suffix after the 2 top frames when available, + // otherwise compare the full reconstructed stack. + const firstNewlineIndex = stack.indexOf('\n'); + const secondNewlineIndex = + firstNewlineIndex === -1 ? -1 : stack.indexOf('\n', firstNewlineIndex + 1); + const duplicateCheckSuffix = + secondNewlineIndex === -1 ? stack : stack.slice(secondNewlineIndex + 1); + + // `AxiosError.from()` may have already inlined the wrapped error's + // stack under a `Caused by:` marker. Keep the reconstructed caller + // frames ahead of that marker so stack-only reporters do not read + // them as part of the low-level cause. + const currentStack = String(err.stack); + const causeIndex = getCauseStackIndex(err, currentStack); + const stackHead = causeIndex === -1 ? currentStack : currentStack.slice(0, causeIndex); + const causeSection = causeIndex === -1 ? '' : currentStack.slice(causeIndex); + + if (!stackHead.endsWith(duplicateCheckSuffix)) { + err.stack = stackHead + '\n' + stack + causeSection; + } + } + } catch (e) { + // Ignore failures from custom stack hooks or un-writable stack properties. + } + } + + throw err; + } + } + + _request(configOrUrl, config) { + /*eslint no-param-reassign:0*/ + // Allow for axios('example/url'[, config]) a la fetch API + if (typeof configOrUrl === 'string') { + config = config || {}; + config.url = configOrUrl; + } else { + config = configOrUrl || {}; + } + + config = mergeConfig$1(this.defaults, config); + + const { transitional, paramsSerializer, headers } = config; + + if (transitional !== undefined) { + validator.assertOptions( + transitional, + { + silentJSONParsing: validators.transitional(validators.boolean), + forcedJSONParsing: validators.transitional(validators.boolean), + clarifyTimeoutError: validators.transitional(validators.boolean), + legacyInterceptorReqResOrdering: validators.transitional(validators.boolean), + advertiseZstdAcceptEncoding: validators.transitional(validators.boolean), + validateStatusUndefinedResolves: validators.transitional(validators.boolean), + encodeBasicAuthUsername: validators.transitional(validators.boolean), + }, + false + ); + } + + if (paramsSerializer != null) { + if (utils$1.isFunction(paramsSerializer)) { + config.paramsSerializer = { + serialize: paramsSerializer, + }; + } else { + validator.assertOptions( + paramsSerializer, + { + encode: validators.function, + serialize: validators.function, + }, + true + ); + } + } + + // Set config.allowAbsoluteUrls + if (config.allowAbsoluteUrls !== undefined) ; else if ( + utils$1.hasOwnProp(this.defaults, 'allowAbsoluteUrls') && + this.defaults.allowAbsoluteUrls !== undefined + ) { + config.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls; + } else { + config.allowAbsoluteUrls = true; + } + + validator.assertOptions( + config, + { + baseUrl: validators.spelling('baseURL'), + withXsrfToken: validators.spelling('withXSRFToken'), + }, + true + ); + + // Set config.method + config.method = ( + utils$1.getSafeProp(config, 'method') || + utils$1.getSafeProp(this.defaults, 'method') || + 'get' + ).toLowerCase(); + + // Flatten header defaults without consuming literal method-named headers. + const commonHeaders = utils$1.getSafeProp(headers, 'common'); + const methodHeaders = utils$1.getSafeProp(headers, config.method); + const contextHeaders = + headers && + utils$1.merge( + isHeadersBucket(commonHeaders) ? commonHeaders : undefined, + isHeadersBucket(methodHeaders) ? methodHeaders : undefined + ); + + headers && + utils$1.forEach(methodList.concat('common'), (method) => { + if (isHeadersBucket(utils$1.getSafeProp(headers, method))) { + delete headers[method]; + } + }); + + config.headers = AxiosHeaders$1.concat(contextHeaders, headers); + + // filter out skipped interceptors + const requestInterceptorChain = []; + let synchronousRequestInterceptors = true; + this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) { + if (typeof interceptor.runWhen === 'function' && interceptor.runWhen(config) === false) { + return; + } + + synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous; + + const transitional = config.transitional || transitionalDefaults; + const legacyInterceptorReqResOrdering = + transitional && transitional.legacyInterceptorReqResOrdering; + + if (legacyInterceptorReqResOrdering) { + requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected); + } else { + requestInterceptorChain.push(interceptor.fulfilled, interceptor.rejected); + } + }); + + const responseInterceptorChain = []; + this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) { + responseInterceptorChain.push(interceptor.fulfilled, interceptor.rejected); + }); + + let promise; + let i = 0; + let len; + + if (!synchronousRequestInterceptors) { + const chain = [dispatchRequest.bind(this), undefined]; + chain.unshift(...requestInterceptorChain); + chain.push(...responseInterceptorChain); + len = chain.length; + + promise = Promise.resolve(config); + + while (i < len) { + promise = promise.then(chain[i++], chain[i++]); + } + + return promise; + } + + len = requestInterceptorChain.length; + + let newConfig = config; + + while (i < len) { + const onFulfilled = requestInterceptorChain[i++]; + const onRejected = requestInterceptorChain[i++]; + try { + newConfig = onFulfilled ? onFulfilled(newConfig) : newConfig; + } catch (error) { + if (!onRejected) { + promise = Promise.reject(error); + break; + } + + try { + const rejectedResult = onRejected.call(this, error); + + if (utils$1.isThenable(rejectedResult)) { + promise = Promise.resolve(rejectedResult).then(() => + dispatchRequest.call(this, newConfig) + ); + } + } catch (rejectedError) { + promise = Promise.reject(rejectedError); + } + + break; + } + } + + if (!promise) { + try { + promise = dispatchRequest.call(this, newConfig); + } catch (error) { + promise = Promise.reject(error); + } + } + + i = 0; + len = responseInterceptorChain.length; + + while (i < len) { + promise = promise.then(responseInterceptorChain[i++], responseInterceptorChain[i++]); + } + + return promise; + } + + getUri(config) { + config = mergeConfig$1(this.defaults, config); + const fullPath = buildFullPath(config.baseURL, config.url, config.allowAbsoluteUrls, config); + return buildURL(fullPath, config.params, config.paramsSerializer); + } +}; + +// Provide aliases for supported request methods +utils$1.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) { + /*eslint func-names:0*/ + Axios$1.prototype[method] = async function (url, config) { + return this.request( + mergeConfig$1(config || {}, { + method, + url, + data: config && utils$1.hasOwnProp(config, 'data') ? config.data : undefined, + }) + ); + }; +}); + +utils$1.forEach(['post', 'put', 'patch', 'query'], function forEachMethodWithData(method) { + function generateHTTPMethod(isForm) { + return async function httpMethod(url, data, config) { + return this.request( + mergeConfig$1(config || {}, { + method, + headers: isForm + ? { + 'Content-Type': 'multipart/form-data', + } + : {}, + url, + data, + }) + ); + }; + } + + Axios$1.prototype[method] = generateHTTPMethod(); + + // QUERY is a safe/idempotent read method; multipart form bodies don't fit + // its semantics, so no queryForm shorthand is generated. + if (method !== 'query') { + Axios$1.prototype[method + 'Form'] = generateHTTPMethod(true); + } +}); + +/** + * A `CancelToken` is an object that can be used to request cancellation of an operation. + * + * @param {Function} executor The executor function. + * + * @returns {CancelToken} + */ +let CancelToken$1 = class CancelToken { + constructor(executor) { + if (typeof executor !== 'function') { + throw new TypeError('executor must be a function.'); + } + + let resolvePromise; + + this.promise = new Promise(function promiseExecutor(resolve) { + resolvePromise = resolve; + }); + + const token = this; + + // eslint-disable-next-line func-names + this.promise.then((cancel) => { + if (!token._listeners) return; + + let i = token._listeners.length; + + while (i-- > 0) { + token._listeners[i](cancel); + } + token._listeners = null; + }); + + // eslint-disable-next-line func-names + this.promise.then = (onfulfilled) => { + let _resolve; + // eslint-disable-next-line func-names + const promise = new Promise((resolve) => { + token.subscribe(resolve); + _resolve = resolve; + }).then(onfulfilled); + + promise.cancel = function reject() { + token.unsubscribe(_resolve); + }; + + return promise; + }; + + executor(function cancel(message, config, request) { + if (token.reason) { + // Cancellation has already been requested + return; + } + + token.reason = new CanceledError$1(message, config, request); + resolvePromise(token.reason); + }); + } + + /** + * Throws a `CanceledError` if cancellation has been requested. + */ + throwIfRequested() { + if (this.reason) { + throw this.reason; + } + } + + /** + * Subscribe to the cancel signal + */ + + subscribe(listener) { + if (this.reason) { + listener(this.reason); + return; + } + + if (this._listeners) { + this._listeners.push(listener); + } else { + this._listeners = [listener]; + } + } + + /** + * Unsubscribe from the cancel signal + */ + + unsubscribe(listener) { + if (!this._listeners) { + return; + } + const index = this._listeners.indexOf(listener); + if (index !== -1) { + this._listeners.splice(index, 1); + } + } + + toAbortSignal() { + const controller = new AbortController(); + + const abort = (err) => { + controller.abort(err); + }; + + this.subscribe(abort); + + controller.signal.unsubscribe = () => this.unsubscribe(abort); + + return controller.signal; + } + + /** + * Returns an object that contains a new `CancelToken` and a function that, when called, + * cancels the `CancelToken`. + */ + static source() { + let cancel; + const token = new CancelToken(function executor(c) { + cancel = c; + }); + return { + token, + cancel, + }; + } +}; + +/** + * Syntactic sugar for invoking a function and expanding an array for arguments. + * + * Common use case would be to use `Function.prototype.apply`. + * + * ```js + * function f(x, y, z) {} + * const args = [1, 2, 3]; + * f.apply(null, args); + * ``` + * + * With `spread` this example can be re-written. + * + * ```js + * spread(function(x, y, z) {})([1, 2, 3]); + * ``` + * + * @param {Function} callback + * + * @returns {Function} + */ +function spread$1(callback) { + return function wrap(arr) { + return callback.apply(null, arr); + }; +} + +/** + * Determines whether the payload is an error thrown by Axios + * + * @param {*} payload The value to test + * + * @returns {boolean} True if the payload is an error thrown by Axios, otherwise false + */ +function isAxiosError$1(payload) { + return utils$1.isObject(payload) && payload.isAxiosError === true; +} + +const HttpStatusCode$1 = { + 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, + /** + * @deprecated Use `ContentTooLarge` instead. + */ + PayloadTooLarge: 413, + ContentTooLarge: 413, + UriTooLong: 414, + UnsupportedMediaType: 415, + RangeNotSatisfiable: 416, + ExpectationFailed: 417, + ImATeapot: 418, + MisdirectedRequest: 421, + /** + * @deprecated Use `UnprocessableContent` instead. + */ + UnprocessableEntity: 422, + UnprocessableContent: 422, + Locked: 423, + FailedDependency: 424, + TooEarly: 425, + UpgradeRequired: 426, + PreconditionRequired: 428, + TooManyRequests: 429, + RequestHeaderFieldsTooLarge: 431, + UnavailableForLegalReasons: 451, + InternalServerError: 500, + NotImplemented: 501, + BadGateway: 502, + ServiceUnavailable: 503, + GatewayTimeout: 504, + HttpVersionNotSupported: 505, + VariantAlsoNegotiates: 506, + InsufficientStorage: 507, + LoopDetected: 508, + NotExtended: 510, + NetworkAuthenticationRequired: 511, + WebServerReturnsAnUnknownError: 520, + WebServerIsDown: 521, + ConnectionTimedOut: 522, + OriginIsUnreachable: 523, + TimeoutOccurred: 524, + SslHandshakeFailed: 525, + InvalidSslCertificate: 526, +}; + +Object.entries(HttpStatusCode$1).forEach(([key, value]) => { + if (HttpStatusCode$1[value] === undefined) { + HttpStatusCode$1[value] = key; + } +}); + +/** + * Create an instance of Axios + * + * @param {Object} defaultConfig The default config for the instance + * + * @returns {Axios} A new instance of Axios + */ +function createInstance(defaultConfig) { + const context = new Axios$1(defaultConfig); + const instance = bind(Axios$1.prototype.request, context); + + // Copy axios.prototype to instance + utils$1.extend(instance, Axios$1.prototype, context, { allOwnKeys: true }); + + // Copy context to instance + utils$1.extend(instance, context, null, { allOwnKeys: true }); + + // Factory for creating new instances + instance.create = function create(instanceConfig) { + return createInstance(mergeConfig$1(defaultConfig, instanceConfig)); + }; + + return instance; +} + +// Create the default instance to be exported +const axios = createInstance(defaults); + +// Expose Axios class to allow class inheritance +axios.Axios = Axios$1; + +// Expose Cancel & CancelToken +axios.CanceledError = CanceledError$1; +axios.CancelToken = CancelToken$1; +axios.isCancel = isCancel$1; +axios.VERSION = VERSION$1; +axios.toFormData = toFormData$1; + +// Expose AxiosError class +axios.AxiosError = AxiosError$1; + +// alias for CanceledError for backward compatibility +axios.Cancel = axios.CanceledError; + +// Expose all/spread +axios.all = function all(promises) { + return Promise.all(promises); +}; + +axios.spread = spread$1; + +// Expose isAxiosError +axios.isAxiosError = isAxiosError$1; + +// Expose mergeConfig +axios.mergeConfig = mergeConfig$1; + +axios.AxiosHeaders = AxiosHeaders$1; + +axios.formToJSON = (thing) => formDataToJSON(utils$1.isHTMLForm(thing) ? new FormData(thing) : thing); + +axios.getAdapter = adapters.getAdapter; + +axios.HttpStatusCode = HttpStatusCode$1; + +axios.default = axios; + +// This module is intended to unwrap Axios default export as named. +// Keep top-level export same with static properties +// so that it can keep same with es module or cjs +const { + Axios, + AxiosError, + CanceledError, + isCancel, + CancelToken, + VERSION, + all, + Cancel, + isAxiosError, + spread, + toFormData, + AxiosHeaders, + HttpStatusCode, + formToJSON, + getAdapter, + mergeConfig, + create, +} = axios; + +export { Axios, AxiosError, AxiosHeaders, Cancel, CancelToken, CanceledError, HttpStatusCode, VERSION, all, create, axios as default, formToJSON, getAdapter, isAxiosError, isCancel, mergeConfig, spread, toFormData }; diff --git a/node_modules/axios/dist/esm/axios.min.js b/node_modules/axios/dist/esm/axios.min.js new file mode 100644 index 0000000..4e1d05e --- /dev/null +++ b/node_modules/axios/dist/esm/axios.min.js @@ -0,0 +1,3 @@ +/*! Axios v1.21.1 Copyright (c) 2026 Matt Zabriskie and contributors */ +function e(e,t){return function(){return e.apply(t,arguments)}}const{toString:t}=Object.prototype,{getPrototypeOf:n}=Object,{iterator:r,toStringTag:o}=Symbol,s=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),i=e=>"string"==typeof e&&("__proto__"===e||"constructor"===e||"prototype"===e),a=(e,t,n)=>e===Object.prototype||!n&&null===t,c=(e,t)=>{let r=e;const o=[];for(;null!=r;){if(-1!==o.indexOf(r))return!1;o.push(r);const i=n(r);if(a(r,i,r===e))return!1;if(s(r,t))return!0;r=i}return!1},l=(u=Object.create(null),e=>{const n=t.call(e);return u[n]||(u[n]=n.slice(8,-1).toLowerCase())});var u;const f=e=>(e=e.toLowerCase(),t=>l(t)===e),d=e=>t=>typeof t===e,{isArray:p}=Array,h=d("undefined");function m(e){return null!==e&&!h(e)&&null!==e.constructor&&!h(e.constructor)&&y(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const g=f("ArrayBuffer");const b=d("string"),y=d("function"),w=d("number"),O=e=>null!==e&&"object"==typeof e,E=e=>{if(!O(e))return!1;const t=n(e);return(null===t||t===Object.prototype||null===n(t))&&(a(e,t,!0)||!s(e,o)&&!s(e,r))},R=f("Date"),S=f("File"),_=f("Blob"),v=f("FileList"),A=f("Set");const P="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},T=void 0!==P.FormData?P.FormData:void 0,j=f("URLSearchParams"),[C,N,x,U]=["ReadableStream","Request","Response","Headers"].map(f);function D(e,t,{allOwnKeys:n=!1}={}){if(null==e)return;let r,o;if("object"!=typeof e&&(e=[e]),p(e))for(r=0,o=e.length;r!h(e)&&e!==L;const B=(k="undefined"!=typeof Uint8Array&&n(Uint8Array),e=>k&&e instanceof k);var k;const I=f("HTMLFormElement"),{propertyIsEnumerable:q}=Object.prototype,M=f("RegExp"),z=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};D(n,(n,o)=>{let s;!1!==(s=t(n,o,e))&&(r[o]=s||n)}),Object.defineProperties(e,r)};const $=f("AsyncFunction"),H=(W="function"==typeof setImmediate,J=y(L.postMessage),W?setImmediate:J?(V=`axios@${Math.random()}`,K=[],L.addEventListener("message",({source:e,data:t})=>{e===L&&t===V&&K.length&&K.shift()()},!1),e=>{K.push(e),L.postMessage(V,"*")}):e=>setTimeout(e));var W,J,V,K;const X="undefined"!=typeof queueMicrotask?queueMicrotask.bind(L):"undefined"!=typeof process&&process.nextTick||H,Q=e=>null!=e&&y(e[r]);var Z={isArray:p,isArrayBuffer:g,isBuffer:m,isFormData:e=>{if(!e)return!1;if(T&&e instanceof T)return!0;const t=n(e);if(!t||t===Object.prototype)return!1;if(!y(e.append))return!1;const r=l(e);return"formdata"===r||"object"===r&&y(e.toString)&&"[object FormData]"===e.toString()},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&g(e.buffer),t},isString:b,isNumber:w,isBoolean:e=>!0===e||!1===e,isObject:O,isPlainObject:E,isEmptyObject:e=>{if(!O(e)||m(e))return!1;try{return 0===Object.keys(e).length&&Object.getPrototypeOf(e)===Object.prototype}catch(e){return!1}},isReadableStream:C,isRequest:N,isResponse:x,isHeaders:U,isUndefined:h,isDate:R,isFile:S,isReactNativeBlob:e=>!(!e||void 0===e.uri),isReactNative:e=>e&&void 0!==e.getParts,isBlob:_,isRegExp:M,isFunction:y,isStream:e=>O(e)&&y(e.pipe),isURLSearchParams:j,isTypedArray:B,isFileList:v,forEach:D,merge:function e(...t){const{caseless:n,skipUndefined:r}=F(this)&&this||{},o={},i=n?Object.create(null):null,a=(t,n)=>{if("__proto__"===n||"constructor"===n||"prototype"===n)return;let a=n;if(i&&"string"==typeof n){const e=n.toLowerCase(),t=i[e];void 0!==t&&s(o,t)?a=t:i[e]=n}const c=s(o,a)?o[a]:void 0;E(c)&&E(t)?o[a]=e(c,t):E(t)?o[a]=e({},t):p(t)?o[a]=t.slice():r&&h(t)||(o[a]=t)};for(let e=0,n=t.length;e(D(n,(n,o)=>{r&&y(n)?Object.defineProperty(t,o,{__proto__:null,value:e(n,r),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(t,o,{__proto__:null,value:n,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:o}),t),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),Object.defineProperty(e.prototype,"constructor",{__proto__:null,value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{__proto__:null,value:t.prototype}),n&&Object.assign(e.prototype,n)},toFlatObject:(e,t,r,o)=>{let s,i,a;const c={};if(t=t||{},null==e)return t;do{for(s=Object.getOwnPropertyNames(e),i=s.length;i-- >0;)a=s[i],o&&!o(a,e,t)||c[a]||(t[a]=e[a],c[a]=!0);e=!1!==r&&n(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},kindOf:l,kindOfTest:f,endsWith:(e,t,n)=>{e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return-1!==r&&r===n},toArray:e=>{if(!e)return null;if(p(e))return e;let t=e.length;if(!Number.isSafeInteger(t)||t<0||t>4294967295)return null;const r=new Set,o=new Set;let i=e;for(;null!=i&&r.size{const n=+e;Number.isInteger(n)&&n>=0&&n0;)c[t]=e[t];return c},forEachEntry:(e,t)=>{const n=(e&&e[r]).call(e);let o;for(;(o=n.next())&&!o.done;){const n=o.value;t.call(e,n[0],n[1])}},matchAll:(e,t)=>{let n;const r=[];for(;null!==(n=e.exec(t));)r.push(n);return r},isHTMLForm:I,hasOwnProperty:s,hasOwnProp:s,hasOwnInPrototypeChain:c,getSafeProp:(e,t)=>null!=e&&c(e,t)?e[t]:void 0,toSafeFlatObject:e=>{if(null==e||"object"!=typeof e&&"function"!=typeof e)return e;const t=n(e);if(null===t&&(e=>{if(!Object.isExtensible(e))return!1;const t=Object.getOwnPropertyNames(e);return Object.getOwnPropertySymbols&&t.push(...Object.getOwnPropertySymbols(e)),t.every(t=>{if(i(t))return!1;const n=Object.getOwnPropertyDescriptor(e,t);return!!n&&n.configurable&&!0===n.writable})})(e))return e;const r=Object.create(null),o=Object.create(null),c=[];let l=e;for(;null!=l&&-1===c.indexOf(l);){c.push(l);const u=l===e?t:n(l);if(a(l,u,l===e))break;const f=Object.getOwnPropertyNames(l);Object.getOwnPropertySymbols&&f.push(...Object.getOwnPropertySymbols(l));for(const t of f)i(t)||s(o,t)||(r[t]=e[t],o[t]=!0);l=u}return r},reduceDescriptors:z,freezeMethods:e=>{z(e,(t,n)=>{if(y(e)&&["arguments","caller","callee"].includes(n))return!1;const r=e[n];y(r)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")}))})},toObjectSet:(e,t)=>{const n={},r=e=>{e.forEach(e=>{n[e]=!0})};return p(e)?r(e):r(String(e).split(t)),n},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,t,n){return t.toUpperCase()+n}),noop:()=>{},toFiniteNumber:(e,t)=>null!=e&&Number.isFinite(e=+e)?e:t,findKey:function(e,t){if(m(e))return null;t=t.toLowerCase();const n=Object.keys(e);let r,o=n.length;for(;o-- >0;)if(r=n[o],t===r.toLowerCase())return r;return null},global:L,isContextDefined:F,isSpecCompliantForm:function(e){return!!(e&&y(e.append)&&"FormData"===e[o]&&e[r])},toJSONObject:e=>{const t=new WeakSet,n=e=>{if(O(e)){if(t.has(e))return;if(m(e))return e;if(!("toJSON"in e)){let r;if(t.add(e),A(e)){r=[];for(const t of e){const e=n(t);!h(e)&&r.push(e)}}else r=p(e)?[]:{},D(e,(e,t)=>{const o=n(e);!h(o)&&(r[t]=o)});return t.delete(e),r}}return e};return n(e)},isAsyncFn:$,isThenable:e=>e&&(O(e)||y(e))&&y(e.then)&&y(e.catch),setImmediate:H,asap:X,isIterable:Q,isSafeIterable:e=>null!=e&&c(e,r)&&Q(e)};const G=Z.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"]);const Y=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),ee=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function te(e,t){return Z.isArray(e)?e.map(e=>te(e,t)):function(e){let t=0,n=e.length;for(;tt;){const t=e.charCodeAt(n-1);if(9!==t&&32!==t)break;n-=1}return 0===t&&n===e.length?e:e.slice(t,n)}(String(e).replace(t,""))}function ne(e){const t=Object.create(null);return Z.forEach(e.toJSON(),(e,n)=>{t[n]=(e=>te(e,ee))(e)}),t}const re=Symbol("internals");function oe(e){return e&&String(e).trim().toLowerCase()}function se(e){return!1===e||null==e?e:Z.isArray(e)?e.map(se):(e=>te(e,Y))(String(e))}const ie=/^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/;function ae(e){let t=0,n=e.length;for(;tt;){const t=e.charCodeAt(n-1);if(9!==t&&32!==t)break;n-=1}return 0===t&&n===e.length?e:e.slice(t,n)}const ce=e=>"__proto__"===e?"__Proto__":e;function le(e,t,n,r,o){return Z.isFunction(r)?r.call(e,t,n):(o&&(t=n),Z.isString(t)?Z.isString(r)?-1!==t.indexOf(r):Z.isRegExp(r)?r.test(t):void 0:void 0)}let ue=class{constructor(e){e&&this.set(e)}set(e,t,n){const r=this;function o(e,t,n){const o=oe(t);if(!o)return;const s=Z.findKey(r,o);(!s||void 0===r[s]||!0===n||void 0===n&&!1!==r[s])&&(r[ce(s||t)]=se(e))}const s=(e,t)=>Z.forEach(e,(e,n)=>o(e,n,t));if(Z.isPlainObject(e)||e instanceof this.constructor)s(e,t);else if(Z.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()))s((e=>{const t=Object.create(null);let n,r,o;return e&&e.split("\n").forEach(function(e){o=e.indexOf(":"),n=e.substring(0,o).trim().toLowerCase(),r=e.substring(o+1).trim();const s=Z.hasOwnProp(t,n);!n||s&&Z.hasOwnProp(G,n)||("set-cookie"===n?s?t[n].push(r):t[n]=[r]:t[n]=s?t[n]+", "+r:r)}),t})(e),t);else if(Z.isObject(e)&&Z.isSafeIterable(e)){let n,r,o=Object.create(null);for(const t of e){if(!Z.isArray(t))throw new TypeError("Object iterator must return a key-value pair");r=t[0],Z.hasOwnProp(o,r)?(n=o[r],o[r]=Z.isArray(n)?[...n,t[1]]:[n,t[1]]):o[r]=t[1]}s(o,t)}else null!=e&&o(t,e,n);return this}get(e,t){if(e=oe(e)){const n=Z.findKey(this,e);if(n){const e=this[n];if(!t)return e;if(!0===t)return function(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}(e);if(Z.isFunction(t))return t.call(this,e,n);if(Z.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=oe(e)){const n=Z.findKey(this,e);return!(!n||void 0===this[n]||t&&!le(this,this[n],n,t))}return!1}delete(e,t){const n=this;let r=!1;function o(e){if(e=oe(e)){const o=Z.findKey(n,e);!o||t&&!le(n,n[o],o,t)||(delete n[o],r=!0)}}return Z.isArray(e)?e.forEach(o):o(e),r}clear(e){const t=Object.keys(this);let n=t.length,r=!1;for(;n--;){const o=t[n];e&&!le(this,this[o],o,e,!0)||(delete this[o],r=!0)}return r}normalize(e){const t=this,n=Object.create(null);return Z.forEach(this,(r,o)=>{const s=Z.findKey(n,o);if(s)return t[s]=se(r),void delete t[o];const i=ce(e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,n)=>t.toUpperCase()+n)}(o):String(o).trim());i!==o&&delete t[o],t[i]=se(r),n[i]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return Z.forEach(this,(n,r)=>{null!=n&&!1!==n&&(t[r]=e&&Z.isArray(n)?n.join(", "):n)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,t])=>e+": "+t).join("\n")}getSetCookie(){const e=this.get("set-cookie");return Z.isArray(e)?e:null==e||!1===e?[]:[e]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static parseParameters(e){return function(e){const t=Object.create(null),n=String(e);let r=0,o=!1,s=!1;function i(e){const o=ae(n.slice(r,e)),s=o.indexOf("=");if(s<1)return;const i=ae(o.slice(0,s));if(!ie.test(i))return;const a=i.toLowerCase();if("__proto__"===a||"constructor"===a||"prototype"===a)return;const c=ae(o.slice(s+1));t[a]=function(e){const t=e.length-1;if(t<1||34!==e.charCodeAt(0)||34!==e.charCodeAt(t))return e;let n="";for(let r=1;r=t))return e;n+=e[r]}return n}(c)}for(let e=0;en.set(e)),n}static accessor(e){const t=(this[re]=this[re]={accessors:{}}).accessors,n=this.prototype;function r(e){const r=oe(e);t[r]||(!function(e,t){const n=Z.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{__proto__:null,value:function(e,n,o){return this[r].call(this,t,e,n,o)},configurable:!0})})}(n,e),t[r]=!0)}return Z.isArray(e)?e.forEach(r):r(e),this}};ue.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),Z.reduceDescriptors(ue.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[n]=e}}}),Z.freezeMethods(ue);const fe="[REDACTED ****]";function de(e,t){const n=new Set(t.map(e=>String(e).toLowerCase())),r=[],o=e=>{if(null===e||"object"!=typeof e)return e;if(Z.isBuffer(e))return e;if(-1!==r.indexOf(e))return;let t;if(e instanceof ue&&(e=e.toJSON()),r.push(e),Z.isArray(e))t=[],e.forEach((e,n)=>{const r=o(e);Z.isUndefined(r)||(t[n]=r)});else{if(!Z.isPlainObject(e)&&function(e){if(Z.hasOwnProp(e,"toJSON"))return!0;let t=Object.getPrototypeOf(e);for(;t&&t!==Object.prototype;){if(Z.hasOwnProp(t,"toJSON"))return!0;t=Object.getPrototypeOf(t)}return!1}(e))return r.pop(),e;t=Object.create(null);for(const[r,s]of Object.entries(e)){const e=n.has(r.toLowerCase())?fe:o(s);Z.isUndefined(e)||(t[r]=e)}}return r.pop(),t};return o(e)}function pe(e){try{return String(e)}catch(e){return""}}const he=Symbol("causeStack");let me=class e extends Error{static from(t,n,r,o,s,i){let a=t.message;!a&&Z.isArray(t.errors)&&t.errors.length&&(a=function(e){return e.errors.map(e=>{try{return e&&e.message?pe(e.message):pe(e)}catch(e){return""}}).filter(Boolean).join("; ")||e.name||"AggregateError"}(t));const c=new e(a,n||t.code,r,o,s);return Object.defineProperty(c,"cause",{__proto__:null,value:t,writable:!0,enumerable:!1,configurable:!0}),c.name=t.name,function(e,t){try{const n=t&&t.stack;if("string"!=typeof n||!n)return;const r=e.stack;if("string"!=typeof r||!r)return;const o="\nCaused by: "+n;e.stack=r+o,Object.defineProperty(e,he,{__proto__:null,value:o})}catch(e){}}(c,t),null!=t.status&&null==c.status&&(c.status=t.status),i&&Object.assign(c,i),c}constructor(e,t,n,r,o){super(e),Object.defineProperty(this,"message",{__proto__:null,value:e,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o,this.status=o.status)}toJSON(){const e=this.config,t=e&&Z.hasOwnProp(e,"redact")?e.redact:void 0,n=Z.isArray(t)&&t.length>0?de(e,t):Z.toJSONObject(e);return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:n,code:this.code,status:this.status}}};me.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE",me.ERR_BAD_OPTION="ERR_BAD_OPTION",me.ECONNABORTED="ECONNABORTED",me.ETIMEDOUT="ETIMEDOUT",me.ECONNREFUSED="ECONNREFUSED",me.ERR_NETWORK="ERR_NETWORK",me.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS",me.ERR_DEPRECATED="ERR_DEPRECATED",me.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE",me.ERR_BAD_REQUEST="ERR_BAD_REQUEST",me.ERR_CANCELED="ERR_CANCELED",me.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT",me.ERR_INVALID_URL="ERR_INVALID_URL",me.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";function ge(e){return Z.isPlainObject(e)||Z.isArray(e)}function be(e){return Z.endsWith(e,"[]")?e.slice(0,-2):e}function ye(e,t,n){return e?e.concat(t).map(function(e,t){return e=be(e),!n&&t?"["+e+"]":e}).join(n?".":""):t}const we=Z.toFlatObject(Z,{},null,function(e){return/^is[A-Z]/.test(e)});function Oe(e,t,n){if(!Z.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const r=(e,t)=>{const r=Z.getSafeProp(n,e);return Z.isUndefined(r)?t:r},o=r("metaTokens",!0),s=r("visitor")||h,i=r("dots",!1),a=r("indexes",!1),c=r("Blob")||"undefined"!=typeof Blob&&Blob,l=r("maxDepth",100),u=c&&Z.isSpecCompliantForm(t),f=[];if(!Z.isFunction(s))throw new TypeError("visitor must be a function");function d(e){if(null===e)return"";if(Z.isDate(e))return e.toISOString();if(Z.isBoolean(e))return e.toString();if(!u&&Z.isBlob(e))throw new me("Blob is not supported. Use a Buffer instead.");if(Z.isArrayBuffer(e)||Z.isTypedArray(e)){if(u&&"function"==typeof c)return new c([e]);throw new me("Blob is not supported. Use a Buffer instead.",me.ERR_NOT_SUPPORT)}return e}function p(e){if(e>l)throw new me("Object is too deeply nested ("+e+" levels). Max depth: "+l,me.ERR_FORM_DATA_DEPTH_EXCEEDED)}function h(e,n,r){let s=e;if(Z.isReactNative(t)&&Z.isReactNativeBlob(e))return t.append(ye(r,n,i),d(e)),!1;if(e&&!r&&"object"==typeof e)if(Z.endsWith(n,"{}"))n=o?n:n.slice(0,-2),e=function(e,t){if(l===1/0)return JSON.stringify(e);const n=[];return JSON.stringify(e,function(e,r){if(!Z.isObject(r))return r;for(;n.length&&n[n.length-1]!==this;)n.pop();return n.push(r),p(t+n.length-1),r})}(e,1);else if(Z.isArray(e)&&function(e){return Z.isArray(e)&&!e.some(ge)}(e)||(Z.isFileList(e)||Z.endsWith(n,"[]"))&&(s=Z.toArray(e)))return n=be(n),s.forEach(function(e,r){!Z.isUndefined(e)&&null!==e&&t.append(!0===a?ye([n],r,i):null===a?n:n+"[]",d(e))}),!1;return!!ge(e)||(t.append(ye(r,n,i),d(e)),!1)}const m=Object.assign(we,{defaultVisitor:h,convertValue:d,isVisitable:ge});if(!Z.isObject(e))throw new TypeError("data must be an object");return function e(n,r,o=0){if(!Z.isUndefined(n)){if(p(o),-1!==f.indexOf(n))throw new Error("Circular reference detected in "+r.join("."));f.push(n),Z.forEach(n,function(n,i){!0===(!(Z.isUndefined(n)||null===n)&&s.call(t,n,Z.isString(i)?i.trim():i,r,m))&&e(n,r?r.concat(i):[i],o+1)}),f.pop()}}(e),t}function Ee(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(e).replace(/[!'()~]|%20/g,function(e){return t[e]})}function Re(e,t){this._pairs=[],e&&Oe(e,this,t)}const Se=Re.prototype;function _e(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function ve(e,t,n){if(!t)return e;e=e||"";const r=Z.isFunction(n)?{serialize:n}:n,o=Z.getSafeProp(r,"encode")||_e,s=Z.getSafeProp(r,"serialize");let i;if(i=s?s(t,r):Z.isURLSearchParams(t)?t.toString():new Re(t,r).toString(o),i){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+i}return e}Se.append=function(e,t){this._pairs.push([e,t])},Se.toString=function(e){const t=e?t=>e.call(this,t,Ee):Ee;return this._pairs.map(function(e){return t(e[0])+"="+t(e[1])},"").join("&")};const Ae=Symbol("internals");function Pe(e){return e?e.length:0}function Te(e){if(e)for(;e.length&&null===e[e.length-1];)e.pop()}function je(e,t){const n=e.handlers,r=Pe(n);n!==t.handlersRef?(t.handlersRef=n,t.handlerEntries.clear()):r!==t.handlersLength&&(r?t.handlerEntries.forEach(function(e,r){n[e.index]!==e.handler&&t.handlerEntries.delete(r)}):t.handlerEntries.clear()),t.handlersLength=r}class Ce{constructor(){this.handlers=[],this[Ae]={handlersRef:this.handlers,handlersLength:this.handlers.length,handlerEntries:new Map,iterationDepth:0,nextId:0}}use(e,t,n){const r={fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null},o=this[Ae];null==this.handlers&&(this.handlers=[]),je(this,o);const s=o.nextId++;return this.handlers.push(r),o.handlerEntries.set(s,{handler:r,index:this.handlers.length-1}),o.handlersLength=this.handlers.length,s}eject(e){const t=this[Ae];je(this,t);const n=function(e){return"string"==typeof e&&""!==e&&String(Number(e))===e?Number(e):e}(e),r=t.handlerEntries.get(n);if(r){if(t.handlerEntries.delete(n),this.handlers[r.index]!==r.handler)return;this.handlers[r.index]=null,t.iterationDepth||(Te(this.handlers),t.handlersLength=this.handlers.length)}}clear(){this.handlers&&(this.handlers=[],je(this,this[Ae]))}forEach(e){const t=this[Ae];je(this,t),t.iterationDepth++;try{Z.forEach(this.handlers,function(t){null!==t&&e(t)})}finally{--t.iterationDepth||(je(this,t),Te(this.handlers),t.handlersLength=Pe(this.handlers))}}}var Ne={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1,validateStatusUndefinedResolves:!0,encodeBasicAuthUsername:!1},xe={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:Re,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]};const Ue="undefined"!=typeof window&&"undefined"!=typeof document,De="object"==typeof navigator&&navigator||void 0,Le=Ue&&(!De||["ReactNative","NativeScript","NS"].indexOf(De.product)<0),Fe="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,Be=Ue&&window.location.href||"http://localhost";var ke={...Object.freeze({__proto__:null,hasBrowserEnv:Ue,hasStandardBrowserEnv:Le,hasStandardBrowserWebWorkerEnv:Fe,navigator:De,origin:Be}),...xe};function Ie(e){if(e>100)throw new me("FormData field is too deeply nested ("+e+" levels). Max depth: 100",me.ERR_FORM_DATA_DEPTH_EXCEEDED)}function qe(e){const t={},n=Object.keys(e);let r;const o=n.length;let s;for(r=0;re!==String(t))?qe(e):e}function ze(e){function t(e,n,r,o){Ie(o);let s=e[o++];if("__proto__"===s)return!0;const i=Number.isFinite(+s),a=o>=e.length;if(s=!s&&Z.isArray(r)?r.length:s,a)return Z.hasOwnProp(r,s)?(r[s]=Me(r[s]),r[s]=Z.isArray(r[s])?r[s].concat(n):[r[s],n]):r[s]=n,!i;Z.hasOwnProp(r,s)&&Z.isObject(r[s])||(r[s]=[]);return t(e,n,r[s],o)&&Z.isArray(r[s])&&(r[s]=qe(r[s])),!i}if(Z.isFormData(e)&&Z.isFunction(e.entries)){const n={};return Z.forEachEntry(e,(e,r)=>{t(function(e){const t=[],n=/[^.[\]]+|\[([^.[\]]*)]/g;let r;for(;null!==(r=n.exec(e));)Ie(t.length),t.push("[]"===r[0]?"":r[1]||r[0]);return t}(e),r,n,0)}),function(e){const t=[e];for(;t.length;){const e=t.pop();Object.keys(e).forEach(n=>{const r=e[n]=Me(e[n]);(Z.isArray(r)||Z.isPlainObject(r))&&t.push(r)})}return e}(n)}return null}const $e=Object.freeze(["get","delete","head","options","post","put","patch","purge","link","unlink","query"]),He=(e,t)=>null!=e&&Z.hasOwnProp(e,t)?e[t]:void 0;const We={transitional:Ne,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const n=t.getContentType()||"",r=n.indexOf("application/json")>-1,o=Z.isObject(e);o&&Z.isHTMLForm(e)&&(e=new FormData(e));if(Z.isFormData(e))return r?JSON.stringify(ze(e)):e;if(Z.isArrayBuffer(e)||Z.isBuffer(e)||Z.isStream(e)||Z.isFile(e)||Z.isBlob(e)||Z.isReadableStream(e))return e;if(Z.isArrayBufferView(e))return e.buffer;if(Z.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let s;if(o){const t=He(this,"formSerializer");if(n.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return Oe(e,new ke.classes.URLSearchParams,{visitor:function(e,t,n,r){return ke.isNode&&Z.isBuffer(e)?(this.append(t,e.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)},...t})}(e,t).toString();if((s=Z.isFileList(e))||n.indexOf("multipart/form-data")>-1){const n=He(this,"env"),r=n&&n.FormData;return Oe(s?{"files[]":e}:e,r&&new r,t)}}return o||r?(t.setContentType("application/json",!1),function(e,t,n){if(Z.isString(e))try{return(t||JSON.parse)(e),Z.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(n||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=He(this,"transitional")||We.transitional,n=t&&t.forcedJSONParsing,r=He(this,"responseType"),o="json"===r;if(Z.isResponse(e)||Z.isReadableStream(e))return e;if(e&&Z.isString(e)&&(n&&!r||o)){const n=!(t&&t.silentJSONParsing)&&o;try{return JSON.parse(e,He(this,"parseReviver"))}catch(e){if(n){if("SyntaxError"===e.name)throw me.from(e,me.ERR_BAD_RESPONSE,this,null,He(this,"response"));throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:ke.classes.FormData,Blob:ke.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};function Je(e,t){const n=this||We,r=t||n,o=ue.from(r.headers);let s=r.data;return Z.forEach(e,function(e){s=e.call(n,s,o.normalize(),t?t.status:void 0)}),o.normalize(),s}function Ve(e){return!(!e||!e.__CANCEL__)}Z.forEach($e,e=>{We.headers[e]={}});let Ke=class extends me{constructor(e,t,n){super(null==e?"canceled":e,me.ERR_CANCELED,t,n),this.name="CanceledError",this.__CANCEL__=!0}};function Xe(e,t,n){const r=n.config.validateStatus;n.status&&r&&!r(n.status)?t(new me("Request failed with status code "+n.status,n.status>=400&&n.status<500?me.ERR_BAD_REQUEST:me.ERR_BAD_RESPONSE,n.config,n.request,n)):e(n)}const Qe=/[\t\n\r]/g;function Ze(e){if("string"!=typeof e)return e;let t=0;for(;t{try{return decodeURIComponent(e)}catch(t){return e}};var et=ke.hasStandardBrowserEnv?{write(e,t,n,r,o,s,i){if("undefined"==typeof document)return;const a=[`${e}=${encodeURIComponent(t)}`];Z.isNumber(n)&&a.push(`expires=${new Date(n).toUTCString()}`),Z.isString(r)&&a.push(`path=${r}`),Z.isString(o)&&a.push(`domain=${o}`),!0===s&&a.push("secure"),Z.isString(i)&&a.push(`SameSite=${i}`),document.cookie=a.join("; ")},read(e){if("undefined"==typeof document)return null;const t=document.cookie;if(!t)return null;const n=t.split(";");for(let t=0;tnull,readAsync:async()=>null,remove(){}};const tt=(e,t,n=3)=>{let r=0;const o=function(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o,s=0,i=0;return t=void 0!==t?t:1e3,function(a){const c=Date.now(),l=r[i];o||(o=c),n[s]=a,r[s]=c;let u=i,f=0;for(;u!==s;)f+=n[u++],u%=e;if(s=(s+1)%e,s===i&&(i=(i+1)%e),c-o{o=s,n=null,r&&(clearTimeout(r),r=null),e(...t)};return[(...e)=>{const t=Date.now(),a=t-o;a>=s?i(e,t):(n=e,r||(r=setTimeout(()=>{r=null,i(n)},s-a)))},()=>n&&i(n),(...e)=>i(e)]}(n=>{if(!n||!Z.isNumber(n.loaded))return;const s=n.loaded,i=n.lengthComputable?n.total:void 0,a=Math.max(0,null!=i?Math.min(s,i):s),c=Math.max(0,a-r),l=o(c);r=Math.max(r,a);e({loaded:a,total:i,progress:i?a/i:void 0,bytes:c,rate:l||void 0,estimated:l&&i?(i-a)/l:void 0,event:n,lengthComputable:null!=i,[t?"download":"upload"]:!0})},n)},nt=(e,t)=>{const n=null!=e;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},rt=(e,t=Z.asap)=>(...n)=>t(()=>e(...n));var ot=ke.hasStandardBrowserEnv?(e=>t=>(t=new URL(t,document.baseURI||ke.origin),e.protocol===t.protocol&&e.host===t.host&&e.port===t.port))(new URL(ke.origin)):()=>!0;const st=/^https?:(?!\/\/)/i;function it(e){const t=e.replace(/^(https?:\/{0,2})[^/?#]*@/i,`$1${fe}@`),n=t.indexOf("#"),r=(-1===n?t:t.slice(0,n)).replace(/([?&][^=&#]*=)[^&#]*/g,`$1${fe}`);return-1===n?r:`${r}#${o=t.slice(n+1),o?o.replace(/(^|&)([^=&]*=)?[^&]+/g,(e,t,n="")=>`${t}${n}${fe}`):o}`;var o}function at(e,t){if("string"==typeof e){const n=Ze(e);if(st.test(n))throw new me(`Invalid URL ${JSON.stringify(it(n))}: missing "//" after protocol`,me.ERR_INVALID_URL,t)}}function ct(e,t,n,r){at(t,r);let o=!("string"==typeof(s=t)&&/^([a-z][a-z\d+\-.]*:)?\/\//i.test(s));var s;return e&&(o||!1===n)?(at(e,r),function(e,t){if(!t)return e;let n=e.length;for(;n>0&&47===e.charCodeAt(n-1);)n--;return e.slice(0,n)+"/"+t.replace(/^\/+/,"")}(e,t)):t}const lt=e=>e instanceof ue?{...e}:e,ut=e=>Object.getOwnPropertySymbols&&Object.getOwnPropertyDescriptor?Object.keys(e).concat(Object.getOwnPropertySymbols(e).filter(t=>{const n=Object.getOwnPropertyDescriptor(e,t);return n&&n.enumerable})):Object.keys(e);function ft(e,t,n,r){return Z.isPlainObject(e)&&Z.isPlainObject(t)?Z.merge.call({caseless:r},e,t):Z.isPlainObject(t)?Z.merge({},t):Z.isArray(t)?t.slice():t}function dt(e,t,n,r){return Z.isUndefined(t)?Z.isUndefined(e)?void 0:ft(void 0,e,0,r):ft(e,t,0,r)}function pt(e,t){if(!Z.isUndefined(t))return ft(void 0,t)}function ht(e,t){return Z.isUndefined(t)?Z.isUndefined(e)?void 0:ft(void 0,e):ft(void 0,t)}function mt(e,t,n,r,o){return Z.hasOwnProp(o,n)?ft(e,t):Z.hasOwnProp(r,n)?ft(void 0,e):void 0}const gt=Object.freeze({__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0}),bt={url:pt,method:pt,data:pt,baseURL:ht,transformRequest:ht,transformResponse:ht,params:function(e,t){const n=[],r=new WeakMap,o={};function s(e,t){if(!Z.isPlainObject(t))return Z.isArray(t)?t.slice():t;const s=Z.isPlainObject(e)?e:o;let i=r.get(t);if(i||(i=new WeakMap,r.set(t,i)),i.has(s))return i.get(s);const a={};return i.set(s,a),n.push({base:s,source:t,result:a}),a}const i=Z.isUndefined(t)?s(void 0,e):s(e,t);for(;n.length;){const{base:e,source:t,result:r}=n.pop(),o=new Set(ut(e)),i=new Set(ut(t));new Set([...o,...i]).forEach(n=>{if("__proto__"===n||"constructor"===n||"prototype"===n)return;const a=i.has(n),c=a?t[n]:void 0,l=a&&!Z.isPlainObject(c)||!o.has(n)?void 0:e[n];r[n]=a?s(l,c):s(void 0,l)})}return function(e){const t=[{value:e}],n=new WeakSet,r=new WeakSet;for(;t.length;){const{value:e,done:o}=t.pop();if(!Z.isPlainObject(e)&&!Z.isArray(e))continue;if(o){n.delete(e);continue}if(n.has(e))throw new me("Circular reference detected in params",me.ERR_BAD_OPTION_VALUE);if(r.has(e))continue;r.add(e),n.add(e),t.push({value:e,done:!0});const s=Object.keys(e);Object.getOwnPropertySymbols&&Object.getOwnPropertyDescriptor&&Object.getOwnPropertySymbols(e).forEach(t=>{const n=Object.getOwnPropertyDescriptor(e,t);n&&n.enumerable&&s.push(t)}),s.forEach(n=>{if("__proto__"===n||"constructor"===n||"prototype"===n){const r=Object.getOwnPropertyDescriptor(e,n);r&&Z.hasOwnProp(r,"value")&&t.push({value:r.value})}else t.push({value:e[n]})})}}(i),i},paramsSerializer:ht,timeout:ht,timeoutErrorMessage:ht,withCredentials:ht,withXSRFToken:ht,adapter:ht,responseType:ht,xsrfCookieName:ht,xsrfHeaderName:ht,onUploadProgress:ht,onDownloadProgress:ht,decompress:ht,maxContentLength:ht,maxBodyLength:ht,beforeRedirect:ht,transport:ht,httpAgent:ht,httpsAgent:ht,cancelToken:ht,socketPath:ht,allowedSocketPaths:ht,responseEncoding:ht,validateStatus:mt,headers:function(e,t,n){return dt(lt(e),lt(t),0,!0)}};function yt(e,t){e=e||{},t=t||{};const n=Object.create(null);Object.defineProperty(n,"hasOwnProperty",gt);const r=ut({...e,...t});for(let o=0,s=r.length;oencodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(e,t)=>String.fromCharCode(parseInt(t,16))),Et=e=>et.read(e);function Rt(e,t=Et){const n=yt({},e),r=e=>Z.hasOwnProp(n,e)?n[e]:void 0,o=r("data");let s=r("withXSRFToken");const i=r("xsrfHeaderName"),a=r("xsrfCookieName");let c=r("headers");const l=r("auth"),u=r("baseURL"),f=r("allowAbsoluteUrls"),d=r("url");if(n.headers=c=ue.from(c),n.url=ve(ct(u,d,f,n),r("params"),r("paramsSerializer")),l){const t=Z.getSafeProp(l,"username")||"",n=Z.getSafeProp(l,"password")||"",o=r("transitional"),s=o&&Z.hasOwnProp(o,"encodeBasicAuthUsername")&&!0===o.encodeBasicAuthUsername;try{c.set("Authorization","Basic "+btoa((s?Ot(t):t)+":"+(n?Ot(n):"")))}catch(t){throw me.from(t,me.ERR_BAD_OPTION_VALUE,e)}}if(Z.isFormData(o)){const e=Z.getSafeProp(o,"getHeaders");ke.hasStandardBrowserEnv||ke.hasStandardBrowserWebWorkerEnv||Z.isReactNative(o)?c.setContentType(void 0):Z.isFunction(e)&&function(e,t,n){"content-only"===n?Object.entries(t||{}).forEach(([t,n])=>{wt.includes(t.toLowerCase())&&e.set(t,n)}):e.set(t)}(c,e.call(o),r("formDataHeaderPolicy"))}if(ke.hasStandardBrowserEnv){Z.isFunction(s)&&(s=s(n));if(!0===s||null==s&&ot(n.url)){const e=i&&a&&t(a);e&&c.set(i,e)}}return n}var St="undefined"!=typeof XMLHttpRequest&&function(e){return new Promise(function(t,n){let r,o;try{const e=ke.hasStandardBrowserEnv&&"undefined"!=typeof window&&window.cookieStore;r=e&&Z.isFunction(e.get)}catch(e){}const s=Rt(e,r?e=>(o=e,null):void 0);let i=s.data;const a=ue.from(s.headers).normalize();let c,l,u,f,d,p,h,{responseType:m,onUploadProgress:g,onDownloadProgress:b}=s;function y(){clearTimeout(l);try{d&&d()}catch(e){setTimeout(()=>{throw e})}try{p&&p()}catch(e){setTimeout(()=>{throw e})}w&&(f&&w.removeEventListener("progress",f),w.upload&&(u&&w.upload.removeEventListener("progress",u),d&&w.upload.removeEventListener("loadend",d))),s.cancelToken&&s.cancelToken.unsubscribe(c),s.signal&&s.signal.removeEventListener("abort",c)}let w=new XMLHttpRequest;function O(r){if(!w)return;if(!(0!==w.status||"file"===(Ge(Ze(s.url))||Ge(ke.origin))||w.responseURL&&w.responseURL.startsWith("file:")))return n(new me("Request aborted",me.ECONNABORTED,e,w)),y(),void(w=null);try{r?h&&h(r):p&&p()}catch(e){setTimeout(()=>{throw e})}if(!w)return;const o=ue.from("getAllResponseHeaders"in w&&w.getAllResponseHeaders());Xe(function(e){t(e),y()},function(e){n(e),y()},{data:m&&"text"!==m&&"json"!==m?w.response:w.responseText,status:w.status,statusText:w.statusText,headers:o,config:e,request:w}),w=null}if(w.open(s.method.toUpperCase(),s.url,!0),w.timeout=s.timeout,"onloadend"in w?w.onloadend=O:w.onreadystatechange=function(){w&&4===w.readyState&&(0!==w.status||w.responseURL&&w.responseURL.startsWith("file:"))&&setTimeout(O)},w.onabort=function(){w&&(n(new me("Request aborted",me.ECONNABORTED,e,w)),y(),w=null)},w.onerror=function(t){const r=t&&t.message?t.message:"Network Error",o=new me(r,me.ERR_NETWORK,e,w);o.event=t||null,n(o),y(),w=null},w.ontimeout=function(){if(!w)return;let t=s.timeout?"timeout of "+s.timeout+"ms exceeded":"timeout exceeded";const r=s.transitional||Ne;s.timeoutErrorMessage&&(t=s.timeoutErrorMessage),n(new me(t,r.clarifyTimeoutError?me.ETIMEDOUT:me.ECONNABORTED,e,w)),y(),w=null},void 0===i&&a.setContentType(null),Z.isUndefined(s.withCredentials)||(w.withCredentials=!!s.withCredentials),m&&"json"!==m&&(w.responseType=s.responseType),b&&([f,p,h]=tt(b,!0),w.addEventListener("progress",f)),g&&w.upload&&([u,d]=tt(g),w.upload.addEventListener("progress",u),w.upload.addEventListener("loadend",d)),s.cancelToken||s.signal){if(c=t=>{if(!w)return;n(!t||t.type?new Ke(null,e,w):t);const r=w;y(),w=null,r.abort()},s.cancelToken&&s.cancelToken.subscribe(c),!w)return;s.signal&&(s.signal.aborted?c():s.signal.addEventListener("abort",c))}if(!w)return;const E=Ge(s.url);if(E&&!ke.protocols.includes(E))return n(new me("Unsupported protocol "+E+":",me.ERR_BAD_REQUEST,e)),void y();const R=()=>{w&&("setRequestHeader"in w&&Z.forEach(ne(a),function(e,t){w.setRequestHeader(t,e)}),w.send(i||null))};if(o){const t="undefined"!=typeof performance&&Z.isFunction(performance.now)?()=>performance.now():Date.now,r=w.timeout>0?t()+Number(w.timeout):void 0,i=()=>{if(!w)return;const e=w;e.ontimeout(),e.abort()};if(void 0!==r){const e=()=>{const n=r-t();n>0?l=setTimeout(e,Math.min(n,2147483647)):i()};e()}et.readAsync(o).then(e=>{if(w)if(void 0!==r&&t()>=r)i();else{if(e){const t=Z.hasOwnProp(s,"xsrfHeaderName")&&s.xsrfHeaderName;a.set(t,e)}R()}}).catch(t=>{w&&(n(me.from(t,null,e,w)),y(),w=null)})}else R()})};const _t=(e,t)=>{if(e=e?e.filter(Boolean):[],!t&&!e.length)return;const n=new AbortController;let r=!1;const o=function(e){if(!r){r=!0,i();const t=e instanceof Error?e:this.reason;n.abort(t instanceof me?t:new Ke(t instanceof Error?t.message:t))}};let s=t&&setTimeout(()=>{s=null,o(new me(`timeout of ${t}ms exceeded`,me.ETIMEDOUT))},t);const i=()=>{e&&(s&&clearTimeout(s),s=null,e.forEach(e=>{const t=Z.getSafeProp(e,"unsubscribe");Z.isFunction(t)?t.call(e,o):e.removeEventListener("abort",o)}),e=null)};e.forEach(e=>{r||(e.aborted?o.call(e):e.addEventListener("abort",o,{once:!0}))});const{signal:a}=n;return a.unsubscribe=()=>Z.asap(i),a},vt=function*(e,t){let n=e.byteLength;if(n{const o=async function*(e,t){for await(const n of At(e))yield*vt(n,t)}(e,t);let s,i=0,a=e=>{s||(s=!0,r&&r(e))};return new ReadableStream({async pull(e){try{const{done:t,value:r}=await o.next();if(t)return a(),void e.close();let s=r.byteLength;if(n){let e=i+=s;n(e)}e.enqueue(new Uint8Array(r))}catch(e){throw a(e),e}},cancel:e=>(a(e),o.return())},{highWaterMark:2})},Tt="\r\n",jt=e=>String(e).replace(/\r\n|\r|\n/g,Tt),Ct=e=>String(e).replace(/[\r\n"]/g,e=>"\r"===e?"%0D":"\n"===e?"%0A":"%22"),Nt=(e,t)=>{let n=0;for(let r=0;r=55296&&o<=56319&&e.charCodeAt(r+1)>=56320&&e.charCodeAt(r+1)<=57343?(n+=4,r++):n+=3:(13===o&&10===e.charCodeAt(r+1)&&r++,n+=2)}return n};class xt extends TypeError{constructor(e,t){super(e),this.name="FormDataError",this.reason=t}}function Ut(e,t,n,r,o){if(!Z.isFunction(t))throw new me("Blob is not supported",me.ERR_NOT_SUPPORT);if(void 0===o)if(Z.isFunction(ke.generateString))o="axios-"+ke.generateString(36,"0123456789abcdef");else{const e=Z.global.crypto;if(!e||!Z.isFunction(e.getRandomValues))throw new me("Random byte generation is not supported",me.ERR_NOT_SUPPORT);const t=new Uint8Array(18);e.getRandomValues(t),o="axios-"+Array.from(t,e=>("0"+e.toString(16)).slice(-2)).join("")}try{return function(e,t,n,r,o){if(!Z.isFunction(t))throw new xt("Blob is not supported","blob");if(!Z.isString(o)||!/^[A-Za-z0-9'()+_,./:=? -]{1,70}$/.test(o)||/ $/.test(o))throw new xt("Invalid multipart boundary","boundary");const s="--"+o+"--"+Tt;let i=s.length;const a=[],c=e=>{if(i+e>n)throw r()};c(0);for(const[t,n]of e){const e=Z.isString(n),r=e?Nt(n,!0):n.size;if(!Number.isFinite(r)||r<0)throw new xt("Unsupported FormData part size","part");c(r+Nt(t,!0)+(!e&&n.name?Nt(n.name,!1):0)+(!e&&n.type?Nt(n.type,!1):0));let s="--"+o+'\r\nContent-Disposition: form-data; name="'+Ct(jt(t))+'"';e||(s+='; filename="'+Ct(Z.isString(n.name)?n.name:"blob")+'"\r\nContent-Type: '+String(n.type||"application/octet-stream").replace(/[\r\n]/g,"")),s+=Tt+Tt;const l=Nt(s,!1)+r+2;c(l),i+=l,a.push({header:s,value:n,isString:e})}const l=[];for(const e of a)l.push(e.header,e.isString?jt(e.value):e.value,Tt);return l.push(s),new t(l,{type:"multipart/form-data; boundary="+o})}(e,t,n,r,o)}catch(e){if(e instanceof xt){const t="boundary"===e.reason?me.ERR_BAD_OPTION_VALUE:me.ERR_BAD_REQUEST;throw new me(e.message,t)}throw e}}const Dt=e=>e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102,Lt=(e,t,n)=>t+2e<=57?e-48:(223&e)-55,Bt=e=>e>=65&&e<=90||e>=97&&e<=122||e>=48&&e<=57||43===e||47===e||45===e||95===e,kt=e=>9===e||10===e||12===e||13===e||32===e,It=e=>{const t=e.length;let n=0,r=0,o=!1;for(let s=0;s0?o=!0:n++:r++)}return o||r>2||r>0&&(n+r)%4!=0||n%4==1?(e=>{const t=e.length;let n=0;return t>0&&61===e.charCodeAt(t-1)&&(n++,t>1&&61===e.charCodeAt(t-2)&&n++),Math.floor(3*(t-n)/4)})(e):(e=>{const t=e%4;return 3*Math.floor(e/4)+(2===t?1:3===t?2:0)})(n)};function qt(e){const t="string"==typeof e?e.indexOf("#"):-1;return((e,t,n)=>{if(!e||"string"!=typeof e)return 0;if(!/^data:/i.test(e))return 0;const r=e.indexOf(",");if(r<0)return 0;const o=e.slice(5,r),s=e.slice(r+1);if(n.test(o))return t(s);let i=0;for(let e=0,t=s.length;e=55296&&n<=56319&&e+1=56320&&t<=57343?(i+=4,e++):i+=3}else i+=3}return i})(-1===t?e:e.slice(0,t),It,/; *base64[\t\n\f\r ]*$/i)}const Mt="1.21.1",zt={cache:"default",redirect:"follow",referrer:"about:client",referrerPolicy:"",mode:"cors",integrity:"",keepalive:!1,priority:"auto",window:null},{isFunction:$t}=Z,Ht=e=>{if(!Z.isString(e))return e;try{return decodeURIComponent(e)}catch(t){return e}},Wt=(e,...t)=>{try{return!!e(...t)}catch(e){return!1}},Jt=e=>{const t=void 0!==Z.global&&null!==Z.global?Z.global:globalThis,{ReadableStream:n,TextEncoder:r}=t;e=Z.merge.call({skipUndefined:!0},{Request:t.Request,Response:t.Response,Blob:t.Blob},e);const o=Z.hasOwnProp(e,"fetch")?e.fetch:void 0,{Request:s,Response:i,Blob:a}=e,c=o?$t(o):"function"==typeof fetch,l=$t(s),u=$t(i);if(!c)return!1;const f=c&&$t(n),d=c&&("function"==typeof r?(p=new r,e=>p.encode(e)):async e=>new Uint8Array(await new s(e).arrayBuffer()));var p;const h=l&&f&&Wt(()=>{let e=!1;const t=new s(ke.origin,{body:new n,method:"POST",get duplex(){return e=!0,"half"}}),r=t.headers.has("Content-Type");return null!=t.body&&t.body.cancel(),e&&!r}),m=u&&f&&Wt(()=>Z.isReadableStream(new i("").body)),g=Object.assign(Object.create(null),zt);l&&!Wt(()=>new s(ke.origin,g))&&(delete g.cache,Wt(()=>new s(ke.origin,g))||(g.cache=zt.cache));const b={stream:m&&(e=>e.body)};c&&["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!b[e]&&(b[e]=(t,n)=>{let r=t&&t[e];if(r)return r.call(t);throw new me(`Response type '${e}' is not supported`,me.ERR_NOT_SUPPORT,n)})});const y=async e=>null==e?0:Z.isBlob(e)?e.size:Z.isArrayBufferView(e)||Z.isArrayBuffer(e)?e.byteLength:(Z.isURLSearchParams(e)&&(e+=""),Z.isString(e)?(await d(e)).byteLength:void 0);return async e=>{let{url:t,method:n,data:c,signal:u,cancelToken:d,timeout:p,onDownloadProgress:w,onUploadProgress:O,responseType:E,headers:R,withCredentials:S="same-origin",fetchOptions:_,maxContentLength:v,maxBodyLength:A,maxRedirects:P}=Rt(e);const T=Z.isNumber(v)&&v>-1,j=Z.isNumber(A)&&A>-1,C=t=>Z.hasOwnProp(e,t)?e[t]:void 0;let N=o||fetch;E=E?(E+"").toLowerCase():"text";let x=_t([u,d&&d.toAbortSignal()],p),U=null;const D=x&&x.unsubscribe&&(()=>{x.unsubscribe()});let L,F=null,B=null;const k=()=>new me("Request body larger than maxBodyLength limit",me.ERR_BAD_REQUEST,e,U);try{let o;const u=C("auth");if(u){const e=Z.getSafeProp(u,"username")||"";o={username:e,password:Z.getSafeProp(u,"password")||""}}let d;if((e=>{const t=e.indexOf("://");let n=e;return-1!==t&&(n=n.slice(t+3)),n.includes("@")||n.includes(":")})(t)){if(d=new URL(t,ke.origin),!o&&(d.username||d.password)){const e=Ht(d.username);o={username:e,password:Ht(d.password)}}(d.username||d.password)&&(d.username="",d.password="",t=d.href)}if(o&&(R.delete("authorization"),R.set("Authorization","Basic "+btoa((I=(o.username||"")+":"+(o.password||""),encodeURIComponent(I).replace(/%([0-9A-F]{2})/gi,(e,t)=>String.fromCharCode(parseInt(t,16))))))),T&&d&&"data:"===d.protocol){if(qt(d.href)>v)throw new me("maxContentLength size of "+v+" exceeded",me.ERR_BAD_RESPONSE,e,U)}const p=Z.isSpecCompliantForm(c)&&ue.from(C("headers")).getContentType();let q;if(Z.isString(p)&&/^multipart\/form-data(?:\s*;|$)/i.test(p.trim())){const e=ue.parseParameters(p);Z.hasOwnProp(e,"boundary")&&(q=e.boundary)}if(Z.isSpecCompliantForm(c)&&"get"!==n&&"head"!==n&&(j||O&&h||void 0!==q)&&(c=Ut(c,a,j?A:1/0,k,q),R.setContentType(void 0===q?c.type:p),L=c.size),j&&"get"!==n&&"head"!==n){const e=await y(c);if("number"==typeof e&&isFinite(e)&&(L=e,e>A))throw k()}const M=j&&(Z.isReadableStream(c)||Z.isStream(c)),z=(e,t,n)=>Pt(e,65536,e=>{if(j&&e>A)throw F=k();t&&t(e)},n);if(h&&"get"!==n&&"head"!==n&&(O||M)){if(L=null==L?await(async(e,t)=>{const n=Z.toFiniteNumber(e.getContentLength());return null==n?y(t):n})(R,c):L,0!==L||M){let e,n=new s(t,{method:"POST",body:c,duplex:"half"});if(Z.isFormData(c)&&(e=n.headers.get("content-type"))&&R.setContentType(e),n.body){const[e,t]=O&&nt(L,tt(rt(O)))||[];c=z(n.body,e,t)}}}else if(M&&!l&&f&&"get"!==n&&"head"!==n)c=z(c);else if(M&&l&&!h&&"get"!==n&&"head"!==n)throw new me("Stream request bodies are not supported by the current fetch implementation",me.ERR_NOT_SUPPORT,e,U);Z.isString(S)||(S=S?"include":"omit");const $=l&&"credentials"in s.prototype;if(Z.isFormData(c)){const e=R.getContentType();e&&/^multipart\/form-data/i.test(e)&&!/boundary=/i.test(e)&&R.delete("content-type")}R.set("User-Agent","axios/"+Mt,!1);const H=null==_?_:Object.assign(Object.create(null),_);H&&(delete H.body,delete H.headers,delete H.method,delete H.signal,delete H.duplex,delete H.credentials);const W=Object.assign(Object.create(null),H,{signal:x,method:n.toUpperCase(),headers:ne(R.normalize()),body:c,duplex:"half",credentials:$?S:void 0});l&&(Z.forEach(g,(e,t)=>{void 0===W[t]&&(W[t]=e)}),void 0===W.signal&&(W.signal=null),void 0===W.body&&(W.body=null)),0===P&&(W.redirect="manual",H&&(H.redirect="manual")),U=l&&new s(t,W);let J=await(l?N(U,H):N(t,W));const V=ue.from(J.headers);if(T){const t=Z.toFiniteNumber(V.getContentLength());if(null!=t&&t>v)throw new me("maxContentLength size of "+v+" exceeded",me.ERR_BAD_RESPONSE,e,U)}const K=m&&("stream"===E||"response"===E);if(m&&J.body&&(w||T||K&&D)){const t={};["status","statusText","headers"].forEach(e=>{t[e]=J[e]});const n=Z.toFiniteNumber(V.getContentLength()),[r,o]=w&&nt(n,tt(rt(w),!0))||[];let s=0;const a=t=>{if(T&&(s=t,s>v))throw B=new me("maxContentLength size of "+v+" exceeded",me.ERR_BAD_RESPONSE,e,U);r&&r(t)};J=new i(Pt(J.body,65536,a,()=>{o&&o(),D&&D()}),t)}E=E||"text";let X=await b[Z.findKey(b,E)||"text"](J,e);if(T&&!m&&!K){let t;if(null!=X&&("number"==typeof X.byteLength?t=X.byteLength:"number"==typeof X.size?t=X.size:"string"==typeof X&&(t="function"==typeof r?(new r).encode(X).byteLength:X.length)),"number"==typeof t&&t>v)throw new me("maxContentLength size of "+v+" exceeded",me.ERR_BAD_RESPONSE,e,U)}return!K&&D&&D(),await new Promise((t,n)=>{Xe(t,n,{data:X,headers:ue.from(J.headers),status:J.status,statusText:J.statusText,config:e,request:U})})}catch(t){if(D&&D(),x&&x.aborted&&x.reason instanceof me){const n=x.reason;throw n.config=e,U&&(n.request=U),t!==n&&Object.defineProperty(n,"cause",{__proto__:null,value:t,writable:!0,enumerable:!1,configurable:!0}),n}if(F)throw U&&!F.request&&(F.request=U),F;if(B)throw B;if(t instanceof me)throw U&&!t.request&&(t.request=U),t;if(t&&"TypeError"===t.name&&/Load failed|fetch/i.test(t.message)){const n=new me("Network Error",me.ERR_NETWORK,e,U,t&&t.response);throw Object.defineProperty(n,"cause",{__proto__:null,value:t.cause||t,writable:!0,enumerable:!1,configurable:!0}),n}throw me.from(t,t&&t.code,e,U,t&&t.response)}var I}},Vt=new Map,Kt=e=>{const t=Object.create(null),n=e&&Z.hasOwnProp(e,"env")&&e.env;["fetch","Request","Response","Blob"].forEach(e=>{n&&Z.hasOwnProp(n,e)&&(t[e]=n[e])});const{fetch:r,Request:o,Response:s,Blob:i}=t,a=[o,s,r,i];let c,l,u=a.length,f=Vt;for(;u--;)c=a[u],l=f.get(c),void 0===l&&f.set(c,l=u?new Map:Jt(t)),f=l;return l};Kt();const Xt={http:null,xhr:St,fetch:{get:Kt}};Z.forEach(Xt,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{__proto__:null,value:t})}catch(e){}Object.defineProperty(e,"adapterName",{__proto__:null,value:t})}});const Qt=e=>`- ${e}`,Zt=e=>Z.isFunction(e)||null===e||!1===e;var Gt={getAdapter:function(e,t){e=Z.isArray(e)?e:[e];const{length:n}=e;let r,o;const s={};for(let i=0;i`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build"));let t=n?e.length>1?"since :\n"+e.map(Qt).join("\n"):" "+Qt(e[0]):"as no adapter specified";throw new me("There is no suitable adapter to dispatch the request "+t,me.ERR_NOT_SUPPORT)}return o},adapters:Xt};function Yt(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Ke(null,e)}function en(e,t){return Math.max(0,Math.round(e()-t))}function tn(e){const t=Z.toSafeFlatObject(e);Yt(t),t.headers=ue.from(Z.getSafeProp(t,"headers")),t.data=Je.call(t,t.transformRequest),-1!==["post","put","patch"].indexOf(t.method)&&t.headers.setContentType("application/x-www-form-urlencoded",!1);const n=Gt.getAdapter(t.adapter||We.adapter,t),r="undefined"!=typeof performance&&Z.isFunction(performance.now)?()=>performance.now():Date.now,o=r();return n(t).then(function(e){Yt(t),e.duration=en(r,o),t.response=e;try{e.data=Je.call(t,t.transformResponse,e)}finally{delete t.response}return e.headers=ue.from(e.headers),e},function(e){if(!Ve(e)&&(Yt(t),e&&e.response)){e.response.duration=en(r,o),t.response=e.response;try{e.response.data=Je.call(t,t.transformResponse,e.response)}finally{delete t.response}e.response.headers=ue.from(e.response.headers)}return Promise.reject(e)})}const nn={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{nn[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});const rn={};nn.transitional=function(e,t,n){function r(e,t){return"[Axios v"+Mt+"] Transitional option '"+e+"'"+t+(n?". "+n:"")}return(n,o,s)=>{if(!1===e)throw new me(r(o," has been removed"+(t?" in "+t:"")),me.ERR_DEPRECATED);return t&&!rn[o]&&(rn[o]=!0,console.warn(r(o," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,o,s)}},nn.spelling=function(e){return(t,n)=>(console.warn(`${n} is likely a misspelling of ${e}`),!0)};var on={assertOptions:function(e,t,n){if("object"!=typeof e||null===e)throw new me("options must be an object",me.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let o=r.length;for(;o-- >0;){const s=r[o],i=Object.prototype.hasOwnProperty.call(t,s)?t[s]:void 0;if(i){const t=e[s],n=void 0===t||i(t,s,e);if(!0!==n)throw new me("option "+s+" must be "+n,me.ERR_BAD_OPTION_VALUE);continue}if(!0!==n)throw new me("Unknown option "+s,me.ERR_BAD_OPTION)}},validators:nn};const sn=on.validators,an=e=>{if(null==e||Z.isPlainObject(e)||e instanceof ue)return!0;try{return Z.isObject(e)&&"AxiosHeaders"===Z.getSafeProp(e,Symbol.toStringTag)&&["toJSON","set","get","has","delete","clear","normalize","concat","toString",Symbol.iterator].every(t=>Z.isFunction(Z.getSafeProp(e,t)))}catch(e){return!1}};let cn=class{constructor(e){this.defaults=e||{},this.interceptors={request:new Ce,response:new Ce}}async request(e,t){try{return await this._request(e,t)}catch(e){if(e instanceof Error)try{let t={};Error.captureStackTrace?Error.captureStackTrace(t):t=new Error;const n=t.stack;let r="";if("string"==typeof n){const e=n.indexOf("\n");r=-1===e?"":n.slice(e+1)}if(e.stack){if(r){const t=r.indexOf("\n"),n=-1===t?-1:r.indexOf("\n",t+1),o=-1===n?r:r.slice(n+1),s=String(e.stack),i=function(e,t){const n=Z.hasOwnProp(e,he)&&e[he];return n&&t.endsWith(n)?t.length-n.length:-1}(e,s),a=-1===i?s:s.slice(0,i),c=-1===i?"":s.slice(i);a.endsWith(o)||(e.stack=a+"\n"+r+c)}}else e.stack=r}catch(e){}throw e}}_request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=yt(this.defaults,t);const{transitional:n,paramsSerializer:r,headers:o}=t;void 0!==n&&on.assertOptions(n,{silentJSONParsing:sn.transitional(sn.boolean),forcedJSONParsing:sn.transitional(sn.boolean),clarifyTimeoutError:sn.transitional(sn.boolean),legacyInterceptorReqResOrdering:sn.transitional(sn.boolean),advertiseZstdAcceptEncoding:sn.transitional(sn.boolean),validateStatusUndefinedResolves:sn.transitional(sn.boolean),encodeBasicAuthUsername:sn.transitional(sn.boolean)},!1),null!=r&&(Z.isFunction(r)?t.paramsSerializer={serialize:r}:on.assertOptions(r,{encode:sn.function,serialize:sn.function},!0)),void 0!==t.allowAbsoluteUrls||(Z.hasOwnProp(this.defaults,"allowAbsoluteUrls")&&void 0!==this.defaults.allowAbsoluteUrls?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),on.assertOptions(t,{baseUrl:sn.spelling("baseURL"),withXsrfToken:sn.spelling("withXSRFToken")},!0),t.method=(Z.getSafeProp(t,"method")||Z.getSafeProp(this.defaults,"method")||"get").toLowerCase();const s=Z.getSafeProp(o,"common"),i=Z.getSafeProp(o,t.method),a=o&&Z.merge(an(s)?s:void 0,an(i)?i:void 0);o&&Z.forEach($e.concat("common"),e=>{an(Z.getSafeProp(o,e))&&delete o[e]}),t.headers=ue.concat(a,o);const c=[];let l=!0;this.interceptors.request.forEach(function(e){if("function"==typeof e.runWhen&&!1===e.runWhen(t))return;l=l&&e.synchronous;const n=t.transitional||Ne;n&&n.legacyInterceptorReqResOrdering?c.unshift(e.fulfilled,e.rejected):c.push(e.fulfilled,e.rejected)});const u=[];let f;this.interceptors.response.forEach(function(e){u.push(e.fulfilled,e.rejected)});let d,p=0;if(!l){const e=[tn.bind(this),void 0];for(e.unshift(...c),e.push(...u),d=e.length,f=Promise.resolve(t);ptn.call(this,h)))}catch(e){f=Promise.reject(e)}break}}if(!f)try{f=tn.call(this,h)}catch(e){f=Promise.reject(e)}for(p=0,d=u.length;p{void 0===ln[t]&&(ln[t]=e)});const un=function t(n){const r=new cn(n),o=e(cn.prototype.request,r);return Z.extend(o,cn.prototype,r,{allOwnKeys:!0}),Z.extend(o,r,null,{allOwnKeys:!0}),o.create=function(e){return t(yt(n,e))},o}(We);un.Axios=cn,un.CanceledError=Ke,un.CancelToken=class e{constructor(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");let t;this.promise=new Promise(function(e){t=e});const n=this;this.promise.then(e=>{if(!n._listeners)return;let t=n._listeners.length;for(;t-- >0;)n._listeners[t](e);n._listeners=null}),this.promise.then=e=>{let t;const r=new Promise(e=>{n.subscribe(e),t=e}).then(e);return r.cancel=function(){n.unsubscribe(t)},r},e(function(e,r,o){n.reason||(n.reason=new Ke(e,r,o),t(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}toAbortSignal(){const e=new AbortController,t=t=>{e.abort(t)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let t;return{token:new e(function(e){t=e}),cancel:t}}},un.isCancel=Ve,un.VERSION=Mt,un.toFormData=Oe,un.AxiosError=me,un.Cancel=un.CanceledError,un.all=function(e){return Promise.all(e)},un.spread=function(e){return function(t){return e.apply(null,t)}},un.isAxiosError=function(e){return Z.isObject(e)&&!0===e.isAxiosError},un.mergeConfig=yt,un.AxiosHeaders=ue,un.formToJSON=e=>ze(Z.isHTMLForm(e)?new FormData(e):e),un.getAdapter=Gt.getAdapter,un.HttpStatusCode=ln,un.default=un;const{Axios:fn,AxiosError:dn,CanceledError:pn,isCancel:hn,CancelToken:mn,VERSION:gn,all:bn,Cancel:yn,isAxiosError:wn,spread:On,toFormData:En,AxiosHeaders:Rn,HttpStatusCode:Sn,formToJSON:_n,getAdapter:vn,mergeConfig:An,create:Pn}=un;export{fn as Axios,dn as AxiosError,Rn as AxiosHeaders,yn as Cancel,mn as CancelToken,pn as CanceledError,Sn as HttpStatusCode,gn as VERSION,bn as all,Pn as create,un as default,_n as formToJSON,vn as getAdapter,wn as isAxiosError,hn as isCancel,An as mergeConfig,On as spread,En as toFormData}; +//# sourceMappingURL=axios.min.js.map diff --git a/node_modules/axios/dist/esm/axios.min.js.map b/node_modules/axios/dist/esm/axios.min.js.map new file mode 100644 index 0000000..45c2735 --- /dev/null +++ b/node_modules/axios/dist/esm/axios.min.js.map @@ -0,0 +1 @@ +{"version":3,"file":"axios.min.js","sources":["../../lib/helpers/bind.js","../../lib/utils.js","../../lib/helpers/parseHeaders.js","../../lib/helpers/sanitizeHeaderValue.js","../../lib/core/AxiosHeaders.js","../../lib/core/AxiosError.js","../../lib/helpers/toFormData.js","../../lib/helpers/AxiosURLSearchParams.js","../../lib/helpers/buildURL.js","../../lib/core/InterceptorManager.js","../../lib/defaults/transitional.js","../../lib/platform/browser/index.js","../../lib/platform/browser/classes/URLSearchParams.js","../../lib/platform/browser/classes/FormData.js","../../lib/platform/browser/classes/Blob.js","../../lib/platform/common/utils.js","../../lib/platform/index.js","../../lib/helpers/formDataToJSON.js","../../lib/core/methodList.js","../../lib/defaults/index.js","../../lib/helpers/toURLEncodedForm.js","../../lib/core/transformData.js","../../lib/cancel/isCancel.js","../../lib/cancel/CanceledError.js","../../lib/core/settle.js","../../lib/helpers/normalizeURLForProtocolCheck.js","../../lib/helpers/parseProtocol.js","../../lib/helpers/cookies.js","../../lib/helpers/progressEventReducer.js","../../lib/helpers/speedometer.js","../../lib/helpers/throttle.js","../../lib/helpers/isURLSameOrigin.js","../../lib/core/buildFullPath.js","../../lib/helpers/isAbsoluteURL.js","../../lib/helpers/combineURLs.js","../../lib/core/mergeConfig.js","../../lib/core/assertParamsAcyclic.js","../../lib/core/setFormDataHeaders.js","../../lib/helpers/resolveConfig.js","../../lib/adapters/xhr.js","../../lib/helpers/composeSignals.js","../../lib/helpers/trackStream.js","../../lib/helpers/formDataToBlob.js","../../lib/core/createMultipartBody.js","../../lib/helpers/estimateDataURLDecodedBytes.js","../../lib/env/data.js","../../lib/adapters/fetch.js","../../lib/adapters/adapters.js","../../lib/helpers/null.js","../../lib/core/dispatchRequest.js","../../lib/helpers/validator.js","../../lib/core/Axios.js","../../lib/helpers/HttpStatusCode.js","../../lib/axios.js","../../lib/cancel/CancelToken.js","../../lib/helpers/spread.js","../../lib/helpers/isAxiosError.js","../../index.js"],"sourcesContent":["'use strict';\n\n/**\n * Create a bound version of a function with a specified `this` context\n *\n * @param {Function} fn - The function to bind\n * @param {*} thisArg - The value to be passed as the `this` parameter\n * @returns {Function} A new function that will call the original function with the specified `this` context\n */\nexport default function bind(fn, thisArg) {\n return function wrap() {\n return fn.apply(thisArg, arguments);\n };\n}\n","'use strict';\n\nimport bind from './helpers/bind.js';\n\n// utils is a library of generic helper functions non-specific to axios\n\nconst { toString } = Object.prototype;\nconst { getPrototypeOf } = Object;\nconst { iterator, toStringTag } = Symbol;\n\n/* Creating a function that will check if an object has a property. */\nconst hasOwnProperty = (\n ({ hasOwnProperty }) =>\n (obj, prop) =>\n hasOwnProperty.call(obj, prop)\n)(Object.prototype);\n\nconst isUnsafeObjectKey = (prop) =>\n typeof prop === 'string' &&\n (prop === '__proto__' || prop === 'constructor' || prop === 'prototype');\n\n/**\n * Determine whether an inherited object must be treated as a shared-prototype\n * boundary. Cross-realm Object.prototype objects cannot be distinguished\n * reliably from application-created null-prototype objects because their\n * properties are mutable, so all inherited terminal prototypes are excluded\n * as a fail-closed boundary. A null-prototype source still keeps its own\n * properties, as produced by mergeConfig and other safe materialization paths.\n *\n * @param {*} obj The object to inspect\n * @param {*} prototype The object's prototype\n * @param {boolean} source Whether obj is the original traversal source\n *\n * @returns {boolean} True when obj is a safe prototype traversal boundary\n */\nconst isPrototypeBoundary = (obj, prototype, source) =>\n obj === Object.prototype || (!source && prototype === null);\n\n/**\n * Determine whether an object can retain its identity through code paths that\n * add, replace, and remove config properties without bypassing unsafe-key\n * filtering. Immutable objects, unsafe-key-bearing objects, and objects with\n * accessor or restricted data properties must be materialized instead.\n *\n * @param {*} obj The object to inspect\n *\n * @returns {boolean} True when every own property is safe and fully mutable\n */\nconst isSafeAndFullyMutable = (obj) => {\n if (!Object.isExtensible(obj)) {\n return false;\n }\n\n const props = Object.getOwnPropertyNames(obj);\n\n if (Object.getOwnPropertySymbols) {\n props.push(...Object.getOwnPropertySymbols(obj));\n }\n\n return props.every((prop) => {\n if (isUnsafeObjectKey(prop)) {\n return false;\n }\n\n const descriptor = Object.getOwnPropertyDescriptor(obj, prop);\n\n return !!descriptor && descriptor.configurable && descriptor.writable === true;\n });\n};\n\n/**\n * Walk the prototype chain (excluding the source realm's Object.prototype)\n * looking for an own `prop`. This distinguishes genuine own/inherited members\n * — including class accessors and template prototypes — from members injected\n * via Object.prototype pollution (e.g. `Object.prototype.username = '...'`),\n * which live on Object.prototype itself and are therefore never matched.\n *\n * @param {*} thing The value whose chain to inspect\n * @param {string|symbol} prop The property key to look for\n *\n * @returns {boolean} True when `prop` is owned below Object.prototype\n */\nconst hasOwnInPrototypeChain = (thing, prop) => {\n let obj = thing;\n const seen = [];\n\n while (obj != null) {\n if (seen.indexOf(obj) !== -1) {\n return false;\n }\n seen.push(obj);\n\n const prototype = getPrototypeOf(obj);\n\n if (isPrototypeBoundary(obj, prototype, obj === thing)) {\n return false;\n }\n\n if (hasOwnProperty(obj, prop)) {\n return true;\n }\n obj = prototype;\n }\n return false;\n};\n\n/**\n * Read `obj[prop]` only when it is safe from Object.prototype pollution. Own\n * properties and members inherited from a non-Object.prototype source (a class\n * instance or template object) are honored; a value reachable only through a\n * polluted Object.prototype is ignored and `undefined` is returned.\n *\n * @param {*} obj The source object\n * @param {string|symbol} prop The property key to read\n *\n * @returns {*} The resolved value, or undefined when unsafe/absent\n */\nconst getSafeProp = (obj, prop) =>\n obj != null && hasOwnInPrototypeChain(obj, prop) ? obj[prop] : undefined;\n\n/**\n * Flatten an object and its application-defined prototype chain into a\n * null-prototype object. Members inherited only from the source realm's\n * Object.prototype are deliberately excluded, while class/template members\n * below that boundary are preserved.\n *\n * @param {*} thing The value to flatten\n *\n * @returns {*} A null-prototype copy, or the original value when it is already\n * structurally safe or is not an object\n */\nconst toSafeFlatObject = (thing) => {\n if (thing == null || (typeof thing !== 'object' && typeof thing !== 'function')) {\n return thing;\n }\n\n const sourcePrototype = getPrototypeOf(thing);\n\n if (sourcePrototype === null && isSafeAndFullyMutable(thing)) {\n return thing;\n }\n\n const result = Object.create(null);\n const merged = Object.create(null);\n const seen = [];\n let current = thing;\n\n while (current != null) {\n if (seen.indexOf(current) !== -1) {\n break;\n }\n\n seen.push(current);\n\n const prototype = current === thing ? sourcePrototype : getPrototypeOf(current);\n\n if (isPrototypeBoundary(current, prototype, current === thing)) {\n break;\n }\n\n const props = Object.getOwnPropertyNames(current);\n\n if (Object.getOwnPropertySymbols) {\n props.push(...Object.getOwnPropertySymbols(current));\n }\n\n for (const prop of props) {\n if (isUnsafeObjectKey(prop)) {\n continue;\n }\n\n if (!hasOwnProperty(merged, prop)) {\n result[prop] = thing[prop];\n merged[prop] = true;\n }\n }\n\n current = prototype;\n }\n\n return result;\n};\n\nconst kindOf = ((cache) => (thing) => {\n const str = toString.call(thing);\n return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase());\n})(Object.create(null));\n\nconst kindOfTest = (type) => {\n type = type.toLowerCase();\n return (thing) => kindOf(thing) === type;\n};\n\nconst typeOfTest = (type) => (thing) => typeof thing === type;\n\n/**\n * Determine if a value is a non-null object\n *\n * @param {Object} val The value to test\n *\n * @returns {boolean} True if value is an Array, otherwise false\n */\nconst { isArray } = Array;\n\n/**\n * Determine if a value is undefined\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if the value is undefined, otherwise false\n */\nconst isUndefined = typeOfTest('undefined');\n\n/**\n * Determine if a value is a Buffer\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Buffer, otherwise false\n */\nfunction isBuffer(val) {\n return (\n val !== null &&\n !isUndefined(val) &&\n val.constructor !== null &&\n !isUndefined(val.constructor) &&\n isFunction(val.constructor.isBuffer) &&\n val.constructor.isBuffer(val)\n );\n}\n\n/**\n * Determine if a value is an ArrayBuffer\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is an ArrayBuffer, otherwise false\n */\nconst isArrayBuffer = kindOfTest('ArrayBuffer');\n\n/**\n * Determine if a value is a view on an ArrayBuffer\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false\n */\nfunction isArrayBufferView(val) {\n let result;\n if (typeof ArrayBuffer !== 'undefined' && ArrayBuffer.isView) {\n result = ArrayBuffer.isView(val);\n } else {\n result = val && val.buffer && isArrayBuffer(val.buffer);\n }\n return result;\n}\n\n/**\n * Determine if a value is a String\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a String, otherwise false\n */\nconst isString = typeOfTest('string');\n\n/**\n * Determine if a value is a Function\n *\n * @param {*} val The value to test\n * @returns {boolean} True if value is a Function, otherwise false\n */\nconst isFunction = typeOfTest('function');\n\n/**\n * Determine if a value is a Number\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Number, otherwise false\n */\nconst isNumber = typeOfTest('number');\n\n/**\n * Determine if a value is an Object\n *\n * @param {*} thing The value to test\n *\n * @returns {boolean} True if value is an Object, otherwise false\n */\nconst isObject = (thing) => thing !== null && typeof thing === 'object';\n\n/**\n * Determine if a value is a Boolean\n *\n * @param {*} thing The value to test\n * @returns {boolean} True if value is a Boolean, otherwise false\n */\nconst isBoolean = (thing) => thing === true || thing === false;\n\n/**\n * Determine if a value is a plain Object\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a plain Object, otherwise false\n */\nconst isPlainObject = (val) => {\n if (!isObject(val)) {\n return false;\n }\n\n const prototype = getPrototypeOf(val);\n return (\n (prototype === null || prototype === Object.prototype || getPrototypeOf(prototype) === null) &&\n // Treat own Symbol.toStringTag or Symbol.iterator members as evidence the\n // value is tagged/iterable, ignoring members reachable only through shared\n // or terminal prototype boundaries. This is exactly what\n // hasOwnInPrototypeChain(val, prop) computes here: every prototype admitted\n // above (null, Object.prototype, or a terminal null-prototype template) is\n // a boundary, so the walk never inspects anything but `val`'s own members,\n // and stops before even those when `val` is itself the boundary\n // Object.prototype. Checking that inline avoids allocating the walker's\n // `seen` list twice per call on the mergeConfig / merge hot path.\n (isPrototypeBoundary(val, prototype, true) ||\n (!hasOwnProperty(val, toStringTag) && !hasOwnProperty(val, iterator)))\n );\n};\n\n/**\n * Determine if a value is an empty object (safely handles Buffers)\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is an empty object, otherwise false\n */\nconst isEmptyObject = (val) => {\n // Early return for non-objects or Buffers to prevent RangeError\n if (!isObject(val) || isBuffer(val)) {\n return false;\n }\n\n try {\n return Object.keys(val).length === 0 && Object.getPrototypeOf(val) === Object.prototype;\n } catch (e) {\n // Fallback for any other objects that might cause RangeError with Object.keys()\n return false;\n }\n};\n\n/**\n * Determine if a value is a Date\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Date, otherwise false\n */\nconst isDate = kindOfTest('Date');\n\n/**\n * Determine if a value is a File\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a File, otherwise false\n */\nconst isFile = kindOfTest('File');\n\n/**\n * Determine if a value is a React Native Blob\n * React Native \"blob\": an object with a `uri` attribute. Optionally, it can\n * also have a `name` and `type` attribute to specify filename and content type\n *\n * @see https://github.com/facebook/react-native/blob/26684cf3adf4094eb6c405d345a75bf8c7c0bf88/Libraries/Network/FormData.js#L68-L71\n *\n * @param {*} value The value to test\n *\n * @returns {boolean} True if value is a React Native Blob, otherwise false\n */\nconst isReactNativeBlob = (value) => {\n return !!(value && typeof value.uri !== 'undefined');\n};\n\n/**\n * Determine if environment is React Native\n * ReactNative `FormData` has a non-standard `getParts()` method\n *\n * @param {*} formData The formData to test\n *\n * @returns {boolean} True if environment is React Native, otherwise false\n */\nconst isReactNative = (formData) => formData && typeof formData.getParts !== 'undefined';\n\n/**\n * Determine if a value is a Blob\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Blob, otherwise false\n */\nconst isBlob = kindOfTest('Blob');\n\n/**\n * Determine if a value is a FileList\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a FileList, otherwise false\n */\nconst isFileList = kindOfTest('FileList');\nconst isSet = kindOfTest('Set');\n\n/**\n * Determine if a value is a Stream\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Stream, otherwise false\n */\nconst isStream = (val) => isObject(val) && isFunction(val.pipe);\n\n/**\n * Determine if a value is a FormData\n *\n * @param {*} thing The value to test\n *\n * @returns {boolean} True if value is an FormData, otherwise false\n */\nfunction getGlobal() {\n if (typeof globalThis !== 'undefined') return globalThis;\n if (typeof self !== 'undefined') return self;\n if (typeof window !== 'undefined') return window;\n if (typeof global !== 'undefined') return global;\n return {};\n}\n\nconst G = getGlobal();\nconst FormDataCtor = typeof G.FormData !== 'undefined' ? G.FormData : undefined;\n\nconst isFormData = (thing) => {\n if (!thing) return false;\n if (FormDataCtor && thing instanceof FormDataCtor) return true;\n // Reject plain objects inheriting directly from Object.prototype so prototype-pollution gadgets can't spoof FormData.\n const proto = getPrototypeOf(thing);\n if (!proto || proto === Object.prototype) return false;\n if (!isFunction(thing.append)) return false;\n const kind = kindOf(thing);\n return (\n kind === 'formdata' ||\n // detect form-data instance\n (kind === 'object' && isFunction(thing.toString) && thing.toString() === '[object FormData]')\n );\n};\n\n/**\n * Determine if a value is a URLSearchParams object\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a URLSearchParams object, otherwise false\n */\nconst isURLSearchParams = kindOfTest('URLSearchParams');\n\nconst [isReadableStream, isRequest, isResponse, isHeaders] = [\n 'ReadableStream',\n 'Request',\n 'Response',\n 'Headers',\n].map(kindOfTest);\n\n/**\n * Trim excess whitespace off the beginning and end of a string\n *\n * @param {String} str The String to trim\n *\n * @returns {String} The String freed of excess whitespace\n */\nconst trim = (str) => {\n return str.trim ? str.trim() : str.replace(/^[\\s\\uFEFF\\xA0]+|[\\s\\uFEFF\\xA0]+$/g, '');\n};\n/**\n * Iterate over an Array or an Object invoking a function for each item.\n *\n * If `obj` is an Array callback will be called passing\n * the value, index, and complete array for each item.\n *\n * If 'obj' is an Object callback will be called passing\n * the value, key, and complete object for each property.\n *\n * @param {Object|Array} obj The object to iterate\n * @param {Function} fn The callback to invoke for each item\n *\n * @param {Object} [options]\n * @param {Boolean} [options.allOwnKeys = false]\n * @returns {any}\n */\nfunction forEach(obj, fn, { allOwnKeys = false } = {}) {\n // Don't bother if no value provided\n if (obj === null || typeof obj === 'undefined') {\n return;\n }\n\n let i;\n let l;\n\n // Force an array if not already something iterable\n if (typeof obj !== 'object') {\n /*eslint no-param-reassign:0*/\n obj = [obj];\n }\n\n if (isArray(obj)) {\n // Iterate over array values\n for (i = 0, l = obj.length; i < l; i++) {\n fn.call(null, obj[i], i, obj);\n }\n } else {\n // Buffer check\n if (isBuffer(obj)) {\n return;\n }\n\n // Iterate over object keys\n const keys = allOwnKeys ? Object.getOwnPropertyNames(obj) : Object.keys(obj);\n const len = keys.length;\n let key;\n\n for (i = 0; i < len; i++) {\n key = keys[i];\n fn.call(null, obj[key], key, obj);\n }\n }\n}\n\n/**\n * Finds a key in an object, case-insensitive, returning the actual key name.\n * Returns null if the object is a Buffer or if no match is found.\n *\n * @param {Object} obj - The object to search.\n * @param {string} key - The key to find (case-insensitive).\n * @returns {?string} The actual key name if found, otherwise null.\n */\nfunction findKey(obj, key) {\n if (isBuffer(obj)) {\n return null;\n }\n\n key = key.toLowerCase();\n const keys = Object.keys(obj);\n let i = keys.length;\n let _key;\n while (i-- > 0) {\n _key = keys[i];\n if (key === _key.toLowerCase()) {\n return _key;\n }\n }\n return null;\n}\n\nconst _global = (() => {\n /*eslint no-undef:0*/\n if (typeof globalThis !== 'undefined') return globalThis;\n return typeof self !== 'undefined' ? self : typeof window !== 'undefined' ? window : global;\n})();\n\nconst isContextDefined = (context) => !isUndefined(context) && context !== _global;\n\n/**\n * Accepts varargs expecting each argument to be an object, then\n * immutably merges the properties of each object and returns result.\n *\n * When multiple objects contain the same key the later object in\n * the arguments list will take precedence.\n *\n * Example:\n *\n * ```js\n * const result = merge({foo: 123}, {foo: 456});\n * console.log(result.foo); // outputs 456\n * ```\n *\n * @param {Object} obj1 Object to merge\n *\n * @returns {Object} Result of all merge properties\n */\nfunction merge(...objs) {\n const { caseless, skipUndefined } = (isContextDefined(this) && this) || {};\n const result = {};\n // Caseless lookup only applies to string keys — symbol keys are\n // identity-matched. Every string key that reaches `result` passes through\n // this index first, so it can never hold two case variants of one key and a\n // lowercase -> key map is exactly what findKey(result, key) would rescan\n // Object.keys(result) for on each assignment.\n const lowerCaseKeys = caseless ? Object.create(null) : null;\n const assignValue = (val, key) => {\n // Skip dangerous property names to prevent prototype pollution\n if (key === '__proto__' || key === 'constructor' || key === 'prototype') {\n return;\n }\n\n let targetKey = key;\n if (lowerCaseKeys && typeof key === 'string') {\n const lowerKey = key.toLowerCase();\n const knownKey = lowerCaseKeys[lowerKey];\n // A key recorded but absent from `result` was skipped by skipUndefined;\n // the later spelling wins then, as it does for findKey.\n if (knownKey !== undefined && hasOwnProperty(result, knownKey)) {\n targetKey = knownKey;\n } else {\n lowerCaseKeys[lowerKey] = key;\n }\n }\n // Read via own-prop only — a bare `result[targetKey]` walks the prototype\n // chain, so a polluted Object.prototype value could surface here and get\n // copied into the merged result.\n const existing = hasOwnProperty(result, targetKey) ? result[targetKey] : undefined;\n if (isPlainObject(existing) && isPlainObject(val)) {\n result[targetKey] = merge(existing, val);\n } else if (isPlainObject(val)) {\n result[targetKey] = merge({}, val);\n } else if (isArray(val)) {\n result[targetKey] = val.slice();\n } else if (!skipUndefined || !isUndefined(val)) {\n result[targetKey] = val;\n }\n };\n\n for (let i = 0, l = objs.length; i < l; i++) {\n const source = objs[i];\n if (!source || isBuffer(source)) {\n continue;\n }\n\n forEach(source, assignValue);\n\n if (typeof source !== 'object' || isArray(source) || !Object.getOwnPropertySymbols) {\n continue;\n }\n\n const symbols = Object.getOwnPropertySymbols(source);\n for (let j = 0; j < symbols.length; j++) {\n const symbol = symbols[j];\n if (propertyIsEnumerable.call(source, symbol)) {\n assignValue(source[symbol], symbol);\n }\n }\n }\n return result;\n}\n\n/**\n * Extends object a by mutably adding to it the properties of object b.\n *\n * @param {Object} a The object to be extended\n * @param {Object} b The object to copy properties from\n * @param {Object} thisArg The object to bind function to\n *\n * @param {Object} [options]\n * @param {Boolean} [options.allOwnKeys]\n * @returns {Object} The resulting value of object a\n */\nconst extend = (a, b, thisArg, { allOwnKeys } = {}) => {\n forEach(\n b,\n (val, key) => {\n if (thisArg && isFunction(val)) {\n Object.defineProperty(a, key, {\n // Null-proto descriptor so a polluted Object.prototype.get cannot\n // hijack defineProperty's accessor-vs-data resolution.\n __proto__: null,\n value: bind(val, thisArg),\n writable: true,\n enumerable: true,\n configurable: true,\n });\n } else {\n Object.defineProperty(a, key, {\n __proto__: null,\n value: val,\n writable: true,\n enumerable: true,\n configurable: true,\n });\n }\n },\n { allOwnKeys }\n );\n return a;\n};\n\n/**\n * Remove byte order marker. This catches EF BB BF (the UTF-8 BOM)\n *\n * @param {string} content with BOM\n *\n * @returns {string} content value without BOM\n */\nconst stripBOM = (content) => {\n if (content.charCodeAt(0) === 0xfeff) {\n content = content.slice(1);\n }\n return content;\n};\n\n/**\n * Inherit the prototype methods from one constructor into another\n * @param {function} constructor\n * @param {function} superConstructor\n * @param {object} [props]\n * @param {object} [descriptors]\n *\n * @returns {void}\n */\nconst inherits = (constructor, superConstructor, props, descriptors) => {\n constructor.prototype = Object.create(superConstructor.prototype, descriptors);\n Object.defineProperty(constructor.prototype, 'constructor', {\n __proto__: null,\n value: constructor,\n writable: true,\n enumerable: false,\n configurable: true,\n });\n Object.defineProperty(constructor, 'super', {\n __proto__: null,\n value: superConstructor.prototype,\n });\n props && Object.assign(constructor.prototype, props);\n};\n\n/**\n * Resolve object with deep prototype chain to a flat object\n * @param {Object} sourceObj source object\n * @param {Object} [destObj]\n * @param {Function|Boolean} [filter]\n * @param {Function} [propFilter]\n *\n * @returns {Object}\n */\nconst toFlatObject = (sourceObj, destObj, filter, propFilter) => {\n let props;\n let i;\n let prop;\n const merged = {};\n\n destObj = destObj || {};\n // eslint-disable-next-line no-eq-null,eqeqeq\n if (sourceObj == null) return destObj;\n\n do {\n props = Object.getOwnPropertyNames(sourceObj);\n i = props.length;\n while (i-- > 0) {\n prop = props[i];\n if ((!propFilter || propFilter(prop, sourceObj, destObj)) && !merged[prop]) {\n destObj[prop] = sourceObj[prop];\n merged[prop] = true;\n }\n }\n sourceObj = filter !== false && getPrototypeOf(sourceObj);\n } while (sourceObj && (!filter || filter(sourceObj, destObj)) && sourceObj !== Object.prototype);\n\n return destObj;\n};\n\n/**\n * Determines whether a string ends with the characters of a specified string\n *\n * @param {String} str\n * @param {String} searchString\n * @param {Number} [position= 0]\n *\n * @returns {boolean}\n */\nconst endsWith = (str, searchString, position) => {\n str = String(str);\n if (position === undefined || position > str.length) {\n position = str.length;\n }\n position -= searchString.length;\n const lastIndex = str.indexOf(searchString, position);\n return lastIndex !== -1 && lastIndex === position;\n};\n\n/**\n * Returns new array from array like object or null if failed\n *\n * @param {*} [thing]\n *\n * @returns {?Array}\n */\nconst toArray = (thing) => {\n if (!thing) return null;\n if (isArray(thing)) return thing;\n let i = thing.length;\n if (!Number.isSafeInteger(i) || i < 0 || i > 0xffffffff) return null;\n\n // Bound the copy by actual indexed properties, including hidden and inherited\n // members of array-like collections, rather than by the declared length alone.\n const indexes = new Set();\n const seen = new Set();\n let source = thing;\n\n while (source != null && indexes.size < i) {\n if (seen.has(source)) return null;\n seen.add(source);\n\n const prototype = getPrototypeOf(source);\n if (isPrototypeBoundary(source, prototype, source === thing)) break;\n\n Object.getOwnPropertyNames(source).forEach((key) => {\n const index = +key;\n if (\n Number.isInteger(index) &&\n index >= 0 &&\n index < i &&\n String(index) === key &&\n hasOwnProperty(source, key)\n ) {\n indexes.add(index);\n }\n });\n source = prototype;\n }\n\n if (indexes.size !== i) return null;\n const arr = new Array(i);\n while (i-- > 0) {\n arr[i] = thing[i];\n }\n return arr;\n};\n\n/**\n * Checking if the Uint8Array exists and if it does, it returns a function that checks if the\n * thing passed in is an instance of Uint8Array\n *\n * @param {TypedArray}\n *\n * @returns {Array}\n */\n// eslint-disable-next-line func-names\nconst isTypedArray = ((TypedArray) => {\n // eslint-disable-next-line func-names\n return (thing) => {\n return TypedArray && thing instanceof TypedArray;\n };\n})(typeof Uint8Array !== 'undefined' && getPrototypeOf(Uint8Array));\n\n/**\n * For each entry in the object, call the function with the key and value.\n *\n * @param {Object} obj - The object to iterate over.\n * @param {Function} fn - The function to call for each entry.\n *\n * @returns {void}\n */\nconst forEachEntry = (obj, fn) => {\n const generator = obj && obj[iterator];\n\n const _iterator = generator.call(obj);\n\n let result;\n\n while ((result = _iterator.next()) && !result.done) {\n const pair = result.value;\n fn.call(obj, pair[0], pair[1]);\n }\n};\n\n/**\n * It takes a regular expression and a string, and returns an array of all the matches\n *\n * @param {string} regExp - The regular expression to match against.\n * @param {string} str - The string to search.\n *\n * @returns {Array}\n */\nconst matchAll = (regExp, str) => {\n let matches;\n const arr = [];\n\n while ((matches = regExp.exec(str)) !== null) {\n arr.push(matches);\n }\n\n return arr;\n};\n\n/* Checking if the kindOfTest function returns true when passed an HTMLFormElement. */\nconst isHTMLForm = kindOfTest('HTMLFormElement');\n\nconst toCamelCase = (str) => {\n return str.toLowerCase().replace(/[-_\\s]([a-z\\d])(\\w*)/g, function replacer(m, p1, p2) {\n return p1.toUpperCase() + p2;\n });\n};\n\nconst { propertyIsEnumerable } = Object.prototype;\n\n/**\n * Determine if a value is a RegExp object\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a RegExp object, otherwise false\n */\nconst isRegExp = kindOfTest('RegExp');\n\nconst reduceDescriptors = (obj, reducer) => {\n const descriptors = Object.getOwnPropertyDescriptors(obj);\n const reducedDescriptors = {};\n\n forEach(descriptors, (descriptor, name) => {\n let ret;\n if ((ret = reducer(descriptor, name, obj)) !== false) {\n reducedDescriptors[name] = ret || descriptor;\n }\n });\n\n Object.defineProperties(obj, reducedDescriptors);\n};\n\n/**\n * Makes all methods read-only\n * @param {Object} obj\n */\n\nconst freezeMethods = (obj) => {\n reduceDescriptors(obj, (descriptor, name) => {\n // skip restricted props in strict mode\n if (isFunction(obj) && ['arguments', 'caller', 'callee'].includes(name)) {\n return false;\n }\n\n const value = obj[name];\n\n if (!isFunction(value)) return;\n\n descriptor.enumerable = false;\n\n if ('writable' in descriptor) {\n descriptor.writable = false;\n return;\n }\n\n if (!descriptor.set) {\n descriptor.set = () => {\n throw Error(\"Can not rewrite read-only method '\" + name + \"'\");\n };\n }\n });\n};\n\n/**\n * Converts an array or a delimited string into an object set with values as keys and true as values.\n * Useful for fast membership checks.\n *\n * @param {Array|string} arrayOrString - The array or string to convert.\n * @param {string} delimiter - The delimiter to use if input is a string.\n * @returns {Object} An object with keys from the array or string, values set to true.\n */\nconst toObjectSet = (arrayOrString, delimiter) => {\n const obj = {};\n\n const define = (arr) => {\n arr.forEach((value) => {\n obj[value] = true;\n });\n };\n\n isArray(arrayOrString) ? define(arrayOrString) : define(String(arrayOrString).split(delimiter));\n\n return obj;\n};\n\nconst noop = () => {};\n\nconst toFiniteNumber = (value, defaultValue) => {\n return value != null && Number.isFinite((value = +value)) ? value : defaultValue;\n};\n\n/**\n * If the thing is a FormData object, return true, otherwise return false.\n *\n * @param {unknown} thing - The thing to check.\n *\n * @returns {boolean}\n */\nfunction isSpecCompliantForm(thing) {\n return !!(\n thing &&\n isFunction(thing.append) &&\n thing[toStringTag] === 'FormData' &&\n thing[iterator]\n );\n}\n\n/**\n * Recursively converts an object to a JSON-compatible object, handling circular references and Buffers.\n *\n * @param {Object} obj - The object to convert.\n * @returns {Object} The JSON-compatible object.\n */\nconst toJSONObject = (obj) => {\n const visited = new WeakSet();\n\n const visit = (source) => {\n if (isObject(source)) {\n if (visited.has(source)) {\n return;\n }\n\n //Buffer check\n if (isBuffer(source)) {\n return source;\n }\n\n if (!('toJSON' in source)) {\n // add-on descent / delete-on-ascent: preserves path semantics, so DAG nodes serialise at every occurrence (see #7230).\n visited.add(source);\n\n let target;\n\n if (isSet(source)) {\n target = [];\n for (const value of source) {\n const reducedValue = visit(value);\n !isUndefined(reducedValue) && target.push(reducedValue);\n }\n } else {\n target = isArray(source) ? [] : {};\n\n forEach(source, (value, key) => {\n const reducedValue = visit(value);\n !isUndefined(reducedValue) && (target[key] = reducedValue);\n });\n }\n\n visited.delete(source);\n\n return target;\n }\n }\n\n return source;\n };\n\n return visit(obj);\n};\n\n/**\n * Determines if a value is an async function.\n *\n * @param {*} thing - The value to test.\n * @returns {boolean} True if value is an async function, otherwise false.\n */\nconst isAsyncFn = kindOfTest('AsyncFunction');\n\n/**\n * Determines if a value is thenable (has then and catch methods).\n *\n * @param {*} thing - The value to test.\n * @returns {boolean} True if value is thenable, otherwise false.\n */\nconst isThenable = (thing) =>\n thing &&\n (isObject(thing) || isFunction(thing)) &&\n isFunction(thing.then) &&\n isFunction(thing.catch);\n\n// original code\n// https://github.com/DigitalBrainJS/AxiosPromise/blob/16deab13710ec09779922131f3fa5954320f83ab/lib/utils.js#L11-L34\n\n/**\n * Provides a cross-platform setImmediate implementation.\n * Uses native setImmediate if available, otherwise falls back to postMessage or setTimeout.\n *\n * @param {boolean} setImmediateSupported - Whether setImmediate is supported.\n * @param {boolean} postMessageSupported - Whether postMessage is supported.\n * @returns {Function} A function to schedule a callback asynchronously.\n */\nconst _setImmediate = ((setImmediateSupported, postMessageSupported) => {\n if (setImmediateSupported) {\n return setImmediate;\n }\n\n return postMessageSupported\n ? ((token, callbacks) => {\n _global.addEventListener(\n 'message',\n ({ source, data }) => {\n if (source === _global && data === token) {\n callbacks.length && callbacks.shift()();\n }\n },\n false\n );\n\n return (cb) => {\n callbacks.push(cb);\n _global.postMessage(token, '*');\n };\n })(`axios@${Math.random()}`, [])\n : (cb) => setTimeout(cb);\n})(typeof setImmediate === 'function', isFunction(_global.postMessage));\n\n/**\n * Schedules a microtask or asynchronous callback as soon as possible.\n * Uses queueMicrotask if available, otherwise falls back to process.nextTick or _setImmediate.\n *\n * @type {Function}\n */\nconst asap =\n typeof queueMicrotask !== 'undefined'\n ? queueMicrotask.bind(_global)\n : (typeof process !== 'undefined' && process.nextTick) || _setImmediate;\n\n// *********************\n\nconst isIterable = (thing) => thing != null && isFunction(thing[iterator]);\n\n/**\n * Determine if a value is iterable via an iterator that is NOT sourced solely\n * from a polluted Object.prototype. Use this instead of `isIterable` whenever\n * the iterable comes from untrusted input (e.g. user-supplied header sources),\n * so `Object.prototype[Symbol.iterator] = ...` cannot turn an ordinary object\n * into an attacker-controlled entries iterator.\n *\n * @param {*} thing The value to test\n *\n * @returns {boolean} True if value has a non-polluted iterator\n */\nconst isSafeIterable = (thing) =>\n thing != null && hasOwnInPrototypeChain(thing, iterator) && isIterable(thing);\n\nexport default {\n isArray,\n isArrayBuffer,\n isBuffer,\n isFormData,\n isArrayBufferView,\n isString,\n isNumber,\n isBoolean,\n isObject,\n isPlainObject,\n isEmptyObject,\n isReadableStream,\n isRequest,\n isResponse,\n isHeaders,\n isUndefined,\n isDate,\n isFile,\n isReactNativeBlob,\n isReactNative,\n isBlob,\n isRegExp,\n isFunction,\n isStream,\n isURLSearchParams,\n isTypedArray,\n isFileList,\n forEach,\n merge,\n extend,\n trim,\n stripBOM,\n inherits,\n toFlatObject,\n kindOf,\n kindOfTest,\n endsWith,\n toArray,\n forEachEntry,\n matchAll,\n isHTMLForm,\n hasOwnProperty,\n hasOwnProp: hasOwnProperty, // an alias to avoid ESLint no-prototype-builtins detection\n hasOwnInPrototypeChain,\n getSafeProp,\n toSafeFlatObject,\n reduceDescriptors,\n freezeMethods,\n toObjectSet,\n toCamelCase,\n noop,\n toFiniteNumber,\n findKey,\n global: _global,\n isContextDefined,\n isSpecCompliantForm,\n toJSONObject,\n isAsyncFn,\n isThenable,\n setImmediate: _setImmediate,\n asap,\n isIterable,\n isSafeIterable,\n};\n","'use strict';\n\nimport utils from '../utils.js';\n\n// RawAxiosHeaders whose duplicates are ignored by node\n// c.f. https://nodejs.org/api/http.html#http_message_headers\nconst ignoreDuplicateOf = utils.toObjectSet([\n 'age',\n 'authorization',\n 'content-length',\n 'content-type',\n 'etag',\n 'expires',\n 'from',\n 'host',\n 'if-modified-since',\n 'if-unmodified-since',\n 'last-modified',\n 'location',\n 'max-forwards',\n 'proxy-authorization',\n 'referer',\n 'retry-after',\n 'user-agent',\n]);\n\n/**\n * Parse headers into an object\n *\n * ```\n * Date: Wed, 27 Aug 2014 08:58:49 GMT\n * Content-Type: application/json\n * Connection: keep-alive\n * Transfer-Encoding: chunked\n * ```\n *\n * @param {String} rawHeaders Headers needing to be parsed\n *\n * @returns {Object} Headers parsed into an object\n */\nexport default (rawHeaders) => {\n // Header names are data, including __proto__; avoid inherited setters.\n const parsed = Object.create(null);\n let key;\n let val;\n let i;\n\n rawHeaders &&\n rawHeaders.split('\\n').forEach(function parser(line) {\n i = line.indexOf(':');\n key = line.substring(0, i).trim().toLowerCase();\n val = line.substring(i + 1).trim();\n\n const hasKey = utils.hasOwnProp(parsed, key);\n\n if (!key || (hasKey && utils.hasOwnProp(ignoreDuplicateOf, key))) {\n return;\n }\n\n if (key === 'set-cookie') {\n if (hasKey) {\n parsed[key].push(val);\n } else {\n parsed[key] = [val];\n }\n } else {\n parsed[key] = hasKey ? parsed[key] + ', ' + val : val;\n }\n });\n\n return parsed;\n};\n","'use strict';\n\nimport utils from '../utils.js';\n\nfunction trimSPorHTAB(str) {\n let start = 0;\n let end = str.length;\n\n while (start < end) {\n const code = str.charCodeAt(start);\n\n if (code !== 0x09 && code !== 0x20) {\n break;\n }\n\n start += 1;\n }\n\n while (end > start) {\n const code = str.charCodeAt(end - 1);\n\n if (code !== 0x09 && code !== 0x20) {\n break;\n }\n\n end -= 1;\n }\n\n return start === 0 && end === str.length ? str : str.slice(start, end);\n}\n\n// The control-code ranges are intentional: header sanitization strips C0/DEL bytes.\n// eslint-disable-next-line no-control-regex\nconst INVALID_UNICODE_HEADER_VALUE_CHARS = new RegExp('[\\\\u0000-\\\\u0008\\\\u000a-\\\\u001f\\\\u007f]+', 'g');\n// eslint-disable-next-line no-control-regex\nconst INVALID_BYTE_STRING_HEADER_VALUE_CHARS = new RegExp('[^\\\\u0009\\\\u0020-\\\\u007e\\\\u0080-\\\\u00ff]+', 'g');\n\nfunction sanitizeValue(value, invalidChars) {\n if (utils.isArray(value)) {\n return value.map((item) => sanitizeValue(item, invalidChars));\n }\n\n return trimSPorHTAB(String(value).replace(invalidChars, ''));\n}\n\nexport const sanitizeHeaderValue = (value) =>\n sanitizeValue(value, INVALID_UNICODE_HEADER_VALUE_CHARS);\n\nexport const sanitizeByteStringHeaderValue = (value) =>\n sanitizeValue(value, INVALID_BYTE_STRING_HEADER_VALUE_CHARS);\n\nexport function toByteStringHeaderObject(headers) {\n const byteStringHeaders = Object.create(null);\n\n utils.forEach(headers.toJSON(), (value, header) => {\n byteStringHeaders[header] = sanitizeByteStringHeaderValue(value);\n });\n\n return byteStringHeaders;\n}\n","'use strict';\n\nimport utils from '../utils.js';\nimport parseHeaders from '../helpers/parseHeaders.js';\nimport { sanitizeHeaderValue } from '../helpers/sanitizeHeaderValue.js';\n\nconst $internals = Symbol('internals');\n\nfunction normalizeHeader(header) {\n return header && String(header).trim().toLowerCase();\n}\n\nfunction normalizeValue(value) {\n if (value === false || value == null) {\n return value;\n }\n\n return utils.isArray(value) ? value.map(normalizeValue) : sanitizeHeaderValue(String(value));\n}\n\nfunction parseTokens(str) {\n const tokens = Object.create(null);\n const tokensRE = /([^\\s,;=]+)\\s*(?:=\\s*([^,;]+))?/g;\n let match;\n\n while ((match = tokensRE.exec(str))) {\n tokens[match[1]] = match[2];\n }\n\n return tokens;\n}\n\nconst parameterNameRE = /^[!#$%&'*+\\-.^_`|~0-9A-Za-z]+$/;\n\nfunction trimOWS(value) {\n let start = 0;\n let end = value.length;\n\n while (start < end) {\n const code = value.charCodeAt(start);\n\n if (code !== 0x09 && code !== 0x20) {\n break;\n }\n\n start += 1;\n }\n\n while (end > start) {\n const code = value.charCodeAt(end - 1);\n\n if (code !== 0x09 && code !== 0x20) {\n break;\n }\n\n end -= 1;\n }\n\n return start === 0 && end === value.length ? value : value.slice(start, end);\n}\n\nfunction decodeQuotedString(value) {\n const last = value.length - 1;\n\n if (last < 1 || value.charCodeAt(0) !== 0x22 || value.charCodeAt(last) !== 0x22) {\n return value;\n }\n\n let decoded = '';\n\n for (let i = 1; i < last; i++) {\n const code = value.charCodeAt(i);\n\n if (code === 0x22) {\n return value;\n }\n\n if (code === 0x5c) {\n i += 1;\n\n if (i >= last) {\n return value;\n }\n }\n\n decoded += value[i];\n }\n\n return decoded;\n}\n\nfunction parseParameters(value) {\n const parameters = Object.create(null);\n const str = String(value);\n let start = 0;\n let quoted = false;\n let escaped = false;\n\n function parseParameter(end) {\n const part = trimOWS(str.slice(start, end));\n const equals = part.indexOf('=');\n\n if (equals < 1) {\n return;\n }\n\n const name = trimOWS(part.slice(0, equals));\n\n if (!parameterNameRE.test(name)) {\n return;\n }\n\n const normalizedName = name.toLowerCase();\n\n if (\n normalizedName === '__proto__' ||\n normalizedName === 'constructor' ||\n normalizedName === 'prototype'\n ) {\n return;\n }\n\n const parameterValue = trimOWS(part.slice(equals + 1));\n parameters[normalizedName] = decodeQuotedString(parameterValue);\n }\n\n for (let i = 0; i < str.length; i++) {\n const code = str.charCodeAt(i);\n\n if (quoted) {\n if (escaped) {\n escaped = false;\n } else if (code === 0x5c) {\n escaped = true;\n } else if (code === 0x22) {\n quoted = false;\n }\n } else if (code === 0x22) {\n quoted = true;\n } else if (code === 0x2c || code === 0x3b) {\n parseParameter(i);\n start = i + 1;\n }\n }\n\n parseParameter(str.length);\n\n return parameters;\n}\n\nconst isValidHeaderName = (str) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim());\n\n// `__proto__` is a valid field name, and the one name the uppercase mapping at\n// the bottom of this file cannot reach: it is inherited from Object.prototype\n// instead of being declared on AxiosHeaders.prototype, so `self.__proto__ = v`\n// runs the inherited setter. That silently discards the header, and an array\n// value replaces the instance prototype, taking every method with it.\n// Store it under the same kind of case variant that mapping uses for `set` and\n// `constructor`. Header lookup is caseless, so it reads back under either\n// spelling, and no own `__proto__` slot is ever created for a later\n// `Object.assign` to copy onto a plain object through the same setter.\nconst PROTO_HEADER_SLOT = '__Proto__';\n\nconst headerSlot = (name) => (name === '__proto__' ? PROTO_HEADER_SLOT : name);\n\nfunction matchHeaderValue(context, value, header, filter, isHeaderNameFilter) {\n if (utils.isFunction(filter)) {\n return filter.call(context, value, header);\n }\n\n if (isHeaderNameFilter) {\n value = header;\n }\n\n if (!utils.isString(value)) return;\n\n if (utils.isString(filter)) {\n return value.indexOf(filter) !== -1;\n }\n\n if (utils.isRegExp(filter)) {\n return filter.test(value);\n }\n}\n\nfunction formatHeader(header) {\n return header\n .trim()\n .toLowerCase()\n .replace(/([a-z\\d])(\\w*)/g, (w, char, str) => {\n return char.toUpperCase() + str;\n });\n}\n\nfunction buildAccessors(obj, header) {\n const accessorName = utils.toCamelCase(' ' + header);\n\n ['get', 'set', 'has'].forEach((methodName) => {\n Object.defineProperty(obj, methodName + accessorName, {\n // Null-proto descriptor so a polluted Object.prototype.get cannot turn\n // this data descriptor into an accessor descriptor on the way in.\n __proto__: null,\n value: function (arg1, arg2, arg3) {\n return this[methodName].call(this, header, arg1, arg2, arg3);\n },\n configurable: true,\n });\n });\n}\n\nclass AxiosHeaders {\n constructor(headers) {\n headers && this.set(headers);\n }\n\n set(header, valueOrRewrite, rewrite) {\n const self = this;\n\n function setHeader(_value, _header, _rewrite) {\n const lHeader = normalizeHeader(_header);\n\n if (!lHeader) {\n return;\n }\n\n const key = utils.findKey(self, lHeader);\n\n if (\n !key ||\n self[key] === undefined ||\n _rewrite === true ||\n (_rewrite === undefined && self[key] !== false)\n ) {\n self[headerSlot(key || _header)] = normalizeValue(_value);\n }\n }\n\n const setHeaders = (headers, _rewrite) =>\n utils.forEach(headers, (_value, _header) => setHeader(_value, _header, _rewrite));\n\n if (utils.isPlainObject(header) || header instanceof this.constructor) {\n setHeaders(header, valueOrRewrite);\n } else if (utils.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {\n setHeaders(parseHeaders(header), valueOrRewrite);\n } else if (utils.isObject(header) && utils.isSafeIterable(header)) {\n let obj = Object.create(null),\n dest,\n key;\n for (const entry of header) {\n if (!utils.isArray(entry)) {\n throw new TypeError('Object iterator must return a key-value pair');\n }\n\n key = entry[0];\n\n if (utils.hasOwnProp(obj, key)) {\n dest = obj[key];\n obj[key] = utils.isArray(dest) ? [...dest, entry[1]] : [dest, entry[1]];\n } else {\n obj[key] = entry[1];\n }\n }\n\n setHeaders(obj, valueOrRewrite);\n } else {\n header != null && setHeader(valueOrRewrite, header, rewrite);\n }\n\n return this;\n }\n\n get(header, parser) {\n header = normalizeHeader(header);\n\n if (header) {\n const key = utils.findKey(this, header);\n\n if (key) {\n const value = this[key];\n\n if (!parser) {\n return value;\n }\n\n if (parser === true) {\n return parseTokens(value);\n }\n\n if (utils.isFunction(parser)) {\n return parser.call(this, value, key);\n }\n\n if (utils.isRegExp(parser)) {\n return parser.exec(value);\n }\n\n throw new TypeError('parser must be boolean|regexp|function');\n }\n }\n }\n\n has(header, matcher) {\n header = normalizeHeader(header);\n\n if (header) {\n const key = utils.findKey(this, header);\n\n return !!(\n key &&\n this[key] !== undefined &&\n (!matcher || matchHeaderValue(this, this[key], key, matcher))\n );\n }\n\n return false;\n }\n\n delete(header, matcher) {\n const self = this;\n let deleted = false;\n\n function deleteHeader(_header) {\n _header = normalizeHeader(_header);\n\n if (_header) {\n const key = utils.findKey(self, _header);\n\n if (key && (!matcher || matchHeaderValue(self, self[key], key, matcher))) {\n delete self[key];\n\n deleted = true;\n }\n }\n }\n\n if (utils.isArray(header)) {\n header.forEach(deleteHeader);\n } else {\n deleteHeader(header);\n }\n\n return deleted;\n }\n\n clear(matcher) {\n const keys = Object.keys(this);\n let i = keys.length;\n let deleted = false;\n\n while (i--) {\n const key = keys[i];\n if (!matcher || matchHeaderValue(this, this[key], key, matcher, true)) {\n delete this[key];\n deleted = true;\n }\n }\n\n return deleted;\n }\n\n normalize(format) {\n const self = this;\n const headers = Object.create(null);\n\n utils.forEach(this, (value, header) => {\n const key = utils.findKey(headers, header);\n\n if (key) {\n self[key] = normalizeValue(value);\n delete self[header];\n return;\n }\n\n const normalized = headerSlot(format ? formatHeader(header) : String(header).trim());\n\n if (normalized !== header) {\n delete self[header];\n }\n\n self[normalized] = normalizeValue(value);\n\n headers[normalized] = true;\n });\n\n return this;\n }\n\n concat(...targets) {\n return this.constructor.concat(this, ...targets);\n }\n\n toJSON(asStrings) {\n const obj = Object.create(null);\n\n utils.forEach(this, (value, header) => {\n value != null &&\n value !== false &&\n (obj[header] = asStrings && utils.isArray(value) ? value.join(', ') : value);\n });\n\n return obj;\n }\n\n [Symbol.iterator]() {\n return Object.entries(this.toJSON())[Symbol.iterator]();\n }\n\n toString() {\n return Object.entries(this.toJSON())\n .map(([header, value]) => header + ': ' + value)\n .join('\\n');\n }\n\n getSetCookie() {\n const value = this.get('set-cookie');\n return utils.isArray(value) ? value : value == null || value === false ? [] : [value];\n }\n\n get [Symbol.toStringTag]() {\n return 'AxiosHeaders';\n }\n\n static from(thing) {\n return thing instanceof this ? thing : new this(thing);\n }\n\n static parseParameters(value) {\n return parseParameters(value);\n }\n\n static concat(first, ...targets) {\n const computed = new this(first);\n\n targets.forEach((target) => computed.set(target));\n\n return computed;\n }\n\n static accessor(header) {\n const internals =\n (this[$internals] =\n this[$internals] =\n {\n accessors: {},\n });\n\n const accessors = internals.accessors;\n const prototype = this.prototype;\n\n function defineAccessor(_header) {\n const lHeader = normalizeHeader(_header);\n\n if (!accessors[lHeader]) {\n buildAccessors(prototype, _header);\n accessors[lHeader] = true;\n }\n }\n\n utils.isArray(header) ? header.forEach(defineAccessor) : defineAccessor(header);\n\n return this;\n }\n}\n\nAxiosHeaders.accessor([\n 'Content-Type',\n 'Content-Length',\n 'Accept',\n 'Accept-Encoding',\n 'User-Agent',\n 'Authorization',\n]);\n\n// reserved names hotfix\nutils.reduceDescriptors(AxiosHeaders.prototype, ({ value }, key) => {\n let mapped = key[0].toUpperCase() + key.slice(1); // map `set` => `Set`\n return {\n get: () => value,\n set(headerValue) {\n this[mapped] = headerValue;\n },\n };\n});\n\nutils.freezeMethods(AxiosHeaders);\n\nexport default AxiosHeaders;\n","'use strict';\n\nimport utils from '../utils.js';\nimport AxiosHeaders from './AxiosHeaders.js';\n\nexport const REDACTED = '[REDACTED ****]';\n\nfunction hasOwnOrPrototypeToJSON(source) {\n if (utils.hasOwnProp(source, 'toJSON')) {\n return true;\n }\n\n let prototype = Object.getPrototypeOf(source);\n\n while (prototype && prototype !== Object.prototype) {\n if (utils.hasOwnProp(prototype, 'toJSON')) {\n return true;\n }\n\n prototype = Object.getPrototypeOf(prototype);\n }\n\n return false;\n}\n\n// Build a plain-object snapshot of `config` and replace the value of any key\n// (case-insensitive) listed in `redactKeys` with REDACTED. Walks through arrays\n// and AxiosHeaders, and short-circuits on circular references.\nfunction redactConfig(config, redactKeys) {\n const lowerKeys = new Set(redactKeys.map((k) => String(k).toLowerCase()));\n const seen = [];\n\n const visit = (source) => {\n if (source === null || typeof source !== 'object') return source;\n if (utils.isBuffer(source)) return source;\n if (seen.indexOf(source) !== -1) return undefined;\n\n if (source instanceof AxiosHeaders) {\n source = source.toJSON();\n }\n\n seen.push(source);\n\n let result;\n if (utils.isArray(source)) {\n result = [];\n source.forEach((v, i) => {\n const reducedValue = visit(v);\n if (!utils.isUndefined(reducedValue)) {\n result[i] = reducedValue;\n }\n });\n } else {\n if (!utils.isPlainObject(source) && hasOwnOrPrototypeToJSON(source)) {\n seen.pop();\n return source;\n }\n\n result = Object.create(null);\n for (const [key, value] of Object.entries(source)) {\n const reducedValue = lowerKeys.has(key.toLowerCase()) ? REDACTED : visit(value);\n if (!utils.isUndefined(reducedValue)) {\n result[key] = reducedValue;\n }\n }\n }\n\n seen.pop();\n return result;\n };\n\n return visit(config);\n}\n\nfunction stringifySafely(value) {\n try {\n return String(value);\n } catch (err) {\n return '';\n }\n}\n\nfunction aggregateErrorMessage(error) {\n const message = error.errors\n .map((entry) => {\n try {\n return entry && entry.message ? stringifySafely(entry.message) : stringifySafely(entry);\n } catch (err) {\n return '';\n }\n })\n .filter(Boolean)\n .join('; ');\n\n return message || error.name || 'AggregateError';\n}\n\n// Shared with `Axios.prototype.request`, which splices the reconstructed\n// caller frames in ahead of this marker.\nexport const CAUSED_BY_SEPARATOR = '\\nCaused by: ';\nconst $causeStack = Symbol('causeStack');\n\n// Match the section we appended, not marker-like text in an error message or\n// a replacement stack supplied by the caller. Do not re-read the cause's stack.\nexport function getCauseStackIndex(error, stack) {\n const causeStack = utils.hasOwnProp(error, $causeStack) && error[$causeStack];\n\n return causeStack && stack.endsWith(causeStack) ? stack.length - causeStack.length : -1;\n}\n\n/**\n * Append the stack of a wrapped error to `target.stack`.\n *\n * `cause` already exposes the original error for tooling that walks the standard\n * cause chain, but many error reporters read `stack` and nothing else. Inlining\n * the wrapped stack there means those reporters surface the underlying failure\n * instead of the axios frames that normalized it (see #6670).\n *\n * Every read is defensive: a custom `Error.prepareStackTrace` hook, a runtime\n * without stack support, or a replaced `stack` property can leave the value\n * missing, non-string, or read-only, and normalizing an error must not throw\n * because of that.\n *\n * @param {Error} target The AxiosError being built.\n * @param {Error} source The error being wrapped.\n *\n * @returns {void}\n */\nfunction appendCauseStack(target, source) {\n try {\n const sourceStack = source && source.stack;\n\n if (typeof sourceStack !== 'string' || !sourceStack) {\n return;\n }\n\n const targetStack = target.stack;\n\n if (typeof targetStack !== 'string' || !targetStack) {\n return;\n }\n\n // Each call to `from()` creates a fresh target. Re-wrapping includes the\n // previous stack verbatim, adding one cause section per wrap.\n const causeStack = CAUSED_BY_SEPARATOR + sourceStack;\n target.stack = targetStack + causeStack;\n Object.defineProperty(target, $causeStack, { __proto__: null, value: causeStack });\n } catch (e) {\n // Ignore failures from custom stack hooks or un-writable stack properties.\n }\n}\n\nclass AxiosError extends Error {\n static from(error, code, config, request, response, customProps) {\n // `AggregateError` (thrown by Node on dual-stack/Happy-Eyeballs connection\n // failures) has an empty `message`; its detail lives in `errors[]`. Without\n // this, the wrapped error surfaces with a blank message (see #6721).\n let message = error.message;\n if (!message && utils.isArray(error.errors) && error.errors.length) {\n message = aggregateErrorMessage(error);\n }\n\n const axiosError = new AxiosError(message, code || error.code, config, request, response);\n // Match native `Error` `cause` semantics: non-enumerable. The wrapped\n // error often carries circular internals (sockets, requests, agents), so\n // an enumerable `cause` makes structured loggers (pino/winston) and any\n // own-property walk throw \"Converting circular structure to JSON\".\n // Regression from #6982; see #7205. `__proto__: null` mirrors the\n // `message` descriptor below (prototype-pollution-safe descriptor).\n Object.defineProperty(axiosError, 'cause', {\n __proto__: null,\n value: error,\n writable: true,\n enumerable: false,\n configurable: true,\n });\n axiosError.name = error.name;\n\n // Inline the wrapped stack for reporters that read only `stack`; the `cause`\n // property above already covers cause-aware tooling.\n appendCauseStack(axiosError, error);\n\n // Preserve status from the original error if not already set from response\n if (error.status != null && axiosError.status == null) {\n axiosError.status = error.status;\n }\n\n customProps && Object.assign(axiosError, customProps);\n return axiosError;\n }\n\n /**\n * Create an Error with the specified message, config, error code, request and response.\n *\n * @param {string} message The error message.\n * @param {string} [code] The error code (for example, 'ECONNABORTED').\n * @param {Object} [config] The config.\n * @param {Object} [request] The request.\n * @param {Object} [response] The response.\n *\n * @returns {Error} The created error.\n */\n constructor(message, code, config, request, response) {\n super(message);\n\n // Make message enumerable to maintain backward compatibility\n // The native Error constructor sets message as non-enumerable,\n // but axios < v1.13.3 had it as enumerable\n Object.defineProperty(this, 'message', {\n // Null-proto descriptor so a polluted Object.prototype.get cannot turn\n // this data descriptor into an accessor descriptor on the way in.\n __proto__: null,\n value: message,\n enumerable: true,\n writable: true,\n configurable: true,\n });\n\n this.name = 'AxiosError';\n this.isAxiosError = true;\n code && (this.code = code);\n config && (this.config = config);\n request && (this.request = request);\n if (response) {\n this.response = response;\n this.status = response.status;\n }\n }\n\n toJSON() {\n // Opt-in redaction: when the request config carries a `redact` array, the\n // value of any matching key (case-insensitive, at any depth) is replaced\n // with REDACTED in the serialized snapshot. Undefined or empty leaves the\n // existing serialization behavior unchanged.\n const config = this.config;\n const redactKeys = config && utils.hasOwnProp(config, 'redact') ? config.redact : undefined;\n const serializedConfig =\n utils.isArray(redactKeys) && redactKeys.length > 0\n ? redactConfig(config, redactKeys)\n : utils.toJSONObject(config);\n\n return {\n // Standard\n message: this.message,\n name: this.name,\n // Microsoft\n description: this.description,\n number: this.number,\n // Mozilla\n fileName: this.fileName,\n lineNumber: this.lineNumber,\n columnNumber: this.columnNumber,\n stack: this.stack,\n // Axios\n config: serializedConfig,\n code: this.code,\n status: this.status,\n };\n }\n}\n\n// This can be changed to static properties as soon as the parser options in .eslint.cjs are updated.\nAxiosError.ERR_BAD_OPTION_VALUE = 'ERR_BAD_OPTION_VALUE';\nAxiosError.ERR_BAD_OPTION = 'ERR_BAD_OPTION';\nAxiosError.ECONNABORTED = 'ECONNABORTED';\nAxiosError.ETIMEDOUT = 'ETIMEDOUT';\nAxiosError.ECONNREFUSED = 'ECONNREFUSED';\nAxiosError.ERR_NETWORK = 'ERR_NETWORK';\nAxiosError.ERR_FR_TOO_MANY_REDIRECTS = 'ERR_FR_TOO_MANY_REDIRECTS';\nAxiosError.ERR_DEPRECATED = 'ERR_DEPRECATED';\nAxiosError.ERR_BAD_RESPONSE = 'ERR_BAD_RESPONSE';\nAxiosError.ERR_BAD_REQUEST = 'ERR_BAD_REQUEST';\nAxiosError.ERR_CANCELED = 'ERR_CANCELED';\nAxiosError.ERR_NOT_SUPPORT = 'ERR_NOT_SUPPORT';\nAxiosError.ERR_INVALID_URL = 'ERR_INVALID_URL';\nAxiosError.ERR_FORM_DATA_DEPTH_EXCEEDED = 'ERR_FORM_DATA_DEPTH_EXCEEDED';\n\nexport default AxiosError;\n","'use strict';\n\nimport utils from '../utils.js';\nimport AxiosError from '../core/AxiosError.js';\n// temporary hotfix to avoid circular references until AxiosURLSearchParams is refactored\nimport PlatformFormData from '../platform/node/classes/FormData.js';\nimport PlatformBuffer from '../platform/node/classes/Buffer.js';\n\n// Default nesting limit shared with the inverse transform (formDataToJSON) so\n// the FormData <-> JSON round-trip stays symmetric.\nexport const DEFAULT_FORM_DATA_MAX_DEPTH = 100;\n\n/**\n * Determines if the given thing is a array or js object.\n *\n * @param {string} thing - The object or array to be visited.\n *\n * @returns {boolean}\n */\nfunction isVisitable(thing) {\n return utils.isPlainObject(thing) || utils.isArray(thing);\n}\n\n/**\n * It removes the brackets from the end of a string\n *\n * @param {string} key - The key of the parameter.\n *\n * @returns {string} the key without the brackets.\n */\nfunction removeBrackets(key) {\n return utils.endsWith(key, '[]') ? key.slice(0, -2) : key;\n}\n\n/**\n * It takes a path, a key, and a boolean, and returns a string\n *\n * @param {string} path - The path to the current key.\n * @param {string} key - The key of the current object being iterated over.\n * @param {string} dots - If true, the key will be rendered with dots instead of brackets.\n *\n * @returns {string} The path to the current key.\n */\nfunction renderKey(path, key, dots) {\n if (!path) return key;\n return path\n .concat(key)\n .map(function each(token, i) {\n // eslint-disable-next-line no-param-reassign\n token = removeBrackets(token);\n return !dots && i ? '[' + token + ']' : token;\n })\n .join(dots ? '.' : '');\n}\n\n/**\n * If the array is an array and none of its elements are visitable, then it's a flat array.\n *\n * @param {Array} arr - The array to check\n *\n * @returns {boolean}\n */\nfunction isFlatArray(arr) {\n return utils.isArray(arr) && !arr.some(isVisitable);\n}\n\nconst predicates = utils.toFlatObject(utils, {}, null, function filter(prop) {\n return /^is[A-Z]/.test(prop);\n});\n\n/**\n * Convert a data object to FormData\n *\n * @param {Object} obj\n * @param {?Object} [formData]\n * @param {?Object} [options]\n * @param {Function} [options.visitor]\n * @param {Boolean} [options.metaTokens = true]\n * @param {Boolean} [options.dots = false]\n * @param {?Boolean} [options.indexes = false]\n *\n * @returns {Object}\n **/\n\n/**\n * It converts an object into a FormData object\n *\n * @param {Object} obj - The object to convert to form data.\n * @param {string} formData - The FormData object to append to.\n * @param {Object} options\n *\n * @returns\n */\nfunction toFormData(obj, formData, options) {\n if (!utils.isObject(obj)) {\n throw new TypeError('target must be an object');\n }\n\n // eslint-disable-next-line no-param-reassign\n formData = formData || new (PlatformFormData || FormData)();\n\n const option = (name, fallback) => {\n const value = utils.getSafeProp(options, name);\n return utils.isUndefined(value) ? fallback : value;\n };\n\n const metaTokens = option('metaTokens', true);\n // eslint-disable-next-line no-use-before-define\n const visitor = option('visitor') || defaultVisitor;\n const dots = option('dots', false);\n const indexes = option('indexes', false);\n const _Blob = option('Blob') || (typeof Blob !== 'undefined' && Blob);\n const maxDepth = option('maxDepth', DEFAULT_FORM_DATA_MAX_DEPTH);\n const useBlob = _Blob && utils.isSpecCompliantForm(formData);\n const stack = [];\n\n if (!utils.isFunction(visitor)) {\n throw new TypeError('visitor must be a function');\n }\n\n function convertValue(value) {\n if (value === null) return '';\n\n if (utils.isDate(value)) {\n return value.toISOString();\n }\n\n if (utils.isBoolean(value)) {\n return value.toString();\n }\n\n if (!useBlob && utils.isBlob(value)) {\n throw new AxiosError('Blob is not supported. Use a Buffer instead.');\n }\n\n if (utils.isArrayBuffer(value) || utils.isTypedArray(value)) {\n if (useBlob && typeof _Blob === 'function') {\n return new _Blob([value]);\n }\n if (PlatformBuffer && PlatformBuffer.isBufferAvailable()) {\n return PlatformBuffer.from(value);\n }\n throw new AxiosError(\n 'Blob is not supported. Use a Buffer instead.',\n AxiosError.ERR_NOT_SUPPORT\n );\n }\n\n return value;\n }\n\n function throwIfMaxDepthExceeded(depth) {\n if (depth > maxDepth) {\n throw new AxiosError(\n 'Object is too deeply nested (' + depth + ' levels). Max depth: ' + maxDepth,\n AxiosError.ERR_FORM_DATA_DEPTH_EXCEEDED\n );\n }\n }\n\n function stringifyWithDepthLimit(value, depth) {\n if (maxDepth === Infinity) {\n return JSON.stringify(value);\n }\n\n const ancestors = [];\n\n return JSON.stringify(value, function limitDepth(_key, currentValue) {\n if (!utils.isObject(currentValue)) {\n return currentValue;\n }\n\n while (ancestors.length && ancestors[ancestors.length - 1] !== this) {\n ancestors.pop();\n }\n\n ancestors.push(currentValue);\n throwIfMaxDepthExceeded(depth + ancestors.length - 1);\n\n return currentValue;\n });\n }\n\n /**\n * Default visitor.\n *\n * @param {*} value\n * @param {String|Number} key\n * @param {Array} path\n * @this {FormData}\n *\n * @returns {boolean} return true to visit the each prop of the value recursively\n */\n function defaultVisitor(value, key, path) {\n let arr = value;\n\n if (utils.isReactNative(formData) && utils.isReactNativeBlob(value)) {\n formData.append(renderKey(path, key, dots), convertValue(value));\n return false;\n }\n\n if (value && !path && typeof value === 'object') {\n if (utils.endsWith(key, '{}')) {\n // eslint-disable-next-line no-param-reassign\n key = metaTokens ? key : key.slice(0, -2);\n // eslint-disable-next-line no-param-reassign\n value = stringifyWithDepthLimit(value, 1);\n } else if (\n (utils.isArray(value) && isFlatArray(value)) ||\n ((utils.isFileList(value) || utils.endsWith(key, '[]')) && (arr = utils.toArray(value)))\n ) {\n // eslint-disable-next-line no-param-reassign\n key = removeBrackets(key);\n\n arr.forEach(function each(el, index) {\n !(utils.isUndefined(el) || el === null) &&\n formData.append(\n // eslint-disable-next-line no-nested-ternary\n indexes === true\n ? renderKey([key], index, dots)\n : indexes === null\n ? key\n : key + '[]',\n convertValue(el)\n );\n });\n return false;\n }\n }\n\n if (isVisitable(value)) {\n return true;\n }\n\n formData.append(renderKey(path, key, dots), convertValue(value));\n\n return false;\n }\n\n const exposedHelpers = Object.assign(predicates, {\n defaultVisitor,\n convertValue,\n isVisitable,\n });\n\n function build(value, path, depth = 0) {\n if (utils.isUndefined(value)) return;\n\n throwIfMaxDepthExceeded(depth);\n\n if (stack.indexOf(value) !== -1) {\n throw new Error('Circular reference detected in ' + path.join('.'));\n }\n\n stack.push(value);\n\n utils.forEach(value, function each(el, key) {\n const result =\n !(utils.isUndefined(el) || el === null) &&\n visitor.call(formData, el, utils.isString(key) ? key.trim() : key, path, exposedHelpers);\n\n if (result === true) {\n build(el, path ? path.concat(key) : [key], depth + 1);\n }\n });\n\n stack.pop();\n }\n\n if (!utils.isObject(obj)) {\n throw new TypeError('data must be an object');\n }\n\n build(obj);\n\n return formData;\n}\n\nexport default toFormData;\n","'use strict';\n\nimport toFormData from './toFormData.js';\n\n/**\n * It encodes a string by replacing all characters that are not in the unreserved set with\n * their percent-encoded equivalents\n *\n * @param {string} str - The string to encode.\n *\n * @returns {string} The encoded string.\n */\nfunction encode(str) {\n const charMap = {\n '!': '%21',\n \"'\": '%27',\n '(': '%28',\n ')': '%29',\n '~': '%7E',\n '%20': '+',\n };\n return encodeURIComponent(str).replace(/[!'()~]|%20/g, function replacer(match) {\n return charMap[match];\n });\n}\n\n/**\n * It takes a params object and converts it to a FormData object\n *\n * @param {Object} params - The parameters to be converted to a FormData object.\n * @param {Object} options - The options object passed to the Axios constructor.\n *\n * @returns {void}\n */\nfunction AxiosURLSearchParams(params, options) {\n this._pairs = [];\n\n params && toFormData(params, this, options);\n}\n\nconst prototype = AxiosURLSearchParams.prototype;\n\nprototype.append = function append(name, value) {\n this._pairs.push([name, value]);\n};\n\nprototype.toString = function toString(encoder) {\n const _encode = encoder\n ? (value) => encoder.call(this, value, encode)\n : encode;\n\n return this._pairs\n .map(function each(pair) {\n return _encode(pair[0]) + '=' + _encode(pair[1]);\n }, '')\n .join('&');\n};\n\nexport default AxiosURLSearchParams;\n","'use strict';\n\nimport utils from '../utils.js';\nimport AxiosURLSearchParams from './AxiosURLSearchParams.js';\n\n/**\n * It replaces URL-encoded forms of `:`, `$`, `,`, and spaces with\n * their plain counterparts (`:`, `$`, `,`, `+`).\n *\n * @param {string} val The value to be encoded.\n *\n * @returns {string} The encoded value.\n */\nexport function encode(val) {\n return encodeURIComponent(val)\n .replace(/%3A/gi, ':')\n .replace(/%24/g, '$')\n .replace(/%2C/gi, ',')\n .replace(/%20/g, '+');\n}\n\n/**\n * Build a URL by appending params to the end\n *\n * @param {string} url The base of the url (e.g., http://www.google.com)\n * @param {object} [params] The params to be appended\n * @param {?(object|Function)} options\n *\n * @returns {string} The formatted url\n */\nexport default function buildURL(url, params, options) {\n if (!params) {\n return url;\n }\n url = url || '';\n\n const _options = utils.isFunction(options)\n ? {\n serialize: options,\n }\n : options;\n\n // Read serializer options pollution-safely: own properties and methods on a\n // class/template prototype are honored, but values injected onto a polluted\n // Object.prototype are ignored.\n const _encode = utils.getSafeProp(_options, 'encode') || encode;\n const serializeFn = utils.getSafeProp(_options, 'serialize');\n\n let serializedParams;\n\n if (serializeFn) {\n serializedParams = serializeFn(params, _options);\n } else {\n serializedParams = utils.isURLSearchParams(params)\n ? params.toString()\n : new AxiosURLSearchParams(params, _options).toString(_encode);\n }\n\n if (serializedParams) {\n const hashmarkIndex = url.indexOf('#');\n\n if (hashmarkIndex !== -1) {\n url = url.slice(0, hashmarkIndex);\n }\n url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;\n }\n\n return url;\n}\n","'use strict';\n\nimport utils from '../utils.js';\n\nconst $internals = Symbol('internals');\n\n// `handlers` is public and may be replaced with a nullish value by user code;\n// `clear()` has always tolerated that. Treat it as an empty stack rather than\n// dereferencing it.\nfunction countHandlers(handlers) {\n return handlers ? handlers.length : 0;\n}\n\nfunction trimHandlers(handlers) {\n if (!handlers) {\n return;\n }\n\n while (handlers.length && handlers[handlers.length - 1] === null) {\n handlers.pop();\n }\n}\n\n// Preserve the array-key coercion used before IDs were stored in a Map, without\n// treating null, empty strings, or noncanonical numeric strings as ID zero.\nfunction normalizeHandlerId(id) {\n if (typeof id === 'string' && id !== '' && String(Number(id)) === id) {\n return Number(id);\n }\n\n return id;\n}\n\nfunction syncHandlerEntries(manager, internals) {\n const handlers = manager.handlers;\n const length = countHandlers(handlers);\n\n if (handlers !== internals.handlersRef) {\n internals.handlersRef = handlers;\n internals.handlerEntries.clear();\n } else if (length !== internals.handlersLength) {\n if (!length) {\n internals.handlerEntries.clear();\n } else {\n internals.handlerEntries.forEach(function removeStaleEntry(entry, id) {\n if (handlers[entry.index] !== entry.handler) {\n internals.handlerEntries.delete(id);\n }\n });\n }\n }\n\n internals.handlersLength = length;\n}\n\nclass InterceptorManager {\n constructor() {\n this.handlers = [];\n this[$internals] = {\n handlersRef: this.handlers,\n handlersLength: this.handlers.length,\n handlerEntries: new Map(),\n iterationDepth: 0,\n nextId: 0,\n };\n }\n\n /**\n * Add a new interceptor to the stack\n *\n * @param {Function} fulfilled The function to handle `then` for a `Promise`\n * @param {Function} rejected The function to handle `reject` for a `Promise`\n * @param {Object} options The options for the interceptor, synchronous and runWhen\n *\n * @return {Number} An ID used to remove interceptor later\n */\n use(fulfilled, rejected, options) {\n const handler = {\n fulfilled,\n rejected,\n synchronous: options ? options.synchronous : false,\n runWhen: options ? options.runWhen : null,\n };\n const internals = this[$internals];\n\n if (this.handlers == null) {\n this.handlers = [];\n }\n\n syncHandlerEntries(this, internals);\n\n const id = internals.nextId++;\n\n this.handlers.push(handler);\n internals.handlerEntries.set(id, {\n handler,\n index: this.handlers.length - 1,\n });\n internals.handlersLength = this.handlers.length;\n\n return id;\n }\n\n /**\n * Remove an interceptor from the stack\n *\n * @param {Number} id The ID that was returned by `use`\n *\n * @returns {void}\n */\n eject(id) {\n const internals = this[$internals];\n\n syncHandlerEntries(this, internals);\n\n const handlerId = normalizeHandlerId(id);\n const entry = internals.handlerEntries.get(handlerId);\n\n if (entry) {\n internals.handlerEntries.delete(handlerId);\n\n // Ignore IDs invalidated by clear or direct replacement of handlers.\n if (this.handlers[entry.index] !== entry.handler) {\n return;\n }\n\n this.handlers[entry.index] = null;\n\n // Do not reuse an index while forEach is walking its length snapshot.\n if (!internals.iterationDepth) {\n trimHandlers(this.handlers);\n internals.handlersLength = this.handlers.length;\n }\n }\n }\n\n /**\n * Clear all interceptors from the stack\n *\n * @returns {void}\n */\n clear() {\n if (this.handlers) {\n this.handlers = [];\n syncHandlerEntries(this, this[$internals]);\n }\n }\n\n /**\n * Iterate over all the registered interceptors\n *\n * This method is particularly useful for skipping over any\n * interceptors that may have become `null` calling `eject`.\n *\n * @param {Function} fn The function to call for each interceptor\n *\n * @returns {void}\n */\n forEach(fn) {\n const internals = this[$internals];\n\n syncHandlerEntries(this, internals);\n\n internals.iterationDepth++;\n\n try {\n utils.forEach(this.handlers, function forEachHandler(h) {\n if (h !== null) {\n fn(h);\n }\n });\n } finally {\n if (!--internals.iterationDepth) {\n syncHandlerEntries(this, internals);\n trimHandlers(this.handlers);\n internals.handlersLength = countHandlers(this.handlers);\n }\n }\n }\n}\n\nexport default InterceptorManager;\n","'use strict';\n\nexport default {\n silentJSONParsing: true,\n forcedJSONParsing: true,\n clarifyTimeoutError: false,\n legacyInterceptorReqResOrdering: true,\n advertiseZstdAcceptEncoding: false,\n validateStatusUndefinedResolves: true,\n encodeBasicAuthUsername: false,\n};\n","import URLSearchParams from './classes/URLSearchParams.js';\nimport FormData from './classes/FormData.js';\nimport Blob from './classes/Blob.js';\n\nexport default {\n isBrowser: true,\n classes: {\n URLSearchParams,\n FormData,\n Blob,\n },\n protocols: ['http', 'https', 'file', 'blob', 'url', 'data'],\n};\n","'use strict';\n\nimport AxiosURLSearchParams from '../../../helpers/AxiosURLSearchParams.js';\nexport default typeof URLSearchParams !== 'undefined' ? URLSearchParams : AxiosURLSearchParams;\n","'use strict';\n\nexport default typeof FormData !== 'undefined' ? FormData : null;\n","'use strict';\n\nexport default typeof Blob !== 'undefined' ? Blob : null;\n","const hasBrowserEnv = typeof window !== 'undefined' && typeof document !== 'undefined';\n\nconst _navigator = (typeof navigator === 'object' && navigator) || undefined;\n\n/**\n * Determine if we're running in a standard browser environment\n *\n * This allows axios to run in a web worker, and react-native.\n * Both environments support XMLHttpRequest, but not fully standard globals.\n *\n * web workers:\n * typeof window -> undefined\n * typeof document -> undefined\n *\n * react-native:\n * navigator.product -> 'ReactNative'\n * nativescript\n * navigator.product -> 'NativeScript' or 'NS'\n *\n * @returns {boolean}\n */\nconst hasStandardBrowserEnv =\n hasBrowserEnv &&\n (!_navigator || ['ReactNative', 'NativeScript', 'NS'].indexOf(_navigator.product) < 0);\n\n/**\n * Determine if we're running in a standard browser webWorker environment\n *\n * Although the `isStandardBrowserEnv` method indicates that\n * `allows axios to run in a web worker`, the WebWorker will still be\n * filtered out due to its judgment standard\n * `typeof window !== 'undefined' && typeof document !== 'undefined'`.\n * This leads to a problem when axios post `FormData` in webWorker\n */\nconst hasStandardBrowserWebWorkerEnv = (() => {\n return (\n typeof WorkerGlobalScope !== 'undefined' &&\n // eslint-disable-next-line no-undef\n self instanceof WorkerGlobalScope &&\n typeof self.importScripts === 'function'\n );\n})();\n\nconst origin = (hasBrowserEnv && window.location.href) || 'http://localhost';\n\nexport {\n hasBrowserEnv,\n hasStandardBrowserWebWorkerEnv,\n hasStandardBrowserEnv,\n _navigator as navigator,\n origin,\n};\n","import platform from './node/index.js';\nimport * as utils from './common/utils.js';\n\nexport default {\n ...utils,\n ...platform,\n};\n","'use strict';\n\nimport utils from '../utils.js';\nimport AxiosError from '../core/AxiosError.js';\nimport { DEFAULT_FORM_DATA_MAX_DEPTH } from './toFormData.js';\n\nconst MAX_DEPTH = DEFAULT_FORM_DATA_MAX_DEPTH;\n\nfunction throwIfDepthExceeded(index) {\n if (index > MAX_DEPTH) {\n throw new AxiosError(\n 'FormData field is too deeply nested (' + index + ' levels). Max depth: ' + MAX_DEPTH,\n AxiosError.ERR_FORM_DATA_DEPTH_EXCEEDED\n );\n }\n}\n\n/**\n * It takes a string like `foo[x][y][z]` and returns an array like `['foo', 'x', 'y', 'z']\n *\n * @param {string} name - The name of the property to get.\n *\n * @returns An array of strings.\n */\nfunction parsePropPath(name) {\n // foo[x][y][z] -> ['foo', 'x', 'y', 'z']\n // foo.x.y.z -> ['foo', 'x', 'y', 'z']\n // A path is split on `.` and on `[...]` groups. A segment — whether written\n // in dot notation or captured inside brackets — may contain any character\n // except `.`, `[` and `]`, so a key like `user-name` or `user name` is kept\n // literal instead of being split (#5402). `.`, `[` and `]` keep their existing\n // meaning, e.g. `foo[bar.baz]` -> ['foo', 'bar', 'baz'] and `[]` is an array push.\n // Excluding `[` from the bracket group also makes the match fail fast at the\n // next `[`, so a malformed name cannot rescan to the end of the string from\n // every unmatched `[` — parsing stays linear in the length of the name.\n const path = [];\n const pattern = /[^.[\\]]+|\\[([^.[\\]]*)]/g;\n let match;\n\n while ((match = pattern.exec(name)) !== null) {\n throwIfDepthExceeded(path.length);\n path.push(match[0] === '[]' ? '' : match[1] || match[0]);\n }\n\n return path;\n}\n\n/**\n * Convert an array to an object.\n *\n * @param {Array} arr - The array to convert to an object.\n *\n * @returns An object with the same keys and values as the array.\n */\nfunction arrayToObject(arr) {\n const obj = {};\n const keys = Object.keys(arr);\n let i;\n const len = keys.length;\n let key;\n for (i = 0; i < len; i++) {\n key = keys[i];\n obj[key] = arr[key];\n }\n return obj;\n}\n\nfunction normalizeArray(value) {\n if (!utils.isArray(value)) return value;\n\n const keys = Object.keys(value);\n return keys.length !== value.length || keys.some((key, index) => key !== String(index))\n ? arrayToObject(value)\n : value;\n}\n\nfunction normalizeArrays(obj) {\n const pending = [obj];\n while (pending.length) {\n const target = pending.pop();\n Object.keys(target).forEach((key) => {\n const value = (target[key] = normalizeArray(target[key]));\n if (utils.isArray(value) || utils.isPlainObject(value)) {\n pending.push(value);\n }\n });\n }\n return obj;\n}\n\n/**\n * It takes a FormData object and returns a JavaScript object\n *\n * @param {string} formData The FormData object to convert to JSON.\n *\n * @returns {Object | null} The converted object.\n */\nfunction formDataToJSON(formData) {\n function buildPath(path, value, target, index) {\n throwIfDepthExceeded(index);\n\n let name = path[index++];\n\n if (name === '__proto__') return true;\n\n const isNumericKey = Number.isFinite(+name);\n const isLast = index >= path.length;\n name = !name && utils.isArray(target) ? target.length : name;\n\n if (isLast) {\n if (utils.hasOwnProp(target, name)) {\n target[name] = normalizeArray(target[name]);\n target[name] = utils.isArray(target[name])\n ? target[name].concat(value)\n : [target[name], value];\n } else {\n target[name] = value;\n }\n\n return !isNumericKey;\n }\n\n if (!utils.hasOwnProp(target, name) || !utils.isObject(target[name])) {\n target[name] = [];\n }\n\n const result = buildPath(path, value, target[name], index);\n\n if (result && utils.isArray(target[name])) {\n target[name] = arrayToObject(target[name]);\n }\n\n return !isNumericKey;\n }\n\n if (utils.isFormData(formData) && utils.isFunction(formData.entries)) {\n const obj = {};\n\n utils.forEachEntry(formData, (name, value) => {\n buildPath(parsePropPath(name), value, obj, 0);\n });\n\n return normalizeArrays(obj);\n }\n\n return null;\n}\n\nexport default formDataToJSON;\n","'use strict';\n\nconst methodList = Object.freeze([\n 'get',\n 'delete',\n 'head',\n 'options',\n 'post',\n 'put',\n 'patch',\n 'purge',\n 'link',\n 'unlink',\n 'query',\n]);\n\nexport default methodList;\n","'use strict';\n\nimport utils from '../utils.js';\nimport AxiosError from '../core/AxiosError.js';\nimport transitionalDefaults from './transitional.js';\nimport toFormData from '../helpers/toFormData.js';\nimport toURLEncodedForm from '../helpers/toURLEncodedForm.js';\nimport platform from '../platform/index.js';\nimport formDataToJSON from '../helpers/formDataToJSON.js';\nimport methodList from '../core/methodList.js';\n\nconst own = (obj, key) => (obj != null && utils.hasOwnProp(obj, key) ? obj[key] : undefined);\n\n/**\n * It takes a string, tries to parse it, and if it fails, it returns the stringified version\n * of the input\n *\n * @param {any} rawValue - The value to be stringified.\n * @param {Function} parser - A function that parses a string into a JavaScript object.\n * @param {Function} encoder - A function that takes a value and returns a string.\n *\n * @returns {string} A stringified version of the rawValue.\n */\nfunction stringifySafely(rawValue, parser, encoder) {\n if (utils.isString(rawValue)) {\n try {\n (parser || JSON.parse)(rawValue);\n return utils.trim(rawValue);\n } catch (e) {\n if (e.name !== 'SyntaxError') {\n throw e;\n }\n }\n }\n\n return (encoder || JSON.stringify)(rawValue);\n}\n\nconst defaults = {\n transitional: transitionalDefaults,\n\n adapter: ['xhr', 'http', 'fetch'],\n\n transformRequest: [\n function transformRequest(data, headers) {\n const contentType = headers.getContentType() || '';\n const hasJSONContentType = contentType.indexOf('application/json') > -1;\n const isObjectPayload = utils.isObject(data);\n\n if (isObjectPayload && utils.isHTMLForm(data)) {\n data = new FormData(data);\n }\n\n const isFormData = utils.isFormData(data);\n\n if (isFormData) {\n return hasJSONContentType ? JSON.stringify(formDataToJSON(data)) : data;\n }\n\n if (\n utils.isArrayBuffer(data) ||\n utils.isBuffer(data) ||\n utils.isStream(data) ||\n utils.isFile(data) ||\n utils.isBlob(data) ||\n utils.isReadableStream(data)\n ) {\n return data;\n }\n if (utils.isArrayBufferView(data)) {\n return data.buffer;\n }\n if (utils.isURLSearchParams(data)) {\n headers.setContentType('application/x-www-form-urlencoded;charset=utf-8', false);\n return data.toString();\n }\n\n let isFileList;\n\n if (isObjectPayload) {\n const formSerializer = own(this, 'formSerializer');\n if (contentType.indexOf('application/x-www-form-urlencoded') > -1) {\n return toURLEncodedForm(data, formSerializer).toString();\n }\n\n if (\n (isFileList = utils.isFileList(data)) ||\n contentType.indexOf('multipart/form-data') > -1\n ) {\n const env = own(this, 'env');\n const _FormData = env && env.FormData;\n\n return toFormData(\n isFileList ? { 'files[]': data } : data,\n _FormData && new _FormData(),\n formSerializer\n );\n }\n }\n\n if (isObjectPayload || hasJSONContentType) {\n headers.setContentType('application/json', false);\n return stringifySafely(data);\n }\n\n return data;\n },\n ],\n\n transformResponse: [\n function transformResponse(data) {\n const transitional = own(this, 'transitional') || defaults.transitional;\n const forcedJSONParsing = transitional && transitional.forcedJSONParsing;\n const responseType = own(this, 'responseType');\n const JSONRequested = responseType === 'json';\n\n if (utils.isResponse(data) || utils.isReadableStream(data)) {\n return data;\n }\n\n if (\n data &&\n utils.isString(data) &&\n ((forcedJSONParsing && !responseType) || JSONRequested)\n ) {\n const silentJSONParsing = transitional && transitional.silentJSONParsing;\n const strictJSONParsing = !silentJSONParsing && JSONRequested;\n\n try {\n return JSON.parse(data, own(this, 'parseReviver'));\n } catch (e) {\n if (strictJSONParsing) {\n if (e.name === 'SyntaxError') {\n throw AxiosError.from(e, AxiosError.ERR_BAD_RESPONSE, this, null, own(this, 'response'));\n }\n throw e;\n }\n }\n }\n\n return data;\n },\n ],\n\n /**\n * A timeout in milliseconds to abort a request. If set to 0 (default) a\n * timeout is not created.\n */\n timeout: 0,\n\n xsrfCookieName: 'XSRF-TOKEN',\n xsrfHeaderName: 'X-XSRF-TOKEN',\n\n maxContentLength: -1,\n maxBodyLength: -1,\n\n env: {\n FormData: platform.classes.FormData,\n Blob: platform.classes.Blob,\n },\n\n validateStatus: function validateStatus(status) {\n return status >= 200 && status < 300;\n },\n\n headers: {\n common: {\n Accept: 'application/json, text/plain, */*',\n 'Content-Type': undefined,\n },\n },\n};\n\nutils.forEach(methodList, (method) => {\n defaults.headers[method] = {};\n});\n\nexport default defaults;\n","'use strict';\n\nimport utils from '../utils.js';\nimport toFormData from './toFormData.js';\nimport platform from '../platform/index.js';\n\nexport default function toURLEncodedForm(data, options) {\n return toFormData(data, new platform.classes.URLSearchParams(), {\n visitor: function (value, key, path, helpers) {\n if (platform.isNode && utils.isBuffer(value)) {\n this.append(key, value.toString('base64'));\n return false;\n }\n\n return helpers.defaultVisitor.apply(this, arguments);\n },\n ...options,\n });\n}\n","'use strict';\n\nimport utils from '../utils.js';\nimport defaults from '../defaults/index.js';\nimport AxiosHeaders from '../core/AxiosHeaders.js';\n\n/**\n * Transform the data for a request or a response\n *\n * @param {Array|Function} fns A single function or Array of functions\n * @param {?Object} response The response object\n *\n * @returns {*} The resulting transformed data\n */\nexport default function transformData(fns, response) {\n const config = this || defaults;\n const context = response || config;\n const headers = AxiosHeaders.from(context.headers);\n let data = context.data;\n\n utils.forEach(fns, function transform(fn) {\n data = fn.call(config, data, headers.normalize(), response ? response.status : undefined);\n });\n\n headers.normalize();\n\n return data;\n}\n","'use strict';\n\nexport default function isCancel(value) {\n return !!(value && value.__CANCEL__);\n}\n","'use strict';\n\nimport AxiosError from '../core/AxiosError.js';\n\nclass CanceledError extends AxiosError {\n /**\n * A `CanceledError` is an object that is thrown when an operation is canceled.\n *\n * @param {string=} message The message.\n * @param {Object=} config The config.\n * @param {Object=} request The request.\n *\n * @returns {CanceledError} The created error.\n */\n constructor(message, config, request) {\n super(message == null ? 'canceled' : message, AxiosError.ERR_CANCELED, config, request);\n this.name = 'CanceledError';\n this.__CANCEL__ = true;\n }\n}\n\nexport default CanceledError;\n","'use strict';\n\nimport AxiosError from './AxiosError.js';\n\n/**\n * Resolve or reject a Promise based on response status.\n *\n * @param {Function} resolve A function that resolves the promise.\n * @param {Function} reject A function that rejects the promise.\n * @param {object} response The response.\n *\n * @returns {object} The response.\n */\nexport default function settle(resolve, reject, response) {\n const validateStatus = response.config.validateStatus;\n if (!response.status || !validateStatus || validateStatus(response.status)) {\n resolve(response);\n } else {\n reject(new AxiosError(\n 'Request failed with status code ' + response.status,\n response.status >= 400 && response.status < 500 ? AxiosError.ERR_BAD_REQUEST : AxiosError.ERR_BAD_RESPONSE,\n response.config,\n response.request,\n response\n ));\n }\n}\n","'use strict';\n\nconst urlParserControlCharacters = /[\\t\\n\\r]/g;\n\n/**\n * Match WHATWG URL preprocessing before checking a URL's protocol.\n *\n * @param {string} url\n *\n * @returns {string}\n */\nexport default function normalizeURLForProtocolCheck(url) {\n if (typeof url !== 'string') {\n return url;\n }\n\n let start = 0;\n\n while (start < url.length && url.charCodeAt(start) <= 0x20) {\n start++;\n }\n\n return url.slice(start).replace(urlParserControlCharacters, '');\n}\n","'use strict';\n\nexport default function parseProtocol(url) {\n const match = /^([-+\\w]{1,25}):(?:\\/\\/)?/.exec(url);\n return (match && match[1].toLowerCase()) || '';\n}\n","import utils from '../utils.js';\nimport platform from '../platform/index.js';\n\nconst decodeCookieValue = (value) => {\n try {\n return decodeURIComponent(value);\n } catch (e) {\n return value;\n }\n};\n\nexport default platform.hasStandardBrowserEnv\n ? // Standard browser envs support document.cookie\n {\n write(name, value, expires, path, domain, secure, sameSite) {\n if (typeof document === 'undefined') return;\n\n const cookie = [`${name}=${encodeURIComponent(value)}`];\n\n if (utils.isNumber(expires)) {\n cookie.push(`expires=${new Date(expires).toUTCString()}`);\n }\n if (utils.isString(path)) {\n cookie.push(`path=${path}`);\n }\n if (utils.isString(domain)) {\n cookie.push(`domain=${domain}`);\n }\n if (secure === true) {\n cookie.push('secure');\n }\n if (utils.isString(sameSite)) {\n cookie.push(`SameSite=${sameSite}`);\n }\n\n document.cookie = cookie.join('; ');\n },\n\n read(name) {\n if (typeof document === 'undefined') return null;\n const cookieString = document.cookie;\n if (!cookieString) return null;\n // Match name=value by splitting on the semicolon separator instead of building a\n // RegExp from `name` — interpolating an unescaped string into a RegExp would let\n // metacharacters (e.g. `.+?` in an attacker-influenced cookie name) cause ReDoS or\n // match the wrong cookie. Browsers may serialize cookie pairs as either \";\" or\n // \"; \", so ignore optional whitespace before each cookie name.\n const cookies = cookieString.split(';');\n for (let i = 0; i < cookies.length; i++) {\n const cookie = cookies[i].replace(/^\\s+/, '');\n const eq = cookie.indexOf('=');\n if (eq !== -1 && cookie.slice(0, eq) === name) {\n return decodeCookieValue(cookie.slice(eq + 1));\n }\n }\n return null;\n },\n\n async readAsync(name) {\n try {\n const store = typeof window !== 'undefined' && window.cookieStore;\n if (store && utils.isFunction(store.get)) {\n const cookie = await store.get(name);\n // Both APIs expose stored bytes; preserve Axios's existing URI decoding.\n return cookie ? decodeCookieValue(cookie.value) : null;\n }\n } catch (e) {\n // Restricted or unavailable storage retains the synchronous fallback.\n }\n\n return this.read(name);\n },\n\n remove(name) {\n this.write(name, '', Date.now() - 86400000, '/');\n },\n }\n : // Non-standard browser env (web workers, react-native) lack needed support.\n {\n write() {},\n read() {\n return null;\n },\n async readAsync() {\n return null;\n },\n remove() {},\n };\n","import speedometer from './speedometer.js';\nimport throttle from './throttle.js';\nimport utils from '../utils.js';\n\nexport const progressEventReducer = (listener, isDownloadStream, freq = 3) => {\n let bytesNotified = 0;\n const _speedometer = speedometer(50, 250);\n\n return throttle((e) => {\n if (!e || !utils.isNumber(e.loaded)) {\n return;\n }\n const rawLoaded = e.loaded;\n const total = e.lengthComputable ? e.total : undefined;\n const loaded = Math.max(0, total != null ? Math.min(rawLoaded, total) : rawLoaded);\n const progressBytes = Math.max(0, loaded - bytesNotified);\n const rate = _speedometer(progressBytes);\n\n bytesNotified = Math.max(bytesNotified, loaded);\n\n const data = {\n loaded,\n total,\n progress: total ? loaded / total : undefined,\n bytes: progressBytes,\n rate: rate ? rate : undefined,\n estimated: rate && total ? (total - loaded) / rate : undefined,\n event: e,\n lengthComputable: total != null,\n [isDownloadStream ? 'download' : 'upload']: true,\n };\n\n listener(data);\n }, freq);\n};\n\nexport const progressEventDecorator = (total, throttled) => {\n const lengthComputable = total != null;\n\n return [\n (loaded) =>\n throttled[0]({\n lengthComputable,\n total,\n loaded,\n }),\n throttled[1],\n ];\n};\n\nexport const asyncDecorator =\n (fn, scheduler = utils.asap) =>\n (...args) =>\n scheduler(() => fn(...args));\n","'use strict';\n\n/**\n * Calculate data maxRate\n * @param {Number} [samplesCount= 10]\n * @param {Number} [min= 1000]\n * @returns {Function}\n */\nfunction speedometer(samplesCount, min) {\n samplesCount = samplesCount || 10;\n const bytes = new Array(samplesCount);\n const timestamps = new Array(samplesCount);\n let head = 0;\n let tail = 0;\n let firstSampleTS;\n\n min = min !== undefined ? min : 1000;\n\n return function push(chunkLength) {\n const now = Date.now();\n\n const startedAt = timestamps[tail];\n\n if (!firstSampleTS) {\n firstSampleTS = now;\n }\n\n bytes[head] = chunkLength;\n timestamps[head] = now;\n\n let i = tail;\n let bytesCount = 0;\n\n while (i !== head) {\n bytesCount += bytes[i++];\n i = i % samplesCount;\n }\n\n head = (head + 1) % samplesCount;\n\n if (head === tail) {\n tail = (tail + 1) % samplesCount;\n }\n\n if (now - firstSampleTS < min) {\n return;\n }\n\n const passed = startedAt && now - startedAt;\n\n return passed ? Math.round((bytesCount * 1000) / passed) : undefined;\n };\n}\n\nexport default speedometer;\n","/**\n * Throttle decorator\n * @param {Function} fn\n * @param {Number} freq\n * @return {Array}\n */\nfunction throttle(fn, freq) {\n let timestamp = 0;\n let threshold = 1000 / freq;\n let lastArgs;\n let timer;\n\n const invoke = (args, now = Date.now()) => {\n timestamp = now;\n lastArgs = null;\n if (timer) {\n clearTimeout(timer);\n timer = null;\n }\n fn(...args);\n };\n\n const throttled = (...args) => {\n const now = Date.now();\n const passed = now - timestamp;\n if (passed >= threshold) {\n invoke(args, now);\n } else {\n lastArgs = args;\n if (!timer) {\n timer = setTimeout(() => {\n timer = null;\n invoke(lastArgs);\n }, threshold - passed);\n }\n }\n };\n\n const flush = () => lastArgs && invoke(lastArgs);\n const flushWith = (...args) => invoke(args);\n\n return [throttled, flush, flushWith];\n}\n\nexport default throttle;\n","import platform from '../platform/index.js';\n\nexport default platform.hasStandardBrowserEnv\n ? ((origin) => (url) => {\n url = new URL(url, document.baseURI || platform.origin);\n\n return (\n origin.protocol === url.protocol && origin.host === url.host && origin.port === url.port\n );\n })(new URL(platform.origin))\n : () => true;\n","'use strict';\n\nimport AxiosError, { REDACTED } from './AxiosError.js';\nimport isAbsoluteURL from '../helpers/isAbsoluteURL.js';\nimport combineURLs from '../helpers/combineURLs.js';\nimport normalizeURLForProtocolCheck from '../helpers/normalizeURLForProtocolCheck.js';\n\nconst malformedHttpProtocol = /^https?:(?!\\/\\/)/i;\n\n// Redact the parts of a URL that can carry secrets before it is embedded in an\n// error message. AxiosError.toJSON() serializes `message` verbatim and errors\n// are commonly logged, while the opt-in `config.redact` model only cleans\n// config keys — it cannot reach the message. Redact only the genuinely\n// sensitive substrings — userinfo (credentials), query parameter values and\n// fragment contents — with the same REDACTED marker the config redaction uses,\n// while keeping the scheme, host, path and parameter names so the offending\n// request stays accurately identifiable.\nfunction redactFragment(fragment) {\n if (!fragment) {\n return fragment;\n }\n\n return fragment.replace(/(^|&)([^=&]*=)?[^&]+/g, (match, separator, parameterName = '') => {\n return `${separator}${parameterName}${REDACTED}`;\n });\n}\n\nfunction redactSensitiveURLParts(url) {\n const redactedURL = url.replace(/^(https?:\\/{0,2})[^/?#]*@/i, `$1${REDACTED}@`);\n const fragmentIndex = redactedURL.indexOf('#');\n const urlWithoutFragment =\n fragmentIndex === -1 ? redactedURL : redactedURL.slice(0, fragmentIndex);\n const redactedURLWithoutFragment = urlWithoutFragment.replace(\n /([?&][^=&#]*=)[^&#]*/g,\n `$1${REDACTED}`\n );\n\n if (fragmentIndex === -1) {\n return redactedURLWithoutFragment;\n }\n\n return `${redactedURLWithoutFragment}#${redactFragment(redactedURL.slice(fragmentIndex + 1))}`;\n}\n\nfunction assertValidHttpProtocolURL(url, config) {\n if (typeof url === 'string') {\n const normalizedURL = normalizeURLForProtocolCheck(url);\n if (malformedHttpProtocol.test(normalizedURL)) {\n throw new AxiosError(\n `Invalid URL ${JSON.stringify(redactSensitiveURLParts(normalizedURL))}: missing \"//\" after protocol`,\n AxiosError.ERR_INVALID_URL,\n config\n );\n }\n }\n}\n\n/**\n * Creates a new URL by combining the baseURL with the requestedURL,\n * only when the requestedURL is not already an absolute URL.\n * If the requestURL is absolute, this function returns the requestedURL untouched.\n *\n * @param {string} baseURL The base URL\n * @param {string} requestedURL Absolute or relative URL to combine\n *\n * @returns {string} The combined full path\n */\nexport default function buildFullPath(baseURL, requestedURL, allowAbsoluteUrls, config) {\n assertValidHttpProtocolURL(requestedURL, config);\n let isRelativeUrl = !isAbsoluteURL(requestedURL);\n if (baseURL && (isRelativeUrl || allowAbsoluteUrls === false)) {\n assertValidHttpProtocolURL(baseURL, config);\n return combineURLs(baseURL, requestedURL);\n }\n return requestedURL;\n}\n","'use strict';\n\n/**\n * Determines whether the specified URL is absolute\n *\n * @param {string} url The URL to test\n *\n * @returns {boolean} True if the specified URL is absolute, otherwise false\n */\nexport default function isAbsoluteURL(url) {\n // A URL is considered absolute if it begins with \"://\" or \"//\" (protocol-relative URL).\n // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed\n // by any combination of letters, digits, plus, period, or hyphen.\n if (typeof url !== 'string') {\n return false;\n }\n\n return /^([a-z][a-z\\d+\\-.]*:)?\\/\\//i.test(url);\n}\n","'use strict';\n\n/**\n * Creates a new URL by combining the specified URLs\n *\n * @param {string} baseURL The base URL\n * @param {string} relativeURL The relative URL\n *\n * @returns {string} The combined URL\n */\nexport default function combineURLs(baseURL, relativeURL) {\n if (!relativeURL) {\n return baseURL;\n }\n\n let end = baseURL.length;\n\n while (end > 0 && baseURL.charCodeAt(end - 1) === 47) {\n end--;\n }\n\n return baseURL.slice(0, end) + '/' + relativeURL.replace(/^\\/+/, '');\n}\n","'use strict';\n\nimport utils from '../utils.js';\nimport AxiosHeaders from './AxiosHeaders.js';\nimport assertParamsAcyclic from './assertParamsAcyclic.js';\n\nconst headersToObject = (thing) => (thing instanceof AxiosHeaders ? { ...thing } : thing);\n\nconst ownEnumerableKeys = (thing) => {\n if (Object.getOwnPropertySymbols && Object.getOwnPropertyDescriptor) {\n return Object.keys(thing).concat(\n Object.getOwnPropertySymbols(thing).filter((symbol) => {\n const descriptor = Object.getOwnPropertyDescriptor(thing, symbol);\n return descriptor && descriptor.enumerable;\n })\n );\n }\n return Object.keys(thing);\n};\n\n// Copy params without recursive merges so the serializer remains responsible\n// for its depth policy. Only visit defaults that contribute to the result.\nfunction mergeParams(a, b) {\n const pending = [];\n const copies = new WeakMap();\n const empty = {};\n\n function copy(target, source) {\n if (!utils.isPlainObject(source)) {\n return utils.isArray(source) ? source.slice() : source;\n }\n\n const base = utils.isPlainObject(target) ? target : empty;\n let bases = copies.get(source);\n if (!bases) {\n bases = new WeakMap();\n copies.set(source, bases);\n }\n if (bases.has(base)) return bases.get(base);\n\n const result = {};\n bases.set(base, result);\n pending.push({ base, source, result });\n return result;\n }\n\n const result = utils.isUndefined(b) ? copy(undefined, a) : copy(a, b);\n while (pending.length) {\n const { base, source, result: target } = pending.pop();\n const baseKeys = new Set(ownEnumerableKeys(base));\n const sourceKeys = new Set(ownEnumerableKeys(source));\n const keys = new Set([...baseKeys, ...sourceKeys]);\n\n keys.forEach((key) => {\n if (key === '__proto__' || key === 'constructor' || key === 'prototype') return;\n const hasSource = sourceKeys.has(key);\n const value = hasSource ? source[key] : undefined;\n const previous =\n (!hasSource || utils.isPlainObject(value)) && baseKeys.has(key) ? base[key] : undefined;\n target[key] = hasSource ? copy(previous, value) : copy(undefined, previous);\n });\n }\n\n assertParamsAcyclic(result);\n return result;\n}\n\nfunction getMergedValue(target, source, prop, caseless) {\n if (utils.isPlainObject(target) && utils.isPlainObject(source)) {\n return utils.merge.call({ caseless }, target, source);\n } else if (utils.isPlainObject(source)) {\n return utils.merge({}, source);\n } else if (utils.isArray(source)) {\n return source.slice();\n }\n return source;\n}\n\nfunction mergeDeepProperties(a, b, prop, caseless) {\n if (!utils.isUndefined(b)) {\n return getMergedValue(a, b, prop, caseless);\n } else if (!utils.isUndefined(a)) {\n return getMergedValue(undefined, a, prop, caseless);\n }\n}\n\n// eslint-disable-next-line consistent-return\nfunction valueFromConfig2(a, b) {\n if (!utils.isUndefined(b)) {\n return getMergedValue(undefined, b);\n }\n}\n\n// eslint-disable-next-line consistent-return\nfunction defaultToConfig2(a, b) {\n if (!utils.isUndefined(b)) {\n return getMergedValue(undefined, b);\n } else if (!utils.isUndefined(a)) {\n return getMergedValue(undefined, a);\n }\n}\n\nfunction getMergedTransitionalOption(config1, config2, prop) {\n const transitional2 = utils.hasOwnProp(config2, 'transitional')\n ? config2.transitional\n : undefined;\n\n if (!utils.isUndefined(transitional2)) {\n if (utils.isPlainObject(transitional2)) {\n if (utils.hasOwnProp(transitional2, prop)) {\n return transitional2[prop];\n }\n } else {\n return undefined;\n }\n }\n\n const transitional1 = utils.hasOwnProp(config1, 'transitional')\n ? config1.transitional\n : undefined;\n\n if (utils.isPlainObject(transitional1) && utils.hasOwnProp(transitional1, prop)) {\n return transitional1[prop];\n }\n\n return undefined;\n}\n\n// eslint-disable-next-line consistent-return\nfunction mergeDirectKeys(a, b, prop, config1, config2) {\n if (utils.hasOwnProp(config2, prop)) {\n return getMergedValue(a, b);\n } else if (utils.hasOwnProp(config1, prop)) {\n return getMergedValue(undefined, a);\n }\n}\n\nfunction mergeHeaders(a, b, prop) {\n return mergeDeepProperties(headersToObject(a), headersToObject(b), prop, true);\n}\n\n// Null-proto, frozen descriptor so a polluted Object.prototype.get cannot turn\n// this data descriptor into an accessor descriptor on the way in.\n// defineProperty only reads it, so one shared instance serves every call.\nconst hasOwnPropertyDescriptor = Object.freeze({\n __proto__: null,\n value: Object.prototype.hasOwnProperty,\n enumerable: false,\n writable: true,\n configurable: true,\n});\n\n// The strategy table and the strategies above are stateless, so they are\n// built once at module load instead of on every call: mergeConfig runs at\n// most twice per request (once from a method alias, once from `_request`).\nconst mergeMap = {\n url: valueFromConfig2,\n method: valueFromConfig2,\n data: valueFromConfig2,\n baseURL: defaultToConfig2,\n transformRequest: defaultToConfig2,\n transformResponse: defaultToConfig2,\n params: mergeParams,\n paramsSerializer: defaultToConfig2,\n timeout: defaultToConfig2,\n timeoutErrorMessage: defaultToConfig2,\n withCredentials: defaultToConfig2,\n withXSRFToken: defaultToConfig2,\n adapter: defaultToConfig2,\n responseType: defaultToConfig2,\n xsrfCookieName: defaultToConfig2,\n xsrfHeaderName: defaultToConfig2,\n onUploadProgress: defaultToConfig2,\n onDownloadProgress: defaultToConfig2,\n decompress: defaultToConfig2,\n maxContentLength: defaultToConfig2,\n maxBodyLength: defaultToConfig2,\n beforeRedirect: defaultToConfig2,\n transport: defaultToConfig2,\n httpAgent: defaultToConfig2,\n httpsAgent: defaultToConfig2,\n cancelToken: defaultToConfig2,\n socketPath: defaultToConfig2,\n allowedSocketPaths: defaultToConfig2,\n responseEncoding: defaultToConfig2,\n validateStatus: mergeDirectKeys,\n headers: mergeHeaders,\n};\n\n/**\n * Config-specific merge-function which creates a new config-object\n * by merging two configuration objects together.\n *\n * @param {Object} config1\n * @param {Object} config2\n *\n * @returns {Object} New object resulting from merging config2 to config1\n */\nexport default function mergeConfig(config1, config2) {\n // eslint-disable-next-line no-param-reassign\n config1 = config1 || {};\n config2 = config2 || {};\n\n // Use a null-prototype object so that downstream reads such as `config.auth`\n // or `config.baseURL` cannot inherit polluted values from Object.prototype.\n // `hasOwnProperty` is restored as a non-enumerable own slot to preserve\n // ergonomics for user code that relies on it.\n const config = Object.create(null);\n Object.defineProperty(config, 'hasOwnProperty', hasOwnPropertyDescriptor);\n\n const keys = ownEnumerableKeys({ ...config1, ...config2 });\n\n for (let i = 0, len = keys.length; i < len; i++) {\n const prop = keys[i];\n if (prop === '__proto__' || prop === 'constructor' || prop === 'prototype') continue;\n const merge = utils.hasOwnProp(mergeMap, prop) ? mergeMap[prop] : mergeDeepProperties;\n const a = utils.hasOwnProp(config1, prop) ? config1[prop] : undefined;\n const b = utils.hasOwnProp(config2, prop) ? config2[prop] : undefined;\n const configValue =\n merge === mergeDirectKeys ? merge(a, b, prop, config1, config2) : merge(a, b, prop);\n (utils.isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue);\n }\n\n if (\n utils.hasOwnProp(config2, 'validateStatus') &&\n utils.isUndefined(config2.validateStatus) &&\n getMergedTransitionalOption(config1, config2, 'validateStatusUndefinedResolves') === false\n ) {\n if (utils.hasOwnProp(config1, 'validateStatus')) {\n config.validateStatus = getMergedValue(undefined, config1.validateStatus);\n } else {\n delete config.validateStatus;\n }\n }\n\n return config;\n}\n","'use strict';\n\nimport utils from '../utils.js';\nimport AxiosError from './AxiosError.js';\n\nexport default function assertParamsAcyclic(params) {\n const pending = [{ value: params }];\n const active = new WeakSet();\n const visited = new WeakSet();\n\n while (pending.length) {\n const { value, done } = pending.pop();\n if (!utils.isPlainObject(value) && !utils.isArray(value)) continue;\n if (done) {\n active.delete(value);\n continue;\n }\n if (active.has(value)) {\n throw new AxiosError(\n 'Circular reference detected in params',\n AxiosError.ERR_BAD_OPTION_VALUE\n );\n }\n if (visited.has(value)) continue;\n visited.add(value);\n active.add(value);\n pending.push({ value, done: true });\n\n const keys = Object.keys(value);\n if (Object.getOwnPropertySymbols && Object.getOwnPropertyDescriptor) {\n Object.getOwnPropertySymbols(value).forEach((key) => {\n const descriptor = Object.getOwnPropertyDescriptor(value, key);\n if (descriptor && descriptor.enumerable) keys.push(key);\n });\n }\n // Shallow array elements retain fields filtered during plain-object merges.\n // Inspect reserved data properties without evaluating their accessors.\n keys.forEach((key) => {\n if (key === '__proto__' || key === 'constructor' || key === 'prototype') {\n const descriptor = Object.getOwnPropertyDescriptor(value, key);\n if (descriptor && utils.hasOwnProp(descriptor, 'value')) {\n pending.push({ value: descriptor.value });\n }\n } else {\n pending.push({ value: value[key] });\n }\n });\n }\n}\n","'use strict';\n\nconst FORM_DATA_CONTENT_HEADERS = ['content-type', 'content-length'];\n\n/**\n * Apply the headers generated by a FormData implementation to the request headers,\n * honoring the `formDataHeaderPolicy` option: with 'content-only', copy only the\n * content-* headers; otherwise merge all of them.\n *\n * @param {AxiosHeaders} headers - the request headers to mutate\n * @param {Object | null | undefined} formHeaders - headers produced by the FormData implementation\n * @param {String} [policy] - the resolved `formDataHeaderPolicy` config value\n *\n * @returns {void}\n */\nexport default function setFormDataHeaders(headers, formHeaders, policy) {\n if (policy !== 'content-only') {\n headers.set(formHeaders);\n return;\n }\n\n Object.entries(formHeaders || {}).forEach(([key, val]) => {\n if (FORM_DATA_CONTENT_HEADERS.includes(key.toLowerCase())) {\n headers.set(key, val);\n }\n });\n}\n","import platform from '../platform/index.js';\nimport utils from '../utils.js';\nimport AxiosError from '../core/AxiosError.js';\nimport isURLSameOrigin from './isURLSameOrigin.js';\nimport cookies from './cookies.js';\nimport buildFullPath from '../core/buildFullPath.js';\nimport mergeConfig from '../core/mergeConfig.js';\nimport AxiosHeaders from '../core/AxiosHeaders.js';\nimport setFormDataHeaders from '../core/setFormDataHeaders.js';\nimport buildURL from './buildURL.js';\n\n/**\n * Encode a UTF-8 string to a Latin-1 byte string for use with btoa().\n * This is a modern replacement for the deprecated unescape(encodeURIComponent(str)) pattern.\n *\n * @param {string} str The string to encode\n *\n * @returns {string} UTF-8 bytes as a Latin-1 string\n */\nconst encodeUTF8 = (str) =>\n encodeURIComponent(str).replace(/%([0-9A-F]{2})/gi, (_, hex) =>\n String.fromCharCode(parseInt(hex, 16))\n );\n\nconst readCookie = (name) => cookies.read(name);\n\nfunction resolveConfig(config, readXsrfCookie = readCookie) {\n const newConfig = mergeConfig({}, config);\n\n // Read only own properties to prevent prototype pollution gadgets\n // (e.g. Object.prototype.baseURL = 'https://evil.com').\n const own = (key) => (utils.hasOwnProp(newConfig, key) ? newConfig[key] : undefined);\n\n const data = own('data');\n let withXSRFToken = own('withXSRFToken');\n const xsrfHeaderName = own('xsrfHeaderName');\n const xsrfCookieName = own('xsrfCookieName');\n let headers = own('headers');\n const auth = own('auth');\n const baseURL = own('baseURL');\n const allowAbsoluteUrls = own('allowAbsoluteUrls');\n const url = own('url');\n\n newConfig.headers = headers = AxiosHeaders.from(headers);\n\n newConfig.url = buildURL(\n buildFullPath(baseURL, url, allowAbsoluteUrls, newConfig),\n own('params'),\n own('paramsSerializer')\n );\n\n // HTTP basic authentication\n if (auth) {\n const username = utils.getSafeProp(auth, 'username') || '';\n const password = utils.getSafeProp(auth, 'password') || '';\n const transitional = own('transitional');\n const encodeUsername =\n transitional &&\n utils.hasOwnProp(transitional, 'encodeBasicAuthUsername') &&\n transitional.encodeBasicAuthUsername === true;\n\n try {\n headers.set(\n 'Authorization',\n // Preserve legacy username bytes unless the caller opts in to UTF-8.\n 'Basic ' +\n btoa(\n (encodeUsername ? encodeUTF8(username) : username) +\n ':' +\n (password ? encodeUTF8(password) : '')\n )\n );\n } catch (e) {\n throw AxiosError.from(e, AxiosError.ERR_BAD_OPTION_VALUE, config);\n }\n }\n\n if (utils.isFormData(data)) {\n const getHeaders = utils.getSafeProp(data, 'getHeaders');\n\n if (\n platform.hasStandardBrowserEnv ||\n platform.hasStandardBrowserWebWorkerEnv ||\n utils.isReactNative(data)\n ) {\n headers.setContentType(undefined); // browser/web worker/RN handles it\n } else if (utils.isFunction(getHeaders)) {\n // Node.js FormData (like form-data package)\n setFormDataHeaders(headers, getHeaders.call(data), own('formDataHeaderPolicy'));\n }\n }\n\n // Add xsrf header\n // This is only done if running in a standard browser environment.\n // Specifically not if we're in a web worker, or react-native.\n\n if (platform.hasStandardBrowserEnv) {\n if (utils.isFunction(withXSRFToken)) {\n withXSRFToken = withXSRFToken(newConfig);\n }\n\n // Strict boolean check — prevents proto-pollution gadgets (e.g. Object.prototype.withXSRFToken = 1)\n // and misconfigurations (e.g. \"false\") from short-circuiting the same-origin check and leaking\n // the XSRF token cross-origin.\n const shouldSendXSRF =\n withXSRFToken === true || (withXSRFToken == null && isURLSameOrigin(newConfig.url));\n\n if (shouldSendXSRF) {\n const xsrfValue = xsrfHeaderName && xsrfCookieName && readXsrfCookie(xsrfCookieName);\n\n if (xsrfValue) {\n headers.set(xsrfHeaderName, xsrfValue);\n }\n }\n }\n\n return newConfig;\n}\n\nexport default resolveConfig;\n","import utils from '../utils.js';\nimport settle from '../core/settle.js';\nimport transitionalDefaults from '../defaults/transitional.js';\nimport AxiosError from '../core/AxiosError.js';\nimport CanceledError from '../cancel/CanceledError.js';\nimport normalizeURLForProtocolCheck from '../helpers/normalizeURLForProtocolCheck.js';\nimport parseProtocol from '../helpers/parseProtocol.js';\nimport platform from '../platform/index.js';\nimport AxiosHeaders from '../core/AxiosHeaders.js';\nimport cookies from '../helpers/cookies.js';\nimport { progressEventReducer } from '../helpers/progressEventReducer.js';\nimport resolveConfig from '../helpers/resolveConfig.js';\nimport { toByteStringHeaderObject } from '../helpers/sanitizeHeaderValue.js';\n\nconst isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined';\n\nexport default isXHRAdapterSupported &&\n function (config) {\n return new Promise(function dispatchXhrRequest(resolve, reject) {\n let useAsyncXsrf;\n try {\n const store =\n platform.hasStandardBrowserEnv && typeof window !== 'undefined' && window.cookieStore;\n useAsyncXsrf = store && utils.isFunction(store.get);\n } catch (e) {\n // A restricted Cookie Store getter must retain the synchronous fallback.\n }\n let xsrfCookieName;\n const _config = resolveConfig(\n config,\n useAsyncXsrf\n ? (name) => {\n xsrfCookieName = name;\n return null;\n }\n : undefined\n );\n let requestData = _config.data;\n const requestHeaders = AxiosHeaders.from(_config.headers).normalize();\n let { responseType, onUploadProgress, onDownloadProgress } = _config;\n let onCanceled;\n let timeoutId;\n let uploadThrottled, downloadThrottled;\n let flushUpload, flushDownload, flushDownloadWithEvent;\n\n function done() {\n clearTimeout(timeoutId);\n // A final progress callback must not prevent the remaining cleanup.\n // Report errors asynchronously, as onloadend and the throttle timer do.\n try {\n flushUpload && flushUpload(); // flush events\n } catch (err) {\n setTimeout(() => {\n throw err;\n });\n }\n try {\n flushDownload && flushDownload(); // flush events\n } catch (err) {\n setTimeout(() => {\n throw err;\n });\n }\n\n // A flush can synchronously cancel the request and reenter done().\n // In that case the inner call has already detached these listeners.\n if (request) {\n downloadThrottled && request.removeEventListener('progress', downloadThrottled);\n if (request.upload) {\n uploadThrottled && request.upload.removeEventListener('progress', uploadThrottled);\n flushUpload && request.upload.removeEventListener('loadend', flushUpload);\n }\n }\n\n _config.cancelToken && _config.cancelToken.unsubscribe(onCanceled);\n\n _config.signal && _config.signal.removeEventListener('abort', onCanceled);\n }\n\n let request = new XMLHttpRequest();\n\n request.open(_config.method.toUpperCase(), _config.url, true);\n\n // Set the request timeout in MS\n request.timeout = _config.timeout;\n\n function onloadend(event) {\n if (!request) {\n return;\n }\n\n // Status 0 means no response was received, which onerror and onabort normally\n // reject before this runs. Firefox 152 fires only readystatechange and loadend for\n // navigation-canceled requests (https://bugzilla.mozilla.org/show_bug.cgi?id=1505389),\n // leaving settle() to resolve them as an empty success. ECONNABORTED is the error\n // onabort raised on Firefox 151. Reads over file:, which some environments report as\n // status 0 on success, are excluded by the request URL's scheme after browser-style\n // preprocessing, by the page origin's scheme for relative URLs (which inherit it), or\n // by responseURL where implemented.\n if (\n request.status === 0 &&\n (parseProtocol(normalizeURLForProtocolCheck(_config.url)) ||\n parseProtocol(platform.origin)) !== 'file' &&\n !(request.responseURL && request.responseURL.startsWith('file:'))\n ) {\n reject(new AxiosError('Request aborted', AxiosError.ECONNABORTED, config, request));\n done();\n\n // Clean up request\n request = null;\n return;\n }\n\n // When loadend is still dispatching, flushing with it gives progress\n // listeners a final delivery whose event has a live target. The legacy\n // ready-state fallback has no event, so replay its pending progress.\n // A throwing listener must not block settlement; rethrow asynchronously,\n // matching how listener errors surface on the throttle timer path.\n try {\n if (event) {\n flushDownloadWithEvent && flushDownloadWithEvent(event);\n } else {\n flushDownload && flushDownload();\n }\n } catch (err) {\n setTimeout(() => {\n throw err;\n });\n }\n\n // A final progress callback can cancel the request synchronously.\n if (!request) {\n return;\n }\n\n // Prepare the response\n const responseHeaders = AxiosHeaders.from(\n 'getAllResponseHeaders' in request && request.getAllResponseHeaders()\n );\n const responseData =\n !responseType || responseType === 'text' || responseType === 'json'\n ? request.responseText\n : request.response;\n const response = {\n data: responseData,\n status: request.status,\n statusText: request.statusText,\n headers: responseHeaders,\n config,\n request,\n };\n\n settle(\n function _resolve(value) {\n resolve(value);\n done();\n },\n function _reject(err) {\n reject(err);\n done();\n },\n response\n );\n\n // Clean up request\n request = null;\n }\n\n if ('onloadend' in request) {\n // Use onloadend if available\n request.onloadend = onloadend;\n } else {\n // Listen for ready state to emulate onloadend\n request.onreadystatechange = function handleLoad() {\n if (!request || request.readyState !== 4) {\n return;\n }\n\n // The request errored out and we didn't get a response, this will be\n // handled by onerror instead\n // With one exception: request that using file: protocol, most browsers\n // will return status as 0 even though it's a successful request\n if (\n request.status === 0 &&\n !(request.responseURL && request.responseURL.startsWith('file:'))\n ) {\n return;\n }\n // readystate handler is calling before onerror or ontimeout handlers,\n // so we should call onloadend on the next 'tick'\n setTimeout(onloadend);\n };\n }\n\n // Handle browser request cancellation (as opposed to a manual cancellation)\n request.onabort = function handleAbort() {\n if (!request) {\n return;\n }\n\n reject(new AxiosError('Request aborted', AxiosError.ECONNABORTED, config, request));\n done();\n\n // Clean up request\n request = null;\n };\n\n // Handle low level network errors\n request.onerror = function handleError(event) {\n // Browsers deliver a ProgressEvent in XHR onerror\n // (message may be empty; when present, surface it)\n // See https://developer.mozilla.org/docs/Web/API/XMLHttpRequest/error_event\n const msg = event && event.message ? event.message : 'Network Error';\n const err = new AxiosError(msg, AxiosError.ERR_NETWORK, config, request);\n // attach the underlying event for consumers who want details\n err.event = event || null;\n reject(err);\n done();\n request = null;\n };\n\n // Handle timeout\n request.ontimeout = function handleTimeout() {\n if (!request) return;\n let timeoutErrorMessage = _config.timeout\n ? 'timeout of ' + _config.timeout + 'ms exceeded'\n : 'timeout exceeded';\n const transitional = _config.transitional || transitionalDefaults;\n if (_config.timeoutErrorMessage) {\n timeoutErrorMessage = _config.timeoutErrorMessage;\n }\n reject(\n new AxiosError(\n timeoutErrorMessage,\n transitional.clarifyTimeoutError ? AxiosError.ETIMEDOUT : AxiosError.ECONNABORTED,\n config,\n request\n )\n );\n done();\n\n // Clean up request\n request = null;\n };\n\n // Remove Content-Type if data is undefined\n requestData === undefined && requestHeaders.setContentType(null);\n\n // Add withCredentials to request if needed\n if (!utils.isUndefined(_config.withCredentials)) {\n request.withCredentials = !!_config.withCredentials;\n }\n\n // Add responseType to request if needed\n if (responseType && responseType !== 'json') {\n request.responseType = _config.responseType;\n }\n\n // Handle progress if needed\n if (onDownloadProgress) {\n [downloadThrottled, flushDownload, flushDownloadWithEvent] = progressEventReducer(\n onDownloadProgress,\n true\n );\n request.addEventListener('progress', downloadThrottled);\n }\n\n // Not all browsers support upload events\n if (onUploadProgress && request.upload) {\n [uploadThrottled, flushUpload] = progressEventReducer(onUploadProgress);\n\n request.upload.addEventListener('progress', uploadThrottled);\n\n request.upload.addEventListener('loadend', flushUpload);\n }\n\n if (_config.cancelToken || _config.signal) {\n // Handle cancellation\n // eslint-disable-next-line func-names\n onCanceled = (cancel) => {\n if (!request) {\n return;\n }\n reject(!cancel || cancel.type ? new CanceledError(null, config, request) : cancel);\n const xhr = request;\n done();\n request = null;\n xhr.abort();\n };\n\n _config.cancelToken && _config.cancelToken.subscribe(onCanceled);\n if (!request) return;\n if (_config.signal) {\n _config.signal.aborted\n ? onCanceled()\n : _config.signal.addEventListener('abort', onCanceled);\n }\n }\n\n if (!request) return;\n\n const protocol = parseProtocol(_config.url);\n\n if (protocol && !platform.protocols.includes(protocol)) {\n reject(\n new AxiosError(\n 'Unsupported protocol ' + protocol + ':',\n AxiosError.ERR_BAD_REQUEST,\n config\n )\n );\n done();\n return;\n }\n\n const sendRequest = () => {\n if (!request) return;\n // Apply headers after an asynchronous XSRF read so existing headers are\n // replaced through AxiosHeaders rather than appended by the native XHR.\n if ('setRequestHeader' in request) {\n utils.forEach(\n toByteStringHeaderObject(requestHeaders),\n function setRequestHeader(val, key) {\n request.setRequestHeader(key, val);\n }\n );\n }\n request.send(requestData || null);\n };\n\n if (xsrfCookieName) {\n // Native XHR timeout starts at send(). Cover cookie preparation and the\n // subsequent request with the same budget and existing timeout handler.\n const now =\n typeof performance !== 'undefined' && utils.isFunction(performance.now)\n ? () => performance.now()\n : Date.now;\n const deadline = request.timeout > 0 ? now() + Number(request.timeout) : undefined;\n const abortOnTimeout = () => {\n if (!request) return;\n const xhr = request;\n xhr.ontimeout();\n xhr.abort();\n };\n if (deadline !== undefined) {\n const scheduleTimeout = () => {\n const remaining = deadline - now();\n if (remaining > 0) {\n // Browser timers overflow above the signed 32-bit delay limit.\n timeoutId = setTimeout(scheduleTimeout, Math.min(remaining, 0x7fffffff));\n } else {\n abortOnTimeout();\n }\n };\n scheduleTimeout();\n }\n\n cookies\n .readAsync(xsrfCookieName)\n .then((value) => {\n if (!request) return;\n // Promise callbacks may run before an overdue timer after a busy task.\n if (deadline !== undefined && now() >= deadline) {\n abortOnTimeout();\n return;\n }\n if (value) {\n const headerName =\n utils.hasOwnProp(_config, 'xsrfHeaderName') && _config.xsrfHeaderName;\n requestHeaders.set(headerName, value);\n }\n sendRequest();\n })\n .catch((error) => {\n if (!request) return;\n reject(AxiosError.from(error, null, config, request));\n done();\n request = null;\n });\n } else {\n sendRequest();\n }\n });\n };\n","import CanceledError from '../cancel/CanceledError.js';\nimport AxiosError from '../core/AxiosError.js';\nimport utils from '../utils.js';\n\nconst composeSignals = (signals, timeout) => {\n signals = signals ? signals.filter(Boolean) : [];\n\n if (!timeout && !signals.length) {\n return;\n }\n\n const controller = new AbortController();\n\n let aborted = false;\n\n const onabort = function (reason) {\n if (!aborted) {\n aborted = true;\n unsubscribe();\n const err = reason instanceof Error ? reason : this.reason;\n controller.abort(\n err instanceof AxiosError\n ? err\n : new CanceledError(err instanceof Error ? err.message : err)\n );\n }\n };\n\n let timer =\n timeout &&\n setTimeout(() => {\n timer = null;\n onabort(new AxiosError(`timeout of ${timeout}ms exceeded`, AxiosError.ETIMEDOUT));\n }, timeout);\n\n const unsubscribe = () => {\n if (!signals) {\n return;\n }\n timer && clearTimeout(timer);\n timer = null;\n signals.forEach((signal) => {\n const unsubscribeSignal = utils.getSafeProp(signal, 'unsubscribe');\n utils.isFunction(unsubscribeSignal)\n ? unsubscribeSignal.call(signal, onabort)\n : signal.removeEventListener('abort', onabort);\n });\n signals = null;\n };\n\n signals.forEach((signal) => {\n if (aborted) {\n return;\n }\n\n if (signal.aborted) {\n onabort.call(signal);\n return;\n }\n\n signal.addEventListener('abort', onabort, { once: true });\n });\n\n const { signal } = controller;\n\n signal.unsubscribe = () => utils.asap(unsubscribe);\n\n return signal;\n};\n\nexport default composeSignals;\n","export const streamChunk = function* (chunk, chunkSize) {\n let len = chunk.byteLength;\n\n if (!chunkSize || len < chunkSize) {\n yield chunk;\n return;\n }\n\n let pos = 0;\n let end;\n\n while (pos < len) {\n end = pos + chunkSize;\n yield chunk.slice(pos, end);\n pos = end;\n }\n};\n\nexport const readBytes = async function* (iterable, chunkSize) {\n for await (const chunk of readStream(iterable)) {\n yield* streamChunk(chunk, chunkSize);\n }\n};\n\nconst readStream = async function* (stream) {\n if (stream[Symbol.asyncIterator]) {\n yield* stream;\n return;\n }\n\n const reader = stream.getReader();\n try {\n for (;;) {\n const { done, value } = await reader.read();\n if (done) {\n break;\n }\n yield value;\n }\n } finally {\n await reader.cancel();\n }\n};\n\nexport const trackStream = (stream, chunkSize, onProgress, onFinish) => {\n const iterator = readBytes(stream, chunkSize);\n\n let bytes = 0;\n let done;\n let _onFinish = (e) => {\n if (!done) {\n done = true;\n onFinish && onFinish(e);\n }\n };\n\n return new ReadableStream(\n {\n async pull(controller) {\n try {\n const { done, value } = await iterator.next();\n\n if (done) {\n _onFinish();\n controller.close();\n return;\n }\n\n let len = value.byteLength;\n if (onProgress) {\n let loadedBytes = (bytes += len);\n onProgress(loadedBytes);\n }\n controller.enqueue(new Uint8Array(value));\n } catch (err) {\n _onFinish(err);\n throw err;\n }\n },\n cancel(reason) {\n _onFinish(reason);\n return iterator.return();\n },\n },\n {\n highWaterMark: 2,\n }\n );\n};\n","import utils from '../utils.js';\n\nconst CRLF = '\\r\\n';\nconst normalizeLines = (value) => String(value).replace(/\\r\\n|\\r|\\n/g, CRLF);\nconst escapeName = (value) =>\n String(value).replace(/[\\r\\n\"]/g, (char) =>\n char === '\\r' ? '%0D' : char === '\\n' ? '%0A' : '%22'\n );\n\n// Count UTF-8 bytes without allocating an encoded copy of a field. FormData\n// string values normalize line endings; Blob/File contents remain unchanged.\nconst stringBytes = (value, normalize) => {\n let length = 0;\n for (let i = 0; i < value.length; i++) {\n const code = value.charCodeAt(i);\n if (normalize && (code === 13 || code === 10)) {\n if (code === 13 && value.charCodeAt(i + 1) === 10) i++;\n length += 2;\n } else if (code < 0x80) {\n length++;\n } else if (code < 0x800) {\n length += 2;\n } else if (\n code >= 0xd800 &&\n code <= 0xdbff &&\n value.charCodeAt(i + 1) >= 0xdc00 &&\n value.charCodeAt(i + 1) <= 0xdfff\n ) {\n length += 4;\n i++;\n } else {\n length += 3;\n }\n }\n return length;\n};\n\n// Describe serialization failures independently of any request library.\nexport class FormDataError extends TypeError {\n constructor(message, reason) {\n super(message);\n this.name = 'FormDataError';\n this.reason = reason;\n }\n}\n\n// The caller supplies the boundary, Blob implementation, and limit error.\nexport default function formDataToBlob(form, Blob, limit, limitError, boundary) {\n if (!utils.isFunction(Blob)) {\n throw new FormDataError('Blob is not supported', 'blob');\n }\n\n if (\n !utils.isString(boundary) ||\n !/^[A-Za-z0-9'()+_,./:=? -]{1,70}$/.test(boundary) ||\n / $/.test(boundary)\n ) {\n throw new FormDataError('Invalid multipart boundary', 'boundary');\n }\n const footer = '--' + boundary + '--' + CRLF;\n let length = footer.length;\n const parts = [];\n const checkLength = (extra) => {\n if (length + extra > limit) throw limitError();\n };\n checkLength(0);\n\n for (const [name, value] of form) {\n const isString = utils.isString(value);\n const valueLength = isString ? stringBytes(value, true) : value.size;\n if (!Number.isFinite(valueLength) || valueLength < 0) {\n throw new FormDataError('Unsupported FormData part size', 'part');\n }\n // Reject large values and names before building normalized header strings.\n checkLength(\n valueLength +\n stringBytes(name, true) +\n (!isString && value.name ? stringBytes(value.name, false) : 0) +\n (!isString && value.type ? stringBytes(value.type, false) : 0)\n );\n\n let header =\n '--' +\n boundary +\n CRLF +\n 'Content-Disposition: form-data; name=\"' +\n escapeName(normalizeLines(name)) +\n '\"';\n if (!isString) {\n header +=\n '; filename=\"' +\n escapeName(utils.isString(value.name) ? value.name : 'blob') +\n '\"' +\n CRLF +\n 'Content-Type: ' +\n String(value.type || 'application/octet-stream').replace(/[\\r\\n]/g, '');\n }\n header += CRLF + CRLF;\n const partLength = stringBytes(header, false) + valueLength + CRLF.length;\n checkLength(partLength);\n length += partLength;\n parts.push({ header, value, isString });\n }\n\n // Native Blob composition retains existing Blob/File data. No file is read\n // and no complete multipart ArrayBuffer is created to determine its length.\n const blobParts = [];\n for (const part of parts) {\n blobParts.push(part.header, part.isString ? normalizeLines(part.value) : part.value, CRLF);\n }\n blobParts.push(footer);\n return new Blob(blobParts, { type: 'multipart/form-data; boundary=' + boundary });\n}\n","import utils from '../utils.js';\nimport platform from '../platform/index.js';\nimport AxiosError from './AxiosError.js';\nimport formDataToBlob, { FormDataError } from '../helpers/formDataToBlob.js';\n\nexport default function createMultipartBody(form, Blob, limit, limitError, boundary) {\n // Report missing Blob support before trying to select a random source.\n if (!utils.isFunction(Blob)) {\n throw new AxiosError('Blob is not supported', AxiosError.ERR_NOT_SUPPORT);\n }\n\n if (boundary === undefined) {\n if (utils.isFunction(platform.generateString)) {\n boundary = 'axios-' + platform.generateString(36, '0123456789abcdef');\n } else {\n const crypto = utils.global.crypto;\n if (!crypto || !utils.isFunction(crypto.getRandomValues)) {\n throw new AxiosError('Random byte generation is not supported', AxiosError.ERR_NOT_SUPPORT);\n }\n const random = new Uint8Array(18);\n crypto.getRandomValues(random);\n boundary =\n 'axios-' + Array.from(random, (value) => ('0' + value.toString(16)).slice(-2)).join('');\n }\n }\n\n try {\n return formDataToBlob(form, Blob, limit, limitError, boundary);\n } catch (error) {\n if (error instanceof FormDataError) {\n const code =\n error.reason === 'boundary' ? AxiosError.ERR_BAD_OPTION_VALUE : AxiosError.ERR_BAD_REQUEST;\n throw new AxiosError(error.message, code);\n }\n throw error;\n }\n}\n","/**\n * Estimate data: URL byte lengths *without* allocating large buffers.\n * - Fetch percent-decodes a base64 body before decoding it.\n * - Node's Buffer.from(body, 'base64') sizes its backing allocation from the\n * percent-decoded body, including ignored characters and content after padding.\n * - Non-base64 data is percent-decoded and then encoded as UTF-8.\n */\nconst isHexDigit = (charCode) =>\n (charCode >= 48 && charCode <= 57) ||\n (charCode >= 65 && charCode <= 70) ||\n (charCode >= 97 && charCode <= 102);\n\nconst isPercentEncodedByte = (str, i, len) =>\n i + 2 < len && isHexDigit(str.charCodeAt(i + 1)) && isHexDigit(str.charCodeAt(i + 2));\n\nconst hexValue = (charCode) => (charCode <= 57 ? charCode - 48 : (charCode & 0xdf) - 55);\n\nconst isBase64Char = (charCode) =>\n (charCode >= 65 && charCode <= 90) || // A-Z\n (charCode >= 97 && charCode <= 122) || // a-z\n (charCode >= 48 && charCode <= 57) || // 0-9\n charCode === 43 || // +\n charCode === 47 || // /\n charCode === 45 || // - (base64url)\n charCode === 95; // _ (base64url)\n\nconst isBase64Whitespace = (charCode) =>\n charCode === 9 || charCode === 10 || charCode === 12 || charCode === 13 || charCode === 32;\n\nconst base64Bytes = (significant) => {\n const groups = Math.floor(significant / 4);\n const remainder = significant % 4;\n return groups * 3 + (remainder === 2 ? 1 : remainder === 3 ? 2 : 0);\n};\n\n// Buffer.byteLength(body, 'base64') uses the raw string length as an allocation\n// upper bound even when Buffer.from later ignores characters or stops at '='.\nconst estimateBase64BufferAllocation = (body) => {\n const len = body.length;\n let padding = 0;\n\n if (len > 0 && body.charCodeAt(len - 1) === 61 /* '=' */) {\n padding++;\n\n if (len > 1 && body.charCodeAt(len - 2) === 61 /* '=' */) {\n padding++;\n }\n }\n\n return Math.floor(((len - padding) * 3) / 4);\n};\n\nconst estimatePercentDecodedBase64BufferAllocation = (body) => {\n // Ordinary Base64 needs only its length and trailing padding.\n if (body.indexOf('%') === -1) {\n return estimateBase64BufferAllocation(body);\n }\n\n let length = 0;\n let previous = 0;\n let last = 0;\n\n for (let i = 0, len = body.length; i < len; i++) {\n let code = body.charCodeAt(i);\n if (code === 37 /* '%' */ && isPercentEncodedByte(body, i, len)) {\n code = hexValue(body.charCodeAt(i + 1)) * 16 + hexValue(body.charCodeAt(i + 2));\n i += 2;\n }\n length++;\n previous = last;\n last = code;\n }\n\n const padding = last === 61 ? (previous === 61 ? 2 : 1) : 0;\n return Math.floor(((length - padding) * 3) / 4);\n};\n\nconst estimatePercentDecodedBase64Bytes = (body) => {\n const len = body.length;\n let significant = 0;\n let padding = 0;\n let invalid = false;\n\n for (let i = 0; i < len; i++) {\n let code = body.charCodeAt(i);\n\n if (code === 37 /* '%' */ && isPercentEncodedByte(body, i, len)) {\n code = hexValue(body.charCodeAt(i + 1)) * 16 + hexValue(body.charCodeAt(i + 2));\n i += 2;\n }\n\n if (isBase64Whitespace(code)) {\n continue;\n }\n\n if (code === 61 /* '=' */) {\n padding++;\n continue;\n }\n\n if (!isBase64Char(code) || padding > 0) {\n invalid = true;\n continue;\n }\n\n significant++;\n }\n\n // Fetch rejects malformed forgiving-base64 input. Returning the raw-size\n // allocation bound keeps that invalid input from becoming a pre-check bypass.\n if (\n invalid ||\n padding > 2 ||\n (padding > 0 && (significant + padding) % 4 !== 0) ||\n significant % 4 === 1\n ) {\n return estimateBase64BufferAllocation(body);\n }\n\n return base64Bytes(significant);\n};\n\nconst estimateDataURLBytes = (url, estimateBase64, base64Pattern) => {\n if (!url || typeof url !== 'string') return 0;\n if (!/^data:/i.test(url)) return 0;\n\n const comma = url.indexOf(',');\n if (comma < 0) return 0;\n\n const meta = url.slice(5, comma);\n const body = url.slice(comma + 1);\n const isBase64 = base64Pattern.test(meta);\n\n if (isBase64) {\n return estimateBase64(body);\n }\n\n // Compute UTF-8 byte length directly from UTF-16 code units without allocating\n // a byte buffer (TextEncoder.encode would defeat the DoS guard on large bodies).\n // Valid %XX triplets count as one decoded byte; this matches the bytes that\n // decodeURIComponent(body) would produce before Buffer re-encodes the string.\n let bytes = 0;\n for (let i = 0, len = body.length; i < len; i++) {\n const c = body.charCodeAt(i);\n if (c === 37 /* '%' */ && isPercentEncodedByte(body, i, len)) {\n bytes += 1;\n i += 2;\n } else if (c < 0x80) {\n bytes += 1;\n } else if (c < 0x800) {\n bytes += 2;\n } else if (c >= 0xd800 && c <= 0xdbff && i + 1 < len) {\n const next = body.charCodeAt(i + 1);\n if (next >= 0xdc00 && next <= 0xdfff) {\n bytes += 4;\n i++;\n } else {\n bytes += 3;\n }\n } else {\n bytes += 3;\n }\n }\n return bytes;\n};\n\n/**\n * Estimate the percent-decoded payload size used by Fetch data: URLs.\n *\n * @param {string} url\n * @returns {number}\n */\nexport default function estimateDataURLDecodedBytes(url) {\n // Fetch removes URL fragments before processing a data: URL.\n const fragmentIndex = typeof url === 'string' ? url.indexOf('#') : -1;\n\n return estimateDataURLBytes(\n fragmentIndex === -1 ? url : url.slice(0, fragmentIndex),\n estimatePercentDecodedBase64Bytes,\n /; *base64[\\t\\n\\f\\r ]*$/i\n );\n}\n\n/**\n * Estimate the Buffer backing allocation used after Node's percent-decoding step.\n *\n * @param {string} url\n * @returns {number}\n */\nexport function estimateDataURLBufferAllocation(url) {\n // Match fromDataURI's case-insensitive protocol and encoding suffix.\n return estimateDataURLBytes(url, estimatePercentDecodedBase64BufferAllocation, /;base64$/i);\n}\n","export const VERSION = \"1.21.1\";","import platform from '../platform/index.js';\nimport utils from '../utils.js';\nimport AxiosError from '../core/AxiosError.js';\nimport composeSignals from '../helpers/composeSignals.js';\nimport { trackStream } from '../helpers/trackStream.js';\nimport createMultipartBody from '../core/createMultipartBody.js';\nimport AxiosHeaders from '../core/AxiosHeaders.js';\nimport {\n progressEventReducer,\n progressEventDecorator,\n asyncDecorator,\n} from '../helpers/progressEventReducer.js';\nimport resolveConfig from '../helpers/resolveConfig.js';\nimport settle from '../core/settle.js';\nimport estimateDataURLDecodedBytes from '../helpers/estimateDataURLDecodedBytes.js';\nimport { VERSION } from '../env/data.js';\nimport { toByteStringHeaderObject } from '../helpers/sanitizeHeaderValue.js';\n\nconst DEFAULT_CHUNK_SIZE = 64 * 1024;\n\nconst DEFAULT_REQUEST_OPTIONS = {\n cache: 'default',\n redirect: 'follow',\n referrer: 'about:client',\n referrerPolicy: '',\n mode: 'cors',\n integrity: '',\n keepalive: false,\n priority: 'auto',\n window: null,\n};\n\nconst { isFunction } = utils;\n\n/**\n * Encode a UTF-8 string to a Latin-1 byte string for use with btoa().\n * This is a modern replacement for the deprecated unescape(encodeURIComponent(str)) pattern.\n *\n * @param {string} str The string to encode\n *\n * @returns {string} UTF-8 bytes as a Latin-1 string\n */\nconst encodeUTF8 = (str) =>\n encodeURIComponent(str).replace(/%([0-9A-F]{2})/gi, (_, hex) =>\n String.fromCharCode(parseInt(hex, 16))\n );\n\n// Node's WHATWG URL parser returns `username` and `password` percent-encoded.\n// Decode before composing the `auth` option so credentials such as\n// `my%40email.com:pass` are sent as `my@email.com:pass`. Falls back to the\n// original value for malformed input so a bad encoding never throws.\nconst decodeURIComponentSafe = (value) => {\n if (!utils.isString(value)) {\n return value;\n }\n\n try {\n return decodeURIComponent(value);\n } catch (error) {\n return value;\n }\n};\n\nconst test = (fn, ...args) => {\n try {\n return !!fn(...args);\n } catch (e) {\n return false;\n }\n};\n\nconst maybeWithAuthCredentials = (url) => {\n const protocolIndex = url.indexOf('://');\n let urlToCheck = url;\n if (protocolIndex !== -1) {\n urlToCheck = urlToCheck.slice(protocolIndex + 3);\n }\n return urlToCheck.includes('@') || urlToCheck.includes(':');\n};\n\nconst factory = (env) => {\n const globalObject =\n utils.global !== undefined && utils.global !== null ? utils.global : globalThis;\n const { ReadableStream, TextEncoder } = globalObject;\n\n env = utils.merge.call(\n {\n skipUndefined: true,\n },\n {\n Request: globalObject.Request,\n Response: globalObject.Response,\n Blob: globalObject.Blob,\n },\n env\n );\n\n const envFetch = utils.hasOwnProp(env, 'fetch') ? env.fetch : undefined;\n const { Request, Response, Blob } = env;\n const isFetchSupported = envFetch ? isFunction(envFetch) : typeof fetch === 'function';\n const isRequestSupported = isFunction(Request);\n const isResponseSupported = isFunction(Response);\n\n if (!isFetchSupported) {\n return false;\n }\n\n const isReadableStreamSupported = isFetchSupported && isFunction(ReadableStream);\n\n const encodeText =\n isFetchSupported &&\n (typeof TextEncoder === 'function'\n ? (\n (encoder) => (str) =>\n encoder.encode(str)\n )(new TextEncoder())\n : async (str) => new Uint8Array(await new Request(str).arrayBuffer()));\n\n const supportsRequestStream =\n isRequestSupported &&\n isReadableStreamSupported &&\n test(() => {\n let duplexAccessed = false;\n\n const request = new Request(platform.origin, {\n body: new ReadableStream(),\n method: 'POST',\n get duplex() {\n duplexAccessed = true;\n return 'half';\n },\n });\n\n const hasContentType = request.headers.has('Content-Type');\n\n if (request.body != null) {\n request.body.cancel();\n }\n\n return duplexAccessed && !hasContentType;\n });\n\n const supportsResponseStream =\n isResponseSupported &&\n isReadableStreamSupported &&\n test(() => utils.isReadableStream(new Response('').body));\n\n // Some runtimes reject every explicit cache mode. Use own defaults for both\n // probes so unrelated polluted options cannot affect cache-mode detection.\n const requestDefaults = Object.assign(Object.create(null), DEFAULT_REQUEST_OPTIONS);\n\n if (isRequestSupported && !test(() => new Request(platform.origin, requestDefaults))) {\n delete requestDefaults.cache;\n\n // Only omit cache when that makes Request construction succeed. Otherwise\n // retain the explicit default that protects supporting runtimes from pollution.\n if (!test(() => new Request(platform.origin, requestDefaults))) {\n requestDefaults.cache = DEFAULT_REQUEST_OPTIONS.cache;\n }\n }\n\n const resolvers = {\n stream: supportsResponseStream && ((res) => res.body),\n };\n\n isFetchSupported &&\n (() => {\n ['text', 'arrayBuffer', 'blob', 'formData', 'stream'].forEach((type) => {\n !resolvers[type] &&\n (resolvers[type] = (res, config) => {\n let method = res && res[type];\n\n if (method) {\n return method.call(res);\n }\n\n throw new AxiosError(\n `Response type '${type}' is not supported`,\n AxiosError.ERR_NOT_SUPPORT,\n config\n );\n });\n });\n })();\n\n const getBodyLength = async (body) => {\n if (body == null) {\n return 0;\n }\n\n if (utils.isBlob(body)) {\n return body.size;\n }\n\n if (utils.isArrayBufferView(body) || utils.isArrayBuffer(body)) {\n return body.byteLength;\n }\n\n if (utils.isURLSearchParams(body)) {\n body = body + '';\n }\n\n if (utils.isString(body)) {\n return (await encodeText(body)).byteLength;\n }\n };\n\n const resolveBodyLength = async (headers, body) => {\n const length = utils.toFiniteNumber(headers.getContentLength());\n\n return length == null ? getBodyLength(body) : length;\n };\n\n return async (config) => {\n let {\n url,\n method,\n data,\n signal,\n cancelToken,\n timeout,\n onDownloadProgress,\n onUploadProgress,\n responseType,\n headers,\n withCredentials = 'same-origin',\n fetchOptions,\n maxContentLength,\n maxBodyLength,\n maxRedirects,\n } = resolveConfig(config);\n\n const hasMaxContentLength = utils.isNumber(maxContentLength) && maxContentLength > -1;\n const hasMaxBodyLength = utils.isNumber(maxBodyLength) && maxBodyLength > -1;\n const own = (key) => (utils.hasOwnProp(config, key) ? config[key] : undefined);\n\n let _fetch = envFetch || fetch;\n\n responseType = responseType ? (responseType + '').toLowerCase() : 'text';\n\n let composedSignal = composeSignals(\n [signal, cancelToken && cancelToken.toAbortSignal()],\n timeout\n );\n\n let request = null;\n\n const unsubscribe =\n composedSignal &&\n composedSignal.unsubscribe &&\n (() => {\n composedSignal.unsubscribe();\n });\n\n let requestContentLength;\n\n // AxiosErrors we raise while request or response bodies are being streamed. Captured\n // by identity so the catch block can surface it directly, regardless of\n // how the runtime wraps the resulting fetch rejection (undici exposes it\n // as `err.cause`; some browsers drop the original error entirely).\n let pendingBodyError = null;\n let pendingResponseError = null;\n\n const maxBodyLengthError = () =>\n new AxiosError(\n 'Request body larger than maxBodyLength limit',\n AxiosError.ERR_BAD_REQUEST,\n config,\n request\n );\n\n try {\n // HTTP basic authentication\n let auth = undefined;\n const configAuth = own('auth');\n\n if (configAuth) {\n const username = utils.getSafeProp(configAuth, 'username') || '';\n const password = utils.getSafeProp(configAuth, 'password') || '';\n auth = {\n username,\n password,\n };\n }\n\n let parsedURL;\n if (maybeWithAuthCredentials(url)) {\n parsedURL = new URL(url, platform.origin);\n\n if (!auth && (parsedURL.username || parsedURL.password)) {\n const urlUsername = decodeURIComponentSafe(parsedURL.username);\n const urlPassword = decodeURIComponentSafe(parsedURL.password);\n auth = {\n username: urlUsername,\n password: urlPassword,\n };\n }\n\n if (parsedURL.username || parsedURL.password) {\n parsedURL.username = '';\n parsedURL.password = '';\n url = parsedURL.href;\n }\n }\n\n if (auth) {\n headers.delete('authorization');\n headers.set(\n 'Authorization',\n 'Basic ' + btoa(encodeUTF8((auth.username || '') + ':' + (auth.password || '')))\n );\n }\n\n // Enforce maxContentLength for data: URLs up-front so we never materialize\n // an oversized payload. The HTTP adapter applies the same check (see http.js\n // \"if (protocol === 'data:')\" branch).\n if (hasMaxContentLength && parsedURL && parsedURL.protocol === 'data:') {\n const estimated = estimateDataURLDecodedBytes(parsedURL.href);\n if (estimated > maxContentLength) {\n throw new AxiosError(\n 'maxContentLength size of ' + maxContentLength + ' exceeded',\n AxiosError.ERR_BAD_RESPONSE,\n config,\n request\n );\n }\n }\n\n const formContentType =\n utils.isSpecCompliantForm(data) && AxiosHeaders.from(own('headers')).getContentType();\n let formBoundary;\n if (\n utils.isString(formContentType) &&\n /^multipart\\/form-data(?:\\s*;|$)/i.test(formContentType.trim())\n ) {\n const parameters = AxiosHeaders.parseParameters(formContentType);\n if (utils.hasOwnProp(parameters, 'boundary')) formBoundary = parameters.boundary;\n }\n\n if (\n utils.isSpecCompliantForm(data) &&\n method !== 'get' &&\n method !== 'head' &&\n (hasMaxBodyLength ||\n (onUploadProgress && supportsRequestStream) ||\n formBoundary !== undefined)\n ) {\n data = createMultipartBody(\n data,\n Blob,\n hasMaxBodyLength ? maxBodyLength : Infinity,\n maxBodyLengthError,\n formBoundary\n );\n // Blob.type lowercases its value, including a case-sensitive boundary.\n // Retain the caller's header when an explicit boundary was serialized.\n headers.setContentType(formBoundary === undefined ? data.type : formContentType);\n requestContentLength = data.size;\n }\n\n // Enforce maxBodyLength against known-size bodies before dispatch using\n // the body's *actual* size — never a caller-declared Content-Length,\n // which could under-report to slip an oversized body past the check.\n // Unknown-size streams return undefined here and are counted per-chunk\n // below as fetch consumes them.\n if (hasMaxBodyLength && method !== 'get' && method !== 'head') {\n const outboundLength = await getBodyLength(data);\n if (typeof outboundLength === 'number' && isFinite(outboundLength)) {\n requestContentLength = outboundLength;\n if (outboundLength > maxBodyLength) {\n throw maxBodyLengthError();\n }\n }\n }\n\n // A streamed body under maxBodyLength must be counted as fetch consumes\n // it; its size is never trusted from a caller-declared Content-Length.\n const mustEnforceStreamBody =\n hasMaxBodyLength && (utils.isReadableStream(data) || utils.isStream(data));\n\n const trackRequestStream = (stream, onProgress, flush) =>\n trackStream(\n stream,\n DEFAULT_CHUNK_SIZE,\n (loadedBytes) => {\n if (hasMaxBodyLength && loadedBytes > maxBodyLength) {\n throw (pendingBodyError = maxBodyLengthError());\n }\n onProgress && onProgress(loadedBytes);\n },\n flush\n );\n\n if (\n supportsRequestStream &&\n method !== 'get' &&\n method !== 'head' &&\n (onUploadProgress || mustEnforceStreamBody)\n ) {\n requestContentLength =\n requestContentLength == null\n ? await resolveBodyLength(headers, data)\n : requestContentLength;\n\n // A declared length of 0 is only trusted to skip the wrap when we are\n // not enforcing a stream limit (which must not rely on that header).\n if (requestContentLength !== 0 || mustEnforceStreamBody) {\n let _request = new Request(url, {\n method: 'POST',\n body: data,\n duplex: 'half',\n });\n\n let contentTypeHeader;\n\n if (\n utils.isFormData(data) &&\n (contentTypeHeader = _request.headers.get('content-type'))\n ) {\n headers.setContentType(contentTypeHeader);\n }\n\n if (_request.body) {\n const [onProgress, flush] =\n (onUploadProgress &&\n progressEventDecorator(\n requestContentLength,\n progressEventReducer(asyncDecorator(onUploadProgress))\n )) ||\n [];\n\n data = trackRequestStream(_request.body, onProgress, flush);\n }\n }\n } else if (\n mustEnforceStreamBody &&\n !isRequestSupported &&\n isReadableStreamSupported &&\n method !== 'get' &&\n method !== 'head'\n ) {\n data = trackRequestStream(data);\n } else if (\n mustEnforceStreamBody &&\n isRequestSupported &&\n !supportsRequestStream &&\n method !== 'get' &&\n method !== 'head'\n ) {\n throw new AxiosError(\n 'Stream request bodies are not supported by the current fetch implementation',\n AxiosError.ERR_NOT_SUPPORT,\n config,\n request\n );\n }\n\n if (!utils.isString(withCredentials)) {\n withCredentials = withCredentials ? 'include' : 'omit';\n }\n\n // Cloudflare Workers throws when credentials are defined\n // see https://github.com/cloudflare/workerd/issues/902\n const isCredentialsSupported = isRequestSupported && 'credentials' in Request.prototype;\n\n // If data is FormData and Content-Type is multipart/form-data without boundary,\n // delete it so fetch can set it correctly with the boundary\n if (utils.isFormData(data)) {\n const contentType = headers.getContentType();\n if (\n contentType &&\n /^multipart\\/form-data/i.test(contentType) &&\n !/boundary=/i.test(contentType)\n ) {\n headers.delete('content-type');\n }\n }\n\n // Set User-Agent header if not already set (fetch defaults to 'node' in Node.js)\n headers.set('User-Agent', 'axios/' + VERSION, false);\n\n const safeFetchOptions =\n fetchOptions == null ? fetchOptions : Object.assign(Object.create(null), fetchOptions);\n\n if (safeFetchOptions) {\n // These options are owned by Axios and are already reflected in the\n // resolved Request passed to fetch.\n delete safeFetchOptions.body;\n delete safeFetchOptions.headers;\n delete safeFetchOptions.method;\n delete safeFetchOptions.signal;\n delete safeFetchOptions.duplex;\n delete safeFetchOptions.credentials;\n }\n\n const resolvedOptions = Object.assign(Object.create(null), safeFetchOptions, {\n signal: composedSignal,\n method: method.toUpperCase(),\n headers: toByteStringHeaderObject(headers.normalize()),\n body: data,\n duplex: 'half',\n credentials: isCredentialsSupported ? withCredentials : undefined,\n });\n\n if (isRequestSupported) {\n utils.forEach(requestDefaults, (value, key) => {\n if (resolvedOptions[key] === undefined) {\n resolvedOptions[key] = value;\n }\n });\n\n if (resolvedOptions.signal === undefined) {\n resolvedOptions.signal = null;\n }\n\n if (resolvedOptions.body === undefined) {\n resolvedOptions.body = null;\n }\n }\n\n if (maxRedirects === 0) {\n resolvedOptions.redirect = 'manual';\n\n if (safeFetchOptions) {\n safeFetchOptions.redirect = 'manual';\n }\n }\n\n request = isRequestSupported && new Request(url, resolvedOptions);\n\n let response = await (isRequestSupported\n ? _fetch(request, safeFetchOptions)\n : _fetch(url, resolvedOptions));\n\n const responseHeaders = AxiosHeaders.from(response.headers);\n\n // Cheap pre-check: if the server honestly declares a content-length that\n // already exceeds the cap, reject before we start streaming.\n if (hasMaxContentLength) {\n const declaredLength = utils.toFiniteNumber(responseHeaders.getContentLength());\n if (declaredLength != null && declaredLength > maxContentLength) {\n throw new AxiosError(\n 'maxContentLength size of ' + maxContentLength + ' exceeded',\n AxiosError.ERR_BAD_RESPONSE,\n config,\n request\n );\n }\n }\n\n const isStreamResponse =\n supportsResponseStream && (responseType === 'stream' || responseType === 'response');\n\n if (\n supportsResponseStream &&\n response.body &&\n (onDownloadProgress || hasMaxContentLength || (isStreamResponse && unsubscribe))\n ) {\n const options = {};\n\n ['status', 'statusText', 'headers'].forEach((prop) => {\n options[prop] = response[prop];\n });\n\n const responseContentLength = utils.toFiniteNumber(responseHeaders.getContentLength());\n\n const [onProgress, flush] =\n (onDownloadProgress &&\n progressEventDecorator(\n responseContentLength,\n progressEventReducer(asyncDecorator(onDownloadProgress), true)\n )) ||\n [];\n\n let bytesRead = 0;\n const onChunkProgress = (loadedBytes) => {\n if (hasMaxContentLength) {\n bytesRead = loadedBytes;\n if (bytesRead > maxContentLength) {\n throw (pendingResponseError = new AxiosError(\n 'maxContentLength size of ' + maxContentLength + ' exceeded',\n AxiosError.ERR_BAD_RESPONSE,\n config,\n request\n ));\n }\n }\n onProgress && onProgress(loadedBytes);\n };\n\n response = new Response(\n trackStream(response.body, DEFAULT_CHUNK_SIZE, onChunkProgress, () => {\n flush && flush();\n unsubscribe && unsubscribe();\n }),\n options\n );\n }\n\n responseType = responseType || 'text';\n\n let responseData = await resolvers[utils.findKey(resolvers, responseType) || 'text'](\n response,\n config\n );\n\n // Fallback enforcement for environments without ReadableStream support\n // (legacy runtimes). Detect materialized size from typed output; skip\n // streams/Response passthrough since the user will read those themselves.\n if (hasMaxContentLength && !supportsResponseStream && !isStreamResponse) {\n let materializedSize;\n if (responseData != null) {\n if (typeof responseData.byteLength === 'number') {\n materializedSize = responseData.byteLength;\n } else if (typeof responseData.size === 'number') {\n materializedSize = responseData.size;\n } else if (typeof responseData === 'string') {\n materializedSize =\n typeof TextEncoder === 'function'\n ? new TextEncoder().encode(responseData).byteLength\n : responseData.length;\n }\n }\n if (typeof materializedSize === 'number' && materializedSize > maxContentLength) {\n throw new AxiosError(\n 'maxContentLength size of ' + maxContentLength + ' exceeded',\n AxiosError.ERR_BAD_RESPONSE,\n config,\n request\n );\n }\n }\n\n !isStreamResponse && unsubscribe && unsubscribe();\n\n return await new Promise((resolve, reject) => {\n settle(resolve, reject, {\n data: responseData,\n headers: AxiosHeaders.from(response.headers),\n status: response.status,\n statusText: response.statusText,\n config,\n request,\n });\n });\n } catch (err) {\n unsubscribe && unsubscribe();\n\n // Safari can surface fetch aborts as a DOMException-like object whose\n // branded getters throw. Prefer our composed signal reason before reading\n // the caught error, preserving timeout vs cancellation semantics.\n if (composedSignal && composedSignal.aborted && composedSignal.reason instanceof AxiosError) {\n const canceledError = composedSignal.reason;\n canceledError.config = config;\n request && (canceledError.request = request);\n if (err !== canceledError) {\n // Non-enumerable to match native Error `cause` semantics so loggers\n // don't recurse into circular fetch internals (see #7205).\n Object.defineProperty(canceledError, 'cause', {\n __proto__: null,\n value: err,\n writable: true,\n enumerable: false,\n configurable: true,\n });\n }\n throw canceledError;\n }\n\n // Surface a maxBodyLength violation we raised while the request body was\n // being streamed. Keeping the original error (rather than reading\n // `err.cause.isAxiosError`) keeps the error deterministic across runtimes\n // and avoids both prototype-pollution reads and mis-attributing a foreign\n // AxiosError that merely happened to land in `err.cause`.\n if (pendingBodyError) {\n request && !pendingBodyError.request && (pendingBodyError.request = request);\n throw pendingBodyError;\n }\n\n if (pendingResponseError) {\n throw pendingResponseError;\n }\n\n // Re-throw AxiosErrors we raised synchronously (data: URL / content-length\n // pre-checks, response size enforcement) without re-wrapping them.\n if (err instanceof AxiosError) {\n request && !err.request && (err.request = request);\n throw err;\n }\n\n if (err && err.name === 'TypeError' && /Load failed|fetch/i.test(err.message)) {\n const networkError = new AxiosError(\n 'Network Error',\n AxiosError.ERR_NETWORK,\n config,\n request,\n err && err.response\n );\n // Non-enumerable to match native Error `cause` semantics so loggers\n // don't recurse into circular fetch internals (see #7205).\n Object.defineProperty(networkError, 'cause', {\n __proto__: null,\n value: err.cause || err,\n writable: true,\n enumerable: false,\n configurable: true,\n });\n throw networkError;\n }\n\n throw AxiosError.from(err, err && err.code, config, request, err && err.response);\n }\n };\n};\n\nconst seedCache = new Map();\n\nexport const getFetch = (config) => {\n const env = Object.create(null);\n const configuredEnv = config && utils.hasOwnProp(config, 'env') && config.env;\n ['fetch', 'Request', 'Response', 'Blob'].forEach((key) => {\n if (configuredEnv && utils.hasOwnProp(configuredEnv, key)) {\n env[key] = configuredEnv[key];\n }\n });\n const { fetch, Request, Response, Blob } = env;\n const seeds = [Request, Response, fetch, Blob];\n\n let len = seeds.length,\n i = len,\n seed,\n target,\n map = seedCache;\n\n while (i--) {\n seed = seeds[i];\n target = map.get(seed);\n\n target === undefined && map.set(seed, (target = i ? new Map() : factory(env)));\n\n map = target;\n }\n\n return target;\n};\n\nconst adapter = getFetch();\n\nexport default adapter;\n","import utils from '../utils.js';\nimport httpAdapter from './http.js';\nimport xhrAdapter from './xhr.js';\nimport * as fetchAdapter from './fetch.js';\nimport AxiosError from '../core/AxiosError.js';\n\n/**\n * Known adapters mapping.\n * Provides environment-specific adapters for Axios:\n * - `http` for Node.js\n * - `xhr` for browsers\n * - `fetch` for fetch API-based requests\n *\n * @type {Object}\n */\nconst knownAdapters = {\n http: httpAdapter,\n xhr: xhrAdapter,\n fetch: {\n get: fetchAdapter.getFetch,\n },\n};\n\n// Assign adapter names for easier debugging and identification\nutils.forEach(knownAdapters, (fn, value) => {\n if (fn) {\n try {\n // Null-proto descriptors so a polluted Object.prototype.get cannot turn\n // these data descriptors into accessor descriptors on the way in.\n Object.defineProperty(fn, 'name', { __proto__: null, value });\n } catch (e) {\n // eslint-disable-next-line no-empty\n }\n Object.defineProperty(fn, 'adapterName', { __proto__: null, value });\n }\n});\n\n/**\n * Render a rejection reason string for unknown or unsupported adapters\n *\n * @param {string} reason\n * @returns {string}\n */\nconst renderReason = (reason) => `- ${reason}`;\n\n/**\n * Check if the adapter is resolved (function, null, or false)\n *\n * @param {Function|null|false} adapter\n * @returns {boolean}\n */\nconst isResolvedHandle = (adapter) =>\n utils.isFunction(adapter) || adapter === null || adapter === false;\n\n/**\n * Get the first suitable adapter from the provided list.\n * Tries each adapter in order until a supported one is found.\n * Throws an AxiosError if no adapter is suitable.\n *\n * @param {Array|string|Function} adapters - Adapter(s) by name or function.\n * @param {Object} config - Axios request configuration\n * @throws {AxiosError} If no suitable adapter is available\n * @returns {Function} The resolved adapter function\n */\nfunction getAdapter(adapters, config) {\n adapters = utils.isArray(adapters) ? adapters : [adapters];\n\n const { length } = adapters;\n let nameOrAdapter;\n let adapter;\n\n const rejectedReasons = {};\n\n for (let i = 0; i < length; i++) {\n nameOrAdapter = adapters[i];\n let id;\n\n adapter = nameOrAdapter;\n\n if (!isResolvedHandle(nameOrAdapter)) {\n adapter = knownAdapters[(id = String(nameOrAdapter)).toLowerCase()];\n\n if (adapter === undefined) {\n throw new AxiosError(`Unknown adapter '${id}'`);\n }\n }\n\n if (adapter && (utils.isFunction(adapter) || (adapter = adapter.get(config)))) {\n break;\n }\n\n rejectedReasons[id || '#' + i] = adapter;\n }\n\n if (!adapter) {\n const reasons = Object.entries(rejectedReasons).map(\n ([id, state]) =>\n `adapter ${id} ` +\n (state === false ? 'is not supported by the environment' : 'is not available in the build')\n );\n\n let s = length\n ? reasons.length > 1\n ? 'since :\\n' + reasons.map(renderReason).join('\\n')\n : ' ' + renderReason(reasons[0])\n : 'as no adapter specified';\n\n throw new AxiosError(\n `There is no suitable adapter to dispatch the request ` + s,\n AxiosError.ERR_NOT_SUPPORT\n );\n }\n\n return adapter;\n}\n\n/**\n * Exports Axios adapters and utility to resolve an adapter\n */\nexport default {\n /**\n * Resolve an adapter from a list of adapter names or functions.\n * @type {Function}\n */\n getAdapter,\n\n /**\n * Exposes all known adapters\n * @type {Object}\n */\n adapters: knownAdapters,\n};\n","// eslint-disable-next-line strict\nexport default null;\n","'use strict';\n\nimport transformData from './transformData.js';\nimport isCancel from '../cancel/isCancel.js';\nimport defaults from '../defaults/index.js';\nimport CanceledError from '../cancel/CanceledError.js';\nimport AxiosHeaders from '../core/AxiosHeaders.js';\nimport adapters from '../adapters/adapters.js';\nimport utils from '../utils.js';\n\n/**\n * Throws a `CanceledError` if cancellation has been requested.\n *\n * @param {Object} config The config that is to be used for the request\n *\n * @returns {void}\n */\nfunction throwIfCancellationRequested(config) {\n if (config.cancelToken) {\n config.cancelToken.throwIfRequested();\n }\n\n if (config.signal && config.signal.aborted) {\n throw new CanceledError(null, config);\n }\n}\n\n/**\n * Resolve the clock used to time adapter execution.\n *\n * Prefers the monotonic `performance.now()` so wall-clock adjustments do not\n * skew the measurement, and so frameworks that forbid reading the current\n * time during prerendering (e.g. Next.js Cache Components) accept it. Falls\n * back to `Date.now()` in runtimes without the High Resolution Time API.\n *\n * @returns {() => number} Millisecond clock\n */\nfunction resolveClock() {\n return typeof performance !== 'undefined' && utils.isFunction(performance.now)\n ? () => performance.now()\n : Date.now;\n}\n\n/**\n * Whole milliseconds elapsed since `start`, floored at zero.\n *\n * Rounded so the value stays an integer as with `Date.now()`. The fallback\n * wall clock can move backwards mid-request, so the result is clamped.\n *\n * @param {() => number} now Clock returned by `resolveClock()`\n * @param {number} start Timestamp read from `now`\n *\n * @returns {number} Non-negative elapsed milliseconds\n */\nfunction elapsedSince(now, start) {\n return Math.max(0, Math.round(now() - start));\n}\n\n/**\n * Dispatch a request to the server using the configured adapter.\n *\n * @param {object} config The config that is to be used for the request\n *\n * @returns {Promise} The Promise to be fulfilled\n */\nexport default function dispatchRequest(_config) {\n // Interceptors may replace the merged config with an ordinary object. Flatten\n // it at the dispatch boundary so shared prototype members cannot become\n // request behavior, while preserving intentional template/class members.\n const config = utils.toSafeFlatObject(_config);\n\n throwIfCancellationRequested(config);\n\n config.headers = AxiosHeaders.from(utils.getSafeProp(config, 'headers'));\n\n // Transform request data\n config.data = transformData.call(config, config.transformRequest);\n\n if (['post', 'put', 'patch'].indexOf(config.method) !== -1) {\n config.headers.setContentType('application/x-www-form-urlencoded', false);\n }\n\n const adapter = adapters.getAdapter(config.adapter || defaults.adapter, config);\n\n const now = resolveClock();\n const start = now();\n\n return adapter(config).then(\n function onAdapterResolution(response) {\n throwIfCancellationRequested(config);\n\n response.duration = elapsedSince(now, start);\n\n // Expose the current response on config so that transformResponse can\n // attach it to any AxiosError it throws (e.g. on JSON parse failure).\n // We clean it up afterwards to avoid polluting the config object.\n config.response = response;\n try {\n response.data = transformData.call(config, config.transformResponse, response);\n } finally {\n delete config.response;\n }\n\n response.headers = AxiosHeaders.from(response.headers);\n\n return response;\n },\n function onAdapterRejection(reason) {\n if (!isCancel(reason)) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n if (reason && reason.response) {\n reason.response.duration = elapsedSince(now, start);\n config.response = reason.response;\n try {\n reason.response.data = transformData.call(\n config,\n config.transformResponse,\n reason.response\n );\n } finally {\n delete config.response;\n }\n reason.response.headers = AxiosHeaders.from(reason.response.headers);\n }\n }\n\n return Promise.reject(reason);\n }\n );\n}\n","'use strict';\n\nimport { VERSION } from '../env/data.js';\nimport AxiosError from '../core/AxiosError.js';\n\nconst validators = {};\n\n// eslint-disable-next-line func-names\n['object', 'boolean', 'number', 'function', 'string', 'symbol'].forEach((type, i) => {\n validators[type] = function validator(thing) {\n return typeof thing === type || 'a' + (i < 1 ? 'n ' : ' ') + type;\n };\n});\n\nconst deprecatedWarnings = {};\n\n/**\n * Transitional option validator\n *\n * @param {function|boolean?} validator - set to false if the transitional option has been removed\n * @param {string?} version - deprecated version / removed since version\n * @param {string?} message - some message with additional info\n *\n * @returns {function}\n */\nvalidators.transitional = function transitional(validator, version, message) {\n function formatMessage(opt, desc) {\n return (\n '[Axios v' +\n VERSION +\n \"] Transitional option '\" +\n opt +\n \"'\" +\n desc +\n (message ? '. ' + message : '')\n );\n }\n\n // eslint-disable-next-line func-names\n return (value, opt, opts) => {\n if (validator === false) {\n throw new AxiosError(\n formatMessage(opt, ' has been removed' + (version ? ' in ' + version : '')),\n AxiosError.ERR_DEPRECATED\n );\n }\n\n if (version && !deprecatedWarnings[opt]) {\n deprecatedWarnings[opt] = true;\n // eslint-disable-next-line no-console\n console.warn(\n formatMessage(\n opt,\n ' has been deprecated since v' + version + ' and will be removed in the near future'\n )\n );\n }\n\n return validator ? validator(value, opt, opts) : true;\n };\n};\n\nvalidators.spelling = function spelling(correctSpelling) {\n return (value, opt) => {\n // eslint-disable-next-line no-console\n console.warn(`${opt} is likely a misspelling of ${correctSpelling}`);\n return true;\n };\n};\n\n/**\n * Assert object's properties type\n *\n * @param {object} options\n * @param {object} schema\n * @param {boolean?} allowUnknown\n *\n * @returns {object}\n */\n\nfunction assertOptions(options, schema, allowUnknown) {\n if (typeof options !== 'object' || options === null) {\n throw new AxiosError('options must be an object', AxiosError.ERR_BAD_OPTION_VALUE);\n }\n const keys = Object.keys(options);\n let i = keys.length;\n while (i-- > 0) {\n const opt = keys[i];\n // Use hasOwnProperty so a polluted Object.prototype. cannot supply\n // a non-function validator and cause a TypeError.\n const validator = Object.prototype.hasOwnProperty.call(schema, opt) ? schema[opt] : undefined;\n if (validator) {\n const value = options[opt];\n const result = value === undefined || validator(value, opt, options);\n if (result !== true) {\n throw new AxiosError(\n 'option ' + opt + ' must be ' + result,\n AxiosError.ERR_BAD_OPTION_VALUE\n );\n }\n continue;\n }\n if (allowUnknown !== true) {\n throw new AxiosError('Unknown option ' + opt, AxiosError.ERR_BAD_OPTION);\n }\n }\n}\n\nexport default {\n assertOptions,\n validators,\n};\n","'use strict';\n\nimport utils from '../utils.js';\nimport buildURL from '../helpers/buildURL.js';\nimport InterceptorManager from './InterceptorManager.js';\nimport dispatchRequest from './dispatchRequest.js';\nimport mergeConfig from './mergeConfig.js';\nimport buildFullPath from './buildFullPath.js';\nimport methodList from './methodList.js';\nimport validator from '../helpers/validator.js';\nimport AxiosHeaders from './AxiosHeaders.js';\nimport transitionalDefaults from '../defaults/transitional.js';\nimport { getCauseStackIndex } from './AxiosError.js';\n\nconst validators = validator.validators;\n\n// Recognize header maps without consuming objects intended as literal values.\n// AxiosHeaders from other builds share a brand and header-container interface,\n// but not constructor identity. A tag and toJSON alone can describe a literal.\nconst isHeadersBucket = (value) => {\n if (value == null || utils.isPlainObject(value) || value instanceof AxiosHeaders) {\n return true;\n }\n\n try {\n return (\n utils.isObject(value) &&\n utils.getSafeProp(value, Symbol.toStringTag) === 'AxiosHeaders' &&\n [\n 'toJSON',\n 'set',\n 'get',\n 'has',\n 'delete',\n 'clear',\n 'normalize',\n 'concat',\n 'toString',\n Symbol.iterator,\n ].every((method) => utils.isFunction(utils.getSafeProp(value, method)))\n );\n } catch (e) {\n // A failed optional brand probe must not prevent literal header serialization.\n return false;\n }\n};\n\n/**\n * Create a new instance of Axios\n *\n * @param {Object} instanceConfig The default config for the instance\n *\n * @return {Axios} A new instance of Axios\n */\nclass Axios {\n constructor(instanceConfig) {\n this.defaults = instanceConfig || {};\n this.interceptors = {\n request: new InterceptorManager(),\n response: new InterceptorManager(),\n };\n }\n\n /**\n * Dispatch a request\n *\n * @param {String|Object} configOrUrl The config specific for this request (merged with this.defaults)\n * @param {?Object} config\n *\n * @returns {Promise} The Promise to be fulfilled\n */\n async request(configOrUrl, config) {\n try {\n return await this._request(configOrUrl, config);\n } catch (err) {\n if (err instanceof Error) {\n try {\n let dummy = {};\n\n Error.captureStackTrace ? Error.captureStackTrace(dummy) : (dummy = new Error());\n\n const dummyStack = dummy.stack;\n let stack = '';\n\n // slice off the Error: ... line\n if (typeof dummyStack === 'string') {\n const firstNewlineIndex = dummyStack.indexOf('\\n');\n\n stack = firstNewlineIndex === -1 ? '' : dummyStack.slice(firstNewlineIndex + 1);\n }\n\n if (!err.stack) {\n err.stack = stack;\n } else if (stack) {\n // Match a common suffix after the 2 top frames when available,\n // otherwise compare the full reconstructed stack.\n const firstNewlineIndex = stack.indexOf('\\n');\n const secondNewlineIndex =\n firstNewlineIndex === -1 ? -1 : stack.indexOf('\\n', firstNewlineIndex + 1);\n const duplicateCheckSuffix =\n secondNewlineIndex === -1 ? stack : stack.slice(secondNewlineIndex + 1);\n\n // `AxiosError.from()` may have already inlined the wrapped error's\n // stack under a `Caused by:` marker. Keep the reconstructed caller\n // frames ahead of that marker so stack-only reporters do not read\n // them as part of the low-level cause.\n const currentStack = String(err.stack);\n const causeIndex = getCauseStackIndex(err, currentStack);\n const stackHead = causeIndex === -1 ? currentStack : currentStack.slice(0, causeIndex);\n const causeSection = causeIndex === -1 ? '' : currentStack.slice(causeIndex);\n\n if (!stackHead.endsWith(duplicateCheckSuffix)) {\n err.stack = stackHead + '\\n' + stack + causeSection;\n }\n }\n } catch (e) {\n // Ignore failures from custom stack hooks or un-writable stack properties.\n }\n }\n\n throw err;\n }\n }\n\n _request(configOrUrl, config) {\n /*eslint no-param-reassign:0*/\n // Allow for axios('example/url'[, config]) a la fetch API\n if (typeof configOrUrl === 'string') {\n config = config || {};\n config.url = configOrUrl;\n } else {\n config = configOrUrl || {};\n }\n\n config = mergeConfig(this.defaults, config);\n\n const { transitional, paramsSerializer, headers } = config;\n\n if (transitional !== undefined) {\n validator.assertOptions(\n transitional,\n {\n silentJSONParsing: validators.transitional(validators.boolean),\n forcedJSONParsing: validators.transitional(validators.boolean),\n clarifyTimeoutError: validators.transitional(validators.boolean),\n legacyInterceptorReqResOrdering: validators.transitional(validators.boolean),\n advertiseZstdAcceptEncoding: validators.transitional(validators.boolean),\n validateStatusUndefinedResolves: validators.transitional(validators.boolean),\n encodeBasicAuthUsername: validators.transitional(validators.boolean),\n },\n false\n );\n }\n\n if (paramsSerializer != null) {\n if (utils.isFunction(paramsSerializer)) {\n config.paramsSerializer = {\n serialize: paramsSerializer,\n };\n } else {\n validator.assertOptions(\n paramsSerializer,\n {\n encode: validators.function,\n serialize: validators.function,\n },\n true\n );\n }\n }\n\n // Set config.allowAbsoluteUrls\n if (config.allowAbsoluteUrls !== undefined) {\n // do nothing\n } else if (\n utils.hasOwnProp(this.defaults, 'allowAbsoluteUrls') &&\n this.defaults.allowAbsoluteUrls !== undefined\n ) {\n config.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls;\n } else {\n config.allowAbsoluteUrls = true;\n }\n\n validator.assertOptions(\n config,\n {\n baseUrl: validators.spelling('baseURL'),\n withXsrfToken: validators.spelling('withXSRFToken'),\n },\n true\n );\n\n // Set config.method\n config.method = (\n utils.getSafeProp(config, 'method') ||\n utils.getSafeProp(this.defaults, 'method') ||\n 'get'\n ).toLowerCase();\n\n // Flatten header defaults without consuming literal method-named headers.\n const commonHeaders = utils.getSafeProp(headers, 'common');\n const methodHeaders = utils.getSafeProp(headers, config.method);\n const contextHeaders =\n headers &&\n utils.merge(\n isHeadersBucket(commonHeaders) ? commonHeaders : undefined,\n isHeadersBucket(methodHeaders) ? methodHeaders : undefined\n );\n\n headers &&\n utils.forEach(methodList.concat('common'), (method) => {\n if (isHeadersBucket(utils.getSafeProp(headers, method))) {\n delete headers[method];\n }\n });\n\n config.headers = AxiosHeaders.concat(contextHeaders, headers);\n\n // filter out skipped interceptors\n const requestInterceptorChain = [];\n let synchronousRequestInterceptors = true;\n this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {\n if (typeof interceptor.runWhen === 'function' && interceptor.runWhen(config) === false) {\n return;\n }\n\n synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous;\n\n const transitional = config.transitional || transitionalDefaults;\n const legacyInterceptorReqResOrdering =\n transitional && transitional.legacyInterceptorReqResOrdering;\n\n if (legacyInterceptorReqResOrdering) {\n requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected);\n } else {\n requestInterceptorChain.push(interceptor.fulfilled, interceptor.rejected);\n }\n });\n\n const responseInterceptorChain = [];\n this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {\n responseInterceptorChain.push(interceptor.fulfilled, interceptor.rejected);\n });\n\n let promise;\n let i = 0;\n let len;\n\n if (!synchronousRequestInterceptors) {\n const chain = [dispatchRequest.bind(this), undefined];\n chain.unshift(...requestInterceptorChain);\n chain.push(...responseInterceptorChain);\n len = chain.length;\n\n promise = Promise.resolve(config);\n\n while (i < len) {\n promise = promise.then(chain[i++], chain[i++]);\n }\n\n return promise;\n }\n\n len = requestInterceptorChain.length;\n\n let newConfig = config;\n\n while (i < len) {\n const onFulfilled = requestInterceptorChain[i++];\n const onRejected = requestInterceptorChain[i++];\n try {\n newConfig = onFulfilled ? onFulfilled(newConfig) : newConfig;\n } catch (error) {\n if (!onRejected) {\n promise = Promise.reject(error);\n break;\n }\n\n try {\n const rejectedResult = onRejected.call(this, error);\n\n if (utils.isThenable(rejectedResult)) {\n promise = Promise.resolve(rejectedResult).then(() =>\n dispatchRequest.call(this, newConfig)\n );\n }\n } catch (rejectedError) {\n promise = Promise.reject(rejectedError);\n }\n\n break;\n }\n }\n\n if (!promise) {\n try {\n promise = dispatchRequest.call(this, newConfig);\n } catch (error) {\n promise = Promise.reject(error);\n }\n }\n\n i = 0;\n len = responseInterceptorChain.length;\n\n while (i < len) {\n promise = promise.then(responseInterceptorChain[i++], responseInterceptorChain[i++]);\n }\n\n return promise;\n }\n\n getUri(config) {\n config = mergeConfig(this.defaults, config);\n const fullPath = buildFullPath(config.baseURL, config.url, config.allowAbsoluteUrls, config);\n return buildURL(fullPath, config.params, config.paramsSerializer);\n }\n}\n\n// Provide aliases for supported request methods\nutils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {\n /*eslint func-names:0*/\n Axios.prototype[method] = async function (url, config) {\n return this.request(\n mergeConfig(config || {}, {\n method,\n url,\n data: config && utils.hasOwnProp(config, 'data') ? config.data : undefined,\n })\n );\n };\n});\n\nutils.forEach(['post', 'put', 'patch', 'query'], function forEachMethodWithData(method) {\n function generateHTTPMethod(isForm) {\n return async function httpMethod(url, data, config) {\n return this.request(\n mergeConfig(config || {}, {\n method,\n headers: isForm\n ? {\n 'Content-Type': 'multipart/form-data',\n }\n : {},\n url,\n data,\n })\n );\n };\n }\n\n Axios.prototype[method] = generateHTTPMethod();\n\n // QUERY is a safe/idempotent read method; multipart form bodies don't fit\n // its semantics, so no queryForm shorthand is generated.\n if (method !== 'query') {\n Axios.prototype[method + 'Form'] = generateHTTPMethod(true);\n }\n});\n\nexport default Axios;\n","const HttpStatusCode = {\n Continue: 100,\n SwitchingProtocols: 101,\n Processing: 102,\n EarlyHints: 103,\n Ok: 200,\n Created: 201,\n Accepted: 202,\n NonAuthoritativeInformation: 203,\n NoContent: 204,\n ResetContent: 205,\n PartialContent: 206,\n MultiStatus: 207,\n AlreadyReported: 208,\n ImUsed: 226,\n MultipleChoices: 300,\n MovedPermanently: 301,\n Found: 302,\n SeeOther: 303,\n NotModified: 304,\n UseProxy: 305,\n Unused: 306,\n TemporaryRedirect: 307,\n PermanentRedirect: 308,\n BadRequest: 400,\n Unauthorized: 401,\n PaymentRequired: 402,\n Forbidden: 403,\n NotFound: 404,\n MethodNotAllowed: 405,\n NotAcceptable: 406,\n ProxyAuthenticationRequired: 407,\n RequestTimeout: 408,\n Conflict: 409,\n Gone: 410,\n LengthRequired: 411,\n PreconditionFailed: 412,\n /**\n * @deprecated Use `ContentTooLarge` instead.\n */\n PayloadTooLarge: 413,\n ContentTooLarge: 413,\n UriTooLong: 414,\n UnsupportedMediaType: 415,\n RangeNotSatisfiable: 416,\n ExpectationFailed: 417,\n ImATeapot: 418,\n MisdirectedRequest: 421,\n /**\n * @deprecated Use `UnprocessableContent` instead.\n */\n UnprocessableEntity: 422,\n UnprocessableContent: 422,\n Locked: 423,\n FailedDependency: 424,\n TooEarly: 425,\n UpgradeRequired: 426,\n PreconditionRequired: 428,\n TooManyRequests: 429,\n RequestHeaderFieldsTooLarge: 431,\n UnavailableForLegalReasons: 451,\n InternalServerError: 500,\n NotImplemented: 501,\n BadGateway: 502,\n ServiceUnavailable: 503,\n GatewayTimeout: 504,\n HttpVersionNotSupported: 505,\n VariantAlsoNegotiates: 506,\n InsufficientStorage: 507,\n LoopDetected: 508,\n NotExtended: 510,\n NetworkAuthenticationRequired: 511,\n WebServerReturnsAnUnknownError: 520,\n WebServerIsDown: 521,\n ConnectionTimedOut: 522,\n OriginIsUnreachable: 523,\n TimeoutOccurred: 524,\n SslHandshakeFailed: 525,\n InvalidSslCertificate: 526,\n};\n\nObject.entries(HttpStatusCode).forEach(([key, value]) => {\n if (HttpStatusCode[value] === undefined) {\n HttpStatusCode[value] = key;\n }\n});\n\nexport default HttpStatusCode;\n","'use strict';\n\nimport utils from './utils.js';\nimport bind from './helpers/bind.js';\nimport Axios from './core/Axios.js';\nimport mergeConfig from './core/mergeConfig.js';\nimport defaults from './defaults/index.js';\nimport formDataToJSON from './helpers/formDataToJSON.js';\nimport CanceledError from './cancel/CanceledError.js';\nimport CancelToken from './cancel/CancelToken.js';\nimport isCancel from './cancel/isCancel.js';\nimport { VERSION } from './env/data.js';\nimport toFormData from './helpers/toFormData.js';\nimport AxiosError from './core/AxiosError.js';\nimport spread from './helpers/spread.js';\nimport isAxiosError from './helpers/isAxiosError.js';\nimport AxiosHeaders from './core/AxiosHeaders.js';\nimport adapters from './adapters/adapters.js';\nimport HttpStatusCode from './helpers/HttpStatusCode.js';\n\n/**\n * Create an instance of Axios\n *\n * @param {Object} defaultConfig The default config for the instance\n *\n * @returns {Axios} A new instance of Axios\n */\nfunction createInstance(defaultConfig) {\n const context = new Axios(defaultConfig);\n const instance = bind(Axios.prototype.request, context);\n\n // Copy axios.prototype to instance\n utils.extend(instance, Axios.prototype, context, { allOwnKeys: true });\n\n // Copy context to instance\n utils.extend(instance, context, null, { allOwnKeys: true });\n\n // Factory for creating new instances\n instance.create = function create(instanceConfig) {\n return createInstance(mergeConfig(defaultConfig, instanceConfig));\n };\n\n return instance;\n}\n\n// Create the default instance to be exported\nconst axios = createInstance(defaults);\n\n// Expose Axios class to allow class inheritance\naxios.Axios = Axios;\n\n// Expose Cancel & CancelToken\naxios.CanceledError = CanceledError;\naxios.CancelToken = CancelToken;\naxios.isCancel = isCancel;\naxios.VERSION = VERSION;\naxios.toFormData = toFormData;\n\n// Expose AxiosError class\naxios.AxiosError = AxiosError;\n\n// alias for CanceledError for backward compatibility\naxios.Cancel = axios.CanceledError;\n\n// Expose all/spread\naxios.all = function all(promises) {\n return Promise.all(promises);\n};\n\naxios.spread = spread;\n\n// Expose isAxiosError\naxios.isAxiosError = isAxiosError;\n\n// Expose mergeConfig\naxios.mergeConfig = mergeConfig;\n\naxios.AxiosHeaders = AxiosHeaders;\n\naxios.formToJSON = (thing) => formDataToJSON(utils.isHTMLForm(thing) ? new FormData(thing) : thing);\n\naxios.getAdapter = adapters.getAdapter;\n\naxios.HttpStatusCode = HttpStatusCode;\n\naxios.default = axios;\n\n// this module should only have a default export\nexport default axios;\n","'use strict';\n\nimport CanceledError from './CanceledError.js';\n\n/**\n * A `CancelToken` is an object that can be used to request cancellation of an operation.\n *\n * @param {Function} executor The executor function.\n *\n * @returns {CancelToken}\n */\nclass CancelToken {\n constructor(executor) {\n if (typeof executor !== 'function') {\n throw new TypeError('executor must be a function.');\n }\n\n let resolvePromise;\n\n this.promise = new Promise(function promiseExecutor(resolve) {\n resolvePromise = resolve;\n });\n\n const token = this;\n\n // eslint-disable-next-line func-names\n this.promise.then((cancel) => {\n if (!token._listeners) return;\n\n let i = token._listeners.length;\n\n while (i-- > 0) {\n token._listeners[i](cancel);\n }\n token._listeners = null;\n });\n\n // eslint-disable-next-line func-names\n this.promise.then = (onfulfilled) => {\n let _resolve;\n // eslint-disable-next-line func-names\n const promise = new Promise((resolve) => {\n token.subscribe(resolve);\n _resolve = resolve;\n }).then(onfulfilled);\n\n promise.cancel = function reject() {\n token.unsubscribe(_resolve);\n };\n\n return promise;\n };\n\n executor(function cancel(message, config, request) {\n if (token.reason) {\n // Cancellation has already been requested\n return;\n }\n\n token.reason = new CanceledError(message, config, request);\n resolvePromise(token.reason);\n });\n }\n\n /**\n * Throws a `CanceledError` if cancellation has been requested.\n */\n throwIfRequested() {\n if (this.reason) {\n throw this.reason;\n }\n }\n\n /**\n * Subscribe to the cancel signal\n */\n\n subscribe(listener) {\n if (this.reason) {\n listener(this.reason);\n return;\n }\n\n if (this._listeners) {\n this._listeners.push(listener);\n } else {\n this._listeners = [listener];\n }\n }\n\n /**\n * Unsubscribe from the cancel signal\n */\n\n unsubscribe(listener) {\n if (!this._listeners) {\n return;\n }\n const index = this._listeners.indexOf(listener);\n if (index !== -1) {\n this._listeners.splice(index, 1);\n }\n }\n\n toAbortSignal() {\n const controller = new AbortController();\n\n const abort = (err) => {\n controller.abort(err);\n };\n\n this.subscribe(abort);\n\n controller.signal.unsubscribe = () => this.unsubscribe(abort);\n\n return controller.signal;\n }\n\n /**\n * Returns an object that contains a new `CancelToken` and a function that, when called,\n * cancels the `CancelToken`.\n */\n static source() {\n let cancel;\n const token = new CancelToken(function executor(c) {\n cancel = c;\n });\n return {\n token,\n cancel,\n };\n }\n}\n\nexport default CancelToken;\n","'use strict';\n\n/**\n * Syntactic sugar for invoking a function and expanding an array for arguments.\n *\n * Common use case would be to use `Function.prototype.apply`.\n *\n * ```js\n * function f(x, y, z) {}\n * const args = [1, 2, 3];\n * f.apply(null, args);\n * ```\n *\n * With `spread` this example can be re-written.\n *\n * ```js\n * spread(function(x, y, z) {})([1, 2, 3]);\n * ```\n *\n * @param {Function} callback\n *\n * @returns {Function}\n */\nexport default function spread(callback) {\n return function wrap(arr) {\n return callback.apply(null, arr);\n };\n}\n","'use strict';\n\nimport utils from '../utils.js';\n\n/**\n * Determines whether the payload is an error thrown by Axios\n *\n * @param {*} payload The value to test\n *\n * @returns {boolean} True if the payload is an error thrown by Axios, otherwise false\n */\nexport default function isAxiosError(payload) {\n return utils.isObject(payload) && payload.isAxiosError === true;\n}\n","import axios from './lib/axios.js';\n\n// This module is intended to unwrap Axios default export as named.\n// Keep top-level export same with static properties\n// so that it can keep same with es module or cjs\nconst {\n Axios,\n AxiosError,\n CanceledError,\n isCancel,\n CancelToken,\n VERSION,\n all,\n Cancel,\n isAxiosError,\n spread,\n toFormData,\n AxiosHeaders,\n HttpStatusCode,\n formToJSON,\n getAdapter,\n mergeConfig,\n create,\n} = axios;\n\nexport {\n axios as default,\n create,\n Axios,\n AxiosError,\n CanceledError,\n isCancel,\n CancelToken,\n VERSION,\n all,\n Cancel,\n isAxiosError,\n spread,\n toFormData,\n AxiosHeaders,\n HttpStatusCode,\n formToJSON,\n getAdapter,\n mergeConfig,\n};\n"],"names":["bind","fn","thisArg","apply","arguments","toString","Object","prototype","getPrototypeOf","iterator","toStringTag","Symbol","hasOwnProperty","obj","prop","call","isUnsafeObjectKey","isPrototypeBoundary","source","hasOwnInPrototypeChain","thing","seen","indexOf","push","kindOf","cache","create","str","slice","toLowerCase","kindOfTest","type","typeOfTest","isArray","Array","isUndefined","isBuffer","val","constructor","isFunction","isArrayBuffer","isString","isNumber","isObject","isPlainObject","isDate","isFile","isBlob","isFileList","isSet","G","globalThis","self","window","global","FormDataCtor","FormData","undefined","isURLSearchParams","isReadableStream","isRequest","isResponse","isHeaders","map","forEach","allOwnKeys","i","l","length","keys","getOwnPropertyNames","len","key","_global","isContextDefined","context","isTypedArray","TypedArray","Uint8Array","isHTMLForm","propertyIsEnumerable","isRegExp","reduceDescriptors","reducer","descriptors","getOwnPropertyDescriptors","reducedDescriptors","descriptor","name","ret","defineProperties","isAsyncFn","_setImmediate","setImmediateSupported","setImmediate","postMessageSupported","postMessage","token","Math","random","callbacks","addEventListener","data","shift","cb","setTimeout","asap","queueMicrotask","process","nextTick","isIterable","utils$1","isFormData","proto","append","kind","isArrayBufferView","result","ArrayBuffer","isView","buffer","isBoolean","isEmptyObject","e","isReactNativeBlob","value","uri","isReactNative","formData","getParts","isStream","pipe","merge","objs","caseless","skipUndefined","this","lowerCaseKeys","assignValue","targetKey","lowerKey","knownKey","existing","getOwnPropertySymbols","symbols","j","symbol","extend","a","b","defineProperty","__proto__","writable","enumerable","configurable","trim","replace","stripBOM","content","charCodeAt","inherits","superConstructor","props","assign","toFlatObject","sourceObj","destObj","filter","propFilter","merged","endsWith","searchString","position","String","lastIndex","toArray","Number","isSafeInteger","indexes","Set","size","has","add","index","isInteger","arr","forEachEntry","_iterator","next","done","pair","matchAll","regExp","matches","exec","hasOwnProp","getSafeProp","toSafeFlatObject","sourcePrototype","isExtensible","every","getOwnPropertyDescriptor","isSafeAndFullyMutable","current","freezeMethods","includes","set","Error","toObjectSet","arrayOrString","delimiter","define","split","toCamelCase","m","p1","p2","toUpperCase","noop","toFiniteNumber","defaultValue","isFinite","findKey","_key","isSpecCompliantForm","toJSONObject","visited","WeakSet","visit","target","reducedValue","delete","isThenable","then","catch","isSafeIterable","ignoreDuplicateOf","utils","INVALID_UNICODE_HEADER_VALUE_CHARS","RegExp","INVALID_BYTE_STRING_HEADER_VALUE_CHARS","sanitizeValue","invalidChars","item","start","end","code","trimSPorHTAB","toByteStringHeaderObject","headers","byteStringHeaders","toJSON","header","sanitizeByteStringHeaderValue","$internals","normalizeHeader","normalizeValue","sanitizeHeaderValue","parameterNameRE","trimOWS","headerSlot","matchHeaderValue","isHeaderNameFilter","test","AxiosHeaders$1","valueOrRewrite","rewrite","setHeader","_value","_header","_rewrite","lHeader","setHeaders","rawHeaders","parsed","line","substring","hasKey","parseHeaders","dest","entry","TypeError","get","parser","tokens","tokensRE","match","parseTokens","matcher","deleted","deleteHeader","clear","normalize","format","normalized","w","char","formatHeader","concat","targets","asStrings","join","entries","getSetCookie","from","parseParameters","parameters","quoted","escaped","parseParameter","part","equals","normalizedName","parameterValue","last","decoded","decodeQuotedString","first","computed","accessor","accessors","defineAccessor","accessorName","methodName","arg1","arg2","arg3","buildAccessors","AxiosHeaders","mapped","headerValue","REDACTED","redactConfig","config","redactKeys","lowerKeys","k","v","hasOwnOrPrototypeToJSON","pop","stringifySafely","err","$causeStack","AxiosError","error","request","response","customProps","message","errors","Boolean","aggregateErrorMessage","axiosError","sourceStack","stack","targetStack","causeStack","appendCauseStack","status","super","isAxiosError","redact","serializedConfig","description","number","fileName","lineNumber","columnNumber","ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ECONNREFUSED","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL","ERR_FORM_DATA_DEPTH_EXCEEDED","isVisitable","removeBrackets","renderKey","path","dots","predicates","toFormData","options","option","fallback","metaTokens","visitor","defaultVisitor","_Blob","Blob","maxDepth","useBlob","convertValue","toISOString","throwIfMaxDepthExceeded","depth","Infinity","JSON","stringify","ancestors","currentValue","stringifyWithDepthLimit","some","isFlatArray","el","exposedHelpers","build","encode","charMap","encodeURIComponent","AxiosURLSearchParams","params","_pairs","buildURL","url","_options","serialize","_encode","serializeFn","serializedParams","hashmarkIndex","encoder","countHandlers","handlers","trimHandlers","syncHandlerEntries","manager","internals","handlersRef","handlerEntries","handlersLength","id","handler","InterceptorManager","Map","iterationDepth","nextId","use","fulfilled","rejected","synchronous","runWhen","eject","handlerId","normalizeHandlerId","h","transitionalDefaults","silentJSONParsing","forcedJSONParsing","clarifyTimeoutError","legacyInterceptorReqResOrdering","advertiseZstdAcceptEncoding","validateStatusUndefinedResolves","encodeBasicAuthUsername","platform$1","isBrowser","classes","URLSearchParams","protocols","hasBrowserEnv","document","_navigator","navigator","hasStandardBrowserEnv","product","hasStandardBrowserWebWorkerEnv","WorkerGlobalScope","importScripts","origin","location","href","platform","throwIfDepthExceeded","arrayToObject","normalizeArray","formDataToJSON","buildPath","isNumericKey","isLast","pattern","parsePropPath","pending","normalizeArrays","methodList","freeze","own","defaults","transitional","adapter","transformRequest","contentType","getContentType","hasJSONContentType","isObjectPayload","setContentType","formSerializer","helpers","isNode","toURLEncodedForm","env","_FormData","rawValue","parse","transformResponse","responseType","JSONRequested","strictJSONParsing","timeout","xsrfCookieName","xsrfHeaderName","maxContentLength","maxBodyLength","validateStatus","common","Accept","transformData","fns","isCancel","__CANCEL__","method","settle","resolve","reject","urlParserControlCharacters","normalizeURLForProtocolCheck","parseProtocol","decodeCookieValue","decodeURIComponent","cookies","write","expires","domain","secure","sameSite","cookie","Date","toUTCString","read","cookieString","eq","readAsync","store","cookieStore","remove","now","async","progressEventReducer","listener","isDownloadStream","freq","bytesNotified","_speedometer","samplesCount","min","bytes","timestamps","firstSampleTS","head","tail","chunkLength","startedAt","bytesCount","passed","round","speedometer","lastArgs","timer","timestamp","threshold","invoke","args","clearTimeout","throttle","loaded","rawLoaded","total","lengthComputable","max","progressBytes","rate","progress","estimated","event","progressEventDecorator","throttled","asyncDecorator","scheduler","isURLSameOrigin","URL","baseURI","protocol","host","port","malformedHttpProtocol","redactSensitiveURLParts","redactedURL","fragmentIndex","redactedURLWithoutFragment","fragment","separator","parameterName","assertValidHttpProtocolURL","normalizedURL","buildFullPath","baseURL","requestedURL","allowAbsoluteUrls","isRelativeUrl","relativeURL","combineURLs","headersToObject","ownEnumerableKeys","getMergedValue","mergeDeepProperties","valueFromConfig2","defaultToConfig2","mergeDirectKeys","config1","config2","hasOwnPropertyDescriptor","mergeMap","copies","WeakMap","empty","copy","base","bases","baseKeys","sourceKeys","hasSource","previous","active","assertParamsAcyclic","paramsSerializer","timeoutErrorMessage","withCredentials","withXSRFToken","onUploadProgress","onDownloadProgress","decompress","beforeRedirect","transport","httpAgent","httpsAgent","cancelToken","socketPath","allowedSocketPaths","responseEncoding","mergeConfig","configValue","transitional2","transitional1","getMergedTransitionalOption","FORM_DATA_CONTENT_HEADERS","encodeUTF8","_","hex","fromCharCode","parseInt","readCookie","resolveConfig","readXsrfCookie","newConfig","auth","username","password","encodeUsername","btoa","getHeaders","formHeaders","policy","setFormDataHeaders","xsrfValue","xhrAdapter","XMLHttpRequest","Promise","useAsyncXsrf","_config","requestData","requestHeaders","onCanceled","timeoutId","uploadThrottled","downloadThrottled","flushUpload","flushDownload","flushDownloadWithEvent","removeEventListener","upload","unsubscribe","signal","onloadend","responseURL","startsWith","responseHeaders","getAllResponseHeaders","responseText","statusText","open","onreadystatechange","readyState","onabort","onerror","msg","ontimeout","cancel","CanceledError","xhr","abort","subscribe","aborted","sendRequest","setRequestHeader","send","performance","deadline","abortOnTimeout","scheduleTimeout","remaining","headerName","composeSignals","signals","controller","AbortController","reason","unsubscribeSignal","once","streamChunk","chunk","chunkSize","byteLength","pos","readStream","stream","asyncIterator","reader","getReader","trackStream","onProgress","onFinish","iterable","readBytes","_onFinish","ReadableStream","pull","close","loadedBytes","enqueue","return","highWaterMark","CRLF","normalizeLines","escapeName","stringBytes","FormDataError","createMultipartBody","form","limit","limitError","boundary","generateString","crypto","getRandomValues","footer","parts","checkLength","extra","valueLength","partLength","blobParts","formDataToBlob","isHexDigit","charCode","isPercentEncodedByte","hexValue","isBase64Char","isBase64Whitespace","estimatePercentDecodedBase64Bytes","body","significant","padding","invalid","floor","estimateBase64BufferAllocation","remainder","base64Bytes","estimateDataURLDecodedBytes","estimateBase64","base64Pattern","comma","meta","c","estimateDataURLBytes","VERSION","DEFAULT_REQUEST_OPTIONS","redirect","referrer","referrerPolicy","mode","integrity","keepalive","priority","decodeURIComponentSafe","factory","globalObject","TextEncoder","Request","Response","envFetch","fetch","isFetchSupported","isRequestSupported","isResponseSupported","isReadableStreamSupported","encodeText","arrayBuffer","supportsRequestStream","duplexAccessed","duplex","hasContentType","supportsResponseStream","requestDefaults","resolvers","res","getBodyLength","fetchOptions","maxRedirects","hasMaxContentLength","hasMaxBodyLength","_fetch","composedSignal","toAbortSignal","requestContentLength","pendingBodyError","pendingResponseError","maxBodyLengthError","configAuth","parsedURL","protocolIndex","urlToCheck","maybeWithAuthCredentials","urlUsername","formContentType","formBoundary","outboundLength","mustEnforceStreamBody","trackRequestStream","flush","getContentLength","resolveBodyLength","contentTypeHeader","_request","isCredentialsSupported","safeFetchOptions","credentials","resolvedOptions","declaredLength","isStreamResponse","responseContentLength","bytesRead","onChunkProgress","responseData","materializedSize","canceledError","networkError","cause","seedCache","getFetch","configuredEnv","seeds","seed","knownAdapters","http","fetchAdapter.getFetch","renderReason","isResolvedHandle","adapters","getAdapter","nameOrAdapter","rejectedReasons","reasons","state","s","throwIfCancellationRequested","throwIfRequested","elapsedSince","dispatchRequest","duration","validators","deprecatedWarnings","validator","version","formatMessage","opt","desc","opts","console","warn","spelling","correctSpelling","assertOptions","schema","allowUnknown","isHeadersBucket","Axios$1","instanceConfig","interceptors","configOrUrl","dummy","captureStackTrace","dummyStack","firstNewlineIndex","secondNewlineIndex","duplicateCheckSuffix","currentStack","causeIndex","getCauseStackIndex","stackHead","causeSection","boolean","function","baseUrl","withXsrfToken","commonHeaders","methodHeaders","contextHeaders","requestInterceptorChain","synchronousRequestInterceptors","interceptor","unshift","responseInterceptorChain","promise","chain","onFulfilled","onRejected","rejectedResult","rejectedError","getUri","Axios","generateHTTPMethod","isForm","HttpStatusCode","Continue","SwitchingProtocols","Processing","EarlyHints","Ok","Created","Accepted","NonAuthoritativeInformation","NoContent","ResetContent","PartialContent","MultiStatus","AlreadyReported","ImUsed","MultipleChoices","MovedPermanently","Found","SeeOther","NotModified","UseProxy","Unused","TemporaryRedirect","PermanentRedirect","BadRequest","Unauthorized","PaymentRequired","Forbidden","NotFound","MethodNotAllowed","NotAcceptable","ProxyAuthenticationRequired","RequestTimeout","Conflict","Gone","LengthRequired","PreconditionFailed","PayloadTooLarge","ContentTooLarge","UriTooLong","UnsupportedMediaType","RangeNotSatisfiable","ExpectationFailed","ImATeapot","MisdirectedRequest","UnprocessableEntity","UnprocessableContent","Locked","FailedDependency","TooEarly","UpgradeRequired","PreconditionRequired","TooManyRequests","RequestHeaderFieldsTooLarge","UnavailableForLegalReasons","InternalServerError","NotImplemented","BadGateway","ServiceUnavailable","GatewayTimeout","HttpVersionNotSupported","VariantAlsoNegotiates","InsufficientStorage","LoopDetected","NotExtended","NetworkAuthenticationRequired","WebServerReturnsAnUnknownError","WebServerIsDown","ConnectionTimedOut","OriginIsUnreachable","TimeoutOccurred","SslHandshakeFailed","InvalidSslCertificate","axios","createInstance","defaultConfig","instance","CancelToken","executor","resolvePromise","_listeners","onfulfilled","_resolve","splice","Cancel","all","promises","spread","callback","payload","formToJSON","default"],"mappings":";AASe,SAASA,EAAKC,EAAIC,GAC/B,OAAO,WACL,OAAOD,EAAGE,MAAMD,EAASE,UAC3B,CACF,CCPA,MAAMC,SAAEA,GAAaC,OAAOC,WACtBC,eAAEA,GAAmBF,QACrBG,SAAEA,EAAQC,YAAEA,GAAgBC,OAG5BC,EAAiB,GAClBA,oBACH,CAACC,EAAKC,IACJF,EAAeG,KAAKF,EAAKC,GAHN,CAIrBR,OAAOC,WAEHS,EAAqBF,GACT,iBAATA,IACG,cAATA,GAAiC,gBAATA,GAAmC,cAATA,GAgB/CG,EAAsB,CAACJ,EAAKN,EAAWW,IAC3CL,IAAQP,OAAOC,YAAeW,GAAwB,OAAdX,EA8CpCY,EAAyB,CAACC,EAAON,KACrC,IAAID,EAAMO,EACV,MAAMC,EAAO,GAEb,KAAc,MAAPR,GAAa,CAClB,IAA0B,IAAtBQ,EAAKC,QAAQT,GACf,OAAO,EAETQ,EAAKE,KAAKV,GAEV,MAAMN,EAAYC,EAAeK,GAEjC,GAAII,EAAoBJ,EAAKN,EAAWM,IAAQO,GAC9C,OAAO,EAGT,GAAIR,EAAeC,EAAKC,GACtB,OAAO,EAETD,EAAMN,CACR,CACA,OAAO,GAgFHiB,GAAWC,EAGdnB,OAAOoB,OAAO,MAHWN,IAC1B,MAAMO,EA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AYmqB,OACZA,GAAMvoB,WACNA,GAAU5D,aACVA,GAAY4mB,eACZA,GAAc0F,WACdA,GAAU1J,WACVA,GAAUrO,YACVA,GAAWrnB,OACXA,IACEm+B"} \ No newline at end of file diff --git a/node_modules/axios/dist/node/axios.cjs b/node_modules/axios/dist/node/axios.cjs new file mode 100644 index 0000000..b09a7f2 --- /dev/null +++ b/node_modules/axios/dist/node/axios.cjs @@ -0,0 +1,7506 @@ +/*! Axios v1.21.1 Copyright (c) 2026 Matt Zabriskie and contributors */ +'use strict'; + +var FormData$1 = require('form-data'); +var crypto = require('crypto'); +var url = require('url'); +var HttpsProxyAgent = require('https-proxy-agent'); +var http = require('http'); +var https = require('https'); +var http2 = require('http2'); +var util = require('util'); +var path = require('path'); +var followRedirects = require('follow-redirects'); +var zlib = require('zlib'); +var stream = require('stream'); +var events = require('events'); + +/** + * Create a bound version of a function with a specified `this` context + * + * @param {Function} fn - The function to bind + * @param {*} thisArg - The value to be passed as the `this` parameter + * @returns {Function} A new function that will call the original function with the specified `this` context + */ +function bind(fn, thisArg) { + return function wrap() { + return fn.apply(thisArg, arguments); + }; +} + +// utils is a library of generic helper functions non-specific to axios + +const { + toString +} = Object.prototype; +const { + getPrototypeOf +} = Object; +const { + iterator, + toStringTag +} = Symbol; + +/* Creating a function that will check if an object has a property. */ +const hasOwnProperty = (({ + hasOwnProperty +}) => (obj, prop) => hasOwnProperty.call(obj, prop))(Object.prototype); +const isUnsafeObjectKey = prop => typeof prop === 'string' && (prop === '__proto__' || prop === 'constructor' || prop === 'prototype'); + +/** + * Determine whether an inherited object must be treated as a shared-prototype + * boundary. Cross-realm Object.prototype objects cannot be distinguished + * reliably from application-created null-prototype objects because their + * properties are mutable, so all inherited terminal prototypes are excluded + * as a fail-closed boundary. A null-prototype source still keeps its own + * properties, as produced by mergeConfig and other safe materialization paths. + * + * @param {*} obj The object to inspect + * @param {*} prototype The object's prototype + * @param {boolean} source Whether obj is the original traversal source + * + * @returns {boolean} True when obj is a safe prototype traversal boundary + */ +const isPrototypeBoundary = (obj, prototype, source) => obj === Object.prototype || !source && prototype === null; + +/** + * Determine whether an object can retain its identity through code paths that + * add, replace, and remove config properties without bypassing unsafe-key + * filtering. Immutable objects, unsafe-key-bearing objects, and objects with + * accessor or restricted data properties must be materialized instead. + * + * @param {*} obj The object to inspect + * + * @returns {boolean} True when every own property is safe and fully mutable + */ +const isSafeAndFullyMutable = obj => { + if (!Object.isExtensible(obj)) { + return false; + } + const props = Object.getOwnPropertyNames(obj); + if (Object.getOwnPropertySymbols) { + props.push(...Object.getOwnPropertySymbols(obj)); + } + return props.every(prop => { + if (isUnsafeObjectKey(prop)) { + return false; + } + const descriptor = Object.getOwnPropertyDescriptor(obj, prop); + return !!descriptor && descriptor.configurable && descriptor.writable === true; + }); +}; + +/** + * Walk the prototype chain (excluding the source realm's Object.prototype) + * looking for an own `prop`. This distinguishes genuine own/inherited members + * — including class accessors and template prototypes — from members injected + * via Object.prototype pollution (e.g. `Object.prototype.username = '...'`), + * which live on Object.prototype itself and are therefore never matched. + * + * @param {*} thing The value whose chain to inspect + * @param {string|symbol} prop The property key to look for + * + * @returns {boolean} True when `prop` is owned below Object.prototype + */ +const hasOwnInPrototypeChain = (thing, prop) => { + let obj = thing; + const seen = []; + while (obj != null) { + if (seen.indexOf(obj) !== -1) { + return false; + } + seen.push(obj); + const prototype = getPrototypeOf(obj); + if (isPrototypeBoundary(obj, prototype, obj === thing)) { + return false; + } + if (hasOwnProperty(obj, prop)) { + return true; + } + obj = prototype; + } + return false; +}; + +/** + * Read `obj[prop]` only when it is safe from Object.prototype pollution. Own + * properties and members inherited from a non-Object.prototype source (a class + * instance or template object) are honored; a value reachable only through a + * polluted Object.prototype is ignored and `undefined` is returned. + * + * @param {*} obj The source object + * @param {string|symbol} prop The property key to read + * + * @returns {*} The resolved value, or undefined when unsafe/absent + */ +const getSafeProp = (obj, prop) => obj != null && hasOwnInPrototypeChain(obj, prop) ? obj[prop] : undefined; + +/** + * Flatten an object and its application-defined prototype chain into a + * null-prototype object. Members inherited only from the source realm's + * Object.prototype are deliberately excluded, while class/template members + * below that boundary are preserved. + * + * @param {*} thing The value to flatten + * + * @returns {*} A null-prototype copy, or the original value when it is already + * structurally safe or is not an object + */ +const toSafeFlatObject = thing => { + if (thing == null || typeof thing !== 'object' && typeof thing !== 'function') { + return thing; + } + const sourcePrototype = getPrototypeOf(thing); + if (sourcePrototype === null && isSafeAndFullyMutable(thing)) { + return thing; + } + const result = Object.create(null); + const merged = Object.create(null); + const seen = []; + let current = thing; + while (current != null) { + if (seen.indexOf(current) !== -1) { + break; + } + seen.push(current); + const prototype = current === thing ? sourcePrototype : getPrototypeOf(current); + if (isPrototypeBoundary(current, prototype, current === thing)) { + break; + } + const props = Object.getOwnPropertyNames(current); + if (Object.getOwnPropertySymbols) { + props.push(...Object.getOwnPropertySymbols(current)); + } + for (const prop of props) { + if (isUnsafeObjectKey(prop)) { + continue; + } + if (!hasOwnProperty(merged, prop)) { + result[prop] = thing[prop]; + merged[prop] = true; + } + } + current = prototype; + } + return result; +}; +const kindOf = (cache => thing => { + const str = toString.call(thing); + return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase()); +})(Object.create(null)); +const kindOfTest = type => { + type = type.toLowerCase(); + return thing => kindOf(thing) === type; +}; +const typeOfTest = type => thing => typeof thing === type; + +/** + * Determine if a value is a non-null object + * + * @param {Object} val The value to test + * + * @returns {boolean} True if value is an Array, otherwise false + */ +const { + isArray +} = Array; + +/** + * Determine if a value is undefined + * + * @param {*} val The value to test + * + * @returns {boolean} True if the value is undefined, otherwise false + */ +const isUndefined = typeOfTest('undefined'); + +/** + * Determine if a value is a Buffer + * + * @param {*} val The value to test + * + * @returns {boolean} True if value is a Buffer, otherwise false + */ +function isBuffer(val) { + return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor) && isFunction$1(val.constructor.isBuffer) && val.constructor.isBuffer(val); +} + +/** + * Determine if a value is an ArrayBuffer + * + * @param {*} val The value to test + * + * @returns {boolean} True if value is an ArrayBuffer, otherwise false + */ +const isArrayBuffer = kindOfTest('ArrayBuffer'); + +/** + * Determine if a value is a view on an ArrayBuffer + * + * @param {*} val The value to test + * + * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false + */ +function isArrayBufferView(val) { + let result; + if (typeof ArrayBuffer !== 'undefined' && ArrayBuffer.isView) { + result = ArrayBuffer.isView(val); + } else { + result = val && val.buffer && isArrayBuffer(val.buffer); + } + return result; +} + +/** + * Determine if a value is a String + * + * @param {*} val The value to test + * + * @returns {boolean} True if value is a String, otherwise false + */ +const isString = typeOfTest('string'); + +/** + * Determine if a value is a Function + * + * @param {*} val The value to test + * @returns {boolean} True if value is a Function, otherwise false + */ +const isFunction$1 = typeOfTest('function'); + +/** + * Determine if a value is a Number + * + * @param {*} val The value to test + * + * @returns {boolean} True if value is a Number, otherwise false + */ +const isNumber = typeOfTest('number'); + +/** + * Determine if a value is an Object + * + * @param {*} thing The value to test + * + * @returns {boolean} True if value is an Object, otherwise false + */ +const isObject = thing => thing !== null && typeof thing === 'object'; + +/** + * Determine if a value is a Boolean + * + * @param {*} thing The value to test + * @returns {boolean} True if value is a Boolean, otherwise false + */ +const isBoolean = thing => thing === true || thing === false; + +/** + * Determine if a value is a plain Object + * + * @param {*} val The value to test + * + * @returns {boolean} True if value is a plain Object, otherwise false + */ +const isPlainObject = val => { + if (!isObject(val)) { + return false; + } + const prototype = getPrototypeOf(val); + return (prototype === null || prototype === Object.prototype || getPrototypeOf(prototype) === null) && ( + // Treat own Symbol.toStringTag or Symbol.iterator members as evidence the + // value is tagged/iterable, ignoring members reachable only through shared + // or terminal prototype boundaries. This is exactly what + // hasOwnInPrototypeChain(val, prop) computes here: every prototype admitted + // above (null, Object.prototype, or a terminal null-prototype template) is + // a boundary, so the walk never inspects anything but `val`'s own members, + // and stops before even those when `val` is itself the boundary + // Object.prototype. Checking that inline avoids allocating the walker's + // `seen` list twice per call on the mergeConfig / merge hot path. + isPrototypeBoundary(val, prototype, true) || !hasOwnProperty(val, toStringTag) && !hasOwnProperty(val, iterator)); +}; + +/** + * Determine if a value is an empty object (safely handles Buffers) + * + * @param {*} val The value to test + * + * @returns {boolean} True if value is an empty object, otherwise false + */ +const isEmptyObject = val => { + // Early return for non-objects or Buffers to prevent RangeError + if (!isObject(val) || isBuffer(val)) { + return false; + } + try { + return Object.keys(val).length === 0 && Object.getPrototypeOf(val) === Object.prototype; + } catch (e) { + // Fallback for any other objects that might cause RangeError with Object.keys() + return false; + } +}; + +/** + * Determine if a value is a Date + * + * @param {*} val The value to test + * + * @returns {boolean} True if value is a Date, otherwise false + */ +const isDate = kindOfTest('Date'); + +/** + * Determine if a value is a File + * + * @param {*} val The value to test + * + * @returns {boolean} True if value is a File, otherwise false + */ +const isFile = kindOfTest('File'); + +/** + * Determine if a value is a React Native Blob + * React Native "blob": an object with a `uri` attribute. Optionally, it can + * also have a `name` and `type` attribute to specify filename and content type + * + * @see https://github.com/facebook/react-native/blob/26684cf3adf4094eb6c405d345a75bf8c7c0bf88/Libraries/Network/FormData.js#L68-L71 + * + * @param {*} value The value to test + * + * @returns {boolean} True if value is a React Native Blob, otherwise false + */ +const isReactNativeBlob = value => { + return !!(value && typeof value.uri !== 'undefined'); +}; + +/** + * Determine if environment is React Native + * ReactNative `FormData` has a non-standard `getParts()` method + * + * @param {*} formData The formData to test + * + * @returns {boolean} True if environment is React Native, otherwise false + */ +const isReactNative = formData => formData && typeof formData.getParts !== 'undefined'; + +/** + * Determine if a value is a Blob + * + * @param {*} val The value to test + * + * @returns {boolean} True if value is a Blob, otherwise false + */ +const isBlob = kindOfTest('Blob'); + +/** + * Determine if a value is a FileList + * + * @param {*} val The value to test + * + * @returns {boolean} True if value is a FileList, otherwise false + */ +const isFileList = kindOfTest('FileList'); +const isSet = kindOfTest('Set'); + +/** + * Determine if a value is a Stream + * + * @param {*} val The value to test + * + * @returns {boolean} True if value is a Stream, otherwise false + */ +const isStream = val => isObject(val) && isFunction$1(val.pipe); + +/** + * Determine if a value is a FormData + * + * @param {*} thing The value to test + * + * @returns {boolean} True if value is an FormData, otherwise false + */ +function getGlobal() { + if (typeof globalThis !== 'undefined') return globalThis; + if (typeof self !== 'undefined') return self; + if (typeof window !== 'undefined') return window; + if (typeof global !== 'undefined') return global; + return {}; +} +const G = getGlobal(); +const FormDataCtor = typeof G.FormData !== 'undefined' ? G.FormData : undefined; +const isFormData = thing => { + if (!thing) return false; + if (FormDataCtor && thing instanceof FormDataCtor) return true; + // Reject plain objects inheriting directly from Object.prototype so prototype-pollution gadgets can't spoof FormData. + const proto = getPrototypeOf(thing); + if (!proto || proto === Object.prototype) return false; + if (!isFunction$1(thing.append)) return false; + const kind = kindOf(thing); + return kind === 'formdata' || + // detect form-data instance + kind === 'object' && isFunction$1(thing.toString) && thing.toString() === '[object FormData]'; +}; + +/** + * Determine if a value is a URLSearchParams object + * + * @param {*} val The value to test + * + * @returns {boolean} True if value is a URLSearchParams object, otherwise false + */ +const isURLSearchParams = kindOfTest('URLSearchParams'); +const [isReadableStream, isRequest, isResponse, isHeaders] = ['ReadableStream', 'Request', 'Response', 'Headers'].map(kindOfTest); + +/** + * Trim excess whitespace off the beginning and end of a string + * + * @param {String} str The String to trim + * + * @returns {String} The String freed of excess whitespace + */ +const trim = str => { + return str.trim ? str.trim() : str.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, ''); +}; +/** + * Iterate over an Array or an Object invoking a function for each item. + * + * If `obj` is an Array callback will be called passing + * the value, index, and complete array for each item. + * + * If 'obj' is an Object callback will be called passing + * the value, key, and complete object for each property. + * + * @param {Object|Array} obj The object to iterate + * @param {Function} fn The callback to invoke for each item + * + * @param {Object} [options] + * @param {Boolean} [options.allOwnKeys = false] + * @returns {any} + */ +function forEach(obj, fn, { + allOwnKeys = false +} = {}) { + // Don't bother if no value provided + if (obj === null || typeof obj === 'undefined') { + return; + } + let i; + let l; + + // Force an array if not already something iterable + if (typeof obj !== 'object') { + /*eslint no-param-reassign:0*/ + obj = [obj]; + } + if (isArray(obj)) { + // Iterate over array values + for (i = 0, l = obj.length; i < l; i++) { + fn.call(null, obj[i], i, obj); + } + } else { + // Buffer check + if (isBuffer(obj)) { + return; + } + + // Iterate over object keys + const keys = allOwnKeys ? Object.getOwnPropertyNames(obj) : Object.keys(obj); + const len = keys.length; + let key; + for (i = 0; i < len; i++) { + key = keys[i]; + fn.call(null, obj[key], key, obj); + } + } +} + +/** + * Finds a key in an object, case-insensitive, returning the actual key name. + * Returns null if the object is a Buffer or if no match is found. + * + * @param {Object} obj - The object to search. + * @param {string} key - The key to find (case-insensitive). + * @returns {?string} The actual key name if found, otherwise null. + */ +function findKey(obj, key) { + if (isBuffer(obj)) { + return null; + } + key = key.toLowerCase(); + const keys = Object.keys(obj); + let i = keys.length; + let _key; + while (i-- > 0) { + _key = keys[i]; + if (key === _key.toLowerCase()) { + return _key; + } + } + return null; +} +const _global = (() => { + /*eslint no-undef:0*/ + if (typeof globalThis !== 'undefined') return globalThis; + return typeof self !== 'undefined' ? self : typeof window !== 'undefined' ? window : global; +})(); +const isContextDefined = context => !isUndefined(context) && context !== _global; + +/** + * Accepts varargs expecting each argument to be an object, then + * immutably merges the properties of each object and returns result. + * + * When multiple objects contain the same key the later object in + * the arguments list will take precedence. + * + * Example: + * + * ```js + * const result = merge({foo: 123}, {foo: 456}); + * console.log(result.foo); // outputs 456 + * ``` + * + * @param {Object} obj1 Object to merge + * + * @returns {Object} Result of all merge properties + */ +function merge(...objs) { + const { + caseless, + skipUndefined + } = isContextDefined(this) && this || {}; + const result = {}; + // Caseless lookup only applies to string keys — symbol keys are + // identity-matched. Every string key that reaches `result` passes through + // this index first, so it can never hold two case variants of one key and a + // lowercase -> key map is exactly what findKey(result, key) would rescan + // Object.keys(result) for on each assignment. + const lowerCaseKeys = caseless ? Object.create(null) : null; + const assignValue = (val, key) => { + // Skip dangerous property names to prevent prototype pollution + if (key === '__proto__' || key === 'constructor' || key === 'prototype') { + return; + } + let targetKey = key; + if (lowerCaseKeys && typeof key === 'string') { + const lowerKey = key.toLowerCase(); + const knownKey = lowerCaseKeys[lowerKey]; + // A key recorded but absent from `result` was skipped by skipUndefined; + // the later spelling wins then, as it does for findKey. + if (knownKey !== undefined && hasOwnProperty(result, knownKey)) { + targetKey = knownKey; + } else { + lowerCaseKeys[lowerKey] = key; + } + } + // Read via own-prop only — a bare `result[targetKey]` walks the prototype + // chain, so a polluted Object.prototype value could surface here and get + // copied into the merged result. + const existing = hasOwnProperty(result, targetKey) ? result[targetKey] : undefined; + if (isPlainObject(existing) && isPlainObject(val)) { + result[targetKey] = merge(existing, val); + } else if (isPlainObject(val)) { + result[targetKey] = merge({}, val); + } else if (isArray(val)) { + result[targetKey] = val.slice(); + } else if (!skipUndefined || !isUndefined(val)) { + result[targetKey] = val; + } + }; + for (let i = 0, l = objs.length; i < l; i++) { + const source = objs[i]; + if (!source || isBuffer(source)) { + continue; + } + forEach(source, assignValue); + if (typeof source !== 'object' || isArray(source) || !Object.getOwnPropertySymbols) { + continue; + } + const symbols = Object.getOwnPropertySymbols(source); + for (let j = 0; j < symbols.length; j++) { + const symbol = symbols[j]; + if (propertyIsEnumerable.call(source, symbol)) { + assignValue(source[symbol], symbol); + } + } + } + return result; +} + +/** + * Extends object a by mutably adding to it the properties of object b. + * + * @param {Object} a The object to be extended + * @param {Object} b The object to copy properties from + * @param {Object} thisArg The object to bind function to + * + * @param {Object} [options] + * @param {Boolean} [options.allOwnKeys] + * @returns {Object} The resulting value of object a + */ +const extend = (a, b, thisArg, { + allOwnKeys +} = {}) => { + forEach(b, (val, key) => { + if (thisArg && isFunction$1(val)) { + Object.defineProperty(a, key, { + // Null-proto descriptor so a polluted Object.prototype.get cannot + // hijack defineProperty's accessor-vs-data resolution. + __proto__: null, + value: bind(val, thisArg), + writable: true, + enumerable: true, + configurable: true + }); + } else { + Object.defineProperty(a, key, { + __proto__: null, + value: val, + writable: true, + enumerable: true, + configurable: true + }); + } + }, { + allOwnKeys + }); + return a; +}; + +/** + * Remove byte order marker. This catches EF BB BF (the UTF-8 BOM) + * + * @param {string} content with BOM + * + * @returns {string} content value without BOM + */ +const stripBOM = content => { + if (content.charCodeAt(0) === 0xfeff) { + content = content.slice(1); + } + return content; +}; + +/** + * Inherit the prototype methods from one constructor into another + * @param {function} constructor + * @param {function} superConstructor + * @param {object} [props] + * @param {object} [descriptors] + * + * @returns {void} + */ +const inherits = (constructor, superConstructor, props, descriptors) => { + constructor.prototype = Object.create(superConstructor.prototype, descriptors); + Object.defineProperty(constructor.prototype, 'constructor', { + __proto__: null, + value: constructor, + writable: true, + enumerable: false, + configurable: true + }); + Object.defineProperty(constructor, 'super', { + __proto__: null, + value: superConstructor.prototype + }); + props && Object.assign(constructor.prototype, props); +}; + +/** + * Resolve object with deep prototype chain to a flat object + * @param {Object} sourceObj source object + * @param {Object} [destObj] + * @param {Function|Boolean} [filter] + * @param {Function} [propFilter] + * + * @returns {Object} + */ +const toFlatObject = (sourceObj, destObj, filter, propFilter) => { + let props; + let i; + let prop; + const merged = {}; + destObj = destObj || {}; + // eslint-disable-next-line no-eq-null,eqeqeq + if (sourceObj == null) return destObj; + do { + props = Object.getOwnPropertyNames(sourceObj); + i = props.length; + while (i-- > 0) { + prop = props[i]; + if ((!propFilter || propFilter(prop, sourceObj, destObj)) && !merged[prop]) { + destObj[prop] = sourceObj[prop]; + merged[prop] = true; + } + } + sourceObj = filter !== false && getPrototypeOf(sourceObj); + } while (sourceObj && (!filter || filter(sourceObj, destObj)) && sourceObj !== Object.prototype); + return destObj; +}; + +/** + * Determines whether a string ends with the characters of a specified string + * + * @param {String} str + * @param {String} searchString + * @param {Number} [position= 0] + * + * @returns {boolean} + */ +const endsWith = (str, searchString, position) => { + str = String(str); + if (position === undefined || position > str.length) { + position = str.length; + } + position -= searchString.length; + const lastIndex = str.indexOf(searchString, position); + return lastIndex !== -1 && lastIndex === position; +}; + +/** + * Returns new array from array like object or null if failed + * + * @param {*} [thing] + * + * @returns {?Array} + */ +const toArray = thing => { + if (!thing) return null; + if (isArray(thing)) return thing; + let i = thing.length; + if (!Number.isSafeInteger(i) || i < 0 || i > 0xffffffff) return null; + + // Bound the copy by actual indexed properties, including hidden and inherited + // members of array-like collections, rather than by the declared length alone. + const indexes = new Set(); + const seen = new Set(); + let source = thing; + while (source != null && indexes.size < i) { + if (seen.has(source)) return null; + seen.add(source); + const prototype = getPrototypeOf(source); + if (isPrototypeBoundary(source, prototype, source === thing)) break; + Object.getOwnPropertyNames(source).forEach(key => { + const index = +key; + if (Number.isInteger(index) && index >= 0 && index < i && String(index) === key && hasOwnProperty(source, key)) { + indexes.add(index); + } + }); + source = prototype; + } + if (indexes.size !== i) return null; + const arr = new Array(i); + while (i-- > 0) { + arr[i] = thing[i]; + } + return arr; +}; + +/** + * Checking if the Uint8Array exists and if it does, it returns a function that checks if the + * thing passed in is an instance of Uint8Array + * + * @param {TypedArray} + * + * @returns {Array} + */ +// eslint-disable-next-line func-names +const isTypedArray = (TypedArray => { + // eslint-disable-next-line func-names + return thing => { + return TypedArray && thing instanceof TypedArray; + }; +})(typeof Uint8Array !== 'undefined' && getPrototypeOf(Uint8Array)); + +/** + * For each entry in the object, call the function with the key and value. + * + * @param {Object} obj - The object to iterate over. + * @param {Function} fn - The function to call for each entry. + * + * @returns {void} + */ +const forEachEntry = (obj, fn) => { + const generator = obj && obj[iterator]; + const _iterator = generator.call(obj); + let result; + while ((result = _iterator.next()) && !result.done) { + const pair = result.value; + fn.call(obj, pair[0], pair[1]); + } +}; + +/** + * It takes a regular expression and a string, and returns an array of all the matches + * + * @param {string} regExp - The regular expression to match against. + * @param {string} str - The string to search. + * + * @returns {Array} + */ +const matchAll = (regExp, str) => { + let matches; + const arr = []; + while ((matches = regExp.exec(str)) !== null) { + arr.push(matches); + } + return arr; +}; + +/* Checking if the kindOfTest function returns true when passed an HTMLFormElement. */ +const isHTMLForm = kindOfTest('HTMLFormElement'); +const toCamelCase = str => { + return str.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g, function replacer(m, p1, p2) { + return p1.toUpperCase() + p2; + }); +}; +const { + propertyIsEnumerable +} = Object.prototype; + +/** + * Determine if a value is a RegExp object + * + * @param {*} val The value to test + * + * @returns {boolean} True if value is a RegExp object, otherwise false + */ +const isRegExp = kindOfTest('RegExp'); +const reduceDescriptors = (obj, reducer) => { + const descriptors = Object.getOwnPropertyDescriptors(obj); + const reducedDescriptors = {}; + forEach(descriptors, (descriptor, name) => { + let ret; + if ((ret = reducer(descriptor, name, obj)) !== false) { + reducedDescriptors[name] = ret || descriptor; + } + }); + Object.defineProperties(obj, reducedDescriptors); +}; + +/** + * Makes all methods read-only + * @param {Object} obj + */ + +const freezeMethods = obj => { + reduceDescriptors(obj, (descriptor, name) => { + // skip restricted props in strict mode + if (isFunction$1(obj) && ['arguments', 'caller', 'callee'].includes(name)) { + return false; + } + const value = obj[name]; + if (!isFunction$1(value)) return; + descriptor.enumerable = false; + if ('writable' in descriptor) { + descriptor.writable = false; + return; + } + if (!descriptor.set) { + descriptor.set = () => { + throw Error("Can not rewrite read-only method '" + name + "'"); + }; + } + }); +}; + +/** + * Converts an array or a delimited string into an object set with values as keys and true as values. + * Useful for fast membership checks. + * + * @param {Array|string} arrayOrString - The array or string to convert. + * @param {string} delimiter - The delimiter to use if input is a string. + * @returns {Object} An object with keys from the array or string, values set to true. + */ +const toObjectSet = (arrayOrString, delimiter) => { + const obj = {}; + const define = arr => { + arr.forEach(value => { + obj[value] = true; + }); + }; + isArray(arrayOrString) ? define(arrayOrString) : define(String(arrayOrString).split(delimiter)); + return obj; +}; +const noop = () => {}; +const toFiniteNumber = (value, defaultValue) => { + return value != null && Number.isFinite(value = +value) ? value : defaultValue; +}; + +/** + * If the thing is a FormData object, return true, otherwise return false. + * + * @param {unknown} thing - The thing to check. + * + * @returns {boolean} + */ +function isSpecCompliantForm(thing) { + return !!(thing && isFunction$1(thing.append) && thing[toStringTag] === 'FormData' && thing[iterator]); +} + +/** + * Recursively converts an object to a JSON-compatible object, handling circular references and Buffers. + * + * @param {Object} obj - The object to convert. + * @returns {Object} The JSON-compatible object. + */ +const toJSONObject = obj => { + const visited = new WeakSet(); + const visit = source => { + if (isObject(source)) { + if (visited.has(source)) { + return; + } + + //Buffer check + if (isBuffer(source)) { + return source; + } + if (!('toJSON' in source)) { + // add-on descent / delete-on-ascent: preserves path semantics, so DAG nodes serialise at every occurrence (see #7230). + visited.add(source); + let target; + if (isSet(source)) { + target = []; + for (const value of source) { + const reducedValue = visit(value); + !isUndefined(reducedValue) && target.push(reducedValue); + } + } else { + target = isArray(source) ? [] : {}; + forEach(source, (value, key) => { + const reducedValue = visit(value); + !isUndefined(reducedValue) && (target[key] = reducedValue); + }); + } + visited.delete(source); + return target; + } + } + return source; + }; + return visit(obj); +}; + +/** + * Determines if a value is an async function. + * + * @param {*} thing - The value to test. + * @returns {boolean} True if value is an async function, otherwise false. + */ +const isAsyncFn = kindOfTest('AsyncFunction'); + +/** + * Determines if a value is thenable (has then and catch methods). + * + * @param {*} thing - The value to test. + * @returns {boolean} True if value is thenable, otherwise false. + */ +const isThenable = thing => thing && (isObject(thing) || isFunction$1(thing)) && isFunction$1(thing.then) && isFunction$1(thing.catch); + +// original code +// https://github.com/DigitalBrainJS/AxiosPromise/blob/16deab13710ec09779922131f3fa5954320f83ab/lib/utils.js#L11-L34 + +/** + * Provides a cross-platform setImmediate implementation. + * Uses native setImmediate if available, otherwise falls back to postMessage or setTimeout. + * + * @param {boolean} setImmediateSupported - Whether setImmediate is supported. + * @param {boolean} postMessageSupported - Whether postMessage is supported. + * @returns {Function} A function to schedule a callback asynchronously. + */ +const _setImmediate = ((setImmediateSupported, postMessageSupported) => { + if (setImmediateSupported) { + return setImmediate; + } + return postMessageSupported ? ((token, callbacks) => { + _global.addEventListener('message', ({ + source, + data + }) => { + if (source === _global && data === token) { + callbacks.length && callbacks.shift()(); + } + }, false); + return cb => { + callbacks.push(cb); + _global.postMessage(token, '*'); + }; + })(`axios@${Math.random()}`, []) : cb => setTimeout(cb); +})(typeof setImmediate === 'function', isFunction$1(_global.postMessage)); + +/** + * Schedules a microtask or asynchronous callback as soon as possible. + * Uses queueMicrotask if available, otherwise falls back to process.nextTick or _setImmediate. + * + * @type {Function} + */ +const asap = typeof queueMicrotask !== 'undefined' ? queueMicrotask.bind(_global) : typeof process !== 'undefined' && process.nextTick || _setImmediate; + +// ********************* + +const isIterable = thing => thing != null && isFunction$1(thing[iterator]); + +/** + * Determine if a value is iterable via an iterator that is NOT sourced solely + * from a polluted Object.prototype. Use this instead of `isIterable` whenever + * the iterable comes from untrusted input (e.g. user-supplied header sources), + * so `Object.prototype[Symbol.iterator] = ...` cannot turn an ordinary object + * into an attacker-controlled entries iterator. + * + * @param {*} thing The value to test + * + * @returns {boolean} True if value has a non-polluted iterator + */ +const isSafeIterable = thing => thing != null && hasOwnInPrototypeChain(thing, iterator) && isIterable(thing); +var utils$1 = { + isArray, + isArrayBuffer, + isBuffer, + isFormData, + isArrayBufferView, + isString, + isNumber, + isBoolean, + isObject, + isPlainObject, + isEmptyObject, + isReadableStream, + isRequest, + isResponse, + isHeaders, + isUndefined, + isDate, + isFile, + isReactNativeBlob, + isReactNative, + isBlob, + isRegExp, + isFunction: isFunction$1, + isStream, + isURLSearchParams, + isTypedArray, + isFileList, + forEach, + merge, + extend, + trim, + stripBOM, + inherits, + toFlatObject, + kindOf, + kindOfTest, + endsWith, + toArray, + forEachEntry, + matchAll, + isHTMLForm, + hasOwnProperty, + hasOwnProp: hasOwnProperty, + // an alias to avoid ESLint no-prototype-builtins detection + hasOwnInPrototypeChain, + getSafeProp, + toSafeFlatObject, + reduceDescriptors, + freezeMethods, + toObjectSet, + toCamelCase, + noop, + toFiniteNumber, + findKey, + global: _global, + isContextDefined, + isSpecCompliantForm, + toJSONObject, + isAsyncFn, + isThenable, + setImmediate: _setImmediate, + asap, + isIterable, + isSafeIterable +}; + +// RawAxiosHeaders whose duplicates are ignored by node +// c.f. https://nodejs.org/api/http.html#http_message_headers +const ignoreDuplicateOf = utils$1.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']); + +/** + * Parse headers into an object + * + * ``` + * Date: Wed, 27 Aug 2014 08:58:49 GMT + * Content-Type: application/json + * Connection: keep-alive + * Transfer-Encoding: chunked + * ``` + * + * @param {String} rawHeaders Headers needing to be parsed + * + * @returns {Object} Headers parsed into an object + */ +var parseHeaders = rawHeaders => { + // Header names are data, including __proto__; avoid inherited setters. + const parsed = Object.create(null); + let key; + let val; + let i; + rawHeaders && rawHeaders.split('\n').forEach(function parser(line) { + i = line.indexOf(':'); + key = line.substring(0, i).trim().toLowerCase(); + val = line.substring(i + 1).trim(); + const hasKey = utils$1.hasOwnProp(parsed, key); + if (!key || hasKey && utils$1.hasOwnProp(ignoreDuplicateOf, key)) { + return; + } + if (key === 'set-cookie') { + if (hasKey) { + parsed[key].push(val); + } else { + parsed[key] = [val]; + } + } else { + parsed[key] = hasKey ? parsed[key] + ', ' + val : val; + } + }); + return parsed; +}; + +function trimSPorHTAB(str) { + let start = 0; + let end = str.length; + while (start < end) { + const code = str.charCodeAt(start); + if (code !== 0x09 && code !== 0x20) { + break; + } + start += 1; + } + while (end > start) { + const code = str.charCodeAt(end - 1); + if (code !== 0x09 && code !== 0x20) { + break; + } + end -= 1; + } + return start === 0 && end === str.length ? str : str.slice(start, end); +} + +// The control-code ranges are intentional: header sanitization strips C0/DEL bytes. +// eslint-disable-next-line no-control-regex +const INVALID_UNICODE_HEADER_VALUE_CHARS = new RegExp('[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+', 'g'); +// eslint-disable-next-line no-control-regex +const INVALID_BYTE_STRING_HEADER_VALUE_CHARS = new RegExp('[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+', 'g'); +function sanitizeValue(value, invalidChars) { + if (utils$1.isArray(value)) { + return value.map(item => sanitizeValue(item, invalidChars)); + } + return trimSPorHTAB(String(value).replace(invalidChars, '')); +} +const sanitizeHeaderValue = value => sanitizeValue(value, INVALID_UNICODE_HEADER_VALUE_CHARS); +const sanitizeByteStringHeaderValue = value => sanitizeValue(value, INVALID_BYTE_STRING_HEADER_VALUE_CHARS); +function toByteStringHeaderObject(headers) { + const byteStringHeaders = Object.create(null); + utils$1.forEach(headers.toJSON(), (value, header) => { + byteStringHeaders[header] = sanitizeByteStringHeaderValue(value); + }); + return byteStringHeaders; +} + +const $internals$1 = Symbol('internals'); +function normalizeHeader(header) { + return header && String(header).trim().toLowerCase(); +} +function normalizeValue(value) { + if (value === false || value == null) { + return value; + } + return utils$1.isArray(value) ? value.map(normalizeValue) : sanitizeHeaderValue(String(value)); +} +function parseTokens(str) { + const tokens = Object.create(null); + const tokensRE = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g; + let match; + while (match = tokensRE.exec(str)) { + tokens[match[1]] = match[2]; + } + return tokens; +} +const parameterNameRE = /^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/; +function trimOWS(value) { + let start = 0; + let end = value.length; + while (start < end) { + const code = value.charCodeAt(start); + if (code !== 0x09 && code !== 0x20) { + break; + } + start += 1; + } + while (end > start) { + const code = value.charCodeAt(end - 1); + if (code !== 0x09 && code !== 0x20) { + break; + } + end -= 1; + } + return start === 0 && end === value.length ? value : value.slice(start, end); +} +function decodeQuotedString(value) { + const last = value.length - 1; + if (last < 1 || value.charCodeAt(0) !== 0x22 || value.charCodeAt(last) !== 0x22) { + return value; + } + let decoded = ''; + for (let i = 1; i < last; i++) { + const code = value.charCodeAt(i); + if (code === 0x22) { + return value; + } + if (code === 0x5c) { + i += 1; + if (i >= last) { + return value; + } + } + decoded += value[i]; + } + return decoded; +} +function parseParameters(value) { + const parameters = Object.create(null); + const str = String(value); + let start = 0; + let quoted = false; + let escaped = false; + function parseParameter(end) { + const part = trimOWS(str.slice(start, end)); + const equals = part.indexOf('='); + if (equals < 1) { + return; + } + const name = trimOWS(part.slice(0, equals)); + if (!parameterNameRE.test(name)) { + return; + } + const normalizedName = name.toLowerCase(); + if (normalizedName === '__proto__' || normalizedName === 'constructor' || normalizedName === 'prototype') { + return; + } + const parameterValue = trimOWS(part.slice(equals + 1)); + parameters[normalizedName] = decodeQuotedString(parameterValue); + } + for (let i = 0; i < str.length; i++) { + const code = str.charCodeAt(i); + if (quoted) { + if (escaped) { + escaped = false; + } else if (code === 0x5c) { + escaped = true; + } else if (code === 0x22) { + quoted = false; + } + } else if (code === 0x22) { + quoted = true; + } else if (code === 0x2c || code === 0x3b) { + parseParameter(i); + start = i + 1; + } + } + parseParameter(str.length); + return parameters; +} +const isValidHeaderName = str => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim()); + +// `__proto__` is a valid field name, and the one name the uppercase mapping at +// the bottom of this file cannot reach: it is inherited from Object.prototype +// instead of being declared on AxiosHeaders.prototype, so `self.__proto__ = v` +// runs the inherited setter. That silently discards the header, and an array +// value replaces the instance prototype, taking every method with it. +// Store it under the same kind of case variant that mapping uses for `set` and +// `constructor`. Header lookup is caseless, so it reads back under either +// spelling, and no own `__proto__` slot is ever created for a later +// `Object.assign` to copy onto a plain object through the same setter. +const PROTO_HEADER_SLOT = '__Proto__'; +const headerSlot = name => name === '__proto__' ? PROTO_HEADER_SLOT : name; +function matchHeaderValue(context, value, header, filter, isHeaderNameFilter) { + if (utils$1.isFunction(filter)) { + return filter.call(context, value, header); + } + if (isHeaderNameFilter) { + value = header; + } + if (!utils$1.isString(value)) return; + if (utils$1.isString(filter)) { + return value.indexOf(filter) !== -1; + } + if (utils$1.isRegExp(filter)) { + return filter.test(value); + } +} +function formatHeader(header) { + return header.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (w, char, str) => { + return char.toUpperCase() + str; + }); +} +function buildAccessors(obj, header) { + const accessorName = utils$1.toCamelCase(' ' + header); + ['get', 'set', 'has'].forEach(methodName => { + Object.defineProperty(obj, methodName + accessorName, { + // Null-proto descriptor so a polluted Object.prototype.get cannot turn + // this data descriptor into an accessor descriptor on the way in. + __proto__: null, + value: function (arg1, arg2, arg3) { + return this[methodName].call(this, header, arg1, arg2, arg3); + }, + configurable: true + }); + }); +} +class AxiosHeaders { + constructor(headers) { + headers && this.set(headers); + } + set(header, valueOrRewrite, rewrite) { + const self = this; + function setHeader(_value, _header, _rewrite) { + const lHeader = normalizeHeader(_header); + if (!lHeader) { + return; + } + const key = utils$1.findKey(self, lHeader); + if (!key || self[key] === undefined || _rewrite === true || _rewrite === undefined && self[key] !== false) { + self[headerSlot(key || _header)] = normalizeValue(_value); + } + } + const setHeaders = (headers, _rewrite) => utils$1.forEach(headers, (_value, _header) => setHeader(_value, _header, _rewrite)); + if (utils$1.isPlainObject(header) || header instanceof this.constructor) { + setHeaders(header, valueOrRewrite); + } else if (utils$1.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) { + setHeaders(parseHeaders(header), valueOrRewrite); + } else if (utils$1.isObject(header) && utils$1.isSafeIterable(header)) { + let obj = Object.create(null), + dest, + key; + for (const entry of header) { + if (!utils$1.isArray(entry)) { + throw new TypeError('Object iterator must return a key-value pair'); + } + key = entry[0]; + if (utils$1.hasOwnProp(obj, key)) { + dest = obj[key]; + obj[key] = utils$1.isArray(dest) ? [...dest, entry[1]] : [dest, entry[1]]; + } else { + obj[key] = entry[1]; + } + } + setHeaders(obj, valueOrRewrite); + } else { + header != null && setHeader(valueOrRewrite, header, rewrite); + } + return this; + } + get(header, parser) { + header = normalizeHeader(header); + if (header) { + const key = utils$1.findKey(this, header); + if (key) { + const value = this[key]; + if (!parser) { + return value; + } + if (parser === true) { + return parseTokens(value); + } + if (utils$1.isFunction(parser)) { + return parser.call(this, value, key); + } + if (utils$1.isRegExp(parser)) { + return parser.exec(value); + } + throw new TypeError('parser must be boolean|regexp|function'); + } + } + } + has(header, matcher) { + header = normalizeHeader(header); + if (header) { + const key = utils$1.findKey(this, header); + return !!(key && this[key] !== undefined && (!matcher || matchHeaderValue(this, this[key], key, matcher))); + } + return false; + } + delete(header, matcher) { + const self = this; + let deleted = false; + function deleteHeader(_header) { + _header = normalizeHeader(_header); + if (_header) { + const key = utils$1.findKey(self, _header); + if (key && (!matcher || matchHeaderValue(self, self[key], key, matcher))) { + delete self[key]; + deleted = true; + } + } + } + if (utils$1.isArray(header)) { + header.forEach(deleteHeader); + } else { + deleteHeader(header); + } + return deleted; + } + clear(matcher) { + const keys = Object.keys(this); + let i = keys.length; + let deleted = false; + while (i--) { + const key = keys[i]; + if (!matcher || matchHeaderValue(this, this[key], key, matcher, true)) { + delete this[key]; + deleted = true; + } + } + return deleted; + } + normalize(format) { + const self = this; + const headers = Object.create(null); + utils$1.forEach(this, (value, header) => { + const key = utils$1.findKey(headers, header); + if (key) { + self[key] = normalizeValue(value); + delete self[header]; + return; + } + const normalized = headerSlot(format ? formatHeader(header) : String(header).trim()); + if (normalized !== header) { + delete self[header]; + } + self[normalized] = normalizeValue(value); + headers[normalized] = true; + }); + return this; + } + concat(...targets) { + return this.constructor.concat(this, ...targets); + } + toJSON(asStrings) { + const obj = Object.create(null); + utils$1.forEach(this, (value, header) => { + value != null && value !== false && (obj[header] = asStrings && utils$1.isArray(value) ? value.join(', ') : value); + }); + return obj; + } + [Symbol.iterator]() { + return Object.entries(this.toJSON())[Symbol.iterator](); + } + toString() { + return Object.entries(this.toJSON()).map(([header, value]) => header + ': ' + value).join('\n'); + } + getSetCookie() { + const value = this.get('set-cookie'); + return utils$1.isArray(value) ? value : value == null || value === false ? [] : [value]; + } + get [Symbol.toStringTag]() { + return 'AxiosHeaders'; + } + static from(thing) { + return thing instanceof this ? thing : new this(thing); + } + static parseParameters(value) { + return parseParameters(value); + } + static concat(first, ...targets) { + const computed = new this(first); + targets.forEach(target => computed.set(target)); + return computed; + } + static accessor(header) { + const internals = this[$internals$1] = this[$internals$1] = { + accessors: {} + }; + const accessors = internals.accessors; + const prototype = this.prototype; + function defineAccessor(_header) { + const lHeader = normalizeHeader(_header); + if (!accessors[lHeader]) { + buildAccessors(prototype, _header); + accessors[lHeader] = true; + } + } + utils$1.isArray(header) ? header.forEach(defineAccessor) : defineAccessor(header); + return this; + } +} +AxiosHeaders.accessor(['Content-Type', 'Content-Length', 'Accept', 'Accept-Encoding', 'User-Agent', 'Authorization']); + +// reserved names hotfix +utils$1.reduceDescriptors(AxiosHeaders.prototype, ({ + value +}, key) => { + let mapped = key[0].toUpperCase() + key.slice(1); // map `set` => `Set` + return { + get: () => value, + set(headerValue) { + this[mapped] = headerValue; + } + }; +}); +utils$1.freezeMethods(AxiosHeaders); + +const REDACTED = '[REDACTED ****]'; +function hasOwnOrPrototypeToJSON(source) { + if (utils$1.hasOwnProp(source, 'toJSON')) { + return true; + } + let prototype = Object.getPrototypeOf(source); + while (prototype && prototype !== Object.prototype) { + if (utils$1.hasOwnProp(prototype, 'toJSON')) { + return true; + } + prototype = Object.getPrototypeOf(prototype); + } + return false; +} + +// Build a plain-object snapshot of `config` and replace the value of any key +// (case-insensitive) listed in `redactKeys` with REDACTED. Walks through arrays +// and AxiosHeaders, and short-circuits on circular references. +function redactConfig(config, redactKeys) { + const lowerKeys = new Set(redactKeys.map(k => String(k).toLowerCase())); + const seen = []; + const visit = source => { + if (source === null || typeof source !== 'object') return source; + if (utils$1.isBuffer(source)) return source; + if (seen.indexOf(source) !== -1) return undefined; + if (source instanceof AxiosHeaders) { + source = source.toJSON(); + } + seen.push(source); + let result; + if (utils$1.isArray(source)) { + result = []; + source.forEach((v, i) => { + const reducedValue = visit(v); + if (!utils$1.isUndefined(reducedValue)) { + result[i] = reducedValue; + } + }); + } else { + if (!utils$1.isPlainObject(source) && hasOwnOrPrototypeToJSON(source)) { + seen.pop(); + return source; + } + result = Object.create(null); + for (const [key, value] of Object.entries(source)) { + const reducedValue = lowerKeys.has(key.toLowerCase()) ? REDACTED : visit(value); + if (!utils$1.isUndefined(reducedValue)) { + result[key] = reducedValue; + } + } + } + seen.pop(); + return result; + }; + return visit(config); +} +function stringifySafely$1(value) { + try { + return String(value); + } catch (err) { + return ''; + } +} +function aggregateErrorMessage(error) { + const message = error.errors.map(entry => { + try { + return entry && entry.message ? stringifySafely$1(entry.message) : stringifySafely$1(entry); + } catch (err) { + return ''; + } + }).filter(Boolean).join('; '); + return message || error.name || 'AggregateError'; +} + +// Shared with `Axios.prototype.request`, which splices the reconstructed +// caller frames in ahead of this marker. +const CAUSED_BY_SEPARATOR = '\nCaused by: '; +const $causeStack = Symbol('causeStack'); + +// Match the section we appended, not marker-like text in an error message or +// a replacement stack supplied by the caller. Do not re-read the cause's stack. +function getCauseStackIndex(error, stack) { + const causeStack = utils$1.hasOwnProp(error, $causeStack) && error[$causeStack]; + return causeStack && stack.endsWith(causeStack) ? stack.length - causeStack.length : -1; +} + +/** + * Append the stack of a wrapped error to `target.stack`. + * + * `cause` already exposes the original error for tooling that walks the standard + * cause chain, but many error reporters read `stack` and nothing else. Inlining + * the wrapped stack there means those reporters surface the underlying failure + * instead of the axios frames that normalized it (see #6670). + * + * Every read is defensive: a custom `Error.prepareStackTrace` hook, a runtime + * without stack support, or a replaced `stack` property can leave the value + * missing, non-string, or read-only, and normalizing an error must not throw + * because of that. + * + * @param {Error} target The AxiosError being built. + * @param {Error} source The error being wrapped. + * + * @returns {void} + */ +function appendCauseStack(target, source) { + try { + const sourceStack = source && source.stack; + if (typeof sourceStack !== 'string' || !sourceStack) { + return; + } + const targetStack = target.stack; + if (typeof targetStack !== 'string' || !targetStack) { + return; + } + + // Each call to `from()` creates a fresh target. Re-wrapping includes the + // previous stack verbatim, adding one cause section per wrap. + const causeStack = CAUSED_BY_SEPARATOR + sourceStack; + target.stack = targetStack + causeStack; + Object.defineProperty(target, $causeStack, { + __proto__: null, + value: causeStack + }); + } catch (e) { + // Ignore failures from custom stack hooks or un-writable stack properties. + } +} +class AxiosError extends Error { + static from(error, code, config, request, response, customProps) { + // `AggregateError` (thrown by Node on dual-stack/Happy-Eyeballs connection + // failures) has an empty `message`; its detail lives in `errors[]`. Without + // this, the wrapped error surfaces with a blank message (see #6721). + let message = error.message; + if (!message && utils$1.isArray(error.errors) && error.errors.length) { + message = aggregateErrorMessage(error); + } + const axiosError = new AxiosError(message, code || error.code, config, request, response); + // Match native `Error` `cause` semantics: non-enumerable. The wrapped + // error often carries circular internals (sockets, requests, agents), so + // an enumerable `cause` makes structured loggers (pino/winston) and any + // own-property walk throw "Converting circular structure to JSON". + // Regression from #6982; see #7205. `__proto__: null` mirrors the + // `message` descriptor below (prototype-pollution-safe descriptor). + Object.defineProperty(axiosError, 'cause', { + __proto__: null, + value: error, + writable: true, + enumerable: false, + configurable: true + }); + axiosError.name = error.name; + + // Inline the wrapped stack for reporters that read only `stack`; the `cause` + // property above already covers cause-aware tooling. + appendCauseStack(axiosError, error); + + // Preserve status from the original error if not already set from response + if (error.status != null && axiosError.status == null) { + axiosError.status = error.status; + } + customProps && Object.assign(axiosError, customProps); + return axiosError; + } + + /** + * Create an Error with the specified message, config, error code, request and response. + * + * @param {string} message The error message. + * @param {string} [code] The error code (for example, 'ECONNABORTED'). + * @param {Object} [config] The config. + * @param {Object} [request] The request. + * @param {Object} [response] The response. + * + * @returns {Error} The created error. + */ + constructor(message, code, config, request, response) { + super(message); + + // Make message enumerable to maintain backward compatibility + // The native Error constructor sets message as non-enumerable, + // but axios < v1.13.3 had it as enumerable + Object.defineProperty(this, 'message', { + // Null-proto descriptor so a polluted Object.prototype.get cannot turn + // this data descriptor into an accessor descriptor on the way in. + __proto__: null, + value: message, + enumerable: true, + writable: true, + configurable: true + }); + this.name = 'AxiosError'; + this.isAxiosError = true; + code && (this.code = code); + config && (this.config = config); + request && (this.request = request); + if (response) { + this.response = response; + this.status = response.status; + } + } + toJSON() { + // Opt-in redaction: when the request config carries a `redact` array, the + // value of any matching key (case-insensitive, at any depth) is replaced + // with REDACTED in the serialized snapshot. Undefined or empty leaves the + // existing serialization behavior unchanged. + const config = this.config; + const redactKeys = config && utils$1.hasOwnProp(config, 'redact') ? config.redact : undefined; + const serializedConfig = utils$1.isArray(redactKeys) && redactKeys.length > 0 ? redactConfig(config, redactKeys) : utils$1.toJSONObject(config); + return { + // Standard + message: this.message, + name: this.name, + // Microsoft + description: this.description, + number: this.number, + // Mozilla + fileName: this.fileName, + lineNumber: this.lineNumber, + columnNumber: this.columnNumber, + stack: this.stack, + // Axios + config: serializedConfig, + code: this.code, + status: this.status + }; + } +} + +// This can be changed to static properties as soon as the parser options in .eslint.cjs are updated. +AxiosError.ERR_BAD_OPTION_VALUE = 'ERR_BAD_OPTION_VALUE'; +AxiosError.ERR_BAD_OPTION = 'ERR_BAD_OPTION'; +AxiosError.ECONNABORTED = 'ECONNABORTED'; +AxiosError.ETIMEDOUT = 'ETIMEDOUT'; +AxiosError.ECONNREFUSED = 'ECONNREFUSED'; +AxiosError.ERR_NETWORK = 'ERR_NETWORK'; +AxiosError.ERR_FR_TOO_MANY_REDIRECTS = 'ERR_FR_TOO_MANY_REDIRECTS'; +AxiosError.ERR_DEPRECATED = 'ERR_DEPRECATED'; +AxiosError.ERR_BAD_RESPONSE = 'ERR_BAD_RESPONSE'; +AxiosError.ERR_BAD_REQUEST = 'ERR_BAD_REQUEST'; +AxiosError.ERR_CANCELED = 'ERR_CANCELED'; +AxiosError.ERR_NOT_SUPPORT = 'ERR_NOT_SUPPORT'; +AxiosError.ERR_INVALID_URL = 'ERR_INVALID_URL'; +AxiosError.ERR_FORM_DATA_DEPTH_EXCEEDED = 'ERR_FORM_DATA_DEPTH_EXCEEDED'; + +var PlatformBuffer = { + isBufferAvailable() { + return typeof Buffer !== 'undefined'; + }, + from(value) { + return Buffer.from(value); + } +}; + +// Default nesting limit shared with the inverse transform (formDataToJSON) so +// the FormData <-> JSON round-trip stays symmetric. +const DEFAULT_FORM_DATA_MAX_DEPTH = 100; + +/** + * Determines if the given thing is a array or js object. + * + * @param {string} thing - The object or array to be visited. + * + * @returns {boolean} + */ +function isVisitable(thing) { + return utils$1.isPlainObject(thing) || utils$1.isArray(thing); +} + +/** + * It removes the brackets from the end of a string + * + * @param {string} key - The key of the parameter. + * + * @returns {string} the key without the brackets. + */ +function removeBrackets(key) { + return utils$1.endsWith(key, '[]') ? key.slice(0, -2) : key; +} + +/** + * It takes a path, a key, and a boolean, and returns a string + * + * @param {string} path - The path to the current key. + * @param {string} key - The key of the current object being iterated over. + * @param {string} dots - If true, the key will be rendered with dots instead of brackets. + * + * @returns {string} The path to the current key. + */ +function renderKey(path, key, dots) { + if (!path) return key; + return path.concat(key).map(function each(token, i) { + // eslint-disable-next-line no-param-reassign + token = removeBrackets(token); + return !dots && i ? '[' + token + ']' : token; + }).join(dots ? '.' : ''); +} + +/** + * If the array is an array and none of its elements are visitable, then it's a flat array. + * + * @param {Array} arr - The array to check + * + * @returns {boolean} + */ +function isFlatArray(arr) { + return utils$1.isArray(arr) && !arr.some(isVisitable); +} +const predicates = utils$1.toFlatObject(utils$1, {}, null, function filter(prop) { + return /^is[A-Z]/.test(prop); +}); + +/** + * Convert a data object to FormData + * + * @param {Object} obj + * @param {?Object} [formData] + * @param {?Object} [options] + * @param {Function} [options.visitor] + * @param {Boolean} [options.metaTokens = true] + * @param {Boolean} [options.dots = false] + * @param {?Boolean} [options.indexes = false] + * + * @returns {Object} + **/ + +/** + * It converts an object into a FormData object + * + * @param {Object} obj - The object to convert to form data. + * @param {string} formData - The FormData object to append to. + * @param {Object} options + * + * @returns + */ +function toFormData(obj, formData, options) { + if (!utils$1.isObject(obj)) { + throw new TypeError('target must be an object'); + } + + // eslint-disable-next-line no-param-reassign + formData = formData || new (FormData$1 || FormData)(); + const option = (name, fallback) => { + const value = utils$1.getSafeProp(options, name); + return utils$1.isUndefined(value) ? fallback : value; + }; + const metaTokens = option('metaTokens', true); + // eslint-disable-next-line no-use-before-define + const visitor = option('visitor') || defaultVisitor; + const dots = option('dots', false); + const indexes = option('indexes', false); + const _Blob = option('Blob') || typeof Blob !== 'undefined' && Blob; + const maxDepth = option('maxDepth', DEFAULT_FORM_DATA_MAX_DEPTH); + const useBlob = _Blob && utils$1.isSpecCompliantForm(formData); + const stack = []; + if (!utils$1.isFunction(visitor)) { + throw new TypeError('visitor must be a function'); + } + function convertValue(value) { + if (value === null) return ''; + if (utils$1.isDate(value)) { + return value.toISOString(); + } + if (utils$1.isBoolean(value)) { + return value.toString(); + } + if (!useBlob && utils$1.isBlob(value)) { + throw new AxiosError('Blob is not supported. Use a Buffer instead.'); + } + if (utils$1.isArrayBuffer(value) || utils$1.isTypedArray(value)) { + if (useBlob && typeof _Blob === 'function') { + return new _Blob([value]); + } + if (PlatformBuffer && PlatformBuffer.isBufferAvailable()) { + return PlatformBuffer.from(value); + } + throw new AxiosError('Blob is not supported. Use a Buffer instead.', AxiosError.ERR_NOT_SUPPORT); + } + return value; + } + function throwIfMaxDepthExceeded(depth) { + if (depth > maxDepth) { + throw new AxiosError('Object is too deeply nested (' + depth + ' levels). Max depth: ' + maxDepth, AxiosError.ERR_FORM_DATA_DEPTH_EXCEEDED); + } + } + function stringifyWithDepthLimit(value, depth) { + if (maxDepth === Infinity) { + return JSON.stringify(value); + } + const ancestors = []; + return JSON.stringify(value, function limitDepth(_key, currentValue) { + if (!utils$1.isObject(currentValue)) { + return currentValue; + } + while (ancestors.length && ancestors[ancestors.length - 1] !== this) { + ancestors.pop(); + } + ancestors.push(currentValue); + throwIfMaxDepthExceeded(depth + ancestors.length - 1); + return currentValue; + }); + } + + /** + * Default visitor. + * + * @param {*} value + * @param {String|Number} key + * @param {Array} path + * @this {FormData} + * + * @returns {boolean} return true to visit the each prop of the value recursively + */ + function defaultVisitor(value, key, path) { + let arr = value; + if (utils$1.isReactNative(formData) && utils$1.isReactNativeBlob(value)) { + formData.append(renderKey(path, key, dots), convertValue(value)); + return false; + } + if (value && !path && typeof value === 'object') { + if (utils$1.endsWith(key, '{}')) { + // eslint-disable-next-line no-param-reassign + key = metaTokens ? key : key.slice(0, -2); + // eslint-disable-next-line no-param-reassign + value = stringifyWithDepthLimit(value, 1); + } else if (utils$1.isArray(value) && isFlatArray(value) || (utils$1.isFileList(value) || utils$1.endsWith(key, '[]')) && (arr = utils$1.toArray(value))) { + // eslint-disable-next-line no-param-reassign + key = removeBrackets(key); + arr.forEach(function each(el, index) { + !(utils$1.isUndefined(el) || el === null) && formData.append( + // eslint-disable-next-line no-nested-ternary + indexes === true ? renderKey([key], index, dots) : indexes === null ? key : key + '[]', convertValue(el)); + }); + return false; + } + } + if (isVisitable(value)) { + return true; + } + formData.append(renderKey(path, key, dots), convertValue(value)); + return false; + } + const exposedHelpers = Object.assign(predicates, { + defaultVisitor, + convertValue, + isVisitable + }); + function build(value, path, depth = 0) { + if (utils$1.isUndefined(value)) return; + throwIfMaxDepthExceeded(depth); + if (stack.indexOf(value) !== -1) { + throw new Error('Circular reference detected in ' + path.join('.')); + } + stack.push(value); + utils$1.forEach(value, function each(el, key) { + const result = !(utils$1.isUndefined(el) || el === null) && visitor.call(formData, el, utils$1.isString(key) ? key.trim() : key, path, exposedHelpers); + if (result === true) { + build(el, path ? path.concat(key) : [key], depth + 1); + } + }); + stack.pop(); + } + if (!utils$1.isObject(obj)) { + throw new TypeError('data must be an object'); + } + build(obj); + return formData; +} + +/** + * It encodes a string by replacing all characters that are not in the unreserved set with + * their percent-encoded equivalents + * + * @param {string} str - The string to encode. + * + * @returns {string} The encoded string. + */ +function encode$1(str) { + const charMap = { + '!': '%21', + "'": '%27', + '(': '%28', + ')': '%29', + '~': '%7E', + '%20': '+' + }; + return encodeURIComponent(str).replace(/[!'()~]|%20/g, function replacer(match) { + return charMap[match]; + }); +} + +/** + * It takes a params object and converts it to a FormData object + * + * @param {Object} params - The parameters to be converted to a FormData object. + * @param {Object} options - The options object passed to the Axios constructor. + * + * @returns {void} + */ +function AxiosURLSearchParams(params, options) { + this._pairs = []; + params && toFormData(params, this, options); +} +const prototype = AxiosURLSearchParams.prototype; +prototype.append = function append(name, value) { + this._pairs.push([name, value]); +}; +prototype.toString = function toString(encoder) { + const _encode = encoder ? value => encoder.call(this, value, encode$1) : encode$1; + return this._pairs.map(function each(pair) { + return _encode(pair[0]) + '=' + _encode(pair[1]); + }, '').join('&'); +}; + +/** + * It replaces URL-encoded forms of `:`, `$`, `,`, and spaces with + * their plain counterparts (`:`, `$`, `,`, `+`). + * + * @param {string} val The value to be encoded. + * + * @returns {string} The encoded value. + */ +function encode(val) { + return encodeURIComponent(val).replace(/%3A/gi, ':').replace(/%24/g, '$').replace(/%2C/gi, ',').replace(/%20/g, '+'); +} + +/** + * Build a URL by appending params to the end + * + * @param {string} url The base of the url (e.g., http://www.google.com) + * @param {object} [params] The params to be appended + * @param {?(object|Function)} options + * + * @returns {string} The formatted url + */ +function buildURL(url, params, options) { + if (!params) { + return url; + } + url = url || ''; + const _options = utils$1.isFunction(options) ? { + serialize: options + } : options; + + // Read serializer options pollution-safely: own properties and methods on a + // class/template prototype are honored, but values injected onto a polluted + // Object.prototype are ignored. + const _encode = utils$1.getSafeProp(_options, 'encode') || encode; + const serializeFn = utils$1.getSafeProp(_options, 'serialize'); + let serializedParams; + if (serializeFn) { + serializedParams = serializeFn(params, _options); + } else { + serializedParams = utils$1.isURLSearchParams(params) ? params.toString() : new AxiosURLSearchParams(params, _options).toString(_encode); + } + if (serializedParams) { + const hashmarkIndex = url.indexOf('#'); + if (hashmarkIndex !== -1) { + url = url.slice(0, hashmarkIndex); + } + url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams; + } + return url; +} + +const $internals = Symbol('internals'); + +// `handlers` is public and may be replaced with a nullish value by user code; +// `clear()` has always tolerated that. Treat it as an empty stack rather than +// dereferencing it. +function countHandlers(handlers) { + return handlers ? handlers.length : 0; +} +function trimHandlers(handlers) { + if (!handlers) { + return; + } + while (handlers.length && handlers[handlers.length - 1] === null) { + handlers.pop(); + } +} + +// Preserve the array-key coercion used before IDs were stored in a Map, without +// treating null, empty strings, or noncanonical numeric strings as ID zero. +function normalizeHandlerId(id) { + if (typeof id === 'string' && id !== '' && String(Number(id)) === id) { + return Number(id); + } + return id; +} +function syncHandlerEntries(manager, internals) { + const handlers = manager.handlers; + const length = countHandlers(handlers); + if (handlers !== internals.handlersRef) { + internals.handlersRef = handlers; + internals.handlerEntries.clear(); + } else if (length !== internals.handlersLength) { + if (!length) { + internals.handlerEntries.clear(); + } else { + internals.handlerEntries.forEach(function removeStaleEntry(entry, id) { + if (handlers[entry.index] !== entry.handler) { + internals.handlerEntries.delete(id); + } + }); + } + } + internals.handlersLength = length; +} +class InterceptorManager { + constructor() { + this.handlers = []; + this[$internals] = { + handlersRef: this.handlers, + handlersLength: this.handlers.length, + handlerEntries: new Map(), + iterationDepth: 0, + nextId: 0 + }; + } + + /** + * Add a new interceptor to the stack + * + * @param {Function} fulfilled The function to handle `then` for a `Promise` + * @param {Function} rejected The function to handle `reject` for a `Promise` + * @param {Object} options The options for the interceptor, synchronous and runWhen + * + * @return {Number} An ID used to remove interceptor later + */ + use(fulfilled, rejected, options) { + const handler = { + fulfilled, + rejected, + synchronous: options ? options.synchronous : false, + runWhen: options ? options.runWhen : null + }; + const internals = this[$internals]; + if (this.handlers == null) { + this.handlers = []; + } + syncHandlerEntries(this, internals); + const id = internals.nextId++; + this.handlers.push(handler); + internals.handlerEntries.set(id, { + handler, + index: this.handlers.length - 1 + }); + internals.handlersLength = this.handlers.length; + return id; + } + + /** + * Remove an interceptor from the stack + * + * @param {Number} id The ID that was returned by `use` + * + * @returns {void} + */ + eject(id) { + const internals = this[$internals]; + syncHandlerEntries(this, internals); + const handlerId = normalizeHandlerId(id); + const entry = internals.handlerEntries.get(handlerId); + if (entry) { + internals.handlerEntries.delete(handlerId); + + // Ignore IDs invalidated by clear or direct replacement of handlers. + if (this.handlers[entry.index] !== entry.handler) { + return; + } + this.handlers[entry.index] = null; + + // Do not reuse an index while forEach is walking its length snapshot. + if (!internals.iterationDepth) { + trimHandlers(this.handlers); + internals.handlersLength = this.handlers.length; + } + } + } + + /** + * Clear all interceptors from the stack + * + * @returns {void} + */ + clear() { + if (this.handlers) { + this.handlers = []; + syncHandlerEntries(this, this[$internals]); + } + } + + /** + * Iterate over all the registered interceptors + * + * This method is particularly useful for skipping over any + * interceptors that may have become `null` calling `eject`. + * + * @param {Function} fn The function to call for each interceptor + * + * @returns {void} + */ + forEach(fn) { + const internals = this[$internals]; + syncHandlerEntries(this, internals); + internals.iterationDepth++; + try { + utils$1.forEach(this.handlers, function forEachHandler(h) { + if (h !== null) { + fn(h); + } + }); + } finally { + if (! --internals.iterationDepth) { + syncHandlerEntries(this, internals); + trimHandlers(this.handlers); + internals.handlersLength = countHandlers(this.handlers); + } + } + } +} + +var transitionalDefaults = { + silentJSONParsing: true, + forcedJSONParsing: true, + clarifyTimeoutError: false, + legacyInterceptorReqResOrdering: true, + advertiseZstdAcceptEncoding: false, + validateStatusUndefinedResolves: true, + encodeBasicAuthUsername: false +}; + +var URLSearchParams = url.URLSearchParams; + +const ALPHA = 'abcdefghijklmnopqrstuvwxyz'; +const DIGIT = '0123456789'; +const ALPHABET = { + DIGIT, + ALPHA, + ALPHA_DIGIT: ALPHA + ALPHA.toUpperCase() + DIGIT +}; +const generateString = (size = 16, alphabet = ALPHABET.ALPHA_DIGIT) => { + let str = ''; + const { + length + } = alphabet; + const randomValues = new Uint32Array(size); + crypto.randomFillSync(randomValues); + for (let i = 0; i < size; i++) { + str += alphabet[randomValues[i] % length]; + } + return str; +}; +var platform$1 = { + isNode: true, + classes: { + URLSearchParams, + FormData: FormData$1, + Blob: typeof Blob !== 'undefined' && Blob || null + }, + ALPHABET, + generateString, + protocols: ['http', 'https', 'file', 'data'] +}; + +const hasBrowserEnv = typeof window !== 'undefined' && typeof document !== 'undefined'; +const _navigator = typeof navigator === 'object' && navigator || undefined; + +/** + * Determine if we're running in a standard browser environment + * + * This allows axios to run in a web worker, and react-native. + * Both environments support XMLHttpRequest, but not fully standard globals. + * + * web workers: + * typeof window -> undefined + * typeof document -> undefined + * + * react-native: + * navigator.product -> 'ReactNative' + * nativescript + * navigator.product -> 'NativeScript' or 'NS' + * + * @returns {boolean} + */ +const hasStandardBrowserEnv = hasBrowserEnv && (!_navigator || ['ReactNative', 'NativeScript', 'NS'].indexOf(_navigator.product) < 0); + +/** + * Determine if we're running in a standard browser webWorker environment + * + * Although the `isStandardBrowserEnv` method indicates that + * `allows axios to run in a web worker`, the WebWorker will still be + * filtered out due to its judgment standard + * `typeof window !== 'undefined' && typeof document !== 'undefined'`. + * This leads to a problem when axios post `FormData` in webWorker + */ +const hasStandardBrowserWebWorkerEnv = (() => { + return typeof WorkerGlobalScope !== 'undefined' && + // eslint-disable-next-line no-undef + self instanceof WorkerGlobalScope && typeof self.importScripts === 'function'; +})(); +const origin = hasBrowserEnv && window.location.href || 'http://localhost'; + +var utils = /*#__PURE__*/Object.freeze({ + __proto__: null, + hasBrowserEnv: hasBrowserEnv, + hasStandardBrowserEnv: hasStandardBrowserEnv, + hasStandardBrowserWebWorkerEnv: hasStandardBrowserWebWorkerEnv, + navigator: _navigator, + origin: origin +}); + +var platform = { + ...utils, + ...platform$1 +}; + +function toURLEncodedForm(data, options) { + return toFormData(data, new platform.classes.URLSearchParams(), { + visitor: function (value, key, path, helpers) { + if (platform.isNode && utils$1.isBuffer(value)) { + this.append(key, value.toString('base64')); + return false; + } + return helpers.defaultVisitor.apply(this, arguments); + }, + ...options + }); +} + +const MAX_DEPTH = DEFAULT_FORM_DATA_MAX_DEPTH; +function throwIfDepthExceeded(index) { + if (index > MAX_DEPTH) { + throw new AxiosError('FormData field is too deeply nested (' + index + ' levels). Max depth: ' + MAX_DEPTH, AxiosError.ERR_FORM_DATA_DEPTH_EXCEEDED); + } +} + +/** + * It takes a string like `foo[x][y][z]` and returns an array like `['foo', 'x', 'y', 'z'] + * + * @param {string} name - The name of the property to get. + * + * @returns An array of strings. + */ +function parsePropPath(name) { + // foo[x][y][z] -> ['foo', 'x', 'y', 'z'] + // foo.x.y.z -> ['foo', 'x', 'y', 'z'] + // A path is split on `.` and on `[...]` groups. A segment — whether written + // in dot notation or captured inside brackets — may contain any character + // except `.`, `[` and `]`, so a key like `user-name` or `user name` is kept + // literal instead of being split (#5402). `.`, `[` and `]` keep their existing + // meaning, e.g. `foo[bar.baz]` -> ['foo', 'bar', 'baz'] and `[]` is an array push. + // Excluding `[` from the bracket group also makes the match fail fast at the + // next `[`, so a malformed name cannot rescan to the end of the string from + // every unmatched `[` — parsing stays linear in the length of the name. + const path = []; + const pattern = /[^.[\]]+|\[([^.[\]]*)]/g; + let match; + while ((match = pattern.exec(name)) !== null) { + throwIfDepthExceeded(path.length); + path.push(match[0] === '[]' ? '' : match[1] || match[0]); + } + return path; +} + +/** + * Convert an array to an object. + * + * @param {Array} arr - The array to convert to an object. + * + * @returns An object with the same keys and values as the array. + */ +function arrayToObject(arr) { + const obj = {}; + const keys = Object.keys(arr); + let i; + const len = keys.length; + let key; + for (i = 0; i < len; i++) { + key = keys[i]; + obj[key] = arr[key]; + } + return obj; +} +function normalizeArray(value) { + if (!utils$1.isArray(value)) return value; + const keys = Object.keys(value); + return keys.length !== value.length || keys.some((key, index) => key !== String(index)) ? arrayToObject(value) : value; +} +function normalizeArrays(obj) { + const pending = [obj]; + while (pending.length) { + const target = pending.pop(); + Object.keys(target).forEach(key => { + const value = target[key] = normalizeArray(target[key]); + if (utils$1.isArray(value) || utils$1.isPlainObject(value)) { + pending.push(value); + } + }); + } + return obj; +} + +/** + * It takes a FormData object and returns a JavaScript object + * + * @param {string} formData The FormData object to convert to JSON. + * + * @returns {Object | null} The converted object. + */ +function formDataToJSON(formData) { + function buildPath(path, value, target, index) { + throwIfDepthExceeded(index); + let name = path[index++]; + if (name === '__proto__') return true; + const isNumericKey = Number.isFinite(+name); + const isLast = index >= path.length; + name = !name && utils$1.isArray(target) ? target.length : name; + if (isLast) { + if (utils$1.hasOwnProp(target, name)) { + target[name] = normalizeArray(target[name]); + target[name] = utils$1.isArray(target[name]) ? target[name].concat(value) : [target[name], value]; + } else { + target[name] = value; + } + return !isNumericKey; + } + if (!utils$1.hasOwnProp(target, name) || !utils$1.isObject(target[name])) { + target[name] = []; + } + const result = buildPath(path, value, target[name], index); + if (result && utils$1.isArray(target[name])) { + target[name] = arrayToObject(target[name]); + } + return !isNumericKey; + } + if (utils$1.isFormData(formData) && utils$1.isFunction(formData.entries)) { + const obj = {}; + utils$1.forEachEntry(formData, (name, value) => { + buildPath(parsePropPath(name), value, obj, 0); + }); + return normalizeArrays(obj); + } + return null; +} + +const methodList = Object.freeze(['get', 'delete', 'head', 'options', 'post', 'put', 'patch', 'purge', 'link', 'unlink', 'query']); + +const own = (obj, key) => obj != null && utils$1.hasOwnProp(obj, key) ? obj[key] : undefined; + +/** + * It takes a string, tries to parse it, and if it fails, it returns the stringified version + * of the input + * + * @param {any} rawValue - The value to be stringified. + * @param {Function} parser - A function that parses a string into a JavaScript object. + * @param {Function} encoder - A function that takes a value and returns a string. + * + * @returns {string} A stringified version of the rawValue. + */ +function stringifySafely(rawValue, parser, encoder) { + if (utils$1.isString(rawValue)) { + try { + (parser || JSON.parse)(rawValue); + return utils$1.trim(rawValue); + } catch (e) { + if (e.name !== 'SyntaxError') { + throw e; + } + } + } + return (encoder || JSON.stringify)(rawValue); +} +const defaults = { + transitional: transitionalDefaults, + adapter: ['xhr', 'http', 'fetch'], + transformRequest: [function transformRequest(data, headers) { + const contentType = headers.getContentType() || ''; + const hasJSONContentType = contentType.indexOf('application/json') > -1; + const isObjectPayload = utils$1.isObject(data); + if (isObjectPayload && utils$1.isHTMLForm(data)) { + data = new FormData(data); + } + const isFormData = utils$1.isFormData(data); + if (isFormData) { + return hasJSONContentType ? JSON.stringify(formDataToJSON(data)) : data; + } + if (utils$1.isArrayBuffer(data) || utils$1.isBuffer(data) || utils$1.isStream(data) || utils$1.isFile(data) || utils$1.isBlob(data) || utils$1.isReadableStream(data)) { + return data; + } + if (utils$1.isArrayBufferView(data)) { + return data.buffer; + } + if (utils$1.isURLSearchParams(data)) { + headers.setContentType('application/x-www-form-urlencoded;charset=utf-8', false); + return data.toString(); + } + let isFileList; + if (isObjectPayload) { + const formSerializer = own(this, 'formSerializer'); + if (contentType.indexOf('application/x-www-form-urlencoded') > -1) { + return toURLEncodedForm(data, formSerializer).toString(); + } + if ((isFileList = utils$1.isFileList(data)) || contentType.indexOf('multipart/form-data') > -1) { + const env = own(this, 'env'); + const _FormData = env && env.FormData; + return toFormData(isFileList ? { + 'files[]': data + } : data, _FormData && new _FormData(), formSerializer); + } + } + if (isObjectPayload || hasJSONContentType) { + headers.setContentType('application/json', false); + return stringifySafely(data); + } + return data; + }], + transformResponse: [function transformResponse(data) { + const transitional = own(this, 'transitional') || defaults.transitional; + const forcedJSONParsing = transitional && transitional.forcedJSONParsing; + const responseType = own(this, 'responseType'); + const JSONRequested = responseType === 'json'; + if (utils$1.isResponse(data) || utils$1.isReadableStream(data)) { + return data; + } + if (data && utils$1.isString(data) && (forcedJSONParsing && !responseType || JSONRequested)) { + const silentJSONParsing = transitional && transitional.silentJSONParsing; + const strictJSONParsing = !silentJSONParsing && JSONRequested; + try { + return JSON.parse(data, own(this, 'parseReviver')); + } catch (e) { + if (strictJSONParsing) { + if (e.name === 'SyntaxError') { + throw AxiosError.from(e, AxiosError.ERR_BAD_RESPONSE, this, null, own(this, 'response')); + } + throw e; + } + } + } + return data; + }], + /** + * A timeout in milliseconds to abort a request. If set to 0 (default) a + * timeout is not created. + */ + timeout: 0, + xsrfCookieName: 'XSRF-TOKEN', + xsrfHeaderName: 'X-XSRF-TOKEN', + maxContentLength: -1, + maxBodyLength: -1, + env: { + FormData: platform.classes.FormData, + Blob: platform.classes.Blob + }, + validateStatus: function validateStatus(status) { + return status >= 200 && status < 300; + }, + headers: { + common: { + Accept: 'application/json, text/plain, */*', + 'Content-Type': undefined + } + } +}; +utils$1.forEach(methodList, method => { + defaults.headers[method] = {}; +}); + +/** + * Transform the data for a request or a response + * + * @param {Array|Function} fns A single function or Array of functions + * @param {?Object} response The response object + * + * @returns {*} The resulting transformed data + */ +function transformData(fns, response) { + const config = this || defaults; + const context = response || config; + const headers = AxiosHeaders.from(context.headers); + let data = context.data; + utils$1.forEach(fns, function transform(fn) { + data = fn.call(config, data, headers.normalize(), response ? response.status : undefined); + }); + headers.normalize(); + return data; +} + +function isCancel(value) { + return !!(value && value.__CANCEL__); +} + +class CanceledError extends AxiosError { + /** + * A `CanceledError` is an object that is thrown when an operation is canceled. + * + * @param {string=} message The message. + * @param {Object=} config The config. + * @param {Object=} request The request. + * + * @returns {CanceledError} The created error. + */ + constructor(message, config, request) { + super(message == null ? 'canceled' : message, AxiosError.ERR_CANCELED, config, request); + this.name = 'CanceledError'; + this.__CANCEL__ = true; + } +} + +/** + * Resolve or reject a Promise based on response status. + * + * @param {Function} resolve A function that resolves the promise. + * @param {Function} reject A function that rejects the promise. + * @param {object} response The response. + * + * @returns {object} The response. + */ +function settle(resolve, reject, response) { + const validateStatus = response.config.validateStatus; + if (!response.status || !validateStatus || validateStatus(response.status)) { + resolve(response); + } else { + reject(new AxiosError('Request failed with status code ' + response.status, response.status >= 400 && response.status < 500 ? AxiosError.ERR_BAD_REQUEST : AxiosError.ERR_BAD_RESPONSE, response.config, response.request, response)); + } +} + +/** + * Determines whether the specified URL is absolute + * + * @param {string} url The URL to test + * + * @returns {boolean} True if the specified URL is absolute, otherwise false + */ +function isAbsoluteURL(url) { + // A URL is considered absolute if it begins with "://" or "//" (protocol-relative URL). + // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed + // by any combination of letters, digits, plus, period, or hyphen. + if (typeof url !== 'string') { + return false; + } + return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url); +} + +/** + * Creates a new URL by combining the specified URLs + * + * @param {string} baseURL The base URL + * @param {string} relativeURL The relative URL + * + * @returns {string} The combined URL + */ +function combineURLs(baseURL, relativeURL) { + if (!relativeURL) { + return baseURL; + } + let end = baseURL.length; + while (end > 0 && baseURL.charCodeAt(end - 1) === 47) { + end--; + } + return baseURL.slice(0, end) + '/' + relativeURL.replace(/^\/+/, ''); +} + +const urlParserControlCharacters = /[\t\n\r]/g; + +/** + * Match WHATWG URL preprocessing before checking a URL's protocol. + * + * @param {string} url + * + * @returns {string} + */ +function normalizeURLForProtocolCheck(url) { + if (typeof url !== 'string') { + return url; + } + let start = 0; + while (start < url.length && url.charCodeAt(start) <= 0x20) { + start++; + } + return url.slice(start).replace(urlParserControlCharacters, ''); +} + +const malformedHttpProtocol = /^https?:(?!\/\/)/i; + +// Redact the parts of a URL that can carry secrets before it is embedded in an +// error message. AxiosError.toJSON() serializes `message` verbatim and errors +// are commonly logged, while the opt-in `config.redact` model only cleans +// config keys — it cannot reach the message. Redact only the genuinely +// sensitive substrings — userinfo (credentials), query parameter values and +// fragment contents — with the same REDACTED marker the config redaction uses, +// while keeping the scheme, host, path and parameter names so the offending +// request stays accurately identifiable. +function redactFragment(fragment) { + if (!fragment) { + return fragment; + } + return fragment.replace(/(^|&)([^=&]*=)?[^&]+/g, (match, separator, parameterName = '') => { + return `${separator}${parameterName}${REDACTED}`; + }); +} +function redactSensitiveURLParts(url) { + const redactedURL = url.replace(/^(https?:\/{0,2})[^/?#]*@/i, `$1${REDACTED}@`); + const fragmentIndex = redactedURL.indexOf('#'); + const urlWithoutFragment = fragmentIndex === -1 ? redactedURL : redactedURL.slice(0, fragmentIndex); + const redactedURLWithoutFragment = urlWithoutFragment.replace(/([?&][^=&#]*=)[^&#]*/g, `$1${REDACTED}`); + if (fragmentIndex === -1) { + return redactedURLWithoutFragment; + } + return `${redactedURLWithoutFragment}#${redactFragment(redactedURL.slice(fragmentIndex + 1))}`; +} +function assertValidHttpProtocolURL(url, config) { + if (typeof url === 'string') { + const normalizedURL = normalizeURLForProtocolCheck(url); + if (malformedHttpProtocol.test(normalizedURL)) { + throw new AxiosError(`Invalid URL ${JSON.stringify(redactSensitiveURLParts(normalizedURL))}: missing "//" after protocol`, AxiosError.ERR_INVALID_URL, config); + } + } +} + +/** + * Creates a new URL by combining the baseURL with the requestedURL, + * only when the requestedURL is not already an absolute URL. + * If the requestURL is absolute, this function returns the requestedURL untouched. + * + * @param {string} baseURL The base URL + * @param {string} requestedURL Absolute or relative URL to combine + * + * @returns {string} The combined full path + */ +function buildFullPath(baseURL, requestedURL, allowAbsoluteUrls, config) { + assertValidHttpProtocolURL(requestedURL, config); + let isRelativeUrl = !isAbsoluteURL(requestedURL); + if (baseURL && (isRelativeUrl || allowAbsoluteUrls === false)) { + assertValidHttpProtocolURL(baseURL, config); + return combineURLs(baseURL, requestedURL); + } + return requestedURL; +} + +var DEFAULT_PORTS$1 = { + ftp: 21, + gopher: 70, + http: 80, + https: 443, + ws: 80, + wss: 443 +}; +function parseUrl(urlString) { + try { + return new URL(urlString); + } catch { + return null; + } +} + +/** + * @param {string|object|URL} url - The URL as a string or URL instance, or a + * compatible object (such as the result from legacy url.parse). + * @return {string} The URL of the proxy that should handle the request to the + * given URL. If no proxy is set, this will be an empty string. + */ +function getProxyForUrl(url) { + var parsedUrl = (typeof url === 'string' ? parseUrl(url) : url) || {}; + var proto = parsedUrl.protocol; + var hostname = parsedUrl.host; + var port = parsedUrl.port; + if (typeof hostname !== 'string' || !hostname || typeof proto !== 'string') { + return ''; // Don't proxy URLs without a valid scheme or host. + } + proto = proto.split(':', 1)[0]; + // Stripping ports in this way instead of using parsedUrl.hostname to make + // sure that the brackets around IPv6 addresses are kept. + hostname = hostname.replace(/:\d*$/, ''); + port = parseInt(port) || DEFAULT_PORTS$1[proto] || 0; + if (!shouldProxy(hostname, port)) { + return ''; // Don't proxy URLs that match NO_PROXY. + } + var proxy = getEnv(proto + '_proxy') || getEnv('all_proxy'); + if (proxy && proxy.indexOf('://') === -1) { + // Missing scheme in proxy, default to the requested URL's scheme. + proxy = proto + '://' + proxy; + } + return proxy; +} + +/** + * Determines whether a given URL should be proxied. + * + * @param {string} hostname - The host name of the URL. + * @param {number} port - The effective port of the URL. + * @returns {boolean} Whether the given URL should be proxied. + * @private + */ +function shouldProxy(hostname, port) { + var NO_PROXY = getEnv('no_proxy').toLowerCase(); + if (!NO_PROXY) { + return true; // Always proxy if NO_PROXY is not set. + } + if (NO_PROXY === '*') { + return false; // Never proxy if wildcard is set. + } + return NO_PROXY.split(/[,\s]/).every(function (proxy) { + if (!proxy) { + return true; // Skip zero-length hosts. + } + var parsedProxy = proxy.match(/^(.+):(\d+)$/); + var parsedProxyHostname = parsedProxy ? parsedProxy[1] : proxy; + var parsedProxyPort = parsedProxy ? parseInt(parsedProxy[2]) : 0; + if (parsedProxyPort && parsedProxyPort !== port) { + return true; // Skip if ports don't match. + } + if (!/^[.*]/.test(parsedProxyHostname)) { + // No wildcards, so stop proxying if there is an exact match. + return hostname !== parsedProxyHostname; + } + if (parsedProxyHostname.charAt(0) === '*') { + // Remove leading wildcard. + parsedProxyHostname = parsedProxyHostname.slice(1); + } + // Stop proxying if the hostname ends with the no_proxy host. + return !hostname.endsWith(parsedProxyHostname); + }); +} + +/** + * Get the value for an environment variable. + * + * @param {string} key - The name of the environment variable. + * @return {string} The value of the environment variable. + * @private + */ +function getEnv(key) { + return process.env[key.toLowerCase()] || process.env[key.toUpperCase()] || ''; +} + +const VERSION = "1.21.1"; + +function parseProtocol(url) { + const match = /^([-+\w]{1,25}):(?:\/\/)?/.exec(url); + return match && match[1].toLowerCase() || ''; +} + +// RFC 2397: data:[][;base64], +// mediatype = type/subtype followed by optional ;name=value parameters +// The `i` flag makes the `;base64` token case-insensitive, matching the WHATWG +// URL/Fetch data URL processor (and therefore the fetch adapter and browsers). +// The remaining character classes do not depend on letter case. +const DATA_URL_PATTERN = /^([^,;/]+\/[^,;/]+)?((?:;[^,;=]+=[^,;]+)*)(;base64)?,([\s\S]*)$/i; + +/** + * Parse data uri to a Buffer or Blob + * + * @param {String} uri + * @param {?Boolean} asBlob + * @param {?Object} options + * @param {?Function} options.Blob + * + * @returns {Buffer|Blob} + */ +function fromDataURI(uri, asBlob, options) { + const _Blob = options && options.Blob || platform.classes.Blob; + const protocol = parseProtocol(uri); + if (asBlob === undefined && _Blob) { + asBlob = true; + } + if (protocol === 'data') { + uri = protocol.length ? uri.slice(protocol.length + 1) : uri; + const match = DATA_URL_PATTERN.exec(uri); + if (!match) { + throw new AxiosError('Invalid URL', AxiosError.ERR_INVALID_URL); + } + const type = match[1]; + const params = match[2]; + const encoding = match[3] ? 'base64' : 'utf8'; + const body = match[4]; + + // RFC 2397 section 3: default mediatype is text/plain;charset=US-ASCII + // Bare `data:,` leaves mime undefined; Blob normalises that to "" per spec. + let mime = ''; + if (type) { + mime = params ? type + params : type; + } else if (params) { + mime = 'text/plain' + params; + } + const buffer = encoding === 'base64' ? Buffer.from(body.replace(/%([\da-f]{2})/gi, (_, hex) => String.fromCharCode(parseInt(hex, 16))), 'base64') : Buffer.from(decodeURIComponent(body), encoding); + if (asBlob) { + if (!_Blob) { + throw new AxiosError('Blob is not supported', AxiosError.ERR_NOT_SUPPORT); + } + return new _Blob([buffer], { + type: mime + }); + } + return buffer; + } + throw new AxiosError('Unsupported protocol ' + protocol, AxiosError.ERR_NOT_SUPPORT); +} + +const FORM_DATA_CONTENT_HEADERS = ['content-type', 'content-length']; + +/** + * Apply the headers generated by a FormData implementation to the request headers, + * honoring the `formDataHeaderPolicy` option: with 'content-only', copy only the + * content-* headers; otherwise merge all of them. + * + * @param {AxiosHeaders} headers - the request headers to mutate + * @param {Object | null | undefined} formHeaders - headers produced by the FormData implementation + * @param {String} [policy] - the resolved `formDataHeaderPolicy` config value + * + * @returns {void} + */ +function setFormDataHeaders(headers, formHeaders, policy) { + if (policy !== 'content-only') { + headers.set(formHeaders); + return; + } + Object.entries(formHeaders || {}).forEach(([key, val]) => { + if (FORM_DATA_CONTENT_HEADERS.includes(key.toLowerCase())) { + headers.set(key, val); + } + }); +} + +const kInternals = Symbol('internals'); +class AxiosTransformStream extends stream.Transform { + constructor(options) { + options = utils$1.toFlatObject(options, { + maxRate: 0, + chunkSize: 64 * 1024, + minChunkSize: 100, + timeWindow: 500, + ticksRate: 2, + samplesCount: 15 + }, null, (prop, source) => { + return !utils$1.isUndefined(source[prop]); + }); + super({ + readableHighWaterMark: options.chunkSize + }); + const internals = this[kInternals] = { + timeWindow: options.timeWindow, + chunkSize: options.chunkSize, + maxRate: options.maxRate, + minChunkSize: options.minChunkSize, + bytesSeen: 0, + isCaptured: false, + notifiedBytesLoaded: 0, + ts: Date.now(), + bytes: 0, + onReadCallback: null + }; + this.on('newListener', event => { + if (event === 'progress') { + if (!internals.isCaptured) { + internals.isCaptured = true; + } + } + }); + } + _read(size) { + const internals = this[kInternals]; + if (internals.onReadCallback) { + internals.onReadCallback(); + } + return super._read(size); + } + _transform(chunk, encoding, callback) { + const internals = this[kInternals]; + const maxRate = internals.maxRate; + const readableHighWaterMark = this.readableHighWaterMark; + const timeWindow = internals.timeWindow; + const divider = 1000 / timeWindow; + const bytesThreshold = maxRate / divider; + let minChunkSize = internals.minChunkSize !== false ? Math.max(internals.minChunkSize, bytesThreshold * 0.01) : 0; + if (maxRate) { + minChunkSize = Math.min(bytesThreshold, minChunkSize); + } + const pushChunk = (_chunk, _callback) => { + const bytes = Buffer.byteLength(_chunk); + internals.bytesSeen += bytes; + internals.bytes += bytes; + internals.isCaptured && this.emit('progress', internals.bytesSeen); + if (this.push(_chunk)) { + process.nextTick(_callback); + } else { + internals.onReadCallback = () => { + internals.onReadCallback = null; + process.nextTick(_callback); + }; + } + }; + const transformChunk = (_chunk, _callback) => { + if (this.destroyed) { + return _callback(); + } + const chunkSize = Buffer.byteLength(_chunk); + let chunkRemainder = null; + let maxChunkSize = readableHighWaterMark; + let bytesLeft; + let passed = 0; + if (maxRate) { + const now = Date.now(); + if (!internals.ts || (passed = now - internals.ts) >= timeWindow) { + internals.ts = now; + bytesLeft = bytesThreshold - internals.bytes; + internals.bytes = bytesLeft < 0 ? -bytesLeft : 0; + passed = 0; + } + bytesLeft = bytesThreshold - internals.bytes; + } + if (maxRate) { + if (bytesLeft <= 0) { + // next time window + return setTimeout(() => { + _callback(null, _chunk); + }, timeWindow - passed); + } + if (bytesLeft < maxChunkSize) { + // A buffer boundary must consume at least one byte. Carry any + // fractional allowance forward in the next accounting window. + maxChunkSize = Math.max(1, Math.floor(bytesLeft)); + } + } + if (maxChunkSize && chunkSize > maxChunkSize && chunkSize - maxChunkSize > minChunkSize) { + chunkRemainder = _chunk.subarray(maxChunkSize); + _chunk = _chunk.subarray(0, maxChunkSize); + } + pushChunk(_chunk, chunkRemainder ? () => { + process.nextTick(_callback, null, chunkRemainder); + } : _callback); + }; + transformChunk(chunk, function transformNextChunk(err, _chunk) { + if (err) { + return callback(err); + } + if (_chunk) { + transformChunk(_chunk, transformNextChunk); + } else { + callback(null); + } + }); + } +} + +const { + asyncIterator +} = Symbol; +const readBlob = async function* (blob) { + if (blob.stream) { + yield* blob.stream(); + } else if (blob.arrayBuffer) { + yield await blob.arrayBuffer(); + } else if (blob[asyncIterator]) { + yield* blob[asyncIterator](); + } else { + yield blob; + } +}; + +const BOUNDARY_ALPHABET = platform.ALPHABET.ALPHA_DIGIT + '-_'; +const textEncoder = typeof TextEncoder === 'function' ? new TextEncoder() : new util.TextEncoder(); +const CRLF$1 = '\r\n'; +const CRLF_BYTES = textEncoder.encode(CRLF$1); +const CRLF_BYTES_COUNT = 2; +class FormDataPart { + constructor(name, value) { + const { + escapeName + } = this.constructor; + const isStringValue = utils$1.isString(value); + let headers = `Content-Disposition: form-data; name="${escapeName(name)}"${!isStringValue && value.name ? `; filename="${escapeName(value.name)}"` : ''}${CRLF$1}`; + if (isStringValue) { + value = textEncoder.encode(String(value).replace(/\r?\n|\r\n?/g, CRLF$1)); + } else { + const safeType = String(value.type || 'application/octet-stream').replace(/[\r\n]/g, ''); + headers += `Content-Type: ${safeType}${CRLF$1}`; + } + this.headers = textEncoder.encode(headers + CRLF$1); + this.contentLength = isStringValue ? value.byteLength : value.size; + this.size = this.headers.byteLength + this.contentLength + CRLF_BYTES_COUNT; + this.name = name; + this.value = value; + } + async *encode() { + yield this.headers; + const { + value + } = this; + if (utils$1.isTypedArray(value)) { + yield value; + } else { + yield* readBlob(value); + } + yield CRLF_BYTES; + } + static escapeName(name) { + return String(name).replace(/[\r\n"]/g, match => ({ + '\r': '%0D', + '\n': '%0A', + '"': '%22' + })[match]); + } +} +const formDataToStream = (form, headersHandler, options) => { + const { + tag = 'form-data-boundary', + size = 25, + boundary = tag + '-' + platform.generateString(size, BOUNDARY_ALPHABET) + } = options || {}; + if (!utils$1.isFormData(form)) { + throw new TypeError('FormData instance required'); + } + if (boundary.length < 1 || boundary.length > 70) { + throw new Error('boundary must be 1-70 characters long'); + } + const boundaryBytes = textEncoder.encode('--' + boundary + CRLF$1); + const footerBytes = textEncoder.encode('--' + boundary + '--' + CRLF$1); + let contentLength = footerBytes.byteLength; + const parts = Array.from(form.entries()).map(([name, value]) => { + const part = new FormDataPart(name, value); + contentLength += part.size; + return part; + }); + contentLength += boundaryBytes.byteLength * parts.length; + contentLength = utils$1.toFiniteNumber(contentLength); + const computedHeaders = { + 'Content-Type': `multipart/form-data; boundary=${boundary}` + }; + if (Number.isFinite(contentLength)) { + computedHeaders['Content-Length'] = contentLength; + } + headersHandler && headersHandler(computedHeaders); + return stream.Readable.from(async function* () { + for (const part of parts) { + yield boundaryBytes; + yield* part.encode(); + } + yield footerBytes; + }()); +}; + +class ZlibHeaderTransformStream extends stream.Transform { + __transform(chunk, encoding, callback) { + this.push(chunk); + callback(); + } + _transform(chunk, encoding, callback) { + if (chunk.length !== 0) { + this._transform = this.__transform; + + // Add Default Compression headers if no zlib headers are present + if (chunk[0] !== 120) { + // Hex: 78 + const header = Buffer.alloc(2); + header[0] = 120; // Hex: 78 + header[1] = 156; // Hex: 9C + this.push(header, encoding); + } + } + this.__transform(chunk, encoding, callback); + } +} + +class Http2Sessions { + constructor() { + this.sessions = Object.create(null); + } + getSession(authority, options) { + options = Object.assign(Object.create(null), { + sessionTimeout: 1000 + }, options); + let authoritySessions = this.sessions[authority]; + if (authoritySessions) { + let len = authoritySessions.length; + for (let i = 0; i < len; i++) { + const [sessionHandle, sessionOptions] = authoritySessions[i]; + if (!sessionHandle.destroyed && !sessionHandle.closed && util.isDeepStrictEqual(sessionOptions, options)) { + return sessionHandle; + } + } + } + const session = http2.connect(authority, options); + let removed; + let timer; + const removeSession = () => { + if (removed) { + return; + } + removed = true; + if (timer) { + clearTimeout(timer); + timer = null; + } + let entries = authoritySessions, + len = entries.length, + i = len; + while (i--) { + if (entries[i][0] === session) { + if (len === 1) { + delete this.sessions[authority]; + } else { + entries.splice(i, 1); + } + if (!session.closed) { + session.close(); + } + return; + } + } + }; + const originalRequestFn = session.request; + const { + sessionTimeout + } = options; + if (sessionTimeout != null) { + let streamsCount = 0; + session.request = function () { + const stream = originalRequestFn.apply(this, arguments); + streamsCount++; + if (timer) { + clearTimeout(timer); + timer = null; + } + stream.once('close', () => { + if (! --streamsCount && !removed) { + timer = setTimeout(() => { + timer = null; + removeSession(); + }, sessionTimeout); + } + }); + return stream; + }; + } + session.once('close', removeSession); + session.once('error', removeSession); + session.once('goaway', removeSession); + let entry = [session, options]; + authoritySessions ? authoritySessions.push(entry) : authoritySessions = this.sessions[authority] = [entry]; + return session; + } +} + +const callbackify = (fn, reducer) => { + return utils$1.isAsyncFn(fn) ? function (...args) { + const cb = args.pop(); + fn.apply(this, args).then(value => { + try { + reducer ? cb(null, ...reducer(value)) : cb(null, value); + } catch (err) { + cb(err); + } + }, cb); + } : fn; +}; + +const LOOPBACK_HOSTNAMES = new Set(['localhost', '0.0.0.0']); +const trimTrailingDots = value => { + let end = value.length; + while (end && value.charCodeAt(end - 1) === 46) { + end--; + } + return end === value.length ? value : value.slice(0, end); +}; +const isIPv4Loopback = host => { + const parts = host.split('.'); + if (parts.length !== 4) return false; + if (parts[0] !== '127') return false; + return parts.every(p => /^\d+$/.test(p) && Number(p) >= 0 && Number(p) <= 255); +}; + +/** + * Canonicalize an IPv4 address written in shorthand, octal, or hex form into + * dotted-decimal. IPv6 addresses and non-IP strings are returned unchanged so + * the existing IPv4-mapped IPv6 unmap path and the isLoopback path can still + * see them. + * + * Shorthand expansion mirrors Node's URL parser: literal parts fill from the + * left, the final part fills the remaining octets from the right with + * zero-padding on the left. + * 127.1 -> 127.0.0.1 + * 127.0.1 -> 127.0.0.1 + * 1.2.3 -> 1.2.0.3 + * + * Each octet is parsed with an explicit base: 16 for `0x`/`0X` prefix, 8 for + * zero-prefixed multi-digit all-`0-7` parts, 10 otherwise. Zero-prefixed + * decimal-looking parts that contain `8` or `9` are rejected to match Node's + * URL parser, and the comparison layer falls through to non-bypass if either + * side rejects the form (fail-safe). + * + * Returns the input unchanged on any parse failure, out-of-range octet, or + * unusual shape (1-part, 5+ parts) so the comparison layer fails closed. + */ +const parseIPv4Octet = text => { + if (/^0[xX][0-9a-fA-F]+$/.test(text)) { + const n = parseInt(text.slice(2), 16); + return Number.isFinite(n) ? n : null; + } + if (text.length > 1 && /^0[0-7]+$/.test(text)) { + const n = parseInt(text, 8); + return Number.isFinite(n) ? n : null; + } + if (text.length > 1 && /^0[0-9]+$/.test(text)) { + return null; + } + if (/^[0-9]+$/.test(text)) { + const n = parseInt(text, 10); + return Number.isFinite(n) ? n : null; + } + return null; +}; +const normalizeIPAddress = host => { + if (typeof host !== 'string' || !host || host.indexOf(':') !== -1) { + return host; + } + let h = host; + if (h.charAt(0) === '[' && h.charAt(h.length - 1) === ']') { + h = h.slice(1, -1); + } + h = trimTrailingDots(h); + + // Allowed characters for any IPv4 shape: digits, dot, 'x', 'X', hex digits. + if (!/^[0-9.xXa-fA-F]+$/.test(h)) return host; + const parts = h.split('.'); + + // No part may be empty (e.g. "127..0.1" or "127.0.0."). Trailing dots are + // already stripped above; this guards against the empty-middle case. + if (parts.some(p => p === '')) return host; + if (parts.length === 4) { + // Full IPv4 form: each part is an octet. + const octets = parts.map(parseIPv4Octet); + if (octets.some(n => n === null || n < 0 || n > 255)) return host; + return octets.join('.'); + } + if (parts.length > 4) { + return host; + } + + // Shorthand: 1..3 parts. Node's URL parser treats a 1-part input as a 32-bit + // integer split into octets, which has surprising semantics (e.g. "127" -> + // "0.0.0.127"). Reject 1-part inputs to keep the helper predictable: the + // fail-safe returns the input unchanged and the comparison layer falls + // through to non-bypass. + if (parts.length === 1) return host; + + // 2..3 parts: literal parts fill from the left, tail fills remaining octets + // from the right with zero-padding. + const literalOctets = parts.slice(0, -1); + const tail = parts[parts.length - 1]; + const tailSlots = 4 - literalOctets.length; + + // Tail is parsed as a full IPv4 number (hex/octal/decimal) and packed + // low-byte-right into the remaining octets, matching Node's URL parser. + // e.g. 127.65535 (tail 0xFFFF into 3 slots) -> 127.0.255.255; + // 127.0x00ff (tail 0xFF into 3 slots) -> 127.0.0.255; + // 127.0.65535 (tail 0xFFFF into 2 slots) -> 127.0.255.255. + const tailValue = parseIPv4Octet(tail); + if (tailValue === null) return host; + const maxTail = (1 << 8 * tailSlots) - 1; + if (tailValue < 0 || tailValue > maxTail) return host; + const tailOctets = new Array(tailSlots).fill(0); + for (let i = tailSlots - 1, v = tailValue; i >= 0; i--, v >>= 8) { + tailOctets[i] = v & 0xff; + } + const literal = literalOctets.map(parseIPv4Octet); + if (literal.some(n => n === null || n < 0 || n > 255)) return host; + return [...literal, ...tailOctets].join('.'); +}; +const isIPv6ZeroGroup = group => /^0{1,4}$/.test(group); + +// The unspecified address (IPv4 0.0.0.0 / IPv6 ::) resolves to the local host +// for outbound connections, so treat it as loopback-equivalent for NO_PROXY +// matching. 0.0.0.0 is covered by LOOPBACK_HOSTNAMES; this handles compressed +// and full IPv6 all-zero forms so both families bypass symmetrically. +const isIPv6Unspecified = host => { + if (host === '::') return true; + const compressionIndex = host.indexOf('::'); + if (compressionIndex !== -1) { + if (compressionIndex !== host.lastIndexOf('::')) return false; + const left = host.slice(0, compressionIndex); + const right = host.slice(compressionIndex + 2); + const leftGroups = left ? left.split(':') : []; + const rightGroups = right ? right.split(':') : []; + const explicitGroups = leftGroups.length + rightGroups.length; + return explicitGroups < 8 && leftGroups.every(isIPv6ZeroGroup) && rightGroups.every(isIPv6ZeroGroup); + } + const groups = host.split(':'); + return groups.length === 8 && groups.every(isIPv6ZeroGroup); +}; +const isIPv6Loopback = host => { + // Collapse all-zero groups: any form of ::1 / 0:0:...:0:1 + // First, strip any leading "::" by normalising with Set lookup of common forms, + // then fall back to structural check. + if (host === '::1') return true; + + // Check IPv4-mapped IPv6 loopback: ::ffff: or ::ffff: + // Node's URL parser normalises ::ffff:127.0.0.1 → ::ffff:7f00:1 + const v4MappedDotted = host.match(/^::ffff:(\d+\.\d+\.\d+\.\d+)$/i); + if (v4MappedDotted) return isIPv4Loopback(v4MappedDotted[1]); + const v4MappedHex = host.match(/^::ffff:([0-9a-f]{1,4}):([0-9a-f]{1,4})$/i); + if (v4MappedHex) { + const high = parseInt(v4MappedHex[1], 16); + // High 16 bits must start with 127 (0x7f) — i.e. 0x7f00..0x7fff + return high >= 0x7f00 && high <= 0x7fff; + } + + // Full-form ::1 variants: any number of zero groups followed by trailing 1 + // e.g. 0:0:0:0:0:0:0:1, 0000:...:0001 + const groups = host.split(':'); + if (groups.length === 8) { + for (let i = 0; i < 7; i++) { + if (!/^0+$/.test(groups[i])) return false; + } + return /^0*1$/.test(groups[7]); + } + return false; +}; +const isLoopback = host => { + if (!host) return false; + if (LOOPBACK_HOSTNAMES.has(host)) return true; + if (isIPv4Loopback(host)) return true; + if (isIPv6Unspecified(host)) return true; + return isIPv6Loopback(host); +}; +const DEFAULT_PORTS = { + http: 80, + https: 443, + ws: 80, + wss: 443, + ftp: 21 +}; +const parseNoProxyEntry = entry => { + let entryHost = entry; + let entryPort = 0; + if (entryHost.charAt(0) === '[') { + const bracketIndex = entryHost.indexOf(']'); + if (bracketIndex !== -1) { + const host = entryHost.slice(1, bracketIndex); + const rest = entryHost.slice(bracketIndex + 1); + if (rest.charAt(0) === ':' && /^\d+$/.test(rest.slice(1))) { + entryPort = Number.parseInt(rest.slice(1), 10); + } + return [host, entryPort]; + } + } + const firstColon = entryHost.indexOf(':'); + const lastColon = entryHost.lastIndexOf(':'); + if (firstColon !== -1 && firstColon === lastColon && /^\d+$/.test(entryHost.slice(lastColon + 1))) { + entryPort = Number.parseInt(entryHost.slice(lastColon + 1), 10); + entryHost = entryHost.slice(0, lastColon); + } + return [entryHost, entryPort]; +}; + +// Convert IPv4-mapped IPv6 (::ffff:0:0/96 prefix) to IPv4 dotted form so both +// sides of a NO_PROXY comparison see the same canonical address. Without this, +// `NO_PROXY=192.168.1.5` would not match a request to `http://[::ffff:192.168.1.5]/` +// (Node's URL parser normalises that to `[::ffff:c0a8:105]`), and vice-versa, +// allowing the proxy-bypass policy to be circumvented by using the alternate +// representation. Returns the input unchanged when not IPv4-mapped. +const IPV4_MAPPED_DOTTED_RE = /^(?:::|(?:0{1,4}:){1,4}:|(?:0{1,4}:){5})ffff:(\d+\.\d+\.\d+\.\d+)$/i; +const IPV4_MAPPED_HEX_RE = /^(?:::|(?:0{1,4}:){1,4}:|(?:0{1,4}:){5})ffff:([0-9a-f]{1,4}):([0-9a-f]{1,4})$/i; +const unmapIPv4MappedIPv6 = host => { + if (typeof host !== 'string' || host.indexOf(':') === -1) return host; + const dotted = host.match(IPV4_MAPPED_DOTTED_RE); + if (dotted) return dotted[1]; + const hex = host.match(IPV4_MAPPED_HEX_RE); + if (hex) { + const high = parseInt(hex[1], 16); + const low = parseInt(hex[2], 16); + return `${high >> 8}.${high & 0xff}.${low >> 8}.${low & 0xff}`; + } + return host; +}; +const IPV4_OCTET_RE = /^(?:0|[1-9]\d{0,2})$/; +const ipv4ToBytes = host => { + const parts = host.split('.'); + return parts.length === 4 && parts.every(part => IPV4_OCTET_RE.test(part) && Number(part) <= 255) ? parts.map(Number) : null; +}; +const IPV6_GROUP_RE = /^[0-9a-f]{1,4}$/i; +const ipv6ToBytes = host => { + const halves = host.split('::'); + if (halves.length > 2) { + return null; + } + const groups = halves[0] ? halves[0].split(':') : []; + if (halves.length === 2) { + const rear = halves[1] ? halves[1].split(':') : []; + const missing = 8 - groups.length - rear.length; + if (missing < 1) { + return null; + } + groups.push(...new Array(missing).fill('0'), ...rear); + } + if (groups.length !== 8 || groups.some(group => !IPV6_GROUP_RE.test(group))) { + return null; + } + return groups.flatMap(group => { + const value = Number.parseInt(group, 16); + return [value >> 8 & 0xff, value & 0xff]; + }); +}; +const ipToBytes = host => { + if (typeof host !== 'string' || !host) { + return null; + } + return host.indexOf(':') !== -1 ? ipv6ToBytes(host) : ipv4ToBytes(host); +}; +const normalizeNoProxyHost = hostname => { + if (!hostname) { + return hostname; + } + if (hostname.charAt(0) === '[' && hostname.charAt(hostname.length - 1) === ']') { + hostname = hostname.slice(1, -1); + } + let trimmed = trimTrailingDots(hostname); + if (trimmed.indexOf(':') !== -1) { + try { + trimmed = new URL('http://[' + trimmed + ']/').hostname.slice(1, -1); + } catch (_err) { + return trimmed; + } + } else if (/[\u0080-\uffff]/.test(trimmed)) { + const prefix = /^[*.]+/.exec(trimmed); + const start = prefix ? prefix[0] : ''; + const ascii = url.domainToASCII(trimmed.slice(start.length)); + if (!ascii) return ''; + trimmed = start + trimTrailingDots(ascii); + } + + // IPv4 shorthand/octal/hex → dotted-decimal; helper is a no-op for inputs + // containing ':' (IPv6 and IPv4-mapped IPv6) so we fall through to unmap. + const ipv4 = normalizeIPAddress(trimmed); + if (ipv4 !== trimmed) { + return ipv4; + } + return unmapIPv4MappedIPv6(trimmed); +}; +const normalizeCidrBase = input => { + let base = input; + const startsBracket = base.charAt(0) === '['; + const endsBracket = base.charAt(base.length - 1) === ']'; + const hasBracket = base.includes('[') || base.includes(']'); + if (startsBracket || endsBracket) { + if (!startsBracket || !endsBracket) { + return null; + } + base = base.slice(1, -1); + if (base.indexOf(':') === -1 || base.includes('[') || base.includes(']')) { + return null; + } + } else if (hasBracket) { + return null; + } + if (!base || base.charAt(base.length - 1) === '.') { + return null; + } + const wasIPv6 = base.indexOf(':') !== -1; + if (wasIPv6) { + try { + base = new URL(`http://[${base}]/`).hostname.slice(1, -1); + } catch (_err) { + return null; + } + } else { + base = normalizeIPAddress(base); + if (!ipv4ToBytes(base)) { + return null; + } + } + return { + normalized: unmapIPv4MappedIPv6(base), + wasIPv6 + }; +}; +const CIDR_ENTRY_RE = /^(.+)\/(0|[1-9]\d{0,2})$/; +const parseCidrEntry = entry => { + if (entry.indexOf('/') === -1) { + return undefined; + } + const match = CIDR_ENTRY_RE.exec(entry); + if (!match) { + return null; + } + let prefix = Number(match[2]); + const parsedBase = normalizeCidrBase(match[1]); + if (!parsedBase) { + return null; + } + const { + normalized, + wasIPv6 + } = parsedBase; + if (wasIPv6 && normalized.indexOf(':') === -1) { + if (prefix < 96) { + return null; + } + prefix -= 96; + } + const bytes = ipToBytes(normalized); + if (!bytes || prefix > bytes.length * 8) { + return null; + } + return { + bytes, + prefix + }; +}; +const isInSubnet = (addressBytes, networkBytes, prefix) => { + const fullBytes = prefix >> 3; + for (let i = 0; i < fullBytes; i++) { + if (addressBytes[i] !== networkBytes[i]) { + return false; + } + } + const remainingBits = prefix & 7; + if (remainingBits) { + const mask = 0xff << 8 - remainingBits & 0xff; + if ((addressBytes[fullBytes] & mask) !== (networkBytes[fullBytes] & mask)) { + return false; + } + } + return true; +}; +function shouldBypassProxy(location) { + let parsed; + try { + parsed = new URL(location); + } catch (_err) { + return false; + } + const noProxy = (process.env.no_proxy || process.env.NO_PROXY || '').toLowerCase(); + if (!noProxy) { + return false; + } + if (noProxy === '*') { + return true; + } + const port = Number.parseInt(parsed.port, 10) || DEFAULT_PORTS[parsed.protocol.split(':', 1)[0]] || 0; + const hostname = normalizeNoProxyHost(parsed.hostname.toLowerCase()); + const hostnameBytes = ipToBytes(hostname); + return noProxy.split(/[\s,]+/).some(entry => { + if (!entry) { + return false; + } + if (entry === '*') { + return true; + } + const cidr = parseCidrEntry(entry); + if (cidr !== undefined) { + return cidr !== null && !!hostnameBytes && hostnameBytes.length === cidr.bytes.length && isInSubnet(hostnameBytes, cidr.bytes, cidr.prefix); + } + let [entryHost, entryPort] = parseNoProxyEntry(entry); + entryHost = normalizeNoProxyHost(entryHost); + if (!entryHost) { + return false; + } + if (entryPort && entryPort !== port) { + return false; + } + if (entryHost.charAt(0) === '*') { + entryHost = entryHost.slice(1); + } + if (entryHost.charAt(0) === '.') { + return hostname.endsWith(entryHost); + } + return hostname === entryHost || isLoopback(hostname) && isLoopback(entryHost); + }); +} + +/** + * Calculate data maxRate + * @param {Number} [samplesCount= 10] + * @param {Number} [min= 1000] + * @returns {Function} + */ +function speedometer(samplesCount, min) { + samplesCount = samplesCount || 10; + const bytes = new Array(samplesCount); + const timestamps = new Array(samplesCount); + let head = 0; + let tail = 0; + let firstSampleTS; + min = min !== undefined ? min : 1000; + return function push(chunkLength) { + const now = Date.now(); + const startedAt = timestamps[tail]; + if (!firstSampleTS) { + firstSampleTS = now; + } + bytes[head] = chunkLength; + timestamps[head] = now; + let i = tail; + let bytesCount = 0; + while (i !== head) { + bytesCount += bytes[i++]; + i = i % samplesCount; + } + head = (head + 1) % samplesCount; + if (head === tail) { + tail = (tail + 1) % samplesCount; + } + if (now - firstSampleTS < min) { + return; + } + const passed = startedAt && now - startedAt; + return passed ? Math.round(bytesCount * 1000 / passed) : undefined; + }; +} + +/** + * Throttle decorator + * @param {Function} fn + * @param {Number} freq + * @return {Array} + */ +function throttle(fn, freq) { + let timestamp = 0; + let threshold = 1000 / freq; + let lastArgs; + let timer; + const invoke = (args, now = Date.now()) => { + timestamp = now; + lastArgs = null; + if (timer) { + clearTimeout(timer); + timer = null; + } + fn(...args); + }; + const throttled = (...args) => { + const now = Date.now(); + const passed = now - timestamp; + if (passed >= threshold) { + invoke(args, now); + } else { + lastArgs = args; + if (!timer) { + timer = setTimeout(() => { + timer = null; + invoke(lastArgs); + }, threshold - passed); + } + } + }; + const flush = () => lastArgs && invoke(lastArgs); + const flushWith = (...args) => invoke(args); + return [throttled, flush, flushWith]; +} + +const progressEventReducer = (listener, isDownloadStream, freq = 3) => { + let bytesNotified = 0; + const _speedometer = speedometer(50, 250); + return throttle(e => { + if (!e || !utils$1.isNumber(e.loaded)) { + return; + } + const rawLoaded = e.loaded; + const total = e.lengthComputable ? e.total : undefined; + const loaded = Math.max(0, total != null ? Math.min(rawLoaded, total) : rawLoaded); + const progressBytes = Math.max(0, loaded - bytesNotified); + const rate = _speedometer(progressBytes); + bytesNotified = Math.max(bytesNotified, loaded); + const data = { + loaded, + total, + progress: total ? loaded / total : undefined, + bytes: progressBytes, + rate: rate ? rate : undefined, + estimated: rate && total ? (total - loaded) / rate : undefined, + event: e, + lengthComputable: total != null, + [isDownloadStream ? 'download' : 'upload']: true + }; + listener(data); + }, freq); +}; +const progressEventDecorator = (total, throttled) => { + const lengthComputable = total != null; + return [loaded => throttled[0]({ + lengthComputable, + total, + loaded + }), throttled[1]]; +}; +const asyncDecorator = (fn, scheduler = utils$1.asap) => (...args) => scheduler(() => fn(...args)); + +/** + * Estimate data: URL byte lengths *without* allocating large buffers. + * - Fetch percent-decodes a base64 body before decoding it. + * - Node's Buffer.from(body, 'base64') sizes its backing allocation from the + * percent-decoded body, including ignored characters and content after padding. + * - Non-base64 data is percent-decoded and then encoded as UTF-8. + */ +const isHexDigit = charCode => charCode >= 48 && charCode <= 57 || charCode >= 65 && charCode <= 70 || charCode >= 97 && charCode <= 102; +const isPercentEncodedByte = (str, i, len) => i + 2 < len && isHexDigit(str.charCodeAt(i + 1)) && isHexDigit(str.charCodeAt(i + 2)); +const hexValue = charCode => charCode <= 57 ? charCode - 48 : (charCode & 0xdf) - 55; +const isBase64Char = charCode => charCode >= 65 && charCode <= 90 || +// A-Z +charCode >= 97 && charCode <= 122 || +// a-z +charCode >= 48 && charCode <= 57 || +// 0-9 +charCode === 43 || +// + +charCode === 47 || +// / +charCode === 45 || +// - (base64url) +charCode === 95; // _ (base64url) + +const isBase64Whitespace = charCode => charCode === 9 || charCode === 10 || charCode === 12 || charCode === 13 || charCode === 32; +const base64Bytes = significant => { + const groups = Math.floor(significant / 4); + const remainder = significant % 4; + return groups * 3 + (remainder === 2 ? 1 : remainder === 3 ? 2 : 0); +}; + +// Buffer.byteLength(body, 'base64') uses the raw string length as an allocation +// upper bound even when Buffer.from later ignores characters or stops at '='. +const estimateBase64BufferAllocation = body => { + const len = body.length; + let padding = 0; + if (len > 0 && body.charCodeAt(len - 1) === 61 /* '=' */) { + padding++; + if (len > 1 && body.charCodeAt(len - 2) === 61 /* '=' */) { + padding++; + } + } + return Math.floor((len - padding) * 3 / 4); +}; +const estimatePercentDecodedBase64BufferAllocation = body => { + // Ordinary Base64 needs only its length and trailing padding. + if (body.indexOf('%') === -1) { + return estimateBase64BufferAllocation(body); + } + let length = 0; + let previous = 0; + let last = 0; + for (let i = 0, len = body.length; i < len; i++) { + let code = body.charCodeAt(i); + if (code === 37 /* '%' */ && isPercentEncodedByte(body, i, len)) { + code = hexValue(body.charCodeAt(i + 1)) * 16 + hexValue(body.charCodeAt(i + 2)); + i += 2; + } + length++; + previous = last; + last = code; + } + const padding = last === 61 ? previous === 61 ? 2 : 1 : 0; + return Math.floor((length - padding) * 3 / 4); +}; +const estimatePercentDecodedBase64Bytes = body => { + const len = body.length; + let significant = 0; + let padding = 0; + let invalid = false; + for (let i = 0; i < len; i++) { + let code = body.charCodeAt(i); + if (code === 37 /* '%' */ && isPercentEncodedByte(body, i, len)) { + code = hexValue(body.charCodeAt(i + 1)) * 16 + hexValue(body.charCodeAt(i + 2)); + i += 2; + } + if (isBase64Whitespace(code)) { + continue; + } + if (code === 61 /* '=' */) { + padding++; + continue; + } + if (!isBase64Char(code) || padding > 0) { + invalid = true; + continue; + } + significant++; + } + + // Fetch rejects malformed forgiving-base64 input. Returning the raw-size + // allocation bound keeps that invalid input from becoming a pre-check bypass. + if (invalid || padding > 2 || padding > 0 && (significant + padding) % 4 !== 0 || significant % 4 === 1) { + return estimateBase64BufferAllocation(body); + } + return base64Bytes(significant); +}; +const estimateDataURLBytes = (url, estimateBase64, base64Pattern) => { + if (!url || typeof url !== 'string') return 0; + if (!/^data:/i.test(url)) return 0; + const comma = url.indexOf(','); + if (comma < 0) return 0; + const meta = url.slice(5, comma); + const body = url.slice(comma + 1); + const isBase64 = base64Pattern.test(meta); + if (isBase64) { + return estimateBase64(body); + } + + // Compute UTF-8 byte length directly from UTF-16 code units without allocating + // a byte buffer (TextEncoder.encode would defeat the DoS guard on large bodies). + // Valid %XX triplets count as one decoded byte; this matches the bytes that + // decodeURIComponent(body) would produce before Buffer re-encodes the string. + let bytes = 0; + for (let i = 0, len = body.length; i < len; i++) { + const c = body.charCodeAt(i); + if (c === 37 /* '%' */ && isPercentEncodedByte(body, i, len)) { + bytes += 1; + i += 2; + } else if (c < 0x80) { + bytes += 1; + } else if (c < 0x800) { + bytes += 2; + } else if (c >= 0xd800 && c <= 0xdbff && i + 1 < len) { + const next = body.charCodeAt(i + 1); + if (next >= 0xdc00 && next <= 0xdfff) { + bytes += 4; + i++; + } else { + bytes += 3; + } + } else { + bytes += 3; + } + } + return bytes; +}; + +/** + * Estimate the percent-decoded payload size used by Fetch data: URLs. + * + * @param {string} url + * @returns {number} + */ +function estimateDataURLDecodedBytes(url) { + // Fetch removes URL fragments before processing a data: URL. + const fragmentIndex = typeof url === 'string' ? url.indexOf('#') : -1; + return estimateDataURLBytes(fragmentIndex === -1 ? url : url.slice(0, fragmentIndex), estimatePercentDecodedBase64Bytes, /; *base64[\t\n\f\r ]*$/i); +} + +/** + * Estimate the Buffer backing allocation used after Node's percent-decoding step. + * + * @param {string} url + * @returns {number} + */ +function estimateDataURLBufferAllocation(url) { + // Match fromDataURI's case-insensitive protocol and encoding suffix. + return estimateDataURLBytes(url, estimatePercentDecodedBase64BufferAllocation, /;base64$/i); +} + +const zlibOptions = { + flush: zlib.constants.Z_SYNC_FLUSH, + finishFlush: zlib.constants.Z_SYNC_FLUSH +}; +const brotliOptions = { + flush: zlib.constants.BROTLI_OPERATION_FLUSH, + finishFlush: zlib.constants.BROTLI_OPERATION_FLUSH +}; +const zstdOptions = { + flush: zlib.constants.ZSTD_e_flush, + finishFlush: zlib.constants.ZSTD_e_flush +}; +const isBrotliSupported = utils$1.isFunction(zlib.createBrotliDecompress); +const isZstdSupported = utils$1.isFunction(zlib.createZstdDecompress); +const ACCEPT_ENCODING = 'gzip, compress, deflate' + (isBrotliSupported ? ', br' : ''); +const ACCEPT_ENCODING_WITH_ZSTD = ACCEPT_ENCODING + (isZstdSupported ? ', zstd' : ''); +const scheduleProgress = typeof process !== 'undefined' && process.nextTick ? process.nextTick.bind(process) : utils$1.asap; +const { + http: httpFollow, + https: httpsFollow +} = followRedirects; +const isHttps = /https:?/; + +// Symbols used to bind a single 'error' listener to a pooled socket and track +// the request currently owning that socket across keep-alive reuse (issue #10780). +const kAxiosSocketListener = Symbol('axios.http.socketListener'); +const kAxiosCurrentReq = Symbol('axios.http.currentReq'); + +// A shared listener avoids retaining an adapter context for the lifetime of a +// pooled socket. EventEmitter invokes listeners with `this` set to the emitter. +function handleSocketError(err) { + const current = this[kAxiosCurrentReq]; + if (current && !current.destroyed) { + current.destroy(err); + } +} + +// Tags HttpsProxyAgent instances installed by setProxy() so the redirect path +// can strip them without clobbering a user-supplied agent that happens to be +// an HttpsProxyAgent. +const kAxiosInstalledTunnel = Symbol('axios.http.installedTunnel'); + +// Cache of CONNECT-tunneling agents keyed by proxy config so repeat requests +// through the same proxy reuse a single agent (and its socket pool). The +// keyspace is bounded by the set of distinct proxy configs the process uses, +// so unbounded growth is not a concern in practice. +const tunnelingAgentCache = new Map(); +const tunnelingAgentCacheUser = new WeakMap(); +const directAgents = new WeakMap(); +const directAgentHooks = ['createConnection', 'getName']; +const nativeAgentPoolHooks = ['addRequest', 'createSocket', 'removeSocket', 'keepSocketAlive', 'reuseSocket', '_getSession', '_cacheSession', '_evictSession']; +// Minimum minor versions where Node's HTTP Agent supports native proxyEnv +// handling. Checking the selected agent below also covers startup modes such +// as NODE_OPTIONS=--use-env-proxy and --no-use-env-proxy precedence. +const NODE_NATIVE_ENV_PROXY_SUPPORT = { + 22: 21, + 24: 5 +}; +function isNodeNativeEnvProxySupported(nodeVersion = process.versions && process.versions.node) { + if (!nodeVersion) { + return false; + } + const [major, minor] = nodeVersion.split('.').map(part => Number(part)); + if (!Number.isInteger(major) || !Number.isInteger(minor)) { + return false; + } + if (major > 24) { + return true; + } + return NODE_NATIVE_ENV_PROXY_SUPPORT[major] != null && minor >= NODE_NATIVE_ENV_PROXY_SUPPORT[major]; +} +function isNodeEnvProxyEnabled(agent, nodeVersion = process.versions && process.versions.node) { + if (!isNodeNativeEnvProxySupported(nodeVersion)) { + return false; + } + const agentOptions = agent && agent.options; + return Boolean(agentOptions && utils$1.hasOwnProp(agentOptions, 'proxyEnv') && agentOptions.proxyEnv != null); +} +function getProxyEnvAgent(options, configHttpAgent, configHttpsAgent) { + return isHttps.test(options.protocol) ? configHttpsAgent || https.globalAgent : configHttpAgent || http.globalAgent; +} +function getDirectAgent(configuredAgent, transport) { + if (!process.allowedNodeEnvironmentFlags || !process.allowedNodeEnvironmentFlags.has('--use-env-proxy')) { + return configuredAgent; + } + const agent = configuredAgent || transport.globalAgent; + const options = agent && agent.options; + if (!(agent instanceof transport.Agent) || agent.protocol !== transport.globalAgent.protocol || !options || !utils$1.hasOwnProp(options, 'proxyEnv') || typeof options.proxyEnv !== 'object' || options.proxyEnv === null) { + return configuredAgent; + } + + // These hooks own pool queues or TLS session state. Neither binding them to + // the source agent nor copying them without subclass state preserves their + // behavior on a separate direct pool. + for (const hook of nativeAgentPoolHooks) { + if (utils$1.isFunction(transport.Agent.prototype[hook]) && agent[hook] !== transport.Agent.prototype[hook]) { + throw new AxiosError('proxy: false cannot adapt an agent overriding ' + hook + '; use an agent constructed without proxyEnv', AxiosError.ERR_BAD_OPTION_VALUE); + } + } + + // Node snapshots proxyEnv when constructing the agent. Keep this check + // conservative even when the caller later removes protocol-specific entries. + let direct = directAgents.get(agent); + if (!direct) { + direct = new transport.Agent({ + ...options, + proxyEnv: undefined + }); + + // Agent.destroy() does not emit an event. Keep the associated pool under + // the configured agent's lifetime, including agents reused after destroy(). + const destroy = agent.destroy; + agent.destroy = function destroyWithDirectAgent() { + try { + return destroy.apply(this, arguments); + } finally { + direct.destroy(); + } + }; + directAgents.set(agent, direct); + } + + // Connections and pool keys do not own the direct pool's queues. Preserve + // their configured receiver and refresh hooks that change between requests. + for (const hook of directAgentHooks) { + direct[hook] = agent[hook] === transport.Agent.prototype[hook] ? transport.Agent.prototype[hook] : bind(agent[hook], agent); + } + return direct; +} +function setDirectAgent(options, configHttpAgent, configHttpsAgent) { + const secure = isHttps.test(options.protocol); + const agent = getDirectAgent(secure ? configHttpsAgent : configHttpAgent, secure ? https : http); + options.agent = agent; + if (options.agents) { + options.agents[secure ? 'https' : 'http'] = agent; + } +} +function getTunnelingAgent(agentOptions, userHttpsAgent) { + const key = agentOptions.protocol + '//' + agentOptions.hostname + ':' + (agentOptions.port || '') + '#' + (agentOptions.auth || ''); + const cache = userHttpsAgent ? tunnelingAgentCacheUser.get(userHttpsAgent) || tunnelingAgentCacheUser.set(userHttpsAgent, new Map()).get(userHttpsAgent) : tunnelingAgentCache; + let agent = cache.get(key); + if (agent) return agent; + // Preserve per-request TLS options for the proxy connection, with our proxy + // fields taking precedence. Global-agent options belong only to the origin + // TLS upgrade in the callback below. + const merged = userHttpsAgent && userHttpsAgent.options ? { + ...userHttpsAgent.options, + ...agentOptions + } : agentOptions; + agent = new HttpsProxyAgent(merged); + const callback = agent.callback; + agent.callback = function axiosTunnelingAgentCallback(req, opts) { + // Without a proxy the origin TLS connection would be made by https.globalAgent, + // so its options have to reach the tunneled origin too. Resolved per request + // because the tunneling agent outlives any one of them. + const originTLSAgent = userHttpsAgent || https.globalAgent; + const originTLSOptions = originTLSAgent && originTLSAgent.options; + // HttpsProxyAgent v5 reads callback opts for the post-CONNECT origin TLS upgrade. + return callback.call(this, req, { + ...originTLSOptions, + ...opts + }); + }; + agent[kAxiosInstalledTunnel] = true; + cache.set(key, agent); + return agent; +} +const supportedProtocols = platform.protocols.map(protocol => { + return protocol + ':'; +}); + +// Node's WHATWG URL parser returns `username` and `password` percent-encoded. +// Decode before composing the `auth` option so credentials such as +// `my%40email.com:pass` are sent as `my@email.com:pass`. Falls back to the +// original value for malformed input so a bad encoding never throws. +const decodeURIComponentSafe$1 = value => { + if (!utils$1.isString(value)) { + return value; + } + try { + return decodeURIComponent(value); + } catch (error) { + return value; + } +}; +const flushOnFinish = (stream, [throttled, flush]) => { + stream.on('end', flush).on('error', flush); + return throttled; +}; +const http2Sessions = new Http2Sessions(); + +/** + * If the proxy, auth, sensitive header, or config beforeRedirects functions are defined, + * call them with the options object. + * + * @param {Object} options - The options object that was passed to the request. + * + * @returns {Object} + */ +function dispatchBeforeRedirect(options, responseDetails, requestDetails) { + if (!isSameOriginRedirect(options, requestDetails)) { + stripMatchingHeaders(options.headers, new Set(['authorization', 'cookie'])); + delete options.auth; + } + if (options.beforeRedirects.proxy) { + options.beforeRedirects.proxy(options); + } + if (options.beforeRedirects.auth) { + options.beforeRedirects.auth(options); + } + if (options.beforeRedirects.sensitiveHeaders) { + options.beforeRedirects.sensitiveHeaders(options, requestDetails); + } + if (options.beforeRedirects.direct) { + options.beforeRedirects.direct(options); + } + if (options.beforeRedirects.config) { + options.beforeRedirects.config(options, responseDetails, requestDetails); + } +} +function stripMatchingHeaders(headers, sensitiveSet) { + if (!headers) { + return; + } + Object.keys(headers).forEach(header => { + if (sensitiveSet.has(header.toLowerCase())) { + delete headers[header]; + } + }); +} +function isSameOriginRedirect(redirectOptions, requestDetails) { + if (!requestDetails) { + return false; + } + try { + return new URL(requestDetails.url).origin === new URL(redirectOptions.href).origin; + } catch (e) { + // If origin comparison fails, treat the redirect as unsafe. + return false; + } +} + +/** + * If the proxy or config afterRedirects functions are defined, call them with the options + * + * @param {http.ClientRequestArgs} options + * @param {AxiosProxyConfig} configProxy configuration from Axios options object + * @param {string} location + * @param {boolean} [allowEnvProxy=true] whether environment proxy configuration can be used + * + * @returns {boolean} whether a proxy applies to the selected transport + */ +function setProxy(options, configProxy, location, isRedirect, configHttpsAgent, configHttpAgent, allowEnvProxy = true) { + let proxy = configProxy; + const proxyEnvAgent = getProxyEnvAgent(options, configHttpAgent, configHttpsAgent); + if (!proxy && proxy !== false && allowEnvProxy && !isNodeEnvProxyEnabled(proxyEnvAgent)) { + const proxyUrl = getProxyForUrl(location); + if (proxyUrl) { + if (!shouldBypassProxy(location)) { + proxy = new URL(proxyUrl); + } + } + } + // On redirect re-invocation, strip any stale Proxy-Authorization header carried + // over from the prior request (e.g. new target no longer uses a proxy, or uses + // a different proxy). Skip on the initial request so user-supplied headers are + // preserved. Header names are case-insensitive, so remove every case variant. + if (isRedirect && options.headers) { + for (const name of Object.keys(options.headers)) { + if (name.toLowerCase() === 'proxy-authorization') { + delete options.headers[name]; + } + } + } + // Strip any tunneling agent we installed for the previous hop so a redirect + // that drops the proxy or crosses an HTTPS↔HTTP boundary doesn't reuse a + // stale one. Match on our Symbol marker so a user-supplied HttpsProxyAgent + // (which won't carry the marker) is left alone. + if (isRedirect && options.agent && options.agent[kAxiosInstalledTunnel]) { + options.agent = undefined; + } + if (isRedirect && options.agents && options.agents.https && options.agents.https[kAxiosInstalledTunnel]) { + options.agents.https = configHttpsAgent; + } + if (proxy) { + // Read proxy fields without traversing the prototype chain. URL instances expose + // username/password/hostname/host/port/protocol via getters on URL.prototype (so + // direct reads are shielded), but plain object proxies — and the `auth` field + // (which URL does not expose) — must be guarded so a polluted Object.prototype + // (e.g. Object.prototype.auth = { username, password }) cannot inject + // attacker-controlled credentials into the Proxy-Authorization header or + // redirect proxying to an attacker-controlled host. + const isProxyURL = proxy instanceof URL; + const readProxyField = key => isProxyURL || utils$1.hasOwnProp(proxy, key) ? proxy[key] : undefined; + const proxyUsername = readProxyField('username'); + const proxyPassword = readProxyField('password'); + let proxyAuth = utils$1.hasOwnProp(proxy, 'auth') ? proxy.auth : undefined; + + // Basic proxy authorization + if (proxyUsername) { + proxyAuth = (proxyUsername || '') + ':' + (proxyPassword || ''); + } + if (proxyAuth) { + // Support proxy auth object form. Read sub-fields via own-prop checks so a + // plain object inheriting from polluted Object.prototype cannot leak creds. + const authIsObject = typeof proxyAuth === 'object'; + const authUsername = authIsObject && utils$1.hasOwnProp(proxyAuth, 'username') ? proxyAuth.username : undefined; + const authPassword = authIsObject && utils$1.hasOwnProp(proxyAuth, 'password') ? proxyAuth.password : undefined; + const validProxyAuth = Boolean(authUsername || authPassword); + if (validProxyAuth) { + proxyAuth = (authUsername || '') + ':' + (authPassword || ''); + } else if (authIsObject) { + throw new AxiosError('Invalid proxy authorization', AxiosError.ERR_BAD_OPTION, { + proxy + }); + } + } + const targetIsHttps = isHttps.test(options.protocol); + if (targetIsHttps) { + // CONNECT-tunneling path for HTTPS targets. Preserves end-to-end TLS to + // the origin so the proxy cannot inspect the URL, headers, or body — the + // behavior already promised by THREATMODEL.md (T-R9). HttpsProxyAgent + // sends Proxy-Authorization on the CONNECT request only, never on the + // wrapped TLS request, which is why we don't stamp it onto + // options.headers here. If the user already supplied an HttpsProxyAgent, + // they own tunneling end-to-end and we leave them alone; otherwise we + // install our own tunneling agent and forward their TLS options (if any) + // so a custom httpsAgent for cert pinning / rejectUnauthorized still + // applies to the origin TLS upgrade. + if (!(configHttpsAgent instanceof HttpsProxyAgent)) { + const proxyHost = readProxyField('hostname') || readProxyField('host'); + const proxyPort = readProxyField('port'); + const rawProxyProtocol = readProxyField('protocol'); + const normalizedProtocol = rawProxyProtocol ? rawProxyProtocol.includes(':') ? rawProxyProtocol : `${rawProxyProtocol}:` : 'http:'; + // Bracket IPv6 literals for URL parsing; URL.hostname strips the + // brackets again on read so the agent receives the raw form. + const proxyHostForURL = proxyHost && proxyHost.includes(':') && !proxyHost.startsWith('[') ? `[${proxyHost}]` : proxyHost; + const proxyURL = new URL(`${normalizedProtocol}//${proxyHostForURL}${proxyPort ? ':' + proxyPort : ''}`); + const agentOptions = { + protocol: proxyURL.protocol, + hostname: proxyURL.hostname.replace(/^\[|\]$/g, ''), + port: proxyURL.port, + auth: proxyAuth && typeof proxyAuth === 'string' ? proxyAuth : undefined + }; + if (proxyURL.protocol === 'https:') { + agentOptions.ALPNProtocols = ['http/1.1']; + } + const tunnelingAgent = getTunnelingAgent(agentOptions, configHttpsAgent); + // Set both: `options.agent` is consumed by the native https.request path + // (maxRedirects === 0); `options.agents.https` is consumed by + // follow-redirects, which ignores `options.agent` when `options.agents` + // is present. + options.agent = tunnelingAgent; + if (options.agents) { + options.agents.https = tunnelingAgent; + } + } + } else { + // Forward-proxy mode for plaintext HTTP targets. The request line carries + // the absolute URL and the proxy sees everything — acceptable for plain + // HTTP since the wire was already plaintext. + if (proxyAuth) { + const base64 = Buffer.from(proxyAuth, 'utf8').toString('base64'); + options.headers['Proxy-Authorization'] = 'Basic ' + base64; + } + + // Preserve a user-supplied Host header (case-insensitive) so callers can override + // the value forwarded to the proxy; otherwise default to the request URL's host. + let hasUserHostHeader = false; + for (const name of Object.keys(options.headers)) { + if (name.toLowerCase() === 'host') { + hasUserHostHeader = true; + break; + } + } + if (!hasUserHostHeader) { + options.headers.host = options.hostname + (options.port ? ':' + options.port : ''); + } + const proxyHost = readProxyField('hostname') || readProxyField('host'); + options.hostname = proxyHost; + // Replace 'host' since options is not a URL object + options.host = proxyHost; + options.port = readProxyField('port'); + options.path = location; + const proxyProtocol = readProxyField('protocol'); + if (proxyProtocol) { + options.protocol = proxyProtocol.includes(':') ? proxyProtocol : `${proxyProtocol}:`; + } + } + } + options.beforeRedirects.proxy = function beforeRedirect(redirectOptions) { + // Configure proxy for redirected request, passing the original config proxy to apply + // the exact same logic as if the redirected request was performed by axios directly. + setProxy(redirectOptions, configProxy, redirectOptions.href, true, configHttpsAgent, configHttpAgent, allowEnvProxy); + }; + return Boolean(proxy || configProxy !== false && allowEnvProxy && isNodeEnvProxyEnabled(proxyEnvAgent)); +} +const isHttpAdapterSupported = typeof process !== 'undefined' && utils$1.kindOf(process) === 'process'; + +// temporary hotfix + +const wrapAsync = asyncExecutor => { + return new Promise((resolve, reject) => { + let onDone; + let isDone; + const done = (value, isRejected) => { + if (isDone) return; + isDone = true; + onDone && onDone(value, isRejected); + }; + const _resolve = value => { + done(value); + resolve(value); + }; + const _reject = reason => { + done(reason, true); + reject(reason); + }; + asyncExecutor(_resolve, _reject, onDoneHandler => onDone = onDoneHandler).catch(_reject); + }); +}; +const resolveFamily = ({ + address, + family +}) => { + if (!utils$1.isString(address)) { + throw new AxiosError('address must be a string', AxiosError.ERR_BAD_OPTION_VALUE); + } + return { + address, + family: family || (address.indexOf('.') < 0 ? 6 : 4) + }; +}; +const buildAddressEntry = (address, family) => resolveFamily(utils$1.isObject(address) ? address : { + address, + family +}); +const normalizedLookupCache = new WeakMap(); +const normalizeLookup = lookup => { + let normalized = normalizedLookupCache.get(lookup); + if (normalized) { + return normalized; + } + const callbackLookup = callbackify(lookup, value => utils$1.isArray(value) ? value : [value]); + + // Support opt.all, which is required by current Node.js releases. + normalized = (hostname, opt, cb) => { + callbackLookup(hostname, opt, (err, arg0, arg1) => { + if (err) { + return cb(err); + } + let addresses; + try { + addresses = utils$1.isArray(arg0) ? arg0.map(addr => buildAddressEntry(addr)) : [buildAddressEntry(arg0, arg1)]; + } catch (error) { + return cb(error); + } + opt.all ? cb(err, addresses) : cb(err, addresses[0].address, addresses[0].family); + }); + }; + normalizedLookupCache.set(lookup, normalized); + return normalized; +}; +const http2Transport = { + request(options, cb) { + const authority = options.protocol + '//' + options.hostname + ':' + (options.port || (options.protocol === 'https:' ? 443 : 80)); + const { + http2Options, + headers + } = options; + const session = http2Sessions.getSession(authority, http2Options); + const { + HTTP2_HEADER_SCHEME, + HTTP2_HEADER_METHOD, + HTTP2_HEADER_PATH, + HTTP2_HEADER_STATUS + } = http2.constants; + const http2Headers = { + [HTTP2_HEADER_SCHEME]: options.protocol.replace(':', ''), + [HTTP2_HEADER_METHOD]: options.method, + [HTTP2_HEADER_PATH]: options.path + }; + utils$1.forEach(headers, (header, name) => { + name.charAt(0) !== ':' && (http2Headers[name] = header); + }); + const req = session.request(http2Headers); + req.once('response', responseHeaders => { + const response = req; //duplex + + responseHeaders = Object.assign({}, responseHeaders); + const status = responseHeaders[HTTP2_HEADER_STATUS]; + delete responseHeaders[HTTP2_HEADER_STATUS]; + response.headers = responseHeaders; + response.statusCode = +status; + cb(response); + }); + return req; + } +}; + +/*eslint consistent-return:0*/ +var httpAdapter = isHttpAdapterSupported && function httpAdapter(config) { + return wrapAsync(async function dispatchHttpRequest(resolve, reject, onDone) { + // Read config pollution-safely: own properties and members inherited from + // a non-Object.prototype source (e.g. an Object.create(defaults) template) + // are honored, but values injected onto a polluted Object.prototype are + // ignored. All behavior-affecting reads in this adapter go through own() + // so the protection boundary stays consistent. + const own = key => utils$1.getSafeProp(config, key); + const transitional = own('transitional') || transitionalDefaults; + let data = own('data'); + let lookup = own('lookup'); + let family = own('family'); + let httpVersion = own('httpVersion'); + if (httpVersion === undefined) httpVersion = 1; + const rawHttpVersion = httpVersion; + let http2Options = own('http2Options'); + const configProxy = own('proxy'); + const httpAgent = own('httpAgent'); + const httpsAgent = own('httpsAgent'); + const responseType = own('responseType'); + const responseEncoding = own('responseEncoding'); + const socketPath = own('socketPath'); + const method = own('method').toUpperCase(); + const maxRedirects = own('maxRedirects'); + const maxBodyLength = own('maxBodyLength'); + const maxContentLength = own('maxContentLength'); + const decompress = own('decompress'); + let isDone; + let rejected = false; + let req; + let connectPhaseTimer; + try { + httpVersion = +httpVersion; + } catch (err) { + throw new AxiosError('Invalid protocol version: value is not a number', AxiosError.ERR_BAD_OPTION_VALUE, config); + } + if (Number.isNaN(httpVersion)) { + throw new AxiosError(`Invalid protocol version: '${rawHttpVersion}' is not a number`, AxiosError.ERR_BAD_OPTION_VALUE, config); + } + if (httpVersion !== 1 && httpVersion !== 2) { + throw new AxiosError(`Unsupported protocol version '${httpVersion}'`, AxiosError.ERR_BAD_OPTION_VALUE, config); + } + const isHttp2 = httpVersion === 2; + if (lookup) { + lookup = normalizeLookup(lookup); + } + const abortEmitter = new events.EventEmitter(); + function abort(reason) { + try { + abortEmitter.emit('abort', !reason || reason.type ? new CanceledError(null, config, req) : reason); + } catch (err) { + // ignore emit errors + } + } + function clearConnectPhaseTimer() { + if (connectPhaseTimer) { + clearTimeout(connectPhaseTimer); + connectPhaseTimer = null; + } + } + function createTimeoutError() { + const configTimeout = own('timeout'); + let timeoutErrorMessage = configTimeout ? 'timeout of ' + configTimeout + 'ms exceeded' : 'timeout exceeded'; + const configTimeoutErrorMessage = own('timeoutErrorMessage'); + if (configTimeoutErrorMessage) { + timeoutErrorMessage = configTimeoutErrorMessage; + } + return new AxiosError(timeoutErrorMessage, transitional.clarifyTimeoutError ? AxiosError.ETIMEDOUT : AxiosError.ECONNABORTED, config, req); + } + abortEmitter.once('abort', reject); + const onFinished = () => { + clearConnectPhaseTimer(); + if (config.cancelToken) { + config.cancelToken.unsubscribe(abort); + } + if (config.signal) { + config.signal.removeEventListener('abort', abort); + } + abortEmitter.removeAllListeners(); + }; + if (config.cancelToken || config.signal) { + config.cancelToken && config.cancelToken.subscribe(abort); + if (config.signal) { + config.signal.aborted ? abort() : config.signal.addEventListener('abort', abort); + } + } + onDone((response, isRejected) => { + isDone = true; + clearConnectPhaseTimer(); + if (isRejected) { + rejected = true; + onFinished(); + return; + } + const { + data + } = response; + if (data instanceof stream.Readable || data instanceof stream.Duplex) { + const offListeners = stream.finished(data, () => { + offListeners(); + onFinished(); + }); + } else { + onFinished(); + } + }); + + // Parse url + const fullPath = buildFullPath(own('baseURL'), own('url'), own('allowAbsoluteUrls'), config); + // Unix-socket requests (own socketPath) commonly pass a path-only url + // like '/foo'; supply a synthetic base so new URL() can still parse it. + // Use the own-property value (not config.socketPath) so a polluted + // prototype cannot influence URL base selection. + const urlBase = socketPath ? 'http://localhost' : platform.hasBrowserEnv ? platform.origin : undefined; + const parsed = new URL(fullPath, urlBase); + const protocol = parsed.protocol || supportedProtocols[0]; + if (protocol === 'data:') { + // Apply the same semantics as HTTP: only enforce if a finite, non-negative cap is set. + if (maxContentLength > -1) { + // Use the exact string passed to fromDataURI (the configured url); fall back to fullPath if needed. + const dataUrl = String(own('url') || fullPath || ''); + const estimated = estimateDataURLBufferAllocation(dataUrl); + if (estimated > maxContentLength) { + return reject(new AxiosError('maxContentLength size of ' + maxContentLength + ' exceeded', AxiosError.ERR_BAD_RESPONSE, config)); + } + } + let convertedData; + if (method !== 'GET') { + return settle(resolve, reject, { + status: 405, + statusText: 'method not allowed', + headers: {}, + config + }); + } + try { + convertedData = fromDataURI(own('url'), responseType === 'blob', { + Blob: config.env && config.env.Blob + }); + } catch (err) { + throw AxiosError.from(err, AxiosError.ERR_BAD_REQUEST, config); + } + + // Check bytes before converting the result to text or a stream. + if (maxContentLength > -1 && (responseType === 'blob' ? convertedData.size : convertedData.length) > maxContentLength) { + return reject(new AxiosError('maxContentLength size of ' + maxContentLength + ' exceeded', AxiosError.ERR_BAD_RESPONSE, config)); + } + if (responseType === 'text') { + convertedData = convertedData.toString(responseEncoding); + if (!responseEncoding || responseEncoding === 'utf8') { + convertedData = utils$1.stripBOM(convertedData); + } + } else if (responseType === 'stream') { + convertedData = stream.Readable.from(convertedData); + } + return settle(resolve, reject, { + data: convertedData, + status: 200, + statusText: 'OK', + headers: new AxiosHeaders(), + config + }); + } + if (supportedProtocols.indexOf(protocol) === -1) { + return reject(new AxiosError('Unsupported protocol ' + protocol, AxiosError.ERR_BAD_REQUEST, config)); + } + const headers = AxiosHeaders.from(config.headers).normalize(); + + // Set User-Agent (required by some servers) + // See https://github.com/axios/axios/issues/69 + // User-Agent is specified; handle case where no UA header is desired + // Only set header if it hasn't been set in config + headers.set('User-Agent', 'axios/' + VERSION, false); + const { + onUploadProgress, + onDownloadProgress + } = config; + const maxRate = config.maxRate; + let maxUploadRate = undefined; + let maxDownloadRate = undefined; + + // support for spec compliant FormData objects + if (utils$1.isSpecCompliantForm(data)) { + const userBoundary = headers.getContentType(/boundary=([-_\w\d]{10,70})/i); + data = formDataToStream(data, formHeaders => { + headers.set(formHeaders); + }, { + tag: `axios-${VERSION}-boundary`, + boundary: userBoundary && userBoundary[1] || undefined + }); + // support for https://www.npmjs.com/package/form-data api + } else if (utils$1.isFormData(data) && utils$1.isFunction(data.getHeaders) && data.getHeaders !== Object.prototype.getHeaders) { + setFormDataHeaders(headers, data.getHeaders(), own('formDataHeaderPolicy')); + if (!headers.hasContentLength()) { + try { + const knownLength = await util.promisify(data.getLength).call(data); + Number.isFinite(knownLength) && knownLength >= 0 && headers.setContentLength(knownLength); + /*eslint no-empty:0*/ + } catch (e) {} + } + } else if (utils$1.isBlob(data) || utils$1.isFile(data)) { + data.size && headers.setContentType(data.type || 'application/octet-stream'); + headers.setContentLength(data.size || 0); + data = stream.Readable.from(readBlob(data)); + } else if (data && !utils$1.isStream(data)) { + if (Buffer.isBuffer(data)) ; else if (utils$1.isArrayBuffer(data)) { + data = Buffer.from(new Uint8Array(data)); + } else if (utils$1.isString(data)) { + data = Buffer.from(data, 'utf-8'); + } else { + return reject(new AxiosError('Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream', AxiosError.ERR_BAD_REQUEST, config)); + } + + // Add Content-Length header if data exists + headers.setContentLength(data.length, false); + if (maxBodyLength > -1 && data.length > maxBodyLength) { + return reject(new AxiosError('Request body larger than maxBodyLength limit', AxiosError.ERR_BAD_REQUEST, config)); + } + } + const contentLength = utils$1.toFiniteNumber(headers.getContentLength()); + if (utils$1.isArray(maxRate)) { + maxUploadRate = maxRate[0]; + maxDownloadRate = maxRate[1]; + } else { + maxUploadRate = maxDownloadRate = maxRate; + } + if (data && (onUploadProgress || maxUploadRate)) { + if (!utils$1.isStream(data)) { + data = stream.Readable.from(data, { + objectMode: false + }); + } + data = stream.pipeline([data, new AxiosTransformStream({ + maxRate: utils$1.toFiniteNumber(maxUploadRate) + })], utils$1.noop); + onUploadProgress && data.on('progress', flushOnFinish(data, progressEventDecorator(contentLength, progressEventReducer(asyncDecorator(onUploadProgress, scheduleProgress), false, 3)))); + } + + // HTTP basic authentication + let auth = undefined; + const configAuth = own('auth'); + if (configAuth) { + const username = utils$1.getSafeProp(configAuth, 'username') || ''; + const password = utils$1.getSafeProp(configAuth, 'password') || ''; + auth = username + ':' + password; + } + if (!auth && (parsed.username || parsed.password)) { + const urlUsername = decodeURIComponentSafe$1(parsed.username); + const urlPassword = decodeURIComponentSafe$1(parsed.password); + auth = urlUsername + ':' + urlPassword; + } + auth && headers.delete('authorization'); + let path$1; + try { + path$1 = buildURL(parsed.pathname + parsed.search, own('params'), own('paramsSerializer')).replace(/^\?/, ''); + } catch (err) { + return reject(AxiosError.from(err, AxiosError.ERR_BAD_REQUEST, config, null, null, { + url: own('url'), + exists: true + })); + } + headers.set('Accept-Encoding', utils$1.hasOwnProp(transitional, 'advertiseZstdAcceptEncoding') && transitional.advertiseZstdAcceptEncoding === true ? ACCEPT_ENCODING_WITH_ZSTD : ACCEPT_ENCODING, false); + if (isHttp2 && lookup) { + http2Options = Object.assign(Object.create(null), http2Options, { + lookup + }); + } + + // Null-prototype to block prototype pollution gadgets on properties read + // directly by Node's http.request (e.g. insecureHTTPParser, lookup). + const options = Object.assign(Object.create(null), { + path: path$1, + method: method, + headers: toByteStringHeaderObject(headers), + agents: { + http: httpAgent, + https: httpsAgent + }, + auth, + protocol, + family, + beforeRedirect: dispatchBeforeRedirect, + beforeRedirects: Object.create(null), + http2Options, + createConnection: undefined + }); + + // cacheable-lookup integration hotfix + !utils$1.isUndefined(lookup) && (options.lookup = lookup); + let proxyApplied = false; + if (socketPath) { + if (typeof socketPath !== 'string') { + return reject(new AxiosError('socketPath must be a string', AxiosError.ERR_BAD_OPTION_VALUE, config)); + } + const allowedSocketPaths = own('allowedSocketPaths'); + if (allowedSocketPaths != null) { + const allowed = Array.isArray(allowedSocketPaths) ? allowedSocketPaths : [allowedSocketPaths]; + const resolvedSocket = path.resolve(socketPath); + const isAllowed = allowed.some(entry => typeof entry === 'string' && path.resolve(entry) === resolvedSocket); + if (!isAllowed) { + return reject(new AxiosError(`socketPath "${socketPath}" is not permitted by allowedSocketPaths`, AxiosError.ERR_BAD_OPTION_VALUE, config)); + } + } + options.socketPath = socketPath; + } else { + options.hostname = parsed.hostname.startsWith('[') ? parsed.hostname.slice(1, -1) : parsed.hostname; + options.port = parsed.port; + proxyApplied = setProxy(options, configProxy, protocol + '//' + parsed.hostname + (parsed.port ? ':' + parsed.port : '') + options.path, false, httpsAgent, httpAgent, + // The HTTP/2 transport connects independently of HTTP/1 agents, so it + // cannot apply either axios-resolved or agent-local environment proxies. + // Explicit proxy config is still processed and rejected below. + !isHttp2); + } + let transport; + let isNativeTransport = false; + const isHttpsRequest = isHttps.test(options.protocol); + // Don't clobber a CONNECT-tunneling agent installed by setProxy() for an + // HTTPS target. + if (!isHttp2 && configProxy === false) { + setDirectAgent(options, httpAgent, httpsAgent); + options.beforeRedirects.direct = redirectOptions => { + setDirectAgent(redirectOptions, httpAgent, httpsAgent); + }; + } else if (options.agent == null) { + options.agent = isHttpsRequest ? httpsAgent : httpAgent; + } + if (isHttp2) { + if (proxyApplied) { + return reject(new AxiosError('HTTP/2 requests with a proxy are not supported', AxiosError.ERR_NOT_SUPPORT, config)); + } + transport = http2Transport; + } else { + const configTransport = own('transport'); + if (configTransport) { + transport = configTransport; + } else if (maxRedirects === 0) { + transport = isHttpsRequest ? https : http; + isNativeTransport = true; + } else { + options.sensitiveHeaders = []; + if (maxRedirects) { + options.maxRedirects = maxRedirects; + } + const configBeforeRedirect = own('beforeRedirect'); + if (configBeforeRedirect) { + options.beforeRedirects.config = configBeforeRedirect; + } + if (auth) { + // Restore HTTP Basic credentials on same-origin redirects only. + // follow-redirects >= 1.15.8 strips Authorization on every redirect (see #6929); + // cross-origin stripping is the documented mitigation for T-R2 in THREATMODEL.md + // and is preserved by deliberately not restoring on origin change. + const requestOrigin = parsed.origin; + const authToRestore = auth; + options.beforeRedirects.auth = function beforeRedirectAuth(redirectOptions) { + try { + if (new URL(redirectOptions.href).origin === requestOrigin) { + redirectOptions.auth = authToRestore; + } + } catch (e) { + // ignore malformed URL: leaving auth stripped is fail-safe + } + }; + } + const sensitiveHeaders = own('sensitiveHeaders'); + if (sensitiveHeaders != null) { + if (!utils$1.isArray(sensitiveHeaders)) { + return reject(new AxiosError('sensitiveHeaders must be an array of strings', AxiosError.ERR_BAD_OPTION_VALUE, config)); + } + const sensitiveSet = new Set(); + for (const header of sensitiveHeaders) { + if (!utils$1.isString(header)) { + return reject(new AxiosError('sensitiveHeaders must be an array of strings', AxiosError.ERR_BAD_OPTION_VALUE, config)); + } + sensitiveSet.add(header.toLowerCase()); + } + if (sensitiveSet.size) { + options.sensitiveHeaders = Array.from(sensitiveSet); + options.beforeRedirects.sensitiveHeaders = function beforeRedirectSensitiveHeaders(redirectOptions, requestDetails) { + if (!isSameOriginRedirect(redirectOptions, requestDetails)) { + stripMatchingHeaders(redirectOptions.headers, sensitiveSet); + } + }; + } + } + transport = isHttpsRequest ? httpsFollow : httpFollow; + } + } + + // Set an explicit maxBodyLength option for transports that inspect it. + // When maxBodyLength is -1 (default/unlimited), use Infinity so + // follow-redirects does not fall back to its own 10MB default. + if (maxBodyLength > -1) { + options.maxBodyLength = maxBodyLength; + } else { + options.maxBodyLength = Infinity; + } + + // Always set an explicit own value so a polluted + // Object.prototype.insecureHTTPParser cannot enable the lenient parser + // through Node's internal options copy + options.insecureHTTPParser = Boolean(own('insecureHTTPParser')); + + // Create the request + req = transport.request(options, function handleResponse(res) { + clearConnectPhaseTimer(); + if (req.destroyed) return; + const streams = [res]; + const responseLength = utils$1.toFiniteNumber(res.headers['content-length']); + if (onDownloadProgress || maxDownloadRate) { + const transformStream = new AxiosTransformStream({ + maxRate: utils$1.toFiniteNumber(maxDownloadRate) + }); + onDownloadProgress && transformStream.on('progress', flushOnFinish(transformStream, progressEventDecorator(responseLength, progressEventReducer(asyncDecorator(onDownloadProgress, scheduleProgress), true, 3)))); + streams.push(transformStream); + } + + // decompress the response body transparently if required + let responseStream = res; + + // return the last request in case of redirects + const lastRequest = res.req || req; + + // if decompress disabled we should not decompress + if (decompress !== false && res.headers['content-encoding']) { + // if no content, but headers still say that it is encoded, + // remove the header not confuse downstream operations + if (method === 'HEAD' || res.statusCode === 204) { + delete res.headers['content-encoding']; + } + switch ((res.headers['content-encoding'] || '').toLowerCase()) { + /*eslint default-case:0*/ + case 'gzip': + case 'x-gzip': + case 'compress': + case 'x-compress': + // add the unzipper to the body stream processing pipeline + streams.push(zlib.createUnzip(zlibOptions)); + + // remove the content-encoding in order to not confuse downstream operations + delete res.headers['content-encoding']; + break; + case 'deflate': + streams.push(new ZlibHeaderTransformStream()); + + // add the unzipper to the body stream processing pipeline + streams.push(zlib.createUnzip(zlibOptions)); + + // remove the content-encoding in order to not confuse downstream operations + delete res.headers['content-encoding']; + break; + case 'br': + if (isBrotliSupported) { + streams.push(zlib.createBrotliDecompress(brotliOptions)); + delete res.headers['content-encoding']; + } + break; + case 'zstd': + if (isZstdSupported) { + streams.push(zlib.createZstdDecompress(zstdOptions)); + delete res.headers['content-encoding']; + } + break; + } + } + responseStream = streams.length > 1 ? stream.pipeline(streams, utils$1.noop) : streams[0]; + const response = { + status: res.statusCode, + statusText: res.statusMessage, + headers: new AxiosHeaders(res.headers), + config, + request: lastRequest + }; + if (responseType === 'stream') { + // Enforce maxContentLength on streamed responses; previously this + // was applied only to buffered responses. + if (maxContentLength > -1) { + const limit = maxContentLength; + const source = responseStream; + async function* enforceMaxContentLength() { + let totalResponseBytes = 0; + for await (const chunk of source) { + totalResponseBytes += chunk.length; + if (totalResponseBytes > limit) { + throw new AxiosError('maxContentLength size of ' + limit + ' exceeded', AxiosError.ERR_BAD_RESPONSE, config, lastRequest); + } + yield chunk; + } + } + responseStream = stream.Readable.from(enforceMaxContentLength(), { + objectMode: false + }); + } + response.data = responseStream; + settle(resolve, reject, response); + } else { + const responseBuffer = []; + let totalResponseBytes = 0; + responseStream.on('data', function handleStreamData(chunk) { + responseBuffer.push(chunk); + totalResponseBytes += chunk.length; + + // make sure the content length is not over the maxContentLength if specified + if (maxContentLength > -1 && totalResponseBytes > maxContentLength) { + // stream.destroy() emit aborted event before calling reject() on Node.js v16 + rejected = true; + responseStream.destroy(); + abort(new AxiosError('maxContentLength size of ' + maxContentLength + ' exceeded', AxiosError.ERR_BAD_RESPONSE, config, lastRequest)); + } + }); + responseStream.on('aborted', function handlerStreamAborted() { + if (rejected) { + return; + } + const err = new AxiosError('stream has been aborted', AxiosError.ERR_BAD_RESPONSE, config, lastRequest, response); + responseStream.destroy(err); + reject(err); + }); + responseStream.on('error', function handleStreamError(err) { + if (rejected) return; + reject(AxiosError.from(err, null, config, lastRequest, response)); + }); + responseStream.on('end', function handleStreamEnd() { + try { + let responseData = responseBuffer.length === 1 ? responseBuffer[0] : Buffer.concat(responseBuffer); + if (responseType !== 'arraybuffer') { + responseData = responseData.toString(responseEncoding); + if (!responseEncoding || responseEncoding === 'utf8') { + responseData = utils$1.stripBOM(responseData); + } + } + response.data = responseData; + } catch (err) { + return reject(AxiosError.from(err, null, config, response.request, response)); + } + settle(resolve, reject, response); + }); + } + abortEmitter.once('abort', err => { + if (!responseStream.destroyed) { + responseStream.emit('error', err); + responseStream.destroy(); + } + }); + }); + abortEmitter.once('abort', err => { + if (req.close) { + req.close(); + } else { + req.destroy(err); + } + }); + + // Handle errors + req.on('error', function handleRequestError(err) { + reject(AxiosError.from(err, null, config, req)); + }); + + // set tcp keep alive to prevent drop connection by peer + // Track every socket bound to this outer RedirectableRequest so a single + // 'close' listener can release ownership on all of them. follow-redirects + // re-emits the 'socket' event for each hop's native request onto the same + // outer request, so attaching per-request listeners inside this handler + // would accumulate across hops and trigger MaxListenersExceededWarning at + // >= 11 redirects. Clearing only the last-bound socket would leave stale + // kAxiosCurrentReq refs on earlier hop sockets returned to the keep-alive + // pool, causing an idle-pool 'error' to be attributed to a closed req. + const boundSockets = new Set(); + req.on('socket', function handleRequestSocket(socket) { + // default interval of sending ack packet is 1 minute + // proxy agents (e.g. agent-base) may return a generic Duplex stream + // that doesn't have setKeepAlive, so guard before calling + if (typeof socket.setKeepAlive === 'function') { + socket.setKeepAlive(true, 1000 * 60); + } + + // Install one shared 'error' listener per socket. The symbol follows the + // currently-active request as pooled sockets are reassigned (issue #10780). + if (!socket[kAxiosSocketListener]) { + socket.on('error', handleSocketError); + socket[kAxiosSocketListener] = true; + } + socket[kAxiosCurrentReq] = req; + boundSockets.add(socket); + }); + req.once('close', function clearCurrentReq() { + clearConnectPhaseTimer(); + for (const socket of boundSockets) { + if (socket[kAxiosCurrentReq] === req) { + socket[kAxiosCurrentReq] = null; + } + } + boundSockets.clear(); + }); + + // Handle request timeout + if (own('timeout')) { + // This is forcing a int timeout to avoid problems if the `req` interface doesn't handle other types. + const timeout = parseInt(own('timeout'), 10); + if (Number.isNaN(timeout)) { + abort(new AxiosError('error trying to parse `config.timeout` to int', AxiosError.ERR_BAD_OPTION_VALUE, config, req)); + return; + } + const handleTimeout = function handleTimeout() { + if (isDone) return; + abort(createTimeoutError()); + }; + if (isNativeTransport && timeout > 0) { + // Native ClientRequest#setTimeout starts from the socket lifecycle and + // may not fire while TCP connect is still pending. Mirror the + // follow-redirects wall-clock timer for the maxRedirects === 0 path. + connectPhaseTimer = setTimeout(handleTimeout, timeout); + } + + // Sometime, the response will be very slow, and does not respond, the connect event will be block by event loop system. + // And timer callback will be fired, and abort() will be invoked before connection, then get "socket hang up" and code ECONNRESET. + // At this time, if we have a large number of request, nodejs will hang up some socket on background. and the number will up and up. + // And then these socket which be hang up will devouring CPU little by little. + // ClientRequest.setTimeout will be fired on the specify milliseconds, and can make sure that abort() will be fired after connect. + req.setTimeout(timeout, handleTimeout); + } else { + // explicitly reset the socket timeout value for a possible `keep-alive` request + req.setTimeout(0); + } + + // Send the request + if (utils$1.isStream(data)) { + let ended = false; + let errored = false; + data.on('end', () => { + ended = true; + }); + data.once('error', err => { + errored = true; + req.destroy(err); + }); + data.on('close', () => { + if (!ended && !errored) { + abort(new CanceledError('Request stream has been aborted', config, req)); + } + }); + + // Transform decodes string chunks to Buffers before counting, so every + // transport receives at most maxBodyLength encoded bytes. + let uploadStream = data; + if (maxBodyLength > -1) { + const limit = maxBodyLength; + let bytesSent = 0; + uploadStream = stream.pipeline([data, new stream.Transform({ + transform(chunk, _enc, cb) { + bytesSent += chunk.length; + if (bytesSent > limit) { + return cb(new AxiosError('Request body larger than maxBodyLength limit', AxiosError.ERR_BAD_REQUEST, config, req)); + } + cb(null, chunk); + } + })], utils$1.noop); + uploadStream.on('error', err => { + if (!req.destroyed) req.destroy(err); + }); + } + uploadStream.pipe(req); + } else { + data && req.write(data); + req.end(); + } + }); +}; + +const decodeCookieValue = value => { + try { + return decodeURIComponent(value); + } catch (e) { + return value; + } +}; +var cookies = platform.hasStandardBrowserEnv ? +// Standard browser envs support document.cookie +{ + write(name, value, expires, path, domain, secure, sameSite) { + if (typeof document === 'undefined') return; + const cookie = [`${name}=${encodeURIComponent(value)}`]; + if (utils$1.isNumber(expires)) { + cookie.push(`expires=${new Date(expires).toUTCString()}`); + } + if (utils$1.isString(path)) { + cookie.push(`path=${path}`); + } + if (utils$1.isString(domain)) { + cookie.push(`domain=${domain}`); + } + if (secure === true) { + cookie.push('secure'); + } + if (utils$1.isString(sameSite)) { + cookie.push(`SameSite=${sameSite}`); + } + document.cookie = cookie.join('; '); + }, + read(name) { + if (typeof document === 'undefined') return null; + const cookieString = document.cookie; + if (!cookieString) return null; + // Match name=value by splitting on the semicolon separator instead of building a + // RegExp from `name` — interpolating an unescaped string into a RegExp would let + // metacharacters (e.g. `.+?` in an attacker-influenced cookie name) cause ReDoS or + // match the wrong cookie. Browsers may serialize cookie pairs as either ";" or + // "; ", so ignore optional whitespace before each cookie name. + const cookies = cookieString.split(';'); + for (let i = 0; i < cookies.length; i++) { + const cookie = cookies[i].replace(/^\s+/, ''); + const eq = cookie.indexOf('='); + if (eq !== -1 && cookie.slice(0, eq) === name) { + return decodeCookieValue(cookie.slice(eq + 1)); + } + } + return null; + }, + async readAsync(name) { + try { + const store = typeof window !== 'undefined' && window.cookieStore; + if (store && utils$1.isFunction(store.get)) { + const cookie = await store.get(name); + // Both APIs expose stored bytes; preserve Axios's existing URI decoding. + return cookie ? decodeCookieValue(cookie.value) : null; + } + } catch (e) { + // Restricted or unavailable storage retains the synchronous fallback. + } + return this.read(name); + }, + remove(name) { + this.write(name, '', Date.now() - 86400000, '/'); + } +} : +// Non-standard browser env (web workers, react-native) lack needed support. +{ + write() {}, + read() { + return null; + }, + async readAsync() { + return null; + }, + remove() {} +}; + +var isURLSameOrigin = platform.hasStandardBrowserEnv ? (origin => url => { + url = new URL(url, document.baseURI || platform.origin); + return origin.protocol === url.protocol && origin.host === url.host && origin.port === url.port; +})(new URL(platform.origin)) : () => true; + +function assertParamsAcyclic(params) { + const pending = [{ + value: params + }]; + const active = new WeakSet(); + const visited = new WeakSet(); + while (pending.length) { + const { + value, + done + } = pending.pop(); + if (!utils$1.isPlainObject(value) && !utils$1.isArray(value)) continue; + if (done) { + active.delete(value); + continue; + } + if (active.has(value)) { + throw new AxiosError('Circular reference detected in params', AxiosError.ERR_BAD_OPTION_VALUE); + } + if (visited.has(value)) continue; + visited.add(value); + active.add(value); + pending.push({ + value, + done: true + }); + const keys = Object.keys(value); + if (Object.getOwnPropertySymbols && Object.getOwnPropertyDescriptor) { + Object.getOwnPropertySymbols(value).forEach(key => { + const descriptor = Object.getOwnPropertyDescriptor(value, key); + if (descriptor && descriptor.enumerable) keys.push(key); + }); + } + // Shallow array elements retain fields filtered during plain-object merges. + // Inspect reserved data properties without evaluating their accessors. + keys.forEach(key => { + if (key === '__proto__' || key === 'constructor' || key === 'prototype') { + const descriptor = Object.getOwnPropertyDescriptor(value, key); + if (descriptor && utils$1.hasOwnProp(descriptor, 'value')) { + pending.push({ + value: descriptor.value + }); + } + } else { + pending.push({ + value: value[key] + }); + } + }); + } +} + +const headersToObject = thing => thing instanceof AxiosHeaders ? { + ...thing +} : thing; +const ownEnumerableKeys = thing => { + if (Object.getOwnPropertySymbols && Object.getOwnPropertyDescriptor) { + return Object.keys(thing).concat(Object.getOwnPropertySymbols(thing).filter(symbol => { + const descriptor = Object.getOwnPropertyDescriptor(thing, symbol); + return descriptor && descriptor.enumerable; + })); + } + return Object.keys(thing); +}; + +// Copy params without recursive merges so the serializer remains responsible +// for its depth policy. Only visit defaults that contribute to the result. +function mergeParams(a, b) { + const pending = []; + const copies = new WeakMap(); + const empty = {}; + function copy(target, source) { + if (!utils$1.isPlainObject(source)) { + return utils$1.isArray(source) ? source.slice() : source; + } + const base = utils$1.isPlainObject(target) ? target : empty; + let bases = copies.get(source); + if (!bases) { + bases = new WeakMap(); + copies.set(source, bases); + } + if (bases.has(base)) return bases.get(base); + const result = {}; + bases.set(base, result); + pending.push({ + base, + source, + result + }); + return result; + } + const result = utils$1.isUndefined(b) ? copy(undefined, a) : copy(a, b); + while (pending.length) { + const { + base, + source, + result: target + } = pending.pop(); + const baseKeys = new Set(ownEnumerableKeys(base)); + const sourceKeys = new Set(ownEnumerableKeys(source)); + const keys = new Set([...baseKeys, ...sourceKeys]); + keys.forEach(key => { + if (key === '__proto__' || key === 'constructor' || key === 'prototype') return; + const hasSource = sourceKeys.has(key); + const value = hasSource ? source[key] : undefined; + const previous = (!hasSource || utils$1.isPlainObject(value)) && baseKeys.has(key) ? base[key] : undefined; + target[key] = hasSource ? copy(previous, value) : copy(undefined, previous); + }); + } + assertParamsAcyclic(result); + return result; +} +function getMergedValue(target, source, prop, caseless) { + if (utils$1.isPlainObject(target) && utils$1.isPlainObject(source)) { + return utils$1.merge.call({ + caseless + }, target, source); + } else if (utils$1.isPlainObject(source)) { + return utils$1.merge({}, source); + } else if (utils$1.isArray(source)) { + return source.slice(); + } + return source; +} +function mergeDeepProperties(a, b, prop, caseless) { + if (!utils$1.isUndefined(b)) { + return getMergedValue(a, b, prop, caseless); + } else if (!utils$1.isUndefined(a)) { + return getMergedValue(undefined, a, prop, caseless); + } +} + +// eslint-disable-next-line consistent-return +function valueFromConfig2(a, b) { + if (!utils$1.isUndefined(b)) { + return getMergedValue(undefined, b); + } +} + +// eslint-disable-next-line consistent-return +function defaultToConfig2(a, b) { + if (!utils$1.isUndefined(b)) { + return getMergedValue(undefined, b); + } else if (!utils$1.isUndefined(a)) { + return getMergedValue(undefined, a); + } +} +function getMergedTransitionalOption(config1, config2, prop) { + const transitional2 = utils$1.hasOwnProp(config2, 'transitional') ? config2.transitional : undefined; + if (!utils$1.isUndefined(transitional2)) { + if (utils$1.isPlainObject(transitional2)) { + if (utils$1.hasOwnProp(transitional2, prop)) { + return transitional2[prop]; + } + } else { + return undefined; + } + } + const transitional1 = utils$1.hasOwnProp(config1, 'transitional') ? config1.transitional : undefined; + if (utils$1.isPlainObject(transitional1) && utils$1.hasOwnProp(transitional1, prop)) { + return transitional1[prop]; + } + return undefined; +} + +// eslint-disable-next-line consistent-return +function mergeDirectKeys(a, b, prop, config1, config2) { + if (utils$1.hasOwnProp(config2, prop)) { + return getMergedValue(a, b); + } else if (utils$1.hasOwnProp(config1, prop)) { + return getMergedValue(undefined, a); + } +} +function mergeHeaders(a, b, prop) { + return mergeDeepProperties(headersToObject(a), headersToObject(b), prop, true); +} + +// Null-proto, frozen descriptor so a polluted Object.prototype.get cannot turn +// this data descriptor into an accessor descriptor on the way in. +// defineProperty only reads it, so one shared instance serves every call. +const hasOwnPropertyDescriptor = Object.freeze({ + __proto__: null, + value: Object.prototype.hasOwnProperty, + enumerable: false, + writable: true, + configurable: true +}); + +// The strategy table and the strategies above are stateless, so they are +// built once at module load instead of on every call: mergeConfig runs at +// most twice per request (once from a method alias, once from `_request`). +const mergeMap = { + url: valueFromConfig2, + method: valueFromConfig2, + data: valueFromConfig2, + baseURL: defaultToConfig2, + transformRequest: defaultToConfig2, + transformResponse: defaultToConfig2, + params: mergeParams, + paramsSerializer: defaultToConfig2, + timeout: defaultToConfig2, + timeoutErrorMessage: defaultToConfig2, + withCredentials: defaultToConfig2, + withXSRFToken: defaultToConfig2, + adapter: defaultToConfig2, + responseType: defaultToConfig2, + xsrfCookieName: defaultToConfig2, + xsrfHeaderName: defaultToConfig2, + onUploadProgress: defaultToConfig2, + onDownloadProgress: defaultToConfig2, + decompress: defaultToConfig2, + maxContentLength: defaultToConfig2, + maxBodyLength: defaultToConfig2, + beforeRedirect: defaultToConfig2, + transport: defaultToConfig2, + httpAgent: defaultToConfig2, + httpsAgent: defaultToConfig2, + cancelToken: defaultToConfig2, + socketPath: defaultToConfig2, + allowedSocketPaths: defaultToConfig2, + responseEncoding: defaultToConfig2, + validateStatus: mergeDirectKeys, + headers: mergeHeaders +}; + +/** + * Config-specific merge-function which creates a new config-object + * by merging two configuration objects together. + * + * @param {Object} config1 + * @param {Object} config2 + * + * @returns {Object} New object resulting from merging config2 to config1 + */ +function mergeConfig(config1, config2) { + // eslint-disable-next-line no-param-reassign + config1 = config1 || {}; + config2 = config2 || {}; + + // Use a null-prototype object so that downstream reads such as `config.auth` + // or `config.baseURL` cannot inherit polluted values from Object.prototype. + // `hasOwnProperty` is restored as a non-enumerable own slot to preserve + // ergonomics for user code that relies on it. + const config = Object.create(null); + Object.defineProperty(config, 'hasOwnProperty', hasOwnPropertyDescriptor); + const keys = ownEnumerableKeys({ + ...config1, + ...config2 + }); + for (let i = 0, len = keys.length; i < len; i++) { + const prop = keys[i]; + if (prop === '__proto__' || prop === 'constructor' || prop === 'prototype') continue; + const merge = utils$1.hasOwnProp(mergeMap, prop) ? mergeMap[prop] : mergeDeepProperties; + const a = utils$1.hasOwnProp(config1, prop) ? config1[prop] : undefined; + const b = utils$1.hasOwnProp(config2, prop) ? config2[prop] : undefined; + const configValue = merge === mergeDirectKeys ? merge(a, b, prop, config1, config2) : merge(a, b, prop); + utils$1.isUndefined(configValue) && merge !== mergeDirectKeys || (config[prop] = configValue); + } + if (utils$1.hasOwnProp(config2, 'validateStatus') && utils$1.isUndefined(config2.validateStatus) && getMergedTransitionalOption(config1, config2, 'validateStatusUndefinedResolves') === false) { + if (utils$1.hasOwnProp(config1, 'validateStatus')) { + config.validateStatus = getMergedValue(undefined, config1.validateStatus); + } else { + delete config.validateStatus; + } + } + return config; +} + +/** + * Encode a UTF-8 string to a Latin-1 byte string for use with btoa(). + * This is a modern replacement for the deprecated unescape(encodeURIComponent(str)) pattern. + * + * @param {string} str The string to encode + * + * @returns {string} UTF-8 bytes as a Latin-1 string + */ +const encodeUTF8$1 = str => encodeURIComponent(str).replace(/%([0-9A-F]{2})/gi, (_, hex) => String.fromCharCode(parseInt(hex, 16))); +const readCookie = name => cookies.read(name); +function resolveConfig(config, readXsrfCookie = readCookie) { + const newConfig = mergeConfig({}, config); + + // Read only own properties to prevent prototype pollution gadgets + // (e.g. Object.prototype.baseURL = 'https://evil.com'). + const own = key => utils$1.hasOwnProp(newConfig, key) ? newConfig[key] : undefined; + const data = own('data'); + let withXSRFToken = own('withXSRFToken'); + const xsrfHeaderName = own('xsrfHeaderName'); + const xsrfCookieName = own('xsrfCookieName'); + let headers = own('headers'); + const auth = own('auth'); + const baseURL = own('baseURL'); + const allowAbsoluteUrls = own('allowAbsoluteUrls'); + const url = own('url'); + newConfig.headers = headers = AxiosHeaders.from(headers); + newConfig.url = buildURL(buildFullPath(baseURL, url, allowAbsoluteUrls, newConfig), own('params'), own('paramsSerializer')); + + // HTTP basic authentication + if (auth) { + const username = utils$1.getSafeProp(auth, 'username') || ''; + const password = utils$1.getSafeProp(auth, 'password') || ''; + const transitional = own('transitional'); + const encodeUsername = transitional && utils$1.hasOwnProp(transitional, 'encodeBasicAuthUsername') && transitional.encodeBasicAuthUsername === true; + try { + headers.set('Authorization', + // Preserve legacy username bytes unless the caller opts in to UTF-8. + 'Basic ' + btoa((encodeUsername ? encodeUTF8$1(username) : username) + ':' + (password ? encodeUTF8$1(password) : ''))); + } catch (e) { + throw AxiosError.from(e, AxiosError.ERR_BAD_OPTION_VALUE, config); + } + } + if (utils$1.isFormData(data)) { + const getHeaders = utils$1.getSafeProp(data, 'getHeaders'); + if (platform.hasStandardBrowserEnv || platform.hasStandardBrowserWebWorkerEnv || utils$1.isReactNative(data)) { + headers.setContentType(undefined); // browser/web worker/RN handles it + } else if (utils$1.isFunction(getHeaders)) { + // Node.js FormData (like form-data package) + setFormDataHeaders(headers, getHeaders.call(data), own('formDataHeaderPolicy')); + } + } + + // Add xsrf header + // This is only done if running in a standard browser environment. + // Specifically not if we're in a web worker, or react-native. + + if (platform.hasStandardBrowserEnv) { + if (utils$1.isFunction(withXSRFToken)) { + withXSRFToken = withXSRFToken(newConfig); + } + + // Strict boolean check — prevents proto-pollution gadgets (e.g. Object.prototype.withXSRFToken = 1) + // and misconfigurations (e.g. "false") from short-circuiting the same-origin check and leaking + // the XSRF token cross-origin. + const shouldSendXSRF = withXSRFToken === true || withXSRFToken == null && isURLSameOrigin(newConfig.url); + if (shouldSendXSRF) { + const xsrfValue = xsrfHeaderName && xsrfCookieName && readXsrfCookie(xsrfCookieName); + if (xsrfValue) { + headers.set(xsrfHeaderName, xsrfValue); + } + } + } + return newConfig; +} + +const isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined'; +var xhrAdapter = isXHRAdapterSupported && function (config) { + return new Promise(function dispatchXhrRequest(resolve, reject) { + let useAsyncXsrf; + try { + const store = platform.hasStandardBrowserEnv && typeof window !== 'undefined' && window.cookieStore; + useAsyncXsrf = store && utils$1.isFunction(store.get); + } catch (e) { + // A restricted Cookie Store getter must retain the synchronous fallback. + } + let xsrfCookieName; + const _config = resolveConfig(config, useAsyncXsrf ? name => { + xsrfCookieName = name; + return null; + } : undefined); + let requestData = _config.data; + const requestHeaders = AxiosHeaders.from(_config.headers).normalize(); + let { + responseType, + onUploadProgress, + onDownloadProgress + } = _config; + let onCanceled; + let timeoutId; + let uploadThrottled, downloadThrottled; + let flushUpload, flushDownload, flushDownloadWithEvent; + function done() { + clearTimeout(timeoutId); + // A final progress callback must not prevent the remaining cleanup. + // Report errors asynchronously, as onloadend and the throttle timer do. + try { + flushUpload && flushUpload(); // flush events + } catch (err) { + setTimeout(() => { + throw err; + }); + } + try { + flushDownload && flushDownload(); // flush events + } catch (err) { + setTimeout(() => { + throw err; + }); + } + + // A flush can synchronously cancel the request and reenter done(). + // In that case the inner call has already detached these listeners. + if (request) { + downloadThrottled && request.removeEventListener('progress', downloadThrottled); + if (request.upload) { + uploadThrottled && request.upload.removeEventListener('progress', uploadThrottled); + flushUpload && request.upload.removeEventListener('loadend', flushUpload); + } + } + _config.cancelToken && _config.cancelToken.unsubscribe(onCanceled); + _config.signal && _config.signal.removeEventListener('abort', onCanceled); + } + let request = new XMLHttpRequest(); + request.open(_config.method.toUpperCase(), _config.url, true); + + // Set the request timeout in MS + request.timeout = _config.timeout; + function onloadend(event) { + if (!request) { + return; + } + + // Status 0 means no response was received, which onerror and onabort normally + // reject before this runs. Firefox 152 fires only readystatechange and loadend for + // navigation-canceled requests (https://bugzilla.mozilla.org/show_bug.cgi?id=1505389), + // leaving settle() to resolve them as an empty success. ECONNABORTED is the error + // onabort raised on Firefox 151. Reads over file:, which some environments report as + // status 0 on success, are excluded by the request URL's scheme after browser-style + // preprocessing, by the page origin's scheme for relative URLs (which inherit it), or + // by responseURL where implemented. + if (request.status === 0 && (parseProtocol(normalizeURLForProtocolCheck(_config.url)) || parseProtocol(platform.origin)) !== 'file' && !(request.responseURL && request.responseURL.startsWith('file:'))) { + reject(new AxiosError('Request aborted', AxiosError.ECONNABORTED, config, request)); + done(); + + // Clean up request + request = null; + return; + } + + // When loadend is still dispatching, flushing with it gives progress + // listeners a final delivery whose event has a live target. The legacy + // ready-state fallback has no event, so replay its pending progress. + // A throwing listener must not block settlement; rethrow asynchronously, + // matching how listener errors surface on the throttle timer path. + try { + if (event) { + flushDownloadWithEvent && flushDownloadWithEvent(event); + } else { + flushDownload && flushDownload(); + } + } catch (err) { + setTimeout(() => { + throw err; + }); + } + + // A final progress callback can cancel the request synchronously. + if (!request) { + return; + } + + // Prepare the response + const responseHeaders = AxiosHeaders.from('getAllResponseHeaders' in request && request.getAllResponseHeaders()); + const responseData = !responseType || responseType === 'text' || responseType === 'json' ? request.responseText : request.response; + const response = { + data: responseData, + status: request.status, + statusText: request.statusText, + headers: responseHeaders, + config, + request + }; + settle(function _resolve(value) { + resolve(value); + done(); + }, function _reject(err) { + reject(err); + done(); + }, response); + + // Clean up request + request = null; + } + if ('onloadend' in request) { + // Use onloadend if available + request.onloadend = onloadend; + } else { + // Listen for ready state to emulate onloadend + request.onreadystatechange = function handleLoad() { + if (!request || request.readyState !== 4) { + return; + } + + // The request errored out and we didn't get a response, this will be + // handled by onerror instead + // With one exception: request that using file: protocol, most browsers + // will return status as 0 even though it's a successful request + if (request.status === 0 && !(request.responseURL && request.responseURL.startsWith('file:'))) { + return; + } + // readystate handler is calling before onerror or ontimeout handlers, + // so we should call onloadend on the next 'tick' + setTimeout(onloadend); + }; + } + + // Handle browser request cancellation (as opposed to a manual cancellation) + request.onabort = function handleAbort() { + if (!request) { + return; + } + reject(new AxiosError('Request aborted', AxiosError.ECONNABORTED, config, request)); + done(); + + // Clean up request + request = null; + }; + + // Handle low level network errors + request.onerror = function handleError(event) { + // Browsers deliver a ProgressEvent in XHR onerror + // (message may be empty; when present, surface it) + // See https://developer.mozilla.org/docs/Web/API/XMLHttpRequest/error_event + const msg = event && event.message ? event.message : 'Network Error'; + const err = new AxiosError(msg, AxiosError.ERR_NETWORK, config, request); + // attach the underlying event for consumers who want details + err.event = event || null; + reject(err); + done(); + request = null; + }; + + // Handle timeout + request.ontimeout = function handleTimeout() { + if (!request) return; + let timeoutErrorMessage = _config.timeout ? 'timeout of ' + _config.timeout + 'ms exceeded' : 'timeout exceeded'; + const transitional = _config.transitional || transitionalDefaults; + if (_config.timeoutErrorMessage) { + timeoutErrorMessage = _config.timeoutErrorMessage; + } + reject(new AxiosError(timeoutErrorMessage, transitional.clarifyTimeoutError ? AxiosError.ETIMEDOUT : AxiosError.ECONNABORTED, config, request)); + done(); + + // Clean up request + request = null; + }; + + // Remove Content-Type if data is undefined + requestData === undefined && requestHeaders.setContentType(null); + + // Add withCredentials to request if needed + if (!utils$1.isUndefined(_config.withCredentials)) { + request.withCredentials = !!_config.withCredentials; + } + + // Add responseType to request if needed + if (responseType && responseType !== 'json') { + request.responseType = _config.responseType; + } + + // Handle progress if needed + if (onDownloadProgress) { + [downloadThrottled, flushDownload, flushDownloadWithEvent] = progressEventReducer(onDownloadProgress, true); + request.addEventListener('progress', downloadThrottled); + } + + // Not all browsers support upload events + if (onUploadProgress && request.upload) { + [uploadThrottled, flushUpload] = progressEventReducer(onUploadProgress); + request.upload.addEventListener('progress', uploadThrottled); + request.upload.addEventListener('loadend', flushUpload); + } + if (_config.cancelToken || _config.signal) { + // Handle cancellation + // eslint-disable-next-line func-names + onCanceled = cancel => { + if (!request) { + return; + } + reject(!cancel || cancel.type ? new CanceledError(null, config, request) : cancel); + const xhr = request; + done(); + request = null; + xhr.abort(); + }; + _config.cancelToken && _config.cancelToken.subscribe(onCanceled); + if (!request) return; + if (_config.signal) { + _config.signal.aborted ? onCanceled() : _config.signal.addEventListener('abort', onCanceled); + } + } + if (!request) return; + const protocol = parseProtocol(_config.url); + if (protocol && !platform.protocols.includes(protocol)) { + reject(new AxiosError('Unsupported protocol ' + protocol + ':', AxiosError.ERR_BAD_REQUEST, config)); + done(); + return; + } + const sendRequest = () => { + if (!request) return; + // Apply headers after an asynchronous XSRF read so existing headers are + // replaced through AxiosHeaders rather than appended by the native XHR. + if ('setRequestHeader' in request) { + utils$1.forEach(toByteStringHeaderObject(requestHeaders), function setRequestHeader(val, key) { + request.setRequestHeader(key, val); + }); + } + request.send(requestData || null); + }; + if (xsrfCookieName) { + // Native XHR timeout starts at send(). Cover cookie preparation and the + // subsequent request with the same budget and existing timeout handler. + const now = typeof performance !== 'undefined' && utils$1.isFunction(performance.now) ? () => performance.now() : Date.now; + const deadline = request.timeout > 0 ? now() + Number(request.timeout) : undefined; + const abortOnTimeout = () => { + if (!request) return; + const xhr = request; + xhr.ontimeout(); + xhr.abort(); + }; + if (deadline !== undefined) { + const scheduleTimeout = () => { + const remaining = deadline - now(); + if (remaining > 0) { + // Browser timers overflow above the signed 32-bit delay limit. + timeoutId = setTimeout(scheduleTimeout, Math.min(remaining, 0x7fffffff)); + } else { + abortOnTimeout(); + } + }; + scheduleTimeout(); + } + cookies.readAsync(xsrfCookieName).then(value => { + if (!request) return; + // Promise callbacks may run before an overdue timer after a busy task. + if (deadline !== undefined && now() >= deadline) { + abortOnTimeout(); + return; + } + if (value) { + const headerName = utils$1.hasOwnProp(_config, 'xsrfHeaderName') && _config.xsrfHeaderName; + requestHeaders.set(headerName, value); + } + sendRequest(); + }).catch(error => { + if (!request) return; + reject(AxiosError.from(error, null, config, request)); + done(); + request = null; + }); + } else { + sendRequest(); + } + }); +}; + +const composeSignals = (signals, timeout) => { + signals = signals ? signals.filter(Boolean) : []; + if (!timeout && !signals.length) { + return; + } + const controller = new AbortController(); + let aborted = false; + const onabort = function (reason) { + if (!aborted) { + aborted = true; + unsubscribe(); + const err = reason instanceof Error ? reason : this.reason; + controller.abort(err instanceof AxiosError ? err : new CanceledError(err instanceof Error ? err.message : err)); + } + }; + let timer = timeout && setTimeout(() => { + timer = null; + onabort(new AxiosError(`timeout of ${timeout}ms exceeded`, AxiosError.ETIMEDOUT)); + }, timeout); + const unsubscribe = () => { + if (!signals) { + return; + } + timer && clearTimeout(timer); + timer = null; + signals.forEach(signal => { + const unsubscribeSignal = utils$1.getSafeProp(signal, 'unsubscribe'); + utils$1.isFunction(unsubscribeSignal) ? unsubscribeSignal.call(signal, onabort) : signal.removeEventListener('abort', onabort); + }); + signals = null; + }; + signals.forEach(signal => { + if (aborted) { + return; + } + if (signal.aborted) { + onabort.call(signal); + return; + } + signal.addEventListener('abort', onabort, { + once: true + }); + }); + const { + signal + } = controller; + signal.unsubscribe = () => utils$1.asap(unsubscribe); + return signal; +}; + +const streamChunk = function* (chunk, chunkSize) { + let len = chunk.byteLength; + if (len < chunkSize) { + yield chunk; + return; + } + let pos = 0; + let end; + while (pos < len) { + end = pos + chunkSize; + yield chunk.slice(pos, end); + pos = end; + } +}; +const readBytes = async function* (iterable, chunkSize) { + for await (const chunk of readStream(iterable)) { + yield* streamChunk(chunk, chunkSize); + } +}; +const readStream = async function* (stream) { + if (stream[Symbol.asyncIterator]) { + yield* stream; + return; + } + const reader = stream.getReader(); + try { + for (;;) { + const { + done, + value + } = await reader.read(); + if (done) { + break; + } + yield value; + } + } finally { + await reader.cancel(); + } +}; +const trackStream = (stream, chunkSize, onProgress, onFinish) => { + const iterator = readBytes(stream, chunkSize); + let bytes = 0; + let done; + let _onFinish = e => { + if (!done) { + done = true; + onFinish && onFinish(e); + } + }; + return new ReadableStream({ + async pull(controller) { + try { + const { + done, + value + } = await iterator.next(); + if (done) { + _onFinish(); + controller.close(); + return; + } + let len = value.byteLength; + if (onProgress) { + let loadedBytes = bytes += len; + onProgress(loadedBytes); + } + controller.enqueue(new Uint8Array(value)); + } catch (err) { + _onFinish(err); + throw err; + } + }, + cancel(reason) { + _onFinish(reason); + return iterator.return(); + } + }, { + highWaterMark: 2 + }); +}; + +const CRLF = '\r\n'; +const normalizeLines = value => String(value).replace(/\r\n|\r|\n/g, CRLF); +const escapeName = value => String(value).replace(/[\r\n"]/g, char => char === '\r' ? '%0D' : char === '\n' ? '%0A' : '%22'); + +// Count UTF-8 bytes without allocating an encoded copy of a field. FormData +// string values normalize line endings; Blob/File contents remain unchanged. +const stringBytes = (value, normalize) => { + let length = 0; + for (let i = 0; i < value.length; i++) { + const code = value.charCodeAt(i); + if (normalize && (code === 13 || code === 10)) { + if (code === 13 && value.charCodeAt(i + 1) === 10) i++; + length += 2; + } else if (code < 0x80) { + length++; + } else if (code < 0x800) { + length += 2; + } else if (code >= 0xd800 && code <= 0xdbff && value.charCodeAt(i + 1) >= 0xdc00 && value.charCodeAt(i + 1) <= 0xdfff) { + length += 4; + i++; + } else { + length += 3; + } + } + return length; +}; + +// Describe serialization failures independently of any request library. +class FormDataError extends TypeError { + constructor(message, reason) { + super(message); + this.name = 'FormDataError'; + this.reason = reason; + } +} + +// The caller supplies the boundary, Blob implementation, and limit error. +function formDataToBlob(form, Blob, limit, limitError, boundary) { + if (!utils$1.isFunction(Blob)) { + throw new FormDataError('Blob is not supported', 'blob'); + } + if (!utils$1.isString(boundary) || !/^[A-Za-z0-9'()+_,./:=? -]{1,70}$/.test(boundary) || / $/.test(boundary)) { + throw new FormDataError('Invalid multipart boundary', 'boundary'); + } + const footer = '--' + boundary + '--' + CRLF; + let length = footer.length; + const parts = []; + const checkLength = extra => { + if (length + extra > limit) throw limitError(); + }; + checkLength(0); + for (const [name, value] of form) { + const isString = utils$1.isString(value); + const valueLength = isString ? stringBytes(value, true) : value.size; + if (!Number.isFinite(valueLength) || valueLength < 0) { + throw new FormDataError('Unsupported FormData part size', 'part'); + } + // Reject large values and names before building normalized header strings. + checkLength(valueLength + stringBytes(name, true) + (!isString && value.name ? stringBytes(value.name, false) : 0) + (!isString && value.type ? stringBytes(value.type, false) : 0)); + let header = '--' + boundary + CRLF + 'Content-Disposition: form-data; name="' + escapeName(normalizeLines(name)) + '"'; + if (!isString) { + header += '; filename="' + escapeName(utils$1.isString(value.name) ? value.name : 'blob') + '"' + CRLF + 'Content-Type: ' + String(value.type || 'application/octet-stream').replace(/[\r\n]/g, ''); + } + header += CRLF + CRLF; + const partLength = stringBytes(header, false) + valueLength + CRLF.length; + checkLength(partLength); + length += partLength; + parts.push({ + header, + value, + isString + }); + } + + // Native Blob composition retains existing Blob/File data. No file is read + // and no complete multipart ArrayBuffer is created to determine its length. + const blobParts = []; + for (const part of parts) { + blobParts.push(part.header, part.isString ? normalizeLines(part.value) : part.value, CRLF); + } + blobParts.push(footer); + return new Blob(blobParts, { + type: 'multipart/form-data; boundary=' + boundary + }); +} + +function createMultipartBody(form, Blob, limit, limitError, boundary) { + // Report missing Blob support before trying to select a random source. + if (!utils$1.isFunction(Blob)) { + throw new AxiosError('Blob is not supported', AxiosError.ERR_NOT_SUPPORT); + } + if (boundary === undefined) { + if (utils$1.isFunction(platform.generateString)) { + boundary = 'axios-' + platform.generateString(36, '0123456789abcdef'); + } else { + const crypto = utils$1.global.crypto; + if (!crypto || !utils$1.isFunction(crypto.getRandomValues)) { + throw new AxiosError('Random byte generation is not supported', AxiosError.ERR_NOT_SUPPORT); + } + const random = new Uint8Array(18); + crypto.getRandomValues(random); + boundary = 'axios-' + Array.from(random, value => ('0' + value.toString(16)).slice(-2)).join(''); + } + } + try { + return formDataToBlob(form, Blob, limit, limitError, boundary); + } catch (error) { + if (error instanceof FormDataError) { + const code = error.reason === 'boundary' ? AxiosError.ERR_BAD_OPTION_VALUE : AxiosError.ERR_BAD_REQUEST; + throw new AxiosError(error.message, code); + } + throw error; + } +} + +const DEFAULT_CHUNK_SIZE = 64 * 1024; +const DEFAULT_REQUEST_OPTIONS = { + cache: 'default', + redirect: 'follow', + referrer: 'about:client', + referrerPolicy: '', + mode: 'cors', + integrity: '', + keepalive: false, + priority: 'auto', + window: null +}; +const { + isFunction +} = utils$1; + +/** + * Encode a UTF-8 string to a Latin-1 byte string for use with btoa(). + * This is a modern replacement for the deprecated unescape(encodeURIComponent(str)) pattern. + * + * @param {string} str The string to encode + * + * @returns {string} UTF-8 bytes as a Latin-1 string + */ +const encodeUTF8 = str => encodeURIComponent(str).replace(/%([0-9A-F]{2})/gi, (_, hex) => String.fromCharCode(parseInt(hex, 16))); + +// Node's WHATWG URL parser returns `username` and `password` percent-encoded. +// Decode before composing the `auth` option so credentials such as +// `my%40email.com:pass` are sent as `my@email.com:pass`. Falls back to the +// original value for malformed input so a bad encoding never throws. +const decodeURIComponentSafe = value => { + if (!utils$1.isString(value)) { + return value; + } + try { + return decodeURIComponent(value); + } catch (error) { + return value; + } +}; +const test = (fn, ...args) => { + try { + return !!fn(...args); + } catch (e) { + return false; + } +}; +const maybeWithAuthCredentials = url => { + const protocolIndex = url.indexOf('://'); + let urlToCheck = url; + if (protocolIndex !== -1) { + urlToCheck = urlToCheck.slice(protocolIndex + 3); + } + return urlToCheck.includes('@') || urlToCheck.includes(':'); +}; +const factory = env => { + const globalObject = utils$1.global !== undefined && utils$1.global !== null ? utils$1.global : globalThis; + const { + ReadableStream, + TextEncoder + } = globalObject; + env = utils$1.merge.call({ + skipUndefined: true + }, { + Request: globalObject.Request, + Response: globalObject.Response, + Blob: globalObject.Blob + }, env); + const envFetch = utils$1.hasOwnProp(env, 'fetch') ? env.fetch : undefined; + const { + Request, + Response, + Blob + } = env; + const isFetchSupported = envFetch ? isFunction(envFetch) : typeof fetch === 'function'; + const isRequestSupported = isFunction(Request); + const isResponseSupported = isFunction(Response); + if (!isFetchSupported) { + return false; + } + const isReadableStreamSupported = isFetchSupported && isFunction(ReadableStream); + const encodeText = isFetchSupported && (typeof TextEncoder === 'function' ? (encoder => str => encoder.encode(str))(new TextEncoder()) : async str => new Uint8Array(await new Request(str).arrayBuffer())); + const supportsRequestStream = isRequestSupported && isReadableStreamSupported && test(() => { + let duplexAccessed = false; + const request = new Request(platform.origin, { + body: new ReadableStream(), + method: 'POST', + get duplex() { + duplexAccessed = true; + return 'half'; + } + }); + const hasContentType = request.headers.has('Content-Type'); + if (request.body != null) { + request.body.cancel(); + } + return duplexAccessed && !hasContentType; + }); + const supportsResponseStream = isResponseSupported && isReadableStreamSupported && test(() => utils$1.isReadableStream(new Response('').body)); + + // Some runtimes reject every explicit cache mode. Use own defaults for both + // probes so unrelated polluted options cannot affect cache-mode detection. + const requestDefaults = Object.assign(Object.create(null), DEFAULT_REQUEST_OPTIONS); + if (isRequestSupported && !test(() => new Request(platform.origin, requestDefaults))) { + delete requestDefaults.cache; + + // Only omit cache when that makes Request construction succeed. Otherwise + // retain the explicit default that protects supporting runtimes from pollution. + if (!test(() => new Request(platform.origin, requestDefaults))) { + requestDefaults.cache = DEFAULT_REQUEST_OPTIONS.cache; + } + } + const resolvers = { + stream: supportsResponseStream && (res => res.body) + }; + isFetchSupported && (() => { + ['text', 'arrayBuffer', 'blob', 'formData', 'stream'].forEach(type => { + !resolvers[type] && (resolvers[type] = (res, config) => { + let method = res && res[type]; + if (method) { + return method.call(res); + } + throw new AxiosError(`Response type '${type}' is not supported`, AxiosError.ERR_NOT_SUPPORT, config); + }); + }); + })(); + const getBodyLength = async body => { + if (body == null) { + return 0; + } + if (utils$1.isBlob(body)) { + return body.size; + } + if (utils$1.isArrayBufferView(body) || utils$1.isArrayBuffer(body)) { + return body.byteLength; + } + if (utils$1.isURLSearchParams(body)) { + body = body + ''; + } + if (utils$1.isString(body)) { + return (await encodeText(body)).byteLength; + } + }; + const resolveBodyLength = async (headers, body) => { + const length = utils$1.toFiniteNumber(headers.getContentLength()); + return length == null ? getBodyLength(body) : length; + }; + return async config => { + let { + url, + method, + data, + signal, + cancelToken, + timeout, + onDownloadProgress, + onUploadProgress, + responseType, + headers, + withCredentials = 'same-origin', + fetchOptions, + maxContentLength, + maxBodyLength, + maxRedirects + } = resolveConfig(config); + const hasMaxContentLength = utils$1.isNumber(maxContentLength) && maxContentLength > -1; + const hasMaxBodyLength = utils$1.isNumber(maxBodyLength) && maxBodyLength > -1; + const own = key => utils$1.hasOwnProp(config, key) ? config[key] : undefined; + let _fetch = envFetch || fetch; + responseType = responseType ? (responseType + '').toLowerCase() : 'text'; + let composedSignal = composeSignals([signal, cancelToken && cancelToken.toAbortSignal()], timeout); + let request = null; + const unsubscribe = composedSignal && composedSignal.unsubscribe && (() => { + composedSignal.unsubscribe(); + }); + let requestContentLength; + + // AxiosErrors we raise while request or response bodies are being streamed. Captured + // by identity so the catch block can surface it directly, regardless of + // how the runtime wraps the resulting fetch rejection (undici exposes it + // as `err.cause`; some browsers drop the original error entirely). + let pendingBodyError = null; + let pendingResponseError = null; + const maxBodyLengthError = () => new AxiosError('Request body larger than maxBodyLength limit', AxiosError.ERR_BAD_REQUEST, config, request); + try { + // HTTP basic authentication + let auth = undefined; + const configAuth = own('auth'); + if (configAuth) { + const username = utils$1.getSafeProp(configAuth, 'username') || ''; + const password = utils$1.getSafeProp(configAuth, 'password') || ''; + auth = { + username, + password + }; + } + let parsedURL; + if (maybeWithAuthCredentials(url)) { + parsedURL = new URL(url, platform.origin); + if (!auth && (parsedURL.username || parsedURL.password)) { + const urlUsername = decodeURIComponentSafe(parsedURL.username); + const urlPassword = decodeURIComponentSafe(parsedURL.password); + auth = { + username: urlUsername, + password: urlPassword + }; + } + if (parsedURL.username || parsedURL.password) { + parsedURL.username = ''; + parsedURL.password = ''; + url = parsedURL.href; + } + } + if (auth) { + headers.delete('authorization'); + headers.set('Authorization', 'Basic ' + btoa(encodeUTF8((auth.username || '') + ':' + (auth.password || '')))); + } + + // Enforce maxContentLength for data: URLs up-front so we never materialize + // an oversized payload. The HTTP adapter applies the same check (see http.js + // "if (protocol === 'data:')" branch). + if (hasMaxContentLength && parsedURL && parsedURL.protocol === 'data:') { + const estimated = estimateDataURLDecodedBytes(parsedURL.href); + if (estimated > maxContentLength) { + throw new AxiosError('maxContentLength size of ' + maxContentLength + ' exceeded', AxiosError.ERR_BAD_RESPONSE, config, request); + } + } + const formContentType = utils$1.isSpecCompliantForm(data) && AxiosHeaders.from(own('headers')).getContentType(); + let formBoundary; + if (utils$1.isString(formContentType) && /^multipart\/form-data(?:\s*;|$)/i.test(formContentType.trim())) { + const parameters = AxiosHeaders.parseParameters(formContentType); + if (utils$1.hasOwnProp(parameters, 'boundary')) formBoundary = parameters.boundary; + } + if (utils$1.isSpecCompliantForm(data) && method !== 'get' && method !== 'head' && (hasMaxBodyLength || onUploadProgress && supportsRequestStream || formBoundary !== undefined)) { + data = createMultipartBody(data, Blob, hasMaxBodyLength ? maxBodyLength : Infinity, maxBodyLengthError, formBoundary); + // Blob.type lowercases its value, including a case-sensitive boundary. + // Retain the caller's header when an explicit boundary was serialized. + headers.setContentType(formBoundary === undefined ? data.type : formContentType); + requestContentLength = data.size; + } + + // Enforce maxBodyLength against known-size bodies before dispatch using + // the body's *actual* size — never a caller-declared Content-Length, + // which could under-report to slip an oversized body past the check. + // Unknown-size streams return undefined here and are counted per-chunk + // below as fetch consumes them. + if (hasMaxBodyLength && method !== 'get' && method !== 'head') { + const outboundLength = await getBodyLength(data); + if (typeof outboundLength === 'number' && isFinite(outboundLength)) { + requestContentLength = outboundLength; + if (outboundLength > maxBodyLength) { + throw maxBodyLengthError(); + } + } + } + + // A streamed body under maxBodyLength must be counted as fetch consumes + // it; its size is never trusted from a caller-declared Content-Length. + const mustEnforceStreamBody = hasMaxBodyLength && (utils$1.isReadableStream(data) || utils$1.isStream(data)); + const trackRequestStream = (stream, onProgress, flush) => trackStream(stream, DEFAULT_CHUNK_SIZE, loadedBytes => { + if (hasMaxBodyLength && loadedBytes > maxBodyLength) { + throw pendingBodyError = maxBodyLengthError(); + } + onProgress && onProgress(loadedBytes); + }, flush); + if (supportsRequestStream && method !== 'get' && method !== 'head' && (onUploadProgress || mustEnforceStreamBody)) { + requestContentLength = requestContentLength == null ? await resolveBodyLength(headers, data) : requestContentLength; + + // A declared length of 0 is only trusted to skip the wrap when we are + // not enforcing a stream limit (which must not rely on that header). + if (requestContentLength !== 0 || mustEnforceStreamBody) { + let _request = new Request(url, { + method: 'POST', + body: data, + duplex: 'half' + }); + let contentTypeHeader; + if (utils$1.isFormData(data) && (contentTypeHeader = _request.headers.get('content-type'))) { + headers.setContentType(contentTypeHeader); + } + if (_request.body) { + const [onProgress, flush] = onUploadProgress && progressEventDecorator(requestContentLength, progressEventReducer(asyncDecorator(onUploadProgress))) || []; + data = trackRequestStream(_request.body, onProgress, flush); + } + } + } else if (mustEnforceStreamBody && !isRequestSupported && isReadableStreamSupported && method !== 'get' && method !== 'head') { + data = trackRequestStream(data); + } else if (mustEnforceStreamBody && isRequestSupported && !supportsRequestStream && method !== 'get' && method !== 'head') { + throw new AxiosError('Stream request bodies are not supported by the current fetch implementation', AxiosError.ERR_NOT_SUPPORT, config, request); + } + if (!utils$1.isString(withCredentials)) { + withCredentials = withCredentials ? 'include' : 'omit'; + } + + // Cloudflare Workers throws when credentials are defined + // see https://github.com/cloudflare/workerd/issues/902 + const isCredentialsSupported = isRequestSupported && 'credentials' in Request.prototype; + + // If data is FormData and Content-Type is multipart/form-data without boundary, + // delete it so fetch can set it correctly with the boundary + if (utils$1.isFormData(data)) { + const contentType = headers.getContentType(); + if (contentType && /^multipart\/form-data/i.test(contentType) && !/boundary=/i.test(contentType)) { + headers.delete('content-type'); + } + } + + // Set User-Agent header if not already set (fetch defaults to 'node' in Node.js) + headers.set('User-Agent', 'axios/' + VERSION, false); + const safeFetchOptions = fetchOptions == null ? fetchOptions : Object.assign(Object.create(null), fetchOptions); + if (safeFetchOptions) { + // These options are owned by Axios and are already reflected in the + // resolved Request passed to fetch. + delete safeFetchOptions.body; + delete safeFetchOptions.headers; + delete safeFetchOptions.method; + delete safeFetchOptions.signal; + delete safeFetchOptions.duplex; + delete safeFetchOptions.credentials; + } + const resolvedOptions = Object.assign(Object.create(null), safeFetchOptions, { + signal: composedSignal, + method: method.toUpperCase(), + headers: toByteStringHeaderObject(headers.normalize()), + body: data, + duplex: 'half', + credentials: isCredentialsSupported ? withCredentials : undefined + }); + if (isRequestSupported) { + utils$1.forEach(requestDefaults, (value, key) => { + if (resolvedOptions[key] === undefined) { + resolvedOptions[key] = value; + } + }); + if (resolvedOptions.signal === undefined) { + resolvedOptions.signal = null; + } + if (resolvedOptions.body === undefined) { + resolvedOptions.body = null; + } + } + if (maxRedirects === 0) { + resolvedOptions.redirect = 'manual'; + if (safeFetchOptions) { + safeFetchOptions.redirect = 'manual'; + } + } + request = isRequestSupported && new Request(url, resolvedOptions); + let response = await (isRequestSupported ? _fetch(request, safeFetchOptions) : _fetch(url, resolvedOptions)); + const responseHeaders = AxiosHeaders.from(response.headers); + + // Cheap pre-check: if the server honestly declares a content-length that + // already exceeds the cap, reject before we start streaming. + if (hasMaxContentLength) { + const declaredLength = utils$1.toFiniteNumber(responseHeaders.getContentLength()); + if (declaredLength != null && declaredLength > maxContentLength) { + throw new AxiosError('maxContentLength size of ' + maxContentLength + ' exceeded', AxiosError.ERR_BAD_RESPONSE, config, request); + } + } + const isStreamResponse = supportsResponseStream && (responseType === 'stream' || responseType === 'response'); + if (supportsResponseStream && response.body && (onDownloadProgress || hasMaxContentLength || isStreamResponse && unsubscribe)) { + const options = {}; + ['status', 'statusText', 'headers'].forEach(prop => { + options[prop] = response[prop]; + }); + const responseContentLength = utils$1.toFiniteNumber(responseHeaders.getContentLength()); + const [onProgress, flush] = onDownloadProgress && progressEventDecorator(responseContentLength, progressEventReducer(asyncDecorator(onDownloadProgress), true)) || []; + let bytesRead = 0; + const onChunkProgress = loadedBytes => { + if (hasMaxContentLength) { + bytesRead = loadedBytes; + if (bytesRead > maxContentLength) { + throw pendingResponseError = new AxiosError('maxContentLength size of ' + maxContentLength + ' exceeded', AxiosError.ERR_BAD_RESPONSE, config, request); + } + } + onProgress && onProgress(loadedBytes); + }; + response = new Response(trackStream(response.body, DEFAULT_CHUNK_SIZE, onChunkProgress, () => { + flush && flush(); + unsubscribe && unsubscribe(); + }), options); + } + responseType = responseType || 'text'; + let responseData = await resolvers[utils$1.findKey(resolvers, responseType) || 'text'](response, config); + + // Fallback enforcement for environments without ReadableStream support + // (legacy runtimes). Detect materialized size from typed output; skip + // streams/Response passthrough since the user will read those themselves. + if (hasMaxContentLength && !supportsResponseStream && !isStreamResponse) { + let materializedSize; + if (responseData != null) { + if (typeof responseData.byteLength === 'number') { + materializedSize = responseData.byteLength; + } else if (typeof responseData.size === 'number') { + materializedSize = responseData.size; + } else if (typeof responseData === 'string') { + materializedSize = typeof TextEncoder === 'function' ? new TextEncoder().encode(responseData).byteLength : responseData.length; + } + } + if (typeof materializedSize === 'number' && materializedSize > maxContentLength) { + throw new AxiosError('maxContentLength size of ' + maxContentLength + ' exceeded', AxiosError.ERR_BAD_RESPONSE, config, request); + } + } + !isStreamResponse && unsubscribe && unsubscribe(); + return await new Promise((resolve, reject) => { + settle(resolve, reject, { + data: responseData, + headers: AxiosHeaders.from(response.headers), + status: response.status, + statusText: response.statusText, + config, + request + }); + }); + } catch (err) { + unsubscribe && unsubscribe(); + + // Safari can surface fetch aborts as a DOMException-like object whose + // branded getters throw. Prefer our composed signal reason before reading + // the caught error, preserving timeout vs cancellation semantics. + if (composedSignal && composedSignal.aborted && composedSignal.reason instanceof AxiosError) { + const canceledError = composedSignal.reason; + canceledError.config = config; + request && (canceledError.request = request); + if (err !== canceledError) { + // Non-enumerable to match native Error `cause` semantics so loggers + // don't recurse into circular fetch internals (see #7205). + Object.defineProperty(canceledError, 'cause', { + __proto__: null, + value: err, + writable: true, + enumerable: false, + configurable: true + }); + } + throw canceledError; + } + + // Surface a maxBodyLength violation we raised while the request body was + // being streamed. Keeping the original error (rather than reading + // `err.cause.isAxiosError`) keeps the error deterministic across runtimes + // and avoids both prototype-pollution reads and mis-attributing a foreign + // AxiosError that merely happened to land in `err.cause`. + if (pendingBodyError) { + request && !pendingBodyError.request && (pendingBodyError.request = request); + throw pendingBodyError; + } + if (pendingResponseError) { + throw pendingResponseError; + } + + // Re-throw AxiosErrors we raised synchronously (data: URL / content-length + // pre-checks, response size enforcement) without re-wrapping them. + if (err instanceof AxiosError) { + request && !err.request && (err.request = request); + throw err; + } + if (err && err.name === 'TypeError' && /Load failed|fetch/i.test(err.message)) { + const networkError = new AxiosError('Network Error', AxiosError.ERR_NETWORK, config, request, err && err.response); + // Non-enumerable to match native Error `cause` semantics so loggers + // don't recurse into circular fetch internals (see #7205). + Object.defineProperty(networkError, 'cause', { + __proto__: null, + value: err.cause || err, + writable: true, + enumerable: false, + configurable: true + }); + throw networkError; + } + throw AxiosError.from(err, err && err.code, config, request, err && err.response); + } + }; +}; +const seedCache = new Map(); +const getFetch = config => { + const env = Object.create(null); + const configuredEnv = config && utils$1.hasOwnProp(config, 'env') && config.env; + ['fetch', 'Request', 'Response', 'Blob'].forEach(key => { + if (configuredEnv && utils$1.hasOwnProp(configuredEnv, key)) { + env[key] = configuredEnv[key]; + } + }); + const { + fetch, + Request, + Response, + Blob + } = env; + const seeds = [Request, Response, fetch, Blob]; + let len = seeds.length, + i = len, + seed, + target, + map = seedCache; + while (i--) { + seed = seeds[i]; + target = map.get(seed); + target === undefined && map.set(seed, target = i ? new Map() : factory(env)); + map = target; + } + return target; +}; +getFetch(); + +/** + * Known adapters mapping. + * Provides environment-specific adapters for Axios: + * - `http` for Node.js + * - `xhr` for browsers + * - `fetch` for fetch API-based requests + * + * @type {Object} + */ +const knownAdapters = { + http: httpAdapter, + xhr: xhrAdapter, + fetch: { + get: getFetch + } +}; + +// Assign adapter names for easier debugging and identification +utils$1.forEach(knownAdapters, (fn, value) => { + if (fn) { + try { + // Null-proto descriptors so a polluted Object.prototype.get cannot turn + // these data descriptors into accessor descriptors on the way in. + Object.defineProperty(fn, 'name', { + __proto__: null, + value + }); + } catch (e) { + // eslint-disable-next-line no-empty + } + Object.defineProperty(fn, 'adapterName', { + __proto__: null, + value + }); + } +}); + +/** + * Render a rejection reason string for unknown or unsupported adapters + * + * @param {string} reason + * @returns {string} + */ +const renderReason = reason => `- ${reason}`; + +/** + * Check if the adapter is resolved (function, null, or false) + * + * @param {Function|null|false} adapter + * @returns {boolean} + */ +const isResolvedHandle = adapter => utils$1.isFunction(adapter) || adapter === null || adapter === false; + +/** + * Get the first suitable adapter from the provided list. + * Tries each adapter in order until a supported one is found. + * Throws an AxiosError if no adapter is suitable. + * + * @param {Array|string|Function} adapters - Adapter(s) by name or function. + * @param {Object} config - Axios request configuration + * @throws {AxiosError} If no suitable adapter is available + * @returns {Function} The resolved adapter function + */ +function getAdapter(adapters, config) { + adapters = utils$1.isArray(adapters) ? adapters : [adapters]; + const { + length + } = adapters; + let nameOrAdapter; + let adapter; + const rejectedReasons = {}; + for (let i = 0; i < length; i++) { + nameOrAdapter = adapters[i]; + let id; + adapter = nameOrAdapter; + if (!isResolvedHandle(nameOrAdapter)) { + adapter = knownAdapters[(id = String(nameOrAdapter)).toLowerCase()]; + if (adapter === undefined) { + throw new AxiosError(`Unknown adapter '${id}'`); + } + } + if (adapter && (utils$1.isFunction(adapter) || (adapter = adapter.get(config)))) { + break; + } + rejectedReasons[id || '#' + i] = adapter; + } + if (!adapter) { + const reasons = Object.entries(rejectedReasons).map(([id, state]) => `adapter ${id} ` + (state === false ? 'is not supported by the environment' : 'is not available in the build')); + let s = length ? reasons.length > 1 ? 'since :\n' + reasons.map(renderReason).join('\n') : ' ' + renderReason(reasons[0]) : 'as no adapter specified'; + throw new AxiosError(`There is no suitable adapter to dispatch the request ` + s, AxiosError.ERR_NOT_SUPPORT); + } + return adapter; +} + +/** + * Exports Axios adapters and utility to resolve an adapter + */ +var adapters = { + /** + * Resolve an adapter from a list of adapter names or functions. + * @type {Function} + */ + getAdapter, + /** + * Exposes all known adapters + * @type {Object} + */ + adapters: knownAdapters +}; + +/** + * Throws a `CanceledError` if cancellation has been requested. + * + * @param {Object} config The config that is to be used for the request + * + * @returns {void} + */ +function throwIfCancellationRequested(config) { + if (config.cancelToken) { + config.cancelToken.throwIfRequested(); + } + if (config.signal && config.signal.aborted) { + throw new CanceledError(null, config); + } +} + +/** + * Resolve the clock used to time adapter execution. + * + * Prefers the monotonic `performance.now()` so wall-clock adjustments do not + * skew the measurement, and so frameworks that forbid reading the current + * time during prerendering (e.g. Next.js Cache Components) accept it. Falls + * back to `Date.now()` in runtimes without the High Resolution Time API. + * + * @returns {() => number} Millisecond clock + */ +function resolveClock() { + return typeof performance !== 'undefined' && utils$1.isFunction(performance.now) ? () => performance.now() : Date.now; +} + +/** + * Whole milliseconds elapsed since `start`, floored at zero. + * + * Rounded so the value stays an integer as with `Date.now()`. The fallback + * wall clock can move backwards mid-request, so the result is clamped. + * + * @param {() => number} now Clock returned by `resolveClock()` + * @param {number} start Timestamp read from `now` + * + * @returns {number} Non-negative elapsed milliseconds + */ +function elapsedSince(now, start) { + return Math.max(0, Math.round(now() - start)); +} + +/** + * Dispatch a request to the server using the configured adapter. + * + * @param {object} config The config that is to be used for the request + * + * @returns {Promise} The Promise to be fulfilled + */ +function dispatchRequest(_config) { + // Interceptors may replace the merged config with an ordinary object. Flatten + // it at the dispatch boundary so shared prototype members cannot become + // request behavior, while preserving intentional template/class members. + const config = utils$1.toSafeFlatObject(_config); + throwIfCancellationRequested(config); + config.headers = AxiosHeaders.from(utils$1.getSafeProp(config, 'headers')); + + // Transform request data + config.data = transformData.call(config, config.transformRequest); + if (['post', 'put', 'patch'].indexOf(config.method) !== -1) { + config.headers.setContentType('application/x-www-form-urlencoded', false); + } + const adapter = adapters.getAdapter(config.adapter || defaults.adapter, config); + const now = resolveClock(); + const start = now(); + return adapter(config).then(function onAdapterResolution(response) { + throwIfCancellationRequested(config); + response.duration = elapsedSince(now, start); + + // Expose the current response on config so that transformResponse can + // attach it to any AxiosError it throws (e.g. on JSON parse failure). + // We clean it up afterwards to avoid polluting the config object. + config.response = response; + try { + response.data = transformData.call(config, config.transformResponse, response); + } finally { + delete config.response; + } + response.headers = AxiosHeaders.from(response.headers); + return response; + }, function onAdapterRejection(reason) { + if (!isCancel(reason)) { + throwIfCancellationRequested(config); + + // Transform response data + if (reason && reason.response) { + reason.response.duration = elapsedSince(now, start); + config.response = reason.response; + try { + reason.response.data = transformData.call(config, config.transformResponse, reason.response); + } finally { + delete config.response; + } + reason.response.headers = AxiosHeaders.from(reason.response.headers); + } + } + return Promise.reject(reason); + }); +} + +const validators$1 = {}; + +// eslint-disable-next-line func-names +['object', 'boolean', 'number', 'function', 'string', 'symbol'].forEach((type, i) => { + validators$1[type] = function validator(thing) { + return typeof thing === type || 'a' + (i < 1 ? 'n ' : ' ') + type; + }; +}); +const deprecatedWarnings = {}; + +/** + * Transitional option validator + * + * @param {function|boolean?} validator - set to false if the transitional option has been removed + * @param {string?} version - deprecated version / removed since version + * @param {string?} message - some message with additional info + * + * @returns {function} + */ +validators$1.transitional = function transitional(validator, version, message) { + function formatMessage(opt, desc) { + return '[Axios v' + VERSION + "] Transitional option '" + opt + "'" + desc + (message ? '. ' + message : ''); + } + + // eslint-disable-next-line func-names + return (value, opt, opts) => { + if (validator === false) { + throw new AxiosError(formatMessage(opt, ' has been removed' + (version ? ' in ' + version : '')), AxiosError.ERR_DEPRECATED); + } + if (version && !deprecatedWarnings[opt]) { + deprecatedWarnings[opt] = true; + // eslint-disable-next-line no-console + console.warn(formatMessage(opt, ' has been deprecated since v' + version + ' and will be removed in the near future')); + } + return validator ? validator(value, opt, opts) : true; + }; +}; +validators$1.spelling = function spelling(correctSpelling) { + return (value, opt) => { + // eslint-disable-next-line no-console + console.warn(`${opt} is likely a misspelling of ${correctSpelling}`); + return true; + }; +}; + +/** + * Assert object's properties type + * + * @param {object} options + * @param {object} schema + * @param {boolean?} allowUnknown + * + * @returns {object} + */ + +function assertOptions(options, schema, allowUnknown) { + if (typeof options !== 'object' || options === null) { + throw new AxiosError('options must be an object', AxiosError.ERR_BAD_OPTION_VALUE); + } + const keys = Object.keys(options); + let i = keys.length; + while (i-- > 0) { + const opt = keys[i]; + // Use hasOwnProperty so a polluted Object.prototype. cannot supply + // a non-function validator and cause a TypeError. + const validator = Object.prototype.hasOwnProperty.call(schema, opt) ? schema[opt] : undefined; + if (validator) { + const value = options[opt]; + const result = value === undefined || validator(value, opt, options); + if (result !== true) { + throw new AxiosError('option ' + opt + ' must be ' + result, AxiosError.ERR_BAD_OPTION_VALUE); + } + continue; + } + if (allowUnknown !== true) { + throw new AxiosError('Unknown option ' + opt, AxiosError.ERR_BAD_OPTION); + } + } +} +var validator = { + assertOptions, + validators: validators$1 +}; + +const validators = validator.validators; + +// Recognize header maps without consuming objects intended as literal values. +// AxiosHeaders from other builds share a brand and header-container interface, +// but not constructor identity. A tag and toJSON alone can describe a literal. +const isHeadersBucket = value => { + if (value == null || utils$1.isPlainObject(value) || value instanceof AxiosHeaders) { + return true; + } + try { + return utils$1.isObject(value) && utils$1.getSafeProp(value, Symbol.toStringTag) === 'AxiosHeaders' && ['toJSON', 'set', 'get', 'has', 'delete', 'clear', 'normalize', 'concat', 'toString', Symbol.iterator].every(method => utils$1.isFunction(utils$1.getSafeProp(value, method))); + } catch (e) { + // A failed optional brand probe must not prevent literal header serialization. + return false; + } +}; + +/** + * Create a new instance of Axios + * + * @param {Object} instanceConfig The default config for the instance + * + * @return {Axios} A new instance of Axios + */ +class Axios { + constructor(instanceConfig) { + this.defaults = instanceConfig || {}; + this.interceptors = { + request: new InterceptorManager(), + response: new InterceptorManager() + }; + } + + /** + * Dispatch a request + * + * @param {String|Object} configOrUrl The config specific for this request (merged with this.defaults) + * @param {?Object} config + * + * @returns {Promise} The Promise to be fulfilled + */ + async request(configOrUrl, config) { + try { + return await this._request(configOrUrl, config); + } catch (err) { + if (err instanceof Error) { + try { + let dummy = {}; + Error.captureStackTrace ? Error.captureStackTrace(dummy) : dummy = new Error(); + const dummyStack = dummy.stack; + let stack = ''; + + // slice off the Error: ... line + if (typeof dummyStack === 'string') { + const firstNewlineIndex = dummyStack.indexOf('\n'); + stack = firstNewlineIndex === -1 ? '' : dummyStack.slice(firstNewlineIndex + 1); + } + if (!err.stack) { + err.stack = stack; + } else if (stack) { + // Match a common suffix after the 2 top frames when available, + // otherwise compare the full reconstructed stack. + const firstNewlineIndex = stack.indexOf('\n'); + const secondNewlineIndex = firstNewlineIndex === -1 ? -1 : stack.indexOf('\n', firstNewlineIndex + 1); + const duplicateCheckSuffix = secondNewlineIndex === -1 ? stack : stack.slice(secondNewlineIndex + 1); + + // `AxiosError.from()` may have already inlined the wrapped error's + // stack under a `Caused by:` marker. Keep the reconstructed caller + // frames ahead of that marker so stack-only reporters do not read + // them as part of the low-level cause. + const currentStack = String(err.stack); + const causeIndex = getCauseStackIndex(err, currentStack); + const stackHead = causeIndex === -1 ? currentStack : currentStack.slice(0, causeIndex); + const causeSection = causeIndex === -1 ? '' : currentStack.slice(causeIndex); + if (!stackHead.endsWith(duplicateCheckSuffix)) { + err.stack = stackHead + '\n' + stack + causeSection; + } + } + } catch (e) { + // Ignore failures from custom stack hooks or un-writable stack properties. + } + } + throw err; + } + } + _request(configOrUrl, config) { + /*eslint no-param-reassign:0*/ + // Allow for axios('example/url'[, config]) a la fetch API + if (typeof configOrUrl === 'string') { + config = config || {}; + config.url = configOrUrl; + } else { + config = configOrUrl || {}; + } + config = mergeConfig(this.defaults, config); + const { + transitional, + paramsSerializer, + headers + } = config; + if (transitional !== undefined) { + validator.assertOptions(transitional, { + silentJSONParsing: validators.transitional(validators.boolean), + forcedJSONParsing: validators.transitional(validators.boolean), + clarifyTimeoutError: validators.transitional(validators.boolean), + legacyInterceptorReqResOrdering: validators.transitional(validators.boolean), + advertiseZstdAcceptEncoding: validators.transitional(validators.boolean), + validateStatusUndefinedResolves: validators.transitional(validators.boolean), + encodeBasicAuthUsername: validators.transitional(validators.boolean) + }, false); + } + if (paramsSerializer != null) { + if (utils$1.isFunction(paramsSerializer)) { + config.paramsSerializer = { + serialize: paramsSerializer + }; + } else { + validator.assertOptions(paramsSerializer, { + encode: validators.function, + serialize: validators.function + }, true); + } + } + + // Set config.allowAbsoluteUrls + if (config.allowAbsoluteUrls !== undefined) ; else if (utils$1.hasOwnProp(this.defaults, 'allowAbsoluteUrls') && this.defaults.allowAbsoluteUrls !== undefined) { + config.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls; + } else { + config.allowAbsoluteUrls = true; + } + validator.assertOptions(config, { + baseUrl: validators.spelling('baseURL'), + withXsrfToken: validators.spelling('withXSRFToken') + }, true); + + // Set config.method + config.method = (utils$1.getSafeProp(config, 'method') || utils$1.getSafeProp(this.defaults, 'method') || 'get').toLowerCase(); + + // Flatten header defaults without consuming literal method-named headers. + const commonHeaders = utils$1.getSafeProp(headers, 'common'); + const methodHeaders = utils$1.getSafeProp(headers, config.method); + const contextHeaders = headers && utils$1.merge(isHeadersBucket(commonHeaders) ? commonHeaders : undefined, isHeadersBucket(methodHeaders) ? methodHeaders : undefined); + headers && utils$1.forEach(methodList.concat('common'), method => { + if (isHeadersBucket(utils$1.getSafeProp(headers, method))) { + delete headers[method]; + } + }); + config.headers = AxiosHeaders.concat(contextHeaders, headers); + + // filter out skipped interceptors + const requestInterceptorChain = []; + let synchronousRequestInterceptors = true; + this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) { + if (typeof interceptor.runWhen === 'function' && interceptor.runWhen(config) === false) { + return; + } + synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous; + const transitional = config.transitional || transitionalDefaults; + const legacyInterceptorReqResOrdering = transitional && transitional.legacyInterceptorReqResOrdering; + if (legacyInterceptorReqResOrdering) { + requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected); + } else { + requestInterceptorChain.push(interceptor.fulfilled, interceptor.rejected); + } + }); + const responseInterceptorChain = []; + this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) { + responseInterceptorChain.push(interceptor.fulfilled, interceptor.rejected); + }); + let promise; + let i = 0; + let len; + if (!synchronousRequestInterceptors) { + const chain = [dispatchRequest.bind(this), undefined]; + chain.unshift(...requestInterceptorChain); + chain.push(...responseInterceptorChain); + len = chain.length; + promise = Promise.resolve(config); + while (i < len) { + promise = promise.then(chain[i++], chain[i++]); + } + return promise; + } + len = requestInterceptorChain.length; + let newConfig = config; + while (i < len) { + const onFulfilled = requestInterceptorChain[i++]; + const onRejected = requestInterceptorChain[i++]; + try { + newConfig = onFulfilled ? onFulfilled(newConfig) : newConfig; + } catch (error) { + if (!onRejected) { + promise = Promise.reject(error); + break; + } + try { + const rejectedResult = onRejected.call(this, error); + if (utils$1.isThenable(rejectedResult)) { + promise = Promise.resolve(rejectedResult).then(() => dispatchRequest.call(this, newConfig)); + } + } catch (rejectedError) { + promise = Promise.reject(rejectedError); + } + break; + } + } + if (!promise) { + try { + promise = dispatchRequest.call(this, newConfig); + } catch (error) { + promise = Promise.reject(error); + } + } + i = 0; + len = responseInterceptorChain.length; + while (i < len) { + promise = promise.then(responseInterceptorChain[i++], responseInterceptorChain[i++]); + } + return promise; + } + getUri(config) { + config = mergeConfig(this.defaults, config); + const fullPath = buildFullPath(config.baseURL, config.url, config.allowAbsoluteUrls, config); + return buildURL(fullPath, config.params, config.paramsSerializer); + } +} + +// Provide aliases for supported request methods +utils$1.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) { + /*eslint func-names:0*/ + Axios.prototype[method] = async function (url, config) { + return this.request(mergeConfig(config || {}, { + method, + url, + data: config && utils$1.hasOwnProp(config, 'data') ? config.data : undefined + })); + }; +}); +utils$1.forEach(['post', 'put', 'patch', 'query'], function forEachMethodWithData(method) { + function generateHTTPMethod(isForm) { + return async function httpMethod(url, data, config) { + return this.request(mergeConfig(config || {}, { + method, + headers: isForm ? { + 'Content-Type': 'multipart/form-data' + } : {}, + url, + data + })); + }; + } + Axios.prototype[method] = generateHTTPMethod(); + + // QUERY is a safe/idempotent read method; multipart form bodies don't fit + // its semantics, so no queryForm shorthand is generated. + if (method !== 'query') { + Axios.prototype[method + 'Form'] = generateHTTPMethod(true); + } +}); + +/** + * A `CancelToken` is an object that can be used to request cancellation of an operation. + * + * @param {Function} executor The executor function. + * + * @returns {CancelToken} + */ +class CancelToken { + constructor(executor) { + if (typeof executor !== 'function') { + throw new TypeError('executor must be a function.'); + } + let resolvePromise; + this.promise = new Promise(function promiseExecutor(resolve) { + resolvePromise = resolve; + }); + const token = this; + + // eslint-disable-next-line func-names + this.promise.then(cancel => { + if (!token._listeners) return; + let i = token._listeners.length; + while (i-- > 0) { + token._listeners[i](cancel); + } + token._listeners = null; + }); + + // eslint-disable-next-line func-names + this.promise.then = onfulfilled => { + let _resolve; + // eslint-disable-next-line func-names + const promise = new Promise(resolve => { + token.subscribe(resolve); + _resolve = resolve; + }).then(onfulfilled); + promise.cancel = function reject() { + token.unsubscribe(_resolve); + }; + return promise; + }; + executor(function cancel(message, config, request) { + if (token.reason) { + // Cancellation has already been requested + return; + } + token.reason = new CanceledError(message, config, request); + resolvePromise(token.reason); + }); + } + + /** + * Throws a `CanceledError` if cancellation has been requested. + */ + throwIfRequested() { + if (this.reason) { + throw this.reason; + } + } + + /** + * Subscribe to the cancel signal + */ + + subscribe(listener) { + if (this.reason) { + listener(this.reason); + return; + } + if (this._listeners) { + this._listeners.push(listener); + } else { + this._listeners = [listener]; + } + } + + /** + * Unsubscribe from the cancel signal + */ + + unsubscribe(listener) { + if (!this._listeners) { + return; + } + const index = this._listeners.indexOf(listener); + if (index !== -1) { + this._listeners.splice(index, 1); + } + } + toAbortSignal() { + const controller = new AbortController(); + const abort = err => { + controller.abort(err); + }; + this.subscribe(abort); + controller.signal.unsubscribe = () => this.unsubscribe(abort); + return controller.signal; + } + + /** + * Returns an object that contains a new `CancelToken` and a function that, when called, + * cancels the `CancelToken`. + */ + static source() { + let cancel; + const token = new CancelToken(function executor(c) { + cancel = c; + }); + return { + token, + cancel + }; + } +} + +/** + * Syntactic sugar for invoking a function and expanding an array for arguments. + * + * Common use case would be to use `Function.prototype.apply`. + * + * ```js + * function f(x, y, z) {} + * const args = [1, 2, 3]; + * f.apply(null, args); + * ``` + * + * With `spread` this example can be re-written. + * + * ```js + * spread(function(x, y, z) {})([1, 2, 3]); + * ``` + * + * @param {Function} callback + * + * @returns {Function} + */ +function spread(callback) { + return function wrap(arr) { + return callback.apply(null, arr); + }; +} + +/** + * Determines whether the payload is an error thrown by Axios + * + * @param {*} payload The value to test + * + * @returns {boolean} True if the payload is an error thrown by Axios, otherwise false + */ +function isAxiosError(payload) { + return utils$1.isObject(payload) && payload.isAxiosError === true; +} + +const HttpStatusCode = { + 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, + /** + * @deprecated Use `ContentTooLarge` instead. + */ + PayloadTooLarge: 413, + ContentTooLarge: 413, + UriTooLong: 414, + UnsupportedMediaType: 415, + RangeNotSatisfiable: 416, + ExpectationFailed: 417, + ImATeapot: 418, + MisdirectedRequest: 421, + /** + * @deprecated Use `UnprocessableContent` instead. + */ + UnprocessableEntity: 422, + UnprocessableContent: 422, + Locked: 423, + FailedDependency: 424, + TooEarly: 425, + UpgradeRequired: 426, + PreconditionRequired: 428, + TooManyRequests: 429, + RequestHeaderFieldsTooLarge: 431, + UnavailableForLegalReasons: 451, + InternalServerError: 500, + NotImplemented: 501, + BadGateway: 502, + ServiceUnavailable: 503, + GatewayTimeout: 504, + HttpVersionNotSupported: 505, + VariantAlsoNegotiates: 506, + InsufficientStorage: 507, + LoopDetected: 508, + NotExtended: 510, + NetworkAuthenticationRequired: 511, + WebServerReturnsAnUnknownError: 520, + WebServerIsDown: 521, + ConnectionTimedOut: 522, + OriginIsUnreachable: 523, + TimeoutOccurred: 524, + SslHandshakeFailed: 525, + InvalidSslCertificate: 526 +}; +Object.entries(HttpStatusCode).forEach(([key, value]) => { + if (HttpStatusCode[value] === undefined) { + HttpStatusCode[value] = key; + } +}); + +/** + * Create an instance of Axios + * + * @param {Object} defaultConfig The default config for the instance + * + * @returns {Axios} A new instance of Axios + */ +function createInstance(defaultConfig) { + const context = new Axios(defaultConfig); + const instance = bind(Axios.prototype.request, context); + + // Copy axios.prototype to instance + utils$1.extend(instance, Axios.prototype, context, { + allOwnKeys: true + }); + + // Copy context to instance + utils$1.extend(instance, context, null, { + allOwnKeys: true + }); + + // Factory for creating new instances + instance.create = function create(instanceConfig) { + return createInstance(mergeConfig(defaultConfig, instanceConfig)); + }; + return instance; +} + +// Create the default instance to be exported +const axios = createInstance(defaults); + +// Expose Axios class to allow class inheritance +axios.Axios = Axios; + +// Expose Cancel & CancelToken +axios.CanceledError = CanceledError; +axios.CancelToken = CancelToken; +axios.isCancel = isCancel; +axios.VERSION = VERSION; +axios.toFormData = toFormData; + +// Expose AxiosError class +axios.AxiosError = AxiosError; + +// alias for CanceledError for backward compatibility +axios.Cancel = axios.CanceledError; + +// Expose all/spread +axios.all = function all(promises) { + return Promise.all(promises); +}; +axios.spread = spread; + +// Expose isAxiosError +axios.isAxiosError = isAxiosError; + +// Expose mergeConfig +axios.mergeConfig = mergeConfig; +axios.AxiosHeaders = AxiosHeaders; +axios.formToJSON = thing => formDataToJSON(utils$1.isHTMLForm(thing) ? new FormData(thing) : thing); +axios.getAdapter = adapters.getAdapter; +axios.HttpStatusCode = HttpStatusCode; +axios.default = axios; + +module.exports = axios; diff --git a/node_modules/axios/index.d.cts b/node_modules/axios/index.d.cts new file mode 100644 index 0000000..33de070 --- /dev/null +++ b/node_modules/axios/index.d.cts @@ -0,0 +1,795 @@ +type MethodsHeaders = Partial< + { + [Key in axios.Method as Lowercase]: AxiosHeaders; + } & { common: AxiosHeaders } +>; + +type AxiosHeaderMatcher = + | string + | RegExp + | ((this: AxiosHeaders, value: string, name: string) => boolean); + +type AxiosHeaderParser = (this: AxiosHeaders, value: axios.AxiosHeaderValue, header: string) => any; + +type CommonRequestHeadersList = + | 'Accept' + | 'Content-Length' + | 'User-Agent' + | 'Content-Encoding' + | 'Authorization' + | 'Location'; + +type ContentType = + | axios.AxiosHeaderValue + | 'text/html' + | 'text/plain' + | 'multipart/form-data' + | 'application/json' + | 'application/x-www-form-urlencoded' + | 'application/octet-stream'; + +type CommonResponseHeadersList = + | 'Server' + | 'Content-Type' + | 'Content-Length' + | 'Cache-Control' + | 'Content-Encoding'; + +type CommonResponseHeaderKey = CommonResponseHeadersList | Lowercase; + +type BrowserProgressEvent = any; + +declare class AxiosHeaders { + constructor(headers?: axios.RawAxiosHeaders | AxiosHeaders | string); + + [key: string]: any; + + set( + headerName?: string, + value?: axios.AxiosHeaderValue, + rewrite?: boolean | AxiosHeaderMatcher + ): AxiosHeaders; + set(headers?: axios.RawAxiosHeaders | AxiosHeaders | string, rewrite?: boolean): AxiosHeaders; + set(headers?: Iterable<[string, axios.AxiosHeaderValue]>, rewrite?: boolean): AxiosHeaders; + + get( + headerName: string, + parser: typeof AxiosHeaders.parseParameters + ): axios.AxiosHeaderParameters; + get(headerName: string, parser: RegExp): RegExpExecArray | null; + get(headerName: string, matcher?: true | AxiosHeaderParser): axios.AxiosHeaderValue; + + has(header: string, matcher?: AxiosHeaderMatcher): boolean; + + delete(header: string | string[], matcher?: AxiosHeaderMatcher): boolean; + + clear(matcher?: AxiosHeaderMatcher): boolean; + + normalize(format: boolean): AxiosHeaders; + + concat( + ...targets: Array + ): AxiosHeaders; + + toJSON(asStrings: true): Record; + toJSON(asStrings?: false): Record; + toJSON(asStrings?: boolean): Record; + + static from(thing?: AxiosHeaders | axios.RawAxiosHeaders | string): AxiosHeaders; + + static parseParameters(value: axios.AxiosHeaderValue): axios.AxiosHeaderParameters; + + static accessor(header: string | string[]): AxiosHeaders; + + static concat( + ...targets: Array + ): AxiosHeaders; + + setContentType(value: ContentType, rewrite?: boolean | AxiosHeaderMatcher): AxiosHeaders; + getContentType(parser?: RegExp): RegExpExecArray | null; + getContentType(matcher?: AxiosHeaderMatcher): axios.AxiosHeaderValue; + hasContentType(matcher?: AxiosHeaderMatcher): boolean; + + setContentLength( + value: axios.AxiosHeaderValue, + rewrite?: boolean | AxiosHeaderMatcher + ): AxiosHeaders; + getContentLength(parser?: RegExp): RegExpExecArray | null; + getContentLength(matcher?: AxiosHeaderMatcher): axios.AxiosHeaderValue; + hasContentLength(matcher?: AxiosHeaderMatcher): boolean; + + setAccept(value: axios.AxiosHeaderValue, rewrite?: boolean | AxiosHeaderMatcher): AxiosHeaders; + getAccept(parser?: RegExp): RegExpExecArray | null; + getAccept(matcher?: AxiosHeaderMatcher): axios.AxiosHeaderValue; + hasAccept(matcher?: AxiosHeaderMatcher): boolean; + + setUserAgent(value: axios.AxiosHeaderValue, rewrite?: boolean | AxiosHeaderMatcher): AxiosHeaders; + getUserAgent(parser?: RegExp): RegExpExecArray | null; + getUserAgent(matcher?: AxiosHeaderMatcher): axios.AxiosHeaderValue; + hasUserAgent(matcher?: AxiosHeaderMatcher): boolean; + + setContentEncoding( + value: axios.AxiosHeaderValue, + rewrite?: boolean | AxiosHeaderMatcher + ): AxiosHeaders; + getContentEncoding(parser?: RegExp): RegExpExecArray | null; + getContentEncoding(matcher?: AxiosHeaderMatcher): axios.AxiosHeaderValue; + hasContentEncoding(matcher?: AxiosHeaderMatcher): boolean; + + setAuthorization( + value: axios.AxiosHeaderValue, + rewrite?: boolean | AxiosHeaderMatcher + ): AxiosHeaders; + getAuthorization(parser?: RegExp): RegExpExecArray | null; + getAuthorization(matcher?: AxiosHeaderMatcher): axios.AxiosHeaderValue; + hasAuthorization(matcher?: AxiosHeaderMatcher): boolean; + + getSetCookie(): string[]; + + toString(): string; + + [Symbol.iterator](): IterableIterator<[string, axios.AxiosHeaderValue]>; +} + +declare class AxiosError extends Error { + constructor( + message?: string, + code?: string, + config?: axios.InternalAxiosRequestConfig, + request?: any, + response?: axios.AxiosResponse + ); + + config?: axios.InternalAxiosRequestConfig; + code?: string; + request?: any; + response?: axios.AxiosResponse; + isAxiosError: boolean; + status?: number; + toJSON: () => object; + cause?: Error; + event?: BrowserProgressEvent; + static from( + error: Error | unknown, + code?: string, + config?: axios.InternalAxiosRequestConfig, + request?: any, + response?: axios.AxiosResponse, + customProps?: object + ): AxiosError; + static readonly ERR_FR_TOO_MANY_REDIRECTS = 'ERR_FR_TOO_MANY_REDIRECTS'; + static readonly ERR_BAD_OPTION_VALUE = 'ERR_BAD_OPTION_VALUE'; + static readonly ERR_BAD_OPTION = 'ERR_BAD_OPTION'; + static readonly ERR_NETWORK = 'ERR_NETWORK'; + static readonly ERR_DEPRECATED = 'ERR_DEPRECATED'; + static readonly ERR_BAD_RESPONSE = 'ERR_BAD_RESPONSE'; + static readonly ERR_BAD_REQUEST = 'ERR_BAD_REQUEST'; + static readonly ERR_NOT_SUPPORT = 'ERR_NOT_SUPPORT'; + static readonly ERR_INVALID_URL = 'ERR_INVALID_URL'; + static readonly ERR_CANCELED = 'ERR_CANCELED'; + static readonly ERR_FORM_DATA_DEPTH_EXCEEDED = 'ERR_FORM_DATA_DEPTH_EXCEEDED'; + static readonly ECONNABORTED = 'ECONNABORTED'; + static readonly ECONNREFUSED = 'ECONNREFUSED'; + static readonly ETIMEDOUT = 'ETIMEDOUT'; +} + +declare class CanceledError extends AxiosError { + constructor(message?: string, config?: axios.InternalAxiosRequestConfig, request?: any); + readonly name: 'CanceledError'; + __CANCEL__?: boolean; +} + +declare const axiosResponseDefault: unique symbol; + +type AxiosResponseDefault = axios.AxiosResponseDefault; + +type AxiosResponseResult = R extends AxiosResponseDefault + ? axios.AxiosResponse + : R; + +declare class Axios { + constructor(config?: axios.AxiosRequestConfig); + defaults: axios.AxiosDefaults; + interceptors: { + request: axios.AxiosInterceptorManager; + response: axios.AxiosInterceptorManager; + }; + getUri(config?: axios.AxiosRequestConfig): string; + request( + config: axios.AxiosRequestConfig + ): Promise>; + get( + url: string, + config?: axios.AxiosRequestConfig + ): Promise>; + delete( + url: string, + config?: axios.AxiosRequestConfig + ): Promise>; + head( + url: string, + config?: axios.AxiosRequestConfig + ): Promise>; + options( + url: string, + config?: axios.AxiosRequestConfig + ): Promise>; + post( + url: string, + data?: D, + config?: axios.AxiosRequestConfig + ): Promise>; + put( + url: string, + data?: D, + config?: axios.AxiosRequestConfig + ): Promise>; + patch( + url: string, + data?: D, + config?: axios.AxiosRequestConfig + ): Promise>; + postForm( + url: string, + data?: D, + config?: axios.AxiosRequestConfig + ): Promise>; + putForm( + url: string, + data?: D, + config?: axios.AxiosRequestConfig + ): Promise>; + patchForm( + url: string, + data?: D, + config?: axios.AxiosRequestConfig + ): Promise>; + query( + url: string, + data?: D, + config?: axios.AxiosRequestConfig + ): Promise>; +} + +declare enum HttpStatusCode { + 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, + /** @deprecated Use `ContentTooLarge` instead. */ + PayloadTooLarge = 413, + ContentTooLarge = 413, + UriTooLong = 414, + UnsupportedMediaType = 415, + RangeNotSatisfiable = 416, + ExpectationFailed = 417, + ImATeapot = 418, + MisdirectedRequest = 421, + /** @deprecated Use `UnprocessableContent` instead. */ + UnprocessableEntity = 422, + UnprocessableContent = 422, + Locked = 423, + FailedDependency = 424, + TooEarly = 425, + UpgradeRequired = 426, + PreconditionRequired = 428, + TooManyRequests = 429, + RequestHeaderFieldsTooLarge = 431, + UnavailableForLegalReasons = 451, + InternalServerError = 500, + NotImplemented = 501, + BadGateway = 502, + ServiceUnavailable = 503, + GatewayTimeout = 504, + HttpVersionNotSupported = 505, + VariantAlsoNegotiates = 506, + InsufficientStorage = 507, + LoopDetected = 508, + NotExtended = 510, + NetworkAuthenticationRequired = 511, + WebServerReturnsAnUnknownError = 520, + WebServerIsDown = 521, + ConnectionTimedOut = 522, + OriginIsUnreachable = 523, + TimeoutOccurred = 524, + SslHandshakeFailed = 525, + InvalidSslCertificate = 526, +} + +type InternalAxiosError = AxiosError; + +declare namespace axios { + interface AxiosResponseDefault { + readonly [axiosResponseDefault]: true; + } + + type AxiosHeaderParameters = Record; + + type AxiosError = InternalAxiosError; + + interface RawAxiosHeaders { + [key: string]: AxiosHeaderValue; + } + + type RawAxiosRequestHeaders = Partial< + RawAxiosHeaders & { + [Key in CommonRequestHeadersList]: AxiosHeaderValue; + } & { + 'Content-Type': ContentType; + } + >; + + type AxiosRequestHeaders = RawAxiosRequestHeaders & AxiosHeaders; + + type AxiosHeaderValue = AxiosHeaders | string | string[] | number | boolean | null; + + type RawCommonResponseHeaders = { + [Key in CommonResponseHeaderKey]: AxiosHeaderValue; + } & { + 'set-cookie': string[]; + }; + + type RawAxiosResponseHeaders = Partial; + + type AxiosResponseHeaders = RawAxiosResponseHeaders & AxiosHeaders; + + interface AxiosRequestTransformer { + (this: InternalAxiosRequestConfig, data: any, headers: AxiosRequestHeaders): any; + } + + interface AxiosResponseTransformer { + ( + this: InternalAxiosRequestConfig, + data: any, + headers: AxiosResponseHeaders, + status?: number + ): any; + } + + interface AxiosAdapter { + (config: InternalAxiosRequestConfig): AxiosPromise; + } + + interface AxiosBasicCredentials { + username: string; + password: string; + } + + interface AxiosProxyConfig { + host: string; + port: number; + auth?: AxiosBasicCredentials; + protocol?: string; + } + + type UppercaseMethod = + | 'GET' + | 'DELETE' + | 'HEAD' + | 'OPTIONS' + | 'POST' + | 'PUT' + | 'PATCH' + | 'PURGE' + | 'LINK' + | 'UNLINK' + | 'QUERY'; + + type Method = (UppercaseMethod | Lowercase) & {}; + + type ResponseType = 'arraybuffer' | 'blob' | 'document' | 'json' | 'text' | 'stream' | 'formdata'; + + type UppercaseResponseEncoding = + | 'ASCII' + | 'ANSI' + | 'BINARY' + | 'BASE64' + | 'BASE64URL' + | 'HEX' + | 'LATIN1' + | 'UCS-2' + | 'UCS2' + | 'UTF-8' + | 'UTF8' + | 'UTF16LE'; + + type responseEncoding = (UppercaseResponseEncoding | Lowercase) & {}; + + interface TransitionalOptions { + silentJSONParsing?: boolean; + forcedJSONParsing?: boolean; + clarifyTimeoutError?: boolean; + legacyInterceptorReqResOrdering?: boolean; + advertiseZstdAcceptEncoding?: boolean; + validateStatusUndefinedResolves?: boolean; + /** Opt in to UTF-8 Basic auth usernames in XHR/Fetch config resolution. Defaults to false. */ + encodeBasicAuthUsername?: boolean; + } + + interface GenericAbortSignal { + readonly aborted: boolean; + onabort?: ((...args: any) => any) | null; + addEventListener?: (...args: any) => any; + removeEventListener?: (...args: any) => any; + } + + interface FormDataVisitorHelpers { + defaultVisitor: SerializerVisitor; + convertValue: (value: any) => any; + isVisitable: (value: any) => boolean; + } + + interface SerializerVisitor { + ( + this: GenericFormData, + value: any, + key: string | number, + path: null | Array, + helpers: FormDataVisitorHelpers + ): boolean; + } + + interface SerializerOptions { + visitor?: SerializerVisitor; + dots?: boolean; + metaTokens?: boolean; + indexes?: boolean | null; + maxDepth?: number; + Blob?: { new (...args: any[]): any }; + } + + // tslint:disable-next-line + interface FormSerializerOptions extends SerializerOptions {} + + interface ParamEncoder { + (value: any, defaultEncoder: (value: any) => any): any; + } + + interface CustomParamsSerializer

> { + (params: P, options?: ParamsSerializerOptions

): string; + } + + interface ParamsSerializerOptions

> extends SerializerOptions { + encode?: ParamEncoder; + serialize?: CustomParamsSerializer

; + } + + type MaxUploadRate = number; + + type MaxDownloadRate = number; + + interface AxiosProgressEvent { + loaded: number; + total?: number; + progress?: number; + bytes: number; + rate?: number; + estimated?: number; + upload?: boolean; + download?: boolean; + event?: BrowserProgressEvent; + lengthComputable: boolean; + } + + type Milliseconds = number; + + type AxiosAdapterName = 'fetch' | 'xhr' | 'http' | (string & {}); + + type AxiosAdapterConfig = AxiosAdapter | AxiosAdapterName; + + type AddressFamily = 4 | 6 | undefined; + + interface LookupAddressEntry { + address: string; + family?: AddressFamily; + } + + type LookupAddress = string | LookupAddressEntry; + + interface AxiosRequestConfig { + url?: string; + method?: Method | string; + baseURL?: string; + allowAbsoluteUrls?: boolean; + transformRequest?: AxiosRequestTransformer | AxiosRequestTransformer[]; + transformResponse?: AxiosResponseTransformer | AxiosResponseTransformer[]; + headers?: (RawAxiosRequestHeaders & MethodsHeaders) | AxiosHeaders; + params?: P; + paramsSerializer?: + | ParamsSerializerOptions : P> + | CustomParamsSerializer : P>; + data?: D; + timeout?: Milliseconds; + timeoutErrorMessage?: string; + withCredentials?: boolean; + adapter?: AxiosAdapterConfig | AxiosAdapterConfig[]; + auth?: AxiosBasicCredentials; + responseType?: ResponseType; + responseEncoding?: responseEncoding | string; + xsrfCookieName?: string; + xsrfHeaderName?: string; + onUploadProgress?: (progressEvent: AxiosProgressEvent) => void; + onDownloadProgress?: (progressEvent: AxiosProgressEvent) => void; + maxContentLength?: number; + validateStatus?: ((status: number) => boolean) | null; + maxBodyLength?: number; + maxRedirects?: number; + maxRate?: number | [MaxUploadRate, MaxDownloadRate]; + beforeRedirect?: ( + options: Record, + responseDetails: { headers: Record; statusCode: HttpStatusCode }, + requestDetails: { headers: Record; url: string; method: string }, + ) => void; + socketPath?: string | null; + allowedSocketPaths?: string | string[] | null; + transport?: any; + httpAgent?: any; + httpsAgent?: any; + proxy?: AxiosProxyConfig | false; + cancelToken?: CancelToken | undefined; + decompress?: boolean; + transitional?: TransitionalOptions; + signal?: GenericAbortSignal; + insecureHTTPParser?: boolean; + env?: { + FormData?: new (...args: any[]) => object; + fetch?: (input: URL | Request | string, init?: RequestInit) => Promise; + Request?: new (input: URL | Request | string, init?: RequestInit) => Request; + /** + * Custom Response constructor for the fetch adapter. + * When response-body streaming is supported, must also accept + * `ReadableStream` bodies at runtime for `onDownloadProgress`, + * enabled `maxContentLength` limits, or cancellation/timeout tracking with + * `responseType: 'stream'` or `'response'`. + * The body parameter retains its legacy type for compatibility. + */ + Response?: new ( + body?: ArrayBuffer | ArrayBufferView | Blob | FormData | URLSearchParams | string | null, + init?: ResponseInit + ) => Response; + }; + formSerializer?: FormSerializerOptions; + family?: AddressFamily; + lookup?: + | (( + hostname: string, + options: object, + cb: ( + err: Error | null, + address: LookupAddress | LookupAddress[], + family?: AddressFamily + ) => void + ) => void) + | (( + hostname: string, + options: object + ) => Promise< + | [address: LookupAddressEntry | LookupAddressEntry[], family?: AddressFamily] + | LookupAddress + >); + withXSRFToken?: boolean | ((config: InternalAxiosRequestConfig) => boolean | undefined); + parseReviver?: (this: any, key: string, value: any, context?: { source?: string }) => any; + fetchOptions?: + | Omit + | Record; + httpVersion?: 1 | 2; + http2Options?: Record & { + sessionTimeout?: number; + }; + formDataHeaderPolicy?: 'legacy' | 'content-only'; + redact?: string[]; + sensitiveHeaders?: string[]; + } + + // Alias + type RawAxiosRequestConfig = AxiosRequestConfig; + + interface InternalAxiosRequestConfig extends AxiosRequestConfig { + headers: AxiosRequestHeaders; + } + + interface HeadersDefaults { + common: RawAxiosRequestHeaders; + delete: RawAxiosRequestHeaders; + get: RawAxiosRequestHeaders; + head: RawAxiosRequestHeaders; + post: RawAxiosRequestHeaders; + put: RawAxiosRequestHeaders; + patch: RawAxiosRequestHeaders; + options?: RawAxiosRequestHeaders; + purge?: RawAxiosRequestHeaders; + link?: RawAxiosRequestHeaders; + unlink?: RawAxiosRequestHeaders; + query?: RawAxiosRequestHeaders; + } + + interface AxiosDefaults extends Omit, 'headers'> { + headers: HeadersDefaults; + } + + interface CreateAxiosDefaults extends Omit< + AxiosRequestConfig, + 'headers' + > { + headers?: RawAxiosRequestHeaders | AxiosHeaders | Partial; + } + + interface AxiosResponse { + data: T; + status: number; + statusText: string; + /** + * Whole milliseconds from adapter invocation to settlement, clamped at zero. Measured with + * `performance.now()` when available, otherwise `Date.now()`. + * Excludes interceptors and request/response transforms. Stream consumption is not included. + */ + duration?: number; + headers: (H & RawAxiosResponseHeaders) | AxiosResponseHeaders; + config: InternalAxiosRequestConfig; + request?: any; + } + + type AxiosPromise = Promise>; + + interface CancelStatic { + new (message?: string): Cancel; + } + + interface Cancel { + message: string | undefined; + } + + interface Canceler { + (message?: string, config?: AxiosRequestConfig, request?: any): void; + } + + interface CancelTokenStatic { + new (executor: (cancel: Canceler) => void): CancelToken; + source(): CancelTokenSource; + } + + interface CancelToken { + promise: Promise; + reason?: Cancel; + throwIfRequested(): void; + subscribe(listener: (cancel: Cancel | any) => void): void; + unsubscribe(listener: (cancel: Cancel | any) => void): void; + toAbortSignal(): AbortSignal; + } + + interface CancelTokenSource { + token: CancelToken; + cancel: Canceler; + } + + interface AxiosInterceptorOptions { + synchronous?: boolean; + runWhen?: ((config: InternalAxiosRequestConfig) => boolean) | null; + } + + type AxiosInterceptorFulfilled = (value: T) => T | Promise; + type AxiosInterceptorRejected = (error: any) => any; + + type AxiosRequestInterceptorUse = ( + onFulfilled?: AxiosInterceptorFulfilled | null, + onRejected?: AxiosInterceptorRejected | null, + options?: AxiosInterceptorOptions + ) => number; + + type AxiosResponseInterceptorUse = ( + onFulfilled?: AxiosInterceptorFulfilled | null, + onRejected?: AxiosInterceptorRejected | null + ) => number; + + interface AxiosInterceptorHandler { + fulfilled: AxiosInterceptorFulfilled; + rejected?: AxiosInterceptorRejected; + synchronous: boolean; + runWhen?: ((config: InternalAxiosRequestConfig) => boolean) | null; + } + + interface AxiosInterceptorManager { + use: V extends AxiosResponse ? AxiosResponseInterceptorUse : AxiosRequestInterceptorUse; + eject(id: number): void; + clear(): void; + handlers?: Array>; + } + + interface AxiosInstance extends Axios { + ( + config: AxiosRequestConfig + ): Promise>; + ( + url: string, + config?: AxiosRequestConfig + ): Promise>; + + create(config?: CreateAxiosDefaults): AxiosInstance; + defaults: Omit & { + headers: HeadersDefaults & { + [key: string]: AxiosHeaderValue; + }; + }; + } + + interface GenericFormData { + append(name: string, value: any, options?: any): any; + } + + interface GenericHTMLFormElement { + name: string; + method: string; + submit(): void; + } + + interface AxiosStatic extends AxiosInstance { + Cancel: typeof CanceledError; + CancelToken: CancelTokenStatic; + Axios: typeof Axios; + AxiosError: typeof AxiosError; + CanceledError: typeof CanceledError; + HttpStatusCode: typeof HttpStatusCode; + readonly VERSION: string; + isCancel(value: any): value is CanceledError; + all(values: Array>): Promise; + spread(callback: (...args: T[]) => R): (array: T[]) => R; + isAxiosError(payload: any): payload is AxiosError; + toFormData( + sourceObj: object, + targetFormData?: GenericFormData, + options?: FormSerializerOptions + ): GenericFormData; + formToJSON(form: GenericFormData | GenericHTMLFormElement): object; + /** + * Resolves an adapter by name, adapter function, or priority list. + * @param config Request config forwarded to adapter getters. The built-in `fetch` + * adapter reads `env.fetch`, `env.Request`, and `env.Response` from it and falls + * back to the globals when it is omitted. Other fields are not applied here. + */ + getAdapter( + adapters: AxiosAdapterConfig | AxiosAdapterConfig[] | undefined, + config?: AxiosRequestConfig + ): AxiosAdapter; + AxiosHeaders: typeof AxiosHeaders; + mergeConfig( + config1: AxiosRequestConfig, + config2: AxiosRequestConfig + ): AxiosRequestConfig; + } +} + +declare const axios: axios.AxiosStatic; + +export = axios; diff --git a/node_modules/axios/index.d.ts b/node_modules/axios/index.d.ts new file mode 100644 index 0000000..7c1bda7 --- /dev/null +++ b/node_modules/axios/index.d.ts @@ -0,0 +1,812 @@ +// TypeScript Version: 4.7 +type StringLiteralsOrString = Literals | (string & {}); + +export type AxiosHeaderValue = AxiosHeaders | string | string[] | number | boolean | null; + +export type AxiosHeaderParameters = Record; + +export interface RawAxiosHeaders { + [key: string]: AxiosHeaderValue; +} + +type MethodsHeaders = Partial< + { + [Key in Method as Lowercase]: AxiosHeaders; + } & { common: AxiosHeaders } +>; + +type AxiosHeaderMatcher = + | string + | RegExp + | ((this: AxiosHeaders, value: string, name: string) => boolean); + +type AxiosHeaderParser = (this: AxiosHeaders, value: AxiosHeaderValue, header: string) => any; + +export class AxiosHeaders { + constructor(headers?: RawAxiosHeaders | AxiosHeaders | string); + + [key: string]: any; + + set( + headerName?: string, + value?: AxiosHeaderValue, + rewrite?: boolean | AxiosHeaderMatcher + ): AxiosHeaders; + set(headers?: RawAxiosHeaders | AxiosHeaders | string, rewrite?: boolean): AxiosHeaders; + set(headers?: Iterable<[string, AxiosHeaderValue]>, rewrite?: boolean): AxiosHeaders; + + get(headerName: string, parser: typeof AxiosHeaders.parseParameters): AxiosHeaderParameters; + get(headerName: string, parser: RegExp): RegExpExecArray | null; + get(headerName: string, matcher?: true | AxiosHeaderParser): AxiosHeaderValue; + + has(header: string, matcher?: AxiosHeaderMatcher): boolean; + + delete(header: string | string[], matcher?: AxiosHeaderMatcher): boolean; + + clear(matcher?: AxiosHeaderMatcher): boolean; + + normalize(format: boolean): AxiosHeaders; + + concat( + ...targets: Array + ): AxiosHeaders; + + toJSON(asStrings: true): Record; + toJSON(asStrings?: false): Record; + toJSON(asStrings?: boolean): Record; + + static from(thing?: AxiosHeaders | RawAxiosHeaders | string): AxiosHeaders; + + static parseParameters(value: AxiosHeaderValue): AxiosHeaderParameters; + + static accessor(header: string | string[]): AxiosHeaders; + + static concat( + ...targets: Array + ): AxiosHeaders; + + setContentType(value: ContentType, rewrite?: boolean | AxiosHeaderMatcher): AxiosHeaders; + getContentType(parser?: RegExp): RegExpExecArray | null; + getContentType(matcher?: AxiosHeaderMatcher): AxiosHeaderValue; + hasContentType(matcher?: AxiosHeaderMatcher): boolean; + + setContentLength(value: AxiosHeaderValue, rewrite?: boolean | AxiosHeaderMatcher): AxiosHeaders; + getContentLength(parser?: RegExp): RegExpExecArray | null; + getContentLength(matcher?: AxiosHeaderMatcher): AxiosHeaderValue; + hasContentLength(matcher?: AxiosHeaderMatcher): boolean; + + setAccept(value: AxiosHeaderValue, rewrite?: boolean | AxiosHeaderMatcher): AxiosHeaders; + getAccept(parser?: RegExp): RegExpExecArray | null; + getAccept(matcher?: AxiosHeaderMatcher): AxiosHeaderValue; + hasAccept(matcher?: AxiosHeaderMatcher): boolean; + + setUserAgent(value: AxiosHeaderValue, rewrite?: boolean | AxiosHeaderMatcher): AxiosHeaders; + getUserAgent(parser?: RegExp): RegExpExecArray | null; + getUserAgent(matcher?: AxiosHeaderMatcher): AxiosHeaderValue; + hasUserAgent(matcher?: AxiosHeaderMatcher): boolean; + + setContentEncoding(value: AxiosHeaderValue, rewrite?: boolean | AxiosHeaderMatcher): AxiosHeaders; + getContentEncoding(parser?: RegExp): RegExpExecArray | null; + getContentEncoding(matcher?: AxiosHeaderMatcher): AxiosHeaderValue; + hasContentEncoding(matcher?: AxiosHeaderMatcher): boolean; + + setAuthorization(value: AxiosHeaderValue, rewrite?: boolean | AxiosHeaderMatcher): AxiosHeaders; + getAuthorization(parser?: RegExp): RegExpExecArray | null; + getAuthorization(matcher?: AxiosHeaderMatcher): AxiosHeaderValue; + hasAuthorization(matcher?: AxiosHeaderMatcher): boolean; + + getSetCookie(): string[]; + + toString(): string; + + [Symbol.iterator](): IterableIterator<[string, AxiosHeaderValue]>; +} + +type CommonRequestHeadersList = + | 'Accept' + | 'Content-Length' + | 'User-Agent' + | 'Content-Encoding' + | 'Authorization' + | 'Location'; + +type ContentType = + | AxiosHeaderValue + | 'text/html' + | 'text/plain' + | 'multipart/form-data' + | 'application/json' + | 'application/x-www-form-urlencoded' + | 'application/octet-stream'; + +export type RawAxiosRequestHeaders = Partial< + RawAxiosHeaders & { + [Key in CommonRequestHeadersList]: AxiosHeaderValue; + } & { + 'Content-Type': ContentType; + } +>; + +export type AxiosRequestHeaders = RawAxiosRequestHeaders & AxiosHeaders; + +type CommonResponseHeadersList = + | 'Server' + | 'Content-Type' + | 'Content-Length' + | 'Cache-Control' + | 'Content-Encoding'; + +type CommonResponseHeaderKey = CommonResponseHeadersList | Lowercase; + +type RawCommonResponseHeaders = { + [Key in CommonResponseHeaderKey]: AxiosHeaderValue; +} & { + 'set-cookie': string[]; +}; + +export type RawAxiosResponseHeaders = Partial; + +export type AxiosResponseHeaders = RawAxiosResponseHeaders & AxiosHeaders; + +export interface AxiosRequestTransformer { + (this: InternalAxiosRequestConfig, data: any, headers: AxiosRequestHeaders): any; +} + +export interface AxiosResponseTransformer { + ( + this: InternalAxiosRequestConfig, + data: any, + headers: AxiosResponseHeaders, + status?: number + ): any; +} + +export interface AxiosAdapter { + (config: InternalAxiosRequestConfig): AxiosPromise; +} + +export interface AxiosBasicCredentials { + username: string; + password: string; +} + +export interface AxiosProxyConfig { + host: string; + port: number; + auth?: AxiosBasicCredentials; + protocol?: string; +} + +export enum HttpStatusCode { + 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, + /** @deprecated Use `ContentTooLarge` instead. */ + PayloadTooLarge = 413, + ContentTooLarge = 413, + UriTooLong = 414, + UnsupportedMediaType = 415, + RangeNotSatisfiable = 416, + ExpectationFailed = 417, + ImATeapot = 418, + MisdirectedRequest = 421, + /** @deprecated Use `UnprocessableContent` instead. */ + UnprocessableEntity = 422, + UnprocessableContent = 422, + Locked = 423, + FailedDependency = 424, + TooEarly = 425, + UpgradeRequired = 426, + PreconditionRequired = 428, + TooManyRequests = 429, + RequestHeaderFieldsTooLarge = 431, + UnavailableForLegalReasons = 451, + InternalServerError = 500, + NotImplemented = 501, + BadGateway = 502, + ServiceUnavailable = 503, + GatewayTimeout = 504, + HttpVersionNotSupported = 505, + VariantAlsoNegotiates = 506, + InsufficientStorage = 507, + LoopDetected = 508, + NotExtended = 510, + NetworkAuthenticationRequired = 511, + WebServerReturnsAnUnknownError = 520, + WebServerIsDown = 521, + ConnectionTimedOut = 522, + OriginIsUnreachable = 523, + TimeoutOccurred = 524, + SslHandshakeFailed = 525, + InvalidSslCertificate = 526, +} + +type UppercaseMethod = + | 'GET' + | 'DELETE' + | 'HEAD' + | 'OPTIONS' + | 'POST' + | 'PUT' + | 'PATCH' + | 'PURGE' + | 'LINK' + | 'UNLINK' + | 'QUERY'; + +export type Method = (UppercaseMethod | Lowercase) & {}; + +export type ResponseType = + | 'arraybuffer' + | 'blob' + | 'document' + | 'json' + | 'text' + | 'stream' + | 'formdata'; + +type UppercaseResponseEncoding = + | 'ASCII' + | 'ANSI' + | 'BINARY' + | 'BASE64' + | 'BASE64URL' + | 'HEX' + | 'LATIN1' + | 'UCS-2' + | 'UCS2' + | 'UTF-8' + | 'UTF8' + | 'UTF16LE'; + +export type responseEncoding = ( + | UppercaseResponseEncoding + | Lowercase +) & {}; + +export interface TransitionalOptions { + silentJSONParsing?: boolean; + forcedJSONParsing?: boolean; + clarifyTimeoutError?: boolean; + legacyInterceptorReqResOrdering?: boolean; + advertiseZstdAcceptEncoding?: boolean; + validateStatusUndefinedResolves?: boolean; + /** Opt in to UTF-8 Basic auth usernames in XHR/Fetch config resolution. Defaults to false. */ + encodeBasicAuthUsername?: boolean; +} + +export interface GenericAbortSignal { + readonly aborted: boolean; + onabort?: ((...args: any) => any) | null; + addEventListener?: (...args: any) => any; + removeEventListener?: (...args: any) => any; +} + +export interface FormDataVisitorHelpers { + defaultVisitor: SerializerVisitor; + convertValue: (value: any) => any; + isVisitable: (value: any) => boolean; +} + +export interface SerializerVisitor { + ( + this: GenericFormData, + value: any, + key: string | number, + path: null | Array, + helpers: FormDataVisitorHelpers + ): boolean; +} + +export interface SerializerOptions { + visitor?: SerializerVisitor; + dots?: boolean; + metaTokens?: boolean; + indexes?: boolean | null; + maxDepth?: number; + Blob?: { new (...args: any[]): any }; +} + +// tslint:disable-next-line +export interface FormSerializerOptions extends SerializerOptions {} + +export interface ParamEncoder { + (value: any, defaultEncoder: (value: any) => any): any; +} + +export interface CustomParamsSerializer

> { + (params: P, options?: ParamsSerializerOptions

): string; +} + +export interface ParamsSerializerOptions

> extends SerializerOptions { + encode?: ParamEncoder; + serialize?: CustomParamsSerializer

; +} + +type MaxUploadRate = number; + +type MaxDownloadRate = number; + +type BrowserProgressEvent = any; + +export interface AxiosProgressEvent { + loaded: number; + total?: number; + progress?: number; + bytes: number; + rate?: number; + estimated?: number; + upload?: boolean; + download?: boolean; + event?: BrowserProgressEvent; + lengthComputable: boolean; +} + +type Milliseconds = number; + +type AxiosAdapterName = StringLiteralsOrString<'xhr' | 'http' | 'fetch'>; + +type AxiosAdapterConfig = AxiosAdapter | AxiosAdapterName; + +export type AddressFamily = 4 | 6 | undefined; + +export interface LookupAddressEntry { + address: string; + family?: AddressFamily; +} + +export type LookupAddress = string | LookupAddressEntry; + +export interface AxiosRequestConfig { + url?: string; + method?: StringLiteralsOrString; + baseURL?: string; + allowAbsoluteUrls?: boolean; + transformRequest?: AxiosRequestTransformer | AxiosRequestTransformer[]; + transformResponse?: AxiosResponseTransformer | AxiosResponseTransformer[]; + headers?: (RawAxiosRequestHeaders & MethodsHeaders) | AxiosHeaders; + params?: P; + paramsSerializer?: + | ParamsSerializerOptions : P> + | CustomParamsSerializer : P>; + data?: D; + timeout?: Milliseconds; + timeoutErrorMessage?: string; + withCredentials?: boolean; + adapter?: AxiosAdapterConfig | AxiosAdapterConfig[]; + auth?: AxiosBasicCredentials; + responseType?: ResponseType; + responseEncoding?: StringLiteralsOrString; + xsrfCookieName?: string; + xsrfHeaderName?: string; + onUploadProgress?: (progressEvent: AxiosProgressEvent) => void; + onDownloadProgress?: (progressEvent: AxiosProgressEvent) => void; + maxContentLength?: number; + validateStatus?: ((status: number) => boolean) | null; + maxBodyLength?: number; + maxRedirects?: number; + maxRate?: number | [MaxUploadRate, MaxDownloadRate]; + beforeRedirect?: ( + options: Record, + responseDetails: { + headers: Record; + statusCode: HttpStatusCode; + }, + requestDetails: { + headers: Record; + url: string; + method: string; + }, + ) => void; + socketPath?: string | null; + allowedSocketPaths?: string | string[] | null; + transport?: any; + httpAgent?: any; + httpsAgent?: any; + proxy?: AxiosProxyConfig | false; + cancelToken?: CancelToken | undefined; + decompress?: boolean; + transitional?: TransitionalOptions; + signal?: GenericAbortSignal; + insecureHTTPParser?: boolean; + env?: { + FormData?: new (...args: any[]) => object; + fetch?: (input: URL | Request | string, init?: RequestInit) => Promise; + Request?: new (input: URL | Request | string, init?: RequestInit) => Request; + /** + * Custom Response constructor for the fetch adapter. + * When response-body streaming is supported, must also accept + * `ReadableStream` bodies at runtime for `onDownloadProgress`, + * enabled `maxContentLength` limits, or cancellation/timeout tracking with + * `responseType: 'stream'` or `'response'`. + * The body parameter retains its legacy type for compatibility. + */ + Response?: new ( + body?: ArrayBuffer | ArrayBufferView | Blob | FormData | URLSearchParams | string | null, + init?: ResponseInit + ) => Response; + }; + formSerializer?: FormSerializerOptions; + family?: AddressFamily; + lookup?: + | (( + hostname: string, + options: object, + cb: ( + err: Error | null, + address: LookupAddress | LookupAddress[], + family?: AddressFamily + ) => void + ) => void) + | (( + hostname: string, + options: object + ) => Promise< + [address: LookupAddressEntry | LookupAddressEntry[], family?: AddressFamily] | LookupAddress + >); + withXSRFToken?: boolean | ((config: InternalAxiosRequestConfig) => boolean | undefined); + parseReviver?: (this: any, key: string, value: any, context?: { source?: string }) => any; + fetchOptions?: Omit | Record; + httpVersion?: 1 | 2; + http2Options?: Record & { + sessionTimeout?: number; + }; + formDataHeaderPolicy?: 'legacy' | 'content-only'; + redact?: string[]; + sensitiveHeaders?: string[]; +} + +// Alias +export type RawAxiosRequestConfig = AxiosRequestConfig; + +export interface InternalAxiosRequestConfig extends AxiosRequestConfig { + headers: AxiosRequestHeaders; +} + +export interface HeadersDefaults { + common: RawAxiosRequestHeaders; + delete: RawAxiosRequestHeaders; + get: RawAxiosRequestHeaders; + head: RawAxiosRequestHeaders; + post: RawAxiosRequestHeaders; + put: RawAxiosRequestHeaders; + patch: RawAxiosRequestHeaders; + options?: RawAxiosRequestHeaders; + purge?: RawAxiosRequestHeaders; + link?: RawAxiosRequestHeaders; + unlink?: RawAxiosRequestHeaders; + query?: RawAxiosRequestHeaders; +} + +export interface AxiosDefaults extends Omit, 'headers'> { + headers: HeadersDefaults; +} + +export interface CreateAxiosDefaults extends Omit< + AxiosRequestConfig, + 'headers' +> { + headers?: RawAxiosRequestHeaders | AxiosHeaders | Partial; +} + +export interface AxiosResponse { + data: T; + status: number; + statusText: string; + /** + * Whole milliseconds from adapter invocation to settlement, clamped at zero. Measured with + * `performance.now()` when available, otherwise `Date.now()`. + * Excludes interceptors and request/response transforms. Stream consumption is not included. + */ + duration?: number; + headers: (H & RawAxiosResponseHeaders) | AxiosResponseHeaders; + config: InternalAxiosRequestConfig; + request?: any; +} + +export class AxiosError extends Error { + constructor( + message?: string, + code?: string, + config?: InternalAxiosRequestConfig, + request?: any, + response?: AxiosResponse + ); + + config?: InternalAxiosRequestConfig; + code?: string; + request?: any; + response?: AxiosResponse; + isAxiosError: boolean; + status?: number; + toJSON: () => object; + cause?: Error; + event?: BrowserProgressEvent; + static from( + error: Error | unknown, + code?: string, + config?: InternalAxiosRequestConfig, + request?: any, + response?: AxiosResponse, + customProps?: object + ): AxiosError; + static readonly ERR_FR_TOO_MANY_REDIRECTS = 'ERR_FR_TOO_MANY_REDIRECTS'; + static readonly ERR_BAD_OPTION_VALUE = 'ERR_BAD_OPTION_VALUE'; + static readonly ERR_BAD_OPTION = 'ERR_BAD_OPTION'; + static readonly ERR_NETWORK = 'ERR_NETWORK'; + static readonly ERR_DEPRECATED = 'ERR_DEPRECATED'; + static readonly ERR_BAD_RESPONSE = 'ERR_BAD_RESPONSE'; + static readonly ERR_BAD_REQUEST = 'ERR_BAD_REQUEST'; + static readonly ERR_NOT_SUPPORT = 'ERR_NOT_SUPPORT'; + static readonly ERR_INVALID_URL = 'ERR_INVALID_URL'; + static readonly ERR_CANCELED = 'ERR_CANCELED'; + static readonly ERR_FORM_DATA_DEPTH_EXCEEDED = 'ERR_FORM_DATA_DEPTH_EXCEEDED'; + static readonly ECONNABORTED = 'ECONNABORTED'; + static readonly ECONNREFUSED = 'ECONNREFUSED'; + static readonly ETIMEDOUT = 'ETIMEDOUT'; +} + +export class CanceledError extends AxiosError { + constructor(message?: string, config?: InternalAxiosRequestConfig, request?: any); + readonly name: 'CanceledError'; + __CANCEL__?: boolean; +} + +declare const axiosResponseDefault: unique symbol; + +export interface AxiosResponseDefault { + readonly [axiosResponseDefault]: true; +} + +type AxiosResponseResult = R extends AxiosResponseDefault + ? AxiosResponse + : R; + +export type AxiosPromise = Promise>; + +export interface CancelStatic { + new (message?: string): Cancel; +} + +export interface Cancel { + message: string | undefined; +} + +export interface Canceler { + (message?: string, config?: AxiosRequestConfig, request?: any): void; +} + +export interface CancelTokenStatic { + new (executor: (cancel: Canceler) => void): CancelToken; + source(): CancelTokenSource; +} + +export interface CancelToken { + promise: Promise; + reason?: Cancel; + throwIfRequested(): void; + subscribe(listener: (cancel: Cancel | any) => void): void; + unsubscribe(listener: (cancel: Cancel | any) => void): void; + toAbortSignal(): AbortSignal; +} + +export interface CancelTokenSource { + token: CancelToken; + cancel: Canceler; +} + +export interface AxiosInterceptorOptions { + synchronous?: boolean; + runWhen?: ((config: InternalAxiosRequestConfig) => boolean) | null; +} + +type AxiosInterceptorFulfilled = (value: T) => T | Promise; +type AxiosInterceptorRejected = (error: any) => any; + +type AxiosRequestInterceptorUse = ( + onFulfilled?: AxiosInterceptorFulfilled | null, + onRejected?: AxiosInterceptorRejected | null, + options?: AxiosInterceptorOptions +) => number; + +type AxiosResponseInterceptorUse = ( + onFulfilled?: AxiosInterceptorFulfilled | null, + onRejected?: AxiosInterceptorRejected | null +) => number; + +interface AxiosInterceptorHandler { + fulfilled: AxiosInterceptorFulfilled; + rejected?: AxiosInterceptorRejected; + synchronous: boolean; + runWhen?: ((config: InternalAxiosRequestConfig) => boolean) | null; +} + +export interface AxiosInterceptorManager { + use: V extends AxiosResponse ? AxiosResponseInterceptorUse : AxiosRequestInterceptorUse; + eject(id: number): void; + clear(): void; + handlers?: Array>; +} + +export class Axios { + constructor(config?: AxiosRequestConfig); + defaults: AxiosDefaults; + interceptors: { + request: AxiosInterceptorManager; + response: AxiosInterceptorManager; + }; + getUri(config?: AxiosRequestConfig): string; + request( + config: AxiosRequestConfig + ): Promise>; + get( + url: string, + config?: AxiosRequestConfig + ): Promise>; + delete( + url: string, + config?: AxiosRequestConfig + ): Promise>; + head( + url: string, + config?: AxiosRequestConfig + ): Promise>; + options( + url: string, + config?: AxiosRequestConfig + ): Promise>; + post( + url: string, + data?: D, + config?: AxiosRequestConfig + ): Promise>; + put( + url: string, + data?: D, + config?: AxiosRequestConfig + ): Promise>; + patch( + url: string, + data?: D, + config?: AxiosRequestConfig + ): Promise>; + postForm( + url: string, + data?: D, + config?: AxiosRequestConfig + ): Promise>; + putForm( + url: string, + data?: D, + config?: AxiosRequestConfig + ): Promise>; + patchForm( + url: string, + data?: D, + config?: AxiosRequestConfig + ): Promise>; + query( + url: string, + data?: D, + config?: AxiosRequestConfig + ): Promise>; +} + +export interface AxiosInstance extends Axios { + ( + config: AxiosRequestConfig + ): Promise>; + ( + url: string, + config?: AxiosRequestConfig + ): Promise>; + + create(config?: CreateAxiosDefaults): AxiosInstance; + defaults: Omit & { + headers: HeadersDefaults & { + [key: string]: AxiosHeaderValue; + }; + }; +} + +export interface GenericFormData { + append(name: string, value: any, options?: any): any; +} + +export interface GenericHTMLFormElement { + name: string; + method: string; + submit(): void; +} + +/** + * Resolves an adapter by name, adapter function, or priority list. + * @param config Request config forwarded to adapter getters. The built-in `fetch` + * adapter reads `env.fetch`, `env.Request`, and `env.Response` from it and falls + * back to the globals when it is omitted. Other fields are not applied here. + */ +export function getAdapter( + adapters: AxiosAdapterConfig | AxiosAdapterConfig[] | undefined, + config?: AxiosRequestConfig +): AxiosAdapter; + +export function toFormData( + sourceObj: object, + targetFormData?: GenericFormData, + options?: FormSerializerOptions +): GenericFormData; + +export function formToJSON(form: GenericFormData | GenericHTMLFormElement): object; + +export function isAxiosError( + payload: any +): payload is AxiosError; + +export function spread(callback: (...args: T[]) => R): (array: T[]) => R; + +export function isCancel(value: any): value is CanceledError; + +export function all(values: Array>): Promise; + +export function mergeConfig( + config1: AxiosRequestConfig, + config2: AxiosRequestConfig +): AxiosRequestConfig; + +export function create(config?: CreateAxiosDefaults): AxiosInstance; + +export interface AxiosStatic extends AxiosInstance { + Cancel: typeof CanceledError; + CancelToken: CancelTokenStatic; + Axios: typeof Axios; + AxiosError: typeof AxiosError; + HttpStatusCode: typeof HttpStatusCode; + readonly VERSION: string; + isCancel: typeof isCancel; + all: typeof all; + spread: typeof spread; + isAxiosError: typeof isAxiosError; + toFormData: typeof toFormData; + formToJSON: typeof formToJSON; + getAdapter: typeof getAdapter; + CanceledError: typeof CanceledError; + AxiosHeaders: typeof AxiosHeaders; + mergeConfig: typeof mergeConfig; +} + +declare const axios: AxiosStatic; + +export default axios; diff --git a/node_modules/axios/index.js b/node_modules/axios/index.js new file mode 100644 index 0000000..5bc0365 --- /dev/null +++ b/node_modules/axios/index.js @@ -0,0 +1,45 @@ +import axios from './lib/axios.js'; + +// This module is intended to unwrap Axios default export as named. +// Keep top-level export same with static properties +// so that it can keep same with es module or cjs +const { + Axios, + AxiosError, + CanceledError, + isCancel, + CancelToken, + VERSION, + all, + Cancel, + isAxiosError, + spread, + toFormData, + AxiosHeaders, + HttpStatusCode, + formToJSON, + getAdapter, + mergeConfig, + create, +} = axios; + +export { + axios as default, + create, + Axios, + AxiosError, + CanceledError, + isCancel, + CancelToken, + VERSION, + all, + Cancel, + isAxiosError, + spread, + toFormData, + AxiosHeaders, + HttpStatusCode, + formToJSON, + getAdapter, + mergeConfig, +}; diff --git a/node_modules/axios/lib/adapters/README.md b/node_modules/axios/lib/adapters/README.md new file mode 100644 index 0000000..8d9dd97 --- /dev/null +++ b/node_modules/axios/lib/adapters/README.md @@ -0,0 +1,36 @@ +# axios // adapters + +The modules under `adapters/` are modules that handle dispatching a request and settling a returned `Promise` once a response is received. + +## Example + +```js +var settle = require('../core/settle'); + +module.exports = function myAdapter(config) { + // At this point: + // - config has been merged with defaults + // - request transformers have already run + // - request interceptors have already run + + // Make the request using config provided + // Upon response settle the Promise + + return new Promise(function (resolve, reject) { + var response = { + data: responseData, + status: request.status, + statusText: request.statusText, + headers: responseHeaders, + config: config, + request: request, + }; + + settle(resolve, reject, response); + + // From here: + // - response transformers will run + // - response interceptors will run + }); +}; +``` diff --git a/node_modules/axios/lib/adapters/adapters.js b/node_modules/axios/lib/adapters/adapters.js new file mode 100644 index 0000000..aa5da5e --- /dev/null +++ b/node_modules/axios/lib/adapters/adapters.js @@ -0,0 +1,132 @@ +import utils from '../utils.js'; +import httpAdapter from './http.js'; +import xhrAdapter from './xhr.js'; +import * as fetchAdapter from './fetch.js'; +import AxiosError from '../core/AxiosError.js'; + +/** + * Known adapters mapping. + * Provides environment-specific adapters for Axios: + * - `http` for Node.js + * - `xhr` for browsers + * - `fetch` for fetch API-based requests + * + * @type {Object} + */ +const knownAdapters = { + http: httpAdapter, + xhr: xhrAdapter, + fetch: { + get: fetchAdapter.getFetch, + }, +}; + +// Assign adapter names for easier debugging and identification +utils.forEach(knownAdapters, (fn, value) => { + if (fn) { + try { + // Null-proto descriptors so a polluted Object.prototype.get cannot turn + // these data descriptors into accessor descriptors on the way in. + Object.defineProperty(fn, 'name', { __proto__: null, value }); + } catch (e) { + // eslint-disable-next-line no-empty + } + Object.defineProperty(fn, 'adapterName', { __proto__: null, value }); + } +}); + +/** + * Render a rejection reason string for unknown or unsupported adapters + * + * @param {string} reason + * @returns {string} + */ +const renderReason = (reason) => `- ${reason}`; + +/** + * Check if the adapter is resolved (function, null, or false) + * + * @param {Function|null|false} adapter + * @returns {boolean} + */ +const isResolvedHandle = (adapter) => + utils.isFunction(adapter) || adapter === null || adapter === false; + +/** + * Get the first suitable adapter from the provided list. + * Tries each adapter in order until a supported one is found. + * Throws an AxiosError if no adapter is suitable. + * + * @param {Array|string|Function} adapters - Adapter(s) by name or function. + * @param {Object} config - Axios request configuration + * @throws {AxiosError} If no suitable adapter is available + * @returns {Function} The resolved adapter function + */ +function getAdapter(adapters, config) { + adapters = utils.isArray(adapters) ? adapters : [adapters]; + + const { length } = adapters; + let nameOrAdapter; + let adapter; + + const rejectedReasons = {}; + + for (let i = 0; i < length; i++) { + nameOrAdapter = adapters[i]; + let id; + + adapter = nameOrAdapter; + + if (!isResolvedHandle(nameOrAdapter)) { + adapter = knownAdapters[(id = String(nameOrAdapter)).toLowerCase()]; + + if (adapter === undefined) { + throw new AxiosError(`Unknown adapter '${id}'`); + } + } + + if (adapter && (utils.isFunction(adapter) || (adapter = adapter.get(config)))) { + break; + } + + rejectedReasons[id || '#' + i] = adapter; + } + + if (!adapter) { + const reasons = Object.entries(rejectedReasons).map( + ([id, state]) => + `adapter ${id} ` + + (state === false ? 'is not supported by the environment' : 'is not available in the build') + ); + + let s = length + ? reasons.length > 1 + ? 'since :\n' + reasons.map(renderReason).join('\n') + : ' ' + renderReason(reasons[0]) + : 'as no adapter specified'; + + throw new AxiosError( + `There is no suitable adapter to dispatch the request ` + s, + AxiosError.ERR_NOT_SUPPORT + ); + } + + return adapter; +} + +/** + * Exports Axios adapters and utility to resolve an adapter + */ +export default { + /** + * Resolve an adapter from a list of adapter names or functions. + * @type {Function} + */ + getAdapter, + + /** + * Exposes all known adapters + * @type {Object} + */ + adapters: knownAdapters, +}; diff --git a/node_modules/axios/lib/adapters/fetch.js b/node_modules/axios/lib/adapters/fetch.js new file mode 100644 index 0000000..a197a1d --- /dev/null +++ b/node_modules/axios/lib/adapters/fetch.js @@ -0,0 +1,749 @@ +import platform from '../platform/index.js'; +import utils from '../utils.js'; +import AxiosError from '../core/AxiosError.js'; +import composeSignals from '../helpers/composeSignals.js'; +import { trackStream } from '../helpers/trackStream.js'; +import createMultipartBody from '../core/createMultipartBody.js'; +import AxiosHeaders from '../core/AxiosHeaders.js'; +import { + progressEventReducer, + progressEventDecorator, + asyncDecorator, +} from '../helpers/progressEventReducer.js'; +import resolveConfig from '../helpers/resolveConfig.js'; +import settle from '../core/settle.js'; +import estimateDataURLDecodedBytes from '../helpers/estimateDataURLDecodedBytes.js'; +import { VERSION } from '../env/data.js'; +import { toByteStringHeaderObject } from '../helpers/sanitizeHeaderValue.js'; + +const DEFAULT_CHUNK_SIZE = 64 * 1024; + +const DEFAULT_REQUEST_OPTIONS = { + cache: 'default', + redirect: 'follow', + referrer: 'about:client', + referrerPolicy: '', + mode: 'cors', + integrity: '', + keepalive: false, + priority: 'auto', + window: null, +}; + +const { isFunction } = utils; + +/** + * Encode a UTF-8 string to a Latin-1 byte string for use with btoa(). + * This is a modern replacement for the deprecated unescape(encodeURIComponent(str)) pattern. + * + * @param {string} str The string to encode + * + * @returns {string} UTF-8 bytes as a Latin-1 string + */ +const encodeUTF8 = (str) => + encodeURIComponent(str).replace(/%([0-9A-F]{2})/gi, (_, hex) => + String.fromCharCode(parseInt(hex, 16)) + ); + +// Node's WHATWG URL parser returns `username` and `password` percent-encoded. +// Decode before composing the `auth` option so credentials such as +// `my%40email.com:pass` are sent as `my@email.com:pass`. Falls back to the +// original value for malformed input so a bad encoding never throws. +const decodeURIComponentSafe = (value) => { + if (!utils.isString(value)) { + return value; + } + + try { + return decodeURIComponent(value); + } catch (error) { + return value; + } +}; + +const test = (fn, ...args) => { + try { + return !!fn(...args); + } catch (e) { + return false; + } +}; + +const maybeWithAuthCredentials = (url) => { + const protocolIndex = url.indexOf('://'); + let urlToCheck = url; + if (protocolIndex !== -1) { + urlToCheck = urlToCheck.slice(protocolIndex + 3); + } + return urlToCheck.includes('@') || urlToCheck.includes(':'); +}; + +const factory = (env) => { + const globalObject = + utils.global !== undefined && utils.global !== null ? utils.global : globalThis; + const { ReadableStream, TextEncoder } = globalObject; + + env = utils.merge.call( + { + skipUndefined: true, + }, + { + Request: globalObject.Request, + Response: globalObject.Response, + Blob: globalObject.Blob, + }, + env + ); + + const envFetch = utils.hasOwnProp(env, 'fetch') ? env.fetch : undefined; + const { Request, Response, Blob } = env; + const isFetchSupported = envFetch ? isFunction(envFetch) : typeof fetch === 'function'; + const isRequestSupported = isFunction(Request); + const isResponseSupported = isFunction(Response); + + if (!isFetchSupported) { + return false; + } + + const isReadableStreamSupported = isFetchSupported && isFunction(ReadableStream); + + const encodeText = + isFetchSupported && + (typeof TextEncoder === 'function' + ? ( + (encoder) => (str) => + encoder.encode(str) + )(new TextEncoder()) + : async (str) => new Uint8Array(await new Request(str).arrayBuffer())); + + const supportsRequestStream = + isRequestSupported && + isReadableStreamSupported && + test(() => { + let duplexAccessed = false; + + const request = new Request(platform.origin, { + body: new ReadableStream(), + method: 'POST', + get duplex() { + duplexAccessed = true; + return 'half'; + }, + }); + + const hasContentType = request.headers.has('Content-Type'); + + if (request.body != null) { + request.body.cancel(); + } + + return duplexAccessed && !hasContentType; + }); + + const supportsResponseStream = + isResponseSupported && + isReadableStreamSupported && + test(() => utils.isReadableStream(new Response('').body)); + + // Some runtimes reject every explicit cache mode. Use own defaults for both + // probes so unrelated polluted options cannot affect cache-mode detection. + const requestDefaults = Object.assign(Object.create(null), DEFAULT_REQUEST_OPTIONS); + + if (isRequestSupported && !test(() => new Request(platform.origin, requestDefaults))) { + delete requestDefaults.cache; + + // Only omit cache when that makes Request construction succeed. Otherwise + // retain the explicit default that protects supporting runtimes from pollution. + if (!test(() => new Request(platform.origin, requestDefaults))) { + requestDefaults.cache = DEFAULT_REQUEST_OPTIONS.cache; + } + } + + const resolvers = { + stream: supportsResponseStream && ((res) => res.body), + }; + + isFetchSupported && + (() => { + ['text', 'arrayBuffer', 'blob', 'formData', 'stream'].forEach((type) => { + !resolvers[type] && + (resolvers[type] = (res, config) => { + let method = res && res[type]; + + if (method) { + return method.call(res); + } + + throw new AxiosError( + `Response type '${type}' is not supported`, + AxiosError.ERR_NOT_SUPPORT, + config + ); + }); + }); + })(); + + const getBodyLength = async (body) => { + if (body == null) { + return 0; + } + + if (utils.isBlob(body)) { + return body.size; + } + + if (utils.isArrayBufferView(body) || utils.isArrayBuffer(body)) { + return body.byteLength; + } + + if (utils.isURLSearchParams(body)) { + body = body + ''; + } + + if (utils.isString(body)) { + return (await encodeText(body)).byteLength; + } + }; + + const resolveBodyLength = async (headers, body) => { + const length = utils.toFiniteNumber(headers.getContentLength()); + + return length == null ? getBodyLength(body) : length; + }; + + return async (config) => { + let { + url, + method, + data, + signal, + cancelToken, + timeout, + onDownloadProgress, + onUploadProgress, + responseType, + headers, + withCredentials = 'same-origin', + fetchOptions, + maxContentLength, + maxBodyLength, + maxRedirects, + } = resolveConfig(config); + + const hasMaxContentLength = utils.isNumber(maxContentLength) && maxContentLength > -1; + const hasMaxBodyLength = utils.isNumber(maxBodyLength) && maxBodyLength > -1; + const own = (key) => (utils.hasOwnProp(config, key) ? config[key] : undefined); + + let _fetch = envFetch || fetch; + + responseType = responseType ? (responseType + '').toLowerCase() : 'text'; + + let composedSignal = composeSignals( + [signal, cancelToken && cancelToken.toAbortSignal()], + timeout + ); + + let request = null; + + const unsubscribe = + composedSignal && + composedSignal.unsubscribe && + (() => { + composedSignal.unsubscribe(); + }); + + let requestContentLength; + + // AxiosErrors we raise while request or response bodies are being streamed. Captured + // by identity so the catch block can surface it directly, regardless of + // how the runtime wraps the resulting fetch rejection (undici exposes it + // as `err.cause`; some browsers drop the original error entirely). + let pendingBodyError = null; + let pendingResponseError = null; + + const maxBodyLengthError = () => + new AxiosError( + 'Request body larger than maxBodyLength limit', + AxiosError.ERR_BAD_REQUEST, + config, + request + ); + + try { + // HTTP basic authentication + let auth = undefined; + const configAuth = own('auth'); + + if (configAuth) { + const username = utils.getSafeProp(configAuth, 'username') || ''; + const password = utils.getSafeProp(configAuth, 'password') || ''; + auth = { + username, + password, + }; + } + + let parsedURL; + if (maybeWithAuthCredentials(url)) { + parsedURL = new URL(url, platform.origin); + + if (!auth && (parsedURL.username || parsedURL.password)) { + const urlUsername = decodeURIComponentSafe(parsedURL.username); + const urlPassword = decodeURIComponentSafe(parsedURL.password); + auth = { + username: urlUsername, + password: urlPassword, + }; + } + + if (parsedURL.username || parsedURL.password) { + parsedURL.username = ''; + parsedURL.password = ''; + url = parsedURL.href; + } + } + + if (auth) { + headers.delete('authorization'); + headers.set( + 'Authorization', + 'Basic ' + btoa(encodeUTF8((auth.username || '') + ':' + (auth.password || ''))) + ); + } + + // Enforce maxContentLength for data: URLs up-front so we never materialize + // an oversized payload. The HTTP adapter applies the same check (see http.js + // "if (protocol === 'data:')" branch). + if (hasMaxContentLength && parsedURL && parsedURL.protocol === 'data:') { + const estimated = estimateDataURLDecodedBytes(parsedURL.href); + if (estimated > maxContentLength) { + throw new AxiosError( + 'maxContentLength size of ' + maxContentLength + ' exceeded', + AxiosError.ERR_BAD_RESPONSE, + config, + request + ); + } + } + + const formContentType = + utils.isSpecCompliantForm(data) && AxiosHeaders.from(own('headers')).getContentType(); + let formBoundary; + if ( + utils.isString(formContentType) && + /^multipart\/form-data(?:\s*;|$)/i.test(formContentType.trim()) + ) { + const parameters = AxiosHeaders.parseParameters(formContentType); + if (utils.hasOwnProp(parameters, 'boundary')) formBoundary = parameters.boundary; + } + + if ( + utils.isSpecCompliantForm(data) && + method !== 'get' && + method !== 'head' && + (hasMaxBodyLength || + (onUploadProgress && supportsRequestStream) || + formBoundary !== undefined) + ) { + data = createMultipartBody( + data, + Blob, + hasMaxBodyLength ? maxBodyLength : Infinity, + maxBodyLengthError, + formBoundary + ); + // Blob.type lowercases its value, including a case-sensitive boundary. + // Retain the caller's header when an explicit boundary was serialized. + headers.setContentType(formBoundary === undefined ? data.type : formContentType); + requestContentLength = data.size; + } + + // Enforce maxBodyLength against known-size bodies before dispatch using + // the body's *actual* size — never a caller-declared Content-Length, + // which could under-report to slip an oversized body past the check. + // Unknown-size streams return undefined here and are counted per-chunk + // below as fetch consumes them. + if (hasMaxBodyLength && method !== 'get' && method !== 'head') { + const outboundLength = await getBodyLength(data); + if (typeof outboundLength === 'number' && isFinite(outboundLength)) { + requestContentLength = outboundLength; + if (outboundLength > maxBodyLength) { + throw maxBodyLengthError(); + } + } + } + + // A streamed body under maxBodyLength must be counted as fetch consumes + // it; its size is never trusted from a caller-declared Content-Length. + const mustEnforceStreamBody = + hasMaxBodyLength && (utils.isReadableStream(data) || utils.isStream(data)); + + const trackRequestStream = (stream, onProgress, flush) => + trackStream( + stream, + DEFAULT_CHUNK_SIZE, + (loadedBytes) => { + if (hasMaxBodyLength && loadedBytes > maxBodyLength) { + throw (pendingBodyError = maxBodyLengthError()); + } + onProgress && onProgress(loadedBytes); + }, + flush + ); + + if ( + supportsRequestStream && + method !== 'get' && + method !== 'head' && + (onUploadProgress || mustEnforceStreamBody) + ) { + requestContentLength = + requestContentLength == null + ? await resolveBodyLength(headers, data) + : requestContentLength; + + // A declared length of 0 is only trusted to skip the wrap when we are + // not enforcing a stream limit (which must not rely on that header). + if (requestContentLength !== 0 || mustEnforceStreamBody) { + let _request = new Request(url, { + method: 'POST', + body: data, + duplex: 'half', + }); + + let contentTypeHeader; + + if ( + utils.isFormData(data) && + (contentTypeHeader = _request.headers.get('content-type')) + ) { + headers.setContentType(contentTypeHeader); + } + + if (_request.body) { + const [onProgress, flush] = + (onUploadProgress && + progressEventDecorator( + requestContentLength, + progressEventReducer(asyncDecorator(onUploadProgress)) + )) || + []; + + data = trackRequestStream(_request.body, onProgress, flush); + } + } + } else if ( + mustEnforceStreamBody && + !isRequestSupported && + isReadableStreamSupported && + method !== 'get' && + method !== 'head' + ) { + data = trackRequestStream(data); + } else if ( + mustEnforceStreamBody && + isRequestSupported && + !supportsRequestStream && + method !== 'get' && + method !== 'head' + ) { + throw new AxiosError( + 'Stream request bodies are not supported by the current fetch implementation', + AxiosError.ERR_NOT_SUPPORT, + config, + request + ); + } + + if (!utils.isString(withCredentials)) { + withCredentials = withCredentials ? 'include' : 'omit'; + } + + // Cloudflare Workers throws when credentials are defined + // see https://github.com/cloudflare/workerd/issues/902 + const isCredentialsSupported = isRequestSupported && 'credentials' in Request.prototype; + + // If data is FormData and Content-Type is multipart/form-data without boundary, + // delete it so fetch can set it correctly with the boundary + if (utils.isFormData(data)) { + const contentType = headers.getContentType(); + if ( + contentType && + /^multipart\/form-data/i.test(contentType) && + !/boundary=/i.test(contentType) + ) { + headers.delete('content-type'); + } + } + + // Set User-Agent header if not already set (fetch defaults to 'node' in Node.js) + headers.set('User-Agent', 'axios/' + VERSION, false); + + const safeFetchOptions = + fetchOptions == null ? fetchOptions : Object.assign(Object.create(null), fetchOptions); + + if (safeFetchOptions) { + // These options are owned by Axios and are already reflected in the + // resolved Request passed to fetch. + delete safeFetchOptions.body; + delete safeFetchOptions.headers; + delete safeFetchOptions.method; + delete safeFetchOptions.signal; + delete safeFetchOptions.duplex; + delete safeFetchOptions.credentials; + } + + const resolvedOptions = Object.assign(Object.create(null), safeFetchOptions, { + signal: composedSignal, + method: method.toUpperCase(), + headers: toByteStringHeaderObject(headers.normalize()), + body: data, + duplex: 'half', + credentials: isCredentialsSupported ? withCredentials : undefined, + }); + + if (isRequestSupported) { + utils.forEach(requestDefaults, (value, key) => { + if (resolvedOptions[key] === undefined) { + resolvedOptions[key] = value; + } + }); + + if (resolvedOptions.signal === undefined) { + resolvedOptions.signal = null; + } + + if (resolvedOptions.body === undefined) { + resolvedOptions.body = null; + } + } + + if (maxRedirects === 0) { + resolvedOptions.redirect = 'manual'; + + if (safeFetchOptions) { + safeFetchOptions.redirect = 'manual'; + } + } + + request = isRequestSupported && new Request(url, resolvedOptions); + + let response = await (isRequestSupported + ? _fetch(request, safeFetchOptions) + : _fetch(url, resolvedOptions)); + + const responseHeaders = AxiosHeaders.from(response.headers); + + // Cheap pre-check: if the server honestly declares a content-length that + // already exceeds the cap, reject before we start streaming. + if (hasMaxContentLength) { + const declaredLength = utils.toFiniteNumber(responseHeaders.getContentLength()); + if (declaredLength != null && declaredLength > maxContentLength) { + throw new AxiosError( + 'maxContentLength size of ' + maxContentLength + ' exceeded', + AxiosError.ERR_BAD_RESPONSE, + config, + request + ); + } + } + + const isStreamResponse = + supportsResponseStream && (responseType === 'stream' || responseType === 'response'); + + if ( + supportsResponseStream && + response.body && + (onDownloadProgress || hasMaxContentLength || (isStreamResponse && unsubscribe)) + ) { + const options = {}; + + ['status', 'statusText', 'headers'].forEach((prop) => { + options[prop] = response[prop]; + }); + + const responseContentLength = utils.toFiniteNumber(responseHeaders.getContentLength()); + + const [onProgress, flush] = + (onDownloadProgress && + progressEventDecorator( + responseContentLength, + progressEventReducer(asyncDecorator(onDownloadProgress), true) + )) || + []; + + let bytesRead = 0; + const onChunkProgress = (loadedBytes) => { + if (hasMaxContentLength) { + bytesRead = loadedBytes; + if (bytesRead > maxContentLength) { + throw (pendingResponseError = new AxiosError( + 'maxContentLength size of ' + maxContentLength + ' exceeded', + AxiosError.ERR_BAD_RESPONSE, + config, + request + )); + } + } + onProgress && onProgress(loadedBytes); + }; + + response = new Response( + trackStream(response.body, DEFAULT_CHUNK_SIZE, onChunkProgress, () => { + flush && flush(); + unsubscribe && unsubscribe(); + }), + options + ); + } + + responseType = responseType || 'text'; + + let responseData = await resolvers[utils.findKey(resolvers, responseType) || 'text']( + response, + config + ); + + // Fallback enforcement for environments without ReadableStream support + // (legacy runtimes). Detect materialized size from typed output; skip + // streams/Response passthrough since the user will read those themselves. + if (hasMaxContentLength && !supportsResponseStream && !isStreamResponse) { + let materializedSize; + if (responseData != null) { + if (typeof responseData.byteLength === 'number') { + materializedSize = responseData.byteLength; + } else if (typeof responseData.size === 'number') { + materializedSize = responseData.size; + } else if (typeof responseData === 'string') { + materializedSize = + typeof TextEncoder === 'function' + ? new TextEncoder().encode(responseData).byteLength + : responseData.length; + } + } + if (typeof materializedSize === 'number' && materializedSize > maxContentLength) { + throw new AxiosError( + 'maxContentLength size of ' + maxContentLength + ' exceeded', + AxiosError.ERR_BAD_RESPONSE, + config, + request + ); + } + } + + !isStreamResponse && unsubscribe && unsubscribe(); + + return await new Promise((resolve, reject) => { + settle(resolve, reject, { + data: responseData, + headers: AxiosHeaders.from(response.headers), + status: response.status, + statusText: response.statusText, + config, + request, + }); + }); + } catch (err) { + unsubscribe && unsubscribe(); + + // Safari can surface fetch aborts as a DOMException-like object whose + // branded getters throw. Prefer our composed signal reason before reading + // the caught error, preserving timeout vs cancellation semantics. + if (composedSignal && composedSignal.aborted && composedSignal.reason instanceof AxiosError) { + const canceledError = composedSignal.reason; + canceledError.config = config; + request && (canceledError.request = request); + if (err !== canceledError) { + // Non-enumerable to match native Error `cause` semantics so loggers + // don't recurse into circular fetch internals (see #7205). + Object.defineProperty(canceledError, 'cause', { + __proto__: null, + value: err, + writable: true, + enumerable: false, + configurable: true, + }); + } + throw canceledError; + } + + // Surface a maxBodyLength violation we raised while the request body was + // being streamed. Keeping the original error (rather than reading + // `err.cause.isAxiosError`) keeps the error deterministic across runtimes + // and avoids both prototype-pollution reads and mis-attributing a foreign + // AxiosError that merely happened to land in `err.cause`. + if (pendingBodyError) { + request && !pendingBodyError.request && (pendingBodyError.request = request); + throw pendingBodyError; + } + + if (pendingResponseError) { + throw pendingResponseError; + } + + // Re-throw AxiosErrors we raised synchronously (data: URL / content-length + // pre-checks, response size enforcement) without re-wrapping them. + if (err instanceof AxiosError) { + request && !err.request && (err.request = request); + throw err; + } + + if (err && err.name === 'TypeError' && /Load failed|fetch/i.test(err.message)) { + const networkError = new AxiosError( + 'Network Error', + AxiosError.ERR_NETWORK, + config, + request, + err && err.response + ); + // Non-enumerable to match native Error `cause` semantics so loggers + // don't recurse into circular fetch internals (see #7205). + Object.defineProperty(networkError, 'cause', { + __proto__: null, + value: err.cause || err, + writable: true, + enumerable: false, + configurable: true, + }); + throw networkError; + } + + throw AxiosError.from(err, err && err.code, config, request, err && err.response); + } + }; +}; + +const seedCache = new Map(); + +export const getFetch = (config) => { + const env = Object.create(null); + const configuredEnv = config && utils.hasOwnProp(config, 'env') && config.env; + ['fetch', 'Request', 'Response', 'Blob'].forEach((key) => { + if (configuredEnv && utils.hasOwnProp(configuredEnv, key)) { + env[key] = configuredEnv[key]; + } + }); + const { fetch, Request, Response, Blob } = env; + const seeds = [Request, Response, fetch, Blob]; + + let len = seeds.length, + i = len, + seed, + target, + map = seedCache; + + while (i--) { + seed = seeds[i]; + target = map.get(seed); + + target === undefined && map.set(seed, (target = i ? new Map() : factory(env))); + + map = target; + } + + return target; +}; + +const adapter = getFetch(); + +export default adapter; diff --git a/node_modules/axios/lib/adapters/http.js b/node_modules/axios/lib/adapters/http.js new file mode 100755 index 0000000..6a6a5fb --- /dev/null +++ b/node_modules/axios/lib/adapters/http.js @@ -0,0 +1,1609 @@ +import utils from '../utils.js'; +import settle from '../core/settle.js'; +import buildFullPath from '../core/buildFullPath.js'; +import buildURL from '../helpers/buildURL.js'; +import { getProxyForUrl } from 'proxy-from-env'; +import HttpsProxyAgent from 'https-proxy-agent'; +import http from 'http'; +import https from 'https'; +import http2 from 'http2'; +import util from 'util'; +import { resolve as resolvePath } from 'path'; +import followRedirects from 'follow-redirects'; +import zlib from 'zlib'; +import { VERSION } from '../env/data.js'; +import transitionalDefaults from '../defaults/transitional.js'; +import AxiosError from '../core/AxiosError.js'; +import CanceledError from '../cancel/CanceledError.js'; +import platform from '../platform/index.js'; +import fromDataURI from '../helpers/fromDataURI.js'; +import stream from 'stream'; +import AxiosHeaders from '../core/AxiosHeaders.js'; +import setFormDataHeaders from '../core/setFormDataHeaders.js'; +import AxiosTransformStream from '../helpers/AxiosTransformStream.js'; +import { EventEmitter } from 'events'; +import formDataToStream from '../helpers/formDataToStream.js'; +import readBlob from '../helpers/readBlob.js'; +import ZlibHeaderTransformStream from '../helpers/ZlibHeaderTransformStream.js'; +import Http2Sessions from '../helpers/Http2Sessions.js'; +import callbackify from '../helpers/callbackify.js'; +import shouldBypassProxy from '../helpers/shouldBypassProxy.js'; +import bind from '../helpers/bind.js'; +import { toByteStringHeaderObject } from '../helpers/sanitizeHeaderValue.js'; +import { + progressEventReducer, + progressEventDecorator, + asyncDecorator, +} from '../helpers/progressEventReducer.js'; +import { estimateDataURLBufferAllocation } from '../helpers/estimateDataURLDecodedBytes.js'; + +const zlibOptions = { + flush: zlib.constants.Z_SYNC_FLUSH, + finishFlush: zlib.constants.Z_SYNC_FLUSH, +}; + +const brotliOptions = { + flush: zlib.constants.BROTLI_OPERATION_FLUSH, + finishFlush: zlib.constants.BROTLI_OPERATION_FLUSH, +}; + +const zstdOptions = { + flush: zlib.constants.ZSTD_e_flush, + finishFlush: zlib.constants.ZSTD_e_flush, +}; + +const isBrotliSupported = utils.isFunction(zlib.createBrotliDecompress); +const isZstdSupported = utils.isFunction(zlib.createZstdDecompress); +const ACCEPT_ENCODING = 'gzip, compress, deflate' + (isBrotliSupported ? ', br' : ''); +const ACCEPT_ENCODING_WITH_ZSTD = ACCEPT_ENCODING + (isZstdSupported ? ', zstd' : ''); +const scheduleProgress = + typeof process !== 'undefined' && process.nextTick ? process.nextTick.bind(process) : utils.asap; + +const { http: httpFollow, https: httpsFollow } = followRedirects; + +const isHttps = /https:?/; + +// Symbols used to bind a single 'error' listener to a pooled socket and track +// the request currently owning that socket across keep-alive reuse (issue #10780). +const kAxiosSocketListener = Symbol('axios.http.socketListener'); +const kAxiosCurrentReq = Symbol('axios.http.currentReq'); + +// A shared listener avoids retaining an adapter context for the lifetime of a +// pooled socket. EventEmitter invokes listeners with `this` set to the emitter. +function handleSocketError(err) { + const current = this[kAxiosCurrentReq]; + if (current && !current.destroyed) { + current.destroy(err); + } +} + +// Tags HttpsProxyAgent instances installed by setProxy() so the redirect path +// can strip them without clobbering a user-supplied agent that happens to be +// an HttpsProxyAgent. +const kAxiosInstalledTunnel = Symbol('axios.http.installedTunnel'); + +// Cache of CONNECT-tunneling agents keyed by proxy config so repeat requests +// through the same proxy reuse a single agent (and its socket pool). The +// keyspace is bounded by the set of distinct proxy configs the process uses, +// so unbounded growth is not a concern in practice. +const tunnelingAgentCache = new Map(); +const tunnelingAgentCacheUser = new WeakMap(); +const directAgents = new WeakMap(); +const directAgentHooks = ['createConnection', 'getName']; +const nativeAgentPoolHooks = [ + 'addRequest', + 'createSocket', + 'removeSocket', + 'keepSocketAlive', + 'reuseSocket', + '_getSession', + '_cacheSession', + '_evictSession', +]; +// Minimum minor versions where Node's HTTP Agent supports native proxyEnv +// handling. Checking the selected agent below also covers startup modes such +// as NODE_OPTIONS=--use-env-proxy and --no-use-env-proxy precedence. +const NODE_NATIVE_ENV_PROXY_SUPPORT = { + 22: 21, + 24: 5, +}; + +function isNodeNativeEnvProxySupported(nodeVersion = process.versions && process.versions.node) { + if (!nodeVersion) { + return false; + } + + const [major, minor] = nodeVersion.split('.').map((part) => Number(part)); + + if (!Number.isInteger(major) || !Number.isInteger(minor)) { + return false; + } + + if (major > 24) { + return true; + } + + return ( + NODE_NATIVE_ENV_PROXY_SUPPORT[major] != null && minor >= NODE_NATIVE_ENV_PROXY_SUPPORT[major] + ); +} + +function isNodeEnvProxyEnabled(agent, nodeVersion = process.versions && process.versions.node) { + if (!isNodeNativeEnvProxySupported(nodeVersion)) { + return false; + } + + const agentOptions = agent && agent.options; + + return Boolean( + agentOptions && utils.hasOwnProp(agentOptions, 'proxyEnv') && agentOptions.proxyEnv != null + ); +} + +function getProxyEnvAgent(options, configHttpAgent, configHttpsAgent) { + return isHttps.test(options.protocol) + ? configHttpsAgent || https.globalAgent + : configHttpAgent || http.globalAgent; +} + +function getDirectAgent(configuredAgent, transport) { + if ( + !process.allowedNodeEnvironmentFlags || + !process.allowedNodeEnvironmentFlags.has('--use-env-proxy') + ) { + return configuredAgent; + } + + const agent = configuredAgent || transport.globalAgent; + const options = agent && agent.options; + if ( + !(agent instanceof transport.Agent) || + agent.protocol !== transport.globalAgent.protocol || + !options || + !utils.hasOwnProp(options, 'proxyEnv') || + typeof options.proxyEnv !== 'object' || + options.proxyEnv === null + ) { + return configuredAgent; + } + + // These hooks own pool queues or TLS session state. Neither binding them to + // the source agent nor copying them without subclass state preserves their + // behavior on a separate direct pool. + for (const hook of nativeAgentPoolHooks) { + if ( + utils.isFunction(transport.Agent.prototype[hook]) && + agent[hook] !== transport.Agent.prototype[hook] + ) { + throw new AxiosError( + 'proxy: false cannot adapt an agent overriding ' + + hook + + '; use an agent constructed without proxyEnv', + AxiosError.ERR_BAD_OPTION_VALUE + ); + } + } + + // Node snapshots proxyEnv when constructing the agent. Keep this check + // conservative even when the caller later removes protocol-specific entries. + let direct = directAgents.get(agent); + if (!direct) { + direct = new transport.Agent({ ...options, proxyEnv: undefined }); + + // Agent.destroy() does not emit an event. Keep the associated pool under + // the configured agent's lifetime, including agents reused after destroy(). + const destroy = agent.destroy; + agent.destroy = function destroyWithDirectAgent() { + try { + return destroy.apply(this, arguments); + } finally { + direct.destroy(); + } + }; + directAgents.set(agent, direct); + } + + // Connections and pool keys do not own the direct pool's queues. Preserve + // their configured receiver and refresh hooks that change between requests. + for (const hook of directAgentHooks) { + direct[hook] = + agent[hook] === transport.Agent.prototype[hook] + ? transport.Agent.prototype[hook] + : bind(agent[hook], agent); + } + return direct; +} + +function setDirectAgent(options, configHttpAgent, configHttpsAgent) { + const secure = isHttps.test(options.protocol); + const agent = getDirectAgent(secure ? configHttpsAgent : configHttpAgent, secure ? https : http); + options.agent = agent; + if (options.agents) { + options.agents[secure ? 'https' : 'http'] = agent; + } +} + +function getTunnelingAgent(agentOptions, userHttpsAgent) { + const key = + agentOptions.protocol + + '//' + + agentOptions.hostname + + ':' + + (agentOptions.port || '') + + '#' + + (agentOptions.auth || ''); + const cache = userHttpsAgent + ? tunnelingAgentCacheUser.get(userHttpsAgent) || + tunnelingAgentCacheUser.set(userHttpsAgent, new Map()).get(userHttpsAgent) + : tunnelingAgentCache; + let agent = cache.get(key); + if (agent) return agent; + // Preserve per-request TLS options for the proxy connection, with our proxy + // fields taking precedence. Global-agent options belong only to the origin + // TLS upgrade in the callback below. + const merged = + userHttpsAgent && userHttpsAgent.options + ? { ...userHttpsAgent.options, ...agentOptions } + : agentOptions; + agent = new HttpsProxyAgent(merged); + const callback = agent.callback; + agent.callback = function axiosTunnelingAgentCallback(req, opts) { + // Without a proxy the origin TLS connection would be made by https.globalAgent, + // so its options have to reach the tunneled origin too. Resolved per request + // because the tunneling agent outlives any one of them. + const originTLSAgent = userHttpsAgent || https.globalAgent; + const originTLSOptions = originTLSAgent && originTLSAgent.options; + // HttpsProxyAgent v5 reads callback opts for the post-CONNECT origin TLS upgrade. + return callback.call(this, req, { ...originTLSOptions, ...opts }); + }; + agent[kAxiosInstalledTunnel] = true; + cache.set(key, agent); + return agent; +} + +const supportedProtocols = platform.protocols.map((protocol) => { + return protocol + ':'; +}); + +// Node's WHATWG URL parser returns `username` and `password` percent-encoded. +// Decode before composing the `auth` option so credentials such as +// `my%40email.com:pass` are sent as `my@email.com:pass`. Falls back to the +// original value for malformed input so a bad encoding never throws. +const decodeURIComponentSafe = (value) => { + if (!utils.isString(value)) { + return value; + } + + try { + return decodeURIComponent(value); + } catch (error) { + return value; + } +}; + +const flushOnFinish = (stream, [throttled, flush]) => { + stream.on('end', flush).on('error', flush); + + return throttled; +}; + +const http2Sessions = new Http2Sessions(); + +/** + * If the proxy, auth, sensitive header, or config beforeRedirects functions are defined, + * call them with the options object. + * + * @param {Object} options - The options object that was passed to the request. + * + * @returns {Object} + */ +function dispatchBeforeRedirect(options, responseDetails, requestDetails) { + if (!isSameOriginRedirect(options, requestDetails)) { + stripMatchingHeaders(options.headers, new Set(['authorization', 'cookie'])); + delete options.auth; + } + if (options.beforeRedirects.proxy) { + options.beforeRedirects.proxy(options); + } + if (options.beforeRedirects.auth) { + options.beforeRedirects.auth(options); + } + if (options.beforeRedirects.sensitiveHeaders) { + options.beforeRedirects.sensitiveHeaders(options, requestDetails); + } + if (options.beforeRedirects.direct) { + options.beforeRedirects.direct(options); + } + if (options.beforeRedirects.config) { + options.beforeRedirects.config(options, responseDetails, requestDetails); + } +} + +function stripMatchingHeaders(headers, sensitiveSet) { + if (!headers) { + return; + } + + Object.keys(headers).forEach((header) => { + if (sensitiveSet.has(header.toLowerCase())) { + delete headers[header]; + } + }); +} + +function isSameOriginRedirect(redirectOptions, requestDetails) { + if (!requestDetails) { + return false; + } + + try { + return new URL(requestDetails.url).origin === new URL(redirectOptions.href).origin; + } catch (e) { + // If origin comparison fails, treat the redirect as unsafe. + return false; + } +} + +/** + * If the proxy or config afterRedirects functions are defined, call them with the options + * + * @param {http.ClientRequestArgs} options + * @param {AxiosProxyConfig} configProxy configuration from Axios options object + * @param {string} location + * @param {boolean} [allowEnvProxy=true] whether environment proxy configuration can be used + * + * @returns {boolean} whether a proxy applies to the selected transport + */ +function setProxy( + options, + configProxy, + location, + isRedirect, + configHttpsAgent, + configHttpAgent, + allowEnvProxy = true +) { + let proxy = configProxy; + const proxyEnvAgent = getProxyEnvAgent(options, configHttpAgent, configHttpsAgent); + if (!proxy && proxy !== false && allowEnvProxy && !isNodeEnvProxyEnabled(proxyEnvAgent)) { + const proxyUrl = getProxyForUrl(location); + if (proxyUrl) { + if (!shouldBypassProxy(location)) { + proxy = new URL(proxyUrl); + } + } + } + // On redirect re-invocation, strip any stale Proxy-Authorization header carried + // over from the prior request (e.g. new target no longer uses a proxy, or uses + // a different proxy). Skip on the initial request so user-supplied headers are + // preserved. Header names are case-insensitive, so remove every case variant. + if (isRedirect && options.headers) { + for (const name of Object.keys(options.headers)) { + if (name.toLowerCase() === 'proxy-authorization') { + delete options.headers[name]; + } + } + } + // Strip any tunneling agent we installed for the previous hop so a redirect + // that drops the proxy or crosses an HTTPS↔HTTP boundary doesn't reuse a + // stale one. Match on our Symbol marker so a user-supplied HttpsProxyAgent + // (which won't carry the marker) is left alone. + if (isRedirect && options.agent && options.agent[kAxiosInstalledTunnel]) { + options.agent = undefined; + } + if ( + isRedirect && + options.agents && + options.agents.https && + options.agents.https[kAxiosInstalledTunnel] + ) { + options.agents.https = configHttpsAgent; + } + if (proxy) { + // Read proxy fields without traversing the prototype chain. URL instances expose + // username/password/hostname/host/port/protocol via getters on URL.prototype (so + // direct reads are shielded), but plain object proxies — and the `auth` field + // (which URL does not expose) — must be guarded so a polluted Object.prototype + // (e.g. Object.prototype.auth = { username, password }) cannot inject + // attacker-controlled credentials into the Proxy-Authorization header or + // redirect proxying to an attacker-controlled host. + const isProxyURL = proxy instanceof URL; + const readProxyField = (key) => + isProxyURL || utils.hasOwnProp(proxy, key) ? proxy[key] : undefined; + + const proxyUsername = readProxyField('username'); + const proxyPassword = readProxyField('password'); + let proxyAuth = utils.hasOwnProp(proxy, 'auth') ? proxy.auth : undefined; + + // Basic proxy authorization + if (proxyUsername) { + proxyAuth = (proxyUsername || '') + ':' + (proxyPassword || ''); + } + + if (proxyAuth) { + // Support proxy auth object form. Read sub-fields via own-prop checks so a + // plain object inheriting from polluted Object.prototype cannot leak creds. + const authIsObject = typeof proxyAuth === 'object'; + const authUsername = + authIsObject && utils.hasOwnProp(proxyAuth, 'username') ? proxyAuth.username : undefined; + const authPassword = + authIsObject && utils.hasOwnProp(proxyAuth, 'password') ? proxyAuth.password : undefined; + const validProxyAuth = Boolean(authUsername || authPassword); + + if (validProxyAuth) { + proxyAuth = (authUsername || '') + ':' + (authPassword || ''); + } else if (authIsObject) { + throw new AxiosError('Invalid proxy authorization', AxiosError.ERR_BAD_OPTION, { proxy }); + } + } + + const targetIsHttps = isHttps.test(options.protocol); + + if (targetIsHttps) { + // CONNECT-tunneling path for HTTPS targets. Preserves end-to-end TLS to + // the origin so the proxy cannot inspect the URL, headers, or body — the + // behavior already promised by THREATMODEL.md (T-R9). HttpsProxyAgent + // sends Proxy-Authorization on the CONNECT request only, never on the + // wrapped TLS request, which is why we don't stamp it onto + // options.headers here. If the user already supplied an HttpsProxyAgent, + // they own tunneling end-to-end and we leave them alone; otherwise we + // install our own tunneling agent and forward their TLS options (if any) + // so a custom httpsAgent for cert pinning / rejectUnauthorized still + // applies to the origin TLS upgrade. + if (!(configHttpsAgent instanceof HttpsProxyAgent)) { + const proxyHost = readProxyField('hostname') || readProxyField('host'); + const proxyPort = readProxyField('port'); + const rawProxyProtocol = readProxyField('protocol'); + const normalizedProtocol = rawProxyProtocol + ? rawProxyProtocol.includes(':') + ? rawProxyProtocol + : `${rawProxyProtocol}:` + : 'http:'; + // Bracket IPv6 literals for URL parsing; URL.hostname strips the + // brackets again on read so the agent receives the raw form. + const proxyHostForURL = + proxyHost && proxyHost.includes(':') && !proxyHost.startsWith('[') + ? `[${proxyHost}]` + : proxyHost; + const proxyURL = new URL( + `${normalizedProtocol}//${proxyHostForURL}${proxyPort ? ':' + proxyPort : ''}` + ); + const agentOptions = { + protocol: proxyURL.protocol, + hostname: proxyURL.hostname.replace(/^\[|\]$/g, ''), + port: proxyURL.port, + auth: proxyAuth && typeof proxyAuth === 'string' ? proxyAuth : undefined, + }; + if (proxyURL.protocol === 'https:') { + agentOptions.ALPNProtocols = ['http/1.1']; + } + const tunnelingAgent = getTunnelingAgent(agentOptions, configHttpsAgent); + // Set both: `options.agent` is consumed by the native https.request path + // (maxRedirects === 0); `options.agents.https` is consumed by + // follow-redirects, which ignores `options.agent` when `options.agents` + // is present. + options.agent = tunnelingAgent; + if (options.agents) { + options.agents.https = tunnelingAgent; + } + } + } else { + // Forward-proxy mode for plaintext HTTP targets. The request line carries + // the absolute URL and the proxy sees everything — acceptable for plain + // HTTP since the wire was already plaintext. + if (proxyAuth) { + const base64 = Buffer.from(proxyAuth, 'utf8').toString('base64'); + options.headers['Proxy-Authorization'] = 'Basic ' + base64; + } + + // Preserve a user-supplied Host header (case-insensitive) so callers can override + // the value forwarded to the proxy; otherwise default to the request URL's host. + let hasUserHostHeader = false; + for (const name of Object.keys(options.headers)) { + if (name.toLowerCase() === 'host') { + hasUserHostHeader = true; + break; + } + } + if (!hasUserHostHeader) { + options.headers.host = options.hostname + (options.port ? ':' + options.port : ''); + } + const proxyHost = readProxyField('hostname') || readProxyField('host'); + options.hostname = proxyHost; + // Replace 'host' since options is not a URL object + options.host = proxyHost; + options.port = readProxyField('port'); + options.path = location; + const proxyProtocol = readProxyField('protocol'); + if (proxyProtocol) { + options.protocol = proxyProtocol.includes(':') ? proxyProtocol : `${proxyProtocol}:`; + } + } + } + + options.beforeRedirects.proxy = function beforeRedirect(redirectOptions) { + // Configure proxy for redirected request, passing the original config proxy to apply + // the exact same logic as if the redirected request was performed by axios directly. + setProxy( + redirectOptions, + configProxy, + redirectOptions.href, + true, + configHttpsAgent, + configHttpAgent, + allowEnvProxy + ); + }; + + return Boolean( + proxy || (configProxy !== false && allowEnvProxy && isNodeEnvProxyEnabled(proxyEnvAgent)) + ); +} + +const isHttpAdapterSupported = + typeof process !== 'undefined' && utils.kindOf(process) === 'process'; + +// temporary hotfix + +const wrapAsync = (asyncExecutor) => { + return new Promise((resolve, reject) => { + let onDone; + let isDone; + + const done = (value, isRejected) => { + if (isDone) return; + isDone = true; + onDone && onDone(value, isRejected); + }; + + const _resolve = (value) => { + done(value); + resolve(value); + }; + + const _reject = (reason) => { + done(reason, true); + reject(reason); + }; + + asyncExecutor(_resolve, _reject, (onDoneHandler) => (onDone = onDoneHandler)).catch(_reject); + }); +}; + +const resolveFamily = ({ address, family }) => { + if (!utils.isString(address)) { + throw new AxiosError('address must be a string', AxiosError.ERR_BAD_OPTION_VALUE); + } + return { + address, + family: family || (address.indexOf('.') < 0 ? 6 : 4), + }; +}; + +const buildAddressEntry = (address, family) => + resolveFamily(utils.isObject(address) ? address : { address, family }); + +const normalizedLookupCache = new WeakMap(); + +const normalizeLookup = (lookup) => { + let normalized = normalizedLookupCache.get(lookup); + + if (normalized) { + return normalized; + } + + const callbackLookup = callbackify(lookup, (value) => (utils.isArray(value) ? value : [value])); + + // Support opt.all, which is required by current Node.js releases. + normalized = (hostname, opt, cb) => { + callbackLookup(hostname, opt, (err, arg0, arg1) => { + if (err) { + return cb(err); + } + + let addresses; + + try { + addresses = utils.isArray(arg0) + ? arg0.map((addr) => buildAddressEntry(addr)) + : [buildAddressEntry(arg0, arg1)]; + } catch (error) { + return cb(error); + } + + opt.all ? cb(err, addresses) : cb(err, addresses[0].address, addresses[0].family); + }); + }; + + normalizedLookupCache.set(lookup, normalized); + + return normalized; +}; + +const http2Transport = { + request(options, cb) { + const authority = + options.protocol + + '//' + + options.hostname + + ':' + + (options.port || (options.protocol === 'https:' ? 443 : 80)); + + const { http2Options, headers } = options; + + const session = http2Sessions.getSession(authority, http2Options); + + const { HTTP2_HEADER_SCHEME, HTTP2_HEADER_METHOD, HTTP2_HEADER_PATH, HTTP2_HEADER_STATUS } = + http2.constants; + + const http2Headers = { + [HTTP2_HEADER_SCHEME]: options.protocol.replace(':', ''), + [HTTP2_HEADER_METHOD]: options.method, + [HTTP2_HEADER_PATH]: options.path, + }; + + utils.forEach(headers, (header, name) => { + name.charAt(0) !== ':' && (http2Headers[name] = header); + }); + + const req = session.request(http2Headers); + + req.once('response', (responseHeaders) => { + const response = req; //duplex + + responseHeaders = Object.assign({}, responseHeaders); + + const status = responseHeaders[HTTP2_HEADER_STATUS]; + + delete responseHeaders[HTTP2_HEADER_STATUS]; + + response.headers = responseHeaders; + + response.statusCode = +status; + + cb(response); + }); + + return req; + }, +}; + +/*eslint consistent-return:0*/ +export default isHttpAdapterSupported && + function httpAdapter(config) { + return wrapAsync(async function dispatchHttpRequest(resolve, reject, onDone) { + // Read config pollution-safely: own properties and members inherited from + // a non-Object.prototype source (e.g. an Object.create(defaults) template) + // are honored, but values injected onto a polluted Object.prototype are + // ignored. All behavior-affecting reads in this adapter go through own() + // so the protection boundary stays consistent. + const own = (key) => utils.getSafeProp(config, key); + const transitional = own('transitional') || transitionalDefaults; + let data = own('data'); + let lookup = own('lookup'); + let family = own('family'); + let httpVersion = own('httpVersion'); + if (httpVersion === undefined) httpVersion = 1; + const rawHttpVersion = httpVersion; + let http2Options = own('http2Options'); + const configProxy = own('proxy'); + const httpAgent = own('httpAgent'); + const httpsAgent = own('httpsAgent'); + const responseType = own('responseType'); + const responseEncoding = own('responseEncoding'); + const socketPath = own('socketPath'); + const method = own('method').toUpperCase(); + const maxRedirects = own('maxRedirects'); + const maxBodyLength = own('maxBodyLength'); + const maxContentLength = own('maxContentLength'); + const decompress = own('decompress'); + let isDone; + let rejected = false; + let req; + let connectPhaseTimer; + + try { + httpVersion = +httpVersion; + } catch (err) { + throw new AxiosError( + 'Invalid protocol version: value is not a number', + AxiosError.ERR_BAD_OPTION_VALUE, + config + ); + } + + if (Number.isNaN(httpVersion)) { + throw new AxiosError( + `Invalid protocol version: '${rawHttpVersion}' is not a number`, + AxiosError.ERR_BAD_OPTION_VALUE, + config + ); + } + + if (httpVersion !== 1 && httpVersion !== 2) { + throw new AxiosError( + `Unsupported protocol version '${httpVersion}'`, + AxiosError.ERR_BAD_OPTION_VALUE, + config + ); + } + + const isHttp2 = httpVersion === 2; + + if (lookup) { + lookup = normalizeLookup(lookup); + } + + const abortEmitter = new EventEmitter(); + + function abort(reason) { + try { + abortEmitter.emit( + 'abort', + !reason || reason.type ? new CanceledError(null, config, req) : reason + ); + } catch (err) { + // ignore emit errors + } + } + + function clearConnectPhaseTimer() { + if (connectPhaseTimer) { + clearTimeout(connectPhaseTimer); + connectPhaseTimer = null; + } + } + + function createTimeoutError() { + const configTimeout = own('timeout'); + let timeoutErrorMessage = configTimeout + ? 'timeout of ' + configTimeout + 'ms exceeded' + : 'timeout exceeded'; + const configTimeoutErrorMessage = own('timeoutErrorMessage'); + if (configTimeoutErrorMessage) { + timeoutErrorMessage = configTimeoutErrorMessage; + } + return new AxiosError( + timeoutErrorMessage, + transitional.clarifyTimeoutError ? AxiosError.ETIMEDOUT : AxiosError.ECONNABORTED, + config, + req + ); + } + + abortEmitter.once('abort', reject); + + const onFinished = () => { + clearConnectPhaseTimer(); + + if (config.cancelToken) { + config.cancelToken.unsubscribe(abort); + } + + if (config.signal) { + config.signal.removeEventListener('abort', abort); + } + + abortEmitter.removeAllListeners(); + }; + + if (config.cancelToken || config.signal) { + config.cancelToken && config.cancelToken.subscribe(abort); + if (config.signal) { + config.signal.aborted ? abort() : config.signal.addEventListener('abort', abort); + } + } + + onDone((response, isRejected) => { + isDone = true; + clearConnectPhaseTimer(); + + if (isRejected) { + rejected = true; + onFinished(); + return; + } + + const { data } = response; + + if (data instanceof stream.Readable || data instanceof stream.Duplex) { + const offListeners = stream.finished(data, () => { + offListeners(); + onFinished(); + }); + } else { + onFinished(); + } + }); + + // Parse url + const fullPath = buildFullPath(own('baseURL'), own('url'), own('allowAbsoluteUrls'), config); + // Unix-socket requests (own socketPath) commonly pass a path-only url + // like '/foo'; supply a synthetic base so new URL() can still parse it. + // Use the own-property value (not config.socketPath) so a polluted + // prototype cannot influence URL base selection. + const urlBase = socketPath + ? 'http://localhost' + : platform.hasBrowserEnv + ? platform.origin + : undefined; + const parsed = new URL(fullPath, urlBase); + const protocol = parsed.protocol || supportedProtocols[0]; + + if (protocol === 'data:') { + // Apply the same semantics as HTTP: only enforce if a finite, non-negative cap is set. + if (maxContentLength > -1) { + // Use the exact string passed to fromDataURI (the configured url); fall back to fullPath if needed. + const dataUrl = String(own('url') || fullPath || ''); + const estimated = estimateDataURLBufferAllocation(dataUrl); + + if (estimated > maxContentLength) { + return reject( + new AxiosError( + 'maxContentLength size of ' + maxContentLength + ' exceeded', + AxiosError.ERR_BAD_RESPONSE, + config + ) + ); + } + } + + let convertedData; + + if (method !== 'GET') { + return settle(resolve, reject, { + status: 405, + statusText: 'method not allowed', + headers: {}, + config, + }); + } + + try { + convertedData = fromDataURI(own('url'), responseType === 'blob', { + Blob: config.env && config.env.Blob, + }); + } catch (err) { + throw AxiosError.from(err, AxiosError.ERR_BAD_REQUEST, config); + } + + // Check bytes before converting the result to text or a stream. + if ( + maxContentLength > -1 && + (responseType === 'blob' ? convertedData.size : convertedData.length) > maxContentLength + ) { + return reject( + new AxiosError( + 'maxContentLength size of ' + maxContentLength + ' exceeded', + AxiosError.ERR_BAD_RESPONSE, + config + ) + ); + } + + if (responseType === 'text') { + convertedData = convertedData.toString(responseEncoding); + + if (!responseEncoding || responseEncoding === 'utf8') { + convertedData = utils.stripBOM(convertedData); + } + } else if (responseType === 'stream') { + convertedData = stream.Readable.from(convertedData); + } + + return settle(resolve, reject, { + data: convertedData, + status: 200, + statusText: 'OK', + headers: new AxiosHeaders(), + config, + }); + } + + if (supportedProtocols.indexOf(protocol) === -1) { + return reject( + new AxiosError('Unsupported protocol ' + protocol, AxiosError.ERR_BAD_REQUEST, config) + ); + } + + const headers = AxiosHeaders.from(config.headers).normalize(); + + // Set User-Agent (required by some servers) + // See https://github.com/axios/axios/issues/69 + // User-Agent is specified; handle case where no UA header is desired + // Only set header if it hasn't been set in config + headers.set('User-Agent', 'axios/' + VERSION, false); + + const { onUploadProgress, onDownloadProgress } = config; + const maxRate = config.maxRate; + let maxUploadRate = undefined; + let maxDownloadRate = undefined; + + // support for spec compliant FormData objects + if (utils.isSpecCompliantForm(data)) { + const userBoundary = headers.getContentType(/boundary=([-_\w\d]{10,70})/i); + + data = formDataToStream( + data, + (formHeaders) => { + headers.set(formHeaders); + }, + { + tag: `axios-${VERSION}-boundary`, + boundary: (userBoundary && userBoundary[1]) || undefined, + } + ); + // support for https://www.npmjs.com/package/form-data api + } else if ( + utils.isFormData(data) && + utils.isFunction(data.getHeaders) && + data.getHeaders !== Object.prototype.getHeaders + ) { + setFormDataHeaders(headers, data.getHeaders(), own('formDataHeaderPolicy')); + + if (!headers.hasContentLength()) { + try { + const knownLength = await util.promisify(data.getLength).call(data); + Number.isFinite(knownLength) && + knownLength >= 0 && + headers.setContentLength(knownLength); + /*eslint no-empty:0*/ + } catch (e) {} + } + } else if (utils.isBlob(data) || utils.isFile(data)) { + data.size && headers.setContentType(data.type || 'application/octet-stream'); + headers.setContentLength(data.size || 0); + data = stream.Readable.from(readBlob(data)); + } else if (data && !utils.isStream(data)) { + if (Buffer.isBuffer(data)) { + // Nothing to do... + } else if (utils.isArrayBuffer(data)) { + data = Buffer.from(new Uint8Array(data)); + } else if (utils.isString(data)) { + data = Buffer.from(data, 'utf-8'); + } else { + return reject( + new AxiosError( + 'Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream', + AxiosError.ERR_BAD_REQUEST, + config + ) + ); + } + + // Add Content-Length header if data exists + headers.setContentLength(data.length, false); + + if (maxBodyLength > -1 && data.length > maxBodyLength) { + return reject( + new AxiosError( + 'Request body larger than maxBodyLength limit', + AxiosError.ERR_BAD_REQUEST, + config + ) + ); + } + } + + const contentLength = utils.toFiniteNumber(headers.getContentLength()); + + if (utils.isArray(maxRate)) { + maxUploadRate = maxRate[0]; + maxDownloadRate = maxRate[1]; + } else { + maxUploadRate = maxDownloadRate = maxRate; + } + + if (data && (onUploadProgress || maxUploadRate)) { + if (!utils.isStream(data)) { + data = stream.Readable.from(data, { objectMode: false }); + } + + data = stream.pipeline( + [ + data, + new AxiosTransformStream({ + maxRate: utils.toFiniteNumber(maxUploadRate), + }), + ], + utils.noop + ); + + onUploadProgress && + data.on( + 'progress', + flushOnFinish( + data, + progressEventDecorator( + contentLength, + progressEventReducer(asyncDecorator(onUploadProgress, scheduleProgress), false, 3) + ) + ) + ); + } + + // HTTP basic authentication + let auth = undefined; + const configAuth = own('auth'); + if (configAuth) { + const username = utils.getSafeProp(configAuth, 'username') || ''; + const password = utils.getSafeProp(configAuth, 'password') || ''; + auth = username + ':' + password; + } + + if (!auth && (parsed.username || parsed.password)) { + const urlUsername = decodeURIComponentSafe(parsed.username); + const urlPassword = decodeURIComponentSafe(parsed.password); + auth = urlUsername + ':' + urlPassword; + } + + auth && headers.delete('authorization'); + + let path; + + try { + path = buildURL( + parsed.pathname + parsed.search, + own('params'), + own('paramsSerializer') + ).replace(/^\?/, ''); + } catch (err) { + return reject( + AxiosError.from(err, AxiosError.ERR_BAD_REQUEST, config, null, null, { + url: own('url'), + exists: true, + }) + ); + } + + headers.set( + 'Accept-Encoding', + utils.hasOwnProp(transitional, 'advertiseZstdAcceptEncoding') && + transitional.advertiseZstdAcceptEncoding === true + ? ACCEPT_ENCODING_WITH_ZSTD + : ACCEPT_ENCODING, + false + ); + + if (isHttp2 && lookup) { + http2Options = Object.assign(Object.create(null), http2Options, { lookup }); + } + + // Null-prototype to block prototype pollution gadgets on properties read + // directly by Node's http.request (e.g. insecureHTTPParser, lookup). + const options = Object.assign(Object.create(null), { + path, + method: method, + headers: toByteStringHeaderObject(headers), + agents: { http: httpAgent, https: httpsAgent }, + auth, + protocol, + family, + beforeRedirect: dispatchBeforeRedirect, + beforeRedirects: Object.create(null), + http2Options, + createConnection: undefined, + }); + + // cacheable-lookup integration hotfix + !utils.isUndefined(lookup) && (options.lookup = lookup); + + let proxyApplied = false; + + if (socketPath) { + if (typeof socketPath !== 'string') { + return reject( + new AxiosError('socketPath must be a string', AxiosError.ERR_BAD_OPTION_VALUE, config) + ); + } + + const allowedSocketPaths = own('allowedSocketPaths'); + if (allowedSocketPaths != null) { + const allowed = Array.isArray(allowedSocketPaths) + ? allowedSocketPaths + : [allowedSocketPaths]; + + const resolvedSocket = resolvePath(socketPath); + const isAllowed = allowed.some( + (entry) => typeof entry === 'string' && resolvePath(entry) === resolvedSocket + ); + + if (!isAllowed) { + return reject( + new AxiosError( + `socketPath "${socketPath}" is not permitted by allowedSocketPaths`, + AxiosError.ERR_BAD_OPTION_VALUE, + config + ) + ); + } + } + + options.socketPath = socketPath; + } else { + options.hostname = parsed.hostname.startsWith('[') + ? parsed.hostname.slice(1, -1) + : parsed.hostname; + options.port = parsed.port; + proxyApplied = setProxy( + options, + configProxy, + protocol + '//' + parsed.hostname + (parsed.port ? ':' + parsed.port : '') + options.path, + false, + httpsAgent, + httpAgent, + // The HTTP/2 transport connects independently of HTTP/1 agents, so it + // cannot apply either axios-resolved or agent-local environment proxies. + // Explicit proxy config is still processed and rejected below. + !isHttp2 + ); + } + let transport; + let isNativeTransport = false; + const isHttpsRequest = isHttps.test(options.protocol); + // Don't clobber a CONNECT-tunneling agent installed by setProxy() for an + // HTTPS target. + if (!isHttp2 && configProxy === false) { + setDirectAgent(options, httpAgent, httpsAgent); + options.beforeRedirects.direct = (redirectOptions) => { + setDirectAgent(redirectOptions, httpAgent, httpsAgent); + }; + } else if (options.agent == null) { + options.agent = isHttpsRequest ? httpsAgent : httpAgent; + } + + if (isHttp2) { + if (proxyApplied) { + return reject( + new AxiosError( + 'HTTP/2 requests with a proxy are not supported', + AxiosError.ERR_NOT_SUPPORT, + config + ) + ); + } + + transport = http2Transport; + } else { + const configTransport = own('transport'); + if (configTransport) { + transport = configTransport; + } else if (maxRedirects === 0) { + transport = isHttpsRequest ? https : http; + isNativeTransport = true; + } else { + options.sensitiveHeaders = []; + if (maxRedirects) { + options.maxRedirects = maxRedirects; + } + const configBeforeRedirect = own('beforeRedirect'); + if (configBeforeRedirect) { + options.beforeRedirects.config = configBeforeRedirect; + } + if (auth) { + // Restore HTTP Basic credentials on same-origin redirects only. + // follow-redirects >= 1.15.8 strips Authorization on every redirect (see #6929); + // cross-origin stripping is the documented mitigation for T-R2 in THREATMODEL.md + // and is preserved by deliberately not restoring on origin change. + const requestOrigin = parsed.origin; + const authToRestore = auth; + options.beforeRedirects.auth = function beforeRedirectAuth(redirectOptions) { + try { + if (new URL(redirectOptions.href).origin === requestOrigin) { + redirectOptions.auth = authToRestore; + } + } catch (e) { + // ignore malformed URL: leaving auth stripped is fail-safe + } + }; + } + const sensitiveHeaders = own('sensitiveHeaders'); + if (sensitiveHeaders != null) { + if (!utils.isArray(sensitiveHeaders)) { + return reject( + new AxiosError( + 'sensitiveHeaders must be an array of strings', + AxiosError.ERR_BAD_OPTION_VALUE, + config + ) + ); + } + + const sensitiveSet = new Set(); + for (const header of sensitiveHeaders) { + if (!utils.isString(header)) { + return reject( + new AxiosError( + 'sensitiveHeaders must be an array of strings', + AxiosError.ERR_BAD_OPTION_VALUE, + config + ) + ); + } + + sensitiveSet.add(header.toLowerCase()); + } + + if (sensitiveSet.size) { + options.sensitiveHeaders = Array.from(sensitiveSet); + options.beforeRedirects.sensitiveHeaders = function beforeRedirectSensitiveHeaders( + redirectOptions, + requestDetails + ) { + if (!isSameOriginRedirect(redirectOptions, requestDetails)) { + stripMatchingHeaders(redirectOptions.headers, sensitiveSet); + } + }; + } + } + transport = isHttpsRequest ? httpsFollow : httpFollow; + } + } + + // Set an explicit maxBodyLength option for transports that inspect it. + // When maxBodyLength is -1 (default/unlimited), use Infinity so + // follow-redirects does not fall back to its own 10MB default. + if (maxBodyLength > -1) { + options.maxBodyLength = maxBodyLength; + } else { + options.maxBodyLength = Infinity; + } + + // Always set an explicit own value so a polluted + // Object.prototype.insecureHTTPParser cannot enable the lenient parser + // through Node's internal options copy + options.insecureHTTPParser = Boolean(own('insecureHTTPParser')); + + // Create the request + req = transport.request(options, function handleResponse(res) { + clearConnectPhaseTimer(); + + if (req.destroyed) return; + + const streams = [res]; + + const responseLength = utils.toFiniteNumber(res.headers['content-length']); + + if (onDownloadProgress || maxDownloadRate) { + const transformStream = new AxiosTransformStream({ + maxRate: utils.toFiniteNumber(maxDownloadRate), + }); + + onDownloadProgress && + transformStream.on( + 'progress', + flushOnFinish( + transformStream, + progressEventDecorator( + responseLength, + progressEventReducer( + asyncDecorator(onDownloadProgress, scheduleProgress), + true, + 3 + ) + ) + ) + ); + + streams.push(transformStream); + } + + // decompress the response body transparently if required + let responseStream = res; + + // return the last request in case of redirects + const lastRequest = res.req || req; + + // if decompress disabled we should not decompress + if (decompress !== false && res.headers['content-encoding']) { + // if no content, but headers still say that it is encoded, + // remove the header not confuse downstream operations + if (method === 'HEAD' || res.statusCode === 204) { + delete res.headers['content-encoding']; + } + + switch ((res.headers['content-encoding'] || '').toLowerCase()) { + /*eslint default-case:0*/ + case 'gzip': + case 'x-gzip': + case 'compress': + case 'x-compress': + // add the unzipper to the body stream processing pipeline + streams.push(zlib.createUnzip(zlibOptions)); + + // remove the content-encoding in order to not confuse downstream operations + delete res.headers['content-encoding']; + break; + case 'deflate': + streams.push(new ZlibHeaderTransformStream()); + + // add the unzipper to the body stream processing pipeline + streams.push(zlib.createUnzip(zlibOptions)); + + // remove the content-encoding in order to not confuse downstream operations + delete res.headers['content-encoding']; + break; + case 'br': + if (isBrotliSupported) { + streams.push(zlib.createBrotliDecompress(brotliOptions)); + delete res.headers['content-encoding']; + } + break; + case 'zstd': + if (isZstdSupported) { + streams.push(zlib.createZstdDecompress(zstdOptions)); + delete res.headers['content-encoding']; + } + break; + } + } + + responseStream = streams.length > 1 ? stream.pipeline(streams, utils.noop) : streams[0]; + + const response = { + status: res.statusCode, + statusText: res.statusMessage, + headers: new AxiosHeaders(res.headers), + config, + request: lastRequest, + }; + + if (responseType === 'stream') { + // Enforce maxContentLength on streamed responses; previously this + // was applied only to buffered responses. + if (maxContentLength > -1) { + const limit = maxContentLength; + const source = responseStream; + async function* enforceMaxContentLength() { + let totalResponseBytes = 0; + for await (const chunk of source) { + totalResponseBytes += chunk.length; + if (totalResponseBytes > limit) { + throw new AxiosError( + 'maxContentLength size of ' + limit + ' exceeded', + AxiosError.ERR_BAD_RESPONSE, + config, + lastRequest + ); + } + yield chunk; + } + } + responseStream = stream.Readable.from(enforceMaxContentLength(), { + objectMode: false, + }); + } + response.data = responseStream; + settle(resolve, reject, response); + } else { + const responseBuffer = []; + let totalResponseBytes = 0; + + responseStream.on('data', function handleStreamData(chunk) { + responseBuffer.push(chunk); + totalResponseBytes += chunk.length; + + // make sure the content length is not over the maxContentLength if specified + if (maxContentLength > -1 && totalResponseBytes > maxContentLength) { + // stream.destroy() emit aborted event before calling reject() on Node.js v16 + rejected = true; + responseStream.destroy(); + abort( + new AxiosError( + 'maxContentLength size of ' + maxContentLength + ' exceeded', + AxiosError.ERR_BAD_RESPONSE, + config, + lastRequest + ) + ); + } + }); + + responseStream.on('aborted', function handlerStreamAborted() { + if (rejected) { + return; + } + + const err = new AxiosError( + 'stream has been aborted', + AxiosError.ERR_BAD_RESPONSE, + config, + lastRequest, + response + ); + responseStream.destroy(err); + reject(err); + }); + + responseStream.on('error', function handleStreamError(err) { + if (rejected) return; + reject(AxiosError.from(err, null, config, lastRequest, response)); + }); + + responseStream.on('end', function handleStreamEnd() { + try { + let responseData = + responseBuffer.length === 1 ? responseBuffer[0] : Buffer.concat(responseBuffer); + if (responseType !== 'arraybuffer') { + responseData = responseData.toString(responseEncoding); + if (!responseEncoding || responseEncoding === 'utf8') { + responseData = utils.stripBOM(responseData); + } + } + response.data = responseData; + } catch (err) { + return reject(AxiosError.from(err, null, config, response.request, response)); + } + settle(resolve, reject, response); + }); + } + + abortEmitter.once('abort', (err) => { + if (!responseStream.destroyed) { + responseStream.emit('error', err); + responseStream.destroy(); + } + }); + }); + + abortEmitter.once('abort', (err) => { + if (req.close) { + req.close(); + } else { + req.destroy(err); + } + }); + + // Handle errors + req.on('error', function handleRequestError(err) { + reject(AxiosError.from(err, null, config, req)); + }); + + // set tcp keep alive to prevent drop connection by peer + // Track every socket bound to this outer RedirectableRequest so a single + // 'close' listener can release ownership on all of them. follow-redirects + // re-emits the 'socket' event for each hop's native request onto the same + // outer request, so attaching per-request listeners inside this handler + // would accumulate across hops and trigger MaxListenersExceededWarning at + // >= 11 redirects. Clearing only the last-bound socket would leave stale + // kAxiosCurrentReq refs on earlier hop sockets returned to the keep-alive + // pool, causing an idle-pool 'error' to be attributed to a closed req. + const boundSockets = new Set(); + + req.on('socket', function handleRequestSocket(socket) { + // default interval of sending ack packet is 1 minute + // proxy agents (e.g. agent-base) may return a generic Duplex stream + // that doesn't have setKeepAlive, so guard before calling + if (typeof socket.setKeepAlive === 'function') { + socket.setKeepAlive(true, 1000 * 60); + } + + // Install one shared 'error' listener per socket. The symbol follows the + // currently-active request as pooled sockets are reassigned (issue #10780). + if (!socket[kAxiosSocketListener]) { + socket.on('error', handleSocketError); + socket[kAxiosSocketListener] = true; + } + + socket[kAxiosCurrentReq] = req; + boundSockets.add(socket); + }); + + req.once('close', function clearCurrentReq() { + clearConnectPhaseTimer(); + + for (const socket of boundSockets) { + if (socket[kAxiosCurrentReq] === req) { + socket[kAxiosCurrentReq] = null; + } + } + boundSockets.clear(); + }); + + // Handle request timeout + if (own('timeout')) { + // This is forcing a int timeout to avoid problems if the `req` interface doesn't handle other types. + const timeout = parseInt(own('timeout'), 10); + + if (Number.isNaN(timeout)) { + abort( + new AxiosError( + 'error trying to parse `config.timeout` to int', + AxiosError.ERR_BAD_OPTION_VALUE, + config, + req + ) + ); + + return; + } + + const handleTimeout = function handleTimeout() { + if (isDone) return; + abort(createTimeoutError()); + }; + + if (isNativeTransport && timeout > 0) { + // Native ClientRequest#setTimeout starts from the socket lifecycle and + // may not fire while TCP connect is still pending. Mirror the + // follow-redirects wall-clock timer for the maxRedirects === 0 path. + connectPhaseTimer = setTimeout(handleTimeout, timeout); + } + + // Sometime, the response will be very slow, and does not respond, the connect event will be block by event loop system. + // And timer callback will be fired, and abort() will be invoked before connection, then get "socket hang up" and code ECONNRESET. + // At this time, if we have a large number of request, nodejs will hang up some socket on background. and the number will up and up. + // And then these socket which be hang up will devouring CPU little by little. + // ClientRequest.setTimeout will be fired on the specify milliseconds, and can make sure that abort() will be fired after connect. + req.setTimeout(timeout, handleTimeout); + } else { + // explicitly reset the socket timeout value for a possible `keep-alive` request + req.setTimeout(0); + } + + // Send the request + if (utils.isStream(data)) { + let ended = false; + let errored = false; + + data.on('end', () => { + ended = true; + }); + + data.once('error', (err) => { + errored = true; + req.destroy(err); + }); + + data.on('close', () => { + if (!ended && !errored) { + abort(new CanceledError('Request stream has been aborted', config, req)); + } + }); + + // Transform decodes string chunks to Buffers before counting, so every + // transport receives at most maxBodyLength encoded bytes. + let uploadStream = data; + if (maxBodyLength > -1) { + const limit = maxBodyLength; + let bytesSent = 0; + uploadStream = stream.pipeline( + [ + data, + new stream.Transform({ + transform(chunk, _enc, cb) { + bytesSent += chunk.length; + if (bytesSent > limit) { + return cb( + new AxiosError( + 'Request body larger than maxBodyLength limit', + AxiosError.ERR_BAD_REQUEST, + config, + req + ) + ); + } + cb(null, chunk); + }, + }), + ], + utils.noop + ); + uploadStream.on('error', (err) => { + if (!req.destroyed) req.destroy(err); + }); + } + + uploadStream.pipe(req); + } else { + data && req.write(data); + req.end(); + } + }); + }; + +export const __setProxy = setProxy; +export const __getDirectAgent = getDirectAgent; +export const __isNodeNativeEnvProxySupported = isNodeNativeEnvProxySupported; +export const __isNodeEnvProxyEnabled = isNodeEnvProxyEnabled; +export const __isSameOriginRedirect = isSameOriginRedirect; diff --git a/node_modules/axios/lib/adapters/xhr.js b/node_modules/axios/lib/adapters/xhr.js new file mode 100644 index 0000000..0b9efff --- /dev/null +++ b/node_modules/axios/lib/adapters/xhr.js @@ -0,0 +1,384 @@ +import utils from '../utils.js'; +import settle from '../core/settle.js'; +import transitionalDefaults from '../defaults/transitional.js'; +import AxiosError from '../core/AxiosError.js'; +import CanceledError from '../cancel/CanceledError.js'; +import normalizeURLForProtocolCheck from '../helpers/normalizeURLForProtocolCheck.js'; +import parseProtocol from '../helpers/parseProtocol.js'; +import platform from '../platform/index.js'; +import AxiosHeaders from '../core/AxiosHeaders.js'; +import cookies from '../helpers/cookies.js'; +import { progressEventReducer } from '../helpers/progressEventReducer.js'; +import resolveConfig from '../helpers/resolveConfig.js'; +import { toByteStringHeaderObject } from '../helpers/sanitizeHeaderValue.js'; + +const isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined'; + +export default isXHRAdapterSupported && + function (config) { + return new Promise(function dispatchXhrRequest(resolve, reject) { + let useAsyncXsrf; + try { + const store = + platform.hasStandardBrowserEnv && typeof window !== 'undefined' && window.cookieStore; + useAsyncXsrf = store && utils.isFunction(store.get); + } catch (e) { + // A restricted Cookie Store getter must retain the synchronous fallback. + } + let xsrfCookieName; + const _config = resolveConfig( + config, + useAsyncXsrf + ? (name) => { + xsrfCookieName = name; + return null; + } + : undefined + ); + let requestData = _config.data; + const requestHeaders = AxiosHeaders.from(_config.headers).normalize(); + let { responseType, onUploadProgress, onDownloadProgress } = _config; + let onCanceled; + let timeoutId; + let uploadThrottled, downloadThrottled; + let flushUpload, flushDownload, flushDownloadWithEvent; + + function done() { + clearTimeout(timeoutId); + // A final progress callback must not prevent the remaining cleanup. + // Report errors asynchronously, as onloadend and the throttle timer do. + try { + flushUpload && flushUpload(); // flush events + } catch (err) { + setTimeout(() => { + throw err; + }); + } + try { + flushDownload && flushDownload(); // flush events + } catch (err) { + setTimeout(() => { + throw err; + }); + } + + // A flush can synchronously cancel the request and reenter done(). + // In that case the inner call has already detached these listeners. + if (request) { + downloadThrottled && request.removeEventListener('progress', downloadThrottled); + if (request.upload) { + uploadThrottled && request.upload.removeEventListener('progress', uploadThrottled); + flushUpload && request.upload.removeEventListener('loadend', flushUpload); + } + } + + _config.cancelToken && _config.cancelToken.unsubscribe(onCanceled); + + _config.signal && _config.signal.removeEventListener('abort', onCanceled); + } + + let request = new XMLHttpRequest(); + + request.open(_config.method.toUpperCase(), _config.url, true); + + // Set the request timeout in MS + request.timeout = _config.timeout; + + function onloadend(event) { + if (!request) { + return; + } + + // Status 0 means no response was received, which onerror and onabort normally + // reject before this runs. Firefox 152 fires only readystatechange and loadend for + // navigation-canceled requests (https://bugzilla.mozilla.org/show_bug.cgi?id=1505389), + // leaving settle() to resolve them as an empty success. ECONNABORTED is the error + // onabort raised on Firefox 151. Reads over file:, which some environments report as + // status 0 on success, are excluded by the request URL's scheme after browser-style + // preprocessing, by the page origin's scheme for relative URLs (which inherit it), or + // by responseURL where implemented. + if ( + request.status === 0 && + (parseProtocol(normalizeURLForProtocolCheck(_config.url)) || + parseProtocol(platform.origin)) !== 'file' && + !(request.responseURL && request.responseURL.startsWith('file:')) + ) { + reject(new AxiosError('Request aborted', AxiosError.ECONNABORTED, config, request)); + done(); + + // Clean up request + request = null; + return; + } + + // When loadend is still dispatching, flushing with it gives progress + // listeners a final delivery whose event has a live target. The legacy + // ready-state fallback has no event, so replay its pending progress. + // A throwing listener must not block settlement; rethrow asynchronously, + // matching how listener errors surface on the throttle timer path. + try { + if (event) { + flushDownloadWithEvent && flushDownloadWithEvent(event); + } else { + flushDownload && flushDownload(); + } + } catch (err) { + setTimeout(() => { + throw err; + }); + } + + // A final progress callback can cancel the request synchronously. + if (!request) { + return; + } + + // Prepare the response + const responseHeaders = AxiosHeaders.from( + 'getAllResponseHeaders' in request && request.getAllResponseHeaders() + ); + const responseData = + !responseType || responseType === 'text' || responseType === 'json' + ? request.responseText + : request.response; + const response = { + data: responseData, + status: request.status, + statusText: request.statusText, + headers: responseHeaders, + config, + request, + }; + + settle( + function _resolve(value) { + resolve(value); + done(); + }, + function _reject(err) { + reject(err); + done(); + }, + response + ); + + // Clean up request + request = null; + } + + if ('onloadend' in request) { + // Use onloadend if available + request.onloadend = onloadend; + } else { + // Listen for ready state to emulate onloadend + request.onreadystatechange = function handleLoad() { + if (!request || request.readyState !== 4) { + return; + } + + // The request errored out and we didn't get a response, this will be + // handled by onerror instead + // With one exception: request that using file: protocol, most browsers + // will return status as 0 even though it's a successful request + if ( + request.status === 0 && + !(request.responseURL && request.responseURL.startsWith('file:')) + ) { + return; + } + // readystate handler is calling before onerror or ontimeout handlers, + // so we should call onloadend on the next 'tick' + setTimeout(onloadend); + }; + } + + // Handle browser request cancellation (as opposed to a manual cancellation) + request.onabort = function handleAbort() { + if (!request) { + return; + } + + reject(new AxiosError('Request aborted', AxiosError.ECONNABORTED, config, request)); + done(); + + // Clean up request + request = null; + }; + + // Handle low level network errors + request.onerror = function handleError(event) { + // Browsers deliver a ProgressEvent in XHR onerror + // (message may be empty; when present, surface it) + // See https://developer.mozilla.org/docs/Web/API/XMLHttpRequest/error_event + const msg = event && event.message ? event.message : 'Network Error'; + const err = new AxiosError(msg, AxiosError.ERR_NETWORK, config, request); + // attach the underlying event for consumers who want details + err.event = event || null; + reject(err); + done(); + request = null; + }; + + // Handle timeout + request.ontimeout = function handleTimeout() { + if (!request) return; + let timeoutErrorMessage = _config.timeout + ? 'timeout of ' + _config.timeout + 'ms exceeded' + : 'timeout exceeded'; + const transitional = _config.transitional || transitionalDefaults; + if (_config.timeoutErrorMessage) { + timeoutErrorMessage = _config.timeoutErrorMessage; + } + reject( + new AxiosError( + timeoutErrorMessage, + transitional.clarifyTimeoutError ? AxiosError.ETIMEDOUT : AxiosError.ECONNABORTED, + config, + request + ) + ); + done(); + + // Clean up request + request = null; + }; + + // Remove Content-Type if data is undefined + requestData === undefined && requestHeaders.setContentType(null); + + // Add withCredentials to request if needed + if (!utils.isUndefined(_config.withCredentials)) { + request.withCredentials = !!_config.withCredentials; + } + + // Add responseType to request if needed + if (responseType && responseType !== 'json') { + request.responseType = _config.responseType; + } + + // Handle progress if needed + if (onDownloadProgress) { + [downloadThrottled, flushDownload, flushDownloadWithEvent] = progressEventReducer( + onDownloadProgress, + true + ); + request.addEventListener('progress', downloadThrottled); + } + + // Not all browsers support upload events + if (onUploadProgress && request.upload) { + [uploadThrottled, flushUpload] = progressEventReducer(onUploadProgress); + + request.upload.addEventListener('progress', uploadThrottled); + + request.upload.addEventListener('loadend', flushUpload); + } + + if (_config.cancelToken || _config.signal) { + // Handle cancellation + // eslint-disable-next-line func-names + onCanceled = (cancel) => { + if (!request) { + return; + } + reject(!cancel || cancel.type ? new CanceledError(null, config, request) : cancel); + const xhr = request; + done(); + request = null; + xhr.abort(); + }; + + _config.cancelToken && _config.cancelToken.subscribe(onCanceled); + if (!request) return; + if (_config.signal) { + _config.signal.aborted + ? onCanceled() + : _config.signal.addEventListener('abort', onCanceled); + } + } + + if (!request) return; + + const protocol = parseProtocol(_config.url); + + if (protocol && !platform.protocols.includes(protocol)) { + reject( + new AxiosError( + 'Unsupported protocol ' + protocol + ':', + AxiosError.ERR_BAD_REQUEST, + config + ) + ); + done(); + return; + } + + const sendRequest = () => { + if (!request) return; + // Apply headers after an asynchronous XSRF read so existing headers are + // replaced through AxiosHeaders rather than appended by the native XHR. + if ('setRequestHeader' in request) { + utils.forEach( + toByteStringHeaderObject(requestHeaders), + function setRequestHeader(val, key) { + request.setRequestHeader(key, val); + } + ); + } + request.send(requestData || null); + }; + + if (xsrfCookieName) { + // Native XHR timeout starts at send(). Cover cookie preparation and the + // subsequent request with the same budget and existing timeout handler. + const now = + typeof performance !== 'undefined' && utils.isFunction(performance.now) + ? () => performance.now() + : Date.now; + const deadline = request.timeout > 0 ? now() + Number(request.timeout) : undefined; + const abortOnTimeout = () => { + if (!request) return; + const xhr = request; + xhr.ontimeout(); + xhr.abort(); + }; + if (deadline !== undefined) { + const scheduleTimeout = () => { + const remaining = deadline - now(); + if (remaining > 0) { + // Browser timers overflow above the signed 32-bit delay limit. + timeoutId = setTimeout(scheduleTimeout, Math.min(remaining, 0x7fffffff)); + } else { + abortOnTimeout(); + } + }; + scheduleTimeout(); + } + + cookies + .readAsync(xsrfCookieName) + .then((value) => { + if (!request) return; + // Promise callbacks may run before an overdue timer after a busy task. + if (deadline !== undefined && now() >= deadline) { + abortOnTimeout(); + return; + } + if (value) { + const headerName = + utils.hasOwnProp(_config, 'xsrfHeaderName') && _config.xsrfHeaderName; + requestHeaders.set(headerName, value); + } + sendRequest(); + }) + .catch((error) => { + if (!request) return; + reject(AxiosError.from(error, null, config, request)); + done(); + request = null; + }); + } else { + sendRequest(); + } + }); + }; diff --git a/node_modules/axios/lib/axios.js b/node_modules/axios/lib/axios.js new file mode 100644 index 0000000..5a3a876 --- /dev/null +++ b/node_modules/axios/lib/axios.js @@ -0,0 +1,89 @@ +'use strict'; + +import utils from './utils.js'; +import bind from './helpers/bind.js'; +import Axios from './core/Axios.js'; +import mergeConfig from './core/mergeConfig.js'; +import defaults from './defaults/index.js'; +import formDataToJSON from './helpers/formDataToJSON.js'; +import CanceledError from './cancel/CanceledError.js'; +import CancelToken from './cancel/CancelToken.js'; +import isCancel from './cancel/isCancel.js'; +import { VERSION } from './env/data.js'; +import toFormData from './helpers/toFormData.js'; +import AxiosError from './core/AxiosError.js'; +import spread from './helpers/spread.js'; +import isAxiosError from './helpers/isAxiosError.js'; +import AxiosHeaders from './core/AxiosHeaders.js'; +import adapters from './adapters/adapters.js'; +import HttpStatusCode from './helpers/HttpStatusCode.js'; + +/** + * Create an instance of Axios + * + * @param {Object} defaultConfig The default config for the instance + * + * @returns {Axios} A new instance of Axios + */ +function createInstance(defaultConfig) { + const context = new Axios(defaultConfig); + const instance = bind(Axios.prototype.request, context); + + // Copy axios.prototype to instance + utils.extend(instance, Axios.prototype, context, { allOwnKeys: true }); + + // Copy context to instance + utils.extend(instance, context, null, { allOwnKeys: true }); + + // Factory for creating new instances + instance.create = function create(instanceConfig) { + return createInstance(mergeConfig(defaultConfig, instanceConfig)); + }; + + return instance; +} + +// Create the default instance to be exported +const axios = createInstance(defaults); + +// Expose Axios class to allow class inheritance +axios.Axios = Axios; + +// Expose Cancel & CancelToken +axios.CanceledError = CanceledError; +axios.CancelToken = CancelToken; +axios.isCancel = isCancel; +axios.VERSION = VERSION; +axios.toFormData = toFormData; + +// Expose AxiosError class +axios.AxiosError = AxiosError; + +// alias for CanceledError for backward compatibility +axios.Cancel = axios.CanceledError; + +// Expose all/spread +axios.all = function all(promises) { + return Promise.all(promises); +}; + +axios.spread = spread; + +// Expose isAxiosError +axios.isAxiosError = isAxiosError; + +// Expose mergeConfig +axios.mergeConfig = mergeConfig; + +axios.AxiosHeaders = AxiosHeaders; + +axios.formToJSON = (thing) => formDataToJSON(utils.isHTMLForm(thing) ? new FormData(thing) : thing); + +axios.getAdapter = adapters.getAdapter; + +axios.HttpStatusCode = HttpStatusCode; + +axios.default = axios; + +// this module should only have a default export +export default axios; diff --git a/node_modules/axios/lib/cancel/CancelToken.js b/node_modules/axios/lib/cancel/CancelToken.js new file mode 100644 index 0000000..357381e --- /dev/null +++ b/node_modules/axios/lib/cancel/CancelToken.js @@ -0,0 +1,135 @@ +'use strict'; + +import CanceledError from './CanceledError.js'; + +/** + * A `CancelToken` is an object that can be used to request cancellation of an operation. + * + * @param {Function} executor The executor function. + * + * @returns {CancelToken} + */ +class CancelToken { + constructor(executor) { + if (typeof executor !== 'function') { + throw new TypeError('executor must be a function.'); + } + + let resolvePromise; + + this.promise = new Promise(function promiseExecutor(resolve) { + resolvePromise = resolve; + }); + + const token = this; + + // eslint-disable-next-line func-names + this.promise.then((cancel) => { + if (!token._listeners) return; + + let i = token._listeners.length; + + while (i-- > 0) { + token._listeners[i](cancel); + } + token._listeners = null; + }); + + // eslint-disable-next-line func-names + this.promise.then = (onfulfilled) => { + let _resolve; + // eslint-disable-next-line func-names + const promise = new Promise((resolve) => { + token.subscribe(resolve); + _resolve = resolve; + }).then(onfulfilled); + + promise.cancel = function reject() { + token.unsubscribe(_resolve); + }; + + return promise; + }; + + executor(function cancel(message, config, request) { + if (token.reason) { + // Cancellation has already been requested + return; + } + + token.reason = new CanceledError(message, config, request); + resolvePromise(token.reason); + }); + } + + /** + * Throws a `CanceledError` if cancellation has been requested. + */ + throwIfRequested() { + if (this.reason) { + throw this.reason; + } + } + + /** + * Subscribe to the cancel signal + */ + + subscribe(listener) { + if (this.reason) { + listener(this.reason); + return; + } + + if (this._listeners) { + this._listeners.push(listener); + } else { + this._listeners = [listener]; + } + } + + /** + * Unsubscribe from the cancel signal + */ + + unsubscribe(listener) { + if (!this._listeners) { + return; + } + const index = this._listeners.indexOf(listener); + if (index !== -1) { + this._listeners.splice(index, 1); + } + } + + toAbortSignal() { + const controller = new AbortController(); + + const abort = (err) => { + controller.abort(err); + }; + + this.subscribe(abort); + + controller.signal.unsubscribe = () => this.unsubscribe(abort); + + return controller.signal; + } + + /** + * Returns an object that contains a new `CancelToken` and a function that, when called, + * cancels the `CancelToken`. + */ + static source() { + let cancel; + const token = new CancelToken(function executor(c) { + cancel = c; + }); + return { + token, + cancel, + }; + } +} + +export default CancelToken; diff --git a/node_modules/axios/lib/cancel/CanceledError.js b/node_modules/axios/lib/cancel/CanceledError.js new file mode 100644 index 0000000..e769b89 --- /dev/null +++ b/node_modules/axios/lib/cancel/CanceledError.js @@ -0,0 +1,22 @@ +'use strict'; + +import AxiosError from '../core/AxiosError.js'; + +class CanceledError extends AxiosError { + /** + * A `CanceledError` is an object that is thrown when an operation is canceled. + * + * @param {string=} message The message. + * @param {Object=} config The config. + * @param {Object=} request The request. + * + * @returns {CanceledError} The created error. + */ + constructor(message, config, request) { + super(message == null ? 'canceled' : message, AxiosError.ERR_CANCELED, config, request); + this.name = 'CanceledError'; + this.__CANCEL__ = true; + } +} + +export default CanceledError; diff --git a/node_modules/axios/lib/cancel/isCancel.js b/node_modules/axios/lib/cancel/isCancel.js new file mode 100644 index 0000000..a444a12 --- /dev/null +++ b/node_modules/axios/lib/cancel/isCancel.js @@ -0,0 +1,5 @@ +'use strict'; + +export default function isCancel(value) { + return !!(value && value.__CANCEL__); +} diff --git a/node_modules/axios/lib/core/Axios.js b/node_modules/axios/lib/core/Axios.js new file mode 100644 index 0000000..0c04983 --- /dev/null +++ b/node_modules/axios/lib/core/Axios.js @@ -0,0 +1,361 @@ +'use strict'; + +import utils from '../utils.js'; +import buildURL from '../helpers/buildURL.js'; +import InterceptorManager from './InterceptorManager.js'; +import dispatchRequest from './dispatchRequest.js'; +import mergeConfig from './mergeConfig.js'; +import buildFullPath from './buildFullPath.js'; +import methodList from './methodList.js'; +import validator from '../helpers/validator.js'; +import AxiosHeaders from './AxiosHeaders.js'; +import transitionalDefaults from '../defaults/transitional.js'; +import { getCauseStackIndex } from './AxiosError.js'; + +const validators = validator.validators; + +// Recognize header maps without consuming objects intended as literal values. +// AxiosHeaders from other builds share a brand and header-container interface, +// but not constructor identity. A tag and toJSON alone can describe a literal. +const isHeadersBucket = (value) => { + if (value == null || utils.isPlainObject(value) || value instanceof AxiosHeaders) { + return true; + } + + try { + return ( + utils.isObject(value) && + utils.getSafeProp(value, Symbol.toStringTag) === 'AxiosHeaders' && + [ + 'toJSON', + 'set', + 'get', + 'has', + 'delete', + 'clear', + 'normalize', + 'concat', + 'toString', + Symbol.iterator, + ].every((method) => utils.isFunction(utils.getSafeProp(value, method))) + ); + } catch (e) { + // A failed optional brand probe must not prevent literal header serialization. + return false; + } +}; + +/** + * Create a new instance of Axios + * + * @param {Object} instanceConfig The default config for the instance + * + * @return {Axios} A new instance of Axios + */ +class Axios { + constructor(instanceConfig) { + this.defaults = instanceConfig || {}; + this.interceptors = { + request: new InterceptorManager(), + response: new InterceptorManager(), + }; + } + + /** + * Dispatch a request + * + * @param {String|Object} configOrUrl The config specific for this request (merged with this.defaults) + * @param {?Object} config + * + * @returns {Promise} The Promise to be fulfilled + */ + async request(configOrUrl, config) { + try { + return await this._request(configOrUrl, config); + } catch (err) { + if (err instanceof Error) { + try { + let dummy = {}; + + Error.captureStackTrace ? Error.captureStackTrace(dummy) : (dummy = new Error()); + + const dummyStack = dummy.stack; + let stack = ''; + + // slice off the Error: ... line + if (typeof dummyStack === 'string') { + const firstNewlineIndex = dummyStack.indexOf('\n'); + + stack = firstNewlineIndex === -1 ? '' : dummyStack.slice(firstNewlineIndex + 1); + } + + if (!err.stack) { + err.stack = stack; + } else if (stack) { + // Match a common suffix after the 2 top frames when available, + // otherwise compare the full reconstructed stack. + const firstNewlineIndex = stack.indexOf('\n'); + const secondNewlineIndex = + firstNewlineIndex === -1 ? -1 : stack.indexOf('\n', firstNewlineIndex + 1); + const duplicateCheckSuffix = + secondNewlineIndex === -1 ? stack : stack.slice(secondNewlineIndex + 1); + + // `AxiosError.from()` may have already inlined the wrapped error's + // stack under a `Caused by:` marker. Keep the reconstructed caller + // frames ahead of that marker so stack-only reporters do not read + // them as part of the low-level cause. + const currentStack = String(err.stack); + const causeIndex = getCauseStackIndex(err, currentStack); + const stackHead = causeIndex === -1 ? currentStack : currentStack.slice(0, causeIndex); + const causeSection = causeIndex === -1 ? '' : currentStack.slice(causeIndex); + + if (!stackHead.endsWith(duplicateCheckSuffix)) { + err.stack = stackHead + '\n' + stack + causeSection; + } + } + } catch (e) { + // Ignore failures from custom stack hooks or un-writable stack properties. + } + } + + throw err; + } + } + + _request(configOrUrl, config) { + /*eslint no-param-reassign:0*/ + // Allow for axios('example/url'[, config]) a la fetch API + if (typeof configOrUrl === 'string') { + config = config || {}; + config.url = configOrUrl; + } else { + config = configOrUrl || {}; + } + + config = mergeConfig(this.defaults, config); + + const { transitional, paramsSerializer, headers } = config; + + if (transitional !== undefined) { + validator.assertOptions( + transitional, + { + silentJSONParsing: validators.transitional(validators.boolean), + forcedJSONParsing: validators.transitional(validators.boolean), + clarifyTimeoutError: validators.transitional(validators.boolean), + legacyInterceptorReqResOrdering: validators.transitional(validators.boolean), + advertiseZstdAcceptEncoding: validators.transitional(validators.boolean), + validateStatusUndefinedResolves: validators.transitional(validators.boolean), + encodeBasicAuthUsername: validators.transitional(validators.boolean), + }, + false + ); + } + + if (paramsSerializer != null) { + if (utils.isFunction(paramsSerializer)) { + config.paramsSerializer = { + serialize: paramsSerializer, + }; + } else { + validator.assertOptions( + paramsSerializer, + { + encode: validators.function, + serialize: validators.function, + }, + true + ); + } + } + + // Set config.allowAbsoluteUrls + if (config.allowAbsoluteUrls !== undefined) { + // do nothing + } else if ( + utils.hasOwnProp(this.defaults, 'allowAbsoluteUrls') && + this.defaults.allowAbsoluteUrls !== undefined + ) { + config.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls; + } else { + config.allowAbsoluteUrls = true; + } + + validator.assertOptions( + config, + { + baseUrl: validators.spelling('baseURL'), + withXsrfToken: validators.spelling('withXSRFToken'), + }, + true + ); + + // Set config.method + config.method = ( + utils.getSafeProp(config, 'method') || + utils.getSafeProp(this.defaults, 'method') || + 'get' + ).toLowerCase(); + + // Flatten header defaults without consuming literal method-named headers. + const commonHeaders = utils.getSafeProp(headers, 'common'); + const methodHeaders = utils.getSafeProp(headers, config.method); + const contextHeaders = + headers && + utils.merge( + isHeadersBucket(commonHeaders) ? commonHeaders : undefined, + isHeadersBucket(methodHeaders) ? methodHeaders : undefined + ); + + headers && + utils.forEach(methodList.concat('common'), (method) => { + if (isHeadersBucket(utils.getSafeProp(headers, method))) { + delete headers[method]; + } + }); + + config.headers = AxiosHeaders.concat(contextHeaders, headers); + + // filter out skipped interceptors + const requestInterceptorChain = []; + let synchronousRequestInterceptors = true; + this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) { + if (typeof interceptor.runWhen === 'function' && interceptor.runWhen(config) === false) { + return; + } + + synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous; + + const transitional = config.transitional || transitionalDefaults; + const legacyInterceptorReqResOrdering = + transitional && transitional.legacyInterceptorReqResOrdering; + + if (legacyInterceptorReqResOrdering) { + requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected); + } else { + requestInterceptorChain.push(interceptor.fulfilled, interceptor.rejected); + } + }); + + const responseInterceptorChain = []; + this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) { + responseInterceptorChain.push(interceptor.fulfilled, interceptor.rejected); + }); + + let promise; + let i = 0; + let len; + + if (!synchronousRequestInterceptors) { + const chain = [dispatchRequest.bind(this), undefined]; + chain.unshift(...requestInterceptorChain); + chain.push(...responseInterceptorChain); + len = chain.length; + + promise = Promise.resolve(config); + + while (i < len) { + promise = promise.then(chain[i++], chain[i++]); + } + + return promise; + } + + len = requestInterceptorChain.length; + + let newConfig = config; + + while (i < len) { + const onFulfilled = requestInterceptorChain[i++]; + const onRejected = requestInterceptorChain[i++]; + try { + newConfig = onFulfilled ? onFulfilled(newConfig) : newConfig; + } catch (error) { + if (!onRejected) { + promise = Promise.reject(error); + break; + } + + try { + const rejectedResult = onRejected.call(this, error); + + if (utils.isThenable(rejectedResult)) { + promise = Promise.resolve(rejectedResult).then(() => + dispatchRequest.call(this, newConfig) + ); + } + } catch (rejectedError) { + promise = Promise.reject(rejectedError); + } + + break; + } + } + + if (!promise) { + try { + promise = dispatchRequest.call(this, newConfig); + } catch (error) { + promise = Promise.reject(error); + } + } + + i = 0; + len = responseInterceptorChain.length; + + while (i < len) { + promise = promise.then(responseInterceptorChain[i++], responseInterceptorChain[i++]); + } + + return promise; + } + + getUri(config) { + config = mergeConfig(this.defaults, config); + const fullPath = buildFullPath(config.baseURL, config.url, config.allowAbsoluteUrls, config); + return buildURL(fullPath, config.params, config.paramsSerializer); + } +} + +// Provide aliases for supported request methods +utils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) { + /*eslint func-names:0*/ + Axios.prototype[method] = async function (url, config) { + return this.request( + mergeConfig(config || {}, { + method, + url, + data: config && utils.hasOwnProp(config, 'data') ? config.data : undefined, + }) + ); + }; +}); + +utils.forEach(['post', 'put', 'patch', 'query'], function forEachMethodWithData(method) { + function generateHTTPMethod(isForm) { + return async function httpMethod(url, data, config) { + return this.request( + mergeConfig(config || {}, { + method, + headers: isForm + ? { + 'Content-Type': 'multipart/form-data', + } + : {}, + url, + data, + }) + ); + }; + } + + Axios.prototype[method] = generateHTTPMethod(); + + // QUERY is a safe/idempotent read method; multipart form bodies don't fit + // its semantics, so no queryForm shorthand is generated. + if (method !== 'query') { + Axios.prototype[method + 'Form'] = generateHTTPMethod(true); + } +}); + +export default Axios; diff --git a/node_modules/axios/lib/core/AxiosError.js b/node_modules/axios/lib/core/AxiosError.js new file mode 100644 index 0000000..545a39e --- /dev/null +++ b/node_modules/axios/lib/core/AxiosError.js @@ -0,0 +1,278 @@ +'use strict'; + +import utils from '../utils.js'; +import AxiosHeaders from './AxiosHeaders.js'; + +export const REDACTED = '[REDACTED ****]'; + +function hasOwnOrPrototypeToJSON(source) { + if (utils.hasOwnProp(source, 'toJSON')) { + return true; + } + + let prototype = Object.getPrototypeOf(source); + + while (prototype && prototype !== Object.prototype) { + if (utils.hasOwnProp(prototype, 'toJSON')) { + return true; + } + + prototype = Object.getPrototypeOf(prototype); + } + + return false; +} + +// Build a plain-object snapshot of `config` and replace the value of any key +// (case-insensitive) listed in `redactKeys` with REDACTED. Walks through arrays +// and AxiosHeaders, and short-circuits on circular references. +function redactConfig(config, redactKeys) { + const lowerKeys = new Set(redactKeys.map((k) => String(k).toLowerCase())); + const seen = []; + + const visit = (source) => { + if (source === null || typeof source !== 'object') return source; + if (utils.isBuffer(source)) return source; + if (seen.indexOf(source) !== -1) return undefined; + + if (source instanceof AxiosHeaders) { + source = source.toJSON(); + } + + seen.push(source); + + let result; + if (utils.isArray(source)) { + result = []; + source.forEach((v, i) => { + const reducedValue = visit(v); + if (!utils.isUndefined(reducedValue)) { + result[i] = reducedValue; + } + }); + } else { + if (!utils.isPlainObject(source) && hasOwnOrPrototypeToJSON(source)) { + seen.pop(); + return source; + } + + result = Object.create(null); + for (const [key, value] of Object.entries(source)) { + const reducedValue = lowerKeys.has(key.toLowerCase()) ? REDACTED : visit(value); + if (!utils.isUndefined(reducedValue)) { + result[key] = reducedValue; + } + } + } + + seen.pop(); + return result; + }; + + return visit(config); +} + +function stringifySafely(value) { + try { + return String(value); + } catch (err) { + return ''; + } +} + +function aggregateErrorMessage(error) { + const message = error.errors + .map((entry) => { + try { + return entry && entry.message ? stringifySafely(entry.message) : stringifySafely(entry); + } catch (err) { + return ''; + } + }) + .filter(Boolean) + .join('; '); + + return message || error.name || 'AggregateError'; +} + +// Shared with `Axios.prototype.request`, which splices the reconstructed +// caller frames in ahead of this marker. +export const CAUSED_BY_SEPARATOR = '\nCaused by: '; +const $causeStack = Symbol('causeStack'); + +// Match the section we appended, not marker-like text in an error message or +// a replacement stack supplied by the caller. Do not re-read the cause's stack. +export function getCauseStackIndex(error, stack) { + const causeStack = utils.hasOwnProp(error, $causeStack) && error[$causeStack]; + + return causeStack && stack.endsWith(causeStack) ? stack.length - causeStack.length : -1; +} + +/** + * Append the stack of a wrapped error to `target.stack`. + * + * `cause` already exposes the original error for tooling that walks the standard + * cause chain, but many error reporters read `stack` and nothing else. Inlining + * the wrapped stack there means those reporters surface the underlying failure + * instead of the axios frames that normalized it (see #6670). + * + * Every read is defensive: a custom `Error.prepareStackTrace` hook, a runtime + * without stack support, or a replaced `stack` property can leave the value + * missing, non-string, or read-only, and normalizing an error must not throw + * because of that. + * + * @param {Error} target The AxiosError being built. + * @param {Error} source The error being wrapped. + * + * @returns {void} + */ +function appendCauseStack(target, source) { + try { + const sourceStack = source && source.stack; + + if (typeof sourceStack !== 'string' || !sourceStack) { + return; + } + + const targetStack = target.stack; + + if (typeof targetStack !== 'string' || !targetStack) { + return; + } + + // Each call to `from()` creates a fresh target. Re-wrapping includes the + // previous stack verbatim, adding one cause section per wrap. + const causeStack = CAUSED_BY_SEPARATOR + sourceStack; + target.stack = targetStack + causeStack; + Object.defineProperty(target, $causeStack, { __proto__: null, value: causeStack }); + } catch (e) { + // Ignore failures from custom stack hooks or un-writable stack properties. + } +} + +class AxiosError extends Error { + static from(error, code, config, request, response, customProps) { + // `AggregateError` (thrown by Node on dual-stack/Happy-Eyeballs connection + // failures) has an empty `message`; its detail lives in `errors[]`. Without + // this, the wrapped error surfaces with a blank message (see #6721). + let message = error.message; + if (!message && utils.isArray(error.errors) && error.errors.length) { + message = aggregateErrorMessage(error); + } + + const axiosError = new AxiosError(message, code || error.code, config, request, response); + // Match native `Error` `cause` semantics: non-enumerable. The wrapped + // error often carries circular internals (sockets, requests, agents), so + // an enumerable `cause` makes structured loggers (pino/winston) and any + // own-property walk throw "Converting circular structure to JSON". + // Regression from #6982; see #7205. `__proto__: null` mirrors the + // `message` descriptor below (prototype-pollution-safe descriptor). + Object.defineProperty(axiosError, 'cause', { + __proto__: null, + value: error, + writable: true, + enumerable: false, + configurable: true, + }); + axiosError.name = error.name; + + // Inline the wrapped stack for reporters that read only `stack`; the `cause` + // property above already covers cause-aware tooling. + appendCauseStack(axiosError, error); + + // Preserve status from the original error if not already set from response + if (error.status != null && axiosError.status == null) { + axiosError.status = error.status; + } + + customProps && Object.assign(axiosError, customProps); + return axiosError; + } + + /** + * Create an Error with the specified message, config, error code, request and response. + * + * @param {string} message The error message. + * @param {string} [code] The error code (for example, 'ECONNABORTED'). + * @param {Object} [config] The config. + * @param {Object} [request] The request. + * @param {Object} [response] The response. + * + * @returns {Error} The created error. + */ + constructor(message, code, config, request, response) { + super(message); + + // Make message enumerable to maintain backward compatibility + // The native Error constructor sets message as non-enumerable, + // but axios < v1.13.3 had it as enumerable + Object.defineProperty(this, 'message', { + // Null-proto descriptor so a polluted Object.prototype.get cannot turn + // this data descriptor into an accessor descriptor on the way in. + __proto__: null, + value: message, + enumerable: true, + writable: true, + configurable: true, + }); + + this.name = 'AxiosError'; + this.isAxiosError = true; + code && (this.code = code); + config && (this.config = config); + request && (this.request = request); + if (response) { + this.response = response; + this.status = response.status; + } + } + + toJSON() { + // Opt-in redaction: when the request config carries a `redact` array, the + // value of any matching key (case-insensitive, at any depth) is replaced + // with REDACTED in the serialized snapshot. Undefined or empty leaves the + // existing serialization behavior unchanged. + const config = this.config; + const redactKeys = config && utils.hasOwnProp(config, 'redact') ? config.redact : undefined; + const serializedConfig = + utils.isArray(redactKeys) && redactKeys.length > 0 + ? redactConfig(config, redactKeys) + : utils.toJSONObject(config); + + return { + // Standard + message: this.message, + name: this.name, + // Microsoft + description: this.description, + number: this.number, + // Mozilla + fileName: this.fileName, + lineNumber: this.lineNumber, + columnNumber: this.columnNumber, + stack: this.stack, + // Axios + config: serializedConfig, + code: this.code, + status: this.status, + }; + } +} + +// This can be changed to static properties as soon as the parser options in .eslint.cjs are updated. +AxiosError.ERR_BAD_OPTION_VALUE = 'ERR_BAD_OPTION_VALUE'; +AxiosError.ERR_BAD_OPTION = 'ERR_BAD_OPTION'; +AxiosError.ECONNABORTED = 'ECONNABORTED'; +AxiosError.ETIMEDOUT = 'ETIMEDOUT'; +AxiosError.ECONNREFUSED = 'ECONNREFUSED'; +AxiosError.ERR_NETWORK = 'ERR_NETWORK'; +AxiosError.ERR_FR_TOO_MANY_REDIRECTS = 'ERR_FR_TOO_MANY_REDIRECTS'; +AxiosError.ERR_DEPRECATED = 'ERR_DEPRECATED'; +AxiosError.ERR_BAD_RESPONSE = 'ERR_BAD_RESPONSE'; +AxiosError.ERR_BAD_REQUEST = 'ERR_BAD_REQUEST'; +AxiosError.ERR_CANCELED = 'ERR_CANCELED'; +AxiosError.ERR_NOT_SUPPORT = 'ERR_NOT_SUPPORT'; +AxiosError.ERR_INVALID_URL = 'ERR_INVALID_URL'; +AxiosError.ERR_FORM_DATA_DEPTH_EXCEEDED = 'ERR_FORM_DATA_DEPTH_EXCEEDED'; + +export default AxiosError; diff --git a/node_modules/axios/lib/core/AxiosHeaders.js b/node_modules/axios/lib/core/AxiosHeaders.js new file mode 100644 index 0000000..529ca66 --- /dev/null +++ b/node_modules/axios/lib/core/AxiosHeaders.js @@ -0,0 +1,487 @@ +'use strict'; + +import utils from '../utils.js'; +import parseHeaders from '../helpers/parseHeaders.js'; +import { sanitizeHeaderValue } from '../helpers/sanitizeHeaderValue.js'; + +const $internals = Symbol('internals'); + +function normalizeHeader(header) { + return header && String(header).trim().toLowerCase(); +} + +function normalizeValue(value) { + if (value === false || value == null) { + return value; + } + + return utils.isArray(value) ? value.map(normalizeValue) : sanitizeHeaderValue(String(value)); +} + +function parseTokens(str) { + const tokens = Object.create(null); + const tokensRE = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g; + let match; + + while ((match = tokensRE.exec(str))) { + tokens[match[1]] = match[2]; + } + + return tokens; +} + +const parameterNameRE = /^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/; + +function trimOWS(value) { + let start = 0; + let end = value.length; + + while (start < end) { + const code = value.charCodeAt(start); + + if (code !== 0x09 && code !== 0x20) { + break; + } + + start += 1; + } + + while (end > start) { + const code = value.charCodeAt(end - 1); + + if (code !== 0x09 && code !== 0x20) { + break; + } + + end -= 1; + } + + return start === 0 && end === value.length ? value : value.slice(start, end); +} + +function decodeQuotedString(value) { + const last = value.length - 1; + + if (last < 1 || value.charCodeAt(0) !== 0x22 || value.charCodeAt(last) !== 0x22) { + return value; + } + + let decoded = ''; + + for (let i = 1; i < last; i++) { + const code = value.charCodeAt(i); + + if (code === 0x22) { + return value; + } + + if (code === 0x5c) { + i += 1; + + if (i >= last) { + return value; + } + } + + decoded += value[i]; + } + + return decoded; +} + +function parseParameters(value) { + const parameters = Object.create(null); + const str = String(value); + let start = 0; + let quoted = false; + let escaped = false; + + function parseParameter(end) { + const part = trimOWS(str.slice(start, end)); + const equals = part.indexOf('='); + + if (equals < 1) { + return; + } + + const name = trimOWS(part.slice(0, equals)); + + if (!parameterNameRE.test(name)) { + return; + } + + const normalizedName = name.toLowerCase(); + + if ( + normalizedName === '__proto__' || + normalizedName === 'constructor' || + normalizedName === 'prototype' + ) { + return; + } + + const parameterValue = trimOWS(part.slice(equals + 1)); + parameters[normalizedName] = decodeQuotedString(parameterValue); + } + + for (let i = 0; i < str.length; i++) { + const code = str.charCodeAt(i); + + if (quoted) { + if (escaped) { + escaped = false; + } else if (code === 0x5c) { + escaped = true; + } else if (code === 0x22) { + quoted = false; + } + } else if (code === 0x22) { + quoted = true; + } else if (code === 0x2c || code === 0x3b) { + parseParameter(i); + start = i + 1; + } + } + + parseParameter(str.length); + + return parameters; +} + +const isValidHeaderName = (str) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim()); + +// `__proto__` is a valid field name, and the one name the uppercase mapping at +// the bottom of this file cannot reach: it is inherited from Object.prototype +// instead of being declared on AxiosHeaders.prototype, so `self.__proto__ = v` +// runs the inherited setter. That silently discards the header, and an array +// value replaces the instance prototype, taking every method with it. +// Store it under the same kind of case variant that mapping uses for `set` and +// `constructor`. Header lookup is caseless, so it reads back under either +// spelling, and no own `__proto__` slot is ever created for a later +// `Object.assign` to copy onto a plain object through the same setter. +const PROTO_HEADER_SLOT = '__Proto__'; + +const headerSlot = (name) => (name === '__proto__' ? PROTO_HEADER_SLOT : name); + +function matchHeaderValue(context, value, header, filter, isHeaderNameFilter) { + if (utils.isFunction(filter)) { + return filter.call(context, value, header); + } + + if (isHeaderNameFilter) { + value = header; + } + + if (!utils.isString(value)) return; + + if (utils.isString(filter)) { + return value.indexOf(filter) !== -1; + } + + if (utils.isRegExp(filter)) { + return filter.test(value); + } +} + +function formatHeader(header) { + return header + .trim() + .toLowerCase() + .replace(/([a-z\d])(\w*)/g, (w, char, str) => { + return char.toUpperCase() + str; + }); +} + +function buildAccessors(obj, header) { + const accessorName = utils.toCamelCase(' ' + header); + + ['get', 'set', 'has'].forEach((methodName) => { + Object.defineProperty(obj, methodName + accessorName, { + // Null-proto descriptor so a polluted Object.prototype.get cannot turn + // this data descriptor into an accessor descriptor on the way in. + __proto__: null, + value: function (arg1, arg2, arg3) { + return this[methodName].call(this, header, arg1, arg2, arg3); + }, + configurable: true, + }); + }); +} + +class AxiosHeaders { + constructor(headers) { + headers && this.set(headers); + } + + set(header, valueOrRewrite, rewrite) { + const self = this; + + function setHeader(_value, _header, _rewrite) { + const lHeader = normalizeHeader(_header); + + if (!lHeader) { + return; + } + + const key = utils.findKey(self, lHeader); + + if ( + !key || + self[key] === undefined || + _rewrite === true || + (_rewrite === undefined && self[key] !== false) + ) { + self[headerSlot(key || _header)] = normalizeValue(_value); + } + } + + const setHeaders = (headers, _rewrite) => + utils.forEach(headers, (_value, _header) => setHeader(_value, _header, _rewrite)); + + if (utils.isPlainObject(header) || header instanceof this.constructor) { + setHeaders(header, valueOrRewrite); + } else if (utils.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) { + setHeaders(parseHeaders(header), valueOrRewrite); + } else if (utils.isObject(header) && utils.isSafeIterable(header)) { + let obj = Object.create(null), + dest, + key; + for (const entry of header) { + if (!utils.isArray(entry)) { + throw new TypeError('Object iterator must return a key-value pair'); + } + + key = entry[0]; + + if (utils.hasOwnProp(obj, key)) { + dest = obj[key]; + obj[key] = utils.isArray(dest) ? [...dest, entry[1]] : [dest, entry[1]]; + } else { + obj[key] = entry[1]; + } + } + + setHeaders(obj, valueOrRewrite); + } else { + header != null && setHeader(valueOrRewrite, header, rewrite); + } + + return this; + } + + get(header, parser) { + header = normalizeHeader(header); + + if (header) { + const key = utils.findKey(this, header); + + if (key) { + const value = this[key]; + + if (!parser) { + return value; + } + + if (parser === true) { + return parseTokens(value); + } + + if (utils.isFunction(parser)) { + return parser.call(this, value, key); + } + + if (utils.isRegExp(parser)) { + return parser.exec(value); + } + + throw new TypeError('parser must be boolean|regexp|function'); + } + } + } + + has(header, matcher) { + header = normalizeHeader(header); + + if (header) { + const key = utils.findKey(this, header); + + return !!( + key && + this[key] !== undefined && + (!matcher || matchHeaderValue(this, this[key], key, matcher)) + ); + } + + return false; + } + + delete(header, matcher) { + const self = this; + let deleted = false; + + function deleteHeader(_header) { + _header = normalizeHeader(_header); + + if (_header) { + const key = utils.findKey(self, _header); + + if (key && (!matcher || matchHeaderValue(self, self[key], key, matcher))) { + delete self[key]; + + deleted = true; + } + } + } + + if (utils.isArray(header)) { + header.forEach(deleteHeader); + } else { + deleteHeader(header); + } + + return deleted; + } + + clear(matcher) { + const keys = Object.keys(this); + let i = keys.length; + let deleted = false; + + while (i--) { + const key = keys[i]; + if (!matcher || matchHeaderValue(this, this[key], key, matcher, true)) { + delete this[key]; + deleted = true; + } + } + + return deleted; + } + + normalize(format) { + const self = this; + const headers = Object.create(null); + + utils.forEach(this, (value, header) => { + const key = utils.findKey(headers, header); + + if (key) { + self[key] = normalizeValue(value); + delete self[header]; + return; + } + + const normalized = headerSlot(format ? formatHeader(header) : String(header).trim()); + + if (normalized !== header) { + delete self[header]; + } + + self[normalized] = normalizeValue(value); + + headers[normalized] = true; + }); + + return this; + } + + concat(...targets) { + return this.constructor.concat(this, ...targets); + } + + toJSON(asStrings) { + const obj = Object.create(null); + + utils.forEach(this, (value, header) => { + value != null && + value !== false && + (obj[header] = asStrings && utils.isArray(value) ? value.join(', ') : value); + }); + + return obj; + } + + [Symbol.iterator]() { + return Object.entries(this.toJSON())[Symbol.iterator](); + } + + toString() { + return Object.entries(this.toJSON()) + .map(([header, value]) => header + ': ' + value) + .join('\n'); + } + + getSetCookie() { + const value = this.get('set-cookie'); + return utils.isArray(value) ? value : value == null || value === false ? [] : [value]; + } + + get [Symbol.toStringTag]() { + return 'AxiosHeaders'; + } + + static from(thing) { + return thing instanceof this ? thing : new this(thing); + } + + static parseParameters(value) { + return parseParameters(value); + } + + static concat(first, ...targets) { + const computed = new this(first); + + targets.forEach((target) => computed.set(target)); + + return computed; + } + + static accessor(header) { + const internals = + (this[$internals] = + this[$internals] = + { + accessors: {}, + }); + + const accessors = internals.accessors; + const prototype = this.prototype; + + function defineAccessor(_header) { + const lHeader = normalizeHeader(_header); + + if (!accessors[lHeader]) { + buildAccessors(prototype, _header); + accessors[lHeader] = true; + } + } + + utils.isArray(header) ? header.forEach(defineAccessor) : defineAccessor(header); + + return this; + } +} + +AxiosHeaders.accessor([ + 'Content-Type', + 'Content-Length', + 'Accept', + 'Accept-Encoding', + 'User-Agent', + 'Authorization', +]); + +// reserved names hotfix +utils.reduceDescriptors(AxiosHeaders.prototype, ({ value }, key) => { + let mapped = key[0].toUpperCase() + key.slice(1); // map `set` => `Set` + return { + get: () => value, + set(headerValue) { + this[mapped] = headerValue; + }, + }; +}); + +utils.freezeMethods(AxiosHeaders); + +export default AxiosHeaders; diff --git a/node_modules/axios/lib/core/InterceptorManager.js b/node_modules/axios/lib/core/InterceptorManager.js new file mode 100644 index 0000000..061d50d --- /dev/null +++ b/node_modules/axios/lib/core/InterceptorManager.js @@ -0,0 +1,182 @@ +'use strict'; + +import utils from '../utils.js'; + +const $internals = Symbol('internals'); + +// `handlers` is public and may be replaced with a nullish value by user code; +// `clear()` has always tolerated that. Treat it as an empty stack rather than +// dereferencing it. +function countHandlers(handlers) { + return handlers ? handlers.length : 0; +} + +function trimHandlers(handlers) { + if (!handlers) { + return; + } + + while (handlers.length && handlers[handlers.length - 1] === null) { + handlers.pop(); + } +} + +// Preserve the array-key coercion used before IDs were stored in a Map, without +// treating null, empty strings, or noncanonical numeric strings as ID zero. +function normalizeHandlerId(id) { + if (typeof id === 'string' && id !== '' && String(Number(id)) === id) { + return Number(id); + } + + return id; +} + +function syncHandlerEntries(manager, internals) { + const handlers = manager.handlers; + const length = countHandlers(handlers); + + if (handlers !== internals.handlersRef) { + internals.handlersRef = handlers; + internals.handlerEntries.clear(); + } else if (length !== internals.handlersLength) { + if (!length) { + internals.handlerEntries.clear(); + } else { + internals.handlerEntries.forEach(function removeStaleEntry(entry, id) { + if (handlers[entry.index] !== entry.handler) { + internals.handlerEntries.delete(id); + } + }); + } + } + + internals.handlersLength = length; +} + +class InterceptorManager { + constructor() { + this.handlers = []; + this[$internals] = { + handlersRef: this.handlers, + handlersLength: this.handlers.length, + handlerEntries: new Map(), + iterationDepth: 0, + nextId: 0, + }; + } + + /** + * Add a new interceptor to the stack + * + * @param {Function} fulfilled The function to handle `then` for a `Promise` + * @param {Function} rejected The function to handle `reject` for a `Promise` + * @param {Object} options The options for the interceptor, synchronous and runWhen + * + * @return {Number} An ID used to remove interceptor later + */ + use(fulfilled, rejected, options) { + const handler = { + fulfilled, + rejected, + synchronous: options ? options.synchronous : false, + runWhen: options ? options.runWhen : null, + }; + const internals = this[$internals]; + + if (this.handlers == null) { + this.handlers = []; + } + + syncHandlerEntries(this, internals); + + const id = internals.nextId++; + + this.handlers.push(handler); + internals.handlerEntries.set(id, { + handler, + index: this.handlers.length - 1, + }); + internals.handlersLength = this.handlers.length; + + return id; + } + + /** + * Remove an interceptor from the stack + * + * @param {Number} id The ID that was returned by `use` + * + * @returns {void} + */ + eject(id) { + const internals = this[$internals]; + + syncHandlerEntries(this, internals); + + const handlerId = normalizeHandlerId(id); + const entry = internals.handlerEntries.get(handlerId); + + if (entry) { + internals.handlerEntries.delete(handlerId); + + // Ignore IDs invalidated by clear or direct replacement of handlers. + if (this.handlers[entry.index] !== entry.handler) { + return; + } + + this.handlers[entry.index] = null; + + // Do not reuse an index while forEach is walking its length snapshot. + if (!internals.iterationDepth) { + trimHandlers(this.handlers); + internals.handlersLength = this.handlers.length; + } + } + } + + /** + * Clear all interceptors from the stack + * + * @returns {void} + */ + clear() { + if (this.handlers) { + this.handlers = []; + syncHandlerEntries(this, this[$internals]); + } + } + + /** + * Iterate over all the registered interceptors + * + * This method is particularly useful for skipping over any + * interceptors that may have become `null` calling `eject`. + * + * @param {Function} fn The function to call for each interceptor + * + * @returns {void} + */ + forEach(fn) { + const internals = this[$internals]; + + syncHandlerEntries(this, internals); + + internals.iterationDepth++; + + try { + utils.forEach(this.handlers, function forEachHandler(h) { + if (h !== null) { + fn(h); + } + }); + } finally { + if (!--internals.iterationDepth) { + syncHandlerEntries(this, internals); + trimHandlers(this.handlers); + internals.handlersLength = countHandlers(this.handlers); + } + } + } +} + +export default InterceptorManager; diff --git a/node_modules/axios/lib/core/README.md b/node_modules/axios/lib/core/README.md new file mode 100644 index 0000000..84559ce --- /dev/null +++ b/node_modules/axios/lib/core/README.md @@ -0,0 +1,8 @@ +# axios // core + +The modules found in `core/` should be modules that are specific to the domain logic of axios. These modules would most likely not make sense to be consumed outside of the axios module, as their logic is too specific. Some examples of core modules are: + +- Dispatching requests + - Requests sent via `adapters/` (see lib/adapters/README.md) +- Managing interceptors +- Handling config diff --git a/node_modules/axios/lib/core/assertParamsAcyclic.js b/node_modules/axios/lib/core/assertParamsAcyclic.js new file mode 100644 index 0000000..5093289 --- /dev/null +++ b/node_modules/axios/lib/core/assertParamsAcyclic.js @@ -0,0 +1,49 @@ +'use strict'; + +import utils from '../utils.js'; +import AxiosError from './AxiosError.js'; + +export default function assertParamsAcyclic(params) { + const pending = [{ value: params }]; + const active = new WeakSet(); + const visited = new WeakSet(); + + while (pending.length) { + const { value, done } = pending.pop(); + if (!utils.isPlainObject(value) && !utils.isArray(value)) continue; + if (done) { + active.delete(value); + continue; + } + if (active.has(value)) { + throw new AxiosError( + 'Circular reference detected in params', + AxiosError.ERR_BAD_OPTION_VALUE + ); + } + if (visited.has(value)) continue; + visited.add(value); + active.add(value); + pending.push({ value, done: true }); + + const keys = Object.keys(value); + if (Object.getOwnPropertySymbols && Object.getOwnPropertyDescriptor) { + Object.getOwnPropertySymbols(value).forEach((key) => { + const descriptor = Object.getOwnPropertyDescriptor(value, key); + if (descriptor && descriptor.enumerable) keys.push(key); + }); + } + // Shallow array elements retain fields filtered during plain-object merges. + // Inspect reserved data properties without evaluating their accessors. + keys.forEach((key) => { + if (key === '__proto__' || key === 'constructor' || key === 'prototype') { + const descriptor = Object.getOwnPropertyDescriptor(value, key); + if (descriptor && utils.hasOwnProp(descriptor, 'value')) { + pending.push({ value: descriptor.value }); + } + } else { + pending.push({ value: value[key] }); + } + }); + } +} diff --git a/node_modules/axios/lib/core/buildFullPath.js b/node_modules/axios/lib/core/buildFullPath.js new file mode 100644 index 0000000..6a962d4 --- /dev/null +++ b/node_modules/axios/lib/core/buildFullPath.js @@ -0,0 +1,76 @@ +'use strict'; + +import AxiosError, { REDACTED } from './AxiosError.js'; +import isAbsoluteURL from '../helpers/isAbsoluteURL.js'; +import combineURLs from '../helpers/combineURLs.js'; +import normalizeURLForProtocolCheck from '../helpers/normalizeURLForProtocolCheck.js'; + +const malformedHttpProtocol = /^https?:(?!\/\/)/i; + +// Redact the parts of a URL that can carry secrets before it is embedded in an +// error message. AxiosError.toJSON() serializes `message` verbatim and errors +// are commonly logged, while the opt-in `config.redact` model only cleans +// config keys — it cannot reach the message. Redact only the genuinely +// sensitive substrings — userinfo (credentials), query parameter values and +// fragment contents — with the same REDACTED marker the config redaction uses, +// while keeping the scheme, host, path and parameter names so the offending +// request stays accurately identifiable. +function redactFragment(fragment) { + if (!fragment) { + return fragment; + } + + return fragment.replace(/(^|&)([^=&]*=)?[^&]+/g, (match, separator, parameterName = '') => { + return `${separator}${parameterName}${REDACTED}`; + }); +} + +function redactSensitiveURLParts(url) { + const redactedURL = url.replace(/^(https?:\/{0,2})[^/?#]*@/i, `$1${REDACTED}@`); + const fragmentIndex = redactedURL.indexOf('#'); + const urlWithoutFragment = + fragmentIndex === -1 ? redactedURL : redactedURL.slice(0, fragmentIndex); + const redactedURLWithoutFragment = urlWithoutFragment.replace( + /([?&][^=&#]*=)[^&#]*/g, + `$1${REDACTED}` + ); + + if (fragmentIndex === -1) { + return redactedURLWithoutFragment; + } + + return `${redactedURLWithoutFragment}#${redactFragment(redactedURL.slice(fragmentIndex + 1))}`; +} + +function assertValidHttpProtocolURL(url, config) { + if (typeof url === 'string') { + const normalizedURL = normalizeURLForProtocolCheck(url); + if (malformedHttpProtocol.test(normalizedURL)) { + throw new AxiosError( + `Invalid URL ${JSON.stringify(redactSensitiveURLParts(normalizedURL))}: missing "//" after protocol`, + AxiosError.ERR_INVALID_URL, + config + ); + } + } +} + +/** + * Creates a new URL by combining the baseURL with the requestedURL, + * only when the requestedURL is not already an absolute URL. + * If the requestURL is absolute, this function returns the requestedURL untouched. + * + * @param {string} baseURL The base URL + * @param {string} requestedURL Absolute or relative URL to combine + * + * @returns {string} The combined full path + */ +export default function buildFullPath(baseURL, requestedURL, allowAbsoluteUrls, config) { + assertValidHttpProtocolURL(requestedURL, config); + let isRelativeUrl = !isAbsoluteURL(requestedURL); + if (baseURL && (isRelativeUrl || allowAbsoluteUrls === false)) { + assertValidHttpProtocolURL(baseURL, config); + return combineURLs(baseURL, requestedURL); + } + return requestedURL; +} diff --git a/node_modules/axios/lib/core/createMultipartBody.js b/node_modules/axios/lib/core/createMultipartBody.js new file mode 100644 index 0000000..27d90ff --- /dev/null +++ b/node_modules/axios/lib/core/createMultipartBody.js @@ -0,0 +1,37 @@ +import utils from '../utils.js'; +import platform from '../platform/index.js'; +import AxiosError from './AxiosError.js'; +import formDataToBlob, { FormDataError } from '../helpers/formDataToBlob.js'; + +export default function createMultipartBody(form, Blob, limit, limitError, boundary) { + // Report missing Blob support before trying to select a random source. + if (!utils.isFunction(Blob)) { + throw new AxiosError('Blob is not supported', AxiosError.ERR_NOT_SUPPORT); + } + + if (boundary === undefined) { + if (utils.isFunction(platform.generateString)) { + boundary = 'axios-' + platform.generateString(36, '0123456789abcdef'); + } else { + const crypto = utils.global.crypto; + if (!crypto || !utils.isFunction(crypto.getRandomValues)) { + throw new AxiosError('Random byte generation is not supported', AxiosError.ERR_NOT_SUPPORT); + } + const random = new Uint8Array(18); + crypto.getRandomValues(random); + boundary = + 'axios-' + Array.from(random, (value) => ('0' + value.toString(16)).slice(-2)).join(''); + } + } + + try { + return formDataToBlob(form, Blob, limit, limitError, boundary); + } catch (error) { + if (error instanceof FormDataError) { + const code = + error.reason === 'boundary' ? AxiosError.ERR_BAD_OPTION_VALUE : AxiosError.ERR_BAD_REQUEST; + throw new AxiosError(error.message, code); + } + throw error; + } +} diff --git a/node_modules/axios/lib/core/dispatchRequest.js b/node_modules/axios/lib/core/dispatchRequest.js new file mode 100644 index 0000000..a0a3114 --- /dev/null +++ b/node_modules/axios/lib/core/dispatchRequest.js @@ -0,0 +1,132 @@ +'use strict'; + +import transformData from './transformData.js'; +import isCancel from '../cancel/isCancel.js'; +import defaults from '../defaults/index.js'; +import CanceledError from '../cancel/CanceledError.js'; +import AxiosHeaders from '../core/AxiosHeaders.js'; +import adapters from '../adapters/adapters.js'; +import utils from '../utils.js'; + +/** + * Throws a `CanceledError` if cancellation has been requested. + * + * @param {Object} config The config that is to be used for the request + * + * @returns {void} + */ +function throwIfCancellationRequested(config) { + if (config.cancelToken) { + config.cancelToken.throwIfRequested(); + } + + if (config.signal && config.signal.aborted) { + throw new CanceledError(null, config); + } +} + +/** + * Resolve the clock used to time adapter execution. + * + * Prefers the monotonic `performance.now()` so wall-clock adjustments do not + * skew the measurement, and so frameworks that forbid reading the current + * time during prerendering (e.g. Next.js Cache Components) accept it. Falls + * back to `Date.now()` in runtimes without the High Resolution Time API. + * + * @returns {() => number} Millisecond clock + */ +function resolveClock() { + return typeof performance !== 'undefined' && utils.isFunction(performance.now) + ? () => performance.now() + : Date.now; +} + +/** + * Whole milliseconds elapsed since `start`, floored at zero. + * + * Rounded so the value stays an integer as with `Date.now()`. The fallback + * wall clock can move backwards mid-request, so the result is clamped. + * + * @param {() => number} now Clock returned by `resolveClock()` + * @param {number} start Timestamp read from `now` + * + * @returns {number} Non-negative elapsed milliseconds + */ +function elapsedSince(now, start) { + return Math.max(0, Math.round(now() - start)); +} + +/** + * Dispatch a request to the server using the configured adapter. + * + * @param {object} config The config that is to be used for the request + * + * @returns {Promise} The Promise to be fulfilled + */ +export default function dispatchRequest(_config) { + // Interceptors may replace the merged config with an ordinary object. Flatten + // it at the dispatch boundary so shared prototype members cannot become + // request behavior, while preserving intentional template/class members. + const config = utils.toSafeFlatObject(_config); + + throwIfCancellationRequested(config); + + config.headers = AxiosHeaders.from(utils.getSafeProp(config, 'headers')); + + // Transform request data + config.data = transformData.call(config, config.transformRequest); + + if (['post', 'put', 'patch'].indexOf(config.method) !== -1) { + config.headers.setContentType('application/x-www-form-urlencoded', false); + } + + const adapter = adapters.getAdapter(config.adapter || defaults.adapter, config); + + const now = resolveClock(); + const start = now(); + + return adapter(config).then( + function onAdapterResolution(response) { + throwIfCancellationRequested(config); + + response.duration = elapsedSince(now, start); + + // Expose the current response on config so that transformResponse can + // attach it to any AxiosError it throws (e.g. on JSON parse failure). + // We clean it up afterwards to avoid polluting the config object. + config.response = response; + try { + response.data = transformData.call(config, config.transformResponse, response); + } finally { + delete config.response; + } + + response.headers = AxiosHeaders.from(response.headers); + + return response; + }, + function onAdapterRejection(reason) { + if (!isCancel(reason)) { + throwIfCancellationRequested(config); + + // Transform response data + if (reason && reason.response) { + reason.response.duration = elapsedSince(now, start); + config.response = reason.response; + try { + reason.response.data = transformData.call( + config, + config.transformResponse, + reason.response + ); + } finally { + delete config.response; + } + reason.response.headers = AxiosHeaders.from(reason.response.headers); + } + } + + return Promise.reject(reason); + } + ); +} diff --git a/node_modules/axios/lib/core/mergeConfig.js b/node_modules/axios/lib/core/mergeConfig.js new file mode 100644 index 0000000..93645b1 --- /dev/null +++ b/node_modules/axios/lib/core/mergeConfig.js @@ -0,0 +1,237 @@ +'use strict'; + +import utils from '../utils.js'; +import AxiosHeaders from './AxiosHeaders.js'; +import assertParamsAcyclic from './assertParamsAcyclic.js'; + +const headersToObject = (thing) => (thing instanceof AxiosHeaders ? { ...thing } : thing); + +const ownEnumerableKeys = (thing) => { + if (Object.getOwnPropertySymbols && Object.getOwnPropertyDescriptor) { + return Object.keys(thing).concat( + Object.getOwnPropertySymbols(thing).filter((symbol) => { + const descriptor = Object.getOwnPropertyDescriptor(thing, symbol); + return descriptor && descriptor.enumerable; + }) + ); + } + return Object.keys(thing); +}; + +// Copy params without recursive merges so the serializer remains responsible +// for its depth policy. Only visit defaults that contribute to the result. +function mergeParams(a, b) { + const pending = []; + const copies = new WeakMap(); + const empty = {}; + + function copy(target, source) { + if (!utils.isPlainObject(source)) { + return utils.isArray(source) ? source.slice() : source; + } + + const base = utils.isPlainObject(target) ? target : empty; + let bases = copies.get(source); + if (!bases) { + bases = new WeakMap(); + copies.set(source, bases); + } + if (bases.has(base)) return bases.get(base); + + const result = {}; + bases.set(base, result); + pending.push({ base, source, result }); + return result; + } + + const result = utils.isUndefined(b) ? copy(undefined, a) : copy(a, b); + while (pending.length) { + const { base, source, result: target } = pending.pop(); + const baseKeys = new Set(ownEnumerableKeys(base)); + const sourceKeys = new Set(ownEnumerableKeys(source)); + const keys = new Set([...baseKeys, ...sourceKeys]); + + keys.forEach((key) => { + if (key === '__proto__' || key === 'constructor' || key === 'prototype') return; + const hasSource = sourceKeys.has(key); + const value = hasSource ? source[key] : undefined; + const previous = + (!hasSource || utils.isPlainObject(value)) && baseKeys.has(key) ? base[key] : undefined; + target[key] = hasSource ? copy(previous, value) : copy(undefined, previous); + }); + } + + assertParamsAcyclic(result); + return result; +} + +function getMergedValue(target, source, prop, caseless) { + if (utils.isPlainObject(target) && utils.isPlainObject(source)) { + return utils.merge.call({ caseless }, target, source); + } else if (utils.isPlainObject(source)) { + return utils.merge({}, source); + } else if (utils.isArray(source)) { + return source.slice(); + } + return source; +} + +function mergeDeepProperties(a, b, prop, caseless) { + if (!utils.isUndefined(b)) { + return getMergedValue(a, b, prop, caseless); + } else if (!utils.isUndefined(a)) { + return getMergedValue(undefined, a, prop, caseless); + } +} + +// eslint-disable-next-line consistent-return +function valueFromConfig2(a, b) { + if (!utils.isUndefined(b)) { + return getMergedValue(undefined, b); + } +} + +// eslint-disable-next-line consistent-return +function defaultToConfig2(a, b) { + if (!utils.isUndefined(b)) { + return getMergedValue(undefined, b); + } else if (!utils.isUndefined(a)) { + return getMergedValue(undefined, a); + } +} + +function getMergedTransitionalOption(config1, config2, prop) { + const transitional2 = utils.hasOwnProp(config2, 'transitional') + ? config2.transitional + : undefined; + + if (!utils.isUndefined(transitional2)) { + if (utils.isPlainObject(transitional2)) { + if (utils.hasOwnProp(transitional2, prop)) { + return transitional2[prop]; + } + } else { + return undefined; + } + } + + const transitional1 = utils.hasOwnProp(config1, 'transitional') + ? config1.transitional + : undefined; + + if (utils.isPlainObject(transitional1) && utils.hasOwnProp(transitional1, prop)) { + return transitional1[prop]; + } + + return undefined; +} + +// eslint-disable-next-line consistent-return +function mergeDirectKeys(a, b, prop, config1, config2) { + if (utils.hasOwnProp(config2, prop)) { + return getMergedValue(a, b); + } else if (utils.hasOwnProp(config1, prop)) { + return getMergedValue(undefined, a); + } +} + +function mergeHeaders(a, b, prop) { + return mergeDeepProperties(headersToObject(a), headersToObject(b), prop, true); +} + +// Null-proto, frozen descriptor so a polluted Object.prototype.get cannot turn +// this data descriptor into an accessor descriptor on the way in. +// defineProperty only reads it, so one shared instance serves every call. +const hasOwnPropertyDescriptor = Object.freeze({ + __proto__: null, + value: Object.prototype.hasOwnProperty, + enumerable: false, + writable: true, + configurable: true, +}); + +// The strategy table and the strategies above are stateless, so they are +// built once at module load instead of on every call: mergeConfig runs at +// most twice per request (once from a method alias, once from `_request`). +const mergeMap = { + url: valueFromConfig2, + method: valueFromConfig2, + data: valueFromConfig2, + baseURL: defaultToConfig2, + transformRequest: defaultToConfig2, + transformResponse: defaultToConfig2, + params: mergeParams, + paramsSerializer: defaultToConfig2, + timeout: defaultToConfig2, + timeoutErrorMessage: defaultToConfig2, + withCredentials: defaultToConfig2, + withXSRFToken: defaultToConfig2, + adapter: defaultToConfig2, + responseType: defaultToConfig2, + xsrfCookieName: defaultToConfig2, + xsrfHeaderName: defaultToConfig2, + onUploadProgress: defaultToConfig2, + onDownloadProgress: defaultToConfig2, + decompress: defaultToConfig2, + maxContentLength: defaultToConfig2, + maxBodyLength: defaultToConfig2, + beforeRedirect: defaultToConfig2, + transport: defaultToConfig2, + httpAgent: defaultToConfig2, + httpsAgent: defaultToConfig2, + cancelToken: defaultToConfig2, + socketPath: defaultToConfig2, + allowedSocketPaths: defaultToConfig2, + responseEncoding: defaultToConfig2, + validateStatus: mergeDirectKeys, + headers: mergeHeaders, +}; + +/** + * Config-specific merge-function which creates a new config-object + * by merging two configuration objects together. + * + * @param {Object} config1 + * @param {Object} config2 + * + * @returns {Object} New object resulting from merging config2 to config1 + */ +export default function mergeConfig(config1, config2) { + // eslint-disable-next-line no-param-reassign + config1 = config1 || {}; + config2 = config2 || {}; + + // Use a null-prototype object so that downstream reads such as `config.auth` + // or `config.baseURL` cannot inherit polluted values from Object.prototype. + // `hasOwnProperty` is restored as a non-enumerable own slot to preserve + // ergonomics for user code that relies on it. + const config = Object.create(null); + Object.defineProperty(config, 'hasOwnProperty', hasOwnPropertyDescriptor); + + const keys = ownEnumerableKeys({ ...config1, ...config2 }); + + for (let i = 0, len = keys.length; i < len; i++) { + const prop = keys[i]; + if (prop === '__proto__' || prop === 'constructor' || prop === 'prototype') continue; + const merge = utils.hasOwnProp(mergeMap, prop) ? mergeMap[prop] : mergeDeepProperties; + const a = utils.hasOwnProp(config1, prop) ? config1[prop] : undefined; + const b = utils.hasOwnProp(config2, prop) ? config2[prop] : undefined; + const configValue = + merge === mergeDirectKeys ? merge(a, b, prop, config1, config2) : merge(a, b, prop); + (utils.isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue); + } + + if ( + utils.hasOwnProp(config2, 'validateStatus') && + utils.isUndefined(config2.validateStatus) && + getMergedTransitionalOption(config1, config2, 'validateStatusUndefinedResolves') === false + ) { + if (utils.hasOwnProp(config1, 'validateStatus')) { + config.validateStatus = getMergedValue(undefined, config1.validateStatus); + } else { + delete config.validateStatus; + } + } + + return config; +} diff --git a/node_modules/axios/lib/core/methodList.js b/node_modules/axios/lib/core/methodList.js new file mode 100644 index 0000000..110c96c --- /dev/null +++ b/node_modules/axios/lib/core/methodList.js @@ -0,0 +1,17 @@ +'use strict'; + +const methodList = Object.freeze([ + 'get', + 'delete', + 'head', + 'options', + 'post', + 'put', + 'patch', + 'purge', + 'link', + 'unlink', + 'query', +]); + +export default methodList; diff --git a/node_modules/axios/lib/core/setFormDataHeaders.js b/node_modules/axios/lib/core/setFormDataHeaders.js new file mode 100644 index 0000000..45e5dd6 --- /dev/null +++ b/node_modules/axios/lib/core/setFormDataHeaders.js @@ -0,0 +1,27 @@ +'use strict'; + +const FORM_DATA_CONTENT_HEADERS = ['content-type', 'content-length']; + +/** + * Apply the headers generated by a FormData implementation to the request headers, + * honoring the `formDataHeaderPolicy` option: with 'content-only', copy only the + * content-* headers; otherwise merge all of them. + * + * @param {AxiosHeaders} headers - the request headers to mutate + * @param {Object | null | undefined} formHeaders - headers produced by the FormData implementation + * @param {String} [policy] - the resolved `formDataHeaderPolicy` config value + * + * @returns {void} + */ +export default function setFormDataHeaders(headers, formHeaders, policy) { + if (policy !== 'content-only') { + headers.set(formHeaders); + return; + } + + Object.entries(formHeaders || {}).forEach(([key, val]) => { + if (FORM_DATA_CONTENT_HEADERS.includes(key.toLowerCase())) { + headers.set(key, val); + } + }); +} diff --git a/node_modules/axios/lib/core/settle.js b/node_modules/axios/lib/core/settle.js new file mode 100644 index 0000000..782f571 --- /dev/null +++ b/node_modules/axios/lib/core/settle.js @@ -0,0 +1,27 @@ +'use strict'; + +import AxiosError from './AxiosError.js'; + +/** + * Resolve or reject a Promise based on response status. + * + * @param {Function} resolve A function that resolves the promise. + * @param {Function} reject A function that rejects the promise. + * @param {object} response The response. + * + * @returns {object} The response. + */ +export default function settle(resolve, reject, response) { + const validateStatus = response.config.validateStatus; + if (!response.status || !validateStatus || validateStatus(response.status)) { + resolve(response); + } else { + reject(new AxiosError( + 'Request failed with status code ' + response.status, + response.status >= 400 && response.status < 500 ? AxiosError.ERR_BAD_REQUEST : AxiosError.ERR_BAD_RESPONSE, + response.config, + response.request, + response + )); + } +} diff --git a/node_modules/axios/lib/core/transformData.js b/node_modules/axios/lib/core/transformData.js new file mode 100644 index 0000000..f22c474 --- /dev/null +++ b/node_modules/axios/lib/core/transformData.js @@ -0,0 +1,28 @@ +'use strict'; + +import utils from '../utils.js'; +import defaults from '../defaults/index.js'; +import AxiosHeaders from '../core/AxiosHeaders.js'; + +/** + * Transform the data for a request or a response + * + * @param {Array|Function} fns A single function or Array of functions + * @param {?Object} response The response object + * + * @returns {*} The resulting transformed data + */ +export default function transformData(fns, response) { + const config = this || defaults; + const context = response || config; + const headers = AxiosHeaders.from(context.headers); + let data = context.data; + + utils.forEach(fns, function transform(fn) { + data = fn.call(config, data, headers.normalize(), response ? response.status : undefined); + }); + + headers.normalize(); + + return data; +} diff --git a/node_modules/axios/lib/defaults/index.js b/node_modules/axios/lib/defaults/index.js new file mode 100644 index 0000000..1303c46 --- /dev/null +++ b/node_modules/axios/lib/defaults/index.js @@ -0,0 +1,178 @@ +'use strict'; + +import utils from '../utils.js'; +import AxiosError from '../core/AxiosError.js'; +import transitionalDefaults from './transitional.js'; +import toFormData from '../helpers/toFormData.js'; +import toURLEncodedForm from '../helpers/toURLEncodedForm.js'; +import platform from '../platform/index.js'; +import formDataToJSON from '../helpers/formDataToJSON.js'; +import methodList from '../core/methodList.js'; + +const own = (obj, key) => (obj != null && utils.hasOwnProp(obj, key) ? obj[key] : undefined); + +/** + * It takes a string, tries to parse it, and if it fails, it returns the stringified version + * of the input + * + * @param {any} rawValue - The value to be stringified. + * @param {Function} parser - A function that parses a string into a JavaScript object. + * @param {Function} encoder - A function that takes a value and returns a string. + * + * @returns {string} A stringified version of the rawValue. + */ +function stringifySafely(rawValue, parser, encoder) { + if (utils.isString(rawValue)) { + try { + (parser || JSON.parse)(rawValue); + return utils.trim(rawValue); + } catch (e) { + if (e.name !== 'SyntaxError') { + throw e; + } + } + } + + return (encoder || JSON.stringify)(rawValue); +} + +const defaults = { + transitional: transitionalDefaults, + + adapter: ['xhr', 'http', 'fetch'], + + transformRequest: [ + function transformRequest(data, headers) { + const contentType = headers.getContentType() || ''; + const hasJSONContentType = contentType.indexOf('application/json') > -1; + const isObjectPayload = utils.isObject(data); + + if (isObjectPayload && utils.isHTMLForm(data)) { + data = new FormData(data); + } + + const isFormData = utils.isFormData(data); + + if (isFormData) { + return hasJSONContentType ? JSON.stringify(formDataToJSON(data)) : data; + } + + if ( + utils.isArrayBuffer(data) || + utils.isBuffer(data) || + utils.isStream(data) || + utils.isFile(data) || + utils.isBlob(data) || + utils.isReadableStream(data) + ) { + return data; + } + if (utils.isArrayBufferView(data)) { + return data.buffer; + } + if (utils.isURLSearchParams(data)) { + headers.setContentType('application/x-www-form-urlencoded;charset=utf-8', false); + return data.toString(); + } + + let isFileList; + + if (isObjectPayload) { + const formSerializer = own(this, 'formSerializer'); + if (contentType.indexOf('application/x-www-form-urlencoded') > -1) { + return toURLEncodedForm(data, formSerializer).toString(); + } + + if ( + (isFileList = utils.isFileList(data)) || + contentType.indexOf('multipart/form-data') > -1 + ) { + const env = own(this, 'env'); + const _FormData = env && env.FormData; + + return toFormData( + isFileList ? { 'files[]': data } : data, + _FormData && new _FormData(), + formSerializer + ); + } + } + + if (isObjectPayload || hasJSONContentType) { + headers.setContentType('application/json', false); + return stringifySafely(data); + } + + return data; + }, + ], + + transformResponse: [ + function transformResponse(data) { + const transitional = own(this, 'transitional') || defaults.transitional; + const forcedJSONParsing = transitional && transitional.forcedJSONParsing; + const responseType = own(this, 'responseType'); + const JSONRequested = responseType === 'json'; + + if (utils.isResponse(data) || utils.isReadableStream(data)) { + return data; + } + + if ( + data && + utils.isString(data) && + ((forcedJSONParsing && !responseType) || JSONRequested) + ) { + const silentJSONParsing = transitional && transitional.silentJSONParsing; + const strictJSONParsing = !silentJSONParsing && JSONRequested; + + try { + return JSON.parse(data, own(this, 'parseReviver')); + } catch (e) { + if (strictJSONParsing) { + if (e.name === 'SyntaxError') { + throw AxiosError.from(e, AxiosError.ERR_BAD_RESPONSE, this, null, own(this, 'response')); + } + throw e; + } + } + } + + return data; + }, + ], + + /** + * A timeout in milliseconds to abort a request. If set to 0 (default) a + * timeout is not created. + */ + timeout: 0, + + xsrfCookieName: 'XSRF-TOKEN', + xsrfHeaderName: 'X-XSRF-TOKEN', + + maxContentLength: -1, + maxBodyLength: -1, + + env: { + FormData: platform.classes.FormData, + Blob: platform.classes.Blob, + }, + + validateStatus: function validateStatus(status) { + return status >= 200 && status < 300; + }, + + headers: { + common: { + Accept: 'application/json, text/plain, */*', + 'Content-Type': undefined, + }, + }, +}; + +utils.forEach(methodList, (method) => { + defaults.headers[method] = {}; +}); + +export default defaults; diff --git a/node_modules/axios/lib/defaults/transitional.js b/node_modules/axios/lib/defaults/transitional.js new file mode 100644 index 0000000..f2b6ca4 --- /dev/null +++ b/node_modules/axios/lib/defaults/transitional.js @@ -0,0 +1,11 @@ +'use strict'; + +export default { + silentJSONParsing: true, + forcedJSONParsing: true, + clarifyTimeoutError: false, + legacyInterceptorReqResOrdering: true, + advertiseZstdAcceptEncoding: false, + validateStatusUndefinedResolves: true, + encodeBasicAuthUsername: false, +}; diff --git a/node_modules/axios/lib/env/README.md b/node_modules/axios/lib/env/README.md new file mode 100644 index 0000000..b41baff --- /dev/null +++ b/node_modules/axios/lib/env/README.md @@ -0,0 +1,3 @@ +# axios // env + +The `data.js` file is updated automatically when the package version is upgrading. Please do not edit it manually. diff --git a/node_modules/axios/lib/env/classes/FormData.js b/node_modules/axios/lib/env/classes/FormData.js new file mode 100644 index 0000000..862adb9 --- /dev/null +++ b/node_modules/axios/lib/env/classes/FormData.js @@ -0,0 +1,2 @@ +import _FormData from 'form-data'; +export default typeof FormData !== 'undefined' ? FormData : _FormData; diff --git a/node_modules/axios/lib/env/data.js b/node_modules/axios/lib/env/data.js new file mode 100644 index 0000000..0094ada --- /dev/null +++ b/node_modules/axios/lib/env/data.js @@ -0,0 +1 @@ +export const VERSION = "1.21.1"; \ No newline at end of file diff --git a/node_modules/axios/lib/helpers/AxiosTransformStream.js b/node_modules/axios/lib/helpers/AxiosTransformStream.js new file mode 100644 index 0000000..a4e704f --- /dev/null +++ b/node_modules/axios/lib/helpers/AxiosTransformStream.js @@ -0,0 +1,165 @@ +'use strict'; + +import stream from 'stream'; +import utils from '../utils.js'; + +const kInternals = Symbol('internals'); + +class AxiosTransformStream extends stream.Transform { + constructor(options) { + options = utils.toFlatObject( + options, + { + maxRate: 0, + chunkSize: 64 * 1024, + minChunkSize: 100, + timeWindow: 500, + ticksRate: 2, + samplesCount: 15, + }, + null, + (prop, source) => { + return !utils.isUndefined(source[prop]); + } + ); + + super({ + readableHighWaterMark: options.chunkSize, + }); + + const internals = (this[kInternals] = { + timeWindow: options.timeWindow, + chunkSize: options.chunkSize, + maxRate: options.maxRate, + minChunkSize: options.minChunkSize, + bytesSeen: 0, + isCaptured: false, + notifiedBytesLoaded: 0, + ts: Date.now(), + bytes: 0, + onReadCallback: null, + }); + + this.on('newListener', (event) => { + if (event === 'progress') { + if (!internals.isCaptured) { + internals.isCaptured = true; + } + } + }); + } + + _read(size) { + const internals = this[kInternals]; + + if (internals.onReadCallback) { + internals.onReadCallback(); + } + + return super._read(size); + } + + _transform(chunk, encoding, callback) { + const internals = this[kInternals]; + const maxRate = internals.maxRate; + + const readableHighWaterMark = this.readableHighWaterMark; + + const timeWindow = internals.timeWindow; + + const divider = 1000 / timeWindow; + const bytesThreshold = maxRate / divider; + let minChunkSize = + internals.minChunkSize !== false + ? Math.max(internals.minChunkSize, bytesThreshold * 0.01) + : 0; + + if (maxRate) { + minChunkSize = Math.min(bytesThreshold, minChunkSize); + } + + const pushChunk = (_chunk, _callback) => { + const bytes = Buffer.byteLength(_chunk); + internals.bytesSeen += bytes; + internals.bytes += bytes; + + internals.isCaptured && this.emit('progress', internals.bytesSeen); + + if (this.push(_chunk)) { + process.nextTick(_callback); + } else { + internals.onReadCallback = () => { + internals.onReadCallback = null; + process.nextTick(_callback); + }; + } + }; + + const transformChunk = (_chunk, _callback) => { + if (this.destroyed) { + return _callback(); + } + const chunkSize = Buffer.byteLength(_chunk); + let chunkRemainder = null; + let maxChunkSize = readableHighWaterMark; + let bytesLeft; + let passed = 0; + + if (maxRate) { + const now = Date.now(); + + if (!internals.ts || (passed = now - internals.ts) >= timeWindow) { + internals.ts = now; + bytesLeft = bytesThreshold - internals.bytes; + internals.bytes = bytesLeft < 0 ? -bytesLeft : 0; + passed = 0; + } + + bytesLeft = bytesThreshold - internals.bytes; + } + + if (maxRate) { + if (bytesLeft <= 0) { + // next time window + return setTimeout(() => { + _callback(null, _chunk); + }, timeWindow - passed); + } + + if (bytesLeft < maxChunkSize) { + // A buffer boundary must consume at least one byte. Carry any + // fractional allowance forward in the next accounting window. + maxChunkSize = Math.max(1, Math.floor(bytesLeft)); + } + } + + if (maxChunkSize && chunkSize > maxChunkSize && chunkSize - maxChunkSize > minChunkSize) { + chunkRemainder = _chunk.subarray(maxChunkSize); + _chunk = _chunk.subarray(0, maxChunkSize); + } + + pushChunk( + _chunk, + chunkRemainder + ? () => { + process.nextTick(_callback, null, chunkRemainder); + } + : _callback + ); + }; + + transformChunk(chunk, function transformNextChunk(err, _chunk) { + if (err) { + return callback(err); + } + + if (_chunk) { + transformChunk(_chunk, transformNextChunk); + } else { + callback(null); + } + }); + } +} + +export default AxiosTransformStream; diff --git a/node_modules/axios/lib/helpers/AxiosURLSearchParams.js b/node_modules/axios/lib/helpers/AxiosURLSearchParams.js new file mode 100644 index 0000000..b77b680 --- /dev/null +++ b/node_modules/axios/lib/helpers/AxiosURLSearchParams.js @@ -0,0 +1,59 @@ +'use strict'; + +import toFormData from './toFormData.js'; + +/** + * It encodes a string by replacing all characters that are not in the unreserved set with + * their percent-encoded equivalents + * + * @param {string} str - The string to encode. + * + * @returns {string} The encoded string. + */ +function encode(str) { + const charMap = { + '!': '%21', + "'": '%27', + '(': '%28', + ')': '%29', + '~': '%7E', + '%20': '+', + }; + return encodeURIComponent(str).replace(/[!'()~]|%20/g, function replacer(match) { + return charMap[match]; + }); +} + +/** + * It takes a params object and converts it to a FormData object + * + * @param {Object} params - The parameters to be converted to a FormData object. + * @param {Object} options - The options object passed to the Axios constructor. + * + * @returns {void} + */ +function AxiosURLSearchParams(params, options) { + this._pairs = []; + + params && toFormData(params, this, options); +} + +const prototype = AxiosURLSearchParams.prototype; + +prototype.append = function append(name, value) { + this._pairs.push([name, value]); +}; + +prototype.toString = function toString(encoder) { + const _encode = encoder + ? (value) => encoder.call(this, value, encode) + : encode; + + return this._pairs + .map(function each(pair) { + return _encode(pair[0]) + '=' + _encode(pair[1]); + }, '') + .join('&'); +}; + +export default AxiosURLSearchParams; diff --git a/node_modules/axios/lib/helpers/Http2Sessions.js b/node_modules/axios/lib/helpers/Http2Sessions.js new file mode 100644 index 0000000..b8a353e --- /dev/null +++ b/node_modules/axios/lib/helpers/Http2Sessions.js @@ -0,0 +1,122 @@ +'use strict'; + +// Node-only: relies on the built-in `http2` module. Browser/react-native +// builds replace `lib/adapters/http.js` (the sole importer) with `lib/helpers/null.js` +// via the `browser` package.json field, so this module is never reached in +// those environments. Do not import it from any browser-reachable code path. + +import http2 from 'http2'; +import util from 'util'; + +class Http2Sessions { + constructor() { + this.sessions = Object.create(null); + } + + getSession(authority, options) { + options = Object.assign( + Object.create(null), + { + sessionTimeout: 1000, + }, + options + ); + + let authoritySessions = this.sessions[authority]; + + if (authoritySessions) { + let len = authoritySessions.length; + + for (let i = 0; i < len; i++) { + const [sessionHandle, sessionOptions] = authoritySessions[i]; + if ( + !sessionHandle.destroyed && + !sessionHandle.closed && + util.isDeepStrictEqual(sessionOptions, options) + ) { + return sessionHandle; + } + } + } + + const session = http2.connect(authority, options); + + let removed; + let timer; + + const removeSession = () => { + if (removed) { + return; + } + + removed = true; + + if (timer) { + clearTimeout(timer); + timer = null; + } + + let entries = authoritySessions, + len = entries.length, + i = len; + + while (i--) { + if (entries[i][0] === session) { + if (len === 1) { + delete this.sessions[authority]; + } else { + entries.splice(i, 1); + } + if (!session.closed) { + session.close(); + } + return; + } + } + }; + + const originalRequestFn = session.request; + + const { sessionTimeout } = options; + + if (sessionTimeout != null) { + let streamsCount = 0; + + session.request = function () { + const stream = originalRequestFn.apply(this, arguments); + + streamsCount++; + + if (timer) { + clearTimeout(timer); + timer = null; + } + + stream.once('close', () => { + if (!--streamsCount && !removed) { + timer = setTimeout(() => { + timer = null; + removeSession(); + }, sessionTimeout); + } + }); + + return stream; + }; + } + + session.once('close', removeSession); + session.once('error', removeSession); + session.once('goaway', removeSession); + + let entry = [session, options]; + + authoritySessions + ? authoritySessions.push(entry) + : (authoritySessions = this.sessions[authority] = [entry]); + + return session; + } +} + +export default Http2Sessions; diff --git a/node_modules/axios/lib/helpers/HttpStatusCode.js b/node_modules/axios/lib/helpers/HttpStatusCode.js new file mode 100644 index 0000000..f8f1387 --- /dev/null +++ b/node_modules/axios/lib/helpers/HttpStatusCode.js @@ -0,0 +1,88 @@ +const HttpStatusCode = { + 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, + /** + * @deprecated Use `ContentTooLarge` instead. + */ + PayloadTooLarge: 413, + ContentTooLarge: 413, + UriTooLong: 414, + UnsupportedMediaType: 415, + RangeNotSatisfiable: 416, + ExpectationFailed: 417, + ImATeapot: 418, + MisdirectedRequest: 421, + /** + * @deprecated Use `UnprocessableContent` instead. + */ + UnprocessableEntity: 422, + UnprocessableContent: 422, + Locked: 423, + FailedDependency: 424, + TooEarly: 425, + UpgradeRequired: 426, + PreconditionRequired: 428, + TooManyRequests: 429, + RequestHeaderFieldsTooLarge: 431, + UnavailableForLegalReasons: 451, + InternalServerError: 500, + NotImplemented: 501, + BadGateway: 502, + ServiceUnavailable: 503, + GatewayTimeout: 504, + HttpVersionNotSupported: 505, + VariantAlsoNegotiates: 506, + InsufficientStorage: 507, + LoopDetected: 508, + NotExtended: 510, + NetworkAuthenticationRequired: 511, + WebServerReturnsAnUnknownError: 520, + WebServerIsDown: 521, + ConnectionTimedOut: 522, + OriginIsUnreachable: 523, + TimeoutOccurred: 524, + SslHandshakeFailed: 525, + InvalidSslCertificate: 526, +}; + +Object.entries(HttpStatusCode).forEach(([key, value]) => { + if (HttpStatusCode[value] === undefined) { + HttpStatusCode[value] = key; + } +}); + +export default HttpStatusCode; diff --git a/node_modules/axios/lib/helpers/README.md b/node_modules/axios/lib/helpers/README.md new file mode 100644 index 0000000..4ae3419 --- /dev/null +++ b/node_modules/axios/lib/helpers/README.md @@ -0,0 +1,7 @@ +# axios // helpers + +The modules found in `helpers/` should be generic modules that are _not_ specific to the domain logic of axios. These modules could theoretically be published to npm on their own and consumed by other modules or apps. Some examples of generic modules are things like: + +- Browser polyfills +- Managing cookies +- Parsing HTTP headers diff --git a/node_modules/axios/lib/helpers/ZlibHeaderTransformStream.js b/node_modules/axios/lib/helpers/ZlibHeaderTransformStream.js new file mode 100644 index 0000000..c588ded --- /dev/null +++ b/node_modules/axios/lib/helpers/ZlibHeaderTransformStream.js @@ -0,0 +1,29 @@ +'use strict'; + +import stream from 'stream'; + +class ZlibHeaderTransformStream extends stream.Transform { + __transform(chunk, encoding, callback) { + this.push(chunk); + callback(); + } + + _transform(chunk, encoding, callback) { + if (chunk.length !== 0) { + this._transform = this.__transform; + + // Add Default Compression headers if no zlib headers are present + if (chunk[0] !== 120) { + // Hex: 78 + const header = Buffer.alloc(2); + header[0] = 120; // Hex: 78 + header[1] = 156; // Hex: 9C + this.push(header, encoding); + } + } + + this.__transform(chunk, encoding, callback); + } +} + +export default ZlibHeaderTransformStream; diff --git a/node_modules/axios/lib/helpers/bind.js b/node_modules/axios/lib/helpers/bind.js new file mode 100644 index 0000000..938da5c --- /dev/null +++ b/node_modules/axios/lib/helpers/bind.js @@ -0,0 +1,14 @@ +'use strict'; + +/** + * Create a bound version of a function with a specified `this` context + * + * @param {Function} fn - The function to bind + * @param {*} thisArg - The value to be passed as the `this` parameter + * @returns {Function} A new function that will call the original function with the specified `this` context + */ +export default function bind(fn, thisArg) { + return function wrap() { + return fn.apply(thisArg, arguments); + }; +} diff --git a/node_modules/axios/lib/helpers/buildURL.js b/node_modules/axios/lib/helpers/buildURL.js new file mode 100644 index 0000000..ba4f5f5 --- /dev/null +++ b/node_modules/axios/lib/helpers/buildURL.js @@ -0,0 +1,69 @@ +'use strict'; + +import utils from '../utils.js'; +import AxiosURLSearchParams from './AxiosURLSearchParams.js'; + +/** + * It replaces URL-encoded forms of `:`, `$`, `,`, and spaces with + * their plain counterparts (`:`, `$`, `,`, `+`). + * + * @param {string} val The value to be encoded. + * + * @returns {string} The encoded value. + */ +export function encode(val) { + return encodeURIComponent(val) + .replace(/%3A/gi, ':') + .replace(/%24/g, '$') + .replace(/%2C/gi, ',') + .replace(/%20/g, '+'); +} + +/** + * Build a URL by appending params to the end + * + * @param {string} url The base of the url (e.g., http://www.google.com) + * @param {object} [params] The params to be appended + * @param {?(object|Function)} options + * + * @returns {string} The formatted url + */ +export default function buildURL(url, params, options) { + if (!params) { + return url; + } + url = url || ''; + + const _options = utils.isFunction(options) + ? { + serialize: options, + } + : options; + + // Read serializer options pollution-safely: own properties and methods on a + // class/template prototype are honored, but values injected onto a polluted + // Object.prototype are ignored. + const _encode = utils.getSafeProp(_options, 'encode') || encode; + const serializeFn = utils.getSafeProp(_options, 'serialize'); + + let serializedParams; + + if (serializeFn) { + serializedParams = serializeFn(params, _options); + } else { + serializedParams = utils.isURLSearchParams(params) + ? params.toString() + : new AxiosURLSearchParams(params, _options).toString(_encode); + } + + if (serializedParams) { + const hashmarkIndex = url.indexOf('#'); + + if (hashmarkIndex !== -1) { + url = url.slice(0, hashmarkIndex); + } + url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams; + } + + return url; +} diff --git a/node_modules/axios/lib/helpers/callbackify.js b/node_modules/axios/lib/helpers/callbackify.js new file mode 100644 index 0000000..e8cea68 --- /dev/null +++ b/node_modules/axios/lib/helpers/callbackify.js @@ -0,0 +1,18 @@ +import utils from '../utils.js'; + +const callbackify = (fn, reducer) => { + return utils.isAsyncFn(fn) + ? function (...args) { + const cb = args.pop(); + fn.apply(this, args).then((value) => { + try { + reducer ? cb(null, ...reducer(value)) : cb(null, value); + } catch (err) { + cb(err); + } + }, cb); + } + : fn; +}; + +export default callbackify; diff --git a/node_modules/axios/lib/helpers/combineURLs.js b/node_modules/axios/lib/helpers/combineURLs.js new file mode 100644 index 0000000..8863435 --- /dev/null +++ b/node_modules/axios/lib/helpers/combineURLs.js @@ -0,0 +1,23 @@ +'use strict'; + +/** + * Creates a new URL by combining the specified URLs + * + * @param {string} baseURL The base URL + * @param {string} relativeURL The relative URL + * + * @returns {string} The combined URL + */ +export default function combineURLs(baseURL, relativeURL) { + if (!relativeURL) { + return baseURL; + } + + let end = baseURL.length; + + while (end > 0 && baseURL.charCodeAt(end - 1) === 47) { + end--; + } + + return baseURL.slice(0, end) + '/' + relativeURL.replace(/^\/+/, ''); +} diff --git a/node_modules/axios/lib/helpers/composeSignals.js b/node_modules/axios/lib/helpers/composeSignals.js new file mode 100644 index 0000000..cd6b0da --- /dev/null +++ b/node_modules/axios/lib/helpers/composeSignals.js @@ -0,0 +1,71 @@ +import CanceledError from '../cancel/CanceledError.js'; +import AxiosError from '../core/AxiosError.js'; +import utils from '../utils.js'; + +const composeSignals = (signals, timeout) => { + signals = signals ? signals.filter(Boolean) : []; + + if (!timeout && !signals.length) { + return; + } + + const controller = new AbortController(); + + let aborted = false; + + const onabort = function (reason) { + if (!aborted) { + aborted = true; + unsubscribe(); + const err = reason instanceof Error ? reason : this.reason; + controller.abort( + err instanceof AxiosError + ? err + : new CanceledError(err instanceof Error ? err.message : err) + ); + } + }; + + let timer = + timeout && + setTimeout(() => { + timer = null; + onabort(new AxiosError(`timeout of ${timeout}ms exceeded`, AxiosError.ETIMEDOUT)); + }, timeout); + + const unsubscribe = () => { + if (!signals) { + return; + } + timer && clearTimeout(timer); + timer = null; + signals.forEach((signal) => { + const unsubscribeSignal = utils.getSafeProp(signal, 'unsubscribe'); + utils.isFunction(unsubscribeSignal) + ? unsubscribeSignal.call(signal, onabort) + : signal.removeEventListener('abort', onabort); + }); + signals = null; + }; + + signals.forEach((signal) => { + if (aborted) { + return; + } + + if (signal.aborted) { + onabort.call(signal); + return; + } + + signal.addEventListener('abort', onabort, { once: true }); + }); + + const { signal } = controller; + + signal.unsubscribe = () => utils.asap(unsubscribe); + + return signal; +}; + +export default composeSignals; diff --git a/node_modules/axios/lib/helpers/cookies.js b/node_modules/axios/lib/helpers/cookies.js new file mode 100644 index 0000000..e29c287 --- /dev/null +++ b/node_modules/axios/lib/helpers/cookies.js @@ -0,0 +1,88 @@ +import utils from '../utils.js'; +import platform from '../platform/index.js'; + +const decodeCookieValue = (value) => { + try { + return decodeURIComponent(value); + } catch (e) { + return value; + } +}; + +export default platform.hasStandardBrowserEnv + ? // Standard browser envs support document.cookie + { + write(name, value, expires, path, domain, secure, sameSite) { + if (typeof document === 'undefined') return; + + const cookie = [`${name}=${encodeURIComponent(value)}`]; + + if (utils.isNumber(expires)) { + cookie.push(`expires=${new Date(expires).toUTCString()}`); + } + if (utils.isString(path)) { + cookie.push(`path=${path}`); + } + if (utils.isString(domain)) { + cookie.push(`domain=${domain}`); + } + if (secure === true) { + cookie.push('secure'); + } + if (utils.isString(sameSite)) { + cookie.push(`SameSite=${sameSite}`); + } + + document.cookie = cookie.join('; '); + }, + + read(name) { + if (typeof document === 'undefined') return null; + const cookieString = document.cookie; + if (!cookieString) return null; + // Match name=value by splitting on the semicolon separator instead of building a + // RegExp from `name` — interpolating an unescaped string into a RegExp would let + // metacharacters (e.g. `.+?` in an attacker-influenced cookie name) cause ReDoS or + // match the wrong cookie. Browsers may serialize cookie pairs as either ";" or + // "; ", so ignore optional whitespace before each cookie name. + const cookies = cookieString.split(';'); + for (let i = 0; i < cookies.length; i++) { + const cookie = cookies[i].replace(/^\s+/, ''); + const eq = cookie.indexOf('='); + if (eq !== -1 && cookie.slice(0, eq) === name) { + return decodeCookieValue(cookie.slice(eq + 1)); + } + } + return null; + }, + + async readAsync(name) { + try { + const store = typeof window !== 'undefined' && window.cookieStore; + if (store && utils.isFunction(store.get)) { + const cookie = await store.get(name); + // Both APIs expose stored bytes; preserve Axios's existing URI decoding. + return cookie ? decodeCookieValue(cookie.value) : null; + } + } catch (e) { + // Restricted or unavailable storage retains the synchronous fallback. + } + + return this.read(name); + }, + + remove(name) { + this.write(name, '', Date.now() - 86400000, '/'); + }, + } + : // Non-standard browser env (web workers, react-native) lack needed support. + { + write() {}, + read() { + return null; + }, + async readAsync() { + return null; + }, + remove() {}, + }; diff --git a/node_modules/axios/lib/helpers/deprecatedMethod.js b/node_modules/axios/lib/helpers/deprecatedMethod.js new file mode 100644 index 0000000..ec112de --- /dev/null +++ b/node_modules/axios/lib/helpers/deprecatedMethod.js @@ -0,0 +1,31 @@ +'use strict'; + +/*eslint no-console:0*/ + +/** + * Supply a warning to the developer that a method they are using + * has been deprecated. + * + * @param {string} method The name of the deprecated method + * @param {string} [instead] The alternate method to use if applicable + * @param {string} [docs] The documentation URL to get further details + * + * @returns {void} + */ +export default function deprecatedMethod(method, instead, docs) { + try { + console.warn( + 'DEPRECATED method `' + + method + + '`.' + + (instead ? ' Use `' + instead + '` instead.' : '') + + ' This method will be removed in a future release.' + ); + + if (docs) { + console.warn('For more information about usage see ' + docs); + } + } catch (e) { + /* Ignore */ + } +} diff --git a/node_modules/axios/lib/helpers/estimateDataURLDecodedBytes.js b/node_modules/axios/lib/helpers/estimateDataURLDecodedBytes.js new file mode 100644 index 0000000..ae8c0d4 --- /dev/null +++ b/node_modules/axios/lib/helpers/estimateDataURLDecodedBytes.js @@ -0,0 +1,193 @@ +/** + * Estimate data: URL byte lengths *without* allocating large buffers. + * - Fetch percent-decodes a base64 body before decoding it. + * - Node's Buffer.from(body, 'base64') sizes its backing allocation from the + * percent-decoded body, including ignored characters and content after padding. + * - Non-base64 data is percent-decoded and then encoded as UTF-8. + */ +const isHexDigit = (charCode) => + (charCode >= 48 && charCode <= 57) || + (charCode >= 65 && charCode <= 70) || + (charCode >= 97 && charCode <= 102); + +const isPercentEncodedByte = (str, i, len) => + i + 2 < len && isHexDigit(str.charCodeAt(i + 1)) && isHexDigit(str.charCodeAt(i + 2)); + +const hexValue = (charCode) => (charCode <= 57 ? charCode - 48 : (charCode & 0xdf) - 55); + +const isBase64Char = (charCode) => + (charCode >= 65 && charCode <= 90) || // A-Z + (charCode >= 97 && charCode <= 122) || // a-z + (charCode >= 48 && charCode <= 57) || // 0-9 + charCode === 43 || // + + charCode === 47 || // / + charCode === 45 || // - (base64url) + charCode === 95; // _ (base64url) + +const isBase64Whitespace = (charCode) => + charCode === 9 || charCode === 10 || charCode === 12 || charCode === 13 || charCode === 32; + +const base64Bytes = (significant) => { + const groups = Math.floor(significant / 4); + const remainder = significant % 4; + return groups * 3 + (remainder === 2 ? 1 : remainder === 3 ? 2 : 0); +}; + +// Buffer.byteLength(body, 'base64') uses the raw string length as an allocation +// upper bound even when Buffer.from later ignores characters or stops at '='. +const estimateBase64BufferAllocation = (body) => { + const len = body.length; + let padding = 0; + + if (len > 0 && body.charCodeAt(len - 1) === 61 /* '=' */) { + padding++; + + if (len > 1 && body.charCodeAt(len - 2) === 61 /* '=' */) { + padding++; + } + } + + return Math.floor(((len - padding) * 3) / 4); +}; + +const estimatePercentDecodedBase64BufferAllocation = (body) => { + // Ordinary Base64 needs only its length and trailing padding. + if (body.indexOf('%') === -1) { + return estimateBase64BufferAllocation(body); + } + + let length = 0; + let previous = 0; + let last = 0; + + for (let i = 0, len = body.length; i < len; i++) { + let code = body.charCodeAt(i); + if (code === 37 /* '%' */ && isPercentEncodedByte(body, i, len)) { + code = hexValue(body.charCodeAt(i + 1)) * 16 + hexValue(body.charCodeAt(i + 2)); + i += 2; + } + length++; + previous = last; + last = code; + } + + const padding = last === 61 ? (previous === 61 ? 2 : 1) : 0; + return Math.floor(((length - padding) * 3) / 4); +}; + +const estimatePercentDecodedBase64Bytes = (body) => { + const len = body.length; + let significant = 0; + let padding = 0; + let invalid = false; + + for (let i = 0; i < len; i++) { + let code = body.charCodeAt(i); + + if (code === 37 /* '%' */ && isPercentEncodedByte(body, i, len)) { + code = hexValue(body.charCodeAt(i + 1)) * 16 + hexValue(body.charCodeAt(i + 2)); + i += 2; + } + + if (isBase64Whitespace(code)) { + continue; + } + + if (code === 61 /* '=' */) { + padding++; + continue; + } + + if (!isBase64Char(code) || padding > 0) { + invalid = true; + continue; + } + + significant++; + } + + // Fetch rejects malformed forgiving-base64 input. Returning the raw-size + // allocation bound keeps that invalid input from becoming a pre-check bypass. + if ( + invalid || + padding > 2 || + (padding > 0 && (significant + padding) % 4 !== 0) || + significant % 4 === 1 + ) { + return estimateBase64BufferAllocation(body); + } + + return base64Bytes(significant); +}; + +const estimateDataURLBytes = (url, estimateBase64, base64Pattern) => { + if (!url || typeof url !== 'string') return 0; + if (!/^data:/i.test(url)) return 0; + + const comma = url.indexOf(','); + if (comma < 0) return 0; + + const meta = url.slice(5, comma); + const body = url.slice(comma + 1); + const isBase64 = base64Pattern.test(meta); + + if (isBase64) { + return estimateBase64(body); + } + + // Compute UTF-8 byte length directly from UTF-16 code units without allocating + // a byte buffer (TextEncoder.encode would defeat the DoS guard on large bodies). + // Valid %XX triplets count as one decoded byte; this matches the bytes that + // decodeURIComponent(body) would produce before Buffer re-encodes the string. + let bytes = 0; + for (let i = 0, len = body.length; i < len; i++) { + const c = body.charCodeAt(i); + if (c === 37 /* '%' */ && isPercentEncodedByte(body, i, len)) { + bytes += 1; + i += 2; + } else if (c < 0x80) { + bytes += 1; + } else if (c < 0x800) { + bytes += 2; + } else if (c >= 0xd800 && c <= 0xdbff && i + 1 < len) { + const next = body.charCodeAt(i + 1); + if (next >= 0xdc00 && next <= 0xdfff) { + bytes += 4; + i++; + } else { + bytes += 3; + } + } else { + bytes += 3; + } + } + return bytes; +}; + +/** + * Estimate the percent-decoded payload size used by Fetch data: URLs. + * + * @param {string} url + * @returns {number} + */ +export default function estimateDataURLDecodedBytes(url) { + // Fetch removes URL fragments before processing a data: URL. + const fragmentIndex = typeof url === 'string' ? url.indexOf('#') : -1; + + return estimateDataURLBytes( + fragmentIndex === -1 ? url : url.slice(0, fragmentIndex), + estimatePercentDecodedBase64Bytes, + /; *base64[\t\n\f\r ]*$/i + ); +} + +/** + * Estimate the Buffer backing allocation used after Node's percent-decoding step. + * + * @param {string} url + * @returns {number} + */ +export function estimateDataURLBufferAllocation(url) { + // Match fromDataURI's case-insensitive protocol and encoding suffix. + return estimateDataURLBytes(url, estimatePercentDecodedBase64BufferAllocation, /;base64$/i); +} diff --git a/node_modules/axios/lib/helpers/formDataToBlob.js b/node_modules/axios/lib/helpers/formDataToBlob.js new file mode 100644 index 0000000..02f32b7 --- /dev/null +++ b/node_modules/axios/lib/helpers/formDataToBlob.js @@ -0,0 +1,113 @@ +import utils from '../utils.js'; + +const CRLF = '\r\n'; +const normalizeLines = (value) => String(value).replace(/\r\n|\r|\n/g, CRLF); +const escapeName = (value) => + String(value).replace(/[\r\n"]/g, (char) => + char === '\r' ? '%0D' : char === '\n' ? '%0A' : '%22' + ); + +// Count UTF-8 bytes without allocating an encoded copy of a field. FormData +// string values normalize line endings; Blob/File contents remain unchanged. +const stringBytes = (value, normalize) => { + let length = 0; + for (let i = 0; i < value.length; i++) { + const code = value.charCodeAt(i); + if (normalize && (code === 13 || code === 10)) { + if (code === 13 && value.charCodeAt(i + 1) === 10) i++; + length += 2; + } else if (code < 0x80) { + length++; + } else if (code < 0x800) { + length += 2; + } else if ( + code >= 0xd800 && + code <= 0xdbff && + value.charCodeAt(i + 1) >= 0xdc00 && + value.charCodeAt(i + 1) <= 0xdfff + ) { + length += 4; + i++; + } else { + length += 3; + } + } + return length; +}; + +// Describe serialization failures independently of any request library. +export class FormDataError extends TypeError { + constructor(message, reason) { + super(message); + this.name = 'FormDataError'; + this.reason = reason; + } +} + +// The caller supplies the boundary, Blob implementation, and limit error. +export default function formDataToBlob(form, Blob, limit, limitError, boundary) { + if (!utils.isFunction(Blob)) { + throw new FormDataError('Blob is not supported', 'blob'); + } + + if ( + !utils.isString(boundary) || + !/^[A-Za-z0-9'()+_,./:=? -]{1,70}$/.test(boundary) || + / $/.test(boundary) + ) { + throw new FormDataError('Invalid multipart boundary', 'boundary'); + } + const footer = '--' + boundary + '--' + CRLF; + let length = footer.length; + const parts = []; + const checkLength = (extra) => { + if (length + extra > limit) throw limitError(); + }; + checkLength(0); + + for (const [name, value] of form) { + const isString = utils.isString(value); + const valueLength = isString ? stringBytes(value, true) : value.size; + if (!Number.isFinite(valueLength) || valueLength < 0) { + throw new FormDataError('Unsupported FormData part size', 'part'); + } + // Reject large values and names before building normalized header strings. + checkLength( + valueLength + + stringBytes(name, true) + + (!isString && value.name ? stringBytes(value.name, false) : 0) + + (!isString && value.type ? stringBytes(value.type, false) : 0) + ); + + let header = + '--' + + boundary + + CRLF + + 'Content-Disposition: form-data; name="' + + escapeName(normalizeLines(name)) + + '"'; + if (!isString) { + header += + '; filename="' + + escapeName(utils.isString(value.name) ? value.name : 'blob') + + '"' + + CRLF + + 'Content-Type: ' + + String(value.type || 'application/octet-stream').replace(/[\r\n]/g, ''); + } + header += CRLF + CRLF; + const partLength = stringBytes(header, false) + valueLength + CRLF.length; + checkLength(partLength); + length += partLength; + parts.push({ header, value, isString }); + } + + // Native Blob composition retains existing Blob/File data. No file is read + // and no complete multipart ArrayBuffer is created to determine its length. + const blobParts = []; + for (const part of parts) { + blobParts.push(part.header, part.isString ? normalizeLines(part.value) : part.value, CRLF); + } + blobParts.push(footer); + return new Blob(blobParts, { type: 'multipart/form-data; boundary=' + boundary }); +} diff --git a/node_modules/axios/lib/helpers/formDataToJSON.js b/node_modules/axios/lib/helpers/formDataToJSON.js new file mode 100644 index 0000000..f96ab96 --- /dev/null +++ b/node_modules/axios/lib/helpers/formDataToJSON.js @@ -0,0 +1,149 @@ +'use strict'; + +import utils from '../utils.js'; +import AxiosError from '../core/AxiosError.js'; +import { DEFAULT_FORM_DATA_MAX_DEPTH } from './toFormData.js'; + +const MAX_DEPTH = DEFAULT_FORM_DATA_MAX_DEPTH; + +function throwIfDepthExceeded(index) { + if (index > MAX_DEPTH) { + throw new AxiosError( + 'FormData field is too deeply nested (' + index + ' levels). Max depth: ' + MAX_DEPTH, + AxiosError.ERR_FORM_DATA_DEPTH_EXCEEDED + ); + } +} + +/** + * It takes a string like `foo[x][y][z]` and returns an array like `['foo', 'x', 'y', 'z'] + * + * @param {string} name - The name of the property to get. + * + * @returns An array of strings. + */ +function parsePropPath(name) { + // foo[x][y][z] -> ['foo', 'x', 'y', 'z'] + // foo.x.y.z -> ['foo', 'x', 'y', 'z'] + // A path is split on `.` and on `[...]` groups. A segment — whether written + // in dot notation or captured inside brackets — may contain any character + // except `.`, `[` and `]`, so a key like `user-name` or `user name` is kept + // literal instead of being split (#5402). `.`, `[` and `]` keep their existing + // meaning, e.g. `foo[bar.baz]` -> ['foo', 'bar', 'baz'] and `[]` is an array push. + // Excluding `[` from the bracket group also makes the match fail fast at the + // next `[`, so a malformed name cannot rescan to the end of the string from + // every unmatched `[` — parsing stays linear in the length of the name. + const path = []; + const pattern = /[^.[\]]+|\[([^.[\]]*)]/g; + let match; + + while ((match = pattern.exec(name)) !== null) { + throwIfDepthExceeded(path.length); + path.push(match[0] === '[]' ? '' : match[1] || match[0]); + } + + return path; +} + +/** + * Convert an array to an object. + * + * @param {Array} arr - The array to convert to an object. + * + * @returns An object with the same keys and values as the array. + */ +function arrayToObject(arr) { + const obj = {}; + const keys = Object.keys(arr); + let i; + const len = keys.length; + let key; + for (i = 0; i < len; i++) { + key = keys[i]; + obj[key] = arr[key]; + } + return obj; +} + +function normalizeArray(value) { + if (!utils.isArray(value)) return value; + + const keys = Object.keys(value); + return keys.length !== value.length || keys.some((key, index) => key !== String(index)) + ? arrayToObject(value) + : value; +} + +function normalizeArrays(obj) { + const pending = [obj]; + while (pending.length) { + const target = pending.pop(); + Object.keys(target).forEach((key) => { + const value = (target[key] = normalizeArray(target[key])); + if (utils.isArray(value) || utils.isPlainObject(value)) { + pending.push(value); + } + }); + } + return obj; +} + +/** + * It takes a FormData object and returns a JavaScript object + * + * @param {string} formData The FormData object to convert to JSON. + * + * @returns {Object | null} The converted object. + */ +function formDataToJSON(formData) { + function buildPath(path, value, target, index) { + throwIfDepthExceeded(index); + + let name = path[index++]; + + if (name === '__proto__') return true; + + const isNumericKey = Number.isFinite(+name); + const isLast = index >= path.length; + name = !name && utils.isArray(target) ? target.length : name; + + if (isLast) { + if (utils.hasOwnProp(target, name)) { + target[name] = normalizeArray(target[name]); + target[name] = utils.isArray(target[name]) + ? target[name].concat(value) + : [target[name], value]; + } else { + target[name] = value; + } + + return !isNumericKey; + } + + if (!utils.hasOwnProp(target, name) || !utils.isObject(target[name])) { + target[name] = []; + } + + const result = buildPath(path, value, target[name], index); + + if (result && utils.isArray(target[name])) { + target[name] = arrayToObject(target[name]); + } + + return !isNumericKey; + } + + if (utils.isFormData(formData) && utils.isFunction(formData.entries)) { + const obj = {}; + + utils.forEachEntry(formData, (name, value) => { + buildPath(parsePropPath(name), value, obj, 0); + }); + + return normalizeArrays(obj); + } + + return null; +} + +export default formDataToJSON; diff --git a/node_modules/axios/lib/helpers/formDataToStream.js b/node_modules/axios/lib/helpers/formDataToStream.js new file mode 100644 index 0000000..17f369d --- /dev/null +++ b/node_modules/axios/lib/helpers/formDataToStream.js @@ -0,0 +1,119 @@ +import util from 'util'; +import { Readable } from 'stream'; +import utils from '../utils.js'; +import readBlob from './readBlob.js'; +import platform from '../platform/index.js'; + +const BOUNDARY_ALPHABET = platform.ALPHABET.ALPHA_DIGIT + '-_'; + +const textEncoder = typeof TextEncoder === 'function' ? new TextEncoder() : new util.TextEncoder(); + +const CRLF = '\r\n'; +const CRLF_BYTES = textEncoder.encode(CRLF); +const CRLF_BYTES_COUNT = 2; + +class FormDataPart { + constructor(name, value) { + const { escapeName } = this.constructor; + const isStringValue = utils.isString(value); + + let headers = `Content-Disposition: form-data; name="${escapeName(name)}"${ + !isStringValue && value.name ? `; filename="${escapeName(value.name)}"` : '' + }${CRLF}`; + + if (isStringValue) { + value = textEncoder.encode(String(value).replace(/\r?\n|\r\n?/g, CRLF)); + } else { + const safeType = String(value.type || 'application/octet-stream').replace(/[\r\n]/g, ''); + headers += `Content-Type: ${safeType}${CRLF}`; + } + + this.headers = textEncoder.encode(headers + CRLF); + + this.contentLength = isStringValue ? value.byteLength : value.size; + + this.size = this.headers.byteLength + this.contentLength + CRLF_BYTES_COUNT; + + this.name = name; + this.value = value; + } + + async *encode() { + yield this.headers; + + const { value } = this; + + if (utils.isTypedArray(value)) { + yield value; + } else { + yield* readBlob(value); + } + + yield CRLF_BYTES; + } + + static escapeName(name) { + return String(name).replace( + /[\r\n"]/g, + (match) => + ({ + '\r': '%0D', + '\n': '%0A', + '"': '%22', + })[match] + ); + } +} + +const formDataToStream = (form, headersHandler, options) => { + const { + tag = 'form-data-boundary', + size = 25, + boundary = tag + '-' + platform.generateString(size, BOUNDARY_ALPHABET), + } = options || {}; + + if (!utils.isFormData(form)) { + throw new TypeError('FormData instance required'); + } + + if (boundary.length < 1 || boundary.length > 70) { + throw new Error('boundary must be 1-70 characters long'); + } + + const boundaryBytes = textEncoder.encode('--' + boundary + CRLF); + const footerBytes = textEncoder.encode('--' + boundary + '--' + CRLF); + let contentLength = footerBytes.byteLength; + + const parts = Array.from(form.entries()).map(([name, value]) => { + const part = new FormDataPart(name, value); + contentLength += part.size; + return part; + }); + + contentLength += boundaryBytes.byteLength * parts.length; + + contentLength = utils.toFiniteNumber(contentLength); + + const computedHeaders = { + 'Content-Type': `multipart/form-data; boundary=${boundary}`, + }; + + if (Number.isFinite(contentLength)) { + computedHeaders['Content-Length'] = contentLength; + } + + headersHandler && headersHandler(computedHeaders); + + return Readable.from( + (async function* () { + for (const part of parts) { + yield boundaryBytes; + yield* part.encode(); + } + + yield footerBytes; + })() + ); +}; + +export default formDataToStream; diff --git a/node_modules/axios/lib/helpers/fromDataURI.js b/node_modules/axios/lib/helpers/fromDataURI.js new file mode 100644 index 0000000..6fe0b80 --- /dev/null +++ b/node_modules/axios/lib/helpers/fromDataURI.js @@ -0,0 +1,75 @@ +'use strict'; + +import AxiosError from '../core/AxiosError.js'; +import parseProtocol from './parseProtocol.js'; +import platform from '../platform/index.js'; + +// RFC 2397: data:[][;base64], +// mediatype = type/subtype followed by optional ;name=value parameters +// The `i` flag makes the `;base64` token case-insensitive, matching the WHATWG +// URL/Fetch data URL processor (and therefore the fetch adapter and browsers). +// The remaining character classes do not depend on letter case. +const DATA_URL_PATTERN = /^([^,;/]+\/[^,;/]+)?((?:;[^,;=]+=[^,;]+)*)(;base64)?,([\s\S]*)$/i; + +/** + * Parse data uri to a Buffer or Blob + * + * @param {String} uri + * @param {?Boolean} asBlob + * @param {?Object} options + * @param {?Function} options.Blob + * + * @returns {Buffer|Blob} + */ +export default function fromDataURI(uri, asBlob, options) { + const _Blob = (options && options.Blob) || platform.classes.Blob; + const protocol = parseProtocol(uri); + + if (asBlob === undefined && _Blob) { + asBlob = true; + } + + if (protocol === 'data') { + uri = protocol.length ? uri.slice(protocol.length + 1) : uri; + + const match = DATA_URL_PATTERN.exec(uri); + + if (!match) { + throw new AxiosError('Invalid URL', AxiosError.ERR_INVALID_URL); + } + + const type = match[1]; + const params = match[2]; + const encoding = match[3] ? 'base64' : 'utf8'; + const body = match[4]; + + // RFC 2397 section 3: default mediatype is text/plain;charset=US-ASCII + // Bare `data:,` leaves mime undefined; Blob normalises that to "" per spec. + let mime = ''; + if (type) { + mime = params ? type + params : type; + } else if (params) { + mime = 'text/plain' + params; + } + + const buffer = + encoding === 'base64' + ? Buffer.from( + body.replace(/%([\da-f]{2})/gi, (_, hex) => String.fromCharCode(parseInt(hex, 16))), + 'base64' + ) + : Buffer.from(decodeURIComponent(body), encoding); + + if (asBlob) { + if (!_Blob) { + throw new AxiosError('Blob is not supported', AxiosError.ERR_NOT_SUPPORT); + } + + return new _Blob([buffer], { type: mime }); + } + + return buffer; + } + + throw new AxiosError('Unsupported protocol ' + protocol, AxiosError.ERR_NOT_SUPPORT); +} diff --git a/node_modules/axios/lib/helpers/isAbsoluteURL.js b/node_modules/axios/lib/helpers/isAbsoluteURL.js new file mode 100644 index 0000000..c461900 --- /dev/null +++ b/node_modules/axios/lib/helpers/isAbsoluteURL.js @@ -0,0 +1,19 @@ +'use strict'; + +/** + * Determines whether the specified URL is absolute + * + * @param {string} url The URL to test + * + * @returns {boolean} True if the specified URL is absolute, otherwise false + */ +export default function isAbsoluteURL(url) { + // A URL is considered absolute if it begins with "://" or "//" (protocol-relative URL). + // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed + // by any combination of letters, digits, plus, period, or hyphen. + if (typeof url !== 'string') { + return false; + } + + return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url); +} diff --git a/node_modules/axios/lib/helpers/isAxiosError.js b/node_modules/axios/lib/helpers/isAxiosError.js new file mode 100644 index 0000000..ffba610 --- /dev/null +++ b/node_modules/axios/lib/helpers/isAxiosError.js @@ -0,0 +1,14 @@ +'use strict'; + +import utils from '../utils.js'; + +/** + * Determines whether the payload is an error thrown by Axios + * + * @param {*} payload The value to test + * + * @returns {boolean} True if the payload is an error thrown by Axios, otherwise false + */ +export default function isAxiosError(payload) { + return utils.isObject(payload) && payload.isAxiosError === true; +} diff --git a/node_modules/axios/lib/helpers/isURLSameOrigin.js b/node_modules/axios/lib/helpers/isURLSameOrigin.js new file mode 100644 index 0000000..0bb9f50 --- /dev/null +++ b/node_modules/axios/lib/helpers/isURLSameOrigin.js @@ -0,0 +1,11 @@ +import platform from '../platform/index.js'; + +export default platform.hasStandardBrowserEnv + ? ((origin) => (url) => { + url = new URL(url, document.baseURI || platform.origin); + + return ( + origin.protocol === url.protocol && origin.host === url.host && origin.port === url.port + ); + })(new URL(platform.origin)) + : () => true; diff --git a/node_modules/axios/lib/helpers/normalizeURLForProtocolCheck.js b/node_modules/axios/lib/helpers/normalizeURLForProtocolCheck.js new file mode 100644 index 0000000..6c1c15b --- /dev/null +++ b/node_modules/axios/lib/helpers/normalizeURLForProtocolCheck.js @@ -0,0 +1,24 @@ +'use strict'; + +const urlParserControlCharacters = /[\t\n\r]/g; + +/** + * Match WHATWG URL preprocessing before checking a URL's protocol. + * + * @param {string} url + * + * @returns {string} + */ +export default function normalizeURLForProtocolCheck(url) { + if (typeof url !== 'string') { + return url; + } + + let start = 0; + + while (start < url.length && url.charCodeAt(start) <= 0x20) { + start++; + } + + return url.slice(start).replace(urlParserControlCharacters, ''); +} diff --git a/node_modules/axios/lib/helpers/null.js b/node_modules/axios/lib/helpers/null.js new file mode 100644 index 0000000..b9f82c4 --- /dev/null +++ b/node_modules/axios/lib/helpers/null.js @@ -0,0 +1,2 @@ +// eslint-disable-next-line strict +export default null; diff --git a/node_modules/axios/lib/helpers/parseHeaders.js b/node_modules/axios/lib/helpers/parseHeaders.js new file mode 100644 index 0000000..247e5b4 --- /dev/null +++ b/node_modules/axios/lib/helpers/parseHeaders.js @@ -0,0 +1,72 @@ +'use strict'; + +import utils from '../utils.js'; + +// RawAxiosHeaders whose duplicates are ignored by node +// c.f. https://nodejs.org/api/http.html#http_message_headers +const ignoreDuplicateOf = utils.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', +]); + +/** + * Parse headers into an object + * + * ``` + * Date: Wed, 27 Aug 2014 08:58:49 GMT + * Content-Type: application/json + * Connection: keep-alive + * Transfer-Encoding: chunked + * ``` + * + * @param {String} rawHeaders Headers needing to be parsed + * + * @returns {Object} Headers parsed into an object + */ +export default (rawHeaders) => { + // Header names are data, including __proto__; avoid inherited setters. + const parsed = Object.create(null); + let key; + let val; + let i; + + rawHeaders && + rawHeaders.split('\n').forEach(function parser(line) { + i = line.indexOf(':'); + key = line.substring(0, i).trim().toLowerCase(); + val = line.substring(i + 1).trim(); + + const hasKey = utils.hasOwnProp(parsed, key); + + if (!key || (hasKey && utils.hasOwnProp(ignoreDuplicateOf, key))) { + return; + } + + if (key === 'set-cookie') { + if (hasKey) { + parsed[key].push(val); + } else { + parsed[key] = [val]; + } + } else { + parsed[key] = hasKey ? parsed[key] + ', ' + val : val; + } + }); + + return parsed; +}; diff --git a/node_modules/axios/lib/helpers/parseProtocol.js b/node_modules/axios/lib/helpers/parseProtocol.js new file mode 100644 index 0000000..d3b2af3 --- /dev/null +++ b/node_modules/axios/lib/helpers/parseProtocol.js @@ -0,0 +1,6 @@ +'use strict'; + +export default function parseProtocol(url) { + const match = /^([-+\w]{1,25}):(?:\/\/)?/.exec(url); + return (match && match[1].toLowerCase()) || ''; +} diff --git a/node_modules/axios/lib/helpers/progressEventReducer.js b/node_modules/axios/lib/helpers/progressEventReducer.js new file mode 100644 index 0000000..55063cc --- /dev/null +++ b/node_modules/axios/lib/helpers/progressEventReducer.js @@ -0,0 +1,54 @@ +import speedometer from './speedometer.js'; +import throttle from './throttle.js'; +import utils from '../utils.js'; + +export const progressEventReducer = (listener, isDownloadStream, freq = 3) => { + let bytesNotified = 0; + const _speedometer = speedometer(50, 250); + + return throttle((e) => { + if (!e || !utils.isNumber(e.loaded)) { + return; + } + const rawLoaded = e.loaded; + const total = e.lengthComputable ? e.total : undefined; + const loaded = Math.max(0, total != null ? Math.min(rawLoaded, total) : rawLoaded); + const progressBytes = Math.max(0, loaded - bytesNotified); + const rate = _speedometer(progressBytes); + + bytesNotified = Math.max(bytesNotified, loaded); + + const data = { + loaded, + total, + progress: total ? loaded / total : undefined, + bytes: progressBytes, + rate: rate ? rate : undefined, + estimated: rate && total ? (total - loaded) / rate : undefined, + event: e, + lengthComputable: total != null, + [isDownloadStream ? 'download' : 'upload']: true, + }; + + listener(data); + }, freq); +}; + +export const progressEventDecorator = (total, throttled) => { + const lengthComputable = total != null; + + return [ + (loaded) => + throttled[0]({ + lengthComputable, + total, + loaded, + }), + throttled[1], + ]; +}; + +export const asyncDecorator = + (fn, scheduler = utils.asap) => + (...args) => + scheduler(() => fn(...args)); diff --git a/node_modules/axios/lib/helpers/readBlob.js b/node_modules/axios/lib/helpers/readBlob.js new file mode 100644 index 0000000..87d0ea8 --- /dev/null +++ b/node_modules/axios/lib/helpers/readBlob.js @@ -0,0 +1,15 @@ +const { asyncIterator } = Symbol; + +const readBlob = async function* (blob) { + if (blob.stream) { + yield* blob.stream(); + } else if (blob.arrayBuffer) { + yield await blob.arrayBuffer(); + } else if (blob[asyncIterator]) { + yield* blob[asyncIterator](); + } else { + yield blob; + } +}; + +export default readBlob; diff --git a/node_modules/axios/lib/helpers/resolveConfig.js b/node_modules/axios/lib/helpers/resolveConfig.js new file mode 100644 index 0000000..94d81de --- /dev/null +++ b/node_modules/axios/lib/helpers/resolveConfig.js @@ -0,0 +1,120 @@ +import platform from '../platform/index.js'; +import utils from '../utils.js'; +import AxiosError from '../core/AxiosError.js'; +import isURLSameOrigin from './isURLSameOrigin.js'; +import cookies from './cookies.js'; +import buildFullPath from '../core/buildFullPath.js'; +import mergeConfig from '../core/mergeConfig.js'; +import AxiosHeaders from '../core/AxiosHeaders.js'; +import setFormDataHeaders from '../core/setFormDataHeaders.js'; +import buildURL from './buildURL.js'; + +/** + * Encode a UTF-8 string to a Latin-1 byte string for use with btoa(). + * This is a modern replacement for the deprecated unescape(encodeURIComponent(str)) pattern. + * + * @param {string} str The string to encode + * + * @returns {string} UTF-8 bytes as a Latin-1 string + */ +const encodeUTF8 = (str) => + encodeURIComponent(str).replace(/%([0-9A-F]{2})/gi, (_, hex) => + String.fromCharCode(parseInt(hex, 16)) + ); + +const readCookie = (name) => cookies.read(name); + +function resolveConfig(config, readXsrfCookie = readCookie) { + const newConfig = mergeConfig({}, config); + + // Read only own properties to prevent prototype pollution gadgets + // (e.g. Object.prototype.baseURL = 'https://evil.com'). + const own = (key) => (utils.hasOwnProp(newConfig, key) ? newConfig[key] : undefined); + + const data = own('data'); + let withXSRFToken = own('withXSRFToken'); + const xsrfHeaderName = own('xsrfHeaderName'); + const xsrfCookieName = own('xsrfCookieName'); + let headers = own('headers'); + const auth = own('auth'); + const baseURL = own('baseURL'); + const allowAbsoluteUrls = own('allowAbsoluteUrls'); + const url = own('url'); + + newConfig.headers = headers = AxiosHeaders.from(headers); + + newConfig.url = buildURL( + buildFullPath(baseURL, url, allowAbsoluteUrls, newConfig), + own('params'), + own('paramsSerializer') + ); + + // HTTP basic authentication + if (auth) { + const username = utils.getSafeProp(auth, 'username') || ''; + const password = utils.getSafeProp(auth, 'password') || ''; + const transitional = own('transitional'); + const encodeUsername = + transitional && + utils.hasOwnProp(transitional, 'encodeBasicAuthUsername') && + transitional.encodeBasicAuthUsername === true; + + try { + headers.set( + 'Authorization', + // Preserve legacy username bytes unless the caller opts in to UTF-8. + 'Basic ' + + btoa( + (encodeUsername ? encodeUTF8(username) : username) + + ':' + + (password ? encodeUTF8(password) : '') + ) + ); + } catch (e) { + throw AxiosError.from(e, AxiosError.ERR_BAD_OPTION_VALUE, config); + } + } + + if (utils.isFormData(data)) { + const getHeaders = utils.getSafeProp(data, 'getHeaders'); + + if ( + platform.hasStandardBrowserEnv || + platform.hasStandardBrowserWebWorkerEnv || + utils.isReactNative(data) + ) { + headers.setContentType(undefined); // browser/web worker/RN handles it + } else if (utils.isFunction(getHeaders)) { + // Node.js FormData (like form-data package) + setFormDataHeaders(headers, getHeaders.call(data), own('formDataHeaderPolicy')); + } + } + + // Add xsrf header + // This is only done if running in a standard browser environment. + // Specifically not if we're in a web worker, or react-native. + + if (platform.hasStandardBrowserEnv) { + if (utils.isFunction(withXSRFToken)) { + withXSRFToken = withXSRFToken(newConfig); + } + + // Strict boolean check — prevents proto-pollution gadgets (e.g. Object.prototype.withXSRFToken = 1) + // and misconfigurations (e.g. "false") from short-circuiting the same-origin check and leaking + // the XSRF token cross-origin. + const shouldSendXSRF = + withXSRFToken === true || (withXSRFToken == null && isURLSameOrigin(newConfig.url)); + + if (shouldSendXSRF) { + const xsrfValue = xsrfHeaderName && xsrfCookieName && readXsrfCookie(xsrfCookieName); + + if (xsrfValue) { + headers.set(xsrfHeaderName, xsrfValue); + } + } + } + + return newConfig; +} + +export default resolveConfig; diff --git a/node_modules/axios/lib/helpers/sanitizeHeaderValue.js b/node_modules/axios/lib/helpers/sanitizeHeaderValue.js new file mode 100644 index 0000000..0462fc0 --- /dev/null +++ b/node_modules/axios/lib/helpers/sanitizeHeaderValue.js @@ -0,0 +1,60 @@ +'use strict'; + +import utils from '../utils.js'; + +function trimSPorHTAB(str) { + let start = 0; + let end = str.length; + + while (start < end) { + const code = str.charCodeAt(start); + + if (code !== 0x09 && code !== 0x20) { + break; + } + + start += 1; + } + + while (end > start) { + const code = str.charCodeAt(end - 1); + + if (code !== 0x09 && code !== 0x20) { + break; + } + + end -= 1; + } + + return start === 0 && end === str.length ? str : str.slice(start, end); +} + +// The control-code ranges are intentional: header sanitization strips C0/DEL bytes. +// eslint-disable-next-line no-control-regex +const INVALID_UNICODE_HEADER_VALUE_CHARS = new RegExp('[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+', 'g'); +// eslint-disable-next-line no-control-regex +const INVALID_BYTE_STRING_HEADER_VALUE_CHARS = new RegExp('[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+', 'g'); + +function sanitizeValue(value, invalidChars) { + if (utils.isArray(value)) { + return value.map((item) => sanitizeValue(item, invalidChars)); + } + + return trimSPorHTAB(String(value).replace(invalidChars, '')); +} + +export const sanitizeHeaderValue = (value) => + sanitizeValue(value, INVALID_UNICODE_HEADER_VALUE_CHARS); + +export const sanitizeByteStringHeaderValue = (value) => + sanitizeValue(value, INVALID_BYTE_STRING_HEADER_VALUE_CHARS); + +export function toByteStringHeaderObject(headers) { + const byteStringHeaders = Object.create(null); + + utils.forEach(headers.toJSON(), (value, header) => { + byteStringHeaders[header] = sanitizeByteStringHeaderValue(value); + }); + + return byteStringHeaders; +} diff --git a/node_modules/axios/lib/helpers/shouldBypassProxy.js b/node_modules/axios/lib/helpers/shouldBypassProxy.js new file mode 100644 index 0000000..c1be106 --- /dev/null +++ b/node_modules/axios/lib/helpers/shouldBypassProxy.js @@ -0,0 +1,520 @@ +import { domainToASCII } from 'url'; + +const LOOPBACK_HOSTNAMES = new Set(['localhost', '0.0.0.0']); + +const trimTrailingDots = (value) => { + let end = value.length; + + while (end && value.charCodeAt(end - 1) === 46) { + end--; + } + + return end === value.length ? value : value.slice(0, end); +}; + +const isIPv4Loopback = (host) => { + const parts = host.split('.'); + if (parts.length !== 4) return false; + if (parts[0] !== '127') return false; + return parts.every((p) => /^\d+$/.test(p) && Number(p) >= 0 && Number(p) <= 255); +}; + +/** + * Canonicalize an IPv4 address written in shorthand, octal, or hex form into + * dotted-decimal. IPv6 addresses and non-IP strings are returned unchanged so + * the existing IPv4-mapped IPv6 unmap path and the isLoopback path can still + * see them. + * + * Shorthand expansion mirrors Node's URL parser: literal parts fill from the + * left, the final part fills the remaining octets from the right with + * zero-padding on the left. + * 127.1 -> 127.0.0.1 + * 127.0.1 -> 127.0.0.1 + * 1.2.3 -> 1.2.0.3 + * + * Each octet is parsed with an explicit base: 16 for `0x`/`0X` prefix, 8 for + * zero-prefixed multi-digit all-`0-7` parts, 10 otherwise. Zero-prefixed + * decimal-looking parts that contain `8` or `9` are rejected to match Node's + * URL parser, and the comparison layer falls through to non-bypass if either + * side rejects the form (fail-safe). + * + * Returns the input unchanged on any parse failure, out-of-range octet, or + * unusual shape (1-part, 5+ parts) so the comparison layer fails closed. + */ +const parseIPv4Octet = (text) => { + if (/^0[xX][0-9a-fA-F]+$/.test(text)) { + const n = parseInt(text.slice(2), 16); + return Number.isFinite(n) ? n : null; + } + if (text.length > 1 && /^0[0-7]+$/.test(text)) { + const n = parseInt(text, 8); + return Number.isFinite(n) ? n : null; + } + if (text.length > 1 && /^0[0-9]+$/.test(text)) { + return null; + } + if (/^[0-9]+$/.test(text)) { + const n = parseInt(text, 10); + return Number.isFinite(n) ? n : null; + } + return null; +}; + +const normalizeIPAddress = (host) => { + if (typeof host !== 'string' || !host || host.indexOf(':') !== -1) { + return host; + } + + let h = host; + if (h.charAt(0) === '[' && h.charAt(h.length - 1) === ']') { + h = h.slice(1, -1); + } + h = trimTrailingDots(h); + + // Allowed characters for any IPv4 shape: digits, dot, 'x', 'X', hex digits. + if (!/^[0-9.xXa-fA-F]+$/.test(h)) return host; + + const parts = h.split('.'); + + // No part may be empty (e.g. "127..0.1" or "127.0.0."). Trailing dots are + // already stripped above; this guards against the empty-middle case. + if (parts.some((p) => p === '')) return host; + + if (parts.length === 4) { + // Full IPv4 form: each part is an octet. + const octets = parts.map(parseIPv4Octet); + if (octets.some((n) => n === null || n < 0 || n > 255)) return host; + return octets.join('.'); + } + + if (parts.length > 4) { + return host; + } + + // Shorthand: 1..3 parts. Node's URL parser treats a 1-part input as a 32-bit + // integer split into octets, which has surprising semantics (e.g. "127" -> + // "0.0.0.127"). Reject 1-part inputs to keep the helper predictable: the + // fail-safe returns the input unchanged and the comparison layer falls + // through to non-bypass. + if (parts.length === 1) return host; + + // 2..3 parts: literal parts fill from the left, tail fills remaining octets + // from the right with zero-padding. + const literalOctets = parts.slice(0, -1); + const tail = parts[parts.length - 1]; + const tailSlots = 4 - literalOctets.length; + + // Tail is parsed as a full IPv4 number (hex/octal/decimal) and packed + // low-byte-right into the remaining octets, matching Node's URL parser. + // e.g. 127.65535 (tail 0xFFFF into 3 slots) -> 127.0.255.255; + // 127.0x00ff (tail 0xFF into 3 slots) -> 127.0.0.255; + // 127.0.65535 (tail 0xFFFF into 2 slots) -> 127.0.255.255. + const tailValue = parseIPv4Octet(tail); + if (tailValue === null) return host; + const maxTail = (1 << (8 * tailSlots)) - 1; + if (tailValue < 0 || tailValue > maxTail) return host; + + const tailOctets = new Array(tailSlots).fill(0); + for (let i = tailSlots - 1, v = tailValue; i >= 0; i--, v >>= 8) { + tailOctets[i] = v & 0xff; + } + + const literal = literalOctets.map(parseIPv4Octet); + if (literal.some((n) => n === null || n < 0 || n > 255)) return host; + + return [...literal, ...tailOctets].join('.'); +}; + +const isIPv6ZeroGroup = (group) => /^0{1,4}$/.test(group); + +// The unspecified address (IPv4 0.0.0.0 / IPv6 ::) resolves to the local host +// for outbound connections, so treat it as loopback-equivalent for NO_PROXY +// matching. 0.0.0.0 is covered by LOOPBACK_HOSTNAMES; this handles compressed +// and full IPv6 all-zero forms so both families bypass symmetrically. +const isIPv6Unspecified = (host) => { + if (host === '::') return true; + + const compressionIndex = host.indexOf('::'); + + if (compressionIndex !== -1) { + if (compressionIndex !== host.lastIndexOf('::')) return false; + + const left = host.slice(0, compressionIndex); + const right = host.slice(compressionIndex + 2); + const leftGroups = left ? left.split(':') : []; + const rightGroups = right ? right.split(':') : []; + const explicitGroups = leftGroups.length + rightGroups.length; + + return ( + explicitGroups < 8 && leftGroups.every(isIPv6ZeroGroup) && rightGroups.every(isIPv6ZeroGroup) + ); + } + + const groups = host.split(':'); + return groups.length === 8 && groups.every(isIPv6ZeroGroup); +}; + +const isIPv6Loopback = (host) => { + // Collapse all-zero groups: any form of ::1 / 0:0:...:0:1 + // First, strip any leading "::" by normalising with Set lookup of common forms, + // then fall back to structural check. + if (host === '::1') return true; + + // Check IPv4-mapped IPv6 loopback: ::ffff: or ::ffff: + // Node's URL parser normalises ::ffff:127.0.0.1 → ::ffff:7f00:1 + const v4MappedDotted = host.match(/^::ffff:(\d+\.\d+\.\d+\.\d+)$/i); + if (v4MappedDotted) return isIPv4Loopback(v4MappedDotted[1]); + + const v4MappedHex = host.match(/^::ffff:([0-9a-f]{1,4}):([0-9a-f]{1,4})$/i); + if (v4MappedHex) { + const high = parseInt(v4MappedHex[1], 16); + // High 16 bits must start with 127 (0x7f) — i.e. 0x7f00..0x7fff + return high >= 0x7f00 && high <= 0x7fff; + } + + // Full-form ::1 variants: any number of zero groups followed by trailing 1 + // e.g. 0:0:0:0:0:0:0:1, 0000:...:0001 + const groups = host.split(':'); + if (groups.length === 8) { + for (let i = 0; i < 7; i++) { + if (!/^0+$/.test(groups[i])) return false; + } + return /^0*1$/.test(groups[7]); + } + + return false; +}; + +const isLoopback = (host) => { + if (!host) return false; + if (LOOPBACK_HOSTNAMES.has(host)) return true; + if (isIPv4Loopback(host)) return true; + if (isIPv6Unspecified(host)) return true; + return isIPv6Loopback(host); +}; + +const DEFAULT_PORTS = { + http: 80, + https: 443, + ws: 80, + wss: 443, + ftp: 21, +}; + +const parseNoProxyEntry = (entry) => { + let entryHost = entry; + let entryPort = 0; + + if (entryHost.charAt(0) === '[') { + const bracketIndex = entryHost.indexOf(']'); + + if (bracketIndex !== -1) { + const host = entryHost.slice(1, bracketIndex); + const rest = entryHost.slice(bracketIndex + 1); + + if (rest.charAt(0) === ':' && /^\d+$/.test(rest.slice(1))) { + entryPort = Number.parseInt(rest.slice(1), 10); + } + + return [host, entryPort]; + } + } + + const firstColon = entryHost.indexOf(':'); + const lastColon = entryHost.lastIndexOf(':'); + + if ( + firstColon !== -1 && + firstColon === lastColon && + /^\d+$/.test(entryHost.slice(lastColon + 1)) + ) { + entryPort = Number.parseInt(entryHost.slice(lastColon + 1), 10); + entryHost = entryHost.slice(0, lastColon); + } + + return [entryHost, entryPort]; +}; + +// Convert IPv4-mapped IPv6 (::ffff:0:0/96 prefix) to IPv4 dotted form so both +// sides of a NO_PROXY comparison see the same canonical address. Without this, +// `NO_PROXY=192.168.1.5` would not match a request to `http://[::ffff:192.168.1.5]/` +// (Node's URL parser normalises that to `[::ffff:c0a8:105]`), and vice-versa, +// allowing the proxy-bypass policy to be circumvented by using the alternate +// representation. Returns the input unchanged when not IPv4-mapped. +const IPV4_MAPPED_DOTTED_RE = /^(?:::|(?:0{1,4}:){1,4}:|(?:0{1,4}:){5})ffff:(\d+\.\d+\.\d+\.\d+)$/i; +const IPV4_MAPPED_HEX_RE = + /^(?:::|(?:0{1,4}:){1,4}:|(?:0{1,4}:){5})ffff:([0-9a-f]{1,4}):([0-9a-f]{1,4})$/i; + +const unmapIPv4MappedIPv6 = (host) => { + if (typeof host !== 'string' || host.indexOf(':') === -1) return host; + + const dotted = host.match(IPV4_MAPPED_DOTTED_RE); + if (dotted) return dotted[1]; + + const hex = host.match(IPV4_MAPPED_HEX_RE); + if (hex) { + const high = parseInt(hex[1], 16); + const low = parseInt(hex[2], 16); + return `${high >> 8}.${high & 0xff}.${low >> 8}.${low & 0xff}`; + } + + return host; +}; + +const IPV4_OCTET_RE = /^(?:0|[1-9]\d{0,2})$/; + +const ipv4ToBytes = (host) => { + const parts = host.split('.'); + + return parts.length === 4 && + parts.every((part) => IPV4_OCTET_RE.test(part) && Number(part) <= 255) + ? parts.map(Number) + : null; +}; + +const IPV6_GROUP_RE = /^[0-9a-f]{1,4}$/i; + +const ipv6ToBytes = (host) => { + const halves = host.split('::'); + + if (halves.length > 2) { + return null; + } + + const groups = halves[0] ? halves[0].split(':') : []; + + if (halves.length === 2) { + const rear = halves[1] ? halves[1].split(':') : []; + const missing = 8 - groups.length - rear.length; + + if (missing < 1) { + return null; + } + + groups.push(...new Array(missing).fill('0'), ...rear); + } + + if (groups.length !== 8 || groups.some((group) => !IPV6_GROUP_RE.test(group))) { + return null; + } + + return groups.flatMap((group) => { + const value = Number.parseInt(group, 16); + return [(value >> 8) & 0xff, value & 0xff]; + }); +}; + +const ipToBytes = (host) => { + if (typeof host !== 'string' || !host) { + return null; + } + + return host.indexOf(':') !== -1 ? ipv6ToBytes(host) : ipv4ToBytes(host); +}; + +const normalizeNoProxyHost = (hostname) => { + if (!hostname) { + return hostname; + } + + if (hostname.charAt(0) === '[' && hostname.charAt(hostname.length - 1) === ']') { + hostname = hostname.slice(1, -1); + } + + let trimmed = trimTrailingDots(hostname); + if (trimmed.indexOf(':') !== -1) { + try { + trimmed = new URL('http://[' + trimmed + ']/').hostname.slice(1, -1); + } catch (_err) { + return trimmed; + } + } else if (/[\u0080-\uffff]/.test(trimmed)) { + const prefix = /^[*.]+/.exec(trimmed); + const start = prefix ? prefix[0] : ''; + const ascii = domainToASCII(trimmed.slice(start.length)); + if (!ascii) return ''; + trimmed = start + trimTrailingDots(ascii); + } + + // IPv4 shorthand/octal/hex → dotted-decimal; helper is a no-op for inputs + // containing ':' (IPv6 and IPv4-mapped IPv6) so we fall through to unmap. + const ipv4 = normalizeIPAddress(trimmed); + if (ipv4 !== trimmed) { + return ipv4; + } + + return unmapIPv4MappedIPv6(trimmed); +}; + +const normalizeCidrBase = (input) => { + let base = input; + const startsBracket = base.charAt(0) === '['; + const endsBracket = base.charAt(base.length - 1) === ']'; + const hasBracket = base.includes('[') || base.includes(']'); + + if (startsBracket || endsBracket) { + if (!startsBracket || !endsBracket) { + return null; + } + + base = base.slice(1, -1); + + if (base.indexOf(':') === -1 || base.includes('[') || base.includes(']')) { + return null; + } + } else if (hasBracket) { + return null; + } + + if (!base || base.charAt(base.length - 1) === '.') { + return null; + } + + const wasIPv6 = base.indexOf(':') !== -1; + + if (wasIPv6) { + try { + base = new URL(`http://[${base}]/`).hostname.slice(1, -1); + } catch (_err) { + return null; + } + } else { + base = normalizeIPAddress(base); + + if (!ipv4ToBytes(base)) { + return null; + } + } + + return { normalized: unmapIPv4MappedIPv6(base), wasIPv6 }; +}; + +const CIDR_ENTRY_RE = /^(.+)\/(0|[1-9]\d{0,2})$/; + +const parseCidrEntry = (entry) => { + if (entry.indexOf('/') === -1) { + return undefined; + } + + const match = CIDR_ENTRY_RE.exec(entry); + + if (!match) { + return null; + } + + let prefix = Number(match[2]); + const parsedBase = normalizeCidrBase(match[1]); + + if (!parsedBase) { + return null; + } + + const { normalized, wasIPv6 } = parsedBase; + + if (wasIPv6 && normalized.indexOf(':') === -1) { + if (prefix < 96) { + return null; + } + + prefix -= 96; + } + + const bytes = ipToBytes(normalized); + + if (!bytes || prefix > bytes.length * 8) { + return null; + } + + return { bytes, prefix }; +}; + +const isInSubnet = (addressBytes, networkBytes, prefix) => { + const fullBytes = prefix >> 3; + + for (let i = 0; i < fullBytes; i++) { + if (addressBytes[i] !== networkBytes[i]) { + return false; + } + } + + const remainingBits = prefix & 7; + + if (remainingBits) { + const mask = (0xff << (8 - remainingBits)) & 0xff; + + if ((addressBytes[fullBytes] & mask) !== (networkBytes[fullBytes] & mask)) { + return false; + } + } + + return true; +}; + +export default function shouldBypassProxy(location) { + let parsed; + + try { + parsed = new URL(location); + } catch (_err) { + return false; + } + + const noProxy = (process.env.no_proxy || process.env.NO_PROXY || '').toLowerCase(); + + if (!noProxy) { + return false; + } + + if (noProxy === '*') { + return true; + } + + const port = + Number.parseInt(parsed.port, 10) || DEFAULT_PORTS[parsed.protocol.split(':', 1)[0]] || 0; + + const hostname = normalizeNoProxyHost(parsed.hostname.toLowerCase()); + const hostnameBytes = ipToBytes(hostname); + + return noProxy.split(/[\s,]+/).some((entry) => { + if (!entry) { + return false; + } + + if (entry === '*') { + return true; + } + + const cidr = parseCidrEntry(entry); + + if (cidr !== undefined) { + return ( + cidr !== null && + !!hostnameBytes && + hostnameBytes.length === cidr.bytes.length && + isInSubnet(hostnameBytes, cidr.bytes, cidr.prefix) + ); + } + + let [entryHost, entryPort] = parseNoProxyEntry(entry); + + entryHost = normalizeNoProxyHost(entryHost); + + if (!entryHost) { + return false; + } + + if (entryPort && entryPort !== port) { + return false; + } + + if (entryHost.charAt(0) === '*') { + entryHost = entryHost.slice(1); + } + + if (entryHost.charAt(0) === '.') { + return hostname.endsWith(entryHost); + } + + return hostname === entryHost || (isLoopback(hostname) && isLoopback(entryHost)); + }); +} diff --git a/node_modules/axios/lib/helpers/speedometer.js b/node_modules/axios/lib/helpers/speedometer.js new file mode 100644 index 0000000..566a1ff --- /dev/null +++ b/node_modules/axios/lib/helpers/speedometer.js @@ -0,0 +1,55 @@ +'use strict'; + +/** + * Calculate data maxRate + * @param {Number} [samplesCount= 10] + * @param {Number} [min= 1000] + * @returns {Function} + */ +function speedometer(samplesCount, min) { + samplesCount = samplesCount || 10; + const bytes = new Array(samplesCount); + const timestamps = new Array(samplesCount); + let head = 0; + let tail = 0; + let firstSampleTS; + + min = min !== undefined ? min : 1000; + + return function push(chunkLength) { + const now = Date.now(); + + const startedAt = timestamps[tail]; + + if (!firstSampleTS) { + firstSampleTS = now; + } + + bytes[head] = chunkLength; + timestamps[head] = now; + + let i = tail; + let bytesCount = 0; + + while (i !== head) { + bytesCount += bytes[i++]; + i = i % samplesCount; + } + + head = (head + 1) % samplesCount; + + if (head === tail) { + tail = (tail + 1) % samplesCount; + } + + if (now - firstSampleTS < min) { + return; + } + + const passed = startedAt && now - startedAt; + + return passed ? Math.round((bytesCount * 1000) / passed) : undefined; + }; +} + +export default speedometer; diff --git a/node_modules/axios/lib/helpers/spread.js b/node_modules/axios/lib/helpers/spread.js new file mode 100644 index 0000000..2e72fc8 --- /dev/null +++ b/node_modules/axios/lib/helpers/spread.js @@ -0,0 +1,28 @@ +'use strict'; + +/** + * Syntactic sugar for invoking a function and expanding an array for arguments. + * + * Common use case would be to use `Function.prototype.apply`. + * + * ```js + * function f(x, y, z) {} + * const args = [1, 2, 3]; + * f.apply(null, args); + * ``` + * + * With `spread` this example can be re-written. + * + * ```js + * spread(function(x, y, z) {})([1, 2, 3]); + * ``` + * + * @param {Function} callback + * + * @returns {Function} + */ +export default function spread(callback) { + return function wrap(arr) { + return callback.apply(null, arr); + }; +} diff --git a/node_modules/axios/lib/helpers/throttle.js b/node_modules/axios/lib/helpers/throttle.js new file mode 100644 index 0000000..8932989 --- /dev/null +++ b/node_modules/axios/lib/helpers/throttle.js @@ -0,0 +1,45 @@ +/** + * Throttle decorator + * @param {Function} fn + * @param {Number} freq + * @return {Array} + */ +function throttle(fn, freq) { + let timestamp = 0; + let threshold = 1000 / freq; + let lastArgs; + let timer; + + const invoke = (args, now = Date.now()) => { + timestamp = now; + lastArgs = null; + if (timer) { + clearTimeout(timer); + timer = null; + } + fn(...args); + }; + + const throttled = (...args) => { + const now = Date.now(); + const passed = now - timestamp; + if (passed >= threshold) { + invoke(args, now); + } else { + lastArgs = args; + if (!timer) { + timer = setTimeout(() => { + timer = null; + invoke(lastArgs); + }, threshold - passed); + } + } + }; + + const flush = () => lastArgs && invoke(lastArgs); + const flushWith = (...args) => invoke(args); + + return [throttled, flush, flushWith]; +} + +export default throttle; diff --git a/node_modules/axios/lib/helpers/toFormData.js b/node_modules/axios/lib/helpers/toFormData.js new file mode 100644 index 0000000..15aa61e --- /dev/null +++ b/node_modules/axios/lib/helpers/toFormData.js @@ -0,0 +1,279 @@ +'use strict'; + +import utils from '../utils.js'; +import AxiosError from '../core/AxiosError.js'; +// temporary hotfix to avoid circular references until AxiosURLSearchParams is refactored +import PlatformFormData from '../platform/node/classes/FormData.js'; +import PlatformBuffer from '../platform/node/classes/Buffer.js'; + +// Default nesting limit shared with the inverse transform (formDataToJSON) so +// the FormData <-> JSON round-trip stays symmetric. +export const DEFAULT_FORM_DATA_MAX_DEPTH = 100; + +/** + * Determines if the given thing is a array or js object. + * + * @param {string} thing - The object or array to be visited. + * + * @returns {boolean} + */ +function isVisitable(thing) { + return utils.isPlainObject(thing) || utils.isArray(thing); +} + +/** + * It removes the brackets from the end of a string + * + * @param {string} key - The key of the parameter. + * + * @returns {string} the key without the brackets. + */ +function removeBrackets(key) { + return utils.endsWith(key, '[]') ? key.slice(0, -2) : key; +} + +/** + * It takes a path, a key, and a boolean, and returns a string + * + * @param {string} path - The path to the current key. + * @param {string} key - The key of the current object being iterated over. + * @param {string} dots - If true, the key will be rendered with dots instead of brackets. + * + * @returns {string} The path to the current key. + */ +function renderKey(path, key, dots) { + if (!path) return key; + return path + .concat(key) + .map(function each(token, i) { + // eslint-disable-next-line no-param-reassign + token = removeBrackets(token); + return !dots && i ? '[' + token + ']' : token; + }) + .join(dots ? '.' : ''); +} + +/** + * If the array is an array and none of its elements are visitable, then it's a flat array. + * + * @param {Array} arr - The array to check + * + * @returns {boolean} + */ +function isFlatArray(arr) { + return utils.isArray(arr) && !arr.some(isVisitable); +} + +const predicates = utils.toFlatObject(utils, {}, null, function filter(prop) { + return /^is[A-Z]/.test(prop); +}); + +/** + * Convert a data object to FormData + * + * @param {Object} obj + * @param {?Object} [formData] + * @param {?Object} [options] + * @param {Function} [options.visitor] + * @param {Boolean} [options.metaTokens = true] + * @param {Boolean} [options.dots = false] + * @param {?Boolean} [options.indexes = false] + * + * @returns {Object} + **/ + +/** + * It converts an object into a FormData object + * + * @param {Object} obj - The object to convert to form data. + * @param {string} formData - The FormData object to append to. + * @param {Object} options + * + * @returns + */ +function toFormData(obj, formData, options) { + if (!utils.isObject(obj)) { + throw new TypeError('target must be an object'); + } + + // eslint-disable-next-line no-param-reassign + formData = formData || new (PlatformFormData || FormData)(); + + const option = (name, fallback) => { + const value = utils.getSafeProp(options, name); + return utils.isUndefined(value) ? fallback : value; + }; + + const metaTokens = option('metaTokens', true); + // eslint-disable-next-line no-use-before-define + const visitor = option('visitor') || defaultVisitor; + const dots = option('dots', false); + const indexes = option('indexes', false); + const _Blob = option('Blob') || (typeof Blob !== 'undefined' && Blob); + const maxDepth = option('maxDepth', DEFAULT_FORM_DATA_MAX_DEPTH); + const useBlob = _Blob && utils.isSpecCompliantForm(formData); + const stack = []; + + if (!utils.isFunction(visitor)) { + throw new TypeError('visitor must be a function'); + } + + function convertValue(value) { + if (value === null) return ''; + + if (utils.isDate(value)) { + return value.toISOString(); + } + + if (utils.isBoolean(value)) { + return value.toString(); + } + + if (!useBlob && utils.isBlob(value)) { + throw new AxiosError('Blob is not supported. Use a Buffer instead.'); + } + + if (utils.isArrayBuffer(value) || utils.isTypedArray(value)) { + if (useBlob && typeof _Blob === 'function') { + return new _Blob([value]); + } + if (PlatformBuffer && PlatformBuffer.isBufferAvailable()) { + return PlatformBuffer.from(value); + } + throw new AxiosError( + 'Blob is not supported. Use a Buffer instead.', + AxiosError.ERR_NOT_SUPPORT + ); + } + + return value; + } + + function throwIfMaxDepthExceeded(depth) { + if (depth > maxDepth) { + throw new AxiosError( + 'Object is too deeply nested (' + depth + ' levels). Max depth: ' + maxDepth, + AxiosError.ERR_FORM_DATA_DEPTH_EXCEEDED + ); + } + } + + function stringifyWithDepthLimit(value, depth) { + if (maxDepth === Infinity) { + return JSON.stringify(value); + } + + const ancestors = []; + + return JSON.stringify(value, function limitDepth(_key, currentValue) { + if (!utils.isObject(currentValue)) { + return currentValue; + } + + while (ancestors.length && ancestors[ancestors.length - 1] !== this) { + ancestors.pop(); + } + + ancestors.push(currentValue); + throwIfMaxDepthExceeded(depth + ancestors.length - 1); + + return currentValue; + }); + } + + /** + * Default visitor. + * + * @param {*} value + * @param {String|Number} key + * @param {Array} path + * @this {FormData} + * + * @returns {boolean} return true to visit the each prop of the value recursively + */ + function defaultVisitor(value, key, path) { + let arr = value; + + if (utils.isReactNative(formData) && utils.isReactNativeBlob(value)) { + formData.append(renderKey(path, key, dots), convertValue(value)); + return false; + } + + if (value && !path && typeof value === 'object') { + if (utils.endsWith(key, '{}')) { + // eslint-disable-next-line no-param-reassign + key = metaTokens ? key : key.slice(0, -2); + // eslint-disable-next-line no-param-reassign + value = stringifyWithDepthLimit(value, 1); + } else if ( + (utils.isArray(value) && isFlatArray(value)) || + ((utils.isFileList(value) || utils.endsWith(key, '[]')) && (arr = utils.toArray(value))) + ) { + // eslint-disable-next-line no-param-reassign + key = removeBrackets(key); + + arr.forEach(function each(el, index) { + !(utils.isUndefined(el) || el === null) && + formData.append( + // eslint-disable-next-line no-nested-ternary + indexes === true + ? renderKey([key], index, dots) + : indexes === null + ? key + : key + '[]', + convertValue(el) + ); + }); + return false; + } + } + + if (isVisitable(value)) { + return true; + } + + formData.append(renderKey(path, key, dots), convertValue(value)); + + return false; + } + + const exposedHelpers = Object.assign(predicates, { + defaultVisitor, + convertValue, + isVisitable, + }); + + function build(value, path, depth = 0) { + if (utils.isUndefined(value)) return; + + throwIfMaxDepthExceeded(depth); + + if (stack.indexOf(value) !== -1) { + throw new Error('Circular reference detected in ' + path.join('.')); + } + + stack.push(value); + + utils.forEach(value, function each(el, key) { + const result = + !(utils.isUndefined(el) || el === null) && + visitor.call(formData, el, utils.isString(key) ? key.trim() : key, path, exposedHelpers); + + if (result === true) { + build(el, path ? path.concat(key) : [key], depth + 1); + } + }); + + stack.pop(); + } + + if (!utils.isObject(obj)) { + throw new TypeError('data must be an object'); + } + + build(obj); + + return formData; +} + +export default toFormData; diff --git a/node_modules/axios/lib/helpers/toURLEncodedForm.js b/node_modules/axios/lib/helpers/toURLEncodedForm.js new file mode 100644 index 0000000..749e13a --- /dev/null +++ b/node_modules/axios/lib/helpers/toURLEncodedForm.js @@ -0,0 +1,19 @@ +'use strict'; + +import utils from '../utils.js'; +import toFormData from './toFormData.js'; +import platform from '../platform/index.js'; + +export default function toURLEncodedForm(data, options) { + return toFormData(data, new platform.classes.URLSearchParams(), { + visitor: function (value, key, path, helpers) { + if (platform.isNode && utils.isBuffer(value)) { + this.append(key, value.toString('base64')); + return false; + } + + return helpers.defaultVisitor.apply(this, arguments); + }, + ...options, + }); +} diff --git a/node_modules/axios/lib/helpers/trackStream.js b/node_modules/axios/lib/helpers/trackStream.js new file mode 100644 index 0000000..c75eace --- /dev/null +++ b/node_modules/axios/lib/helpers/trackStream.js @@ -0,0 +1,89 @@ +export const streamChunk = function* (chunk, chunkSize) { + let len = chunk.byteLength; + + if (!chunkSize || len < chunkSize) { + yield chunk; + return; + } + + let pos = 0; + let end; + + while (pos < len) { + end = pos + chunkSize; + yield chunk.slice(pos, end); + pos = end; + } +}; + +export const readBytes = async function* (iterable, chunkSize) { + for await (const chunk of readStream(iterable)) { + yield* streamChunk(chunk, chunkSize); + } +}; + +const readStream = async function* (stream) { + if (stream[Symbol.asyncIterator]) { + yield* stream; + return; + } + + const reader = stream.getReader(); + try { + for (;;) { + const { done, value } = await reader.read(); + if (done) { + break; + } + yield value; + } + } finally { + await reader.cancel(); + } +}; + +export const trackStream = (stream, chunkSize, onProgress, onFinish) => { + const iterator = readBytes(stream, chunkSize); + + let bytes = 0; + let done; + let _onFinish = (e) => { + if (!done) { + done = true; + onFinish && onFinish(e); + } + }; + + return new ReadableStream( + { + async pull(controller) { + try { + const { done, value } = await iterator.next(); + + if (done) { + _onFinish(); + controller.close(); + return; + } + + let len = value.byteLength; + if (onProgress) { + let loadedBytes = (bytes += len); + onProgress(loadedBytes); + } + controller.enqueue(new Uint8Array(value)); + } catch (err) { + _onFinish(err); + throw err; + } + }, + cancel(reason) { + _onFinish(reason); + return iterator.return(); + }, + }, + { + highWaterMark: 2, + } + ); +}; diff --git a/node_modules/axios/lib/helpers/validator.js b/node_modules/axios/lib/helpers/validator.js new file mode 100644 index 0000000..a152c8c --- /dev/null +++ b/node_modules/axios/lib/helpers/validator.js @@ -0,0 +1,112 @@ +'use strict'; + +import { VERSION } from '../env/data.js'; +import AxiosError from '../core/AxiosError.js'; + +const validators = {}; + +// eslint-disable-next-line func-names +['object', 'boolean', 'number', 'function', 'string', 'symbol'].forEach((type, i) => { + validators[type] = function validator(thing) { + return typeof thing === type || 'a' + (i < 1 ? 'n ' : ' ') + type; + }; +}); + +const deprecatedWarnings = {}; + +/** + * Transitional option validator + * + * @param {function|boolean?} validator - set to false if the transitional option has been removed + * @param {string?} version - deprecated version / removed since version + * @param {string?} message - some message with additional info + * + * @returns {function} + */ +validators.transitional = function transitional(validator, version, message) { + function formatMessage(opt, desc) { + return ( + '[Axios v' + + VERSION + + "] Transitional option '" + + opt + + "'" + + desc + + (message ? '. ' + message : '') + ); + } + + // eslint-disable-next-line func-names + return (value, opt, opts) => { + if (validator === false) { + throw new AxiosError( + formatMessage(opt, ' has been removed' + (version ? ' in ' + version : '')), + AxiosError.ERR_DEPRECATED + ); + } + + if (version && !deprecatedWarnings[opt]) { + deprecatedWarnings[opt] = true; + // eslint-disable-next-line no-console + console.warn( + formatMessage( + opt, + ' has been deprecated since v' + version + ' and will be removed in the near future' + ) + ); + } + + return validator ? validator(value, opt, opts) : true; + }; +}; + +validators.spelling = function spelling(correctSpelling) { + return (value, opt) => { + // eslint-disable-next-line no-console + console.warn(`${opt} is likely a misspelling of ${correctSpelling}`); + return true; + }; +}; + +/** + * Assert object's properties type + * + * @param {object} options + * @param {object} schema + * @param {boolean?} allowUnknown + * + * @returns {object} + */ + +function assertOptions(options, schema, allowUnknown) { + if (typeof options !== 'object' || options === null) { + throw new AxiosError('options must be an object', AxiosError.ERR_BAD_OPTION_VALUE); + } + const keys = Object.keys(options); + let i = keys.length; + while (i-- > 0) { + const opt = keys[i]; + // Use hasOwnProperty so a polluted Object.prototype. cannot supply + // a non-function validator and cause a TypeError. + const validator = Object.prototype.hasOwnProperty.call(schema, opt) ? schema[opt] : undefined; + if (validator) { + const value = options[opt]; + const result = value === undefined || validator(value, opt, options); + if (result !== true) { + throw new AxiosError( + 'option ' + opt + ' must be ' + result, + AxiosError.ERR_BAD_OPTION_VALUE + ); + } + continue; + } + if (allowUnknown !== true) { + throw new AxiosError('Unknown option ' + opt, AxiosError.ERR_BAD_OPTION); + } + } +} + +export default { + assertOptions, + validators, +}; diff --git a/node_modules/axios/lib/platform/browser/classes/Blob.js b/node_modules/axios/lib/platform/browser/classes/Blob.js new file mode 100644 index 0000000..9ec4af8 --- /dev/null +++ b/node_modules/axios/lib/platform/browser/classes/Blob.js @@ -0,0 +1,3 @@ +'use strict'; + +export default typeof Blob !== 'undefined' ? Blob : null; diff --git a/node_modules/axios/lib/platform/browser/classes/FormData.js b/node_modules/axios/lib/platform/browser/classes/FormData.js new file mode 100644 index 0000000..f36d31b --- /dev/null +++ b/node_modules/axios/lib/platform/browser/classes/FormData.js @@ -0,0 +1,3 @@ +'use strict'; + +export default typeof FormData !== 'undefined' ? FormData : null; diff --git a/node_modules/axios/lib/platform/browser/classes/URLSearchParams.js b/node_modules/axios/lib/platform/browser/classes/URLSearchParams.js new file mode 100644 index 0000000..b7dae95 --- /dev/null +++ b/node_modules/axios/lib/platform/browser/classes/URLSearchParams.js @@ -0,0 +1,4 @@ +'use strict'; + +import AxiosURLSearchParams from '../../../helpers/AxiosURLSearchParams.js'; +export default typeof URLSearchParams !== 'undefined' ? URLSearchParams : AxiosURLSearchParams; diff --git a/node_modules/axios/lib/platform/browser/index.js b/node_modules/axios/lib/platform/browser/index.js new file mode 100644 index 0000000..8e5f99c --- /dev/null +++ b/node_modules/axios/lib/platform/browser/index.js @@ -0,0 +1,13 @@ +import URLSearchParams from './classes/URLSearchParams.js'; +import FormData from './classes/FormData.js'; +import Blob from './classes/Blob.js'; + +export default { + isBrowser: true, + classes: { + URLSearchParams, + FormData, + Blob, + }, + protocols: ['http', 'https', 'file', 'blob', 'url', 'data'], +}; diff --git a/node_modules/axios/lib/platform/common/utils.js b/node_modules/axios/lib/platform/common/utils.js new file mode 100644 index 0000000..e4dfe46 --- /dev/null +++ b/node_modules/axios/lib/platform/common/utils.js @@ -0,0 +1,52 @@ +const hasBrowserEnv = typeof window !== 'undefined' && typeof document !== 'undefined'; + +const _navigator = (typeof navigator === 'object' && navigator) || undefined; + +/** + * Determine if we're running in a standard browser environment + * + * This allows axios to run in a web worker, and react-native. + * Both environments support XMLHttpRequest, but not fully standard globals. + * + * web workers: + * typeof window -> undefined + * typeof document -> undefined + * + * react-native: + * navigator.product -> 'ReactNative' + * nativescript + * navigator.product -> 'NativeScript' or 'NS' + * + * @returns {boolean} + */ +const hasStandardBrowserEnv = + hasBrowserEnv && + (!_navigator || ['ReactNative', 'NativeScript', 'NS'].indexOf(_navigator.product) < 0); + +/** + * Determine if we're running in a standard browser webWorker environment + * + * Although the `isStandardBrowserEnv` method indicates that + * `allows axios to run in a web worker`, the WebWorker will still be + * filtered out due to its judgment standard + * `typeof window !== 'undefined' && typeof document !== 'undefined'`. + * This leads to a problem when axios post `FormData` in webWorker + */ +const hasStandardBrowserWebWorkerEnv = (() => { + return ( + typeof WorkerGlobalScope !== 'undefined' && + // eslint-disable-next-line no-undef + self instanceof WorkerGlobalScope && + typeof self.importScripts === 'function' + ); +})(); + +const origin = (hasBrowserEnv && window.location.href) || 'http://localhost'; + +export { + hasBrowserEnv, + hasStandardBrowserWebWorkerEnv, + hasStandardBrowserEnv, + _navigator as navigator, + origin, +}; diff --git a/node_modules/axios/lib/platform/index.js b/node_modules/axios/lib/platform/index.js new file mode 100644 index 0000000..e1094ab --- /dev/null +++ b/node_modules/axios/lib/platform/index.js @@ -0,0 +1,7 @@ +import platform from './node/index.js'; +import * as utils from './common/utils.js'; + +export default { + ...utils, + ...platform, +}; diff --git a/node_modules/axios/lib/platform/node/classes/Buffer.js b/node_modules/axios/lib/platform/node/classes/Buffer.js new file mode 100644 index 0000000..24a3625 --- /dev/null +++ b/node_modules/axios/lib/platform/node/classes/Buffer.js @@ -0,0 +1,11 @@ +'use strict'; + +export default { + isBufferAvailable() { + return typeof Buffer !== 'undefined'; + }, + + from(value) { + return Buffer.from(value); + } +}; diff --git a/node_modules/axios/lib/platform/node/classes/FormData.js b/node_modules/axios/lib/platform/node/classes/FormData.js new file mode 100644 index 0000000..b07f947 --- /dev/null +++ b/node_modules/axios/lib/platform/node/classes/FormData.js @@ -0,0 +1,3 @@ +import FormData from 'form-data'; + +export default FormData; diff --git a/node_modules/axios/lib/platform/node/classes/URLSearchParams.js b/node_modules/axios/lib/platform/node/classes/URLSearchParams.js new file mode 100644 index 0000000..fba5842 --- /dev/null +++ b/node_modules/axios/lib/platform/node/classes/URLSearchParams.js @@ -0,0 +1,4 @@ +'use strict'; + +import url from 'url'; +export default url.URLSearchParams; diff --git a/node_modules/axios/lib/platform/node/index.js b/node_modules/axios/lib/platform/node/index.js new file mode 100644 index 0000000..9979a71 --- /dev/null +++ b/node_modules/axios/lib/platform/node/index.js @@ -0,0 +1,37 @@ +import crypto from 'crypto'; +import URLSearchParams from './classes/URLSearchParams.js'; +import FormData from './classes/FormData.js'; + +const ALPHA = 'abcdefghijklmnopqrstuvwxyz'; + +const DIGIT = '0123456789'; + +const ALPHABET = { + DIGIT, + ALPHA, + ALPHA_DIGIT: ALPHA + ALPHA.toUpperCase() + DIGIT, +}; + +const generateString = (size = 16, alphabet = ALPHABET.ALPHA_DIGIT) => { + let str = ''; + const { length } = alphabet; + const randomValues = new Uint32Array(size); + crypto.randomFillSync(randomValues); + for (let i = 0; i < size; i++) { + str += alphabet[randomValues[i] % length]; + } + + return str; +}; + +export default { + isNode: true, + classes: { + URLSearchParams, + FormData, + Blob: (typeof Blob !== 'undefined' && Blob) || null, + }, + ALPHABET, + generateString, + protocols: ['http', 'https', 'file', 'data'], +}; diff --git a/node_modules/axios/lib/utils.js b/node_modules/axios/lib/utils.js new file mode 100644 index 0000000..6d350fe --- /dev/null +++ b/node_modules/axios/lib/utils.js @@ -0,0 +1,1201 @@ +'use strict'; + +import bind from './helpers/bind.js'; + +// utils is a library of generic helper functions non-specific to axios + +const { toString } = Object.prototype; +const { getPrototypeOf } = Object; +const { iterator, toStringTag } = Symbol; + +/* Creating a function that will check if an object has a property. */ +const hasOwnProperty = ( + ({ hasOwnProperty }) => + (obj, prop) => + hasOwnProperty.call(obj, prop) +)(Object.prototype); + +const isUnsafeObjectKey = (prop) => + typeof prop === 'string' && + (prop === '__proto__' || prop === 'constructor' || prop === 'prototype'); + +/** + * Determine whether an inherited object must be treated as a shared-prototype + * boundary. Cross-realm Object.prototype objects cannot be distinguished + * reliably from application-created null-prototype objects because their + * properties are mutable, so all inherited terminal prototypes are excluded + * as a fail-closed boundary. A null-prototype source still keeps its own + * properties, as produced by mergeConfig and other safe materialization paths. + * + * @param {*} obj The object to inspect + * @param {*} prototype The object's prototype + * @param {boolean} source Whether obj is the original traversal source + * + * @returns {boolean} True when obj is a safe prototype traversal boundary + */ +const isPrototypeBoundary = (obj, prototype, source) => + obj === Object.prototype || (!source && prototype === null); + +/** + * Determine whether an object can retain its identity through code paths that + * add, replace, and remove config properties without bypassing unsafe-key + * filtering. Immutable objects, unsafe-key-bearing objects, and objects with + * accessor or restricted data properties must be materialized instead. + * + * @param {*} obj The object to inspect + * + * @returns {boolean} True when every own property is safe and fully mutable + */ +const isSafeAndFullyMutable = (obj) => { + if (!Object.isExtensible(obj)) { + return false; + } + + const props = Object.getOwnPropertyNames(obj); + + if (Object.getOwnPropertySymbols) { + props.push(...Object.getOwnPropertySymbols(obj)); + } + + return props.every((prop) => { + if (isUnsafeObjectKey(prop)) { + return false; + } + + const descriptor = Object.getOwnPropertyDescriptor(obj, prop); + + return !!descriptor && descriptor.configurable && descriptor.writable === true; + }); +}; + +/** + * Walk the prototype chain (excluding the source realm's Object.prototype) + * looking for an own `prop`. This distinguishes genuine own/inherited members + * — including class accessors and template prototypes — from members injected + * via Object.prototype pollution (e.g. `Object.prototype.username = '...'`), + * which live on Object.prototype itself and are therefore never matched. + * + * @param {*} thing The value whose chain to inspect + * @param {string|symbol} prop The property key to look for + * + * @returns {boolean} True when `prop` is owned below Object.prototype + */ +const hasOwnInPrototypeChain = (thing, prop) => { + let obj = thing; + const seen = []; + + while (obj != null) { + if (seen.indexOf(obj) !== -1) { + return false; + } + seen.push(obj); + + const prototype = getPrototypeOf(obj); + + if (isPrototypeBoundary(obj, prototype, obj === thing)) { + return false; + } + + if (hasOwnProperty(obj, prop)) { + return true; + } + obj = prototype; + } + return false; +}; + +/** + * Read `obj[prop]` only when it is safe from Object.prototype pollution. Own + * properties and members inherited from a non-Object.prototype source (a class + * instance or template object) are honored; a value reachable only through a + * polluted Object.prototype is ignored and `undefined` is returned. + * + * @param {*} obj The source object + * @param {string|symbol} prop The property key to read + * + * @returns {*} The resolved value, or undefined when unsafe/absent + */ +const getSafeProp = (obj, prop) => + obj != null && hasOwnInPrototypeChain(obj, prop) ? obj[prop] : undefined; + +/** + * Flatten an object and its application-defined prototype chain into a + * null-prototype object. Members inherited only from the source realm's + * Object.prototype are deliberately excluded, while class/template members + * below that boundary are preserved. + * + * @param {*} thing The value to flatten + * + * @returns {*} A null-prototype copy, or the original value when it is already + * structurally safe or is not an object + */ +const toSafeFlatObject = (thing) => { + if (thing == null || (typeof thing !== 'object' && typeof thing !== 'function')) { + return thing; + } + + const sourcePrototype = getPrototypeOf(thing); + + if (sourcePrototype === null && isSafeAndFullyMutable(thing)) { + return thing; + } + + const result = Object.create(null); + const merged = Object.create(null); + const seen = []; + let current = thing; + + while (current != null) { + if (seen.indexOf(current) !== -1) { + break; + } + + seen.push(current); + + const prototype = current === thing ? sourcePrototype : getPrototypeOf(current); + + if (isPrototypeBoundary(current, prototype, current === thing)) { + break; + } + + const props = Object.getOwnPropertyNames(current); + + if (Object.getOwnPropertySymbols) { + props.push(...Object.getOwnPropertySymbols(current)); + } + + for (const prop of props) { + if (isUnsafeObjectKey(prop)) { + continue; + } + + if (!hasOwnProperty(merged, prop)) { + result[prop] = thing[prop]; + merged[prop] = true; + } + } + + current = prototype; + } + + return result; +}; + +const kindOf = ((cache) => (thing) => { + const str = toString.call(thing); + return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase()); +})(Object.create(null)); + +const kindOfTest = (type) => { + type = type.toLowerCase(); + return (thing) => kindOf(thing) === type; +}; + +const typeOfTest = (type) => (thing) => typeof thing === type; + +/** + * Determine if a value is a non-null object + * + * @param {Object} val The value to test + * + * @returns {boolean} True if value is an Array, otherwise false + */ +const { isArray } = Array; + +/** + * Determine if a value is undefined + * + * @param {*} val The value to test + * + * @returns {boolean} True if the value is undefined, otherwise false + */ +const isUndefined = typeOfTest('undefined'); + +/** + * Determine if a value is a Buffer + * + * @param {*} val The value to test + * + * @returns {boolean} True if value is a Buffer, otherwise false + */ +function isBuffer(val) { + return ( + val !== null && + !isUndefined(val) && + val.constructor !== null && + !isUndefined(val.constructor) && + isFunction(val.constructor.isBuffer) && + val.constructor.isBuffer(val) + ); +} + +/** + * Determine if a value is an ArrayBuffer + * + * @param {*} val The value to test + * + * @returns {boolean} True if value is an ArrayBuffer, otherwise false + */ +const isArrayBuffer = kindOfTest('ArrayBuffer'); + +/** + * Determine if a value is a view on an ArrayBuffer + * + * @param {*} val The value to test + * + * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false + */ +function isArrayBufferView(val) { + let result; + if (typeof ArrayBuffer !== 'undefined' && ArrayBuffer.isView) { + result = ArrayBuffer.isView(val); + } else { + result = val && val.buffer && isArrayBuffer(val.buffer); + } + return result; +} + +/** + * Determine if a value is a String + * + * @param {*} val The value to test + * + * @returns {boolean} True if value is a String, otherwise false + */ +const isString = typeOfTest('string'); + +/** + * Determine if a value is a Function + * + * @param {*} val The value to test + * @returns {boolean} True if value is a Function, otherwise false + */ +const isFunction = typeOfTest('function'); + +/** + * Determine if a value is a Number + * + * @param {*} val The value to test + * + * @returns {boolean} True if value is a Number, otherwise false + */ +const isNumber = typeOfTest('number'); + +/** + * Determine if a value is an Object + * + * @param {*} thing The value to test + * + * @returns {boolean} True if value is an Object, otherwise false + */ +const isObject = (thing) => thing !== null && typeof thing === 'object'; + +/** + * Determine if a value is a Boolean + * + * @param {*} thing The value to test + * @returns {boolean} True if value is a Boolean, otherwise false + */ +const isBoolean = (thing) => thing === true || thing === false; + +/** + * Determine if a value is a plain Object + * + * @param {*} val The value to test + * + * @returns {boolean} True if value is a plain Object, otherwise false + */ +const isPlainObject = (val) => { + if (!isObject(val)) { + return false; + } + + const prototype = getPrototypeOf(val); + return ( + (prototype === null || prototype === Object.prototype || getPrototypeOf(prototype) === null) && + // Treat own Symbol.toStringTag or Symbol.iterator members as evidence the + // value is tagged/iterable, ignoring members reachable only through shared + // or terminal prototype boundaries. This is exactly what + // hasOwnInPrototypeChain(val, prop) computes here: every prototype admitted + // above (null, Object.prototype, or a terminal null-prototype template) is + // a boundary, so the walk never inspects anything but `val`'s own members, + // and stops before even those when `val` is itself the boundary + // Object.prototype. Checking that inline avoids allocating the walker's + // `seen` list twice per call on the mergeConfig / merge hot path. + (isPrototypeBoundary(val, prototype, true) || + (!hasOwnProperty(val, toStringTag) && !hasOwnProperty(val, iterator))) + ); +}; + +/** + * Determine if a value is an empty object (safely handles Buffers) + * + * @param {*} val The value to test + * + * @returns {boolean} True if value is an empty object, otherwise false + */ +const isEmptyObject = (val) => { + // Early return for non-objects or Buffers to prevent RangeError + if (!isObject(val) || isBuffer(val)) { + return false; + } + + try { + return Object.keys(val).length === 0 && Object.getPrototypeOf(val) === Object.prototype; + } catch (e) { + // Fallback for any other objects that might cause RangeError with Object.keys() + return false; + } +}; + +/** + * Determine if a value is a Date + * + * @param {*} val The value to test + * + * @returns {boolean} True if value is a Date, otherwise false + */ +const isDate = kindOfTest('Date'); + +/** + * Determine if a value is a File + * + * @param {*} val The value to test + * + * @returns {boolean} True if value is a File, otherwise false + */ +const isFile = kindOfTest('File'); + +/** + * Determine if a value is a React Native Blob + * React Native "blob": an object with a `uri` attribute. Optionally, it can + * also have a `name` and `type` attribute to specify filename and content type + * + * @see https://github.com/facebook/react-native/blob/26684cf3adf4094eb6c405d345a75bf8c7c0bf88/Libraries/Network/FormData.js#L68-L71 + * + * @param {*} value The value to test + * + * @returns {boolean} True if value is a React Native Blob, otherwise false + */ +const isReactNativeBlob = (value) => { + return !!(value && typeof value.uri !== 'undefined'); +}; + +/** + * Determine if environment is React Native + * ReactNative `FormData` has a non-standard `getParts()` method + * + * @param {*} formData The formData to test + * + * @returns {boolean} True if environment is React Native, otherwise false + */ +const isReactNative = (formData) => formData && typeof formData.getParts !== 'undefined'; + +/** + * Determine if a value is a Blob + * + * @param {*} val The value to test + * + * @returns {boolean} True if value is a Blob, otherwise false + */ +const isBlob = kindOfTest('Blob'); + +/** + * Determine if a value is a FileList + * + * @param {*} val The value to test + * + * @returns {boolean} True if value is a FileList, otherwise false + */ +const isFileList = kindOfTest('FileList'); +const isSet = kindOfTest('Set'); + +/** + * Determine if a value is a Stream + * + * @param {*} val The value to test + * + * @returns {boolean} True if value is a Stream, otherwise false + */ +const isStream = (val) => isObject(val) && isFunction(val.pipe); + +/** + * Determine if a value is a FormData + * + * @param {*} thing The value to test + * + * @returns {boolean} True if value is an FormData, otherwise false + */ +function getGlobal() { + if (typeof globalThis !== 'undefined') return globalThis; + if (typeof self !== 'undefined') return self; + if (typeof window !== 'undefined') return window; + if (typeof global !== 'undefined') return global; + return {}; +} + +const G = getGlobal(); +const FormDataCtor = typeof G.FormData !== 'undefined' ? G.FormData : undefined; + +const isFormData = (thing) => { + if (!thing) return false; + if (FormDataCtor && thing instanceof FormDataCtor) return true; + // Reject plain objects inheriting directly from Object.prototype so prototype-pollution gadgets can't spoof FormData. + const proto = getPrototypeOf(thing); + if (!proto || proto === Object.prototype) return false; + if (!isFunction(thing.append)) return false; + const kind = kindOf(thing); + return ( + kind === 'formdata' || + // detect form-data instance + (kind === 'object' && isFunction(thing.toString) && thing.toString() === '[object FormData]') + ); +}; + +/** + * Determine if a value is a URLSearchParams object + * + * @param {*} val The value to test + * + * @returns {boolean} True if value is a URLSearchParams object, otherwise false + */ +const isURLSearchParams = kindOfTest('URLSearchParams'); + +const [isReadableStream, isRequest, isResponse, isHeaders] = [ + 'ReadableStream', + 'Request', + 'Response', + 'Headers', +].map(kindOfTest); + +/** + * Trim excess whitespace off the beginning and end of a string + * + * @param {String} str The String to trim + * + * @returns {String} The String freed of excess whitespace + */ +const trim = (str) => { + return str.trim ? str.trim() : str.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, ''); +}; +/** + * Iterate over an Array or an Object invoking a function for each item. + * + * If `obj` is an Array callback will be called passing + * the value, index, and complete array for each item. + * + * If 'obj' is an Object callback will be called passing + * the value, key, and complete object for each property. + * + * @param {Object|Array} obj The object to iterate + * @param {Function} fn The callback to invoke for each item + * + * @param {Object} [options] + * @param {Boolean} [options.allOwnKeys = false] + * @returns {any} + */ +function forEach(obj, fn, { allOwnKeys = false } = {}) { + // Don't bother if no value provided + if (obj === null || typeof obj === 'undefined') { + return; + } + + let i; + let l; + + // Force an array if not already something iterable + if (typeof obj !== 'object') { + /*eslint no-param-reassign:0*/ + obj = [obj]; + } + + if (isArray(obj)) { + // Iterate over array values + for (i = 0, l = obj.length; i < l; i++) { + fn.call(null, obj[i], i, obj); + } + } else { + // Buffer check + if (isBuffer(obj)) { + return; + } + + // Iterate over object keys + const keys = allOwnKeys ? Object.getOwnPropertyNames(obj) : Object.keys(obj); + const len = keys.length; + let key; + + for (i = 0; i < len; i++) { + key = keys[i]; + fn.call(null, obj[key], key, obj); + } + } +} + +/** + * Finds a key in an object, case-insensitive, returning the actual key name. + * Returns null if the object is a Buffer or if no match is found. + * + * @param {Object} obj - The object to search. + * @param {string} key - The key to find (case-insensitive). + * @returns {?string} The actual key name if found, otherwise null. + */ +function findKey(obj, key) { + if (isBuffer(obj)) { + return null; + } + + key = key.toLowerCase(); + const keys = Object.keys(obj); + let i = keys.length; + let _key; + while (i-- > 0) { + _key = keys[i]; + if (key === _key.toLowerCase()) { + return _key; + } + } + return null; +} + +const _global = (() => { + /*eslint no-undef:0*/ + if (typeof globalThis !== 'undefined') return globalThis; + return typeof self !== 'undefined' ? self : typeof window !== 'undefined' ? window : global; +})(); + +const isContextDefined = (context) => !isUndefined(context) && context !== _global; + +/** + * Accepts varargs expecting each argument to be an object, then + * immutably merges the properties of each object and returns result. + * + * When multiple objects contain the same key the later object in + * the arguments list will take precedence. + * + * Example: + * + * ```js + * const result = merge({foo: 123}, {foo: 456}); + * console.log(result.foo); // outputs 456 + * ``` + * + * @param {Object} obj1 Object to merge + * + * @returns {Object} Result of all merge properties + */ +function merge(...objs) { + const { caseless, skipUndefined } = (isContextDefined(this) && this) || {}; + const result = {}; + // Caseless lookup only applies to string keys — symbol keys are + // identity-matched. Every string key that reaches `result` passes through + // this index first, so it can never hold two case variants of one key and a + // lowercase -> key map is exactly what findKey(result, key) would rescan + // Object.keys(result) for on each assignment. + const lowerCaseKeys = caseless ? Object.create(null) : null; + const assignValue = (val, key) => { + // Skip dangerous property names to prevent prototype pollution + if (key === '__proto__' || key === 'constructor' || key === 'prototype') { + return; + } + + let targetKey = key; + if (lowerCaseKeys && typeof key === 'string') { + const lowerKey = key.toLowerCase(); + const knownKey = lowerCaseKeys[lowerKey]; + // A key recorded but absent from `result` was skipped by skipUndefined; + // the later spelling wins then, as it does for findKey. + if (knownKey !== undefined && hasOwnProperty(result, knownKey)) { + targetKey = knownKey; + } else { + lowerCaseKeys[lowerKey] = key; + } + } + // Read via own-prop only — a bare `result[targetKey]` walks the prototype + // chain, so a polluted Object.prototype value could surface here and get + // copied into the merged result. + const existing = hasOwnProperty(result, targetKey) ? result[targetKey] : undefined; + if (isPlainObject(existing) && isPlainObject(val)) { + result[targetKey] = merge(existing, val); + } else if (isPlainObject(val)) { + result[targetKey] = merge({}, val); + } else if (isArray(val)) { + result[targetKey] = val.slice(); + } else if (!skipUndefined || !isUndefined(val)) { + result[targetKey] = val; + } + }; + + for (let i = 0, l = objs.length; i < l; i++) { + const source = objs[i]; + if (!source || isBuffer(source)) { + continue; + } + + forEach(source, assignValue); + + if (typeof source !== 'object' || isArray(source) || !Object.getOwnPropertySymbols) { + continue; + } + + const symbols = Object.getOwnPropertySymbols(source); + for (let j = 0; j < symbols.length; j++) { + const symbol = symbols[j]; + if (propertyIsEnumerable.call(source, symbol)) { + assignValue(source[symbol], symbol); + } + } + } + return result; +} + +/** + * Extends object a by mutably adding to it the properties of object b. + * + * @param {Object} a The object to be extended + * @param {Object} b The object to copy properties from + * @param {Object} thisArg The object to bind function to + * + * @param {Object} [options] + * @param {Boolean} [options.allOwnKeys] + * @returns {Object} The resulting value of object a + */ +const extend = (a, b, thisArg, { allOwnKeys } = {}) => { + forEach( + b, + (val, key) => { + if (thisArg && isFunction(val)) { + Object.defineProperty(a, key, { + // Null-proto descriptor so a polluted Object.prototype.get cannot + // hijack defineProperty's accessor-vs-data resolution. + __proto__: null, + value: bind(val, thisArg), + writable: true, + enumerable: true, + configurable: true, + }); + } else { + Object.defineProperty(a, key, { + __proto__: null, + value: val, + writable: true, + enumerable: true, + configurable: true, + }); + } + }, + { allOwnKeys } + ); + return a; +}; + +/** + * Remove byte order marker. This catches EF BB BF (the UTF-8 BOM) + * + * @param {string} content with BOM + * + * @returns {string} content value without BOM + */ +const stripBOM = (content) => { + if (content.charCodeAt(0) === 0xfeff) { + content = content.slice(1); + } + return content; +}; + +/** + * Inherit the prototype methods from one constructor into another + * @param {function} constructor + * @param {function} superConstructor + * @param {object} [props] + * @param {object} [descriptors] + * + * @returns {void} + */ +const inherits = (constructor, superConstructor, props, descriptors) => { + constructor.prototype = Object.create(superConstructor.prototype, descriptors); + Object.defineProperty(constructor.prototype, 'constructor', { + __proto__: null, + value: constructor, + writable: true, + enumerable: false, + configurable: true, + }); + Object.defineProperty(constructor, 'super', { + __proto__: null, + value: superConstructor.prototype, + }); + props && Object.assign(constructor.prototype, props); +}; + +/** + * Resolve object with deep prototype chain to a flat object + * @param {Object} sourceObj source object + * @param {Object} [destObj] + * @param {Function|Boolean} [filter] + * @param {Function} [propFilter] + * + * @returns {Object} + */ +const toFlatObject = (sourceObj, destObj, filter, propFilter) => { + let props; + let i; + let prop; + const merged = {}; + + destObj = destObj || {}; + // eslint-disable-next-line no-eq-null,eqeqeq + if (sourceObj == null) return destObj; + + do { + props = Object.getOwnPropertyNames(sourceObj); + i = props.length; + while (i-- > 0) { + prop = props[i]; + if ((!propFilter || propFilter(prop, sourceObj, destObj)) && !merged[prop]) { + destObj[prop] = sourceObj[prop]; + merged[prop] = true; + } + } + sourceObj = filter !== false && getPrototypeOf(sourceObj); + } while (sourceObj && (!filter || filter(sourceObj, destObj)) && sourceObj !== Object.prototype); + + return destObj; +}; + +/** + * Determines whether a string ends with the characters of a specified string + * + * @param {String} str + * @param {String} searchString + * @param {Number} [position= 0] + * + * @returns {boolean} + */ +const endsWith = (str, searchString, position) => { + str = String(str); + if (position === undefined || position > str.length) { + position = str.length; + } + position -= searchString.length; + const lastIndex = str.indexOf(searchString, position); + return lastIndex !== -1 && lastIndex === position; +}; + +/** + * Returns new array from array like object or null if failed + * + * @param {*} [thing] + * + * @returns {?Array} + */ +const toArray = (thing) => { + if (!thing) return null; + if (isArray(thing)) return thing; + let i = thing.length; + if (!Number.isSafeInteger(i) || i < 0 || i > 0xffffffff) return null; + + // Bound the copy by actual indexed properties, including hidden and inherited + // members of array-like collections, rather than by the declared length alone. + const indexes = new Set(); + const seen = new Set(); + let source = thing; + + while (source != null && indexes.size < i) { + if (seen.has(source)) return null; + seen.add(source); + + const prototype = getPrototypeOf(source); + if (isPrototypeBoundary(source, prototype, source === thing)) break; + + Object.getOwnPropertyNames(source).forEach((key) => { + const index = +key; + if ( + Number.isInteger(index) && + index >= 0 && + index < i && + String(index) === key && + hasOwnProperty(source, key) + ) { + indexes.add(index); + } + }); + source = prototype; + } + + if (indexes.size !== i) return null; + const arr = new Array(i); + while (i-- > 0) { + arr[i] = thing[i]; + } + return arr; +}; + +/** + * Checking if the Uint8Array exists and if it does, it returns a function that checks if the + * thing passed in is an instance of Uint8Array + * + * @param {TypedArray} + * + * @returns {Array} + */ +// eslint-disable-next-line func-names +const isTypedArray = ((TypedArray) => { + // eslint-disable-next-line func-names + return (thing) => { + return TypedArray && thing instanceof TypedArray; + }; +})(typeof Uint8Array !== 'undefined' && getPrototypeOf(Uint8Array)); + +/** + * For each entry in the object, call the function with the key and value. + * + * @param {Object} obj - The object to iterate over. + * @param {Function} fn - The function to call for each entry. + * + * @returns {void} + */ +const forEachEntry = (obj, fn) => { + const generator = obj && obj[iterator]; + + const _iterator = generator.call(obj); + + let result; + + while ((result = _iterator.next()) && !result.done) { + const pair = result.value; + fn.call(obj, pair[0], pair[1]); + } +}; + +/** + * It takes a regular expression and a string, and returns an array of all the matches + * + * @param {string} regExp - The regular expression to match against. + * @param {string} str - The string to search. + * + * @returns {Array} + */ +const matchAll = (regExp, str) => { + let matches; + const arr = []; + + while ((matches = regExp.exec(str)) !== null) { + arr.push(matches); + } + + return arr; +}; + +/* Checking if the kindOfTest function returns true when passed an HTMLFormElement. */ +const isHTMLForm = kindOfTest('HTMLFormElement'); + +const toCamelCase = (str) => { + return str.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g, function replacer(m, p1, p2) { + return p1.toUpperCase() + p2; + }); +}; + +const { propertyIsEnumerable } = Object.prototype; + +/** + * Determine if a value is a RegExp object + * + * @param {*} val The value to test + * + * @returns {boolean} True if value is a RegExp object, otherwise false + */ +const isRegExp = kindOfTest('RegExp'); + +const reduceDescriptors = (obj, reducer) => { + const descriptors = Object.getOwnPropertyDescriptors(obj); + const reducedDescriptors = {}; + + forEach(descriptors, (descriptor, name) => { + let ret; + if ((ret = reducer(descriptor, name, obj)) !== false) { + reducedDescriptors[name] = ret || descriptor; + } + }); + + Object.defineProperties(obj, reducedDescriptors); +}; + +/** + * Makes all methods read-only + * @param {Object} obj + */ + +const freezeMethods = (obj) => { + reduceDescriptors(obj, (descriptor, name) => { + // skip restricted props in strict mode + if (isFunction(obj) && ['arguments', 'caller', 'callee'].includes(name)) { + return false; + } + + const value = obj[name]; + + if (!isFunction(value)) return; + + descriptor.enumerable = false; + + if ('writable' in descriptor) { + descriptor.writable = false; + return; + } + + if (!descriptor.set) { + descriptor.set = () => { + throw Error("Can not rewrite read-only method '" + name + "'"); + }; + } + }); +}; + +/** + * Converts an array or a delimited string into an object set with values as keys and true as values. + * Useful for fast membership checks. + * + * @param {Array|string} arrayOrString - The array or string to convert. + * @param {string} delimiter - The delimiter to use if input is a string. + * @returns {Object} An object with keys from the array or string, values set to true. + */ +const toObjectSet = (arrayOrString, delimiter) => { + const obj = {}; + + const define = (arr) => { + arr.forEach((value) => { + obj[value] = true; + }); + }; + + isArray(arrayOrString) ? define(arrayOrString) : define(String(arrayOrString).split(delimiter)); + + return obj; +}; + +const noop = () => {}; + +const toFiniteNumber = (value, defaultValue) => { + return value != null && Number.isFinite((value = +value)) ? value : defaultValue; +}; + +/** + * If the thing is a FormData object, return true, otherwise return false. + * + * @param {unknown} thing - The thing to check. + * + * @returns {boolean} + */ +function isSpecCompliantForm(thing) { + return !!( + thing && + isFunction(thing.append) && + thing[toStringTag] === 'FormData' && + thing[iterator] + ); +} + +/** + * Recursively converts an object to a JSON-compatible object, handling circular references and Buffers. + * + * @param {Object} obj - The object to convert. + * @returns {Object} The JSON-compatible object. + */ +const toJSONObject = (obj) => { + const visited = new WeakSet(); + + const visit = (source) => { + if (isObject(source)) { + if (visited.has(source)) { + return; + } + + //Buffer check + if (isBuffer(source)) { + return source; + } + + if (!('toJSON' in source)) { + // add-on descent / delete-on-ascent: preserves path semantics, so DAG nodes serialise at every occurrence (see #7230). + visited.add(source); + + let target; + + if (isSet(source)) { + target = []; + for (const value of source) { + const reducedValue = visit(value); + !isUndefined(reducedValue) && target.push(reducedValue); + } + } else { + target = isArray(source) ? [] : {}; + + forEach(source, (value, key) => { + const reducedValue = visit(value); + !isUndefined(reducedValue) && (target[key] = reducedValue); + }); + } + + visited.delete(source); + + return target; + } + } + + return source; + }; + + return visit(obj); +}; + +/** + * Determines if a value is an async function. + * + * @param {*} thing - The value to test. + * @returns {boolean} True if value is an async function, otherwise false. + */ +const isAsyncFn = kindOfTest('AsyncFunction'); + +/** + * Determines if a value is thenable (has then and catch methods). + * + * @param {*} thing - The value to test. + * @returns {boolean} True if value is thenable, otherwise false. + */ +const isThenable = (thing) => + thing && + (isObject(thing) || isFunction(thing)) && + isFunction(thing.then) && + isFunction(thing.catch); + +// original code +// https://github.com/DigitalBrainJS/AxiosPromise/blob/16deab13710ec09779922131f3fa5954320f83ab/lib/utils.js#L11-L34 + +/** + * Provides a cross-platform setImmediate implementation. + * Uses native setImmediate if available, otherwise falls back to postMessage or setTimeout. + * + * @param {boolean} setImmediateSupported - Whether setImmediate is supported. + * @param {boolean} postMessageSupported - Whether postMessage is supported. + * @returns {Function} A function to schedule a callback asynchronously. + */ +const _setImmediate = ((setImmediateSupported, postMessageSupported) => { + if (setImmediateSupported) { + return setImmediate; + } + + return postMessageSupported + ? ((token, callbacks) => { + _global.addEventListener( + 'message', + ({ source, data }) => { + if (source === _global && data === token) { + callbacks.length && callbacks.shift()(); + } + }, + false + ); + + return (cb) => { + callbacks.push(cb); + _global.postMessage(token, '*'); + }; + })(`axios@${Math.random()}`, []) + : (cb) => setTimeout(cb); +})(typeof setImmediate === 'function', isFunction(_global.postMessage)); + +/** + * Schedules a microtask or asynchronous callback as soon as possible. + * Uses queueMicrotask if available, otherwise falls back to process.nextTick or _setImmediate. + * + * @type {Function} + */ +const asap = + typeof queueMicrotask !== 'undefined' + ? queueMicrotask.bind(_global) + : (typeof process !== 'undefined' && process.nextTick) || _setImmediate; + +// ********************* + +const isIterable = (thing) => thing != null && isFunction(thing[iterator]); + +/** + * Determine if a value is iterable via an iterator that is NOT sourced solely + * from a polluted Object.prototype. Use this instead of `isIterable` whenever + * the iterable comes from untrusted input (e.g. user-supplied header sources), + * so `Object.prototype[Symbol.iterator] = ...` cannot turn an ordinary object + * into an attacker-controlled entries iterator. + * + * @param {*} thing The value to test + * + * @returns {boolean} True if value has a non-polluted iterator + */ +const isSafeIterable = (thing) => + thing != null && hasOwnInPrototypeChain(thing, iterator) && isIterable(thing); + +export default { + isArray, + isArrayBuffer, + isBuffer, + isFormData, + isArrayBufferView, + isString, + isNumber, + isBoolean, + isObject, + isPlainObject, + isEmptyObject, + isReadableStream, + isRequest, + isResponse, + isHeaders, + isUndefined, + isDate, + isFile, + isReactNativeBlob, + isReactNative, + isBlob, + isRegExp, + isFunction, + isStream, + isURLSearchParams, + isTypedArray, + isFileList, + forEach, + merge, + extend, + trim, + stripBOM, + inherits, + toFlatObject, + kindOf, + kindOfTest, + endsWith, + toArray, + forEachEntry, + matchAll, + isHTMLForm, + hasOwnProperty, + hasOwnProp: hasOwnProperty, // an alias to avoid ESLint no-prototype-builtins detection + hasOwnInPrototypeChain, + getSafeProp, + toSafeFlatObject, + reduceDescriptors, + freezeMethods, + toObjectSet, + toCamelCase, + noop, + toFiniteNumber, + findKey, + global: _global, + isContextDefined, + isSpecCompliantForm, + toJSONObject, + isAsyncFn, + isThenable, + setImmediate: _setImmediate, + asap, + isIterable, + isSafeIterable, +}; diff --git a/node_modules/axios/package.json b/node_modules/axios/package.json new file mode 100644 index 0000000..2f033b7 --- /dev/null +++ b/node_modules/axios/package.json @@ -0,0 +1,202 @@ +{ + "name": "axios", + "version": "1.21.1", + "description": "Promise based HTTP client for the browser and node.js", + "main": "./dist/node/axios.cjs", + "module": "./index.js", + "type": "module", + "types": "index.d.ts", + "jsdelivr": "dist/axios.min.js", + "unpkg": "dist/axios.min.js", + "typings": "./index.d.ts", + "exports": { + ".": { + "types": { + "require": "./index.d.cts", + "default": "./index.d.ts" + }, + "bun": { + "require": "./dist/node/axios.cjs", + "default": "./index.js" + }, + "react-native": { + "require": "./dist/browser/axios.cjs", + "default": "./dist/esm/axios.js" + }, + "browser": { + "require": "./dist/browser/axios.cjs", + "default": "./index.js" + }, + "default": { + "require": "./dist/node/axios.cjs", + "default": "./index.js" + } + }, + "./lib/adapters/http.js": "./lib/adapters/http.js", + "./lib/adapters/xhr.js": "./lib/adapters/xhr.js", + "./unsafe/*": "./lib/*", + "./unsafe/core/settle.js": "./lib/core/settle.js", + "./unsafe/core/buildFullPath.js": "./lib/core/buildFullPath.js", + "./unsafe/helpers/isAbsoluteURL.js": "./lib/helpers/isAbsoluteURL.js", + "./unsafe/helpers/buildURL.js": "./lib/helpers/buildURL.js", + "./unsafe/helpers/combineURLs.js": "./lib/helpers/combineURLs.js", + "./unsafe/adapters/http.js": "./lib/adapters/http.js", + "./unsafe/adapters/xhr.js": "./lib/adapters/xhr.js", + "./unsafe/utils.js": "./lib/utils.js", + "./package.json": "./package.json", + "./dist/browser/axios.cjs": "./dist/browser/axios.cjs", + "./dist/node/axios.cjs": "./dist/node/axios.cjs" + }, + "browser": { + "./dist/node/axios.cjs": "./dist/browser/axios.cjs", + "./lib/adapters/http.js": "./lib/helpers/null.js", + "./lib/platform/node/index.js": "./lib/platform/browser/index.js", + "./lib/platform/node/classes/Buffer.js": "./lib/helpers/null.js", + "./lib/platform/node/classes/FormData.js": "./lib/helpers/null.js" + }, + "react-native": { + "./dist/node/axios.cjs": "./dist/browser/axios.cjs", + "./lib/adapters/http.js": "./lib/helpers/null.js", + "./lib/platform/node/index.js": "./lib/platform/browser/index.js", + "./lib/platform/node/classes/Buffer.js": "./lib/helpers/null.js", + "./lib/platform/node/classes/FormData.js": "./lib/helpers/null.js" + }, + "repository": { + "type": "git", + "url": "https://github.com/axios/axios.git" + }, + "keywords": [ + "xhr", + "http", + "ajax", + "promise", + "node", + "browser", + "fetch", + "rest", + "api", + "client" + ], + "author": "Matt Zabriskie", + "contributors": [ + "Jay (https://github.com/jasonsaayman)", + "Matt Zabriskie (https://github.com/mzabriskie)", + "Dmitriy Mozgovoy (https://github.com/DigitalBrainJS)", + "Nick Uraltsev (https://github.com/nickuraltsev)", + "Emily Morehouse (https://github.com/emilyemorehouse)", + "Rubén Norte (https://github.com/rubennorte)", + "Justin Beckwith (https://github.com/JustinBeckwith)", + "Martti Laine (https://github.com/codeclown)", + "Xianming Zhong (https://github.com/chinesedfan)", + "Shaan Majid (https://github.com/shaanmajid)", + "Remco Haszing (https://github.com/remcohaszing)", + "Willian Agostini (https://github.com/WillianAgostini)", + "Rikki Gibson (https://github.com/RikkiGibson)" + ], + "sideEffects": false, + "license": "MIT", + "bugs": { + "url": "https://github.com/axios/axios/issues" + }, + "homepage": "https://axios-http.com", + "files": [ + "index.js", + "index.d.ts", + "index.d.cts", + "CHANGELOG.md", + "MIGRATION_GUIDE.md", + "lib/", + "dist/axios.js", + "dist/axios.min.js", + "dist/axios.min.js.map", + "dist/esm/axios.js", + "dist/esm/axios.min.js", + "dist/esm/axios.min.js.map", + "dist/browser/axios.cjs", + "dist/node/axios.cjs" + ], + "scripts": { + "build": "gulp clear && cross-env NODE_ENV=production rollup -c", + "version": "npm run build && git add package.json", + "preversion": "gulp version", + "test": "npm run test:vitest", + "test:vitest": "vitest run", + "test:vitest:unit": "vitest run --project unit", + "test:vitest:browser": "vitest run --project browser", + "test:vitest:browser:headless": "vitest run --project browser-headless", + "test:vitest:watch": "vitest", + "test:smoke:cjs:vitest": "npm --prefix tests/smoke/cjs run test:smoke:cjs:mocha", + "test:smoke:esm:vitest": "npm --prefix tests/smoke/esm run test:smoke:esm:vitest", + "test:smoke:deno": "deno task --cwd tests/smoke/deno test", + "test:smoke:bun": "bun test --cwd tests/smoke/bun", + "test:module:cjs": "npm --prefix tests/module/cjs run test:module:cjs", + "test:module:esm": "npm --prefix tests/module/esm run test:module:esm", + "docs:dev": "cd docs && npm run docs:dev", + "start": "node ./sandbox/server.js", + "examples": "node ./examples/server.js", + "lint": "eslint lib/**/*.js", + "fix": "eslint --fix lib/**/*.js", + "prepare": "husky" + }, + "dependencies": { + "follow-redirects": "^1.16.2", + "form-data": "^4.0.6", + "https-proxy-agent": "^5.0.1", + "proxy-from-env": "^2.1.0" + }, + "devDependencies": { + "@babel/core": "^7.29.7", + "@babel/preset-env": "^7.29.7", + "@commitlint/cli": "^21.2.4", + "@commitlint/config-conventional": "^21.2.4", + "@eslint/js": "^10.0.1", + "@rollup/plugin-alias": "^6.0.1", + "@rollup/plugin-babel": "^7.1.0", + "@rollup/plugin-commonjs": "^29.0.3", + "@rollup/plugin-json": "^6.1.0", + "@rollup/plugin-node-resolve": "^16.0.3", + "@rollup/plugin-terser": "^1.0.2", + "@vitest/browser": "^5.0.5", + "@vitest/browser-playwright": "^5.0.5", + "abortcontroller-polyfill": "^1.7.8", + "acorn": "^8.19.0", + "body-parser": "^2.4.0", + "cross-env": "^10.1.0", + "dev-null": "^0.1.1", + "eslint": "^10.13.0", + "express": "^5.3.0", + "formdata-node": "^6.0.3", + "formidable": "^3.5.4", + "fs-extra": "^11.4.1", + "get-stream": "^9.0.1", + "globals": "^17.13.0", + "gulp": "^5.0.1", + "husky": "^9.1.7", + "lint-staged": "^17.6.0", + "minimist": "^1.2.8", + "multer": "^2.5.0", + "playwright": "^1.64.1", + "prettier": "^3.9.10", + "rollup": "^4.66.0", + "rollup-plugin-bundle-size": "^1.0.3", + "selfsigned": "^5.5.0", + "stream-throttle": "^0.1.3", + "typescript": "^7.0.2", + "vitest": "^5.0.5" + }, + "commitlint": { + "rules": { + "header-max-length": [ + 2, + "always", + 130 + ] + }, + "extends": [ + "@commitlint/config-conventional" + ] + }, + "lint-staged": { + "*.{js,cjs,mjs,ts,json,md,yml,yaml}": "prettier --write" + } +} \ No newline at end of file diff --git a/node_modules/call-bind-apply-helpers/.eslintrc b/node_modules/call-bind-apply-helpers/.eslintrc new file mode 100644 index 0000000..201e859 --- /dev/null +++ b/node_modules/call-bind-apply-helpers/.eslintrc @@ -0,0 +1,17 @@ +{ + "root": true, + + "extends": "@ljharb", + + "rules": { + "func-name-matching": 0, + "id-length": 0, + "new-cap": [2, { + "capIsNewExceptions": [ + "GetIntrinsic", + ], + }], + "no-extra-parens": 0, + "no-magic-numbers": 0, + }, +} diff --git a/node_modules/call-bind-apply-helpers/.github/FUNDING.yml b/node_modules/call-bind-apply-helpers/.github/FUNDING.yml new file mode 100644 index 0000000..0011e9d --- /dev/null +++ b/node_modules/call-bind-apply-helpers/.github/FUNDING.yml @@ -0,0 +1,12 @@ +# These are supported funding model platforms + +github: [ljharb] +patreon: # Replace with a single Patreon username +open_collective: # Replace with a single Open Collective username +ko_fi: # Replace with a single Ko-fi username +tidelift: npm/call-bind-apply-helpers +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +otechie: # Replace with a single Otechie username +custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/node_modules/call-bind-apply-helpers/.nycrc b/node_modules/call-bind-apply-helpers/.nycrc new file mode 100644 index 0000000..bdd626c --- /dev/null +++ b/node_modules/call-bind-apply-helpers/.nycrc @@ -0,0 +1,9 @@ +{ + "all": true, + "check-coverage": false, + "reporter": ["text-summary", "text", "html", "json"], + "exclude": [ + "coverage", + "test" + ] +} diff --git a/node_modules/call-bind-apply-helpers/CHANGELOG.md b/node_modules/call-bind-apply-helpers/CHANGELOG.md new file mode 100644 index 0000000..2484942 --- /dev/null +++ b/node_modules/call-bind-apply-helpers/CHANGELOG.md @@ -0,0 +1,30 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [v1.0.2](https://github.com/ljharb/call-bind-apply-helpers/compare/v1.0.1...v1.0.2) - 2025-02-12 + +### Commits + +- [types] improve inferred types [`e6f9586`](https://github.com/ljharb/call-bind-apply-helpers/commit/e6f95860a3c72879cb861a858cdfb8138fbedec1) +- [Dev Deps] update `@arethetypeswrong/cli`, `@ljharb/tsconfig`, `@types/tape`, `es-value-fixtures`, `for-each`, `has-strict-mode`, `object-inspect` [`e43d540`](https://github.com/ljharb/call-bind-apply-helpers/commit/e43d5409f97543bfbb11f345d47d8ce4e066d8c1) + +## [v1.0.1](https://github.com/ljharb/call-bind-apply-helpers/compare/v1.0.0...v1.0.1) - 2024-12-08 + +### Commits + +- [types] `reflectApply`: fix types [`4efc396`](https://github.com/ljharb/call-bind-apply-helpers/commit/4efc3965351a4f02cc55e836fa391d3d11ef2ef8) +- [Fix] `reflectApply`: oops, Reflect is not a function [`83cc739`](https://github.com/ljharb/call-bind-apply-helpers/commit/83cc7395de6b79b7730bdf092f1436f0b1263c75) +- [Dev Deps] update `@arethetypeswrong/cli` [`80bd5d3`](https://github.com/ljharb/call-bind-apply-helpers/commit/80bd5d3ae58b4f6b6995ce439dd5a1bcb178a940) + +## v1.0.0 - 2024-12-05 + +### Commits + +- Initial implementation, tests, readme [`7879629`](https://github.com/ljharb/call-bind-apply-helpers/commit/78796290f9b7430c9934d6f33d94ae9bc89fce04) +- Initial commit [`3f1dc16`](https://github.com/ljharb/call-bind-apply-helpers/commit/3f1dc164afc43285631b114a5f9dd9137b2b952f) +- npm init [`081df04`](https://github.com/ljharb/call-bind-apply-helpers/commit/081df048c312fcee400922026f6e97281200a603) +- Only apps should have lockfiles [`5b9ca0f`](https://github.com/ljharb/call-bind-apply-helpers/commit/5b9ca0fe8101ebfaf309c549caac4e0a017ed930) diff --git a/node_modules/call-bind-apply-helpers/LICENSE b/node_modules/call-bind-apply-helpers/LICENSE new file mode 100644 index 0000000..f82f389 --- /dev/null +++ b/node_modules/call-bind-apply-helpers/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2024 Jordan Harband + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/call-bind-apply-helpers/README.md b/node_modules/call-bind-apply-helpers/README.md new file mode 100644 index 0000000..8fc0dae --- /dev/null +++ b/node_modules/call-bind-apply-helpers/README.md @@ -0,0 +1,62 @@ +# call-bind-apply-helpers [![Version Badge][npm-version-svg]][package-url] + +[![github actions][actions-image]][actions-url] +[![coverage][codecov-image]][codecov-url] +[![dependency status][deps-svg]][deps-url] +[![dev dependency status][dev-deps-svg]][dev-deps-url] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][npm-badge-png]][package-url] + +Helper functions around Function call/apply/bind, for use in `call-bind`. + +The only packages that should likely ever use this package directly are `call-bind` and `get-intrinsic`. +Please use `call-bind` unless you have a very good reason not to. + +## Getting started + +```sh +npm install --save call-bind-apply-helpers +``` + +## Usage/Examples + +```js +const assert = require('assert'); +const callBindBasic = require('call-bind-apply-helpers'); + +function f(a, b) { + assert.equal(this, 1); + assert.equal(a, 2); + assert.equal(b, 3); + assert.equal(arguments.length, 2); +} + +const fBound = callBindBasic([f, 1]); + +delete Function.prototype.call; +delete Function.prototype.bind; + +fBound(2, 3); +``` + +## Tests + +Clone the repo, `npm install`, and run `npm test` + +[package-url]: https://npmjs.org/package/call-bind-apply-helpers +[npm-version-svg]: https://versionbadg.es/ljharb/call-bind-apply-helpers.svg +[deps-svg]: https://david-dm.org/ljharb/call-bind-apply-helpers.svg +[deps-url]: https://david-dm.org/ljharb/call-bind-apply-helpers +[dev-deps-svg]: https://david-dm.org/ljharb/call-bind-apply-helpers/dev-status.svg +[dev-deps-url]: https://david-dm.org/ljharb/call-bind-apply-helpers#info=devDependencies +[npm-badge-png]: https://nodei.co/npm/call-bind-apply-helpers.png?downloads=true&stars=true +[license-image]: https://img.shields.io/npm/l/call-bind-apply-helpers.svg +[license-url]: LICENSE +[downloads-image]: https://img.shields.io/npm/dm/call-bind-apply-helpers.svg +[downloads-url]: https://npm-stat.com/charts.html?package=call-bind-apply-helpers +[codecov-image]: https://codecov.io/gh/ljharb/call-bind-apply-helpers/branch/main/graphs/badge.svg +[codecov-url]: https://app.codecov.io/gh/ljharb/call-bind-apply-helpers/ +[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/ljharb/call-bind-apply-helpers +[actions-url]: https://github.com/ljharb/call-bind-apply-helpers/actions diff --git a/node_modules/call-bind-apply-helpers/actualApply.d.ts b/node_modules/call-bind-apply-helpers/actualApply.d.ts new file mode 100644 index 0000000..b87286a --- /dev/null +++ b/node_modules/call-bind-apply-helpers/actualApply.d.ts @@ -0,0 +1 @@ +export = Reflect.apply; \ No newline at end of file diff --git a/node_modules/call-bind-apply-helpers/actualApply.js b/node_modules/call-bind-apply-helpers/actualApply.js new file mode 100644 index 0000000..ffa5135 --- /dev/null +++ b/node_modules/call-bind-apply-helpers/actualApply.js @@ -0,0 +1,10 @@ +'use strict'; + +var bind = require('function-bind'); + +var $apply = require('./functionApply'); +var $call = require('./functionCall'); +var $reflectApply = require('./reflectApply'); + +/** @type {import('./actualApply')} */ +module.exports = $reflectApply || bind.call($call, $apply); diff --git a/node_modules/call-bind-apply-helpers/applyBind.d.ts b/node_modules/call-bind-apply-helpers/applyBind.d.ts new file mode 100644 index 0000000..d176c1a --- /dev/null +++ b/node_modules/call-bind-apply-helpers/applyBind.d.ts @@ -0,0 +1,19 @@ +import actualApply from './actualApply'; + +type TupleSplitHead = T['length'] extends N + ? T + : T extends [...infer R, any] + ? TupleSplitHead + : never + +type TupleSplitTail = O['length'] extends N + ? T + : T extends [infer F, ...infer R] + ? TupleSplitTail<[...R], N, [...O, F]> + : never + +type TupleSplit = [TupleSplitHead, TupleSplitTail] + +declare function applyBind(...args: TupleSplit, 2>[1]): ReturnType; + +export = applyBind; \ No newline at end of file diff --git a/node_modules/call-bind-apply-helpers/applyBind.js b/node_modules/call-bind-apply-helpers/applyBind.js new file mode 100644 index 0000000..d2b7723 --- /dev/null +++ b/node_modules/call-bind-apply-helpers/applyBind.js @@ -0,0 +1,10 @@ +'use strict'; + +var bind = require('function-bind'); +var $apply = require('./functionApply'); +var actualApply = require('./actualApply'); + +/** @type {import('./applyBind')} */ +module.exports = function applyBind() { + return actualApply(bind, $apply, arguments); +}; diff --git a/node_modules/call-bind-apply-helpers/functionApply.d.ts b/node_modules/call-bind-apply-helpers/functionApply.d.ts new file mode 100644 index 0000000..1f6e11b --- /dev/null +++ b/node_modules/call-bind-apply-helpers/functionApply.d.ts @@ -0,0 +1 @@ +export = Function.prototype.apply; \ No newline at end of file diff --git a/node_modules/call-bind-apply-helpers/functionApply.js b/node_modules/call-bind-apply-helpers/functionApply.js new file mode 100644 index 0000000..c71df9c --- /dev/null +++ b/node_modules/call-bind-apply-helpers/functionApply.js @@ -0,0 +1,4 @@ +'use strict'; + +/** @type {import('./functionApply')} */ +module.exports = Function.prototype.apply; diff --git a/node_modules/call-bind-apply-helpers/functionCall.d.ts b/node_modules/call-bind-apply-helpers/functionCall.d.ts new file mode 100644 index 0000000..15e93df --- /dev/null +++ b/node_modules/call-bind-apply-helpers/functionCall.d.ts @@ -0,0 +1 @@ +export = Function.prototype.call; \ No newline at end of file diff --git a/node_modules/call-bind-apply-helpers/functionCall.js b/node_modules/call-bind-apply-helpers/functionCall.js new file mode 100644 index 0000000..7a8d873 --- /dev/null +++ b/node_modules/call-bind-apply-helpers/functionCall.js @@ -0,0 +1,4 @@ +'use strict'; + +/** @type {import('./functionCall')} */ +module.exports = Function.prototype.call; diff --git a/node_modules/call-bind-apply-helpers/index.d.ts b/node_modules/call-bind-apply-helpers/index.d.ts new file mode 100644 index 0000000..541516b --- /dev/null +++ b/node_modules/call-bind-apply-helpers/index.d.ts @@ -0,0 +1,64 @@ +type RemoveFromTuple< + Tuple extends readonly unknown[], + RemoveCount extends number, + Index extends 1[] = [] +> = Index["length"] extends RemoveCount + ? Tuple + : Tuple extends [infer First, ...infer Rest] + ? RemoveFromTuple + : Tuple; + +type ConcatTuples< + Prefix extends readonly unknown[], + Suffix extends readonly unknown[] +> = [...Prefix, ...Suffix]; + +type ExtractFunctionParams = T extends (this: infer TThis, ...args: infer P extends readonly unknown[]) => infer R + ? { thisArg: TThis; params: P; returnType: R } + : never; + +type BindFunction< + T extends (this: any, ...args: any[]) => any, + TThis, + TBoundArgs extends readonly unknown[], + ReceiverBound extends boolean +> = ExtractFunctionParams extends { + thisArg: infer OrigThis; + params: infer P extends readonly unknown[]; + returnType: infer R; +} + ? ReceiverBound extends true + ? (...args: RemoveFromTuple>) => R extends [OrigThis, ...infer Rest] + ? [TThis, ...Rest] // Replace `this` with `thisArg` + : R + : >>( + thisArg: U, + ...args: RemainingArgs + ) => R extends [OrigThis, ...infer Rest] + ? [U, ...ConcatTuples] // Preserve bound args in return type + : R + : never; + +declare function callBind< + const T extends (this: any, ...args: any[]) => any, + Extracted extends ExtractFunctionParams, + const TBoundArgs extends Partial & readonly unknown[], + const TThis extends Extracted["thisArg"] +>( + args: [fn: T, thisArg: TThis, ...boundArgs: TBoundArgs] +): BindFunction; + +declare function callBind< + const T extends (this: any, ...args: any[]) => any, + Extracted extends ExtractFunctionParams, + const TBoundArgs extends Partial & readonly unknown[] +>( + args: [fn: T, ...boundArgs: TBoundArgs] +): BindFunction; + +declare function callBind( + args: [fn: Exclude, ...rest: TArgs] +): never; + +// export as namespace callBind; +export = callBind; diff --git a/node_modules/call-bind-apply-helpers/index.js b/node_modules/call-bind-apply-helpers/index.js new file mode 100644 index 0000000..2f6dab4 --- /dev/null +++ b/node_modules/call-bind-apply-helpers/index.js @@ -0,0 +1,15 @@ +'use strict'; + +var bind = require('function-bind'); +var $TypeError = require('es-errors/type'); + +var $call = require('./functionCall'); +var $actualApply = require('./actualApply'); + +/** @type {(args: [Function, thisArg?: unknown, ...args: unknown[]]) => Function} TODO FIXME, find a way to use import('.') */ +module.exports = function callBindBasic(args) { + if (args.length < 1 || typeof args[0] !== 'function') { + throw new $TypeError('a function is required'); + } + return $actualApply(bind, $call, args); +}; diff --git a/node_modules/call-bind-apply-helpers/package.json b/node_modules/call-bind-apply-helpers/package.json new file mode 100644 index 0000000..923b8be --- /dev/null +++ b/node_modules/call-bind-apply-helpers/package.json @@ -0,0 +1,85 @@ +{ + "name": "call-bind-apply-helpers", + "version": "1.0.2", + "description": "Helper functions around Function call/apply/bind, for use in `call-bind`", + "main": "index.js", + "exports": { + ".": "./index.js", + "./actualApply": "./actualApply.js", + "./applyBind": "./applyBind.js", + "./functionApply": "./functionApply.js", + "./functionCall": "./functionCall.js", + "./reflectApply": "./reflectApply.js", + "./package.json": "./package.json" + }, + "scripts": { + "prepack": "npmignore --auto --commentLines=auto", + "prepublish": "not-in-publish || npm run prepublishOnly", + "prepublishOnly": "safe-publish-latest", + "prelint": "evalmd README.md", + "lint": "eslint --ext=.js,.mjs .", + "postlint": "tsc -p . && attw -P", + "pretest": "npm run lint", + "tests-only": "nyc tape 'test/**/*.js'", + "test": "npm run tests-only", + "posttest": "npx npm@'>=10.2' audit --production", + "version": "auto-changelog && git add CHANGELOG.md", + "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/ljharb/call-bind-apply-helpers.git" + }, + "author": "Jordan Harband ", + "license": "MIT", + "bugs": { + "url": "https://github.com/ljharb/call-bind-apply-helpers/issues" + }, + "homepage": "https://github.com/ljharb/call-bind-apply-helpers#readme", + "dependencies": { + "es-errors": "^1.3.0", + "function-bind": "^1.1.2" + }, + "devDependencies": { + "@arethetypeswrong/cli": "^0.17.3", + "@ljharb/eslint-config": "^21.1.1", + "@ljharb/tsconfig": "^0.2.3", + "@types/for-each": "^0.3.3", + "@types/function-bind": "^1.1.10", + "@types/object-inspect": "^1.13.0", + "@types/tape": "^5.8.1", + "auto-changelog": "^2.5.0", + "encoding": "^0.1.13", + "es-value-fixtures": "^1.7.1", + "eslint": "=8.8.0", + "evalmd": "^0.0.19", + "for-each": "^0.3.5", + "has-strict-mode": "^1.1.0", + "in-publish": "^2.0.1", + "npmignore": "^0.3.1", + "nyc": "^10.3.2", + "object-inspect": "^1.13.4", + "safe-publish-latest": "^2.0.0", + "tape": "^5.9.0", + "typescript": "next" + }, + "testling": { + "files": "test/index.js" + }, + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false, + "hideCredit": true + }, + "publishConfig": { + "ignore": [ + ".github/workflows" + ] + }, + "engines": { + "node": ">= 0.4" + } +} diff --git a/node_modules/call-bind-apply-helpers/reflectApply.d.ts b/node_modules/call-bind-apply-helpers/reflectApply.d.ts new file mode 100644 index 0000000..6b2ae76 --- /dev/null +++ b/node_modules/call-bind-apply-helpers/reflectApply.d.ts @@ -0,0 +1,3 @@ +declare const reflectApply: false | typeof Reflect.apply; + +export = reflectApply; diff --git a/node_modules/call-bind-apply-helpers/reflectApply.js b/node_modules/call-bind-apply-helpers/reflectApply.js new file mode 100644 index 0000000..3d03caa --- /dev/null +++ b/node_modules/call-bind-apply-helpers/reflectApply.js @@ -0,0 +1,4 @@ +'use strict'; + +/** @type {import('./reflectApply')} */ +module.exports = typeof Reflect !== 'undefined' && Reflect && Reflect.apply; diff --git a/node_modules/call-bind-apply-helpers/test/index.js b/node_modules/call-bind-apply-helpers/test/index.js new file mode 100644 index 0000000..1cdc89e --- /dev/null +++ b/node_modules/call-bind-apply-helpers/test/index.js @@ -0,0 +1,63 @@ +'use strict'; + +var callBind = require('../'); +var hasStrictMode = require('has-strict-mode')(); +var forEach = require('for-each'); +var inspect = require('object-inspect'); +var v = require('es-value-fixtures'); + +var test = require('tape'); + +test('callBindBasic', function (t) { + forEach(v.nonFunctions, function (nonFunction) { + t['throws']( + // @ts-expect-error + function () { callBind([nonFunction]); }, + TypeError, + inspect(nonFunction) + ' is not a function' + ); + }); + + var sentinel = { sentinel: true }; + /** @type {(this: T, a: A, b: B) => [T | undefined, A, B]} */ + var func = function (a, b) { + // eslint-disable-next-line no-invalid-this + return [!hasStrictMode && this === global ? undefined : this, a, b]; + }; + t.equal(func.length, 2, 'original function length is 2'); + + /** type {(thisArg: unknown, a: number, b: number) => [unknown, number, number]} */ + var bound = callBind([func]); + /** type {((a: number, b: number) => [typeof sentinel, typeof a, typeof b])} */ + var boundR = callBind([func, sentinel]); + /** type {((b: number) => [typeof sentinel, number, typeof b])} */ + var boundArg = callBind([func, sentinel, /** @type {const} */ (1)]); + + // @ts-expect-error + t.deepEqual(bound(), [undefined, undefined, undefined], 'bound func with no args'); + + // @ts-expect-error + t.deepEqual(func(), [undefined, undefined, undefined], 'unbound func with too few args'); + // @ts-expect-error + t.deepEqual(bound(1, 2), [hasStrictMode ? 1 : Object(1), 2, undefined], 'bound func too few args'); + // @ts-expect-error + t.deepEqual(boundR(), [sentinel, undefined, undefined], 'bound func with receiver, with too few args'); + // @ts-expect-error + t.deepEqual(boundArg(), [sentinel, 1, undefined], 'bound func with receiver and arg, with too few args'); + + t.deepEqual(func(1, 2), [undefined, 1, 2], 'unbound func with right args'); + t.deepEqual(bound(1, 2, 3), [hasStrictMode ? 1 : Object(1), 2, 3], 'bound func with right args'); + t.deepEqual(boundR(1, 2), [sentinel, 1, 2], 'bound func with receiver, with right args'); + t.deepEqual(boundArg(2), [sentinel, 1, 2], 'bound func with receiver and arg, with right arg'); + + // @ts-expect-error + t.deepEqual(func(1, 2, 3), [undefined, 1, 2], 'unbound func with too many args'); + // @ts-expect-error + t.deepEqual(bound(1, 2, 3, 4), [hasStrictMode ? 1 : Object(1), 2, 3], 'bound func with too many args'); + // @ts-expect-error + t.deepEqual(boundR(1, 2, 3), [sentinel, 1, 2], 'bound func with receiver, with too many args'); + // @ts-expect-error + t.deepEqual(boundArg(2, 3), [sentinel, 1, 2], 'bound func with receiver and arg, with too many args'); + + t.end(); +}); diff --git a/node_modules/call-bind-apply-helpers/tsconfig.json b/node_modules/call-bind-apply-helpers/tsconfig.json new file mode 100644 index 0000000..aef9993 --- /dev/null +++ b/node_modules/call-bind-apply-helpers/tsconfig.json @@ -0,0 +1,9 @@ +{ + "extends": "@ljharb/tsconfig", + "compilerOptions": { + "target": "es2021", + }, + "exclude": [ + "coverage", + ], +} \ No newline at end of file diff --git a/node_modules/combined-stream/License b/node_modules/combined-stream/License new file mode 100644 index 0000000..4804b7a --- /dev/null +++ b/node_modules/combined-stream/License @@ -0,0 +1,19 @@ +Copyright (c) 2011 Debuggable Limited + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/combined-stream/Readme.md b/node_modules/combined-stream/Readme.md new file mode 100644 index 0000000..9e367b5 --- /dev/null +++ b/node_modules/combined-stream/Readme.md @@ -0,0 +1,138 @@ +# combined-stream + +A stream that emits multiple other streams one after another. + +**NB** Currently `combined-stream` works with streams version 1 only. There is ongoing effort to switch this library to streams version 2. Any help is welcome. :) Meanwhile you can explore other libraries that provide streams2 support with more or less compatibility with `combined-stream`. + +- [combined-stream2](https://www.npmjs.com/package/combined-stream2): A drop-in streams2-compatible replacement for the combined-stream module. + +- [multistream](https://www.npmjs.com/package/multistream): A stream that emits multiple other streams one after another. + +## Installation + +``` bash +npm install combined-stream +``` + +## Usage + +Here is a simple example that shows how you can use combined-stream to combine +two files into one: + +``` javascript +var CombinedStream = require('combined-stream'); +var fs = require('fs'); + +var combinedStream = CombinedStream.create(); +combinedStream.append(fs.createReadStream('file1.txt')); +combinedStream.append(fs.createReadStream('file2.txt')); + +combinedStream.pipe(fs.createWriteStream('combined.txt')); +``` + +While the example above works great, it will pause all source streams until +they are needed. If you don't want that to happen, you can set `pauseStreams` +to `false`: + +``` javascript +var CombinedStream = require('combined-stream'); +var fs = require('fs'); + +var combinedStream = CombinedStream.create({pauseStreams: false}); +combinedStream.append(fs.createReadStream('file1.txt')); +combinedStream.append(fs.createReadStream('file2.txt')); + +combinedStream.pipe(fs.createWriteStream('combined.txt')); +``` + +However, what if you don't have all the source streams yet, or you don't want +to allocate the resources (file descriptors, memory, etc.) for them right away? +Well, in that case you can simply provide a callback that supplies the stream +by calling a `next()` function: + +``` javascript +var CombinedStream = require('combined-stream'); +var fs = require('fs'); + +var combinedStream = CombinedStream.create(); +combinedStream.append(function(next) { + next(fs.createReadStream('file1.txt')); +}); +combinedStream.append(function(next) { + next(fs.createReadStream('file2.txt')); +}); + +combinedStream.pipe(fs.createWriteStream('combined.txt')); +``` + +## API + +### CombinedStream.create([options]) + +Returns a new combined stream object. Available options are: + +* `maxDataSize` +* `pauseStreams` + +The effect of those options is described below. + +### combinedStream.pauseStreams = `true` + +Whether to apply back pressure to the underlaying streams. If set to `false`, +the underlaying streams will never be paused. If set to `true`, the +underlaying streams will be paused right after being appended, as well as when +`delayedStream.pipe()` wants to throttle. + +### combinedStream.maxDataSize = `2 * 1024 * 1024` + +The maximum amount of bytes (or characters) to buffer for all source streams. +If this value is exceeded, `combinedStream` emits an `'error'` event. + +### combinedStream.dataSize = `0` + +The amount of bytes (or characters) currently buffered by `combinedStream`. + +### combinedStream.append(stream) + +Appends the given `stream` to the combinedStream object. If `pauseStreams` is +set to `true, this stream will also be paused right away. + +`streams` can also be a function that takes one parameter called `next`. `next` +is a function that must be invoked in order to provide the `next` stream, see +example above. + +Regardless of how the `stream` is appended, combined-stream always attaches an +`'error'` listener to it, so you don't have to do that manually. + +Special case: `stream` can also be a String or Buffer. + +### combinedStream.write(data) + +You should not call this, `combinedStream` takes care of piping the appended +streams into itself for you. + +### combinedStream.resume() + +Causes `combinedStream` to start drain the streams it manages. The function is +idempotent, and also emits a `'resume'` event each time which usually goes to +the stream that is currently being drained. + +### combinedStream.pause(); + +If `combinedStream.pauseStreams` is set to `false`, this does nothing. +Otherwise a `'pause'` event is emitted, this goes to the stream that is +currently being drained, so you can use it to apply back pressure. + +### combinedStream.end(); + +Sets `combinedStream.writable` to false, emits an `'end'` event, and removes +all streams from the queue. + +### combinedStream.destroy(); + +Same as `combinedStream.end()`, except it emits a `'close'` event instead of +`'end'`. + +## License + +combined-stream is licensed under the MIT license. diff --git a/node_modules/combined-stream/lib/combined_stream.js b/node_modules/combined-stream/lib/combined_stream.js new file mode 100644 index 0000000..125f097 --- /dev/null +++ b/node_modules/combined-stream/lib/combined_stream.js @@ -0,0 +1,208 @@ +var util = require('util'); +var Stream = require('stream').Stream; +var DelayedStream = require('delayed-stream'); + +module.exports = CombinedStream; +function CombinedStream() { + this.writable = false; + this.readable = true; + this.dataSize = 0; + this.maxDataSize = 2 * 1024 * 1024; + this.pauseStreams = true; + + this._released = false; + this._streams = []; + this._currentStream = null; + this._insideLoop = false; + this._pendingNext = false; +} +util.inherits(CombinedStream, Stream); + +CombinedStream.create = function(options) { + var combinedStream = new this(); + + options = options || {}; + for (var option in options) { + combinedStream[option] = options[option]; + } + + return combinedStream; +}; + +CombinedStream.isStreamLike = function(stream) { + return (typeof stream !== 'function') + && (typeof stream !== 'string') + && (typeof stream !== 'boolean') + && (typeof stream !== 'number') + && (!Buffer.isBuffer(stream)); +}; + +CombinedStream.prototype.append = function(stream) { + var isStreamLike = CombinedStream.isStreamLike(stream); + + if (isStreamLike) { + if (!(stream instanceof DelayedStream)) { + var newStream = DelayedStream.create(stream, { + maxDataSize: Infinity, + pauseStream: this.pauseStreams, + }); + stream.on('data', this._checkDataSize.bind(this)); + stream = newStream; + } + + this._handleErrors(stream); + + if (this.pauseStreams) { + stream.pause(); + } + } + + this._streams.push(stream); + return this; +}; + +CombinedStream.prototype.pipe = function(dest, options) { + Stream.prototype.pipe.call(this, dest, options); + this.resume(); + return dest; +}; + +CombinedStream.prototype._getNext = function() { + this._currentStream = null; + + if (this._insideLoop) { + this._pendingNext = true; + return; // defer call + } + + this._insideLoop = true; + try { + do { + this._pendingNext = false; + this._realGetNext(); + } while (this._pendingNext); + } finally { + this._insideLoop = false; + } +}; + +CombinedStream.prototype._realGetNext = function() { + var stream = this._streams.shift(); + + + if (typeof stream == 'undefined') { + this.end(); + return; + } + + if (typeof stream !== 'function') { + this._pipeNext(stream); + return; + } + + var getStream = stream; + getStream(function(stream) { + var isStreamLike = CombinedStream.isStreamLike(stream); + if (isStreamLike) { + stream.on('data', this._checkDataSize.bind(this)); + this._handleErrors(stream); + } + + this._pipeNext(stream); + }.bind(this)); +}; + +CombinedStream.prototype._pipeNext = function(stream) { + this._currentStream = stream; + + var isStreamLike = CombinedStream.isStreamLike(stream); + if (isStreamLike) { + stream.on('end', this._getNext.bind(this)); + stream.pipe(this, {end: false}); + return; + } + + var value = stream; + this.write(value); + this._getNext(); +}; + +CombinedStream.prototype._handleErrors = function(stream) { + var self = this; + stream.on('error', function(err) { + self._emitError(err); + }); +}; + +CombinedStream.prototype.write = function(data) { + this.emit('data', data); +}; + +CombinedStream.prototype.pause = function() { + if (!this.pauseStreams) { + return; + } + + if(this.pauseStreams && this._currentStream && typeof(this._currentStream.pause) == 'function') this._currentStream.pause(); + this.emit('pause'); +}; + +CombinedStream.prototype.resume = function() { + if (!this._released) { + this._released = true; + this.writable = true; + this._getNext(); + } + + if(this.pauseStreams && this._currentStream && typeof(this._currentStream.resume) == 'function') this._currentStream.resume(); + this.emit('resume'); +}; + +CombinedStream.prototype.end = function() { + this._reset(); + this.emit('end'); +}; + +CombinedStream.prototype.destroy = function() { + this._reset(); + this.emit('close'); +}; + +CombinedStream.prototype._reset = function() { + this.writable = false; + this._streams = []; + this._currentStream = null; +}; + +CombinedStream.prototype._checkDataSize = function() { + this._updateDataSize(); + if (this.dataSize <= this.maxDataSize) { + return; + } + + var message = + 'DelayedStream#maxDataSize of ' + this.maxDataSize + ' bytes exceeded.'; + this._emitError(new Error(message)); +}; + +CombinedStream.prototype._updateDataSize = function() { + this.dataSize = 0; + + var self = this; + this._streams.forEach(function(stream) { + if (!stream.dataSize) { + return; + } + + self.dataSize += stream.dataSize; + }); + + if (this._currentStream && this._currentStream.dataSize) { + this.dataSize += this._currentStream.dataSize; + } +}; + +CombinedStream.prototype._emitError = function(err) { + this._reset(); + this.emit('error', err); +}; diff --git a/node_modules/combined-stream/package.json b/node_modules/combined-stream/package.json new file mode 100644 index 0000000..6982b6d --- /dev/null +++ b/node_modules/combined-stream/package.json @@ -0,0 +1,25 @@ +{ + "author": "Felix Geisendörfer (http://debuggable.com/)", + "name": "combined-stream", + "description": "A stream that emits multiple other streams one after another.", + "version": "1.0.8", + "homepage": "https://github.com/felixge/node-combined-stream", + "repository": { + "type": "git", + "url": "git://github.com/felixge/node-combined-stream.git" + }, + "main": "./lib/combined_stream", + "scripts": { + "test": "node test/run.js" + }, + "engines": { + "node": ">= 0.8" + }, + "dependencies": { + "delayed-stream": "~1.0.0" + }, + "devDependencies": { + "far": "~0.0.7" + }, + "license": "MIT" +} diff --git a/node_modules/combined-stream/yarn.lock b/node_modules/combined-stream/yarn.lock new file mode 100644 index 0000000..7edf418 --- /dev/null +++ b/node_modules/combined-stream/yarn.lock @@ -0,0 +1,17 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +delayed-stream@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" + +far@~0.0.7: + version "0.0.7" + resolved "https://registry.yarnpkg.com/far/-/far-0.0.7.tgz#01c1fd362bcd26ce9cf161af3938aa34619f79a7" + dependencies: + oop "0.0.3" + +oop@0.0.3: + version "0.0.3" + resolved "https://registry.yarnpkg.com/oop/-/oop-0.0.3.tgz#70fa405a5650891a194fdc82ca68dad6dabf4401" diff --git a/node_modules/debug/LICENSE b/node_modules/debug/LICENSE new file mode 100644 index 0000000..1a9820e --- /dev/null +++ b/node_modules/debug/LICENSE @@ -0,0 +1,20 @@ +(The MIT License) + +Copyright (c) 2014-2017 TJ Holowaychuk +Copyright (c) 2018-2021 Josh Junon + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software +and associated documentation files (the 'Software'), to deal in the Software without restriction, +including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, +and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial +portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT +LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + diff --git a/node_modules/debug/README.md b/node_modules/debug/README.md new file mode 100644 index 0000000..9ebdfbf --- /dev/null +++ b/node_modules/debug/README.md @@ -0,0 +1,481 @@ +# debug +[![OpenCollective](https://opencollective.com/debug/backers/badge.svg)](#backers) +[![OpenCollective](https://opencollective.com/debug/sponsors/badge.svg)](#sponsors) + + + +A tiny JavaScript debugging utility modelled after Node.js core's debugging +technique. Works in Node.js and web browsers. + +## Installation + +```bash +$ npm install debug +``` + +## Usage + +`debug` exposes a function; simply pass this function the name of your module, and it will return a decorated version of `console.error` for you to pass debug statements to. This will allow you to toggle the debug output for different parts of your module as well as the module as a whole. + +Example [_app.js_](./examples/node/app.js): + +```js +var debug = require('debug')('http') + , http = require('http') + , name = 'My App'; + +// fake app + +debug('booting %o', name); + +http.createServer(function(req, res){ + debug(req.method + ' ' + req.url); + res.end('hello\n'); +}).listen(3000, function(){ + debug('listening'); +}); + +// fake worker of some kind + +require('./worker'); +``` + +Example [_worker.js_](./examples/node/worker.js): + +```js +var a = require('debug')('worker:a') + , b = require('debug')('worker:b'); + +function work() { + a('doing lots of uninteresting work'); + setTimeout(work, Math.random() * 1000); +} + +work(); + +function workb() { + b('doing some work'); + setTimeout(workb, Math.random() * 2000); +} + +workb(); +``` + +The `DEBUG` environment variable is then used to enable these based on space or +comma-delimited names. + +Here are some examples: + +screen shot 2017-08-08 at 12 53 04 pm +screen shot 2017-08-08 at 12 53 38 pm +screen shot 2017-08-08 at 12 53 25 pm + +#### Windows command prompt notes + +##### CMD + +On Windows the environment variable is set using the `set` command. + +```cmd +set DEBUG=*,-not_this +``` + +Example: + +```cmd +set DEBUG=* & node app.js +``` + +##### PowerShell (VS Code default) + +PowerShell uses different syntax to set environment variables. + +```cmd +$env:DEBUG = "*,-not_this" +``` + +Example: + +```cmd +$env:DEBUG='app';node app.js +``` + +Then, run the program to be debugged as usual. + +npm script example: +```js + "windowsDebug": "@powershell -Command $env:DEBUG='*';node app.js", +``` + +## Namespace Colors + +Every debug instance has a color generated for it based on its namespace name. +This helps when visually parsing the debug output to identify which debug instance +a debug line belongs to. + +#### Node.js + +In Node.js, colors are enabled when stderr is a TTY. You also _should_ install +the [`supports-color`](https://npmjs.org/supports-color) module alongside debug, +otherwise debug will only use a small handful of basic colors. + + + +#### Web Browser + +Colors are also enabled on "Web Inspectors" that understand the `%c` formatting +option. These are WebKit web inspectors, Firefox ([since version +31](https://hacks.mozilla.org/2014/05/editable-box-model-multiple-selection-sublime-text-keys-much-more-firefox-developer-tools-episode-31/)) +and the Firebug plugin for Firefox (any version). + + + + +## Millisecond diff + +When actively developing an application it can be useful to see when the time spent between one `debug()` call and the next. Suppose for example you invoke `debug()` before requesting a resource, and after as well, the "+NNNms" will show you how much time was spent between calls. + + + +When stdout is not a TTY, `Date#toISOString()` is used, making it more useful for logging the debug information as shown below: + + + + +## Conventions + +If you're using this in one or more of your libraries, you _should_ use the name of your library so that developers may toggle debugging as desired without guessing names. If you have more than one debuggers you _should_ prefix them with your library name and use ":" to separate features. For example "bodyParser" from Connect would then be "connect:bodyParser". If you append a "*" to the end of your name, it will always be enabled regardless of the setting of the DEBUG environment variable. You can then use it for normal output as well as debug output. + +## Wildcards + +The `*` character may be used as a wildcard. Suppose for example your library has +debuggers named "connect:bodyParser", "connect:compress", "connect:session", +instead of listing all three with +`DEBUG=connect:bodyParser,connect:compress,connect:session`, you may simply do +`DEBUG=connect:*`, or to run everything using this module simply use `DEBUG=*`. + +You can also exclude specific debuggers by prefixing them with a "-" character. +For example, `DEBUG=*,-connect:*` would include all debuggers except those +starting with "connect:". + +## Environment Variables + +When running through Node.js, you can set a few environment variables that will +change the behavior of the debug logging: + +| Name | Purpose | +|-----------|-------------------------------------------------| +| `DEBUG` | Enables/disables specific debugging namespaces. | +| `DEBUG_HIDE_DATE` | Hide date from debug output (non-TTY). | +| `DEBUG_COLORS`| Whether or not to use colors in the debug output. | +| `DEBUG_DEPTH` | Object inspection depth. | +| `DEBUG_SHOW_HIDDEN` | Shows hidden properties on inspected objects. | + + +__Note:__ The environment variables beginning with `DEBUG_` end up being +converted into an Options object that gets used with `%o`/`%O` formatters. +See the Node.js documentation for +[`util.inspect()`](https://nodejs.org/api/util.html#util_util_inspect_object_options) +for the complete list. + +## Formatters + +Debug uses [printf-style](https://wikipedia.org/wiki/Printf_format_string) formatting. +Below are the officially supported formatters: + +| Formatter | Representation | +|-----------|----------------| +| `%O` | Pretty-print an Object on multiple lines. | +| `%o` | Pretty-print an Object all on a single line. | +| `%s` | String. | +| `%d` | Number (both integer and float). | +| `%j` | JSON. Replaced with the string '[Circular]' if the argument contains circular references. | +| `%%` | Single percent sign ('%'). This does not consume an argument. | + + +### Custom formatters + +You can add custom formatters by extending the `debug.formatters` object. +For example, if you wanted to add support for rendering a Buffer as hex with +`%h`, you could do something like: + +```js +const createDebug = require('debug') +createDebug.formatters.h = (v) => { + return v.toString('hex') +} + +// …elsewhere +const debug = createDebug('foo') +debug('this is hex: %h', new Buffer('hello world')) +// foo this is hex: 68656c6c6f20776f726c6421 +0ms +``` + + +## Browser Support + +You can build a browser-ready script using [browserify](https://github.com/substack/node-browserify), +or just use the [browserify-as-a-service](https://wzrd.in/) [build](https://wzrd.in/standalone/debug@latest), +if you don't want to build it yourself. + +Debug's enable state is currently persisted by `localStorage`. +Consider the situation shown below where you have `worker:a` and `worker:b`, +and wish to debug both. You can enable this using `localStorage.debug`: + +```js +localStorage.debug = 'worker:*' +``` + +And then refresh the page. + +```js +a = debug('worker:a'); +b = debug('worker:b'); + +setInterval(function(){ + a('doing some work'); +}, 1000); + +setInterval(function(){ + b('doing some work'); +}, 1200); +``` + +In Chromium-based web browsers (e.g. Brave, Chrome, and Electron), the JavaScript console will—by default—only show messages logged by `debug` if the "Verbose" log level is _enabled_. + + + +## Output streams + + By default `debug` will log to stderr, however this can be configured per-namespace by overriding the `log` method: + +Example [_stdout.js_](./examples/node/stdout.js): + +```js +var debug = require('debug'); +var error = debug('app:error'); + +// by default stderr is used +error('goes to stderr!'); + +var log = debug('app:log'); +// set this namespace to log via console.log +log.log = console.log.bind(console); // don't forget to bind to console! +log('goes to stdout'); +error('still goes to stderr!'); + +// set all output to go via console.info +// overrides all per-namespace log settings +debug.log = console.info.bind(console); +error('now goes to stdout via console.info'); +log('still goes to stdout, but via console.info now'); +``` + +## Extend +You can simply extend debugger +```js +const log = require('debug')('auth'); + +//creates new debug instance with extended namespace +const logSign = log.extend('sign'); +const logLogin = log.extend('login'); + +log('hello'); // auth hello +logSign('hello'); //auth:sign hello +logLogin('hello'); //auth:login hello +``` + +## Set dynamically + +You can also enable debug dynamically by calling the `enable()` method : + +```js +let debug = require('debug'); + +console.log(1, debug.enabled('test')); + +debug.enable('test'); +console.log(2, debug.enabled('test')); + +debug.disable(); +console.log(3, debug.enabled('test')); + +``` + +print : +``` +1 false +2 true +3 false +``` + +Usage : +`enable(namespaces)` +`namespaces` can include modes separated by a colon and wildcards. + +Note that calling `enable()` completely overrides previously set DEBUG variable : + +``` +$ DEBUG=foo node -e 'var dbg = require("debug"); dbg.enable("bar"); console.log(dbg.enabled("foo"))' +=> false +``` + +`disable()` + +Will disable all namespaces. The functions returns the namespaces currently +enabled (and skipped). This can be useful if you want to disable debugging +temporarily without knowing what was enabled to begin with. + +For example: + +```js +let debug = require('debug'); +debug.enable('foo:*,-foo:bar'); +let namespaces = debug.disable(); +debug.enable(namespaces); +``` + +Note: There is no guarantee that the string will be identical to the initial +enable string, but semantically they will be identical. + +## Checking whether a debug target is enabled + +After you've created a debug instance, you can determine whether or not it is +enabled by checking the `enabled` property: + +```javascript +const debug = require('debug')('http'); + +if (debug.enabled) { + // do stuff... +} +``` + +You can also manually toggle this property to force the debug instance to be +enabled or disabled. + +## Usage in child processes + +Due to the way `debug` detects if the output is a TTY or not, colors are not shown in child processes when `stderr` is piped. A solution is to pass the `DEBUG_COLORS=1` environment variable to the child process. +For example: + +```javascript +worker = fork(WORKER_WRAP_PATH, [workerPath], { + stdio: [ + /* stdin: */ 0, + /* stdout: */ 'pipe', + /* stderr: */ 'pipe', + 'ipc', + ], + env: Object.assign({}, process.env, { + DEBUG_COLORS: 1 // without this settings, colors won't be shown + }), +}); + +worker.stderr.pipe(process.stderr, { end: false }); +``` + + +## Authors + + - TJ Holowaychuk + - Nathan Rajlich + - Andrew Rhyne + - Josh Junon + +## Backers + +Support us with a monthly donation and help us continue our activities. [[Become a backer](https://opencollective.com/debug#backer)] + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +## Sponsors + +Become a sponsor and get your logo on our README on Github with a link to your site. [[Become a sponsor](https://opencollective.com/debug#sponsor)] + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +## License + +(The MIT License) + +Copyright (c) 2014-2017 TJ Holowaychuk <tj@vision-media.ca> +Copyright (c) 2018-2021 Josh Junon + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +'Software'), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/debug/package.json b/node_modules/debug/package.json new file mode 100644 index 0000000..ee8abb5 --- /dev/null +++ b/node_modules/debug/package.json @@ -0,0 +1,64 @@ +{ + "name": "debug", + "version": "4.4.3", + "repository": { + "type": "git", + "url": "git://github.com/debug-js/debug.git" + }, + "description": "Lightweight debugging utility for Node.js and the browser", + "keywords": [ + "debug", + "log", + "debugger" + ], + "files": [ + "src", + "LICENSE", + "README.md" + ], + "author": "Josh Junon (https://github.com/qix-)", + "contributors": [ + "TJ Holowaychuk ", + "Nathan Rajlich (http://n8.io)", + "Andrew Rhyne " + ], + "license": "MIT", + "scripts": { + "lint": "xo", + "test": "npm run test:node && npm run test:browser && npm run lint", + "test:node": "mocha test.js test.node.js", + "test:browser": "karma start --single-run", + "test:coverage": "cat ./coverage/lcov.info | coveralls" + }, + "dependencies": { + "ms": "^2.1.3" + }, + "devDependencies": { + "brfs": "^2.0.1", + "browserify": "^16.2.3", + "coveralls": "^3.0.2", + "karma": "^3.1.4", + "karma-browserify": "^6.0.0", + "karma-chrome-launcher": "^2.2.0", + "karma-mocha": "^1.3.0", + "mocha": "^5.2.0", + "mocha-lcov-reporter": "^1.2.0", + "sinon": "^14.0.0", + "xo": "^0.23.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + }, + "main": "./src/index.js", + "browser": "./src/browser.js", + "engines": { + "node": ">=6.0" + }, + "xo": { + "rules": { + "import/extensions": "off" + } + } +} diff --git a/node_modules/debug/src/browser.js b/node_modules/debug/src/browser.js new file mode 100644 index 0000000..5993451 --- /dev/null +++ b/node_modules/debug/src/browser.js @@ -0,0 +1,272 @@ +/* eslint-env browser */ + +/** + * This is the web browser implementation of `debug()`. + */ + +exports.formatArgs = formatArgs; +exports.save = save; +exports.load = load; +exports.useColors = useColors; +exports.storage = localstorage(); +exports.destroy = (() => { + let warned = false; + + return () => { + if (!warned) { + warned = true; + console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.'); + } + }; +})(); + +/** + * Colors. + */ + +exports.colors = [ + '#0000CC', + '#0000FF', + '#0033CC', + '#0033FF', + '#0066CC', + '#0066FF', + '#0099CC', + '#0099FF', + '#00CC00', + '#00CC33', + '#00CC66', + '#00CC99', + '#00CCCC', + '#00CCFF', + '#3300CC', + '#3300FF', + '#3333CC', + '#3333FF', + '#3366CC', + '#3366FF', + '#3399CC', + '#3399FF', + '#33CC00', + '#33CC33', + '#33CC66', + '#33CC99', + '#33CCCC', + '#33CCFF', + '#6600CC', + '#6600FF', + '#6633CC', + '#6633FF', + '#66CC00', + '#66CC33', + '#9900CC', + '#9900FF', + '#9933CC', + '#9933FF', + '#99CC00', + '#99CC33', + '#CC0000', + '#CC0033', + '#CC0066', + '#CC0099', + '#CC00CC', + '#CC00FF', + '#CC3300', + '#CC3333', + '#CC3366', + '#CC3399', + '#CC33CC', + '#CC33FF', + '#CC6600', + '#CC6633', + '#CC9900', + '#CC9933', + '#CCCC00', + '#CCCC33', + '#FF0000', + '#FF0033', + '#FF0066', + '#FF0099', + '#FF00CC', + '#FF00FF', + '#FF3300', + '#FF3333', + '#FF3366', + '#FF3399', + '#FF33CC', + '#FF33FF', + '#FF6600', + '#FF6633', + '#FF9900', + '#FF9933', + '#FFCC00', + '#FFCC33' +]; + +/** + * Currently only WebKit-based Web Inspectors, Firefox >= v31, + * and the Firebug extension (any Firefox version) are known + * to support "%c" CSS customizations. + * + * TODO: add a `localStorage` variable to explicitly enable/disable colors + */ + +// eslint-disable-next-line complexity +function useColors() { + // NB: In an Electron preload script, document will be defined but not fully + // initialized. Since we know we're in Chrome, we'll just detect this case + // explicitly + if (typeof window !== 'undefined' && window.process && (window.process.type === 'renderer' || window.process.__nwjs)) { + return true; + } + + // Internet Explorer and Edge do not support colors. + if (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) { + return false; + } + + let m; + + // Is webkit? http://stackoverflow.com/a/16459606/376773 + // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632 + // eslint-disable-next-line no-return-assign + return (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) || + // Is firebug? http://stackoverflow.com/a/398120/376773 + (typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) || + // Is firefox >= v31? + // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages + (typeof navigator !== 'undefined' && navigator.userAgent && (m = navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)) && parseInt(m[1], 10) >= 31) || + // Double check webkit in userAgent just in case we are in a worker + (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)); +} + +/** + * Colorize log arguments if enabled. + * + * @api public + */ + +function formatArgs(args) { + args[0] = (this.useColors ? '%c' : '') + + this.namespace + + (this.useColors ? ' %c' : ' ') + + args[0] + + (this.useColors ? '%c ' : ' ') + + '+' + module.exports.humanize(this.diff); + + if (!this.useColors) { + return; + } + + const c = 'color: ' + this.color; + args.splice(1, 0, c, 'color: inherit'); + + // The final "%c" is somewhat tricky, because there could be other + // arguments passed either before or after the %c, so we need to + // figure out the correct index to insert the CSS into + let index = 0; + let lastC = 0; + args[0].replace(/%[a-zA-Z%]/g, match => { + if (match === '%%') { + return; + } + index++; + if (match === '%c') { + // We only are interested in the *last* %c + // (the user may have provided their own) + lastC = index; + } + }); + + args.splice(lastC, 0, c); +} + +/** + * Invokes `console.debug()` when available. + * No-op when `console.debug` is not a "function". + * If `console.debug` is not available, falls back + * to `console.log`. + * + * @api public + */ +exports.log = console.debug || console.log || (() => {}); + +/** + * Save `namespaces`. + * + * @param {String} namespaces + * @api private + */ +function save(namespaces) { + try { + if (namespaces) { + exports.storage.setItem('debug', namespaces); + } else { + exports.storage.removeItem('debug'); + } + } catch (error) { + // Swallow + // XXX (@Qix-) should we be logging these? + } +} + +/** + * Load `namespaces`. + * + * @return {String} returns the previously persisted debug modes + * @api private + */ +function load() { + let r; + try { + r = exports.storage.getItem('debug') || exports.storage.getItem('DEBUG') ; + } catch (error) { + // Swallow + // XXX (@Qix-) should we be logging these? + } + + // If debug isn't set in LS, and we're in Electron, try to load $DEBUG + if (!r && typeof process !== 'undefined' && 'env' in process) { + r = process.env.DEBUG; + } + + return r; +} + +/** + * Localstorage attempts to return the localstorage. + * + * This is necessary because safari throws + * when a user disables cookies/localstorage + * and you attempt to access it. + * + * @return {LocalStorage} + * @api private + */ + +function localstorage() { + try { + // TVMLKit (Apple TV JS Runtime) does not have a window object, just localStorage in the global context + // The Browser also has localStorage in the global context. + return localStorage; + } catch (error) { + // Swallow + // XXX (@Qix-) should we be logging these? + } +} + +module.exports = require('./common')(exports); + +const {formatters} = module.exports; + +/** + * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default. + */ + +formatters.j = function (v) { + try { + return JSON.stringify(v); + } catch (error) { + return '[UnexpectedJSONParseError]: ' + error.message; + } +}; diff --git a/node_modules/debug/src/common.js b/node_modules/debug/src/common.js new file mode 100644 index 0000000..141cb57 --- /dev/null +++ b/node_modules/debug/src/common.js @@ -0,0 +1,292 @@ + +/** + * This is the common logic for both the Node.js and web browser + * implementations of `debug()`. + */ + +function setup(env) { + createDebug.debug = createDebug; + createDebug.default = createDebug; + createDebug.coerce = coerce; + createDebug.disable = disable; + createDebug.enable = enable; + createDebug.enabled = enabled; + createDebug.humanize = require('ms'); + createDebug.destroy = destroy; + + Object.keys(env).forEach(key => { + createDebug[key] = env[key]; + }); + + /** + * The currently active debug mode names, and names to skip. + */ + + createDebug.names = []; + createDebug.skips = []; + + /** + * Map of special "%n" handling functions, for the debug "format" argument. + * + * Valid key names are a single, lower or upper-case letter, i.e. "n" and "N". + */ + createDebug.formatters = {}; + + /** + * Selects a color for a debug namespace + * @param {String} namespace The namespace string for the debug instance to be colored + * @return {Number|String} An ANSI color code for the given namespace + * @api private + */ + function selectColor(namespace) { + let hash = 0; + + for (let i = 0; i < namespace.length; i++) { + hash = ((hash << 5) - hash) + namespace.charCodeAt(i); + hash |= 0; // Convert to 32bit integer + } + + return createDebug.colors[Math.abs(hash) % createDebug.colors.length]; + } + createDebug.selectColor = selectColor; + + /** + * Create a debugger with the given `namespace`. + * + * @param {String} namespace + * @return {Function} + * @api public + */ + function createDebug(namespace) { + let prevTime; + let enableOverride = null; + let namespacesCache; + let enabledCache; + + function debug(...args) { + // Disabled? + if (!debug.enabled) { + return; + } + + const self = debug; + + // Set `diff` timestamp + const curr = Number(new Date()); + const ms = curr - (prevTime || curr); + self.diff = ms; + self.prev = prevTime; + self.curr = curr; + prevTime = curr; + + args[0] = createDebug.coerce(args[0]); + + if (typeof args[0] !== 'string') { + // Anything else let's inspect with %O + args.unshift('%O'); + } + + // Apply any `formatters` transformations + let index = 0; + args[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => { + // If we encounter an escaped % then don't increase the array index + if (match === '%%') { + return '%'; + } + index++; + const formatter = createDebug.formatters[format]; + if (typeof formatter === 'function') { + const val = args[index]; + match = formatter.call(self, val); + + // Now we need to remove `args[index]` since it's inlined in the `format` + args.splice(index, 1); + index--; + } + return match; + }); + + // Apply env-specific formatting (colors, etc.) + createDebug.formatArgs.call(self, args); + + const logFn = self.log || createDebug.log; + logFn.apply(self, args); + } + + debug.namespace = namespace; + debug.useColors = createDebug.useColors(); + debug.color = createDebug.selectColor(namespace); + debug.extend = extend; + debug.destroy = createDebug.destroy; // XXX Temporary. Will be removed in the next major release. + + Object.defineProperty(debug, 'enabled', { + enumerable: true, + configurable: false, + get: () => { + if (enableOverride !== null) { + return enableOverride; + } + if (namespacesCache !== createDebug.namespaces) { + namespacesCache = createDebug.namespaces; + enabledCache = createDebug.enabled(namespace); + } + + return enabledCache; + }, + set: v => { + enableOverride = v; + } + }); + + // Env-specific initialization logic for debug instances + if (typeof createDebug.init === 'function') { + createDebug.init(debug); + } + + return debug; + } + + function extend(namespace, delimiter) { + const newDebug = createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace); + newDebug.log = this.log; + return newDebug; + } + + /** + * Enables a debug mode by namespaces. This can include modes + * separated by a colon and wildcards. + * + * @param {String} namespaces + * @api public + */ + function enable(namespaces) { + createDebug.save(namespaces); + createDebug.namespaces = namespaces; + + createDebug.names = []; + createDebug.skips = []; + + const split = (typeof namespaces === 'string' ? namespaces : '') + .trim() + .replace(/\s+/g, ',') + .split(',') + .filter(Boolean); + + for (const ns of split) { + if (ns[0] === '-') { + createDebug.skips.push(ns.slice(1)); + } else { + createDebug.names.push(ns); + } + } + } + + /** + * Checks if the given string matches a namespace template, honoring + * asterisks as wildcards. + * + * @param {String} search + * @param {String} template + * @return {Boolean} + */ + function matchesTemplate(search, template) { + let searchIndex = 0; + let templateIndex = 0; + let starIndex = -1; + let matchIndex = 0; + + while (searchIndex < search.length) { + if (templateIndex < template.length && (template[templateIndex] === search[searchIndex] || template[templateIndex] === '*')) { + // Match character or proceed with wildcard + if (template[templateIndex] === '*') { + starIndex = templateIndex; + matchIndex = searchIndex; + templateIndex++; // Skip the '*' + } else { + searchIndex++; + templateIndex++; + } + } else if (starIndex !== -1) { // eslint-disable-line no-negated-condition + // Backtrack to the last '*' and try to match more characters + templateIndex = starIndex + 1; + matchIndex++; + searchIndex = matchIndex; + } else { + return false; // No match + } + } + + // Handle trailing '*' in template + while (templateIndex < template.length && template[templateIndex] === '*') { + templateIndex++; + } + + return templateIndex === template.length; + } + + /** + * Disable debug output. + * + * @return {String} namespaces + * @api public + */ + function disable() { + const namespaces = [ + ...createDebug.names, + ...createDebug.skips.map(namespace => '-' + namespace) + ].join(','); + createDebug.enable(''); + return namespaces; + } + + /** + * Returns true if the given mode name is enabled, false otherwise. + * + * @param {String} name + * @return {Boolean} + * @api public + */ + function enabled(name) { + for (const skip of createDebug.skips) { + if (matchesTemplate(name, skip)) { + return false; + } + } + + for (const ns of createDebug.names) { + if (matchesTemplate(name, ns)) { + return true; + } + } + + return false; + } + + /** + * Coerce `val`. + * + * @param {Mixed} val + * @return {Mixed} + * @api private + */ + function coerce(val) { + if (val instanceof Error) { + return val.stack || val.message; + } + return val; + } + + /** + * XXX DO NOT USE. This is a temporary stub function. + * XXX It WILL be removed in the next major release. + */ + function destroy() { + console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.'); + } + + createDebug.enable(createDebug.load()); + + return createDebug; +} + +module.exports = setup; diff --git a/node_modules/debug/src/index.js b/node_modules/debug/src/index.js new file mode 100644 index 0000000..bf4c57f --- /dev/null +++ b/node_modules/debug/src/index.js @@ -0,0 +1,10 @@ +/** + * Detect Electron renderer / nwjs process, which is node, but we should + * treat as a browser. + */ + +if (typeof process === 'undefined' || process.type === 'renderer' || process.browser === true || process.__nwjs) { + module.exports = require('./browser.js'); +} else { + module.exports = require('./node.js'); +} diff --git a/node_modules/debug/src/node.js b/node_modules/debug/src/node.js new file mode 100644 index 0000000..715560a --- /dev/null +++ b/node_modules/debug/src/node.js @@ -0,0 +1,263 @@ +/** + * Module dependencies. + */ + +const tty = require('tty'); +const util = require('util'); + +/** + * This is the Node.js implementation of `debug()`. + */ + +exports.init = init; +exports.log = log; +exports.formatArgs = formatArgs; +exports.save = save; +exports.load = load; +exports.useColors = useColors; +exports.destroy = util.deprecate( + () => {}, + 'Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.' +); + +/** + * Colors. + */ + +exports.colors = [6, 2, 3, 4, 5, 1]; + +try { + // Optional dependency (as in, doesn't need to be installed, NOT like optionalDependencies in package.json) + // eslint-disable-next-line import/no-extraneous-dependencies + const supportsColor = require('supports-color'); + + if (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) { + exports.colors = [ + 20, + 21, + 26, + 27, + 32, + 33, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 56, + 57, + 62, + 63, + 68, + 69, + 74, + 75, + 76, + 77, + 78, + 79, + 80, + 81, + 92, + 93, + 98, + 99, + 112, + 113, + 128, + 129, + 134, + 135, + 148, + 149, + 160, + 161, + 162, + 163, + 164, + 165, + 166, + 167, + 168, + 169, + 170, + 171, + 172, + 173, + 178, + 179, + 184, + 185, + 196, + 197, + 198, + 199, + 200, + 201, + 202, + 203, + 204, + 205, + 206, + 207, + 208, + 209, + 214, + 215, + 220, + 221 + ]; + } +} catch (error) { + // Swallow - we only care if `supports-color` is available; it doesn't have to be. +} + +/** + * Build up the default `inspectOpts` object from the environment variables. + * + * $ DEBUG_COLORS=no DEBUG_DEPTH=10 DEBUG_SHOW_HIDDEN=enabled node script.js + */ + +exports.inspectOpts = Object.keys(process.env).filter(key => { + return /^debug_/i.test(key); +}).reduce((obj, key) => { + // Camel-case + const prop = key + .substring(6) + .toLowerCase() + .replace(/_([a-z])/g, (_, k) => { + return k.toUpperCase(); + }); + + // Coerce string value into JS value + let val = process.env[key]; + if (/^(yes|on|true|enabled)$/i.test(val)) { + val = true; + } else if (/^(no|off|false|disabled)$/i.test(val)) { + val = false; + } else if (val === 'null') { + val = null; + } else { + val = Number(val); + } + + obj[prop] = val; + return obj; +}, {}); + +/** + * Is stdout a TTY? Colored output is enabled when `true`. + */ + +function useColors() { + return 'colors' in exports.inspectOpts ? + Boolean(exports.inspectOpts.colors) : + tty.isatty(process.stderr.fd); +} + +/** + * Adds ANSI color escape codes if enabled. + * + * @api public + */ + +function formatArgs(args) { + const {namespace: name, useColors} = this; + + if (useColors) { + const c = this.color; + const colorCode = '\u001B[3' + (c < 8 ? c : '8;5;' + c); + const prefix = ` ${colorCode};1m${name} \u001B[0m`; + + args[0] = prefix + args[0].split('\n').join('\n' + prefix); + args.push(colorCode + 'm+' + module.exports.humanize(this.diff) + '\u001B[0m'); + } else { + args[0] = getDate() + name + ' ' + args[0]; + } +} + +function getDate() { + if (exports.inspectOpts.hideDate) { + return ''; + } + return new Date().toISOString() + ' '; +} + +/** + * Invokes `util.formatWithOptions()` with the specified arguments and writes to stderr. + */ + +function log(...args) { + return process.stderr.write(util.formatWithOptions(exports.inspectOpts, ...args) + '\n'); +} + +/** + * Save `namespaces`. + * + * @param {String} namespaces + * @api private + */ +function save(namespaces) { + if (namespaces) { + process.env.DEBUG = namespaces; + } else { + // If you set a process.env field to null or undefined, it gets cast to the + // string 'null' or 'undefined'. Just delete instead. + delete process.env.DEBUG; + } +} + +/** + * Load `namespaces`. + * + * @return {String} returns the previously persisted debug modes + * @api private + */ + +function load() { + return process.env.DEBUG; +} + +/** + * Init logic for `debug` instances. + * + * Create a new `inspectOpts` object in case `useColors` is set + * differently for a particular `debug` instance. + */ + +function init(debug) { + debug.inspectOpts = {}; + + const keys = Object.keys(exports.inspectOpts); + for (let i = 0; i < keys.length; i++) { + debug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]]; + } +} + +module.exports = require('./common')(exports); + +const {formatters} = module.exports; + +/** + * Map %o to `util.inspect()`, all on a single line. + */ + +formatters.o = function (v) { + this.inspectOpts.colors = this.useColors; + return util.inspect(v, this.inspectOpts) + .split('\n') + .map(str => str.trim()) + .join(' '); +}; + +/** + * Map %O to `util.inspect()`, allowing multiple lines if needed. + */ + +formatters.O = function (v) { + this.inspectOpts.colors = this.useColors; + return util.inspect(v, this.inspectOpts); +}; diff --git a/node_modules/delayed-stream/.npmignore b/node_modules/delayed-stream/.npmignore new file mode 100644 index 0000000..9daeafb --- /dev/null +++ b/node_modules/delayed-stream/.npmignore @@ -0,0 +1 @@ +test diff --git a/node_modules/delayed-stream/License b/node_modules/delayed-stream/License new file mode 100644 index 0000000..4804b7a --- /dev/null +++ b/node_modules/delayed-stream/License @@ -0,0 +1,19 @@ +Copyright (c) 2011 Debuggable Limited + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/node_modules/delayed-stream/Makefile b/node_modules/delayed-stream/Makefile new file mode 100644 index 0000000..b4ff85a --- /dev/null +++ b/node_modules/delayed-stream/Makefile @@ -0,0 +1,7 @@ +SHELL := /bin/bash + +test: + @./test/run.js + +.PHONY: test + diff --git a/node_modules/delayed-stream/Readme.md b/node_modules/delayed-stream/Readme.md new file mode 100644 index 0000000..aca36f9 --- /dev/null +++ b/node_modules/delayed-stream/Readme.md @@ -0,0 +1,141 @@ +# delayed-stream + +Buffers events from a stream until you are ready to handle them. + +## Installation + +``` bash +npm install delayed-stream +``` + +## Usage + +The following example shows how to write a http echo server that delays its +response by 1000 ms. + +``` javascript +var DelayedStream = require('delayed-stream'); +var http = require('http'); + +http.createServer(function(req, res) { + var delayed = DelayedStream.create(req); + + setTimeout(function() { + res.writeHead(200); + delayed.pipe(res); + }, 1000); +}); +``` + +If you are not using `Stream#pipe`, you can also manually release the buffered +events by calling `delayedStream.resume()`: + +``` javascript +var delayed = DelayedStream.create(req); + +setTimeout(function() { + // Emit all buffered events and resume underlaying source + delayed.resume(); +}, 1000); +``` + +## Implementation + +In order to use this meta stream properly, here are a few things you should +know about the implementation. + +### Event Buffering / Proxying + +All events of the `source` stream are hijacked by overwriting the `source.emit` +method. Until node implements a catch-all event listener, this is the only way. + +However, delayed-stream still continues to emit all events it captures on the +`source`, regardless of whether you have released the delayed stream yet or +not. + +Upon creation, delayed-stream captures all `source` events and stores them in +an internal event buffer. Once `delayedStream.release()` is called, all +buffered events are emitted on the `delayedStream`, and the event buffer is +cleared. After that, delayed-stream merely acts as a proxy for the underlaying +source. + +### Error handling + +Error events on `source` are buffered / proxied just like any other events. +However, `delayedStream.create` attaches a no-op `'error'` listener to the +`source`. This way you only have to handle errors on the `delayedStream` +object, rather than in two places. + +### Buffer limits + +delayed-stream provides a `maxDataSize` property that can be used to limit +the amount of data being buffered. In order to protect you from bad `source` +streams that don't react to `source.pause()`, this feature is enabled by +default. + +## API + +### DelayedStream.create(source, [options]) + +Returns a new `delayedStream`. Available options are: + +* `pauseStream` +* `maxDataSize` + +The description for those properties can be found below. + +### delayedStream.source + +The `source` stream managed by this object. This is useful if you are +passing your `delayedStream` around, and you still want to access properties +on the `source` object. + +### delayedStream.pauseStream = true + +Whether to pause the underlaying `source` when calling +`DelayedStream.create()`. Modifying this property afterwards has no effect. + +### delayedStream.maxDataSize = 1024 * 1024 + +The amount of data to buffer before emitting an `error`. + +If the underlaying source is emitting `Buffer` objects, the `maxDataSize` +refers to bytes. + +If the underlaying source is emitting JavaScript strings, the size refers to +characters. + +If you know what you are doing, you can set this property to `Infinity` to +disable this feature. You can also modify this property during runtime. + +### delayedStream.dataSize = 0 + +The amount of data buffered so far. + +### delayedStream.readable + +An ECMA5 getter that returns the value of `source.readable`. + +### delayedStream.resume() + +If the `delayedStream` has not been released so far, `delayedStream.release()` +is called. + +In either case, `source.resume()` is called. + +### delayedStream.pause() + +Calls `source.pause()`. + +### delayedStream.pipe(dest) + +Calls `delayedStream.resume()` and then proxies the arguments to `source.pipe`. + +### delayedStream.release() + +Emits and clears all events that have been buffered up so far. This does not +resume the underlaying source, use `delayedStream.resume()` instead. + +## License + +delayed-stream is licensed under the MIT license. diff --git a/node_modules/delayed-stream/lib/delayed_stream.js b/node_modules/delayed-stream/lib/delayed_stream.js new file mode 100644 index 0000000..b38fc85 --- /dev/null +++ b/node_modules/delayed-stream/lib/delayed_stream.js @@ -0,0 +1,107 @@ +var Stream = require('stream').Stream; +var util = require('util'); + +module.exports = DelayedStream; +function DelayedStream() { + this.source = null; + this.dataSize = 0; + this.maxDataSize = 1024 * 1024; + this.pauseStream = true; + + this._maxDataSizeExceeded = false; + this._released = false; + this._bufferedEvents = []; +} +util.inherits(DelayedStream, Stream); + +DelayedStream.create = function(source, options) { + var delayedStream = new this(); + + options = options || {}; + for (var option in options) { + delayedStream[option] = options[option]; + } + + delayedStream.source = source; + + var realEmit = source.emit; + source.emit = function() { + delayedStream._handleEmit(arguments); + return realEmit.apply(source, arguments); + }; + + source.on('error', function() {}); + if (delayedStream.pauseStream) { + source.pause(); + } + + return delayedStream; +}; + +Object.defineProperty(DelayedStream.prototype, 'readable', { + configurable: true, + enumerable: true, + get: function() { + return this.source.readable; + } +}); + +DelayedStream.prototype.setEncoding = function() { + return this.source.setEncoding.apply(this.source, arguments); +}; + +DelayedStream.prototype.resume = function() { + if (!this._released) { + this.release(); + } + + this.source.resume(); +}; + +DelayedStream.prototype.pause = function() { + this.source.pause(); +}; + +DelayedStream.prototype.release = function() { + this._released = true; + + this._bufferedEvents.forEach(function(args) { + this.emit.apply(this, args); + }.bind(this)); + this._bufferedEvents = []; +}; + +DelayedStream.prototype.pipe = function() { + var r = Stream.prototype.pipe.apply(this, arguments); + this.resume(); + return r; +}; + +DelayedStream.prototype._handleEmit = function(args) { + if (this._released) { + this.emit.apply(this, args); + return; + } + + if (args[0] === 'data') { + this.dataSize += args[1].length; + this._checkIfMaxDataSizeExceeded(); + } + + this._bufferedEvents.push(args); +}; + +DelayedStream.prototype._checkIfMaxDataSizeExceeded = function() { + if (this._maxDataSizeExceeded) { + return; + } + + if (this.dataSize <= this.maxDataSize) { + return; + } + + this._maxDataSizeExceeded = true; + var message = + 'DelayedStream#maxDataSize of ' + this.maxDataSize + ' bytes exceeded.' + this.emit('error', new Error(message)); +}; diff --git a/node_modules/delayed-stream/package.json b/node_modules/delayed-stream/package.json new file mode 100644 index 0000000..eea3291 --- /dev/null +++ b/node_modules/delayed-stream/package.json @@ -0,0 +1,27 @@ +{ + "author": "Felix Geisendörfer (http://debuggable.com/)", + "contributors": [ + "Mike Atkins " + ], + "name": "delayed-stream", + "description": "Buffers events from a stream until you are ready to handle them.", + "license": "MIT", + "version": "1.0.0", + "homepage": "https://github.com/felixge/node-delayed-stream", + "repository": { + "type": "git", + "url": "git://github.com/felixge/node-delayed-stream.git" + }, + "main": "./lib/delayed_stream", + "engines": { + "node": ">=0.4.0" + }, + "scripts": { + "test": "make test" + }, + "dependencies": {}, + "devDependencies": { + "fake": "0.2.0", + "far": "0.0.1" + } +} diff --git a/node_modules/dunder-proto/.eslintrc b/node_modules/dunder-proto/.eslintrc new file mode 100644 index 0000000..3b5d9e9 --- /dev/null +++ b/node_modules/dunder-proto/.eslintrc @@ -0,0 +1,5 @@ +{ + "root": true, + + "extends": "@ljharb", +} diff --git a/node_modules/dunder-proto/.github/FUNDING.yml b/node_modules/dunder-proto/.github/FUNDING.yml new file mode 100644 index 0000000..8a1d7b0 --- /dev/null +++ b/node_modules/dunder-proto/.github/FUNDING.yml @@ -0,0 +1,12 @@ +# These are supported funding model platforms + +github: [ljharb] +patreon: # Replace with a single Patreon username +open_collective: # Replace with a single Open Collective username +ko_fi: # Replace with a single Ko-fi username +tidelift: npm/dunder-proto +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +otechie: # Replace with a single Otechie username +custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/node_modules/dunder-proto/.nycrc b/node_modules/dunder-proto/.nycrc new file mode 100644 index 0000000..1826526 --- /dev/null +++ b/node_modules/dunder-proto/.nycrc @@ -0,0 +1,13 @@ +{ + "all": true, + "check-coverage": false, + "reporter": ["text-summary", "text", "html", "json"], + "lines": 86, + "statements": 85.93, + "functions": 82.43, + "branches": 76.06, + "exclude": [ + "coverage", + "test" + ] +} diff --git a/node_modules/dunder-proto/CHANGELOG.md b/node_modules/dunder-proto/CHANGELOG.md new file mode 100644 index 0000000..9b8b2f8 --- /dev/null +++ b/node_modules/dunder-proto/CHANGELOG.md @@ -0,0 +1,24 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [v1.0.1](https://github.com/es-shims/dunder-proto/compare/v1.0.0...v1.0.1) - 2024-12-16 + +### Commits + +- [Fix] do not crash when `--disable-proto=throw` [`6c367d9`](https://github.com/es-shims/dunder-proto/commit/6c367d919bc1604778689a297bbdbfea65752847) +- [Tests] ensure noproto tests only use the current version of dunder-proto [`b02365b`](https://github.com/es-shims/dunder-proto/commit/b02365b9cf889c4a2cac7be0c3cfc90a789af36c) +- [Dev Deps] update `@arethetypeswrong/cli`, `@types/tape` [`e3c5c3b`](https://github.com/es-shims/dunder-proto/commit/e3c5c3bd81cf8cef7dff2eca19e558f0e307f666) +- [Deps] update `call-bind-apply-helpers` [`19f1da0`](https://github.com/es-shims/dunder-proto/commit/19f1da028b8dd0d05c85bfd8f7eed2819b686450) + +## v1.0.0 - 2024-12-06 + +### Commits + +- Initial implementation, tests, readme, types [`a5b74b0`](https://github.com/es-shims/dunder-proto/commit/a5b74b0082f5270cb0905cd9a2e533cee7498373) +- Initial commit [`73fb5a3`](https://github.com/es-shims/dunder-proto/commit/73fb5a353b51ac2ab00c9fdeb0114daffd4c07a8) +- npm init [`80152dc`](https://github.com/es-shims/dunder-proto/commit/80152dc98155da4eb046d9f67a87ed96e8280a1d) +- Only apps should have lockfiles [`03e6660`](https://github.com/es-shims/dunder-proto/commit/03e6660a1d70dc401f3e217a031475ec537243dd) diff --git a/node_modules/dunder-proto/LICENSE b/node_modules/dunder-proto/LICENSE new file mode 100644 index 0000000..34995e7 --- /dev/null +++ b/node_modules/dunder-proto/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2024 ECMAScript Shims + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/dunder-proto/README.md b/node_modules/dunder-proto/README.md new file mode 100644 index 0000000..44b80a2 --- /dev/null +++ b/node_modules/dunder-proto/README.md @@ -0,0 +1,54 @@ +# dunder-proto [![Version Badge][npm-version-svg]][package-url] + +[![github actions][actions-image]][actions-url] +[![coverage][codecov-image]][codecov-url] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][npm-badge-png]][package-url] + +If available, the `Object.prototype.__proto__` accessor and mutator, call-bound. + +## Getting started + +```sh +npm install --save dunder-proto +``` + +## Usage/Examples + +```js +const assert = require('assert'); +const getDunder = require('dunder-proto/get'); +const setDunder = require('dunder-proto/set'); + +const obj = {}; + +assert.equal('toString' in obj, true); +assert.equal(getDunder(obj), Object.prototype); + +setDunder(obj, null); + +assert.equal('toString' in obj, false); +assert.equal(getDunder(obj), null); +``` + +## Tests + +Clone the repo, `npm install`, and run `npm test` + +[package-url]: https://npmjs.org/package/dunder-proto +[npm-version-svg]: https://versionbadg.es/es-shims/dunder-proto.svg +[deps-svg]: https://david-dm.org/es-shims/dunder-proto.svg +[deps-url]: https://david-dm.org/es-shims/dunder-proto +[dev-deps-svg]: https://david-dm.org/es-shims/dunder-proto/dev-status.svg +[dev-deps-url]: https://david-dm.org/es-shims/dunder-proto#info=devDependencies +[npm-badge-png]: https://nodei.co/npm/dunder-proto.png?downloads=true&stars=true +[license-image]: https://img.shields.io/npm/l/dunder-proto.svg +[license-url]: LICENSE +[downloads-image]: https://img.shields.io/npm/dm/dunder-proto.svg +[downloads-url]: https://npm-stat.com/charts.html?package=dunder-proto +[codecov-image]: https://codecov.io/gh/es-shims/dunder-proto/branch/main/graphs/badge.svg +[codecov-url]: https://app.codecov.io/gh/es-shims/dunder-proto/ +[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/es-shims/dunder-proto +[actions-url]: https://github.com/es-shims/dunder-proto/actions diff --git a/node_modules/dunder-proto/get.d.ts b/node_modules/dunder-proto/get.d.ts new file mode 100644 index 0000000..c7e14d2 --- /dev/null +++ b/node_modules/dunder-proto/get.d.ts @@ -0,0 +1,5 @@ +declare function getDunderProto(target: {}): object | null; + +declare const x: false | typeof getDunderProto; + +export = x; \ No newline at end of file diff --git a/node_modules/dunder-proto/get.js b/node_modules/dunder-proto/get.js new file mode 100644 index 0000000..45093df --- /dev/null +++ b/node_modules/dunder-proto/get.js @@ -0,0 +1,30 @@ +'use strict'; + +var callBind = require('call-bind-apply-helpers'); +var gOPD = require('gopd'); + +var hasProtoAccessor; +try { + // eslint-disable-next-line no-extra-parens, no-proto + hasProtoAccessor = /** @type {{ __proto__?: typeof Array.prototype }} */ ([]).__proto__ === Array.prototype; +} catch (e) { + if (!e || typeof e !== 'object' || !('code' in e) || e.code !== 'ERR_PROTO_ACCESS') { + throw e; + } +} + +// eslint-disable-next-line no-extra-parens +var desc = !!hasProtoAccessor && gOPD && gOPD(Object.prototype, /** @type {keyof typeof Object.prototype} */ ('__proto__')); + +var $Object = Object; +var $getPrototypeOf = $Object.getPrototypeOf; + +/** @type {import('./get')} */ +module.exports = desc && typeof desc.get === 'function' + ? callBind([desc.get]) + : typeof $getPrototypeOf === 'function' + ? /** @type {import('./get')} */ function getDunder(value) { + // eslint-disable-next-line eqeqeq + return $getPrototypeOf(value == null ? value : $Object(value)); + } + : false; diff --git a/node_modules/dunder-proto/package.json b/node_modules/dunder-proto/package.json new file mode 100644 index 0000000..04a4036 --- /dev/null +++ b/node_modules/dunder-proto/package.json @@ -0,0 +1,76 @@ +{ + "name": "dunder-proto", + "version": "1.0.1", + "description": "If available, the `Object.prototype.__proto__` accessor and mutator, call-bound", + "main": false, + "exports": { + "./get": "./get.js", + "./set": "./set.js", + "./package.json": "./package.json" + }, + "sideEffects": false, + "scripts": { + "prepack": "npmignore --auto --commentLines=autogenerated", + "prepublish": "not-in-publish || npm run prepublishOnly", + "prepublishOnly": "safe-publish-latest", + "prelint": "evalmd README.md", + "lint": "eslint --ext=.js,.mjs .", + "postlint": "tsc -p . && attw -P", + "pretest": "npm run lint", + "tests-only": "nyc tape 'test/**/*.js'", + "test": "npm run tests-only", + "posttest": "npx npm@'>= 10.2' audit --production", + "version": "auto-changelog && git add CHANGELOG.md", + "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/es-shims/dunder-proto.git" + }, + "author": "Jordan Harband ", + "license": "MIT", + "bugs": { + "url": "https://github.com/es-shims/dunder-proto/issues" + }, + "homepage": "https://github.com/es-shims/dunder-proto#readme", + "dependencies": { + "call-bind-apply-helpers": "^1.0.1", + "es-errors": "^1.3.0", + "gopd": "^1.2.0" + }, + "devDependencies": { + "@arethetypeswrong/cli": "^0.17.1", + "@ljharb/eslint-config": "^21.1.1", + "@ljharb/tsconfig": "^0.2.2", + "@types/tape": "^5.7.0", + "auto-changelog": "^2.5.0", + "encoding": "^0.1.13", + "eslint": "=8.8.0", + "evalmd": "^0.0.19", + "in-publish": "^2.0.1", + "npmignore": "^0.3.1", + "nyc": "^10.3.2", + "safe-publish-latest": "^2.0.0", + "tape": "^5.9.0", + "typescript": "next" + }, + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false, + "hideCredit": true + }, + "testling": { + "files": "test/index.js" + }, + "publishConfig": { + "ignore": [ + ".github/workflows" + ] + }, + "engines": { + "node": ">= 0.4" + } +} diff --git a/node_modules/dunder-proto/set.d.ts b/node_modules/dunder-proto/set.d.ts new file mode 100644 index 0000000..16bfdfe --- /dev/null +++ b/node_modules/dunder-proto/set.d.ts @@ -0,0 +1,5 @@ +declare function setDunderProto

(target: {}, proto: P): P; + +declare const x: false | typeof setDunderProto; + +export = x; \ No newline at end of file diff --git a/node_modules/dunder-proto/set.js b/node_modules/dunder-proto/set.js new file mode 100644 index 0000000..6085b6e --- /dev/null +++ b/node_modules/dunder-proto/set.js @@ -0,0 +1,35 @@ +'use strict'; + +var callBind = require('call-bind-apply-helpers'); +var gOPD = require('gopd'); +var $TypeError = require('es-errors/type'); + +/** @type {{ __proto__?: object | null }} */ +var obj = {}; +try { + obj.__proto__ = null; // eslint-disable-line no-proto +} catch (e) { + if (!e || typeof e !== 'object' || !('code' in e) || e.code !== 'ERR_PROTO_ACCESS') { + throw e; + } +} + +var hasProtoMutator = !('toString' in obj); + +// eslint-disable-next-line no-extra-parens +var desc = gOPD && gOPD(Object.prototype, /** @type {keyof typeof Object.prototype} */ ('__proto__')); + +/** @type {import('./set')} */ +module.exports = hasProtoMutator && ( +// eslint-disable-next-line no-extra-parens + (!!desc && typeof desc.set === 'function' && /** @type {import('./set')} */ (callBind([desc.set]))) + || /** @type {import('./set')} */ function setDunder(object, proto) { + // this is node v0.10 or older, which doesn't have Object.setPrototypeOf and has undeniable __proto__ + if (object == null) { // eslint-disable-line eqeqeq + throw new $TypeError('set Object.prototype.__proto__ called on null or undefined'); + } + // eslint-disable-next-line no-proto, no-param-reassign, no-extra-parens + /** @type {{ __proto__?: object | null }} */ (object).__proto__ = proto; + return proto; + } +); diff --git a/node_modules/dunder-proto/test/get.js b/node_modules/dunder-proto/test/get.js new file mode 100644 index 0000000..253f183 --- /dev/null +++ b/node_modules/dunder-proto/test/get.js @@ -0,0 +1,34 @@ +'use strict'; + +var test = require('tape'); + +var getDunderProto = require('../get'); + +test('getDunderProto', { skip: !getDunderProto }, function (t) { + if (!getDunderProto) { + throw 'should never happen; this is just for type narrowing'; // eslint-disable-line no-throw-literal + } + + // @ts-expect-error + t['throws'](function () { getDunderProto(); }, TypeError, 'throws if no argument'); + // @ts-expect-error + t['throws'](function () { getDunderProto(undefined); }, TypeError, 'throws with undefined'); + // @ts-expect-error + t['throws'](function () { getDunderProto(null); }, TypeError, 'throws with null'); + + t.equal(getDunderProto({}), Object.prototype); + t.equal(getDunderProto([]), Array.prototype); + t.equal(getDunderProto(function () {}), Function.prototype); + t.equal(getDunderProto(/./g), RegExp.prototype); + t.equal(getDunderProto(42), Number.prototype); + t.equal(getDunderProto(true), Boolean.prototype); + t.equal(getDunderProto('foo'), String.prototype); + + t.end(); +}); + +test('no dunder proto', { skip: !!getDunderProto }, function (t) { + t.notOk('__proto__' in Object.prototype, 'no __proto__ in Object.prototype'); + + t.end(); +}); diff --git a/node_modules/dunder-proto/test/index.js b/node_modules/dunder-proto/test/index.js new file mode 100644 index 0000000..08ff36f --- /dev/null +++ b/node_modules/dunder-proto/test/index.js @@ -0,0 +1,4 @@ +'use strict'; + +require('./get'); +require('./set'); diff --git a/node_modules/dunder-proto/test/set.js b/node_modules/dunder-proto/test/set.js new file mode 100644 index 0000000..c3bfe4d --- /dev/null +++ b/node_modules/dunder-proto/test/set.js @@ -0,0 +1,50 @@ +'use strict'; + +var test = require('tape'); + +var setDunderProto = require('../set'); + +test('setDunderProto', { skip: !setDunderProto }, function (t) { + if (!setDunderProto) { + throw 'should never happen; this is just for type narrowing'; // eslint-disable-line no-throw-literal + } + + // @ts-expect-error + t['throws'](function () { setDunderProto(); }, TypeError, 'throws if no arguments'); + // @ts-expect-error + t['throws'](function () { setDunderProto(undefined); }, TypeError, 'throws with undefined and nothing'); + // @ts-expect-error + t['throws'](function () { setDunderProto(undefined, undefined); }, TypeError, 'throws with undefined and undefined'); + // @ts-expect-error + t['throws'](function () { setDunderProto(null); }, TypeError, 'throws with null and undefined'); + // @ts-expect-error + t['throws'](function () { setDunderProto(null, undefined); }, TypeError, 'throws with null and undefined'); + + /** @type {{ inherited?: boolean }} */ + var obj = {}; + t.ok('toString' in obj, 'object initially has toString'); + + setDunderProto(obj, null); + t.notOk('toString' in obj, 'object no longer has toString'); + + t.notOk('inherited' in obj, 'object lacks inherited property'); + setDunderProto(obj, { inherited: true }); + t.equal(obj.inherited, true, 'object has inherited property'); + + t.end(); +}); + +test('no dunder proto', { skip: !!setDunderProto }, function (t) { + if ('__proto__' in Object.prototype) { + t['throws']( + // @ts-expect-error + function () { ({}).__proto__ = null; }, // eslint-disable-line no-proto + Error, + 'throws when setting Object.prototype.__proto__' + ); + } else { + t.notOk('__proto__' in Object.prototype, 'no __proto__ in Object.prototype'); + } + + t.end(); +}); diff --git a/node_modules/dunder-proto/tsconfig.json b/node_modules/dunder-proto/tsconfig.json new file mode 100644 index 0000000..dabbe23 --- /dev/null +++ b/node_modules/dunder-proto/tsconfig.json @@ -0,0 +1,9 @@ +{ + "extends": "@ljharb/tsconfig", + "compilerOptions": { + "target": "ES2021", + }, + "exclude": [ + "coverage", + ], +} diff --git a/node_modules/es-define-property/.eslintrc b/node_modules/es-define-property/.eslintrc new file mode 100644 index 0000000..46f3b12 --- /dev/null +++ b/node_modules/es-define-property/.eslintrc @@ -0,0 +1,13 @@ +{ + "root": true, + + "extends": "@ljharb", + + "rules": { + "new-cap": ["error", { + "capIsNewExceptions": [ + "GetIntrinsic", + ], + }], + }, +} diff --git a/node_modules/es-define-property/.github/FUNDING.yml b/node_modules/es-define-property/.github/FUNDING.yml new file mode 100644 index 0000000..4445451 --- /dev/null +++ b/node_modules/es-define-property/.github/FUNDING.yml @@ -0,0 +1,12 @@ +# These are supported funding model platforms + +github: [ljharb] +patreon: # Replace with a single Patreon username +open_collective: # Replace with a single Open Collective username +ko_fi: # Replace with a single Ko-fi username +tidelift: npm/es-define-property +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +otechie: # Replace with a single Otechie username +custom: # Replace with a single custom sponsorship URL diff --git a/node_modules/es-define-property/.nycrc b/node_modules/es-define-property/.nycrc new file mode 100644 index 0000000..bdd626c --- /dev/null +++ b/node_modules/es-define-property/.nycrc @@ -0,0 +1,9 @@ +{ + "all": true, + "check-coverage": false, + "reporter": ["text-summary", "text", "html", "json"], + "exclude": [ + "coverage", + "test" + ] +} diff --git a/node_modules/es-define-property/CHANGELOG.md b/node_modules/es-define-property/CHANGELOG.md new file mode 100644 index 0000000..5f60cc0 --- /dev/null +++ b/node_modules/es-define-property/CHANGELOG.md @@ -0,0 +1,29 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [v1.0.1](https://github.com/ljharb/es-define-property/compare/v1.0.0...v1.0.1) - 2024-12-06 + +### Commits + +- [types] use shared tsconfig [`954a663`](https://github.com/ljharb/es-define-property/commit/954a66360326e508a0e5daa4b07493d58f5e110e) +- [actions] split out node 10-20, and 20+ [`3a8e84b`](https://github.com/ljharb/es-define-property/commit/3a8e84b23883f26ff37b3e82ff283834228e18c6) +- [Dev Deps] update `@ljharb/eslint-config`, `@ljharb/tsconfig`, `@types/get-intrinsic`, `@types/tape`, `auto-changelog`, `gopd`, `tape` [`86ae27b`](https://github.com/ljharb/es-define-property/commit/86ae27bb8cc857b23885136fad9cbe965ae36612) +- [Refactor] avoid using `get-intrinsic` [`02480c0`](https://github.com/ljharb/es-define-property/commit/02480c0353ef6118965282977c3864aff53d98b1) +- [Tests] replace `aud` with `npm audit` [`f6093ff`](https://github.com/ljharb/es-define-property/commit/f6093ff74ab51c98015c2592cd393bd42478e773) +- [Tests] configure testling [`7139e66`](https://github.com/ljharb/es-define-property/commit/7139e66959247a56086d9977359caef27c6849e7) +- [Dev Deps] update `tape` [`b901b51`](https://github.com/ljharb/es-define-property/commit/b901b511a75e001a40ce1a59fef7d9ffcfc87482) +- [Tests] fix types in tests [`469d269`](https://github.com/ljharb/es-define-property/commit/469d269fd141b1e773ec053a9fa35843493583e0) +- [Dev Deps] add missing peer dep [`733acfb`](https://github.com/ljharb/es-define-property/commit/733acfb0c4c96edf337e470b89a25a5b3724c352) + +## v1.0.0 - 2024-02-12 + +### Commits + +- Initial implementation, tests, readme, types [`3e154e1`](https://github.com/ljharb/es-define-property/commit/3e154e11a2fee09127220f5e503bf2c0a31dd480) +- Initial commit [`07d98de`](https://github.com/ljharb/es-define-property/commit/07d98de34a4dc31ff5e83a37c0c3f49e0d85cd50) +- npm init [`c4eb634`](https://github.com/ljharb/es-define-property/commit/c4eb6348b0d3886aac36cef34ad2ee0665ea6f3e) +- Only apps should have lockfiles [`7af86ec`](https://github.com/ljharb/es-define-property/commit/7af86ec1d311ec0b17fdfe616a25f64276903856) diff --git a/node_modules/es-define-property/LICENSE b/node_modules/es-define-property/LICENSE new file mode 100644 index 0000000..f82f389 --- /dev/null +++ b/node_modules/es-define-property/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2024 Jordan Harband + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/es-define-property/README.md b/node_modules/es-define-property/README.md new file mode 100644 index 0000000..9b291bd --- /dev/null +++ b/node_modules/es-define-property/README.md @@ -0,0 +1,49 @@ +# es-define-property [![Version Badge][npm-version-svg]][package-url] + +[![github actions][actions-image]][actions-url] +[![coverage][codecov-image]][codecov-url] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][npm-badge-png]][package-url] + +`Object.defineProperty`, but not IE 8's broken one. + +## Example + +```js +const assert = require('assert'); + +const $defineProperty = require('es-define-property'); + +if ($defineProperty) { + assert.equal($defineProperty, Object.defineProperty); +} else if (Object.defineProperty) { + assert.equal($defineProperty, false, 'this is IE 8'); +} else { + assert.equal($defineProperty, false, 'this is an ES3 engine'); +} +``` + +## Tests +Simply clone the repo, `npm install`, and run `npm test` + +## Security + +Please email [@ljharb](https://github.com/ljharb) or see https://tidelift.com/security if you have a potential security vulnerability to report. + +[package-url]: https://npmjs.org/package/es-define-property +[npm-version-svg]: https://versionbadg.es/ljharb/es-define-property.svg +[deps-svg]: https://david-dm.org/ljharb/es-define-property.svg +[deps-url]: https://david-dm.org/ljharb/es-define-property +[dev-deps-svg]: https://david-dm.org/ljharb/es-define-property/dev-status.svg +[dev-deps-url]: https://david-dm.org/ljharb/es-define-property#info=devDependencies +[npm-badge-png]: https://nodei.co/npm/es-define-property.png?downloads=true&stars=true +[license-image]: https://img.shields.io/npm/l/es-define-property.svg +[license-url]: LICENSE +[downloads-image]: https://img.shields.io/npm/dm/es-define-property.svg +[downloads-url]: https://npm-stat.com/charts.html?package=es-define-property +[codecov-image]: https://codecov.io/gh/ljharb/es-define-property/branch/main/graphs/badge.svg +[codecov-url]: https://app.codecov.io/gh/ljharb/es-define-property/ +[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/ljharb/es-define-property +[actions-url]: https://github.com/ljharb/es-define-property/actions diff --git a/node_modules/es-define-property/index.d.ts b/node_modules/es-define-property/index.d.ts new file mode 100644 index 0000000..6012247 --- /dev/null +++ b/node_modules/es-define-property/index.d.ts @@ -0,0 +1,3 @@ +declare const defineProperty: false | typeof Object.defineProperty; + +export = defineProperty; \ No newline at end of file diff --git a/node_modules/es-define-property/index.js b/node_modules/es-define-property/index.js new file mode 100644 index 0000000..e0a2925 --- /dev/null +++ b/node_modules/es-define-property/index.js @@ -0,0 +1,14 @@ +'use strict'; + +/** @type {import('.')} */ +var $defineProperty = Object.defineProperty || false; +if ($defineProperty) { + try { + $defineProperty({}, 'a', { value: 1 }); + } catch (e) { + // IE 8 has a broken defineProperty + $defineProperty = false; + } +} + +module.exports = $defineProperty; diff --git a/node_modules/es-define-property/package.json b/node_modules/es-define-property/package.json new file mode 100644 index 0000000..fbed187 --- /dev/null +++ b/node_modules/es-define-property/package.json @@ -0,0 +1,81 @@ +{ + "name": "es-define-property", + "version": "1.0.1", + "description": "`Object.defineProperty`, but not IE 8's broken one.", + "main": "index.js", + "types": "./index.d.ts", + "exports": { + ".": "./index.js", + "./package.json": "./package.json" + }, + "sideEffects": false, + "scripts": { + "prepack": "npmignore --auto --commentLines=autogenerated", + "prepublish": "not-in-publish || npm run prepublishOnly", + "prepublishOnly": "safe-publish-latest", + "prelint": "evalmd README.md", + "lint": "eslint --ext=js,mjs .", + "postlint": "tsc -p .", + "pretest": "npm run lint", + "tests-only": "nyc tape 'test/**/*.js'", + "test": "npm run tests-only", + "posttest": "npx npm@'>= 10.2' audit --production", + "version": "auto-changelog && git add CHANGELOG.md", + "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/ljharb/es-define-property.git" + }, + "keywords": [ + "javascript", + "ecmascript", + "object", + "define", + "property", + "defineProperty", + "Object.defineProperty" + ], + "author": "Jordan Harband ", + "license": "MIT", + "bugs": { + "url": "https://github.com/ljharb/es-define-property/issues" + }, + "homepage": "https://github.com/ljharb/es-define-property#readme", + "devDependencies": { + "@ljharb/eslint-config": "^21.1.1", + "@ljharb/tsconfig": "^0.2.2", + "@types/gopd": "^1.0.3", + "@types/tape": "^5.6.5", + "auto-changelog": "^2.5.0", + "encoding": "^0.1.13", + "eslint": "^8.8.0", + "evalmd": "^0.0.19", + "gopd": "^1.2.0", + "in-publish": "^2.0.1", + "npmignore": "^0.3.1", + "nyc": "^10.3.2", + "safe-publish-latest": "^2.0.0", + "tape": "^5.9.0", + "typescript": "next" + }, + "engines": { + "node": ">= 0.4" + }, + "testling": { + "files": "test/index.js" + }, + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false, + "hideCredit": true + }, + "publishConfig": { + "ignore": [ + ".github/workflows" + ] + } +} diff --git a/node_modules/es-define-property/test/index.js b/node_modules/es-define-property/test/index.js new file mode 100644 index 0000000..b4b4688 --- /dev/null +++ b/node_modules/es-define-property/test/index.js @@ -0,0 +1,56 @@ +'use strict'; + +var $defineProperty = require('../'); + +var test = require('tape'); +var gOPD = require('gopd'); + +test('defineProperty: supported', { skip: !$defineProperty }, function (t) { + t.plan(4); + + t.equal(typeof $defineProperty, 'function', 'defineProperty is supported'); + if ($defineProperty && gOPD) { // this `if` check is just to shut TS up + /** @type {{ a: number, b?: number, c?: number }} */ + var o = { a: 1 }; + + $defineProperty(o, 'b', { enumerable: true, value: 2 }); + t.deepEqual( + gOPD(o, 'b'), + { + configurable: false, + enumerable: true, + value: 2, + writable: false + }, + 'property descriptor is as expected' + ); + + $defineProperty(o, 'c', { enumerable: false, value: 3, writable: true }); + t.deepEqual( + gOPD(o, 'c'), + { + configurable: false, + enumerable: false, + value: 3, + writable: true + }, + 'property descriptor is as expected' + ); + } + + t.equal($defineProperty, Object.defineProperty, 'defineProperty is Object.defineProperty'); + + t.end(); +}); + +test('defineProperty: not supported', { skip: !!$defineProperty }, function (t) { + t.notOk($defineProperty, 'defineProperty is not supported'); + + t.match( + typeof $defineProperty, + /^(?:undefined|boolean)$/, + '`typeof defineProperty` is `undefined` or `boolean`' + ); + + t.end(); +}); diff --git a/node_modules/es-define-property/tsconfig.json b/node_modules/es-define-property/tsconfig.json new file mode 100644 index 0000000..5a49992 --- /dev/null +++ b/node_modules/es-define-property/tsconfig.json @@ -0,0 +1,10 @@ +{ + "extends": "@ljharb/tsconfig", + "compilerOptions": { + "target": "es2022", + }, + "exclude": [ + "coverage", + "test/list-exports" + ], +} diff --git a/node_modules/es-errors/.eslintrc b/node_modules/es-errors/.eslintrc new file mode 100644 index 0000000..3b5d9e9 --- /dev/null +++ b/node_modules/es-errors/.eslintrc @@ -0,0 +1,5 @@ +{ + "root": true, + + "extends": "@ljharb", +} diff --git a/node_modules/es-errors/.github/FUNDING.yml b/node_modules/es-errors/.github/FUNDING.yml new file mode 100644 index 0000000..f1b8805 --- /dev/null +++ b/node_modules/es-errors/.github/FUNDING.yml @@ -0,0 +1,12 @@ +# These are supported funding model platforms + +github: [ljharb] +patreon: # Replace with a single Patreon username +open_collective: # Replace with a single Open Collective username +ko_fi: # Replace with a single Ko-fi username +tidelift: npm/es-errors +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +otechie: # Replace with a single Otechie username +custom: # Replace with a single custom sponsorship URL diff --git a/node_modules/es-errors/CHANGELOG.md b/node_modules/es-errors/CHANGELOG.md new file mode 100644 index 0000000..204a9e9 --- /dev/null +++ b/node_modules/es-errors/CHANGELOG.md @@ -0,0 +1,40 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [v1.3.0](https://github.com/ljharb/es-errors/compare/v1.2.1...v1.3.0) - 2024-02-05 + +### Commits + +- [New] add `EvalError` and `URIError` [`1927627`](https://github.com/ljharb/es-errors/commit/1927627ba68cb6c829d307231376c967db53acdf) + +## [v1.2.1](https://github.com/ljharb/es-errors/compare/v1.2.0...v1.2.1) - 2024-02-04 + +### Commits + +- [Fix] add missing `exports` entry [`5bb5f28`](https://github.com/ljharb/es-errors/commit/5bb5f280f98922701109d6ebb82eea2257cecc7e) + +## [v1.2.0](https://github.com/ljharb/es-errors/compare/v1.1.0...v1.2.0) - 2024-02-04 + +### Commits + +- [New] add `ReferenceError` [`6d8cf5b`](https://github.com/ljharb/es-errors/commit/6d8cf5bbb6f3f598d02cf6f30e468ba2caa8e143) + +## [v1.1.0](https://github.com/ljharb/es-errors/compare/v1.0.0...v1.1.0) - 2024-02-04 + +### Commits + +- [New] add base Error [`2983ab6`](https://github.com/ljharb/es-errors/commit/2983ab65f7bc5441276cb021dc3aa03c78881698) + +## v1.0.0 - 2024-02-03 + +### Commits + +- Initial implementation, tests, readme, type [`8f47631`](https://github.com/ljharb/es-errors/commit/8f476317e9ad76f40ad648081829b1a1a3a1288b) +- Initial commit [`ea5d099`](https://github.com/ljharb/es-errors/commit/ea5d099ef18e550509ab9e2be000526afd81c385) +- npm init [`6f5ebf9`](https://github.com/ljharb/es-errors/commit/6f5ebf9cead474dadd72b9e63dad315820a089ae) +- Only apps should have lockfiles [`e1a0aeb`](https://github.com/ljharb/es-errors/commit/e1a0aeb7b80f5cfc56be54d6b2100e915d47def8) +- [meta] add `sideEffects` flag [`a9c7d46`](https://github.com/ljharb/es-errors/commit/a9c7d460a492f1d8a241c836bc25a322a19cc043) diff --git a/node_modules/es-errors/LICENSE b/node_modules/es-errors/LICENSE new file mode 100644 index 0000000..f82f389 --- /dev/null +++ b/node_modules/es-errors/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2024 Jordan Harband + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/es-errors/README.md b/node_modules/es-errors/README.md new file mode 100644 index 0000000..8dbfacf --- /dev/null +++ b/node_modules/es-errors/README.md @@ -0,0 +1,55 @@ +# es-errors [![Version Badge][npm-version-svg]][package-url] + +[![github actions][actions-image]][actions-url] +[![coverage][codecov-image]][codecov-url] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][npm-badge-png]][package-url] + +A simple cache for a few of the JS Error constructors. + +## Example + +```js +const assert = require('assert'); + +const Base = require('es-errors'); +const Eval = require('es-errors/eval'); +const Range = require('es-errors/range'); +const Ref = require('es-errors/ref'); +const Syntax = require('es-errors/syntax'); +const Type = require('es-errors/type'); +const URI = require('es-errors/uri'); + +assert.equal(Base, Error); +assert.equal(Eval, EvalError); +assert.equal(Range, RangeError); +assert.equal(Ref, ReferenceError); +assert.equal(Syntax, SyntaxError); +assert.equal(Type, TypeError); +assert.equal(URI, URIError); +``` + +## Tests +Simply clone the repo, `npm install`, and run `npm test` + +## Security + +Please email [@ljharb](https://github.com/ljharb) or see https://tidelift.com/security if you have a potential security vulnerability to report. + +[package-url]: https://npmjs.org/package/es-errors +[npm-version-svg]: https://versionbadg.es/ljharb/es-errors.svg +[deps-svg]: https://david-dm.org/ljharb/es-errors.svg +[deps-url]: https://david-dm.org/ljharb/es-errors +[dev-deps-svg]: https://david-dm.org/ljharb/es-errors/dev-status.svg +[dev-deps-url]: https://david-dm.org/ljharb/es-errors#info=devDependencies +[npm-badge-png]: https://nodei.co/npm/es-errors.png?downloads=true&stars=true +[license-image]: https://img.shields.io/npm/l/es-errors.svg +[license-url]: LICENSE +[downloads-image]: https://img.shields.io/npm/dm/es-errors.svg +[downloads-url]: https://npm-stat.com/charts.html?package=es-errors +[codecov-image]: https://codecov.io/gh/ljharb/es-errors/branch/main/graphs/badge.svg +[codecov-url]: https://app.codecov.io/gh/ljharb/es-errors/ +[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/ljharb/es-errors +[actions-url]: https://github.com/ljharb/es-errors/actions diff --git a/node_modules/es-errors/eval.d.ts b/node_modules/es-errors/eval.d.ts new file mode 100644 index 0000000..e4210e0 --- /dev/null +++ b/node_modules/es-errors/eval.d.ts @@ -0,0 +1,3 @@ +declare const EvalError: EvalErrorConstructor; + +export = EvalError; diff --git a/node_modules/es-errors/eval.js b/node_modules/es-errors/eval.js new file mode 100644 index 0000000..725ccb6 --- /dev/null +++ b/node_modules/es-errors/eval.js @@ -0,0 +1,4 @@ +'use strict'; + +/** @type {import('./eval')} */ +module.exports = EvalError; diff --git a/node_modules/es-errors/index.d.ts b/node_modules/es-errors/index.d.ts new file mode 100644 index 0000000..69bdbc9 --- /dev/null +++ b/node_modules/es-errors/index.d.ts @@ -0,0 +1,3 @@ +declare const Error: ErrorConstructor; + +export = Error; diff --git a/node_modules/es-errors/index.js b/node_modules/es-errors/index.js new file mode 100644 index 0000000..cc0c521 --- /dev/null +++ b/node_modules/es-errors/index.js @@ -0,0 +1,4 @@ +'use strict'; + +/** @type {import('.')} */ +module.exports = Error; diff --git a/node_modules/es-errors/package.json b/node_modules/es-errors/package.json new file mode 100644 index 0000000..ff8c2a5 --- /dev/null +++ b/node_modules/es-errors/package.json @@ -0,0 +1,80 @@ +{ + "name": "es-errors", + "version": "1.3.0", + "description": "A simple cache for a few of the JS Error constructors.", + "main": "index.js", + "exports": { + ".": "./index.js", + "./eval": "./eval.js", + "./range": "./range.js", + "./ref": "./ref.js", + "./syntax": "./syntax.js", + "./type": "./type.js", + "./uri": "./uri.js", + "./package.json": "./package.json" + }, + "sideEffects": false, + "scripts": { + "prepack": "npmignore --auto --commentLines=autogenerated", + "prepublishOnly": "safe-publish-latest", + "prepublish": "not-in-publish || npm run prepublishOnly", + "pretest": "npm run lint", + "test": "npm run tests-only", + "tests-only": "nyc tape 'test/**/*.js'", + "posttest": "aud --production", + "prelint": "evalmd README.md", + "lint": "eslint --ext=js,mjs .", + "postlint": "tsc -p . && eclint check $(git ls-files | xargs find 2> /dev/null | grep -vE 'node_modules|\\.git' | grep -v dist/)", + "version": "auto-changelog && git add CHANGELOG.md", + "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/ljharb/es-errors.git" + }, + "keywords": [ + "javascript", + "ecmascript", + "error", + "typeerror", + "syntaxerror", + "rangeerror" + ], + "author": "Jordan Harband ", + "license": "MIT", + "bugs": { + "url": "https://github.com/ljharb/es-errors/issues" + }, + "homepage": "https://github.com/ljharb/es-errors#readme", + "devDependencies": { + "@ljharb/eslint-config": "^21.1.0", + "@types/tape": "^5.6.4", + "aud": "^2.0.4", + "auto-changelog": "^2.4.0", + "eclint": "^2.8.1", + "eslint": "^8.8.0", + "evalmd": "^0.0.19", + "in-publish": "^2.0.1", + "npmignore": "^0.3.1", + "nyc": "^10.3.2", + "safe-publish-latest": "^2.0.0", + "tape": "^5.7.4", + "typescript": "next" + }, + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false, + "hideCredit": true + }, + "publishConfig": { + "ignore": [ + ".github/workflows" + ] + }, + "engines": { + "node": ">= 0.4" + } +} diff --git a/node_modules/es-errors/range.d.ts b/node_modules/es-errors/range.d.ts new file mode 100644 index 0000000..3a12e86 --- /dev/null +++ b/node_modules/es-errors/range.d.ts @@ -0,0 +1,3 @@ +declare const RangeError: RangeErrorConstructor; + +export = RangeError; diff --git a/node_modules/es-errors/range.js b/node_modules/es-errors/range.js new file mode 100644 index 0000000..2044fe0 --- /dev/null +++ b/node_modules/es-errors/range.js @@ -0,0 +1,4 @@ +'use strict'; + +/** @type {import('./range')} */ +module.exports = RangeError; diff --git a/node_modules/es-errors/ref.d.ts b/node_modules/es-errors/ref.d.ts new file mode 100644 index 0000000..a13107e --- /dev/null +++ b/node_modules/es-errors/ref.d.ts @@ -0,0 +1,3 @@ +declare const ReferenceError: ReferenceErrorConstructor; + +export = ReferenceError; diff --git a/node_modules/es-errors/ref.js b/node_modules/es-errors/ref.js new file mode 100644 index 0000000..d7c430f --- /dev/null +++ b/node_modules/es-errors/ref.js @@ -0,0 +1,4 @@ +'use strict'; + +/** @type {import('./ref')} */ +module.exports = ReferenceError; diff --git a/node_modules/es-errors/syntax.d.ts b/node_modules/es-errors/syntax.d.ts new file mode 100644 index 0000000..6a0c53c --- /dev/null +++ b/node_modules/es-errors/syntax.d.ts @@ -0,0 +1,3 @@ +declare const SyntaxError: SyntaxErrorConstructor; + +export = SyntaxError; diff --git a/node_modules/es-errors/syntax.js b/node_modules/es-errors/syntax.js new file mode 100644 index 0000000..5f5fdde --- /dev/null +++ b/node_modules/es-errors/syntax.js @@ -0,0 +1,4 @@ +'use strict'; + +/** @type {import('./syntax')} */ +module.exports = SyntaxError; diff --git a/node_modules/es-errors/test/index.js b/node_modules/es-errors/test/index.js new file mode 100644 index 0000000..1ff0277 --- /dev/null +++ b/node_modules/es-errors/test/index.js @@ -0,0 +1,19 @@ +'use strict'; + +var test = require('tape'); + +var E = require('../'); +var R = require('../range'); +var Ref = require('../ref'); +var S = require('../syntax'); +var T = require('../type'); + +test('errors', function (t) { + t.equal(E, Error); + t.equal(R, RangeError); + t.equal(Ref, ReferenceError); + t.equal(S, SyntaxError); + t.equal(T, TypeError); + + t.end(); +}); diff --git a/node_modules/es-errors/tsconfig.json b/node_modules/es-errors/tsconfig.json new file mode 100644 index 0000000..99dfeb6 --- /dev/null +++ b/node_modules/es-errors/tsconfig.json @@ -0,0 +1,49 @@ +{ + "compilerOptions": { + /* Visit https://aka.ms/tsconfig.json to read more about this file */ + + /* Projects */ + + /* Language and Environment */ + "target": "es5", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */ + // "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */ + // "noLib": true, /* Disable including any library files, including the default lib.d.ts. */ + "useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */ + // "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */ + + /* Modules */ + "module": "commonjs", /* Specify what module code is generated. */ + // "rootDir": "./", /* Specify the root folder within your source files. */ + // "moduleResolution": "node", /* Specify how TypeScript looks up a file from a given module specifier. */ + // "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */ + // "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */ + // "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */ + // "typeRoots": ["types"], /* Specify multiple folders that act like `./node_modules/@types`. */ + "resolveJsonModule": true, /* Enable importing .json files. */ + // "allowArbitraryExtensions": true, /* Enable importing files with any extension, provided a declaration file is present. */ + + /* JavaScript Support */ + "allowJs": true, /* Allow JavaScript files to be a part of your program. Use the `checkJS` option to get errors from these files. */ + "checkJs": true, /* Enable error reporting in type-checked JavaScript files. */ + "maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from `node_modules`. Only applicable with `allowJs`. */ + + /* Emit */ + "declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */ + "declarationMap": true, /* Create sourcemaps for d.ts files. */ + "noEmit": true, /* Disable emitting files from a compilation. */ + + /* Interop Constraints */ + "allowSyntheticDefaultImports": true, /* Allow `import x from y` when a module doesn't have a default export. */ + "esModuleInterop": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables `allowSyntheticDefaultImports` for type compatibility. */ + "forceConsistentCasingInFileNames": true, /* Ensure that casing is correct in imports. */ + + /* Type Checking */ + "strict": true, /* Enable all strict type-checking options. */ + + /* Completeness */ + // "skipLibCheck": true /* Skip type checking all .d.ts files. */ + }, + "exclude": [ + "coverage", + ], +} diff --git a/node_modules/es-errors/type.d.ts b/node_modules/es-errors/type.d.ts new file mode 100644 index 0000000..576fb51 --- /dev/null +++ b/node_modules/es-errors/type.d.ts @@ -0,0 +1,3 @@ +declare const TypeError: TypeErrorConstructor + +export = TypeError; diff --git a/node_modules/es-errors/type.js b/node_modules/es-errors/type.js new file mode 100644 index 0000000..9769e44 --- /dev/null +++ b/node_modules/es-errors/type.js @@ -0,0 +1,4 @@ +'use strict'; + +/** @type {import('./type')} */ +module.exports = TypeError; diff --git a/node_modules/es-errors/uri.d.ts b/node_modules/es-errors/uri.d.ts new file mode 100644 index 0000000..c3261c9 --- /dev/null +++ b/node_modules/es-errors/uri.d.ts @@ -0,0 +1,3 @@ +declare const URIError: URIErrorConstructor; + +export = URIError; diff --git a/node_modules/es-errors/uri.js b/node_modules/es-errors/uri.js new file mode 100644 index 0000000..e9cd1c7 --- /dev/null +++ b/node_modules/es-errors/uri.js @@ -0,0 +1,4 @@ +'use strict'; + +/** @type {import('./uri')} */ +module.exports = URIError; diff --git a/node_modules/es-object-atoms/.eslintrc b/node_modules/es-object-atoms/.eslintrc new file mode 100644 index 0000000..d90a1bc --- /dev/null +++ b/node_modules/es-object-atoms/.eslintrc @@ -0,0 +1,16 @@ +{ + "root": true, + + "extends": "@ljharb", + + "rules": { + "eqeqeq": ["error", "allow-null"], + "id-length": "off", + "new-cap": ["error", { + "capIsNewExceptions": [ + "RequireObjectCoercible", + "ToObject", + ], + }], + }, +} diff --git a/node_modules/es-object-atoms/.github/FUNDING.yml b/node_modules/es-object-atoms/.github/FUNDING.yml new file mode 100644 index 0000000..352bfda --- /dev/null +++ b/node_modules/es-object-atoms/.github/FUNDING.yml @@ -0,0 +1,12 @@ +# These are supported funding model platforms + +github: [ljharb] +patreon: # Replace with a single Patreon username +open_collective: # Replace with a single Open Collective username +ko_fi: # Replace with a single Ko-fi username +tidelift: npm/es-object +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +otechie: # Replace with a single Otechie username +custom: # Replace with a single custom sponsorship URL diff --git a/node_modules/es-object-atoms/CHANGELOG.md b/node_modules/es-object-atoms/CHANGELOG.md new file mode 100644 index 0000000..8efc7ba --- /dev/null +++ b/node_modules/es-object-atoms/CHANGELOG.md @@ -0,0 +1,44 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [v1.1.2](https://github.com/es-shims/es-object-atoms/compare/v1.1.1...v1.1.2) - 2026-05-22 + +### Commits + +- [Dev Deps] update `@ljharb/eslint-config`, `@ljharb/tsconfig`, `auto-changelog`, `eslint`, `npmignore` [`41e3d94`](https://github.com/es-shims/es-object-atoms/commit/41e3d94f6b49237fa490ec598e068f170c8b161e) +- [types] improve `isObject` type [`758edc2`](https://github.com/es-shims/es-object-atoms/commit/758edc2280fa6993a294a55957a43cee5951bf51) + +## [v1.1.1](https://github.com/es-shims/es-object-atoms/compare/v1.1.0...v1.1.1) - 2025-01-14 + +### Commits + +- [types] `ToObject`: improve types [`cfe8c8a`](https://github.com/es-shims/es-object-atoms/commit/cfe8c8a105c44820cb22e26f62d12ef0ad9715c8) + +## [v1.1.0](https://github.com/es-shims/es-object-atoms/compare/v1.0.1...v1.1.0) - 2025-01-14 + +### Commits + +- [New] add `isObject` [`51e4042`](https://github.com/es-shims/es-object-atoms/commit/51e4042df722eb3165f40dc5f4bf33d0197ecb07) + +## [v1.0.1](https://github.com/es-shims/es-object-atoms/compare/v1.0.0...v1.0.1) - 2025-01-13 + +### Commits + +- [Dev Deps] update `@ljharb/eslint-config`, `@ljharb/tsconfig`, `@types/tape`, `auto-changelog`, `tape` [`38ab9eb`](https://github.com/es-shims/es-object-atoms/commit/38ab9eb00b62c2f4668644f5e513d9b414ebd595) +- [types] improve types [`7d1beb8`](https://github.com/es-shims/es-object-atoms/commit/7d1beb887958b78b6a728a210a1c8370ab7e2aa1) +- [Tests] replace `aud` with `npm audit` [`25863ba`](https://github.com/es-shims/es-object-atoms/commit/25863baf99178f1d1ad33d1120498db28631907e) +- [Dev Deps] add missing peer dep [`c012309`](https://github.com/es-shims/es-object-atoms/commit/c0123091287e6132d6f4240496340c427433df28) + +## v1.0.0 - 2024-03-16 + +### Commits + +- Initial implementation, tests, readme, types [`f1499db`](https://github.com/es-shims/es-object-atoms/commit/f1499db7d3e1741e64979c61d645ab3137705e82) +- Initial commit [`99eedc7`](https://github.com/es-shims/es-object-atoms/commit/99eedc7b5fde38a50a28d3c8b724706e3e4c5f6a) +- [meta] rename repo [`fc851fa`](https://github.com/es-shims/es-object-atoms/commit/fc851fa70616d2d182aaf0bd02c2ed7084dea8fa) +- npm init [`b909377`](https://github.com/es-shims/es-object-atoms/commit/b909377c50049bd0ec575562d20b0f9ebae8947f) +- Only apps should have lockfiles [`7249edd`](https://github.com/es-shims/es-object-atoms/commit/7249edd2178c1b9ddfc66ffcc6d07fdf0d28efc1) diff --git a/node_modules/es-object-atoms/LICENSE b/node_modules/es-object-atoms/LICENSE new file mode 100644 index 0000000..f82f389 --- /dev/null +++ b/node_modules/es-object-atoms/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2024 Jordan Harband + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/es-object-atoms/README.md b/node_modules/es-object-atoms/README.md new file mode 100644 index 0000000..447695b --- /dev/null +++ b/node_modules/es-object-atoms/README.md @@ -0,0 +1,63 @@ +# es-object-atoms [![Version Badge][npm-version-svg]][package-url] + +[![github actions][actions-image]][actions-url] +[![coverage][codecov-image]][codecov-url] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][npm-badge-png]][package-url] + +ES Object-related atoms: Object, ToObject, RequireObjectCoercible. + +## Example + +```js +const assert = require('assert'); + +const $Object = require('es-object-atoms'); +const isObject = require('es-object-atoms/isObject'); +const ToObject = require('es-object-atoms/ToObject'); +const RequireObjectCoercible = require('es-object-atoms/RequireObjectCoercible'); + +assert.equal($Object, Object); +assert.throws(() => ToObject(null), TypeError); +assert.throws(() => ToObject(undefined), TypeError); +assert.throws(() => RequireObjectCoercible(null), TypeError); +assert.throws(() => RequireObjectCoercible(undefined), TypeError); + +assert.equal(isObject(undefined), false); +assert.equal(isObject(null), false); +assert.equal(isObject({}), true); +assert.equal(isObject([]), true); +assert.equal(isObject(function () {}), true); + +assert.deepEqual(RequireObjectCoercible(true), true); +assert.deepEqual(ToObject(true), Object(true)); + +const obj = {}; +assert.equal(RequireObjectCoercible(obj), obj); +assert.equal(ToObject(obj), obj); +``` + +## Tests +Simply clone the repo, `npm install`, and run `npm test` + +## Security + +Please email [@ljharb](https://github.com/ljharb) or see https://tidelift.com/security if you have a potential security vulnerability to report. + +[package-url]: https://npmjs.org/package/es-object-atoms +[npm-version-svg]: https://versionbadg.es/ljharb/es-object-atoms.svg +[deps-svg]: https://david-dm.org/ljharb/es-object-atoms.svg +[deps-url]: https://david-dm.org/ljharb/es-object-atoms +[dev-deps-svg]: https://david-dm.org/ljharb/es-object-atoms/dev-status.svg +[dev-deps-url]: https://david-dm.org/ljharb/es-object-atoms#info=devDependencies +[npm-badge-png]: https://nodei.co/npm/es-object-atoms.png?downloads=true&stars=true +[license-image]: https://img.shields.io/npm/l/es-object-atoms.svg +[license-url]: LICENSE +[downloads-image]: https://img.shields.io/npm/dm/es-object.svg +[downloads-url]: https://npm-stat.com/charts.html?package=es-object-atoms +[codecov-image]: https://codecov.io/gh/ljharb/es-object-atoms/branch/main/graphs/badge.svg +[codecov-url]: https://app.codecov.io/gh/ljharb/es-object-atoms/ +[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/ljharb/es-object-atoms +[actions-url]: https://github.com/ljharb/es-object-atoms/actions diff --git a/node_modules/es-object-atoms/RequireObjectCoercible.d.ts b/node_modules/es-object-atoms/RequireObjectCoercible.d.ts new file mode 100644 index 0000000..7e26c45 --- /dev/null +++ b/node_modules/es-object-atoms/RequireObjectCoercible.d.ts @@ -0,0 +1,3 @@ +declare function RequireObjectCoercible(value: T, optMessage?: string): T; + +export = RequireObjectCoercible; diff --git a/node_modules/es-object-atoms/RequireObjectCoercible.js b/node_modules/es-object-atoms/RequireObjectCoercible.js new file mode 100644 index 0000000..8e191c6 --- /dev/null +++ b/node_modules/es-object-atoms/RequireObjectCoercible.js @@ -0,0 +1,11 @@ +'use strict'; + +var $TypeError = require('es-errors/type'); + +/** @type {import('./RequireObjectCoercible')} */ +module.exports = function RequireObjectCoercible(value) { + if (value == null) { + throw new $TypeError((arguments.length > 0 && arguments[1]) || ('Cannot call method on ' + value)); + } + return value; +}; diff --git a/node_modules/es-object-atoms/ToObject.d.ts b/node_modules/es-object-atoms/ToObject.d.ts new file mode 100644 index 0000000..d6dd302 --- /dev/null +++ b/node_modules/es-object-atoms/ToObject.d.ts @@ -0,0 +1,7 @@ +declare function ToObject(value: number): Number; +declare function ToObject(value: boolean): Boolean; +declare function ToObject(value: string): String; +declare function ToObject(value: bigint): BigInt; +declare function ToObject(value: T): T; + +export = ToObject; diff --git a/node_modules/es-object-atoms/ToObject.js b/node_modules/es-object-atoms/ToObject.js new file mode 100644 index 0000000..2b99a7d --- /dev/null +++ b/node_modules/es-object-atoms/ToObject.js @@ -0,0 +1,10 @@ +'use strict'; + +var $Object = require('./'); +var RequireObjectCoercible = require('./RequireObjectCoercible'); + +/** @type {import('./ToObject')} */ +module.exports = function ToObject(value) { + RequireObjectCoercible(value); + return $Object(value); +}; diff --git a/node_modules/es-object-atoms/index.d.ts b/node_modules/es-object-atoms/index.d.ts new file mode 100644 index 0000000..8bdbfc8 --- /dev/null +++ b/node_modules/es-object-atoms/index.d.ts @@ -0,0 +1,3 @@ +declare const Object: ObjectConstructor; + +export = Object; diff --git a/node_modules/es-object-atoms/index.js b/node_modules/es-object-atoms/index.js new file mode 100644 index 0000000..1d33cef --- /dev/null +++ b/node_modules/es-object-atoms/index.js @@ -0,0 +1,4 @@ +'use strict'; + +/** @type {import('.')} */ +module.exports = Object; diff --git a/node_modules/es-object-atoms/isObject.d.ts b/node_modules/es-object-atoms/isObject.d.ts new file mode 100644 index 0000000..9490fbb --- /dev/null +++ b/node_modules/es-object-atoms/isObject.d.ts @@ -0,0 +1,3 @@ +declare function isObject(x: T): x is T & object & Record; + +export = isObject; diff --git a/node_modules/es-object-atoms/isObject.js b/node_modules/es-object-atoms/isObject.js new file mode 100644 index 0000000..ec49bf1 --- /dev/null +++ b/node_modules/es-object-atoms/isObject.js @@ -0,0 +1,6 @@ +'use strict'; + +/** @type {import('./isObject')} */ +module.exports = function isObject(x) { + return !!x && (typeof x === 'function' || typeof x === 'object'); +}; diff --git a/node_modules/es-object-atoms/package.json b/node_modules/es-object-atoms/package.json new file mode 100644 index 0000000..cb6bc7b --- /dev/null +++ b/node_modules/es-object-atoms/package.json @@ -0,0 +1,79 @@ +{ + "name": "es-object-atoms", + "version": "1.1.2", + "description": "ES Object-related atoms: Object, ToObject, RequireObjectCoercible", + "main": "index.js", + "exports": { + ".": "./index.js", + "./RequireObjectCoercible": "./RequireObjectCoercible.js", + "./isObject": "./isObject.js", + "./ToObject": "./ToObject.js", + "./package.json": "./package.json" + }, + "sideEffects": false, + "scripts": { + "prepack": "npmignore --auto --commentLines=autogenerated", + "prepublishOnly": "safe-publish-latest", + "prepublish": "not-in-publish || npm run prepublishOnly", + "pretest": "npm run lint", + "test": "npm run tests-only", + "tests-only": "nyc tape 'test/**/*.js'", + "posttest": "npx npm@\">= 10.2\" audit --production", + "prelint": "evalmd README.md", + "lint": "eslint --ext=js,mjs .", + "postlint": "tsc -p . && eclint check $(git ls-files | xargs find 2> /dev/null | grep -vE 'node_modules|\\.git' | grep -v dist/)", + "version": "auto-changelog && git add CHANGELOG.md", + "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/ljharb/es-object-atoms.git" + }, + "keywords": [ + "javascript", + "ecmascript", + "object", + "toobject", + "coercible" + ], + "author": "Jordan Harband ", + "license": "MIT", + "bugs": { + "url": "https://github.com/ljharb/es-object-atoms/issues" + }, + "homepage": "https://github.com/ljharb/es-object-atoms#readme", + "dependencies": { + "es-errors": "^1.3.0" + }, + "devDependencies": { + "@ljharb/eslint-config": "^22.2.3", + "@ljharb/tsconfig": "^0.3.2", + "@types/tape": "^5.8.1", + "auto-changelog": "^2.5.1", + "eclint": "^2.8.1", + "eslint": "^8.57.1", + "evalmd": "^0.0.19", + "in-publish": "^2.0.1", + "npmignore": "^0.3.5", + "nyc": "^10.3.2", + "safe-publish-latest": "^2.0.0", + "tape": "^5.9.0", + "typescript": "next" + }, + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false, + "hideCredit": true + }, + "publishConfig": { + "ignore": [ + ".github/workflows" + ] + }, + "engines": { + "node": ">= 0.4" + } +} diff --git a/node_modules/es-object-atoms/test/index.js b/node_modules/es-object-atoms/test/index.js new file mode 100644 index 0000000..430b705 --- /dev/null +++ b/node_modules/es-object-atoms/test/index.js @@ -0,0 +1,38 @@ +'use strict'; + +var test = require('tape'); + +var $Object = require('../'); +var isObject = require('../isObject'); +var ToObject = require('../ToObject'); +var RequireObjectCoercible = require('..//RequireObjectCoercible'); + +test('errors', function (t) { + t.equal($Object, Object); + // @ts-expect-error + t['throws'](function () { ToObject(null); }, TypeError); + // @ts-expect-error + t['throws'](function () { ToObject(undefined); }, TypeError); + // @ts-expect-error + t['throws'](function () { RequireObjectCoercible(null); }, TypeError); + // @ts-expect-error + t['throws'](function () { RequireObjectCoercible(undefined); }, TypeError); + + t.deepEqual(RequireObjectCoercible(true), true); + t.deepEqual(ToObject(true), Object(true)); + t.deepEqual(ToObject(42), Object(42)); + var f = function () {}; + t.equal(ToObject(f), f); + + t.equal(isObject(undefined), false); + t.equal(isObject(null), false); + t.equal(isObject({}), true); + t.equal(isObject([]), true); + t.equal(isObject(function () {}), true); + + var obj = {}; + t.equal(RequireObjectCoercible(obj), obj); + t.equal(ToObject(obj), obj); + + t.end(); +}); diff --git a/node_modules/es-object-atoms/tsconfig.json b/node_modules/es-object-atoms/tsconfig.json new file mode 100644 index 0000000..c1ef790 --- /dev/null +++ b/node_modules/es-object-atoms/tsconfig.json @@ -0,0 +1,7 @@ +{ + "extends": "@ljharb/tsconfig", + "compilerOptions": { + "target": "es5", + "ignoreDeprecations": "6.0", + }, +} diff --git a/node_modules/es-set-tostringtag/.eslintrc b/node_modules/es-set-tostringtag/.eslintrc new file mode 100644 index 0000000..2612ed8 --- /dev/null +++ b/node_modules/es-set-tostringtag/.eslintrc @@ -0,0 +1,13 @@ +{ + "root": true, + + "extends": "@ljharb", + + "rules": { + "new-cap": [2, { + "capIsNewExceptions": [ + "GetIntrinsic", + ], + }], + }, +} diff --git a/node_modules/es-set-tostringtag/.nycrc b/node_modules/es-set-tostringtag/.nycrc new file mode 100644 index 0000000..bdd626c --- /dev/null +++ b/node_modules/es-set-tostringtag/.nycrc @@ -0,0 +1,9 @@ +{ + "all": true, + "check-coverage": false, + "reporter": ["text-summary", "text", "html", "json"], + "exclude": [ + "coverage", + "test" + ] +} diff --git a/node_modules/es-set-tostringtag/CHANGELOG.md b/node_modules/es-set-tostringtag/CHANGELOG.md new file mode 100644 index 0000000..00bdc03 --- /dev/null +++ b/node_modules/es-set-tostringtag/CHANGELOG.md @@ -0,0 +1,67 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [v2.1.0](https://github.com/es-shims/es-set-tostringtag/compare/v2.0.3...v2.1.0) - 2025-01-01 + +### Commits + +- [actions] split out node 10-20, and 20+ [`ede033c`](https://github.com/es-shims/es-set-tostringtag/commit/ede033cc4e506c3966d2d482d4ac5987e329162a) +- [types] use shared config [`28ef164`](https://github.com/es-shims/es-set-tostringtag/commit/28ef164ad7c5bc21837c79f7ef25542a1f258ade) +- [New] add `nonConfigurable` option [`3bee3f0`](https://github.com/es-shims/es-set-tostringtag/commit/3bee3f04caddd318f3932912212ed20b2d62aad7) +- [Fix] validate boolean option argument [`3c8a609`](https://github.com/es-shims/es-set-tostringtag/commit/3c8a609c795a305ccca163f0ff6956caa88cdc0e) +- [Dev Deps] update `@arethetypeswrong/cli`, `@ljharb/eslint-config`, `@ljharb/tsconfig`, `@types/get-intrinsic`, `@types/tape`, `auto-changelog`, `tape` [`501a969`](https://github.com/es-shims/es-set-tostringtag/commit/501a96998484226e07f5ffd447e8f305a998f1d8) +- [Tests] add coverage [`18af289`](https://github.com/es-shims/es-set-tostringtag/commit/18af2897b4e937373c9b8c8831bc338932246470) +- [readme] document `force` option [`bd446a1`](https://github.com/es-shims/es-set-tostringtag/commit/bd446a107b71a2270278442e5124f45590d3ee64) +- [Tests] use `@arethetypeswrong/cli` [`7c2c2fa`](https://github.com/es-shims/es-set-tostringtag/commit/7c2c2fa3cca0f4d263603adb75426b239514598f) +- [Tests] replace `aud` with `npm audit` [`9e372d7`](https://github.com/es-shims/es-set-tostringtag/commit/9e372d7e6db3dab405599a14d9074a99a03b8242) +- [Deps] update `get-intrinsic` [`7df1216`](https://github.com/es-shims/es-set-tostringtag/commit/7df12167295385c2a547410e687cb0c04f3a34b9) +- [Deps] update `hasown` [`993a7d2`](https://github.com/es-shims/es-set-tostringtag/commit/993a7d200e2059fd857ec1a25d0a49c2c34ae6e2) +- [Dev Deps] add missing peer dep [`148ed8d`](https://github.com/es-shims/es-set-tostringtag/commit/148ed8db99a7a94f9af3823fd083e6e437fa1587) + +## [v2.0.3](https://github.com/es-shims/es-set-tostringtag/compare/v2.0.2...v2.0.3) - 2024-02-20 + +### Commits + +- add types [`d538513`](https://github.com/es-shims/es-set-tostringtag/commit/d5385133592a32a0a416cb535327918af7fbc4ad) +- [Deps] update `get-intrinsic`, `has-tostringtag`, `hasown` [`d129b29`](https://github.com/es-shims/es-set-tostringtag/commit/d129b29536bccc8a9d03a47887ca4d1f7ad0c5b9) +- [Dev Deps] update `aud`, `npmignore`, `tape` [`132ed23`](https://github.com/es-shims/es-set-tostringtag/commit/132ed23c964a41ed55e4ab4a5a2c3fe185e821c1) +- [Tests] fix hasOwn require [`f89c831`](https://github.com/es-shims/es-set-tostringtag/commit/f89c831fe5f3edf1f979c597b56fee1be6111f56) + +## [v2.0.2](https://github.com/es-shims/es-set-tostringtag/compare/v2.0.1...v2.0.2) - 2023-10-20 + +### Commits + +- [Refactor] use `hasown` instead of `has` [`0cc6c4e`](https://github.com/es-shims/es-set-tostringtag/commit/0cc6c4e61fd13e8f00b85424ae6e541ebf289e74) +- [Dev Deps] update `@ljharb/eslint-config`, `aud`, `tape` [`70e447c`](https://github.com/es-shims/es-set-tostringtag/commit/70e447cf9f82b896ddf359fda0a0498c16cf3ed2) +- [Deps] update `get-intrinsic` [`826aab7`](https://github.com/es-shims/es-set-tostringtag/commit/826aab76180392871c8efa99acc0f0bbf775c64e) + +## [v2.0.1](https://github.com/es-shims/es-set-tostringtag/compare/v2.0.0...v2.0.1) - 2023-01-05 + +### Fixed + +- [Fix] move `has` to prod deps [`#2`](https://github.com/es-shims/es-set-tostringtag/issues/2) + +### Commits + +- [Dev Deps] update `@ljharb/eslint-config` [`b9eecd2`](https://github.com/es-shims/es-set-tostringtag/commit/b9eecd23c10b7b43ba75089ac8ff8cc6b295798b) + +## [v2.0.0](https://github.com/es-shims/es-set-tostringtag/compare/v1.0.0...v2.0.0) - 2022-12-21 + +### Commits + +- [Tests] refactor tests [`168dcfb`](https://github.com/es-shims/es-set-tostringtag/commit/168dcfbb535c279dc48ccdc89419155125aaec18) +- [Breaking] do not set toStringTag if it is already set [`226ab87`](https://github.com/es-shims/es-set-tostringtag/commit/226ab874192c625d9e5f0e599d3f60d2b2aa83b5) +- [New] add `force` option to set even if already set [`1abd4ec`](https://github.com/es-shims/es-set-tostringtag/commit/1abd4ecb282f19718c4518284b0293a343564505) + +## v1.0.0 - 2022-12-21 + +### Commits + +- Initial implementation, tests, readme [`a0e1147`](https://github.com/es-shims/es-set-tostringtag/commit/a0e11473f79a233b46374525c962ea1b4d42418a) +- Initial commit [`ffd4aff`](https://github.com/es-shims/es-set-tostringtag/commit/ffd4afffbeebf29aff0d87a7cfc3f7844e09fe68) +- npm init [`fffe5bd`](https://github.com/es-shims/es-set-tostringtag/commit/fffe5bd1d1146d084730a387a9c672371f4a8fff) +- Only apps should have lockfiles [`d363871`](https://github.com/es-shims/es-set-tostringtag/commit/d36387139465623e161a15dbd39120537f150c62) diff --git a/node_modules/es-set-tostringtag/LICENSE b/node_modules/es-set-tostringtag/LICENSE new file mode 100644 index 0000000..c2a8460 --- /dev/null +++ b/node_modules/es-set-tostringtag/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2022 ECMAScript Shims + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/es-set-tostringtag/README.md b/node_modules/es-set-tostringtag/README.md new file mode 100644 index 0000000..c27bc9f --- /dev/null +++ b/node_modules/es-set-tostringtag/README.md @@ -0,0 +1,53 @@ +# es-set-tostringtag [![Version Badge][npm-version-svg]][package-url] + +[![github actions][actions-image]][actions-url] +[![coverage][codecov-image]][codecov-url] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][npm-badge-png]][package-url] + +A helper to optimistically set Symbol.toStringTag, when possible. + +## Example +Most common usage: +```js +var assert = require('assert'); +var setToStringTag = require('es-set-tostringtag'); + +var obj = {}; + +assert.equal(Object.prototype.toString.call(obj), '[object Object]'); + +setToStringTag(obj, 'tagged!'); + +assert.equal(Object.prototype.toString.call(obj), '[object tagged!]'); +``` + +## Options +An optional options argument can be provided as the third argument. The available options are: + +### `force` +If the `force` option is set to `true`, the toStringTag will be set even if it is already set. + +### `nonConfigurable` +If the `nonConfigurable` option is set to `true`, the toStringTag will be defined as non-configurable when possible. + +## Tests +Simply clone the repo, `npm install`, and run `npm test` + +[package-url]: https://npmjs.com/package/es-set-tostringtag +[npm-version-svg]: https://versionbadg.es/es-shims/es-set-tostringtag.svg +[deps-svg]: https://david-dm.org/es-shims/es-set-tostringtag.svg +[deps-url]: https://david-dm.org/es-shims/es-set-tostringtag +[dev-deps-svg]: https://david-dm.org/es-shims/es-set-tostringtag/dev-status.svg +[dev-deps-url]: https://david-dm.org/es-shims/es-set-tostringtag#info=devDependencies +[npm-badge-png]: https://nodei.co/npm/es-set-tostringtag.png?downloads=true&stars=true +[license-image]: https://img.shields.io/npm/l/es-set-tostringtag.svg +[license-url]: LICENSE +[downloads-image]: https://img.shields.io/npm/dm/es-set-tostringtag.svg +[downloads-url]: https://npm-stat.com/charts.html?package=es-set-tostringtag +[codecov-image]: https://codecov.io/gh/es-shims/es-set-tostringtag/branch/main/graphs/badge.svg +[codecov-url]: https://app.codecov.io/gh/es-shims/es-set-tostringtag/ +[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/es-shims/es-set-tostringtag +[actions-url]: https://github.com/es-shims/es-set-tostringtag/actions diff --git a/node_modules/es-set-tostringtag/index.d.ts b/node_modules/es-set-tostringtag/index.d.ts new file mode 100644 index 0000000..c9a8fc4 --- /dev/null +++ b/node_modules/es-set-tostringtag/index.d.ts @@ -0,0 +1,10 @@ +declare function setToStringTag( + object: object & { [Symbol.toStringTag]?: unknown }, + value: string | unknown, + options?: { + force?: boolean; + nonConfigurable?: boolean; + }, +): void; + +export = setToStringTag; \ No newline at end of file diff --git a/node_modules/es-set-tostringtag/index.js b/node_modules/es-set-tostringtag/index.js new file mode 100644 index 0000000..6b6b49c --- /dev/null +++ b/node_modules/es-set-tostringtag/index.js @@ -0,0 +1,35 @@ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $defineProperty = GetIntrinsic('%Object.defineProperty%', true); + +var hasToStringTag = require('has-tostringtag/shams')(); +var hasOwn = require('hasown'); +var $TypeError = require('es-errors/type'); + +var toStringTag = hasToStringTag ? Symbol.toStringTag : null; + +/** @type {import('.')} */ +module.exports = function setToStringTag(object, value) { + var overrideIfSet = arguments.length > 2 && !!arguments[2] && arguments[2].force; + var nonConfigurable = arguments.length > 2 && !!arguments[2] && arguments[2].nonConfigurable; + if ( + (typeof overrideIfSet !== 'undefined' && typeof overrideIfSet !== 'boolean') + || (typeof nonConfigurable !== 'undefined' && typeof nonConfigurable !== 'boolean') + ) { + throw new $TypeError('if provided, the `overrideIfSet` and `nonConfigurable` options must be booleans'); + } + if (toStringTag && (overrideIfSet || !hasOwn(object, toStringTag))) { + if ($defineProperty) { + $defineProperty(object, toStringTag, { + configurable: !nonConfigurable, + enumerable: false, + value: value, + writable: false + }); + } else { + object[toStringTag] = value; // eslint-disable-line no-param-reassign + } + } +}; diff --git a/node_modules/es-set-tostringtag/package.json b/node_modules/es-set-tostringtag/package.json new file mode 100644 index 0000000..277c3e5 --- /dev/null +++ b/node_modules/es-set-tostringtag/package.json @@ -0,0 +1,78 @@ +{ + "name": "es-set-tostringtag", + "version": "2.1.0", + "description": "A helper to optimistically set Symbol.toStringTag, when possible.", + "main": "index.js", + "exports": { + ".": "./index.js", + "./package.json": "./package.json" + }, + "sideEffects": false, + "scripts": { + "prepack": "npmignore --auto --commentLines=autogenerated", + "prepublishOnly": "safe-publish-latest", + "prepublish": "not-in-publish || npm run prepublishOnly", + "prelint": "evalmd README.md", + "lint": "eslint --ext=js,mjs .", + "postlint": "tsc -p . && attw -P", + "pretest": "npm run lint", + "tests-only": "nyc tape 'test/**/*.js'", + "test": "npm run tests-only", + "posttest": "npx npm@\">= 10.2\" audit --production", + "version": "auto-changelog && git add CHANGELOG.md", + "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/es-shims/es-set-tostringtag.git" + }, + "author": "Jordan Harband ", + "license": "MIT", + "bugs": { + "url": "https://github.com/es-shims/es-set-tostringtag/issues" + }, + "homepage": "https://github.com/es-shims/es-set-tostringtag#readme", + "devDependencies": { + "@arethetypeswrong/cli": "^0.17.2", + "@ljharb/eslint-config": "^21.1.1", + "@ljharb/tsconfig": "^0.2.3", + "@types/get-intrinsic": "^1.2.3", + "@types/has-symbols": "^1.0.2", + "@types/tape": "^5.8.0", + "auto-changelog": "^2.5.0", + "encoding": "^0.1.13", + "eslint": "=8.8.0", + "evalmd": "^0.0.19", + "in-publish": "^2.0.1", + "npmignore": "^0.3.1", + "nyc": "^10.3.2", + "safe-publish-latest": "^2.0.0", + "tape": "^5.9.0", + "typescript": "next" + }, + "dependencies": { + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.6", + "has-tostringtag": "^1.0.2", + "hasown": "^2.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false, + "hideCredit": true + }, + "testling": { + "files": "./test/index.js" + }, + "publishConfig": { + "ignore": [ + ".github/workflows" + ] + } +} diff --git a/node_modules/es-set-tostringtag/test/index.js b/node_modules/es-set-tostringtag/test/index.js new file mode 100644 index 0000000..f1757b3 --- /dev/null +++ b/node_modules/es-set-tostringtag/test/index.js @@ -0,0 +1,85 @@ +'use strict'; + +var test = require('tape'); +var hasToStringTag = require('has-tostringtag/shams')(); +var hasOwn = require('hasown'); + +var setToStringTag = require('../'); + +test('setToStringTag', function (t) { + t.equal(typeof setToStringTag, 'function', 'is a function'); + + /** @type {{ [Symbol.toStringTag]?: typeof sentinel }} */ + var obj = {}; + var sentinel = {}; + + setToStringTag(obj, sentinel); + + t['throws']( + // @ts-expect-error + function () { setToStringTag(obj, sentinel, { force: 'yes' }); }, + TypeError, + 'throws if options is not an object' + ); + + t.test('has Symbol.toStringTag', { skip: !hasToStringTag }, function (st) { + st.ok(hasOwn(obj, Symbol.toStringTag), 'has toStringTag property'); + + st.equal(obj[Symbol.toStringTag], sentinel, 'toStringTag property is as expected'); + + st.equal(String(obj), '[object Object]', 'toStringTag works'); + + /** @type {{ [Symbol.toStringTag]?: string }} */ + var tagged = {}; + tagged[Symbol.toStringTag] = 'already tagged'; + st.equal(String(tagged), '[object already tagged]', 'toStringTag works'); + + setToStringTag(tagged, 'new tag'); + st.equal(String(tagged), '[object already tagged]', 'toStringTag is unchanged'); + + setToStringTag(tagged, 'new tag', { force: true }); + st.equal(String(tagged), '[object new tag]', 'toStringTag is changed with force: true'); + + st.deepEqual( + Object.getOwnPropertyDescriptor(tagged, Symbol.toStringTag), + { + configurable: true, + enumerable: false, + value: 'new tag', + writable: false + }, + 'has expected property descriptor' + ); + + setToStringTag(tagged, 'new tag', { force: true, nonConfigurable: true }); + st.deepEqual( + Object.getOwnPropertyDescriptor(tagged, Symbol.toStringTag), + { + configurable: false, + enumerable: false, + value: 'new tag', + writable: false + }, + 'is nonconfigurable' + ); + + st.end(); + }); + + t.test('does not have Symbol.toStringTag', { skip: hasToStringTag }, function (st) { + var passed = true; + for (var key in obj) { // eslint-disable-line no-restricted-syntax + if (hasOwn(obj, key)) { + st.fail('object has own key ' + key); + passed = false; + } + } + if (passed) { + st.ok(true, 'object has no enumerable own keys'); + } + + st.end(); + }); + + t.end(); +}); diff --git a/node_modules/es-set-tostringtag/tsconfig.json b/node_modules/es-set-tostringtag/tsconfig.json new file mode 100644 index 0000000..d9a6668 --- /dev/null +++ b/node_modules/es-set-tostringtag/tsconfig.json @@ -0,0 +1,9 @@ +{ + "extends": "@ljharb/tsconfig", + "compilerOptions": { + "target": "es2021", + }, + "exclude": [ + "coverage", + ], +} diff --git a/node_modules/follow-redirects/LICENSE b/node_modules/follow-redirects/LICENSE new file mode 100644 index 0000000..742cbad --- /dev/null +++ b/node_modules/follow-redirects/LICENSE @@ -0,0 +1,18 @@ +Copyright 2014–present Olivier Lalonde , James Talmage , Ruben Verborgh + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR +IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/follow-redirects/README.md b/node_modules/follow-redirects/README.md new file mode 100644 index 0000000..f896c21 --- /dev/null +++ b/node_modules/follow-redirects/README.md @@ -0,0 +1,183 @@ +## _Follow Redirects_ is in need of funding + +> [!IMPORTANT] +> **Maintenance paused until funding found.** +> +> follow-redirects is downloaded over 400 million times per month, +> It has been maintained for over ten years by one volunteer, +> who has no funds to provide update and security guarantees. +> +> **What this means for you:** +> the package stays published and keeps working as it does today, +> but there are no guarantees of bug fixes, security fixes, +> or replies to issues and pull requests. +> Security reports are handled best-effort only; see [SECURITY.md](SECURITY.md). +> +> **What can restart maintenance:** +> Even if only 0.1% of downloads paid $0.01, we'd be fully funded +> with $4000 per month. +> That's not the case, and that's okay, +> but unfortunately also insufficient to continue. +> We need to cover security triage, CVE handling, fixes, and releases. +> Progress toward that goal will be posted here. +> +> **If your company depends on follow-redirects,** +> directly or another library, +> please [sponsor on GitHub](https://github.com/sponsors/RubenVerborgh) +> or email us for invoice-based funding or a security support agreement. + +Drop-in replacement for Node's `http` and `https` modules that automatically follows redirects. + +[![npm version](https://img.shields.io/npm/v/follow-redirects.svg)](https://www.npmjs.com/package/follow-redirects) +[![Build Status](https://github.com/follow-redirects/follow-redirects/workflows/CI/badge.svg)](https://github.com/follow-redirects/follow-redirects/actions) +[![Coverage Status](https://coveralls.io/repos/follow-redirects/follow-redirects/badge.svg?branch=master)](https://coveralls.io/r/follow-redirects/follow-redirects?branch=master) +[![npm downloads](https://img.shields.io/npm/dm/follow-redirects.svg)](https://www.npmjs.com/package/follow-redirects) +[![Sponsor on GitHub](https://img.shields.io/static/v1?label=Sponsor&message=%F0%9F%92%96&logo=GitHub)](https://github.com/sponsors/RubenVerborgh) + +`follow-redirects` provides [request](https://nodejs.org/api/http.html#http_http_request_options_callback) and [get](https://nodejs.org/api/http.html#http_http_get_options_callback) + methods that behave identically to those found on the native [http](https://nodejs.org/api/http.html#http_http_request_options_callback) and [https](https://nodejs.org/api/https.html#https_https_request_options_callback) + modules, with the exception that they will seamlessly follow redirects. + +```javascript +const { http, https } = require('follow-redirects'); + +http.get('http://en.wikipedia.org/', response => { + response.on('data', chunk => { + console.log(chunk); + }); +}).on('error', err => { + console.error(err); +}); +``` + +You can inspect the final redirected URL through the `responseUrl` property on the `response`. +If no redirection happened, `responseUrl` is the original request URL. + +```javascript +const request = https.request({ + host: 'en.wikipedia.org', + path: '/', +}, response => { + console.log(response.responseUrl); + // 'http://duckduckgo.com/robots.txt' +}); +request.end(); +``` + +## Options +### Global options +Global options are set directly on the `follow-redirects` module: + +```javascript +const followRedirects = require('follow-redirects'); +followRedirects.maxRedirects = 10; +followRedirects.maxBodyLength = 20 * 1024 * 1024; // 20 MB +``` + +The following global options are supported: + +- `maxRedirects` (default: `21`) – sets the maximum number of allowed redirects; if exceeded, an error will be emitted. + +- `maxBodyLength` (default: 10MB) – sets the maximum size of the request body; if exceeded, an error will be emitted. + +### Per-request options +Per-request options are set by passing an `options` object: + +```javascript +const url = require('url'); +const { http, https } = require('follow-redirects'); + +const options = url.parse('http://en.wikipedia.org/'); +options.maxRedirects = 10; +options.beforeRedirect = (options, response, request) => { + // Use this to adjust the request options upon redirecting, + // to inspect the latest response headers, + // or to cancel the request by throwing an error + + // response.headers = the redirect response headers + // response.statusCode = the redirect response code (eg. 301, 307, etc.) + + // request.url = the requested URL that resulted in a redirect + // request.headers = the headers in the request that resulted in a redirect + // request.method = the method of the request that resulted in a redirect + if (options.hostname === "example.org") { + options.auth = "user:password"; + } +}; +http.request(options); +``` + +In addition to the [standard HTTP](https://nodejs.org/api/http.html#http_http_request_options_callback) and [HTTPS options](https://nodejs.org/api/https.html#https_https_request_options_callback), +the following per-request options are supported: +- `followRedirects` (default: `true`) – whether redirects should be followed. + +- `maxRedirects` (default: `21`) – sets the maximum number of allowed redirects; if exceeded, an error will be emitted. + +- `maxBodyLength` (default: 10MB) – sets the maximum size of the request body; if exceeded, an error will be emitted. + +- `beforeRedirect` (default: `undefined`) – optionally change the request `options` on redirects, or abort the request by throwing an error. + +- `agents` (default: `undefined`) – sets the `agent` option per protocol, since HTTP and HTTPS use different agents. Example value: `{ http: new http.Agent(), https: new https.Agent() }` + +- `trackRedirects` (default: `false`) – whether to store the redirected response details into the `redirects` array on the response object. + +- `sensitiveHeaders` (default: `[]`) – names of headers to omit when making redirected requests (such as `X-API-Key`, `X-Auth-Token`…) + + +### Advanced usage +By default, `follow-redirects` will use the Node.js default implementations +of [`http`](https://nodejs.org/api/http.html) +and [`https`](https://nodejs.org/api/https.html). +To enable features such as caching and/or intermediate request tracking, +you might instead want to wrap `follow-redirects` around custom protocol implementations: + +```javascript +const { http, https } = require('follow-redirects').wrap({ + http: require('your-custom-http'), + https: require('your-custom-https'), +}); +``` + +Such custom protocols only need an implementation of the `request` method. + +## Browser Usage + +Due to the way the browser works, +the `http` and `https` browser equivalents perform redirects by default. + +By requiring `follow-redirects` this way: +```javascript +const http = require('follow-redirects/http'); +const https = require('follow-redirects/https'); +``` +you can easily tell webpack and friends to replace +`follow-redirect` by the built-in versions: + +```json +{ + "follow-redirects/http" : "http", + "follow-redirects/https" : "https" +} +``` + +## Contributing + +Pull Requests are always welcome. Please [file an issue](https://github.com/follow-redirects/follow-redirects/issues) + detailing your proposal before you invest your valuable time. Additional features and bug fixes should be accompanied + by tests. You can run the test suite locally with a simple `npm test` command. + +## Debug Logging + +`follow-redirects` uses the excellent [debug](https://www.npmjs.com/package/debug) for logging. To turn on logging + set the environment variable `DEBUG=follow-redirects` for debug output from just this module. When running the test + suite it is sometimes advantageous to set `DEBUG=*` to see output from the express server as well. + +## Authors + +- [Ruben Verborgh](https://ruben.verborgh.org/) +- [Olivier Lalonde](mailto:olalonde@gmail.com) +- [James Talmage](mailto:james@talmage.io) + +## License + +[MIT License](https://github.com/follow-redirects/follow-redirects/blob/master/LICENSE) diff --git a/node_modules/follow-redirects/debug.js b/node_modules/follow-redirects/debug.js new file mode 100644 index 0000000..decb77d --- /dev/null +++ b/node_modules/follow-redirects/debug.js @@ -0,0 +1,15 @@ +var debug; + +module.exports = function () { + if (!debug) { + try { + /* eslint global-require: off */ + debug = require("debug")("follow-redirects"); + } + catch (error) { /* */ } + if (typeof debug !== "function") { + debug = function () { /* */ }; + } + } + debug.apply(null, arguments); +}; diff --git a/node_modules/follow-redirects/http.js b/node_modules/follow-redirects/http.js new file mode 100644 index 0000000..695e356 --- /dev/null +++ b/node_modules/follow-redirects/http.js @@ -0,0 +1 @@ +module.exports = require("./").http; diff --git a/node_modules/follow-redirects/https.js b/node_modules/follow-redirects/https.js new file mode 100644 index 0000000..d21c921 --- /dev/null +++ b/node_modules/follow-redirects/https.js @@ -0,0 +1 @@ +module.exports = require("./").https; diff --git a/node_modules/follow-redirects/index.js b/node_modules/follow-redirects/index.js new file mode 100644 index 0000000..f96546b --- /dev/null +++ b/node_modules/follow-redirects/index.js @@ -0,0 +1,715 @@ +var url = require("url"); +var URL = url.URL; +var http = require("http"); +var https = require("https"); +var Writable = require("stream").Writable; +var assert = require("assert"); +var debug = require("./debug"); + +// Preventive platform detection +// istanbul ignore next +(function detectUnsupportedEnvironment() { + var looksLikeNode = typeof process !== "undefined"; + var looksLikeBrowser = typeof window !== "undefined" && typeof document !== "undefined"; + var looksLikeV8 = isFunction(Error.captureStackTrace); + if (!looksLikeNode && (looksLikeBrowser || !looksLikeV8)) { + console.warn("The follow-redirects package should be excluded from browser builds."); + } +}()); + +// Whether to use the native URL object or the legacy url module +var useNativeURL = false; +try { + assert(new URL("")); +} +catch (error) { + useNativeURL = error.code === "ERR_INVALID_URL"; +} + +// HTTP headers to drop across HTTP/HTTPS and domain boundaries +var sensitiveHeaders = [ + "Authorization", + "Proxy-Authorization", + "Cookie", +]; + +// URL fields to preserve in copy operations +var preservedUrlFields = [ + "auth", + "host", + "hostname", + "href", + "path", + "pathname", + "port", + "protocol", + "query", + "search", + "hash", +]; + +// Create handlers that pass events from native requests +var events = ["abort", "aborted", "connect", "error", "socket", "timeout"]; +var eventHandlers = Object.create(null); +events.forEach(function (event) { + eventHandlers[event] = function (arg1, arg2, arg3) { + this._redirectable.emit(event, arg1, arg2, arg3); + }; +}); + +// Error types with codes +var InvalidUrlError = createErrorType( + "ERR_INVALID_URL", + "Invalid URL", + TypeError +); +var RedirectionError = createErrorType( + "ERR_FR_REDIRECTION_FAILURE", + "Redirected request failed" +); +var TooManyRedirectsError = createErrorType( + "ERR_FR_TOO_MANY_REDIRECTS", + "Maximum number of redirects exceeded", + RedirectionError +); +var MaxBodyLengthExceededError = createErrorType( + "ERR_FR_MAX_BODY_LENGTH_EXCEEDED", + "Request body larger than maxBodyLength limit" +); +var WriteAfterEndError = createErrorType( + "ERR_STREAM_WRITE_AFTER_END", + "write after end" +); + +// istanbul ignore next +var destroy = Writable.prototype.destroy || noop; + +// An HTTP(S) request that can be redirected +function RedirectableRequest(options, responseCallback) { + // Initialize the request + Writable.call(this); + this._sanitizeOptions(options); + this._options = options; + this._ended = false; + this._ending = false; + this._redirectCount = 0; + this._redirects = []; + this._requestBodyLength = 0; + this._requestBodyBuffers = []; + + // Attach a callback if passed + if (responseCallback) { + this.on("response", responseCallback); + } + + // React to responses of native requests + var self = this; + this._onNativeResponse = function (response) { + try { + self._processResponse(response); + } + catch (cause) { + self.emit("error", cause instanceof RedirectionError ? + cause : new RedirectionError({ cause: cause })); + } + }; + + // Create filter for sensitive HTTP headers + this._headerFilter = new RegExp("^(?:" + + sensitiveHeaders.concat(options.sensitiveHeaders).map(escapeRegex).join("|") + + ")$", "i"); + + // Perform the first request + this._performRequest(); +} +RedirectableRequest.prototype = Object.create(Writable.prototype); + +RedirectableRequest.prototype.abort = function () { + destroyRequest(this._currentRequest); + this._currentRequest.abort(); + this.emit("abort"); +}; + +RedirectableRequest.prototype.destroy = function (error) { + destroyRequest(this._currentRequest, error); + destroy.call(this, error); + return this; +}; + +// Writes buffered data to the current native request +RedirectableRequest.prototype.write = function (data, encoding, callback) { + // Writing is not allowed if end has been called + if (this._ending) { + throw new WriteAfterEndError(); + } + + // Validate input and shift parameters if necessary + if (!isString(data) && !isBuffer(data)) { + throw new TypeError("data should be a string, Buffer or Uint8Array"); + } + if (isFunction(encoding)) { + callback = encoding; + encoding = null; + } + + // Ignore empty buffers, since writing them doesn't invoke the callback + // https://github.com/nodejs/node/issues/22066 + if (data.length === 0) { + if (callback) { + callback(); + } + return; + } + // Only write when we don't exceed the maximum body length + if (this._requestBodyLength + data.length <= this._options.maxBodyLength) { + this._requestBodyLength += data.length; + this._requestBodyBuffers.push({ data: data, encoding: encoding }); + this._currentRequest.write(data, encoding, callback); + } + // Error when we exceed the maximum body length + else { + this.emit("error", new MaxBodyLengthExceededError()); + this.abort(); + } +}; + +// Ends the current native request +RedirectableRequest.prototype.end = function (data, encoding, callback) { + // Shift parameters if necessary + if (isFunction(data)) { + callback = data; + data = encoding = null; + } + else if (isFunction(encoding)) { + callback = encoding; + encoding = null; + } + + // Write data if needed and end + if (!data) { + this._ended = this._ending = true; + this._currentRequest.end(null, null, callback); + } + else { + var self = this; + var currentRequest = this._currentRequest; + this.write(data, encoding, function () { + self._ended = true; + currentRequest.end(null, null, callback); + }); + this._ending = true; + } +}; + +// Sets a header value on the current native request +RedirectableRequest.prototype.setHeader = function (name, value) { + this._options.headers[name] = value; + this._currentRequest.setHeader(name, value); +}; + +// Clears a header value on the current native request +RedirectableRequest.prototype.removeHeader = function (name) { + delete this._options.headers[name]; + this._currentRequest.removeHeader(name); +}; + +// Global timeout for all underlying requests +RedirectableRequest.prototype.setTimeout = function (msecs, callback) { + var self = this; + + // Destroys the socket on timeout + function destroyOnTimeout(socket) { + socket.setTimeout(msecs); + socket.removeListener("timeout", socket.destroy); + socket.addListener("timeout", socket.destroy); + } + + // Sets up a timer to trigger a timeout event + function startTimer(socket) { + if (self._timeout) { + clearTimeout(self._timeout); + } + self._timeout = setTimeout(function () { + self.emit("timeout"); + clearTimer(); + }, msecs); + destroyOnTimeout(socket); + } + + // Stops a timeout from triggering + function clearTimer() { + // Clear the timeout + if (self._timeout) { + clearTimeout(self._timeout); + self._timeout = null; + } + + // Clean up all attached listeners + self.removeListener("abort", clearTimer); + self.removeListener("error", clearTimer); + self.removeListener("response", clearTimer); + self.removeListener("close", clearTimer); + if (callback) { + self.removeListener("timeout", callback); + } + if (!self.socket) { + self._currentRequest.removeListener("socket", startTimer); + } + } + + // Attach callback if passed + if (callback) { + this.on("timeout", callback); + } + + // Start the timer if or when the socket is opened + if (this.socket) { + startTimer(this.socket); + } + else { + this._currentRequest.once("socket", startTimer); + } + + // Clean up on events + this.on("socket", destroyOnTimeout); + this.on("abort", clearTimer); + this.on("error", clearTimer); + this.on("response", clearTimer); + this.on("close", clearTimer); + + return this; +}; + +// Proxy all other public ClientRequest methods +[ + "flushHeaders", "getHeader", + "setNoDelay", "setSocketKeepAlive", +].forEach(function (method) { + RedirectableRequest.prototype[method] = function (a, b) { + return this._currentRequest[method](a, b); + }; +}); + +// Proxy all public ClientRequest properties +["aborted", "connection", "socket"].forEach(function (property) { + Object.defineProperty(RedirectableRequest.prototype, property, { + get: function () { return this._currentRequest[property]; }, + }); +}); + +RedirectableRequest.prototype._sanitizeOptions = function (options) { + // Ensure headers are always present + if (!options.headers) { + options.headers = {}; + } + // Convert [header1, value1, header2, value2, …] to object + else if (Array.isArray(options.headers)) { + var headerList = options.headers; + options.headers = {}; + for (var i = 0; i < headerList.length; i += 2) { + options.headers[headerList[i]] = headerList[i + 1]; + } + } + // Ensure sensitive headers are always present + if (!Array.isArray(options.sensitiveHeaders)) { + options.sensitiveHeaders = []; + } + + // Since http.request treats host as an alias of hostname, + // but the url module interprets host as hostname plus port, + // eliminate the host property to avoid confusion. + if (options.host) { + // Use hostname if set, because it has precedence + if (!options.hostname) { + options.hostname = options.host; + } + delete options.host; + } + + // Complete the URL object when necessary + if (!options.pathname && options.path) { + var searchPos = options.path.indexOf("?"); + if (searchPos < 0) { + options.pathname = options.path; + } + else { + options.pathname = options.path.substring(0, searchPos); + options.search = options.path.substring(searchPos); + } + } +}; + + +// Executes the next native request (initial or redirect) +RedirectableRequest.prototype._performRequest = function () { + // Load the native protocol + var protocol = this._options.protocol; + var nativeProtocol = this._options.nativeProtocols[protocol]; + if (!nativeProtocol) { + throw new TypeError("Unsupported protocol " + protocol); + } + + // If specified, use the agent corresponding to the protocol + // (HTTP and HTTPS use different types of agents) + if (this._options.agents) { + var scheme = protocol.slice(0, -1); + this._options.agent = this._options.agents[scheme]; + } + + // Create the native request and set up its event handlers + var request = this._currentRequest = + nativeProtocol.request(this._options, this._onNativeResponse); + request._redirectable = this; + for (var event of events) { + request.on(event, eventHandlers[event]); + } + + // RFC7230§5.3.1: When making a request directly to an origin server, […] + // a client MUST send only the absolute path […] as the request-target. + this._currentUrl = /^\//.test(this._options.path) ? + url.format(this._options) : + // When making a request to a proxy, […] + // a client MUST send the target URI in absolute-form […]. + this._options.path; + + // End a redirected request + // (The first request must be ended explicitly with RedirectableRequest#end) + if (this._isRedirect) { + // Write the request entity and end + var i = 0; + var self = this; + var buffers = this._requestBodyBuffers; + (function writeNext(error) { + // Only write if this request has not been redirected yet + // istanbul ignore else + if (request === self._currentRequest) { + // Report any write errors + // istanbul ignore if + if (error) { + self.emit("error", error); + } + // Write the next buffer if there are still left + else if (i < buffers.length) { + var buffer = buffers[i++]; + // istanbul ignore else + if (!request.finished) { + request.write(buffer.data, buffer.encoding, writeNext); + } + } + // End the request if `end` has been called on us + else if (self._ended) { + request.end(); + } + } + }()); + } +}; + +// Processes a response from the current native request +RedirectableRequest.prototype._processResponse = function (response) { + // Store the redirected response + var statusCode = response.statusCode; + if (this._options.trackRedirects) { + this._redirects.push({ + url: this._currentUrl, + headers: response.headers, + statusCode: statusCode, + }); + } + + // RFC7231§6.4: The 3xx (Redirection) class of status code indicates + // that further action needs to be taken by the user agent in order to + // fulfill the request. If a Location header field is provided, + // the user agent MAY automatically redirect its request to the URI + // referenced by the Location field value, + // even if the specific status code is not understood. + + // If the response is not a redirect; return it as-is + var location = response.headers.location; + if (!location || this._options.followRedirects === false || + statusCode < 300 || statusCode >= 400) { + response.responseUrl = this._currentUrl; + response.redirects = this._redirects; + this.emit("response", response); + + // Clean up + this._requestBodyBuffers = []; + return; + } + + // The response is a redirect, so abort the current request + destroyRequest(this._currentRequest); + // Discard the remainder of the response to avoid waiting for data + response.destroy(); + + // RFC7231§6.4: A client SHOULD detect and intervene + // in cyclical redirections (i.e., "infinite" redirection loops). + if (++this._redirectCount > this._options.maxRedirects) { + throw new TooManyRedirectsError(); + } + + // Store the request headers if applicable + var requestHeaders; + var beforeRedirect = this._options.beforeRedirect; + if (beforeRedirect) { + requestHeaders = Object.assign({ + // The Host header was set by nativeProtocol.request + Host: response.req.getHeader("host"), + }, this._options.headers); + } + + // RFC7231§6.4: Automatic redirection needs to done with + // care for methods not known to be safe, […] + // RFC7231§6.4.2–3: For historical reasons, a user agent MAY change + // the request method from POST to GET for the subsequent request. + var method = this._options.method; + if ((statusCode === 301 || statusCode === 302) && this._options.method === "POST" || + // RFC7231§6.4.4: The 303 (See Other) status code indicates that + // the server is redirecting the user agent to a different resource […] + // A user agent can perform a retrieval request targeting that URI + // (a GET or HEAD request if using HTTP) […] + (statusCode === 303) && !/^(?:GET|HEAD)$/.test(this._options.method)) { + this._options.method = "GET"; + // Drop a possible entity and headers related to it + this._requestBodyBuffers = []; + removeMatchingHeaders(/^content-/i, this._options.headers); + } + + // Drop the Host header, as the redirect might lead to a different host + var currentHostHeader = removeMatchingHeaders(/^host$/i, this._options.headers); + + // If the redirect is relative, carry over the host of the last request + var currentUrlParts = parseUrl(this._currentUrl); + var currentHost = currentHostHeader || currentUrlParts.host; + var currentUrl = /^\w+:/.test(location) ? this._currentUrl : + url.format(Object.assign(currentUrlParts, { host: currentHost })); + + // Create the redirected request + var redirectUrl = resolveUrl(location, currentUrl); + debug("redirecting to", redirectUrl.href); + this._isRedirect = true; + spreadUrlObject(redirectUrl, this._options); + + // Drop confidential headers when redirecting to a less secure protocol + // or to a different domain that is not a superdomain + if (redirectUrl.protocol !== currentUrlParts.protocol && + redirectUrl.protocol !== "https:" || + redirectUrl.host !== currentHost && + !isSubdomain(redirectUrl.host, currentHost)) { + removeMatchingHeaders(this._headerFilter, this._options.headers); + } + + // Evaluate the beforeRedirect callback + if (isFunction(beforeRedirect)) { + var responseDetails = { + headers: response.headers, + statusCode: statusCode, + }; + var requestDetails = { + url: currentUrl, + method: method, + headers: requestHeaders, + }; + beforeRedirect(this._options, responseDetails, requestDetails); + this._sanitizeOptions(this._options); + } + + // Perform the redirected request + this._performRequest(); +}; + +// Wraps the key/value object of protocols with redirect functionality +function wrap(protocols) { + // Default settings + var exports = { + maxRedirects: 21, + maxBodyLength: 10 * 1024 * 1024, + }; + + // Wrap each protocol + var nativeProtocols = {}; + Object.keys(protocols).forEach(function (scheme) { + var protocol = scheme + ":"; + var nativeProtocol = nativeProtocols[protocol] = protocols[scheme]; + var wrappedProtocol = exports[scheme] = Object.create(nativeProtocol); + + // Executes a request, following redirects + function request(input, options, callback) { + // Parse parameters, ensuring that input is an object + if (isURL(input)) { + input = spreadUrlObject(input); + } + else if (isString(input)) { + input = spreadUrlObject(parseUrl(input)); + } + else { + callback = options; + options = validateUrl(input); + input = { protocol: protocol }; + } + if (isFunction(options)) { + callback = options; + options = null; + } + + // Set defaults + options = Object.assign({ + maxRedirects: exports.maxRedirects, + maxBodyLength: exports.maxBodyLength, + }, input, options); + options.nativeProtocols = nativeProtocols; + if (!isString(options.host) && !isString(options.hostname)) { + options.hostname = "::1"; + } + + assert.equal(options.protocol, protocol, "protocol mismatch"); + debug("options", options); + return new RedirectableRequest(options, callback); + } + + // Executes a GET request, following redirects + function get(input, options, callback) { + var wrappedRequest = wrappedProtocol.request(input, options, callback); + wrappedRequest.end(); + return wrappedRequest; + } + + // Expose the properties on the wrapped protocol + Object.defineProperties(wrappedProtocol, { + request: { value: request, configurable: true, enumerable: true, writable: true }, + get: { value: get, configurable: true, enumerable: true, writable: true }, + }); + }); + return exports; +} + +function noop() { /* empty */ } + +function parseUrl(input) { + var parsed; + // istanbul ignore else + if (useNativeURL) { + parsed = new URL(input); + } + else { + // Ensure the URL is valid and absolute + parsed = validateUrl(url.parse(input)); + if (!isString(parsed.protocol)) { + throw new InvalidUrlError({ input }); + } + } + return parsed; +} + +function resolveUrl(relative, base) { + // istanbul ignore next + return useNativeURL ? new URL(relative, base) : parseUrl(url.resolve(base, relative)); +} + +function validateUrl(input) { + if (/^\[/.test(input.hostname) && !/^\[[:0-9a-f]+\]$/i.test(input.hostname)) { + throw new InvalidUrlError({ input: input.href || input }); + } + if (/^\[/.test(input.host) && !/^\[[:0-9a-f]+\](:\d+)?$/i.test(input.host)) { + throw new InvalidUrlError({ input: input.href || input }); + } + return input; +} + +function spreadUrlObject(urlObject, target) { + var spread = target || {}; + for (var key of preservedUrlFields) { + spread[key] = urlObject[key]; + } + + // Fix IPv6 hostname + if (spread.hostname.startsWith("[")) { + spread.hostname = spread.hostname.slice(1, -1); + } + // Ensure port is a number + if (spread.port !== "") { + spread.port = Number(spread.port); + } + // Concatenate path + spread.path = spread.search ? spread.pathname + spread.search : spread.pathname; + + return spread; +} + +function removeMatchingHeaders(regex, headers) { + var lastValue; + for (var header in headers) { + if (regex.test(header)) { + lastValue = headers[header]; + delete headers[header]; + } + } + return (lastValue === null || typeof lastValue === "undefined") ? + undefined : String(lastValue).trim(); +} + +function createErrorType(code, message, baseClass) { + // Create constructor + function CustomError(properties) { + // istanbul ignore else + if (isFunction(Error.captureStackTrace)) { + Error.captureStackTrace(this, this.constructor); + } + Object.assign(this, properties || {}); + this.code = code; + this.message = this.cause ? message + ": " + this.cause.message : message; + } + + // Attach constructor and set default properties + CustomError.prototype = new (baseClass || Error)(); + Object.defineProperties(CustomError.prototype, { + constructor: { + value: CustomError, + enumerable: false, + }, + name: { + value: "Error [" + code + "]", + enumerable: false, + }, + }); + return CustomError; +} + +function destroyRequest(request, error) { + for (var event of events) { + request.removeListener(event, eventHandlers[event]); + } + request.on("error", noop); + request.destroy(error); +} + +function isSubdomain(subdomain, domain) { + assert(isString(subdomain) && isString(domain)); + var dot = subdomain.length - domain.length - 1; + return dot > 0 && subdomain[dot] === "." && subdomain.endsWith(domain); +} + +function isString(value) { + return typeof value === "string" || value instanceof String; +} + +function isFunction(value) { + return typeof value === "function"; +} + +function isBuffer(value) { + return typeof value === "object" && ("length" in value); +} + +function isURL(value) { + return URL && value instanceof URL; +} + +function escapeRegex(regex) { + // As per https://tc39.es/proposal-regexp-modifiers/#prod-SyntaxCharacter + return regex.replace(/[\^$\\.*+?()[\]{}|]/g, "\\$&"); +} + +// Exports +module.exports = wrap({ http: http, https: https }); +module.exports.wrap = wrap; diff --git a/node_modules/follow-redirects/package.json b/node_modules/follow-redirects/package.json new file mode 100644 index 0000000..0bc5a03 --- /dev/null +++ b/node_modules/follow-redirects/package.json @@ -0,0 +1,58 @@ +{ + "name": "follow-redirects", + "version": "1.16.3", + "description": "HTTP and HTTPS modules that follow redirects.", + "license": "MIT", + "main": "index.js", + "files": [ + "*.js" + ], + "engines": { + "node": ">=4.0" + }, + "scripts": { + "lint": "eslint *.js test", + "test": "nyc mocha" + }, + "repository": { + "type": "git", + "url": "git+ssh://git@github.com/follow-redirects/follow-redirects.git" + }, + "homepage": "https://github.com/follow-redirects/follow-redirects", + "bugs": { + "url": "https://github.com/follow-redirects/follow-redirects/issues" + }, + "keywords": [ + "http", + "https", + "url", + "redirect", + "client", + "location", + "utility" + ], + "author": "Ruben Verborgh (https://ruben.verborgh.org/)", + "contributors": [ + "Olivier Lalonde (http://www.syskall.com)", + "James Talmage " + ], + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/RubenVerborgh" + } + ], + "peerDependenciesMeta": { + "debug": { + "optional": true + } + }, + "devDependencies": { + "concat-stream": "^2.0.0", + "eslint": "^5.16.0", + "express": "^4.16.4", + "lolex": "^3.1.0", + "mocha": "^6.0.2", + "nyc": "^14.1.1" + } +} diff --git a/node_modules/form-data/CHANGELOG.md b/node_modules/form-data/CHANGELOG.md new file mode 100644 index 0000000..cf130d2 --- /dev/null +++ b/node_modules/form-data/CHANGELOG.md @@ -0,0 +1,686 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [v4.0.6](https://github.com/form-data/form-data/compare/v4.0.5...v4.0.6) - 2026-06-12 + +### Commits + +- [Fix] escape CR, LF, and `"` in field names and filenames [`8dff42c`](https://github.com/form-data/form-data/commit/8dff42c6da654ed4e7ad4acb7f8ccd3831217c99) +- [Dev Deps] update `@ljharb/eslint-config`, `auto-changelog`, `tape` [`f31d21e`](https://github.com/form-data/form-data/commit/f31d21ef10bf46e46344c3ee4f99acbef6be43e1) +- [Deps] update `hasown`, `mime-types` [`92ae0eb`](https://github.com/form-data/form-data/commit/92ae0eb5da94d6f01925d5f4fcffb2a1e50ed7cd) +- [Dev Deps] update `js-randomness-predictor` [`67b0f65`](https://github.com/form-data/form-data/commit/67b0f65c2e0b065a511d42227d35e4d367644e97) + +## [v4.0.5](https://github.com/form-data/form-data/compare/v4.0.4...v4.0.5) - 2025-11-17 + +### Commits + +- [Tests] Switch to newer v8 prediction library; enable node 24 testing [`16e0076`](https://github.com/form-data/form-data/commit/16e00765342106876f98a1c9703314006c9e937a) +- [Dev Deps] update `@ljharb/eslint-config`, `eslint` [`5822467`](https://github.com/form-data/form-data/commit/5822467f0ec21f6ad613c1c90856375e498793c7) +- [Fix] set Symbol.toStringTag in the proper place [`76d0dee`](https://github.com/form-data/form-data/commit/76d0dee43933b5e167f7f09e5d9cbbd1cf911aa7) + +## [v4.0.4](https://github.com/form-data/form-data/compare/v4.0.3...v4.0.4) - 2025-07-16 + +### Commits + +- [meta] add `auto-changelog` [`811f682`](https://github.com/form-data/form-data/commit/811f68282fab0315209d0e2d1c44b6c32ea0d479) +- [Tests] handle predict-v8-randomness failures in node < 17 and node > 23 [`1d11a76`](https://github.com/form-data/form-data/commit/1d11a76434d101f22fdb26b8aef8615f28b98402) +- [Fix] Switch to using `crypto` random for boundary values [`3d17230`](https://github.com/form-data/form-data/commit/3d1723080e6577a66f17f163ecd345a21d8d0fd0) +- [Tests] fix linting errors [`5e34080`](https://github.com/form-data/form-data/commit/5e340800b5f8914213e4e0378c084aae71cfd73a) +- [meta] actually ensure the readme backup isn’t published [`316c82b`](https://github.com/form-data/form-data/commit/316c82ba93fd4985af757b771b9a1f26d3b709ef) +- [Dev Deps] update `@ljharb/eslint-config` [`58c25d7`](https://github.com/form-data/form-data/commit/58c25d76406a5b0dfdf54045cf252563f2bbda8d) +- [meta] fix readme capitalization [`2300ca1`](https://github.com/form-data/form-data/commit/2300ca19595b0ee96431e868fe2a40db79e41c61) + +## [v4.0.3](https://github.com/form-data/form-data/compare/v4.0.2...v4.0.3) - 2025-06-05 + +### Fixed + +- [Fix] `append`: avoid a crash on nullish values [`#577`](https://github.com/form-data/form-data/issues/577) + +### Commits + +- [eslint] use a shared config [`426ba9a`](https://github.com/form-data/form-data/commit/426ba9ac440f95d1998dac9a5cd8d738043b048f) +- [eslint] fix some spacing issues [`2094191`](https://github.com/form-data/form-data/commit/20941917f0e9487e68c564ebc3157e23609e2939) +- [Refactor] use `hasown` [`81ab41b`](https://github.com/form-data/form-data/commit/81ab41b46fdf34f5d89d7ff30b513b0925febfaa) +- [Fix] validate boundary type in `setBoundary()` method [`8d8e469`](https://github.com/form-data/form-data/commit/8d8e4693093519f7f18e3c597d1e8df8c493de9e) +- [Tests] add tests to check the behavior of `getBoundary` with non-strings [`837b8a1`](https://github.com/form-data/form-data/commit/837b8a1f7562bfb8bda74f3fc538adb7a5858995) +- [Dev Deps] remove unused deps [`870e4e6`](https://github.com/form-data/form-data/commit/870e4e665935e701bf983a051244ab928e62d58e) +- [meta] remove local commit hooks [`e6e83cc`](https://github.com/form-data/form-data/commit/e6e83ccb545a5619ed6cd04f31d5c2f655eb633e) +- [Dev Deps] update `eslint` [`4066fd6`](https://github.com/form-data/form-data/commit/4066fd6f65992b62fa324a6474a9292a4f88c916) +- [meta] fix scripts to use prepublishOnly [`c4bbb13`](https://github.com/form-data/form-data/commit/c4bbb13c0ef669916657bc129341301b1d331d75) + +## [v4.0.2](https://github.com/form-data/form-data/compare/v4.0.1...v4.0.2) - 2025-02-14 + +### Merged + +- [Fix] set `Symbol.toStringTag` when available [`#573`](https://github.com/form-data/form-data/pull/573) +- [Fix] set `Symbol.toStringTag` when available [`#573`](https://github.com/form-data/form-data/pull/573) +- fix (npmignore): ignore temporary build files [`#532`](https://github.com/form-data/form-data/pull/532) +- fix (npmignore): ignore temporary build files [`#532`](https://github.com/form-data/form-data/pull/532) + +### Fixed + +- [Fix] set `Symbol.toStringTag` when available (#573) [`#396`](https://github.com/form-data/form-data/issues/396) +- [Fix] set `Symbol.toStringTag` when available (#573) [`#396`](https://github.com/form-data/form-data/issues/396) +- [Fix] set `Symbol.toStringTag` when available [`#396`](https://github.com/form-data/form-data/issues/396) + +### Commits + +- Merge tags v2.5.3 and v3.0.3 [`92613b9`](https://github.com/form-data/form-data/commit/92613b9208556eb4ebc482fdf599fae111626fb6) +- [Tests] migrate from travis to GHA [`806eda7`](https://github.com/form-data/form-data/commit/806eda77740e6e3c67c7815afb216f2e1f187ba5) +- [Tests] migrate from travis to GHA [`8fdb3bc`](https://github.com/form-data/form-data/commit/8fdb3bc6b5d001f8909a9fca391d1d1d97ef1d79) +- [Refactor] use `Object.prototype.hasOwnProperty.call` [`7fecefe`](https://github.com/form-data/form-data/commit/7fecefe4ba8f775634aff86a698776ad95ecffb5) +- [Refactor] use `Object.prototype.hasOwnProperty.call` [`6e682d4`](https://github.com/form-data/form-data/commit/6e682d4bd41de7e80de41e3c4ee10f23fcc3dd00) +- [Refactor] use `Object.prototype.hasOwnProperty.call` [`df3c1e6`](https://github.com/form-data/form-data/commit/df3c1e6f0937f47a782dc4573756a54987f31dde) +- [Dev Deps] update `@types/node`, `browserify`, `coveralls`, `cross-spawn`, `eslint`, `formidable`, `in-publish`, `pkgfiles`, `pre-commit`, `puppeteer`, `request`, `tape`, `typescript` [`8261fcb`](https://github.com/form-data/form-data/commit/8261fcb8bf5944d30ae3bd04b91b71d6a9932ef4) +- [Dev Deps] update `@types/node`, `browserify`, `coveralls`, `cross-spawn`, `eslint`, `formidable`, `in-publish`, `pkgfiles`, `pre-commit`, `puppeteer`, `request`, `tape`, `typescript` [`fb66cb7`](https://github.com/form-data/form-data/commit/fb66cb740e29fb170eee947d4be6fdf82d6659af) +- [Dev Deps] update `@types/node`, `browserify`, `coveralls`, `eslint`, `formidable`, `in-publish`, `phantomjs-prebuilt`, `pkgfiles`, `pre-commit`, `request`, `tape`, `typescript` [`819f6b7`](https://github.com/form-data/form-data/commit/819f6b7a543306a891fca37c3a06d0ff4a734422) +- [eslint] clean up ignores [`3217b3d`](https://github.com/form-data/form-data/commit/3217b3ded8e382e51171d5c74c6038a21cc54440) +- [eslint] clean up ignores [`3a9d480`](https://github.com/form-data/form-data/commit/3a9d480232dbcbc07260ad84c3da4975d9a3ae9e) +- [Fix] `Buffer.from` and `Buffer.alloc` require node 4+ [`c499f76`](https://github.com/form-data/form-data/commit/c499f76f1faac1ddbf210c45217038e4c1e02337) +- Only apps should have lockfiles [`b82f590`](https://github.com/form-data/form-data/commit/b82f59093cdbadb4b7ec0922d33ae7ab048b82ff) +- Only apps should have lockfiles [`b170ee2`](https://github.com/form-data/form-data/commit/b170ee2b22b4c695c363b811c0c553d2fb1bbd79) +- [Deps] update `combined-stream`, `mime-types` [`6b1ca1d`](https://github.com/form-data/form-data/commit/6b1ca1dc7362a1b1c3a99a885516cca4b7eb817f) +- [Dev Deps] pin `request` which via `tough-cookie` ^2.4 depends on `psl` [`e5df7f2`](https://github.com/form-data/form-data/commit/e5df7f24383342264bd73dee3274818a40d04065) +- [Deps] update `mime-types` [`5a5bafe`](https://github.com/form-data/form-data/commit/5a5bafee894fead10da49e1fa2b084e17f2e1034) +- Bumped version 2.5.3 [`9457283`](https://github.com/form-data/form-data/commit/9457283e1dce6122adc908fdd7442cfc54cabe7a) +- [Dev Deps] pin `request` which via `tough-cookie` ^2.4 depends on `psl` [`9dbe192`](https://github.com/form-data/form-data/commit/9dbe192be3db215eac4d9c0b980470a5c2c030c6) +- Merge tags v2.5.2 and v3.0.2 [`d53265d`](https://github.com/form-data/form-data/commit/d53265d86c5153f535ec68eb107548b1b2883576) +- Bumped version 2.5.2 [`7020dd4`](https://github.com/form-data/form-data/commit/7020dd4c1260370abc40e86e3dfe49c5d576fbda) +- [Dev Deps] downgrade `cross-spawn` [`3fc1a9b`](https://github.com/form-data/form-data/commit/3fc1a9b62ddf1fe77a2bd6bd3476e4c0a9e01a88) +- fix: move util.isArray to Array.isArray (#564) [`edb555a`](https://github.com/form-data/form-data/commit/edb555a811f6f7e4668db4831551cf41c1de1cac) +- fix: move util.isArray to Array.isArray (#564) [`10418d1`](https://github.com/form-data/form-data/commit/10418d1fe4b0d65fe020eafe3911feb5ad5e2bd6) + +## [v4.0.1](https://github.com/form-data/form-data/compare/v4.0.0...v4.0.1) - 2024-10-10 + +### Commits + +- [Tests] migrate from travis to GHA [`757b4e3`](https://github.com/form-data/form-data/commit/757b4e32e95726aec9bdcc771fb5a3b564d88034) +- [eslint] clean up ignores [`e8f0d80`](https://github.com/form-data/form-data/commit/e8f0d80cd7cd424d1488532621ec40a33218b30b) +- fix (npmignore): ignore temporary build files [`335ad19`](https://github.com/form-data/form-data/commit/335ad19c6e17dc2d7298ffe0e9b37ba63600e94b) +- fix: move util.isArray to Array.isArray [`440d3be`](https://github.com/form-data/form-data/commit/440d3bed752ac2f9213b4c2229dbccefe140e5fa) + +## [v4.0.0](https://github.com/form-data/form-data/compare/v3.0.5...v4.0.0) - 2021-02-15 + +### Merged + +- Handle custom stream [`#382`](https://github.com/form-data/form-data/pull/382) + +### Commits + +- Fix typo [`e705c0a`](https://github.com/form-data/form-data/commit/e705c0a1fdaf90d21501f56460b93e43a18bd435) +- Update README for custom stream behavior [`6dd8624`](https://github.com/form-data/form-data/commit/6dd8624b2999e32768d62752c9aae5845a803b0d) + +## [v3.0.5](https://github.com/form-data/form-data/compare/v3.0.4...v3.0.5) - 2026-06-12 + +### Commits + +- [Fix] escape CR, LF, and `"` in field names and filenames [`8777e67`](https://github.com/form-data/form-data/commit/8777e67fbd0282d3dcba81f974fbdd91062c5b23) +- [Dev Deps] update `@ljharb/eslint-config`, `auto-changelog`, `eslint`, `tape` [`27c61a5`](https://github.com/form-data/form-data/commit/27c61a5deed84798be105c96605cb8bd00502dcd) +- [Deps] update `hasown` [`6a8a1c6`](https://github.com/form-data/form-data/commit/6a8a1c6d04da36e15c80b16ecc4c0265082b3213) + +## [v3.0.4](https://github.com/form-data/form-data/compare/v3.0.3...v3.0.4) - 2025-07-16 + +### Fixed + +- [Fix] `append`: avoid a crash on nullish values [`#577`](https://github.com/form-data/form-data/issues/577) + +### Commits + +- [eslint] update linting config [`f5e7eb0`](https://github.com/form-data/form-data/commit/f5e7eb024bc3fc7e2074ff80f143a4f4cbc1dbda) +- [meta] add `auto-changelog` [`d2eb290`](https://github.com/form-data/form-data/commit/d2eb290a3e47ed5bcad7020d027daa15b3cf5ef5) +- [Tests] handle predict-v8-randomness failures in node < 17 and node > 23 [`e8c574c`](https://github.com/form-data/form-data/commit/e8c574cb07ff3a0de2ecc0912d783ef22e190c1f) +- [Fix] Switch to using `crypto` random for boundary values [`c6ced61`](https://github.com/form-data/form-data/commit/c6ced61d4fae8f617ee2fd692133ed87baa5d0fd) +- [Refactor] use `hasown` [`1a78b5d`](https://github.com/form-data/form-data/commit/1a78b5dd05e508d67e97764d812ac7c6d92ea88d) +- [Fix] validate boundary type in `setBoundary()` method [`70bbaa0`](https://github.com/form-data/form-data/commit/70bbaa0b395ca0fb975c309de8d7286979254cc4) +- [Tests] add tests to check the behavior of `getBoundary` with non-strings [`b22a64e`](https://github.com/form-data/form-data/commit/b22a64ef94ba4f3f6ff7d1ac72a54cca128567df) +- [meta] actually ensure the readme backup isn’t published [`0150851`](https://github.com/form-data/form-data/commit/01508513ffb26fd662ae7027834b325af8efb9ea) +- [meta] remove local commit hooks [`fc42bb9`](https://github.com/form-data/form-data/commit/fc42bb9315b641bfa6dae51cb4e188a86bb04769) +- [Dev Deps] remove unused deps [`a14d09e`](https://github.com/form-data/form-data/commit/a14d09ea8ed7e0a2e1705269ce6fb54bb7ee6bdb) +- [meta] fix scripts to use prepublishOnly [`11d9f73`](https://github.com/form-data/form-data/commit/11d9f7338f18a59b431832a3562b49baece0a432) +- [meta] fix readme capitalization [`fc38b48`](https://github.com/form-data/form-data/commit/fc38b4834a117a1856f3d877eb2f5b7496a24932) + +## [v3.0.3](https://github.com/form-data/form-data/compare/v3.0.2...v3.0.3) - 2025-02-14 + +### Merged + +- [Fix] set `Symbol.toStringTag` when available [`#573`](https://github.com/form-data/form-data/pull/573) + +### Fixed + +- [Fix] set `Symbol.toStringTag` when available (#573) [`#396`](https://github.com/form-data/form-data/issues/396) + +### Commits + +- [Refactor] use `Object.prototype.hasOwnProperty.call` [`7fecefe`](https://github.com/form-data/form-data/commit/7fecefe4ba8f775634aff86a698776ad95ecffb5) +- [Dev Deps] update `@types/node`, `browserify`, `coveralls`, `cross-spawn`, `eslint`, `formidable`, `in-publish`, `pkgfiles`, `pre-commit`, `puppeteer`, `request`, `tape`, `typescript` [`8261fcb`](https://github.com/form-data/form-data/commit/8261fcb8bf5944d30ae3bd04b91b71d6a9932ef4) +- Only apps should have lockfiles [`b82f590`](https://github.com/form-data/form-data/commit/b82f59093cdbadb4b7ec0922d33ae7ab048b82ff) +- [Dev Deps] pin `request` which via `tough-cookie` ^2.4 depends on `psl` [`e5df7f2`](https://github.com/form-data/form-data/commit/e5df7f24383342264bd73dee3274818a40d04065) +- [Deps] update `mime-types` [`5a5bafe`](https://github.com/form-data/form-data/commit/5a5bafee894fead10da49e1fa2b084e17f2e1034) + +## [v3.0.2](https://github.com/form-data/form-data/compare/v3.0.1...v3.0.2) - 2024-10-10 + +### Merged + +- fix (npmignore): ignore temporary build files [`#532`](https://github.com/form-data/form-data/pull/532) + +### Commits + +- [Tests] migrate from travis to GHA [`8fdb3bc`](https://github.com/form-data/form-data/commit/8fdb3bc6b5d001f8909a9fca391d1d1d97ef1d79) +- [eslint] clean up ignores [`3217b3d`](https://github.com/form-data/form-data/commit/3217b3ded8e382e51171d5c74c6038a21cc54440) +- fix: move util.isArray to Array.isArray (#564) [`edb555a`](https://github.com/form-data/form-data/commit/edb555a811f6f7e4668db4831551cf41c1de1cac) + +## [v3.0.1](https://github.com/form-data/form-data/compare/v3.0.0...v3.0.1) - 2021-02-15 + +### Merged + +- Fix typo: ads -> adds [`#451`](https://github.com/form-data/form-data/pull/451) + +### Commits + +- feat: add setBoundary method [`55d90ce`](https://github.com/form-data/form-data/commit/55d90ce4a4c22b0ea0647991d85cb946dfb7395b) + +## [v3.0.0](https://github.com/form-data/form-data/compare/v2.5.6...v3.0.0) - 2019-11-05 + +### Merged + +- Update Readme.md [`#449`](https://github.com/form-data/form-data/pull/449) +- Update package.json [`#448`](https://github.com/form-data/form-data/pull/448) +- fix memory leak [`#447`](https://github.com/form-data/form-data/pull/447) +- form-data: Replaced PhantomJS Dependency [`#442`](https://github.com/form-data/form-data/pull/442) +- Fix constructor options in Typescript definitions [`#446`](https://github.com/form-data/form-data/pull/446) +- Fix the getHeaders method signatures [`#434`](https://github.com/form-data/form-data/pull/434) +- Update combined-stream (fixes #422) [`#424`](https://github.com/form-data/form-data/pull/424) + +### Fixed + +- Merge pull request #424 from botgram/update-combined-stream [`#422`](https://github.com/form-data/form-data/issues/422) +- Update combined-stream (fixes #422) [`#422`](https://github.com/form-data/form-data/issues/422) + +### Commits + +- Add readable stream options to constructor type [`80c8f74`](https://github.com/form-data/form-data/commit/80c8f746bcf4c0418ae35fbedde12fb8c01e2748) +- Fixed: getHeaders method signatures [`f4ca7f8`](https://github.com/form-data/form-data/commit/f4ca7f8e31f7e07df22c1aeb8e0a32a7055a64ca) +- Pass options to constructor if not used with new [`4bde68e`](https://github.com/form-data/form-data/commit/4bde68e12de1ba90fefad2e7e643f6375b902763) +- Make userHeaders optional [`2b4e478`](https://github.com/form-data/form-data/commit/2b4e4787031490942f2d1ee55c56b85a250875a7) + +## [v2.5.6](https://github.com/form-data/form-data/compare/v2.5.5...v2.5.6) - 2026-06-12 + +### Commits + +- [Fix] escape CR, LF, and `"` in field names and filenames [`b620316`](https://github.com/form-data/form-data/commit/b62031603c2d7c329b2a369b49466790f0ba6314) +- [Dev Deps] update `@ljharb/eslint-config`, `auto-changelog`, `eslint`, `tape` [`12be578`](https://github.com/form-data/form-data/commit/12be578e936fd77eee75e2e656955f5343c4b80f) +- [Dev Deps] update `js-randomness-predictor` [`46cfd23`](https://github.com/form-data/form-data/commit/46cfd23bd40be14cfa0391e1c5357c4d74098f23) +- [Tests] use `safe-buffer` so the header-injection test runs on node < 4 [`633044a`](https://github.com/form-data/form-data/commit/633044a57a7b19f41cec2271ffd24afa2f6280af) +- [Deps] update `hasown` [`e3b96ee`](https://github.com/form-data/form-data/commit/e3b96eef1661bca8ea4297de057b78bf2734e900) + +## [v2.5.5](https://github.com/form-data/form-data/compare/v2.5.4...v2.5.5) - 2025-07-18 + +### Commits + +- [meta] actually ensure the readme backup isn’t published [`10626c0`](https://github.com/form-data/form-data/commit/10626c0a9b78c7d3fcaa51772265015ee0afc25c) +- [Fix] use proper dependency [`026abe5`](https://github.com/form-data/form-data/commit/026abe5c5c0489d8a2ccb59d5cfd14fb63078377) + +## [v2.5.4](https://github.com/form-data/form-data/compare/v2.5.3...v2.5.4) - 2025-07-17 + +### Fixed + +- [Fix] `append`: avoid a crash on nullish values [`#577`](https://github.com/form-data/form-data/issues/577) + +### Commits + +- [eslint] update linting config [`8bf2492`](https://github.com/form-data/form-data/commit/8bf2492e0555d41ff58fa04c91593af998f87a3c) +- [meta] add `auto-changelog` [`b5101ad`](https://github.com/form-data/form-data/commit/b5101ad3d5f73cfd0143aae3735b92826fd731ea) +- [Tests] handle predict-v8-randomness failures in node < 17 and node > 23 [`0e93122`](https://github.com/form-data/form-data/commit/0e93122358414942393d9c2dc434ae69e58be7c8) +- [Fix] Switch to using `crypto` random for boundary values [`b88316c`](https://github.com/form-data/form-data/commit/b88316c94bb004323669cd3639dc8bb8262539eb) +- [Fix] validate boundary type in `setBoundary()` method [`131ae5e`](https://github.com/form-data/form-data/commit/131ae5efa30b9c608add4faef3befb38aa2e1bf1) +- [Tests] Switch to newer v8 prediction library; enable node 24 testing [`c97cfbe`](https://github.com/form-data/form-data/commit/c97cfbed9eb6d2d4b5d53090f69ded4bf9fd8a21) +- [Refactor] use `hasown` [`97ac9c2`](https://github.com/form-data/form-data/commit/97ac9c208be0b83faeee04bb3faef1ed3474ee4c) +- [meta] remove local commit hooks [`be99d4e`](https://github.com/form-data/form-data/commit/be99d4eea5ce47139c23c1f0914596194019d7fb) +- [Dev Deps] remove unused deps [`ddbc89b`](https://github.com/form-data/form-data/commit/ddbc89b6d6d64f730bcb27cb33b7544068466a05) +- [meta] fix scripts to use prepublishOnly [`e351a97`](https://github.com/form-data/form-data/commit/e351a97e9f6c57c74ffd01625e83b09de805d08a) +- [Dev Deps] remove unused script [`8f23366`](https://github.com/form-data/form-data/commit/8f233664842da5bd605ce85541defc713d1d1e0a) +- [Dev Deps] add missing peer dep [`02ff026`](https://github.com/form-data/form-data/commit/02ff026fda71f9943cfdd5754727c628adb8d135) +- [meta] fix readme capitalization [`2fd5f61`](https://github.com/form-data/form-data/commit/2fd5f61ebfb526cd015fb8e7b8b8c1add4a38872) + +## [v2.5.3](https://github.com/form-data/form-data/compare/v2.5.2...v2.5.3) - 2025-02-14 + +### Merged + +- [Fix] set `Symbol.toStringTag` when available [`#573`](https://github.com/form-data/form-data/pull/573) + +### Fixed + +- [Fix] set `Symbol.toStringTag` when available (#573) [`#396`](https://github.com/form-data/form-data/issues/396) + +### Commits + +- [Refactor] use `Object.prototype.hasOwnProperty.call` [`6e682d4`](https://github.com/form-data/form-data/commit/6e682d4bd41de7e80de41e3c4ee10f23fcc3dd00) +- [Dev Deps] update `@types/node`, `browserify`, `coveralls`, `eslint`, `formidable`, `in-publish`, `phantomjs-prebuilt`, `pkgfiles`, `pre-commit`, `request`, `tape`, `typescript` [`819f6b7`](https://github.com/form-data/form-data/commit/819f6b7a543306a891fca37c3a06d0ff4a734422) +- Only apps should have lockfiles [`b170ee2`](https://github.com/form-data/form-data/commit/b170ee2b22b4c695c363b811c0c553d2fb1bbd79) +- [Deps] update `combined-stream`, `mime-types` [`6b1ca1d`](https://github.com/form-data/form-data/commit/6b1ca1dc7362a1b1c3a99a885516cca4b7eb817f) +- Bumped version 2.5.3 [`9457283`](https://github.com/form-data/form-data/commit/9457283e1dce6122adc908fdd7442cfc54cabe7a) +- [Dev Deps] pin `request` which via `tough-cookie` ^2.4 depends on `psl` [`9dbe192`](https://github.com/form-data/form-data/commit/9dbe192be3db215eac4d9c0b980470a5c2c030c6) + +## [v2.5.2](https://github.com/form-data/form-data/compare/v2.5.1...v2.5.2) - 2024-10-10 + +### Merged + +- fix (npmignore): ignore temporary build files [`#532`](https://github.com/form-data/form-data/pull/532) + +### Commits + +- [Tests] migrate from travis to GHA [`806eda7`](https://github.com/form-data/form-data/commit/806eda77740e6e3c67c7815afb216f2e1f187ba5) +- [eslint] clean up ignores [`3a9d480`](https://github.com/form-data/form-data/commit/3a9d480232dbcbc07260ad84c3da4975d9a3ae9e) +- [Fix] `Buffer.from` and `Buffer.alloc` require node 4+ [`c499f76`](https://github.com/form-data/form-data/commit/c499f76f1faac1ddbf210c45217038e4c1e02337) +- Bumped version 2.5.2 [`7020dd4`](https://github.com/form-data/form-data/commit/7020dd4c1260370abc40e86e3dfe49c5d576fbda) +- [Dev Deps] downgrade `cross-spawn` [`3fc1a9b`](https://github.com/form-data/form-data/commit/3fc1a9b62ddf1fe77a2bd6bd3476e4c0a9e01a88) +- fix: move util.isArray to Array.isArray (#564) [`10418d1`](https://github.com/form-data/form-data/commit/10418d1fe4b0d65fe020eafe3911feb5ad5e2bd6) + +## [v2.5.1](https://github.com/form-data/form-data/compare/v2.5.0...v2.5.1) - 2019-08-28 + +### Merged + +- Fix error in callback signatures [`#435`](https://github.com/form-data/form-data/pull/435) +- -Fixed: Eerror in the documentations as indicated in #439 [`#440`](https://github.com/form-data/form-data/pull/440) +- Add constructor options to TypeScript defs [`#437`](https://github.com/form-data/form-data/pull/437) + +### Commits + +- Add remaining combined-stream options to typedef [`4d41a32`](https://github.com/form-data/form-data/commit/4d41a32c0b3f85f8bbc9cf17df43befd2d5fc305) +- Bumped version 2.5.1 [`8ce81f5`](https://github.com/form-data/form-data/commit/8ce81f56cccf5466363a5eff135ad394a929f59b) +- Bump rimraf to 2.7.1 [`a6bc2d4`](https://github.com/form-data/form-data/commit/a6bc2d4296dbdee5d84cbab7c69bcd0eea7a12e2) + +## [v2.5.0](https://github.com/form-data/form-data/compare/v2.4.0...v2.5.0) - 2019-07-03 + +### Merged + +- - Added: public methods with information and examples to readme [`#429`](https://github.com/form-data/form-data/pull/429) +- chore: move @types/node to devDep [`#431`](https://github.com/form-data/form-data/pull/431) +- Switched windows tests from AppVeyor to Travis [`#430`](https://github.com/form-data/form-data/pull/430) +- feat(typings): migrate TS typings #427 [`#428`](https://github.com/form-data/form-data/pull/428) +- enhance the method of path.basename, handle undefined case [`#421`](https://github.com/form-data/form-data/pull/421) + +### Commits + +- - Added: public methods with information and examples to the readme file. [`21323f3`](https://github.com/form-data/form-data/commit/21323f3b4043a167046a4a2554c5f2825356c423) +- feat(typings): migrate TS typings [`a3c0142`](https://github.com/form-data/form-data/commit/a3c0142ed91b0c7dcaf89c4f618776708f1f70a9) +- - Fixed: Typos [`37350fa`](https://github.com/form-data/form-data/commit/37350fa250782f156a998ec1fa9671866d40ac49) +- Switched to Travis Windows from Appveyor [`fc61c73`](https://github.com/form-data/form-data/commit/fc61c7381fad12662df16dbc3e7621c91b886f03) +- - Fixed: rendering of subheaders [`e93ed8d`](https://github.com/form-data/form-data/commit/e93ed8df9d7f22078bc3a2c24889e9dfa11e192d) +- Updated deps and readme [`e3d8628`](https://github.com/form-data/form-data/commit/e3d8628728f6e4817ab97deeed92f0c822661b89) +- Updated dependencies [`19add50`](https://github.com/form-data/form-data/commit/19add50afb7de66c70d189f422d16f1b886616e2) +- Bumped version to 2.5.0 [`905f173`](https://github.com/form-data/form-data/commit/905f173a3f785e8d312998e765634ee451ca5f42) +- - Fixed: filesize is not a valid option? knownLength should be used for streams [`d88f912`](https://github.com/form-data/form-data/commit/d88f912b75b666b47f8674467516eade69d2d5be) +- Bump notion of modern node to node8 [`508b626`](https://github.com/form-data/form-data/commit/508b626bf1b460d3733d3420dc1cfd001617f6ac) +- enhance the method of path.basename [`faaa68a`](https://github.com/form-data/form-data/commit/faaa68a297be7d4fca0ac4709d5b93afc1f78b5c) + +## [v2.4.0](https://github.com/form-data/form-data/compare/v2.3.2...v2.4.0) - 2019-06-19 + +### Merged + +- Added "getBuffer" method and updated certificates [`#419`](https://github.com/form-data/form-data/pull/419) +- docs(readme): add axios integration document [`#425`](https://github.com/form-data/form-data/pull/425) +- Allow newer versions of combined-stream [`#402`](https://github.com/form-data/form-data/pull/402) + +### Commits + +- Updated: Certificate [`e90a76a`](https://github.com/form-data/form-data/commit/e90a76ab3dcaa63a6f3045f8255bfbb9c25a3e4e) +- Updated build/test/badges [`8512eef`](https://github.com/form-data/form-data/commit/8512eef436e28372f5bc88de3ca76a9cb46e6847) +- Bumped version 2.4.0 [`0f8da06`](https://github.com/form-data/form-data/commit/0f8da06c0b4c997bd2f6b09d78290d339616a950) +- docs(readme): remove unnecessary bracket [`4e3954d`](https://github.com/form-data/form-data/commit/4e3954dde304d27e3b95371d8c78002f3af5d5b2) +- Bumped version to 2.3.3 [`b16916a`](https://github.com/form-data/form-data/commit/b16916a568a0d06f3f8a16c31f9a8b89b7844094) + +## [v2.3.2](https://github.com/form-data/form-data/compare/v2.3.1...v2.3.2) - 2018-02-13 + +### Merged + +- Pulling in fixed combined-stream [`#379`](https://github.com/form-data/form-data/pull/379) + +### Commits + +- All the dev dependencies are breaking in old versions of node :'( [`c7dba6a`](https://github.com/form-data/form-data/commit/c7dba6a139d872d173454845e25e1850ed6b72b4) +- Updated badges [`19b6c7a`](https://github.com/form-data/form-data/commit/19b6c7a8a5c40f47f91c8a8da3e5e4dc3c449fa3) +- Try tests in node@4 [`872a326`](https://github.com/form-data/form-data/commit/872a326ab13e2740b660ff589b75232c3a85fcc9) +- Pull in final version [`9d44871`](https://github.com/form-data/form-data/commit/9d44871073d647995270b19dbc26f65671ce15c7) + +## [v2.3.1](https://github.com/form-data/form-data/compare/v2.3.0...v2.3.1) - 2017-08-24 + +### Commits + +- Updated readme with custom options example [`8e0a569`](https://github.com/form-data/form-data/commit/8e0a5697026016fe171e93bec43c2205279e23ca) +- Added support (tests) for node 8 [`d1d6f4a`](https://github.com/form-data/form-data/commit/d1d6f4ad4670d8ba84cc85b28e522ca0e93eb362) + +## [v2.3.0](https://github.com/form-data/form-data/compare/v2.2.0...v2.3.0) - 2017-08-24 + +### Merged + +- Added custom `options` support [`#368`](https://github.com/form-data/form-data/pull/368) +- Allow form.submit with url string param to use https [`#249`](https://github.com/form-data/form-data/pull/249) +- Proper header production [`#357`](https://github.com/form-data/form-data/pull/357) +- Fix wrong MIME type in example [`#285`](https://github.com/form-data/form-data/pull/285) + +### Commits + +- allow form.submit with url string param to use https [`c0390dc`](https://github.com/form-data/form-data/commit/c0390dcc623e15215308fa2bb0225aa431d9381e) +- update tests for url parsing [`eec0e80`](https://github.com/form-data/form-data/commit/eec0e807889d46697abd39a89ad9bf39996ba787) +- Uses for in to assign properties instead of Object.assign [`f6854ed`](https://github.com/form-data/form-data/commit/f6854edd85c708191bb9c89615a09fd0a9afe518) +- Adds test to check for option override [`61762f2`](https://github.com/form-data/form-data/commit/61762f2c5262e576d6a7f778b4ebab6546ef8582) +- Removes the 2mb maxDataSize limitation [`dc171c3`](https://github.com/form-data/form-data/commit/dc171c3ba49ac9b8813636fd4159d139b812315b) +- Ignore .DS_Store [`e8a05d3`](https://github.com/form-data/form-data/commit/e8a05d33361f7dca8927fe1d96433d049843de24) + +## [v2.2.0](https://github.com/form-data/form-data/compare/v2.1.4...v2.2.0) - 2017-06-11 + +### Merged + +- Filename can be a nested path [`#355`](https://github.com/form-data/form-data/pull/355) + +### Commits + +- Bumped version number. [`d7398c3`](https://github.com/form-data/form-data/commit/d7398c3e7cd81ed12ecc0b84363721bae467db02) + +## [v2.1.4](https://github.com/form-data/form-data/compare/2.1.3...v2.1.4) - 2017-04-08 + +## [2.1.3](https://github.com/form-data/form-data/compare/v2.1.3...2.1.3) - 2017-04-08 + +## [v2.1.3](https://github.com/form-data/form-data/compare/v2.1.2...v2.1.3) - 2017-04-08 + +### Merged + +- toString should output '[object FormData]' [`#346`](https://github.com/form-data/form-data/pull/346) + +## [v2.1.2](https://github.com/form-data/form-data/compare/v2.1.1...v2.1.2) - 2016-11-07 + +### Merged + +- #271 Added check for self and window objects + tests [`#282`](https://github.com/form-data/form-data/pull/282) + +### Commits + +- Added check for self and window objects + tests [`c99e4ec`](https://github.com/form-data/form-data/commit/c99e4ec32cd14d83776f2bdcc5a4e7384131c1b1) + +## [v2.1.1](https://github.com/form-data/form-data/compare/v2.1.0...v2.1.1) - 2016-10-03 + +### Merged + +- Bumped dependencies. [`#270`](https://github.com/form-data/form-data/pull/270) +- Update browser.js shim to use self instead of window [`#267`](https://github.com/form-data/form-data/pull/267) +- Boilerplate code rediction [`#265`](https://github.com/form-data/form-data/pull/265) +- eslint@3.7.0 [`#266`](https://github.com/form-data/form-data/pull/266) + +### Commits + +- code duplicates removed [`e9239fb`](https://github.com/form-data/form-data/commit/e9239fbe7d3c897b29fe3bde857d772469541c01) +- Changed according to requests [`aa99246`](https://github.com/form-data/form-data/commit/aa9924626bd9168334d73fea568c0ad9d8fbaa96) +- chore(package): update eslint to version 3.7.0 [`090a859`](https://github.com/form-data/form-data/commit/090a859835016cab0de49629140499e418db9c3a) + +## [v2.1.0](https://github.com/form-data/form-data/compare/v2.0.0...v2.1.0) - 2016-09-25 + +### Merged + +- Added `hasKnownLength` public method [`#263`](https://github.com/form-data/form-data/pull/263) + +### Commits + +- Added hasKnownLength public method [`655b959`](https://github.com/form-data/form-data/commit/655b95988ef2ed3399f8796b29b2a8673c1df11c) + +## [v2.0.0](https://github.com/form-data/form-data/compare/v1.0.0...v2.0.0) - 2016-09-16 + +### Merged + +- Replaced async with asynckit [`#258`](https://github.com/form-data/form-data/pull/258) +- Pre-release house cleaning [`#247`](https://github.com/form-data/form-data/pull/247) + +### Commits + +- Replaced async with asynckit. Modernized [`1749b78`](https://github.com/form-data/form-data/commit/1749b78d50580fbd080e65c1eb9702ad4f4fc0c0) +- Ignore .bak files [`c08190a`](https://github.com/form-data/form-data/commit/c08190a87d3e22a528b6e32b622193742a4c2672) +- Trying to be more chatty. :) [`c79eabb`](https://github.com/form-data/form-data/commit/c79eabb24eaf761069255a44abf4f540cfd47d40) + +## [v1.0.0](https://github.com/form-data/form-data/compare/v1.0.0-rc4...v1.0.0) - 2016-08-26 + +### Merged + +- Allow custom header fields to be set as an object. [`#190`](https://github.com/form-data/form-data/pull/190) +- v1.0.0-rc4 [`#182`](https://github.com/form-data/form-data/pull/182) +- Avoid undefined variable reference in older browsers [`#176`](https://github.com/form-data/form-data/pull/176) +- More housecleaning [`#164`](https://github.com/form-data/form-data/pull/164) +- More cleanup [`#159`](https://github.com/form-data/form-data/pull/159) +- Added windows testing. Some cleanup. [`#158`](https://github.com/form-data/form-data/pull/158) +- Housecleaning. Added test coverage. [`#156`](https://github.com/form-data/form-data/pull/156) +- Second iteration of cleanup. [`#145`](https://github.com/form-data/form-data/pull/145) + +### Commits + +- Pre-release house cleaning [`440d72b`](https://github.com/form-data/form-data/commit/440d72b5fd44dd132f42598c3183d46e5f35ce71) +- Updated deps, updated docs [`54b6114`](https://github.com/form-data/form-data/commit/54b61143e9ce66a656dd537a1e7b31319a4991be) +- make docs up-to-date [`5e383d7`](https://github.com/form-data/form-data/commit/5e383d7f1466713f7fcef58a6817e0cb466c8ba7) +- Added missing deps [`fe04862`](https://github.com/form-data/form-data/commit/fe04862000b2762245e2db69d5207696a08c1174) + +## [v1.0.0-rc4](https://github.com/form-data/form-data/compare/v1.0.0-rc3...v1.0.0-rc4) - 2016-03-15 + +### Merged + +- Housecleaning, preparing for the release [`#144`](https://github.com/form-data/form-data/pull/144) +- lib: emit error when failing to get length [`#127`](https://github.com/form-data/form-data/pull/127) +- Cleaning up for Codacity 2. [`#143`](https://github.com/form-data/form-data/pull/143) +- Cleaned up codacity concerns. [`#142`](https://github.com/form-data/form-data/pull/142) +- Should throw type error without new operator. [`#129`](https://github.com/form-data/form-data/pull/129) + +### Commits + +- More cleanup [`94b6565`](https://github.com/form-data/form-data/commit/94b6565bb98a387335c72feff5ed5c10da0a7f6f) +- Shuffling things around [`3c2f172`](https://github.com/form-data/form-data/commit/3c2f172eaddf0979b3eef5c73985d1a6fd3eee4a) +- Second iteration of cleanup. [`347c88e`](https://github.com/form-data/form-data/commit/347c88ef9a99a66b9bcf4278497425db2f0182b2) +- Housecleaning [`c335610`](https://github.com/form-data/form-data/commit/c3356100c054a4695e4dec8ed7072775cd745616) +- More housecleaning [`f573321`](https://github.com/form-data/form-data/commit/f573321824aae37ba2052a92cc889d533d9f8fb8) +- Trying to make far run on windows. + cleanup [`e426dfc`](https://github.com/form-data/form-data/commit/e426dfcefb07ee307d8a15dec04044cce62413e6) +- Playing with appveyor [`c9458a7`](https://github.com/form-data/form-data/commit/c9458a7c328782b19859bc1745e7d6b2005ede86) +- Updated dev dependencies. [`ceebe88`](https://github.com/form-data/form-data/commit/ceebe88872bb22da0a5a98daf384e3cc232928d3) +- Replaced win-spawn with cross-spawn [`405a69e`](https://github.com/form-data/form-data/commit/405a69ee34e235ee6561b5ff0140b561be40d1cc) +- Updated readme badges. [`12f282a`](https://github.com/form-data/form-data/commit/12f282a1310fcc2f70cc5669782283929c32a63d) +- Making paths windows friendly. [`f4bddc5`](https://github.com/form-data/form-data/commit/f4bddc5955e2472f8e23c892c9b4d7a08fcb85a3) +- [WIP] trying things for greater sanity [`8ad1f02`](https://github.com/form-data/form-data/commit/8ad1f02b0b3db4a0b00c5d6145ed69bcb7558213) +- Bending under Codacy [`bfff3bb`](https://github.com/form-data/form-data/commit/bfff3bb36052dc83f429949b4e6f9b146a49d996) +- Another attempt to make windows friendly [`f3eb628`](https://github.com/form-data/form-data/commit/f3eb628974ccb91ba0020f41df490207eeed77f6) +- Updated dependencies. [`f73996e`](https://github.com/form-data/form-data/commit/f73996e0508ee2d4b2b376276adfac1de4188ac2) +- Missed travis changes. [`67ee79f`](https://github.com/form-data/form-data/commit/67ee79f964fdabaf300bd41b0af0c1cfaca07687) +- Restructured badges. [`48444a1`](https://github.com/form-data/form-data/commit/48444a1ff156ba2c2c3cfd11047c2f2fd92d4474) +- Add similar type error as the browser for attempting to use form-data without new. [`5711320`](https://github.com/form-data/form-data/commit/5711320fb7c8cc620cfc79b24c7721526e23e539) +- Took out codeclimate-test-reporter [`a7e0c65`](https://github.com/form-data/form-data/commit/a7e0c6522afe85ca9974b0b4e1fca9c77c3e52b1) +- One more [`8e84cff`](https://github.com/form-data/form-data/commit/8e84cff3370526ecd3e175fd98e966242d81993c) + +## [v1.0.0-rc3](https://github.com/form-data/form-data/compare/v1.0.0-rc2...v1.0.0-rc3) - 2015-07-29 + +### Merged + +- House cleaning. Added `pre-commit`. [`#140`](https://github.com/form-data/form-data/pull/140) +- Allow custom content-type without setting a filename. [`#138`](https://github.com/form-data/form-data/pull/138) +- Add node-fetch to alternative submission methods. [`#132`](https://github.com/form-data/form-data/pull/132) +- Update dependencies [`#130`](https://github.com/form-data/form-data/pull/130) +- Switching to container based TravisCI [`#136`](https://github.com/form-data/form-data/pull/136) +- Default content-type to 'application/octect-stream' [`#128`](https://github.com/form-data/form-data/pull/128) +- Allow filename as third option of .append [`#125`](https://github.com/form-data/form-data/pull/125) + +### Commits + +- Allow custom content-type without setting a filename [`c8a77cc`](https://github.com/form-data/form-data/commit/c8a77cc0cf16d15f1ebf25272beaab639ce89f76) +- Fixed ranged test. [`a5ac58c`](https://github.com/form-data/form-data/commit/a5ac58cbafd0909f32fe8301998f689314fd4859) +- Allow filename as third option of #append [`d081005`](https://github.com/form-data/form-data/commit/d0810058c84764b3c463a18b15ebb37864de9260) +- Allow custom content-type without setting a filename [`8cb9709`](https://github.com/form-data/form-data/commit/8cb9709e5f1809cfde0cd707dbabf277138cd771) + +## [v1.0.0-rc2](https://github.com/form-data/form-data/compare/v1.0.0-rc1...v1.0.0-rc2) - 2015-07-21 + +### Merged + +- #109 Append proper line break [`#123`](https://github.com/form-data/form-data/pull/123) +- Add shim for browser (browserify/webpack). [`#122`](https://github.com/form-data/form-data/pull/122) +- Update license field [`#115`](https://github.com/form-data/form-data/pull/115) + +### Commits + +- Add shim for browser. [`87c33f4`](https://github.com/form-data/form-data/commit/87c33f4269a2211938f80ab3e53835362b1afee8) +- Bump version [`a3f5d88`](https://github.com/form-data/form-data/commit/a3f5d8872c810ce240c7d3838c69c3c9fcecc111) + +## [v1.0.0-rc1](https://github.com/form-data/form-data/compare/0.2...v1.0.0-rc1) - 2015-06-13 + +### Merged + +- v1.0.0-rc1 [`#114`](https://github.com/form-data/form-data/pull/114) +- Updated test targets [`#102`](https://github.com/form-data/form-data/pull/102) +- Remove duplicate plus sign [`#94`](https://github.com/form-data/form-data/pull/94) + +### Commits + +- Made https test local. Updated deps. [`afe1959`](https://github.com/form-data/form-data/commit/afe1959ec711f23e57038ab5cb20fedd86271f29) +- Proper self-signed ssl [`4d5ec50`](https://github.com/form-data/form-data/commit/4d5ec50e81109ad2addf3dbb56dc7c134df5ff87) +- Update HTTPS handling for modern days [`2c11b01`](https://github.com/form-data/form-data/commit/2c11b01ce2c06e205c84d7154fa2f27b66c94f3b) +- Made tests more local [`09633fa`](https://github.com/form-data/form-data/commit/09633fa249e7ce3ac581543aafe16ee9039a823b) +- Auto create tmp folder for Formidable [`28714b7`](https://github.com/form-data/form-data/commit/28714b7f71ad556064cdff88fabe6b92bd407ddd) +- remove duplicate plus sign [`36e09c6`](https://github.com/form-data/form-data/commit/36e09c695b0514d91a23f5cd64e6805404776fc7) + +## [0.2](https://github.com/form-data/form-data/compare/0.1.4...0.2) - 2014-12-06 + +### Merged + +- Bumped version [`#96`](https://github.com/form-data/form-data/pull/96) +- Replace mime library. [`#95`](https://github.com/form-data/form-data/pull/95) +- #71 Respect bytes range in a read stream. [`#73`](https://github.com/form-data/form-data/pull/73) + +## [0.1.4](https://github.com/form-data/form-data/compare/0.1.3...0.1.4) - 2014-06-23 + +### Merged + +- Updated version. [`#76`](https://github.com/form-data/form-data/pull/76) +- #71 Respect bytes range in a read stream. [`#75`](https://github.com/form-data/form-data/pull/75) + +## [0.1.3](https://github.com/form-data/form-data/compare/0.1.2...0.1.3) - 2014-06-17 + +### Merged + +- Updated versions. [`#69`](https://github.com/form-data/form-data/pull/69) +- Added custom headers support [`#60`](https://github.com/form-data/form-data/pull/60) +- Added test for Request. Small fixes. [`#56`](https://github.com/form-data/form-data/pull/56) + +### Commits + +- Added test for the custom header functionality [`bd50685`](https://github.com/form-data/form-data/commit/bd506855af62daf728ef1718cae88ed23bb732f3) +- Documented custom headers option [`77a024a`](https://github.com/form-data/form-data/commit/77a024a9375f93c246c35513d80f37d5e11d35ff) +- Removed 0.6 support. [`aee8dce`](https://github.com/form-data/form-data/commit/aee8dce604c595cfaacfc6efb12453d1691ac0d6) + +## [0.1.2](https://github.com/form-data/form-data/compare/0.1.1...0.1.2) - 2013-10-02 + +### Merged + +- Fixed default https port assignment, added tests. [`#52`](https://github.com/form-data/form-data/pull/52) +- #45 Added tests for multi-submit. Updated readme. [`#49`](https://github.com/form-data/form-data/pull/49) +- #47 return request from .submit() [`#48`](https://github.com/form-data/form-data/pull/48) + +### Commits + +- Bumped version. [`2b761b2`](https://github.com/form-data/form-data/commit/2b761b256ae607fc2121621f12c2e1042be26baf) + +## [0.1.1](https://github.com/form-data/form-data/compare/0.1.0...0.1.1) - 2013-08-21 + +### Merged + +- Added license type and reference to package.json [`#46`](https://github.com/form-data/form-data/pull/46) + +### Commits + +- #47 return request from .submit() [`1d61c2d`](https://github.com/form-data/form-data/commit/1d61c2da518bd5e136550faa3b5235bb540f1e06) +- #47 Updated readme. [`e3dae15`](https://github.com/form-data/form-data/commit/e3dae1526bd3c3b9d7aff6075abdaac12c3cc60f) + +## [0.1.0](https://github.com/form-data/form-data/compare/0.0.10...0.1.0) - 2013-07-08 + +### Merged + +- Update master to 0.1.0 [`#44`](https://github.com/form-data/form-data/pull/44) +- 0.1.0 - Added error handling. Streamlined edge cases behavior. [`#43`](https://github.com/form-data/form-data/pull/43) +- Pointed badges back to mothership. [`#39`](https://github.com/form-data/form-data/pull/39) +- Updated node-fake to support 0.11 tests. [`#37`](https://github.com/form-data/form-data/pull/37) +- Updated tests to play nice with 0.10 [`#36`](https://github.com/form-data/form-data/pull/36) +- #32 Added .npmignore [`#34`](https://github.com/form-data/form-data/pull/34) +- Spring cleaning [`#30`](https://github.com/form-data/form-data/pull/30) + +### Commits + +- Added error handling. Streamlined edge cases behavior. [`4da496e`](https://github.com/form-data/form-data/commit/4da496e577cb9bc0fd6c94cbf9333a0082ce353a) +- Made tests more deterministic. [`7fc009b`](https://github.com/form-data/form-data/commit/7fc009b8a2cc9232514a44b2808b9f89ce68f7d2) +- Fixed styling. [`d373b41`](https://github.com/form-data/form-data/commit/d373b417e779024bc3326073e176383cd08c0b18) +- #40 Updated Readme.md regarding getLengthSync() [`efb373f`](https://github.com/form-data/form-data/commit/efb373fd63814d977960e0299d23c92cd876cfef) +- Updated readme. [`527e3a6`](https://github.com/form-data/form-data/commit/527e3a63b032cb6f576f597ad7ff2ebcf8a0b9b4) + +## [0.0.10](https://github.com/form-data/form-data/compare/0.0.9...0.0.10) - 2013-05-08 + +### Commits + +- Updated tests to play nice with 0.10. [`932b39b`](https://github.com/form-data/form-data/commit/932b39b773e49edcb2c5d2e58fe389ab6c42f47c) +- Added dependency tracking. [`3131d7f`](https://github.com/form-data/form-data/commit/3131d7f6996cd519d50547e4de1587fd80d0fa07) + +## 0.0.9 - 2013-04-29 + +### Merged + +- Custom params for form.submit() should cover most edge cases. [`#22`](https://github.com/form-data/form-data/pull/22) +- Updated Readme and version number. [`#20`](https://github.com/form-data/form-data/pull/20) +- Allow custom headers and pre-known length in parts [`#17`](https://github.com/form-data/form-data/pull/17) +- Bumped version number. [`#12`](https://github.com/form-data/form-data/pull/12) +- Fix for #10 [`#11`](https://github.com/form-data/form-data/pull/11) +- Bumped version number. [`#8`](https://github.com/form-data/form-data/pull/8) +- Added support for https destination, http-response and mikeal's request streams. [`#7`](https://github.com/form-data/form-data/pull/7) +- Updated git url. [`#6`](https://github.com/form-data/form-data/pull/6) +- Version bump. [`#5`](https://github.com/form-data/form-data/pull/5) +- Changes to support custom content-type and getLengthSync. [`#4`](https://github.com/form-data/form-data/pull/4) +- make .submit(url) use host from url, not 'localhost' [`#2`](https://github.com/form-data/form-data/pull/2) +- Make package.json JSON [`#1`](https://github.com/form-data/form-data/pull/1) + +### Fixed + +- Add MIT license [`#14`](https://github.com/form-data/form-data/issues/14) + +### Commits + +- Spring cleaning. [`850ba1b`](https://github.com/form-data/form-data/commit/850ba1b649b6856b0fa87bbcb04bc70ece0137a6) +- Added custom request params to form.submit(). Made tests more stable. [`de3502f`](https://github.com/form-data/form-data/commit/de3502f6c4a509f6ed12a7dd9dc2ce9c2e0a8d23) +- Basic form (no files) working [`6ffdc34`](https://github.com/form-data/form-data/commit/6ffdc343e8594cfc2efe1e27653ea39d8980a14e) +- Got initial test to pass [`9a59d08`](https://github.com/form-data/form-data/commit/9a59d08c024479fd3c9d99ba2f0893a47b3980f0) +- Implement initial getLength [`9060c91`](https://github.com/form-data/form-data/commit/9060c91b861a6573b73beddd11e866db422b5830) +- Make getLength work with file streams [`6f6b1e9`](https://github.com/form-data/form-data/commit/6f6b1e9b65951e6314167db33b446351702f5558) +- Implemented a simplistic submit() function [`41e9cc1`](https://github.com/form-data/form-data/commit/41e9cc124124721e53bc1d1459d45db1410c44e6) +- added test for custom headers and content-length in parts (felixge/node-form-data/17) [`b16d14e`](https://github.com/form-data/form-data/commit/b16d14e693670f5d52babec32cdedd1aa07c1aa4) +- Fixed code styling. [`5847424`](https://github.com/form-data/form-data/commit/5847424c666970fc2060acd619e8a78678888a82) +- #29 Added custom filename and content-type options to support identity-less streams. [`adf8b4a`](https://github.com/form-data/form-data/commit/adf8b4a41530795682cd3e35ffaf26b30288ccda) +- Initial Readme and package.json [`8c744e5`](https://github.com/form-data/form-data/commit/8c744e58be4014bdf432e11b718ed87f03e217af) +- allow append() to completely override header and boundary [`3fb2ad4`](https://github.com/form-data/form-data/commit/3fb2ad491f66e4b4ff16130be25b462820b8c972) +- Syntax highlighting [`ab3a6a5`](https://github.com/form-data/form-data/commit/ab3a6a5ed1ab77a2943ce3befcb2bb3cd9ff0330) +- Updated Readme.md [`de8f441`](https://github.com/form-data/form-data/commit/de8f44122ca754cbfedc0d2748e84add5ff0b669) +- Added examples to Readme file. [`c406ac9`](https://github.com/form-data/form-data/commit/c406ac921d299cbc130464ed19338a9ef97cb650) +- pass options.knownLength to set length at beginning, w/o waiting for async size calculation [`e2ac039`](https://github.com/form-data/form-data/commit/e2ac0397ff7c37c3dca74fa9925b55f832e4fa0b) +- Updated dependencies and added test command. [`09bd7cd`](https://github.com/form-data/form-data/commit/09bd7cd86f1ad7a58df1b135eb6eef0d290894b4) +- Bumped version. Updated readme. [`4581140`](https://github.com/form-data/form-data/commit/4581140f322758c6fc92019d342c7d7d6c94af5c) +- Test runner [`1707ebb`](https://github.com/form-data/form-data/commit/1707ebbd180856e6ed44e80c46b02557e2425762) +- Added .npmignore, bumped version. [`2e033e0`](https://github.com/form-data/form-data/commit/2e033e0e4be7c1457be090cd9b2996f19d8fb665) +- FormData.prototype.append takes and passes along options (for header) [`b519203`](https://github.com/form-data/form-data/commit/b51920387ed4da7b4e106fc07b9459f26b5ae2f0) +- Make package.json JSON [`bf1b58d`](https://github.com/form-data/form-data/commit/bf1b58df794b10fda86ed013eb9237b1e5032085) +- Add dependencies to package.json [`7413d0b`](https://github.com/form-data/form-data/commit/7413d0b4cf5546312d47ea426db8180619083974) +- Add convenient submit() interface [`55855e4`](https://github.com/form-data/form-data/commit/55855e4bea14585d4a3faf9e7318a56696adbc7d) +- Fix content type [`08b6ae3`](https://github.com/form-data/form-data/commit/08b6ae337b23ef1ba457ead72c9b133047df213c) +- Combatting travis rvm calls. [`409adfd`](https://github.com/form-data/form-data/commit/409adfd100a3cf4968a632c05ba58d92d262d144) +- Fixed Issue #2 [`b3a5d66`](https://github.com/form-data/form-data/commit/b3a5d661739dcd6921b444b81d5cb3c32fab655d) +- Fix for #10. [`bab70b9`](https://github.com/form-data/form-data/commit/bab70b9e803e17287632762073d227d6c59989e0) +- Trying workarounds for formidable - 0.6 "love". [`25782a3`](https://github.com/form-data/form-data/commit/25782a3f183d9c30668ec2bca6247ed83f10611c) +- change whitespace to conform with felixge's style guide [`9fa34f4`](https://github.com/form-data/form-data/commit/9fa34f433bece85ef73086a874c6f0164ab7f1f6) +- Add async to deps [`b7d1a6b`](https://github.com/form-data/form-data/commit/b7d1a6b10ee74be831de24ed76843e5a6935f155) +- typo [`7860a9c`](https://github.com/form-data/form-data/commit/7860a9c8a582f0745ce0e4a0549f4bffc29c0b50) +- Bumped version. [`fa36c1b`](https://github.com/form-data/form-data/commit/fa36c1b4229c34b85d7efd41908429b6d1da3bfc) +- Updated .gitignore [`de567bd`](https://github.com/form-data/form-data/commit/de567bde620e53b8e9b0ed3506e79491525ec558) +- Don't rely on resume() being called by pipe [`1deae47`](https://github.com/form-data/form-data/commit/1deae47e042bcd170bd5dbe2b4a4fa5356bb8aa2) +- One more wrong content type [`28f166d`](https://github.com/form-data/form-data/commit/28f166d443e2eb77f2559324014670674b97e46e) +- Another typo [`b959b6a`](https://github.com/form-data/form-data/commit/b959b6a2be061cac17f8d329b89cea109f0f32be) +- Typo [`698fa0a`](https://github.com/form-data/form-data/commit/698fa0aa5dbf4eeb77377415acc202a6fbe3f4a2) +- Being simply dumb. [`b614db8`](https://github.com/form-data/form-data/commit/b614db85702061149fbd98418605106975e72ade) +- Fixed typo in the filename. [`30af6be`](https://github.com/form-data/form-data/commit/30af6be13fb0c9e92b32e935317680b9d7599928) diff --git a/node_modules/form-data/License b/node_modules/form-data/License new file mode 100644 index 0000000..c7ff12a --- /dev/null +++ b/node_modules/form-data/License @@ -0,0 +1,19 @@ +Copyright (c) 2012 Felix Geisendörfer (felix@debuggable.com) and contributors + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. diff --git a/node_modules/form-data/README.md b/node_modules/form-data/README.md new file mode 100644 index 0000000..d71caea --- /dev/null +++ b/node_modules/form-data/README.md @@ -0,0 +1,355 @@ +# Form-Data [![NPM Module](https://img.shields.io/npm/v/form-data.svg)](https://www.npmjs.com/package/form-data) [![Join the chat at https://gitter.im/form-data/form-data](http://form-data.github.io/images/gitterbadge.svg)](https://gitter.im/form-data/form-data) + +A library to create readable ```"multipart/form-data"``` streams. Can be used to submit forms and file uploads to other web applications. + +The API of this library is inspired by the [XMLHttpRequest-2 FormData Interface][xhr2-fd]. + +[xhr2-fd]: http://dev.w3.org/2006/webapi/XMLHttpRequest-2/Overview.html#the-formdata-interface + +[![Linux Build](https://img.shields.io/travis/form-data/form-data/v4.0.6.svg?label=linux:6.x-12.x)](https://travis-ci.org/form-data/form-data) +[![MacOS Build](https://img.shields.io/travis/form-data/form-data/v4.0.6.svg?label=macos:6.x-12.x)](https://travis-ci.org/form-data/form-data) +[![Windows Build](https://img.shields.io/travis/form-data/form-data/v4.0.6.svg?label=windows:6.x-12.x)](https://travis-ci.org/form-data/form-data) + +[![Coverage Status](https://img.shields.io/coveralls/form-data/form-data/v4.0.6.svg?label=code+coverage)](https://coveralls.io/github/form-data/form-data?branch=master) +[![Dependency Status](https://img.shields.io/david/form-data/form-data.svg)](https://david-dm.org/form-data/form-data) + +## Install + +``` +npm install --save form-data +``` + +## Usage + +In this example we are constructing a form with 3 fields that contain a string, +a buffer and a file stream. + +``` javascript +var FormData = require('form-data'); +var fs = require('fs'); + +var form = new FormData(); +form.append('my_field', 'my value'); +form.append('my_buffer', new Buffer(10)); +form.append('my_file', fs.createReadStream('/foo/bar.jpg')); +``` + +Also you can use http-response stream: + +``` javascript +var FormData = require('form-data'); +var http = require('http'); + +var form = new FormData(); + +http.request('http://nodejs.org/images/logo.png', function (response) { + form.append('my_field', 'my value'); + form.append('my_buffer', new Buffer(10)); + form.append('my_logo', response); +}); +``` + +Or @mikeal's [request](https://github.com/request/request) stream: + +``` javascript +var FormData = require('form-data'); +var request = require('request'); + +var form = new FormData(); + +form.append('my_field', 'my value'); +form.append('my_buffer', new Buffer(10)); +form.append('my_logo', request('http://nodejs.org/images/logo.png')); +``` + +In order to submit this form to a web application, call ```submit(url, [callback])``` method: + +``` javascript +form.submit('http://example.org/', function (err, res) { + // res – response object (http.IncomingMessage) // + res.resume(); +}); + +``` + +For more advanced request manipulations ```submit()``` method returns ```http.ClientRequest``` object, or you can choose from one of the alternative submission methods. + +### Custom options + +You can provide custom options, such as `maxDataSize`: + +``` javascript +var FormData = require('form-data'); + +var form = new FormData({ maxDataSize: 20971520 }); +form.append('my_field', 'my value'); +form.append('my_buffer', /* something big */); +``` + +List of available options could be found in [combined-stream](https://github.com/felixge/node-combined-stream/blob/master/lib/combined_stream.js#L7-L15) + +### Alternative submission methods + +You can use node's http client interface: + +``` javascript +var http = require('http'); + +var request = http.request({ + method: 'post', + host: 'example.org', + path: '/upload', + headers: form.getHeaders() +}); + +form.pipe(request); + +request.on('response', function (res) { + console.log(res.statusCode); +}); +``` + +Or if you would prefer the `'Content-Length'` header to be set for you: + +``` javascript +form.submit('example.org/upload', function (err, res) { + console.log(res.statusCode); +}); +``` + +To use custom headers and pre-known length in parts: + +``` javascript +var CRLF = '\r\n'; +var form = new FormData(); + +var options = { + header: CRLF + '--' + form.getBoundary() + CRLF + 'X-Custom-Header: 123' + CRLF + CRLF, + knownLength: 1 +}; + +form.append('my_buffer', buffer, options); + +form.submit('http://example.com/', function (err, res) { + if (err) throw err; + console.log('Done'); +}); +``` + +Form-Data can recognize and fetch all the required information from common types of streams (```fs.readStream```, ```http.response``` and ```mikeal's request```), for some other types of streams you'd need to provide "file"-related information manually: + +``` javascript +someModule.stream(function (err, stdout, stderr) { + if (err) throw err; + + var form = new FormData(); + + form.append('file', stdout, { + filename: 'unicycle.jpg', // ... or: + filepath: 'photos/toys/unicycle.jpg', + contentType: 'image/jpeg', + knownLength: 19806 + }); + + form.submit('http://example.com/', function (err, res) { + if (err) throw err; + console.log('Done'); + }); +}); +``` + +The `filepath` property overrides `filename` and may contain a relative path. This is typically used when uploading [multiple files from a directory](https://wicg.github.io/entries-api/#dom-htmlinputelement-webkitdirectory). + +For edge cases, like POST request to URL with query string or to pass HTTP auth credentials, object can be passed to `form.submit()` as first parameter: + +``` javascript +form.submit({ + host: 'example.com', + path: '/probably.php?extra=params', + auth: 'username:password' +}, function (err, res) { + console.log(res.statusCode); +}); +``` + +In case you need to also send custom HTTP headers with the POST request, you can use the `headers` key in first parameter of `form.submit()`: + +``` javascript +form.submit({ + host: 'example.com', + path: '/surelynot.php', + headers: { 'x-test-header': 'test-header-value' } +}, function (err, res) { + console.log(res.statusCode); +}); +``` + +### Methods + +- [_Void_ append( **String** _field_, **Mixed** _value_ [, **Mixed** _options_] )](https://github.com/form-data/form-data#void-append-string-field-mixed-value--mixed-options-). +- [_Headers_ getHeaders( [**Headers** _userHeaders_] )](https://github.com/form-data/form-data#array-getheaders-array-userheaders-) +- [_String_ getBoundary()](https://github.com/form-data/form-data#string-getboundary) +- [_Void_ setBoundary()](https://github.com/form-data/form-data#void-setboundary) +- [_Buffer_ getBuffer()](https://github.com/form-data/form-data#buffer-getbuffer) +- [_Integer_ getLengthSync()](https://github.com/form-data/form-data#integer-getlengthsync) +- [_Integer_ getLength( **function** _callback_ )](https://github.com/form-data/form-data#integer-getlength-function-callback-) +- [_Boolean_ hasKnownLength()](https://github.com/form-data/form-data#boolean-hasknownlength) +- [_Request_ submit( _params_, **function** _callback_ )](https://github.com/form-data/form-data#request-submit-params-function-callback-) +- [_String_ toString()](https://github.com/form-data/form-data#string-tostring) + +#### _Void_ append( **String** _field_, **Mixed** _value_ [, **Mixed** _options_] ) +Append data to the form. You can submit about any format (string, integer, boolean, buffer, etc.). However, Arrays are not supported and need to be turned into strings by the user. +```javascript +var form = new FormData(); +form.append('my_string', 'my value'); +form.append('my_integer', 1); +form.append('my_boolean', true); +form.append('my_buffer', new Buffer(10)); +form.append('my_array_as_json', JSON.stringify(['bird', 'cute'])); +``` + +You may provide a string for options, or an object. +```javascript +// Set filename by providing a string for options +form.append('my_file', fs.createReadStream('/foo/bar.jpg'), 'bar.jpg'); + +// provide an object. +form.append('my_file', fs.createReadStream('/foo/bar.jpg'), { filename: 'bar.jpg', contentType: 'image/jpeg', knownLength: 19806 }); +``` + +#### _Headers_ getHeaders( [**Headers** _userHeaders_] ) +This method adds the correct `content-type` header to the provided array of `userHeaders`. + +#### _String_ getBoundary() +Return the boundary of the formData. By default, the boundary consists of 26 `-` followed by 24 numbers +for example: +```javascript +--------------------------515890814546601021194782 +``` + +#### _Void_ setBoundary(String _boundary_) +Set the boundary string, overriding the default behavior described above. + +_Note: The boundary must be unique and may not appear in the data._ + +#### _Buffer_ getBuffer() +Return the full formdata request package, as a Buffer. You can insert this Buffer in e.g. Axios to send multipart data. +```javascript +var form = new FormData(); +form.append('my_buffer', Buffer.from([0x4a,0x42,0x20,0x52,0x6f,0x63,0x6b,0x73])); +form.append('my_file', fs.readFileSync('/foo/bar.jpg')); + +axios.post('https://example.com/path/to/api', form.getBuffer(), form.getHeaders()); +``` +**Note:** Because the output is of type Buffer, you can only append types that are accepted by Buffer: *string, Buffer, ArrayBuffer, Array, or Array-like Object*. A ReadStream for example will result in an error. + +#### _Integer_ getLengthSync() +Same as `getLength` but synchronous. + +_Note: getLengthSync __doesn't__ calculate streams length._ + +#### _Integer_ getLength(**function** _callback_ ) +Returns the `Content-Length` async. The callback is used to handle errors and continue once the length has been calculated +```javascript +this.getLength(function (err, length) { + if (err) { + this._error(err); + return; + } + + // add content length + request.setHeader('Content-Length', length); + + ... +}.bind(this)); +``` + +#### _Boolean_ hasKnownLength() +Checks if the length of added values is known. + +#### _Request_ submit(_params_, **function** _callback_ ) +Submit the form to a web application. +```javascript +var form = new FormData(); +form.append('my_string', 'Hello World'); + +form.submit('http://example.com/', function (err, res) { + // res – response object (http.IncomingMessage) // + res.resume(); +} ); +``` + +#### _String_ toString() +Returns the form data as a string. Don't use this if you are sending files or buffers, use `getBuffer()` instead. + +### Integration with other libraries + +#### Request + +Form submission using [request](https://github.com/request/request): + +```javascript +var formData = { + my_field: 'my_value', + my_file: fs.createReadStream(__dirname + '/unicycle.jpg'), +}; + +request.post({url:'http://service.com/upload', formData: formData}, function (err, httpResponse, body) { + if (err) { + return console.error('upload failed:', err); + } + console.log('Upload successful! Server responded with:', body); +}); +``` + +For more details see [request readme](https://github.com/request/request#multipartform-data-multipart-form-uploads). + +#### node-fetch + +You can also submit a form using [node-fetch](https://github.com/bitinn/node-fetch): + +```javascript +var form = new FormData(); + +form.append('a', 1); + +fetch('http://example.com', { method: 'POST', body: form }) + .then(function (res) { + return res.json(); + }).then(function (json) { + console.log(json); + }); +``` + +#### axios + +In Node.js you can post a file using [axios](https://github.com/axios/axios): +```javascript +const form = new FormData(); +const stream = fs.createReadStream(PATH_TO_FILE); + +form.append('image', stream); + +// In Node.js environment you need to set boundary in the header field 'Content-Type' by calling method `getHeaders` +const formHeaders = form.getHeaders(); + +axios.post('http://example.com', form, { + headers: { + ...formHeaders, + }, +}) + .then(response => response) + .catch(error => error) +``` + +## Notes + +- ```getLengthSync()``` method DOESN'T calculate length for streams, use ```knownLength``` options as workaround. +- ```getLength(cb)``` will send an error as first parameter of callback if stream length cannot be calculated (e.g. send in custom streams w/o using ```knownLength```). +- ```submit``` will not add `content-length` if form length is unknown or not calculable. +- Starting version `2.x` FormData has dropped support for `node@0.10.x`. +- Starting version `3.x` FormData has dropped support for `node@4.x`. + +## License + +Form-Data is released under the [MIT](License) license. diff --git a/node_modules/form-data/index.d.ts b/node_modules/form-data/index.d.ts new file mode 100644 index 0000000..295e9e9 --- /dev/null +++ b/node_modules/form-data/index.d.ts @@ -0,0 +1,62 @@ +// Definitions by: Carlos Ballesteros Velasco +// Leon Yu +// BendingBender +// Maple Miao + +/// +import * as stream from 'stream'; +import * as http from 'http'; + +export = FormData; + +// Extracted because @types/node doesn't export interfaces. +interface ReadableOptions { + highWaterMark?: number; + encoding?: string; + objectMode?: boolean; + read?(this: stream.Readable, size: number): void; + destroy?(this: stream.Readable, error: Error | null, callback: (error: Error | null) => void): void; + autoDestroy?: boolean; +} + +interface Options extends ReadableOptions { + writable?: boolean; + readable?: boolean; + dataSize?: number; + maxDataSize?: number; + pauseStreams?: boolean; +} + +declare class FormData extends stream.Readable { + constructor(options?: Options); + append(key: string, value: any, options?: FormData.AppendOptions | string): void; + getHeaders(userHeaders?: FormData.Headers): FormData.Headers; + submit( + params: string | FormData.SubmitOptions, + callback?: (error: Error | null, response: http.IncomingMessage) => void + ): http.ClientRequest; + getBuffer(): Buffer; + setBoundary(boundary: string): void; + getBoundary(): string; + getLength(callback: (err: Error | null, length: number) => void): void; + getLengthSync(): number; + hasKnownLength(): boolean; +} + +declare namespace FormData { + interface Headers { + [key: string]: any; + } + + interface AppendOptions { + header?: string | Headers; + knownLength?: number; + filename?: string; + filepath?: string; + contentType?: string; + } + + interface SubmitOptions extends http.RequestOptions { + protocol?: 'https:' | 'http:'; + } +} diff --git a/node_modules/form-data/lib/browser.js b/node_modules/form-data/lib/browser.js new file mode 100644 index 0000000..8950a91 --- /dev/null +++ b/node_modules/form-data/lib/browser.js @@ -0,0 +1,4 @@ +'use strict'; + +/* eslint-env browser */ +module.exports = typeof self === 'object' ? self.FormData : window.FormData; diff --git a/node_modules/form-data/lib/form_data.js b/node_modules/form-data/lib/form_data.js new file mode 100644 index 0000000..a05c8ce --- /dev/null +++ b/node_modules/form-data/lib/form_data.js @@ -0,0 +1,506 @@ +'use strict'; + +var CombinedStream = require('combined-stream'); +var util = require('util'); +var path = require('path'); +var http = require('http'); +var https = require('https'); +var parseUrl = require('url').parse; +var fs = require('fs'); +var Stream = require('stream').Stream; +var crypto = require('crypto'); +var mime = require('mime-types'); +var asynckit = require('asynckit'); +var setToStringTag = require('es-set-tostringtag'); +var hasOwn = require('hasown'); +var populate = require('./populate.js'); + +/** + * Escape CR, LF, and `"` in a multipart `name`/`filename` parameter, so a field + * name or filename can not break out of its header line to inject headers or + * smuggle additional parts. Matches the WHATWG HTML multipart/form-data encoding. + * + * @param {string} str - the parameter value to escape + * @returns {string} the escaped value + */ +function escapeHeaderParam(str) { + return String(str).replace(/\r/g, '%0D').replace(/\n/g, '%0A').replace(/"/g, '%22'); +} + +/** + * Create readable "multipart/form-data" streams. + * Can be used to submit forms + * and file uploads to other web applications. + * + * @constructor + * @param {object} options - Properties to be added/overriden for FormData and CombinedStream + */ +function FormData(options) { + if (!(this instanceof FormData)) { + return new FormData(options); + } + + this._overheadLength = 0; + this._valueLength = 0; + this._valuesToMeasure = []; + + CombinedStream.call(this); + + options = options || {}; // eslint-disable-line no-param-reassign + for (var option in options) { // eslint-disable-line no-restricted-syntax + this[option] = options[option]; + } +} + +// make it a Stream +util.inherits(FormData, CombinedStream); + +FormData.LINE_BREAK = '\r\n'; +FormData.DEFAULT_CONTENT_TYPE = 'application/octet-stream'; + +FormData.prototype.append = function (field, value, options) { + options = options || {}; // eslint-disable-line no-param-reassign + + // allow filename as single option + if (typeof options === 'string') { + options = { filename: options }; // eslint-disable-line no-param-reassign + } + + var append = CombinedStream.prototype.append.bind(this); + + // all that streamy business can't handle numbers + if (typeof value === 'number' || value == null) { + value = String(value); // eslint-disable-line no-param-reassign + } + + // https://github.com/felixge/node-form-data/issues/38 + if (Array.isArray(value)) { + /* + * Please convert your array into string + * the way web server expects it + */ + this._error(new Error('Arrays are not supported.')); + return; + } + + var header = this._multiPartHeader(field, value, options); + var footer = this._multiPartFooter(); + + append(header); + append(value); + append(footer); + + // pass along options.knownLength + this._trackLength(header, value, options); +}; + +FormData.prototype._trackLength = function (header, value, options) { + var valueLength = 0; + + /* + * used w/ getLengthSync(), when length is known. + * e.g. for streaming directly from a remote server, + * w/ a known file a size, and not wanting to wait for + * incoming file to finish to get its size. + */ + if (options.knownLength != null) { + valueLength += Number(options.knownLength); + } else if (Buffer.isBuffer(value)) { + valueLength = value.length; + } else if (typeof value === 'string') { + valueLength = Buffer.byteLength(value); + } + + this._valueLength += valueLength; + + // @check why add CRLF? does this account for custom/multiple CRLFs? + this._overheadLength += Buffer.byteLength(header) + FormData.LINE_BREAK.length; + + // empty or either doesn't have path or not an http response or not a stream + if (!value || (!value.path && !(value.readable && hasOwn(value, 'httpVersion')) && !(value instanceof Stream))) { + return; + } + + // no need to bother with the length + if (!options.knownLength) { + this._valuesToMeasure.push(value); + } +}; + +FormData.prototype._lengthRetriever = function (value, callback) { + if (hasOwn(value, 'fd')) { + // take read range into a account + // `end` = Infinity –> read file till the end + // + // TODO: Looks like there is bug in Node fs.createReadStream + // it doesn't respect `end` options without `start` options + // Fix it when node fixes it. + // https://github.com/joyent/node/issues/7819 + if (value.end != undefined && value.end != Infinity && value.start != undefined) { + // when end specified + // no need to calculate range + // inclusive, starts with 0 + callback(null, value.end + 1 - (value.start ? value.start : 0)); // eslint-disable-line callback-return + + // not that fast snoopy + } else { + // still need to fetch file size from fs + fs.stat(value.path, function (err, stat) { + if (err) { + callback(err); + return; + } + + // update final size based on the range options + var fileSize = stat.size - (value.start ? value.start : 0); + callback(null, fileSize); + }); + } + + // or http response + } else if (hasOwn(value, 'httpVersion')) { + callback(null, Number(value.headers['content-length'])); // eslint-disable-line callback-return + + // or request stream http://github.com/mikeal/request + } else if (hasOwn(value, 'httpModule')) { + // wait till response come back + value.on('response', function (response) { + value.pause(); + callback(null, Number(response.headers['content-length'])); + }); + value.resume(); + + // something else + } else { + callback('Unknown stream'); // eslint-disable-line callback-return + } +}; + +FormData.prototype._multiPartHeader = function (field, value, options) { + /* + * custom header specified (as string)? + * it becomes responsible for boundary + * (e.g. to handle extra CRLFs on .NET servers) + */ + if (typeof options.header === 'string') { + return options.header; + } + + var contentDisposition = this._getContentDisposition(value, options); + var contentType = this._getContentType(value, options); + + var contents = ''; + var headers = { + // add custom disposition as third element or keep it two elements if not + 'Content-Disposition': ['form-data', 'name="' + escapeHeaderParam(field) + '"'].concat(contentDisposition || []), + // if no content type. allow it to be empty array + 'Content-Type': [].concat(contentType || []) + }; + + // allow custom headers. + if (typeof options.header === 'object') { + populate(headers, options.header); + } + + var header; + for (var prop in headers) { // eslint-disable-line no-restricted-syntax + if (hasOwn(headers, prop)) { + header = headers[prop]; + + // skip nullish headers. + if (header == null) { + continue; // eslint-disable-line no-restricted-syntax, no-continue + } + + // convert all headers to arrays. + if (!Array.isArray(header)) { + header = [header]; + } + + // add non-empty headers. + if (header.length) { + contents += prop + ': ' + header.join('; ') + FormData.LINE_BREAK; + } + } + } + + return '--' + this.getBoundary() + FormData.LINE_BREAK + contents + FormData.LINE_BREAK; +}; + +FormData.prototype._getContentDisposition = function (value, options) { // eslint-disable-line consistent-return + var filename; + + if (typeof options.filepath === 'string') { + // custom filepath for relative paths + filename = path.normalize(options.filepath).replace(/\\/g, '/'); + } else if (options.filename || (value && (value.name || value.path))) { + /* + * custom filename take precedence + * formidable and the browser add a name property + * fs- and request- streams have path property + */ + filename = path.basename(options.filename || (value && (value.name || value.path))); + } else if (value && value.readable && hasOwn(value, 'httpVersion')) { + // or try http response + filename = path.basename(value.client._httpMessage.path || ''); + } + + if (filename) { + return 'filename="' + escapeHeaderParam(filename) + '"'; + } +}; + +FormData.prototype._getContentType = function (value, options) { + // use custom content-type above all + var contentType = options.contentType; + + // or try `name` from formidable, browser + if (!contentType && value && value.name) { + contentType = mime.lookup(value.name); + } + + // or try `path` from fs-, request- streams + if (!contentType && value && value.path) { + contentType = mime.lookup(value.path); + } + + // or if it's http-reponse + if (!contentType && value && value.readable && hasOwn(value, 'httpVersion')) { + contentType = value.headers['content-type']; + } + + // or guess it from the filepath or filename + if (!contentType && (options.filepath || options.filename)) { + contentType = mime.lookup(options.filepath || options.filename); + } + + // fallback to the default content type if `value` is not simple value + if (!contentType && value && typeof value === 'object') { + contentType = FormData.DEFAULT_CONTENT_TYPE; + } + + return contentType; +}; + +FormData.prototype._multiPartFooter = function () { + return function (next) { + var footer = FormData.LINE_BREAK; + + var lastPart = this._streams.length === 0; + if (lastPart) { + footer += this._lastBoundary(); + } + + next(footer); + }.bind(this); +}; + +FormData.prototype._lastBoundary = function () { + return '--' + this.getBoundary() + '--' + FormData.LINE_BREAK; +}; + +FormData.prototype.getHeaders = function (userHeaders) { + var header; + var formHeaders = { + 'content-type': 'multipart/form-data; boundary=' + this.getBoundary() + }; + + for (header in userHeaders) { // eslint-disable-line no-restricted-syntax + if (hasOwn(userHeaders, header)) { + formHeaders[header.toLowerCase()] = userHeaders[header]; + } + } + + return formHeaders; +}; + +FormData.prototype.setBoundary = function (boundary) { + if (typeof boundary !== 'string') { + throw new TypeError('FormData boundary must be a string'); + } + this._boundary = boundary; +}; + +FormData.prototype.getBoundary = function () { + if (!this._boundary) { + this._generateBoundary(); + } + + return this._boundary; +}; + +FormData.prototype.getBuffer = function () { + var dataBuffer = new Buffer.alloc(0); // eslint-disable-line new-cap + var boundary = this.getBoundary(); + + // Create the form content. Add Line breaks to the end of data. + for (var i = 0, len = this._streams.length; i < len; i++) { + if (typeof this._streams[i] !== 'function') { + // Add content to the buffer. + if (Buffer.isBuffer(this._streams[i])) { + dataBuffer = Buffer.concat([dataBuffer, this._streams[i]]); + } else { + dataBuffer = Buffer.concat([dataBuffer, Buffer.from(this._streams[i])]); + } + + // Add break after content. + if (typeof this._streams[i] !== 'string' || this._streams[i].substring(2, boundary.length + 2) !== boundary) { + dataBuffer = Buffer.concat([dataBuffer, Buffer.from(FormData.LINE_BREAK)]); + } + } + } + + // Add the footer and return the Buffer object. + return Buffer.concat([dataBuffer, Buffer.from(this._lastBoundary())]); +}; + +FormData.prototype._generateBoundary = function () { + // This generates a 50 character boundary similar to those used by Firefox. + + // They are optimized for boyer-moore parsing. + this._boundary = '--------------------------' + crypto.randomBytes(12).toString('hex'); +}; + +// Note: getLengthSync DOESN'T calculate streams length +// As workaround one can calculate file size manually and add it as knownLength option +FormData.prototype.getLengthSync = function () { + var knownLength = this._overheadLength + this._valueLength; + + // Don't get confused, there are 3 "internal" streams for each keyval pair so it basically checks if there is any value added to the form + if (this._streams.length) { + knownLength += this._lastBoundary().length; + } + + // https://github.com/form-data/form-data/issues/40 + if (!this.hasKnownLength()) { + /* + * Some async length retrievers are present + * therefore synchronous length calculation is false. + * Please use getLength(callback) to get proper length + */ + this._error(new Error('Cannot calculate proper length in synchronous way.')); + } + + return knownLength; +}; + +// Public API to check if length of added values is known +// https://github.com/form-data/form-data/issues/196 +// https://github.com/form-data/form-data/issues/262 +FormData.prototype.hasKnownLength = function () { + var hasKnownLength = true; + + if (this._valuesToMeasure.length) { + hasKnownLength = false; + } + + return hasKnownLength; +}; + +FormData.prototype.getLength = function (cb) { + var knownLength = this._overheadLength + this._valueLength; + + if (this._streams.length) { + knownLength += this._lastBoundary().length; + } + + if (!this._valuesToMeasure.length) { + process.nextTick(cb.bind(this, null, knownLength)); + return; + } + + asynckit.parallel(this._valuesToMeasure, this._lengthRetriever, function (err, values) { + if (err) { + cb(err); + return; + } + + values.forEach(function (length) { + knownLength += length; + }); + + cb(null, knownLength); + }); +}; + +FormData.prototype.submit = function (params, cb) { + var request; + var options; + var defaults = { method: 'post' }; + + // parse provided url if it's string or treat it as options object + if (typeof params === 'string') { + params = parseUrl(params); // eslint-disable-line no-param-reassign + /* eslint sort-keys: 0 */ + options = populate({ + port: params.port, + path: params.pathname, + host: params.hostname, + protocol: params.protocol + }, defaults); + } else { // use custom params + options = populate(params, defaults); + // if no port provided use default one + if (!options.port) { + options.port = options.protocol === 'https:' ? 443 : 80; + } + } + + // put that good code in getHeaders to some use + options.headers = this.getHeaders(params.headers); + + // https if specified, fallback to http in any other case + if (options.protocol === 'https:') { + request = https.request(options); + } else { + request = http.request(options); + } + + // get content length and fire away + this.getLength(function (err, length) { + if (err && err !== 'Unknown stream') { + this._error(err); + return; + } + + // add content length + if (length) { + request.setHeader('Content-Length', length); + } + + this.pipe(request); + if (cb) { + var onResponse; + + var callback = function (error, responce) { + request.removeListener('error', callback); + request.removeListener('response', onResponse); + + return cb.call(this, error, responce); + }; + + onResponse = callback.bind(this, null); + + request.on('error', callback); + request.on('response', onResponse); + } + }.bind(this)); + + return request; +}; + +FormData.prototype._error = function (err) { + if (!this.error) { + this.error = err; + this.pause(); + this.emit('error', err); + } +}; + +FormData.prototype.toString = function () { + return '[object FormData]'; +}; +setToStringTag(FormData.prototype, 'FormData'); + +// Public API +module.exports = FormData; diff --git a/node_modules/form-data/lib/populate.js b/node_modules/form-data/lib/populate.js new file mode 100644 index 0000000..55ac3bb --- /dev/null +++ b/node_modules/form-data/lib/populate.js @@ -0,0 +1,10 @@ +'use strict'; + +// populates missing values +module.exports = function (dst, src) { + Object.keys(src).forEach(function (prop) { + dst[prop] = dst[prop] || src[prop]; // eslint-disable-line no-param-reassign + }); + + return dst; +}; diff --git a/node_modules/form-data/package.json b/node_modules/form-data/package.json new file mode 100644 index 0000000..599287a --- /dev/null +++ b/node_modules/form-data/package.json @@ -0,0 +1,82 @@ +{ + "author": "Felix Geisendörfer (http://debuggable.com/)", + "name": "form-data", + "description": "A library to create readable \"multipart/form-data\" streams. Can be used to submit forms and file uploads to other web applications.", + "version": "4.0.6", + "repository": { + "type": "git", + "url": "git://github.com/form-data/form-data.git" + }, + "main": "./lib/form_data", + "browser": "./lib/browser", + "typings": "./index.d.ts", + "scripts": { + "pretest": "npm run lint", + "pretests-only": "rimraf coverage test/tmp", + "tests-only": "istanbul cover test/run.js", + "posttests-only": "istanbul report lcov text", + "test": "npm run tests-only", + "posttest": "npx npm@'>=10.2' audit --production", + "lint": "eslint --ext=js,mjs .", + "report": "istanbul report lcov text", + "ci-lint": "is-node-modern 8 && npm run lint || is-node-not-modern 8", + "ci-test": "npm run tests-only && npm run browser && npm run report", + "predebug": "rimraf coverage test/tmp", + "debug": "verbose=1 ./test/run.js", + "browser": "browserify -t browserify-istanbul test/run-browser.js | obake --coverage", + "check": "istanbul check-coverage coverage/coverage*.json", + "files": "pkgfiles --sort=name", + "get-version": "node -e \"console.log(require('./package.json').version)\"", + "update-readme": "sed -i.bak 's/\\/master\\.svg/\\/v'$(npm --silent run get-version)'.svg/g' README.md", + "postupdate-readme": "mv README.md.bak READ.ME.md.bak", + "restore-readme": "mv READ.ME.md.bak README.md", + "prepublish": "not-in-publish || npm run prepublishOnly", + "prepack": "npm run update-readme", + "postpack": "npm run restore-readme", + "version": "auto-changelog && git add CHANGELOG.md", + "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" + }, + "engines": { + "node": ">= 6" + }, + "dependencies": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "es-set-tostringtag": "^2.1.0", + "hasown": "^2.0.4", + "mime-types": "^2.1.35" + }, + "devDependencies": { + "@ljharb/eslint-config": "^22.2.3", + "auto-changelog": "^2.6.0", + "browserify": "^13.3.0", + "browserify-istanbul": "^2.0.0", + "coveralls": "^3.1.1", + "cross-spawn": "^6.0.6", + "eslint": "^8.57.1", + "fake": "^0.2.2", + "far": "^0.0.7", + "formidable": "^1.2.6", + "in-publish": "^2.0.1", + "is-node-modern": "^1.0.0", + "istanbul": "^0.4.5", + "js-randomness-predictor": "^3.6.0", + "obake": "^0.1.2", + "pkgfiles": "^2.3.2", + "pre-commit": "^1.2.2", + "puppeteer": "^1.20.0", + "request": "~2.87.0", + "rimraf": "^2.7.1", + "semver": "^6.3.1", + "tape": "^5.10.1" + }, + "license": "MIT", + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false, + "hideCredit": true + } +} diff --git a/node_modules/function-bind/.eslintrc b/node_modules/function-bind/.eslintrc new file mode 100644 index 0000000..71a054f --- /dev/null +++ b/node_modules/function-bind/.eslintrc @@ -0,0 +1,21 @@ +{ + "root": true, + + "extends": "@ljharb", + + "rules": { + "func-name-matching": 0, + "indent": [2, 4], + "no-new-func": [1], + }, + + "overrides": [ + { + "files": "test/**", + "rules": { + "max-lines-per-function": 0, + "strict": [0] + }, + }, + ], +} diff --git a/node_modules/function-bind/.github/FUNDING.yml b/node_modules/function-bind/.github/FUNDING.yml new file mode 100644 index 0000000..7448219 --- /dev/null +++ b/node_modules/function-bind/.github/FUNDING.yml @@ -0,0 +1,12 @@ +# These are supported funding model platforms + +github: [ljharb] +patreon: # Replace with a single Patreon username +open_collective: # Replace with a single Open Collective username +ko_fi: # Replace with a single Ko-fi username +tidelift: npm/function-bind +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +otechie: # Replace with a single Otechie username +custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/node_modules/function-bind/.github/SECURITY.md b/node_modules/function-bind/.github/SECURITY.md new file mode 100644 index 0000000..82e4285 --- /dev/null +++ b/node_modules/function-bind/.github/SECURITY.md @@ -0,0 +1,3 @@ +# Security + +Please email [@ljharb](https://github.com/ljharb) or see https://tidelift.com/security if you have a potential security vulnerability to report. diff --git a/node_modules/function-bind/.nycrc b/node_modules/function-bind/.nycrc new file mode 100644 index 0000000..1826526 --- /dev/null +++ b/node_modules/function-bind/.nycrc @@ -0,0 +1,13 @@ +{ + "all": true, + "check-coverage": false, + "reporter": ["text-summary", "text", "html", "json"], + "lines": 86, + "statements": 85.93, + "functions": 82.43, + "branches": 76.06, + "exclude": [ + "coverage", + "test" + ] +} diff --git a/node_modules/function-bind/CHANGELOG.md b/node_modules/function-bind/CHANGELOG.md new file mode 100644 index 0000000..f9e6cc0 --- /dev/null +++ b/node_modules/function-bind/CHANGELOG.md @@ -0,0 +1,136 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [v1.1.2](https://github.com/ljharb/function-bind/compare/v1.1.1...v1.1.2) - 2023-10-12 + +### Merged + +- Point to the correct file [`#16`](https://github.com/ljharb/function-bind/pull/16) + +### Commits + +- [Tests] migrate tests to Github Actions [`4f8b57c`](https://github.com/ljharb/function-bind/commit/4f8b57c02f2011fe9ae353d5e74e8745f0988af8) +- [Tests] remove `jscs` [`90eb2ed`](https://github.com/ljharb/function-bind/commit/90eb2edbeefd5b76cd6c3a482ea3454db169b31f) +- [meta] update `.gitignore` [`53fcdc3`](https://github.com/ljharb/function-bind/commit/53fcdc371cd66634d6e9b71c836a50f437e89fed) +- [Tests] up to `node` `v11.10`, `v10.15`, `v9.11`, `v8.15`, `v6.16`, `v4.9`; use `nvm install-latest-npm`; run audit script in tests [`1fe8f6e`](https://github.com/ljharb/function-bind/commit/1fe8f6e9aed0dfa8d8b3cdbd00c7f5ea0cd2b36e) +- [meta] add `auto-changelog` [`1921fcb`](https://github.com/ljharb/function-bind/commit/1921fcb5b416b63ffc4acad051b6aad5722f777d) +- [Robustness] remove runtime dependency on all builtins except `.apply` [`f743e61`](https://github.com/ljharb/function-bind/commit/f743e61aa6bb2360358c04d4884c9db853d118b7) +- Docs: enable badges; update wording [`503cb12`](https://github.com/ljharb/function-bind/commit/503cb12d998b5f91822776c73332c7adcd6355dd) +- [readme] update badges [`290c5db`](https://github.com/ljharb/function-bind/commit/290c5dbbbda7264efaeb886552a374b869a4bb48) +- [Tests] switch to nyc for coverage [`ea360ba`](https://github.com/ljharb/function-bind/commit/ea360ba907fc2601ed18d01a3827fa2d3533cdf8) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `tape` [`cae5e9e`](https://github.com/ljharb/function-bind/commit/cae5e9e07a5578dc6df26c03ee22851ce05b943c) +- [meta] add `funding` field; create FUNDING.yml [`c9f4274`](https://github.com/ljharb/function-bind/commit/c9f4274aa80ea3aae9657a3938fdba41a3b04ca6) +- [Tests] fix eslint errors from #15 [`f69aaa2`](https://github.com/ljharb/function-bind/commit/f69aaa2beb2fdab4415bfb885760a699d0b9c964) +- [actions] fix permissions [`99a0cd9`](https://github.com/ljharb/function-bind/commit/99a0cd9f3b5bac223a0d572f081834cd73314be7) +- [meta] use `npmignore` to autogenerate an npmignore file [`f03b524`](https://github.com/ljharb/function-bind/commit/f03b524ca91f75a109a5d062f029122c86ecd1ae) +- [Dev Deps] update `@ljharb/eslint‑config`, `eslint`, `tape` [`7af9300`](https://github.com/ljharb/function-bind/commit/7af930023ae2ce7645489532821e4fbbcd7a2280) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `covert`, `tape` [`64a9127`](https://github.com/ljharb/function-bind/commit/64a9127ab0bd331b93d6572eaf6e9971967fc08c) +- [Tests] use `aud` instead of `npm audit` [`e75069c`](https://github.com/ljharb/function-bind/commit/e75069c50010a8fcce2a9ce2324934c35fdb4386) +- [Dev Deps] update `@ljharb/eslint-config`, `aud`, `tape` [`d03555c`](https://github.com/ljharb/function-bind/commit/d03555ca59dea3b71ce710045e4303b9e2619e28) +- [meta] add `safe-publish-latest` [`9c8f809`](https://github.com/ljharb/function-bind/commit/9c8f8092aed027d7e80c94f517aa892385b64f09) +- [Dev Deps] update `@ljharb/eslint-config`, `tape` [`baf6893`](https://github.com/ljharb/function-bind/commit/baf6893e27f5b59abe88bc1995e6f6ed1e527397) +- [meta] create SECURITY.md [`4db1779`](https://github.com/ljharb/function-bind/commit/4db17799f1f28ae294cb95e0081ca2b591c3911b) +- [Tests] add `npm run audit` [`c8b38ec`](https://github.com/ljharb/function-bind/commit/c8b38ec40ed3f85dabdee40ed4148f1748375bc2) +- Revert "Point to the correct file" [`05cdf0f`](https://github.com/ljharb/function-bind/commit/05cdf0fa205c6a3c5ba40bbedd1dfa9874f915c9) + +## [v1.1.1](https://github.com/ljharb/function-bind/compare/v1.1.0...v1.1.1) - 2017-08-28 + +### Commits + +- [Tests] up to `node` `v8`; newer npm breaks on older node; fix scripts [`817f7d2`](https://github.com/ljharb/function-bind/commit/817f7d28470fdbff8ef608d4d565dd4d1430bc5e) +- [Dev Deps] update `eslint`, `jscs`, `tape`, `@ljharb/eslint-config` [`854288b`](https://github.com/ljharb/function-bind/commit/854288b1b6f5c555f89aceb9eff1152510262084) +- [Dev Deps] update `tape`, `jscs`, `eslint`, `@ljharb/eslint-config` [`83e639f`](https://github.com/ljharb/function-bind/commit/83e639ff74e6cd6921285bccec22c1bcf72311bd) +- Only apps should have lockfiles [`5ed97f5`](https://github.com/ljharb/function-bind/commit/5ed97f51235c17774e0832e122abda0f3229c908) +- Use a SPDX-compliant “license” field. [`5feefea`](https://github.com/ljharb/function-bind/commit/5feefea0dc0193993e83e5df01ded424403a5381) + +## [v1.1.0](https://github.com/ljharb/function-bind/compare/v1.0.2...v1.1.0) - 2016-02-14 + +### Commits + +- Update `eslint`, `tape`; use my personal shared `eslint` config [`9c9062a`](https://github.com/ljharb/function-bind/commit/9c9062abbe9dd70b59ea2c3a3c3a81f29b457097) +- Add `npm run eslint` [`dd96c56`](https://github.com/ljharb/function-bind/commit/dd96c56720034a3c1ffee10b8a59a6f7c53e24ad) +- [New] return the native `bind` when available. [`82186e0`](https://github.com/ljharb/function-bind/commit/82186e03d73e580f95ff167e03f3582bed90ed72) +- [Dev Deps] update `tape`, `jscs`, `eslint`, `@ljharb/eslint-config` [`a3dd767`](https://github.com/ljharb/function-bind/commit/a3dd76720c795cb7f4586b0544efabf8aa107b8b) +- Update `eslint` [`3dae2f7`](https://github.com/ljharb/function-bind/commit/3dae2f7423de30a2d20313ddb1edc19660142fe9) +- Update `tape`, `covert`, `jscs` [`a181eee`](https://github.com/ljharb/function-bind/commit/a181eee0cfa24eb229c6e843a971f36e060a2f6a) +- [Tests] up to `node` `v5.6`, `v4.3` [`964929a`](https://github.com/ljharb/function-bind/commit/964929a6a4ddb36fb128de2bcc20af5e4f22e1ed) +- Test up to `io.js` `v2.1` [`2be7310`](https://github.com/ljharb/function-bind/commit/2be7310f2f74886a7124ca925be411117d41d5ea) +- Update `tape`, `jscs`, `eslint`, `@ljharb/eslint-config` [`45f3d68`](https://github.com/ljharb/function-bind/commit/45f3d6865c6ca93726abcef54febe009087af101) +- [Dev Deps] update `tape`, `jscs` [`6e1340d`](https://github.com/ljharb/function-bind/commit/6e1340d94642deaecad3e717825db641af4f8b1f) +- [Tests] up to `io.js` `v3.3`, `node` `v4.1` [`d9bad2b`](https://github.com/ljharb/function-bind/commit/d9bad2b778b1b3a6dd2876087b88b3acf319f8cc) +- Update `eslint` [`935590c`](https://github.com/ljharb/function-bind/commit/935590caa024ab356102e4858e8fc315b2ccc446) +- [Dev Deps] update `jscs`, `eslint`, `@ljharb/eslint-config` [`8c9a1ef`](https://github.com/ljharb/function-bind/commit/8c9a1efd848e5167887aa8501857a0940a480c57) +- Test on `io.js` `v2.2` [`9a3a38c`](https://github.com/ljharb/function-bind/commit/9a3a38c92013aed6e108666e7bd40969b84ac86e) +- Run `travis-ci` tests on `iojs` and `node` v0.12; speed up builds; allow 0.8 failures. [`69afc26`](https://github.com/ljharb/function-bind/commit/69afc2617405b147dd2a8d8ae73ca9e9283f18b4) +- [Dev Deps] Update `tape`, `eslint` [`36c1be0`](https://github.com/ljharb/function-bind/commit/36c1be0ab12b45fe5df6b0fdb01a5d5137fd0115) +- Update `tape`, `jscs` [`98d8303`](https://github.com/ljharb/function-bind/commit/98d8303cd5ca1c6b8f985469f86b0d44d7d45f6e) +- Update `jscs` [`9633a4e`](https://github.com/ljharb/function-bind/commit/9633a4e9fbf82051c240855166e468ba8ba0846f) +- Update `tape`, `jscs` [`c80ef0f`](https://github.com/ljharb/function-bind/commit/c80ef0f46efc9791e76fa50de4414092ac147831) +- Test up to `io.js` `v3.0` [`7e2c853`](https://github.com/ljharb/function-bind/commit/7e2c8537d52ab9cf5a655755561d8917684c0df4) +- Test on `io.js` `v2.4` [`5a199a2`](https://github.com/ljharb/function-bind/commit/5a199a27ba46795ba5eaf0845d07d4b8232895c9) +- Test on `io.js` `v2.3` [`a511b88`](https://github.com/ljharb/function-bind/commit/a511b8896de0bddf3b56862daa416c701f4d0453) +- Fixing a typo from 822b4e1938db02dc9584aa434fd3a45cb20caf43 [`732d6b6`](https://github.com/ljharb/function-bind/commit/732d6b63a9b33b45230e630dbcac7a10855d3266) +- Update `jscs` [`da52a48`](https://github.com/ljharb/function-bind/commit/da52a4886c06d6490f46ae30b15e4163ba08905d) +- Lock covert to v1.0.0. [`d6150fd`](https://github.com/ljharb/function-bind/commit/d6150fda1e6f486718ebdeff823333d9e48e7430) + +## [v1.0.2](https://github.com/ljharb/function-bind/compare/v1.0.1...v1.0.2) - 2014-10-04 + +## [v1.0.1](https://github.com/ljharb/function-bind/compare/v1.0.0...v1.0.1) - 2014-10-03 + +### Merged + +- make CI build faster [`#3`](https://github.com/ljharb/function-bind/pull/3) + +### Commits + +- Using my standard jscs.json [`d8ee94c`](https://github.com/ljharb/function-bind/commit/d8ee94c993eff0a84cf5744fe6a29627f5cffa1a) +- Adding `npm run lint` [`7571ab7`](https://github.com/ljharb/function-bind/commit/7571ab7dfdbd99b25a1dbb2d232622bd6f4f9c10) +- Using consistent indentation [`e91a1b1`](https://github.com/ljharb/function-bind/commit/e91a1b13a61e99ec1e530e299b55508f74218a95) +- Updating jscs [`7e17892`](https://github.com/ljharb/function-bind/commit/7e1789284bc629bc9c1547a61c9b227bbd8c7a65) +- Using consistent quotes [`c50b57f`](https://github.com/ljharb/function-bind/commit/c50b57fcd1c5ec38320979c837006069ebe02b77) +- Adding keywords [`cb94631`](https://github.com/ljharb/function-bind/commit/cb946314eed35f21186a25fb42fc118772f9ee00) +- Directly export a function expression instead of using a declaration, and relying on hoisting. [`5a33c5f`](https://github.com/ljharb/function-bind/commit/5a33c5f45642de180e0d207110bf7d1843ceb87c) +- Naming npm URL and badge in README; use SVG [`2aef8fc`](https://github.com/ljharb/function-bind/commit/2aef8fcb79d54e63a58ae557c4e60949e05d5e16) +- Naming deps URLs in README [`04228d7`](https://github.com/ljharb/function-bind/commit/04228d766670ee45ca24e98345c1f6a7621065b5) +- Naming travis-ci URLs in README; using SVG [`62c810c`](https://github.com/ljharb/function-bind/commit/62c810c2f54ced956cd4d4ab7b793055addfe36e) +- Make sure functions are invoked correctly (also passing coverage tests) [`2b289b4`](https://github.com/ljharb/function-bind/commit/2b289b4dfbf037ffcfa4dc95eb540f6165e9e43a) +- Removing the strict mode pragmas; they make tests fail. [`1aa701d`](https://github.com/ljharb/function-bind/commit/1aa701d199ddc3782476e8f7eef82679be97b845) +- Adding myself as a contributor [`85fd57b`](https://github.com/ljharb/function-bind/commit/85fd57b0860e5a7af42de9a287f3f265fc6d72fc) +- Adding strict mode pragmas [`915b08e`](https://github.com/ljharb/function-bind/commit/915b08e084c86a722eafe7245e21db74aa21ca4c) +- Adding devDeps URLs to README [`4ccc731`](https://github.com/ljharb/function-bind/commit/4ccc73112c1769859e4ca3076caf4086b3cba2cd) +- Fixing the description. [`a7a472c`](https://github.com/ljharb/function-bind/commit/a7a472cf649af515c635cf560fc478fbe48999c8) +- Using a function expression instead of a function declaration. [`b5d3e4e`](https://github.com/ljharb/function-bind/commit/b5d3e4ea6aaffc63888953eeb1fbc7ff45f1fa14) +- Updating tape [`f086be6`](https://github.com/ljharb/function-bind/commit/f086be6029fb56dde61a258c1340600fa174d1e0) +- Updating jscs [`5f9bdb3`](https://github.com/ljharb/function-bind/commit/5f9bdb375ab13ba48f30852aab94029520c54d71) +- Updating jscs [`9b409ba`](https://github.com/ljharb/function-bind/commit/9b409ba6118e23395a4e5d83ef39152aab9d3bfc) +- Run coverage as part of tests. [`8e1b6d4`](https://github.com/ljharb/function-bind/commit/8e1b6d459f047d1bd4fee814e01247c984c80bd0) +- Run linter as part of tests [`c1ca83f`](https://github.com/ljharb/function-bind/commit/c1ca83f832df94587d09e621beba682fabfaa987) +- Updating covert [`701e837`](https://github.com/ljharb/function-bind/commit/701e83774b57b4d3ef631e1948143f43a72f4bb9) + +## [v1.0.0](https://github.com/ljharb/function-bind/compare/v0.2.0...v1.0.0) - 2014-08-09 + +### Commits + +- Make sure old and unstable nodes don't fail Travis [`27adca3`](https://github.com/ljharb/function-bind/commit/27adca34a4ab6ad67b6dfde43942a1b103ce4d75) +- Fixing an issue when the bound function is called as a constructor in ES3. [`e20122d`](https://github.com/ljharb/function-bind/commit/e20122d267d92ce553859b280cbbea5d27c07731) +- Adding `npm run coverage` [`a2e29c4`](https://github.com/ljharb/function-bind/commit/a2e29c4ecaef9e2f6cd1603e868c139073375502) +- Updating tape [`b741168`](https://github.com/ljharb/function-bind/commit/b741168b12b235b1717ff696087645526b69213c) +- Upgrading tape [`63631a0`](https://github.com/ljharb/function-bind/commit/63631a04c7fbe97cc2fa61829cc27246d6986f74) +- Updating tape [`363cb46`](https://github.com/ljharb/function-bind/commit/363cb46dafb23cb3e347729a22f9448051d78464) + +## v0.2.0 - 2014-03-23 + +### Commits + +- Updating test coverage to match es5-shim. [`aa94d44`](https://github.com/ljharb/function-bind/commit/aa94d44b8f9d7f69f10e060db7709aa7a694e5d4) +- initial [`942ee07`](https://github.com/ljharb/function-bind/commit/942ee07e94e542d91798137bc4b80b926137e066) +- Setting the bound function's length properly. [`079f46a`](https://github.com/ljharb/function-bind/commit/079f46a2d3515b7c0b308c2c13fceb641f97ca25) +- Ensuring that some older browsers will throw when given a regex. [`36ac55b`](https://github.com/ljharb/function-bind/commit/36ac55b87f460d4330253c92870aa26fbfe8227f) +- Removing npm scripts that don't have dependencies [`9d2be60`](https://github.com/ljharb/function-bind/commit/9d2be600002cb8bc8606f8f3585ad3e05868c750) +- Updating tape [`297a4ac`](https://github.com/ljharb/function-bind/commit/297a4acc5464db381940aafb194d1c88f4e678f3) +- Skipping length tests for now. [`d9891ea`](https://github.com/ljharb/function-bind/commit/d9891ea4d2aaffa69f408339cdd61ff740f70565) +- don't take my tea [`dccd930`](https://github.com/ljharb/function-bind/commit/dccd930bfd60ea10cb178d28c97550c3bc8c1e07) diff --git a/node_modules/function-bind/LICENSE b/node_modules/function-bind/LICENSE new file mode 100644 index 0000000..62d6d23 --- /dev/null +++ b/node_modules/function-bind/LICENSE @@ -0,0 +1,20 @@ +Copyright (c) 2013 Raynos. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + diff --git a/node_modules/function-bind/README.md b/node_modules/function-bind/README.md new file mode 100644 index 0000000..814c20b --- /dev/null +++ b/node_modules/function-bind/README.md @@ -0,0 +1,46 @@ +# function-bind [![Version Badge][npm-version-svg]][package-url] + +[![github actions][actions-image]][actions-url] + +[![dependency status][deps-svg]][deps-url] +[![dev dependency status][dev-deps-svg]][dev-deps-url] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][npm-badge-png]][package-url] + +Implementation of function.prototype.bind + +Old versions of phantomjs, Internet Explorer < 9, and node < 0.6 don't support `Function.prototype.bind`. + +## Example + +```js +Function.prototype.bind = require("function-bind") +``` + +## Installation + +`npm install function-bind` + +## Contributors + + - Raynos + +## MIT Licenced + +[package-url]: https://npmjs.org/package/function-bind +[npm-version-svg]: https://versionbadg.es/Raynos/function-bind.svg +[deps-svg]: https://david-dm.org/Raynos/function-bind.svg +[deps-url]: https://david-dm.org/Raynos/function-bind +[dev-deps-svg]: https://david-dm.org/Raynos/function-bind/dev-status.svg +[dev-deps-url]: https://david-dm.org/Raynos/function-bind#info=devDependencies +[npm-badge-png]: https://nodei.co/npm/function-bind.png?downloads=true&stars=true +[license-image]: https://img.shields.io/npm/l/function-bind.svg +[license-url]: LICENSE +[downloads-image]: https://img.shields.io/npm/dm/function-bind.svg +[downloads-url]: https://npm-stat.com/charts.html?package=function-bind +[codecov-image]: https://codecov.io/gh/Raynos/function-bind/branch/main/graphs/badge.svg +[codecov-url]: https://app.codecov.io/gh/Raynos/function-bind/ +[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/Raynos/function-bind +[actions-url]: https://github.com/Raynos/function-bind/actions diff --git a/node_modules/function-bind/implementation.js b/node_modules/function-bind/implementation.js new file mode 100644 index 0000000..fd4384c --- /dev/null +++ b/node_modules/function-bind/implementation.js @@ -0,0 +1,84 @@ +'use strict'; + +/* eslint no-invalid-this: 1 */ + +var ERROR_MESSAGE = 'Function.prototype.bind called on incompatible '; +var toStr = Object.prototype.toString; +var max = Math.max; +var funcType = '[object Function]'; + +var concatty = function concatty(a, b) { + var arr = []; + + for (var i = 0; i < a.length; i += 1) { + arr[i] = a[i]; + } + for (var j = 0; j < b.length; j += 1) { + arr[j + a.length] = b[j]; + } + + return arr; +}; + +var slicy = function slicy(arrLike, offset) { + var arr = []; + for (var i = offset || 0, j = 0; i < arrLike.length; i += 1, j += 1) { + arr[j] = arrLike[i]; + } + return arr; +}; + +var joiny = function (arr, joiner) { + var str = ''; + for (var i = 0; i < arr.length; i += 1) { + str += arr[i]; + if (i + 1 < arr.length) { + str += joiner; + } + } + return str; +}; + +module.exports = function bind(that) { + var target = this; + if (typeof target !== 'function' || toStr.apply(target) !== funcType) { + throw new TypeError(ERROR_MESSAGE + target); + } + var args = slicy(arguments, 1); + + var bound; + var binder = function () { + if (this instanceof bound) { + var result = target.apply( + this, + concatty(args, arguments) + ); + if (Object(result) === result) { + return result; + } + return this; + } + return target.apply( + that, + concatty(args, arguments) + ); + + }; + + var boundLength = max(0, target.length - args.length); + var boundArgs = []; + for (var i = 0; i < boundLength; i++) { + boundArgs[i] = '$' + i; + } + + bound = Function('binder', 'return function (' + joiny(boundArgs, ',') + '){ return binder.apply(this,arguments); }')(binder); + + if (target.prototype) { + var Empty = function Empty() {}; + Empty.prototype = target.prototype; + bound.prototype = new Empty(); + Empty.prototype = null; + } + + return bound; +}; diff --git a/node_modules/function-bind/index.js b/node_modules/function-bind/index.js new file mode 100644 index 0000000..3bb6b96 --- /dev/null +++ b/node_modules/function-bind/index.js @@ -0,0 +1,5 @@ +'use strict'; + +var implementation = require('./implementation'); + +module.exports = Function.prototype.bind || implementation; diff --git a/node_modules/function-bind/package.json b/node_modules/function-bind/package.json new file mode 100644 index 0000000..6185963 --- /dev/null +++ b/node_modules/function-bind/package.json @@ -0,0 +1,87 @@ +{ + "name": "function-bind", + "version": "1.1.2", + "description": "Implementation of Function.prototype.bind", + "keywords": [ + "function", + "bind", + "shim", + "es5" + ], + "author": "Raynos ", + "repository": { + "type": "git", + "url": "https://github.com/Raynos/function-bind.git" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + }, + "main": "index", + "homepage": "https://github.com/Raynos/function-bind", + "contributors": [ + { + "name": "Raynos" + }, + { + "name": "Jordan Harband", + "url": "https://github.com/ljharb" + } + ], + "bugs": { + "url": "https://github.com/Raynos/function-bind/issues", + "email": "raynos2@gmail.com" + }, + "devDependencies": { + "@ljharb/eslint-config": "^21.1.0", + "aud": "^2.0.3", + "auto-changelog": "^2.4.0", + "eslint": "=8.8.0", + "in-publish": "^2.0.1", + "npmignore": "^0.3.0", + "nyc": "^10.3.2", + "safe-publish-latest": "^2.0.0", + "tape": "^5.7.1" + }, + "license": "MIT", + "scripts": { + "prepublishOnly": "safe-publish-latest", + "prepublish": "not-in-publish || npm run prepublishOnly", + "prepack": "npmignore --auto --commentLines=autogenerated", + "pretest": "npm run lint", + "test": "npm run tests-only", + "posttest": "aud --production", + "tests-only": "nyc tape 'test/**/*.js'", + "lint": "eslint --ext=js,mjs .", + "version": "auto-changelog && git add CHANGELOG.md", + "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" + }, + "testling": { + "files": "test/index.js", + "browsers": [ + "ie/8..latest", + "firefox/16..latest", + "firefox/nightly", + "chrome/22..latest", + "chrome/canary", + "opera/12..latest", + "opera/next", + "safari/5.1..latest", + "ipad/6.0..latest", + "iphone/6.0..latest", + "android-browser/4.2..latest" + ] + }, + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false, + "hideCredit": true + }, + "publishConfig": { + "ignore": [ + ".github/workflows" + ] + } +} diff --git a/node_modules/function-bind/test/.eslintrc b/node_modules/function-bind/test/.eslintrc new file mode 100644 index 0000000..8a56d5b --- /dev/null +++ b/node_modules/function-bind/test/.eslintrc @@ -0,0 +1,9 @@ +{ + "rules": { + "array-bracket-newline": 0, + "array-element-newline": 0, + "max-statements-per-line": [2, { "max": 2 }], + "no-invalid-this": 0, + "no-magic-numbers": 0, + } +} diff --git a/node_modules/function-bind/test/index.js b/node_modules/function-bind/test/index.js new file mode 100644 index 0000000..2edecce --- /dev/null +++ b/node_modules/function-bind/test/index.js @@ -0,0 +1,252 @@ +// jscs:disable requireUseStrict + +var test = require('tape'); + +var functionBind = require('../implementation'); +var getCurrentContext = function () { return this; }; + +test('functionBind is a function', function (t) { + t.equal(typeof functionBind, 'function'); + t.end(); +}); + +test('non-functions', function (t) { + var nonFunctions = [true, false, [], {}, 42, 'foo', NaN, /a/g]; + t.plan(nonFunctions.length); + for (var i = 0; i < nonFunctions.length; ++i) { + try { functionBind.call(nonFunctions[i]); } catch (ex) { + t.ok(ex instanceof TypeError, 'throws when given ' + String(nonFunctions[i])); + } + } + t.end(); +}); + +test('without a context', function (t) { + t.test('binds properly', function (st) { + var args, context; + var namespace = { + func: functionBind.call(function () { + args = Array.prototype.slice.call(arguments); + context = this; + }) + }; + namespace.func(1, 2, 3); + st.deepEqual(args, [1, 2, 3]); + st.equal(context, getCurrentContext.call()); + st.end(); + }); + + t.test('binds properly, and still supplies bound arguments', function (st) { + var args, context; + var namespace = { + func: functionBind.call(function () { + args = Array.prototype.slice.call(arguments); + context = this; + }, undefined, 1, 2, 3) + }; + namespace.func(4, 5, 6); + st.deepEqual(args, [1, 2, 3, 4, 5, 6]); + st.equal(context, getCurrentContext.call()); + st.end(); + }); + + t.test('returns properly', function (st) { + var args; + var namespace = { + func: functionBind.call(function () { + args = Array.prototype.slice.call(arguments); + return this; + }, null) + }; + var context = namespace.func(1, 2, 3); + st.equal(context, getCurrentContext.call(), 'returned context is namespaced context'); + st.deepEqual(args, [1, 2, 3], 'passed arguments are correct'); + st.end(); + }); + + t.test('returns properly with bound arguments', function (st) { + var args; + var namespace = { + func: functionBind.call(function () { + args = Array.prototype.slice.call(arguments); + return this; + }, null, 1, 2, 3) + }; + var context = namespace.func(4, 5, 6); + st.equal(context, getCurrentContext.call(), 'returned context is namespaced context'); + st.deepEqual(args, [1, 2, 3, 4, 5, 6], 'passed arguments are correct'); + st.end(); + }); + + t.test('called as a constructor', function (st) { + var thunkify = function (value) { + return function () { return value; }; + }; + st.test('returns object value', function (sst) { + var expectedReturnValue = [1, 2, 3]; + var Constructor = functionBind.call(thunkify(expectedReturnValue), null); + var result = new Constructor(); + sst.equal(result, expectedReturnValue); + sst.end(); + }); + + st.test('does not return primitive value', function (sst) { + var Constructor = functionBind.call(thunkify(42), null); + var result = new Constructor(); + sst.notEqual(result, 42); + sst.end(); + }); + + st.test('object from bound constructor is instance of original and bound constructor', function (sst) { + var A = function (x) { + this.name = x || 'A'; + }; + var B = functionBind.call(A, null, 'B'); + + var result = new B(); + sst.ok(result instanceof B, 'result is instance of bound constructor'); + sst.ok(result instanceof A, 'result is instance of original constructor'); + sst.end(); + }); + + st.end(); + }); + + t.end(); +}); + +test('with a context', function (t) { + t.test('with no bound arguments', function (st) { + var args, context; + var boundContext = {}; + var namespace = { + func: functionBind.call(function () { + args = Array.prototype.slice.call(arguments); + context = this; + }, boundContext) + }; + namespace.func(1, 2, 3); + st.equal(context, boundContext, 'binds a context properly'); + st.deepEqual(args, [1, 2, 3], 'supplies passed arguments'); + st.end(); + }); + + t.test('with bound arguments', function (st) { + var args, context; + var boundContext = {}; + var namespace = { + func: functionBind.call(function () { + args = Array.prototype.slice.call(arguments); + context = this; + }, boundContext, 1, 2, 3) + }; + namespace.func(4, 5, 6); + st.equal(context, boundContext, 'binds a context properly'); + st.deepEqual(args, [1, 2, 3, 4, 5, 6], 'supplies bound and passed arguments'); + st.end(); + }); + + t.test('returns properly', function (st) { + var boundContext = {}; + var args; + var namespace = { + func: functionBind.call(function () { + args = Array.prototype.slice.call(arguments); + return this; + }, boundContext) + }; + var context = namespace.func(1, 2, 3); + st.equal(context, boundContext, 'returned context is bound context'); + st.notEqual(context, getCurrentContext.call(), 'returned context is not lexical context'); + st.deepEqual(args, [1, 2, 3], 'passed arguments are correct'); + st.end(); + }); + + t.test('returns properly with bound arguments', function (st) { + var boundContext = {}; + var args; + var namespace = { + func: functionBind.call(function () { + args = Array.prototype.slice.call(arguments); + return this; + }, boundContext, 1, 2, 3) + }; + var context = namespace.func(4, 5, 6); + st.equal(context, boundContext, 'returned context is bound context'); + st.notEqual(context, getCurrentContext.call(), 'returned context is not lexical context'); + st.deepEqual(args, [1, 2, 3, 4, 5, 6], 'passed arguments are correct'); + st.end(); + }); + + t.test('passes the correct arguments when called as a constructor', function (st) { + var expected = { name: 'Correct' }; + var namespace = { + Func: functionBind.call(function (arg) { + return arg; + }, { name: 'Incorrect' }) + }; + var returned = new namespace.Func(expected); + st.equal(returned, expected, 'returns the right arg when called as a constructor'); + st.end(); + }); + + t.test('has the new instance\'s context when called as a constructor', function (st) { + var actualContext; + var expectedContext = { foo: 'bar' }; + var namespace = { + Func: functionBind.call(function () { + actualContext = this; + }, expectedContext) + }; + var result = new namespace.Func(); + st.equal(result instanceof namespace.Func, true); + st.notEqual(actualContext, expectedContext); + st.end(); + }); + + t.end(); +}); + +test('bound function length', function (t) { + t.test('sets a correct length without thisArg', function (st) { + var subject = functionBind.call(function (a, b, c) { return a + b + c; }); + st.equal(subject.length, 3); + st.equal(subject(1, 2, 3), 6); + st.end(); + }); + + t.test('sets a correct length with thisArg', function (st) { + var subject = functionBind.call(function (a, b, c) { return a + b + c; }, {}); + st.equal(subject.length, 3); + st.equal(subject(1, 2, 3), 6); + st.end(); + }); + + t.test('sets a correct length without thisArg and first argument', function (st) { + var subject = functionBind.call(function (a, b, c) { return a + b + c; }, undefined, 1); + st.equal(subject.length, 2); + st.equal(subject(2, 3), 6); + st.end(); + }); + + t.test('sets a correct length with thisArg and first argument', function (st) { + var subject = functionBind.call(function (a, b, c) { return a + b + c; }, {}, 1); + st.equal(subject.length, 2); + st.equal(subject(2, 3), 6); + st.end(); + }); + + t.test('sets a correct length without thisArg and too many arguments', function (st) { + var subject = functionBind.call(function (a, b, c) { return a + b + c; }, undefined, 1, 2, 3, 4); + st.equal(subject.length, 0); + st.equal(subject(), 6); + st.end(); + }); + + t.test('sets a correct length with thisArg and too many arguments', function (st) { + var subject = functionBind.call(function (a, b, c) { return a + b + c; }, {}, 1, 2, 3, 4); + st.equal(subject.length, 0); + st.equal(subject(), 6); + st.end(); + }); +}); diff --git a/node_modules/get-intrinsic/.eslintrc b/node_modules/get-intrinsic/.eslintrc new file mode 100644 index 0000000..235fb79 --- /dev/null +++ b/node_modules/get-intrinsic/.eslintrc @@ -0,0 +1,42 @@ +{ + "root": true, + + "extends": "@ljharb", + + "env": { + "es6": true, + "es2017": true, + "es2020": true, + "es2021": true, + "es2022": true, + }, + + "globals": { + "Float16Array": false, + }, + + "rules": { + "array-bracket-newline": 0, + "complexity": 0, + "eqeqeq": [2, "allow-null"], + "func-name-matching": 0, + "id-length": 0, + "max-lines": 0, + "max-lines-per-function": [2, 90], + "max-params": [2, 4], + "max-statements": 0, + "max-statements-per-line": [2, { "max": 2 }], + "multiline-comment-style": 0, + "no-magic-numbers": 0, + "sort-keys": 0, + }, + + "overrides": [ + { + "files": "test/**", + "rules": { + "new-cap": 0, + }, + }, + ], +} diff --git a/node_modules/get-intrinsic/.github/FUNDING.yml b/node_modules/get-intrinsic/.github/FUNDING.yml new file mode 100644 index 0000000..8e8da0d --- /dev/null +++ b/node_modules/get-intrinsic/.github/FUNDING.yml @@ -0,0 +1,12 @@ +# These are supported funding model platforms + +github: [ljharb] +patreon: # Replace with a single Patreon username +open_collective: # Replace with a single Open Collective username +ko_fi: # Replace with a single Ko-fi username +tidelift: npm/get-intrinsic +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +otechie: # Replace with a single Otechie username +custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/node_modules/get-intrinsic/.nycrc b/node_modules/get-intrinsic/.nycrc new file mode 100644 index 0000000..bdd626c --- /dev/null +++ b/node_modules/get-intrinsic/.nycrc @@ -0,0 +1,9 @@ +{ + "all": true, + "check-coverage": false, + "reporter": ["text-summary", "text", "html", "json"], + "exclude": [ + "coverage", + "test" + ] +} diff --git a/node_modules/get-intrinsic/CHANGELOG.md b/node_modules/get-intrinsic/CHANGELOG.md new file mode 100644 index 0000000..ce1dd98 --- /dev/null +++ b/node_modules/get-intrinsic/CHANGELOG.md @@ -0,0 +1,186 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [v1.3.0](https://github.com/ljharb/get-intrinsic/compare/v1.2.7...v1.3.0) - 2025-02-22 + +### Commits + +- [Dev Deps] update `es-abstract`, `es-value-fixtures`, `for-each`, `object-inspect` [`9b61553`](https://github.com/ljharb/get-intrinsic/commit/9b61553c587f1c1edbd435597e88c7d387da97dd) +- [Deps] update `call-bind-apply-helpers`, `es-object-atoms`, `get-proto` [`a341fee`](https://github.com/ljharb/get-intrinsic/commit/a341fee0f39a403b0f0069e82c97642d5eb11043) +- [New] add `Float16Array` [`de22116`](https://github.com/ljharb/get-intrinsic/commit/de22116b492fb989a0341bceb6e573abfaed73dc) + +## [v1.2.7](https://github.com/ljharb/get-intrinsic/compare/v1.2.6...v1.2.7) - 2025-01-02 + +### Commits + +- [Refactor] use `get-proto` directly [`00ab955`](https://github.com/ljharb/get-intrinsic/commit/00ab95546a0980c8ad42a84253daaa8d2adcedf9) +- [Deps] update `math-intrinsics` [`c716cdd`](https://github.com/ljharb/get-intrinsic/commit/c716cdd6bbe36b438057025561b8bb5a879ac8a0) +- [Dev Deps] update `call-bound`, `es-abstract` [`dc648a6`](https://github.com/ljharb/get-intrinsic/commit/dc648a67eb359037dff8d8619bfa71d86debccb1) + +## [v1.2.6](https://github.com/ljharb/get-intrinsic/compare/v1.2.5...v1.2.6) - 2024-12-11 + +### Commits + +- [Refactor] use `math-intrinsics` [`841be86`](https://github.com/ljharb/get-intrinsic/commit/841be8641a9254c4c75483b30c8871b5d5065926) +- [Refactor] use `es-object-atoms` [`42057df`](https://github.com/ljharb/get-intrinsic/commit/42057dfa16f66f64787e66482af381cc6f31d2c1) +- [Deps] update `call-bind-apply-helpers` [`45afa24`](https://github.com/ljharb/get-intrinsic/commit/45afa24a9ee4d6d3c172db1f555b16cb27843ef4) +- [Dev Deps] update `call-bound` [`9cba9c6`](https://github.com/ljharb/get-intrinsic/commit/9cba9c6e70212bc163b7a5529cb25df46071646f) + +## [v1.2.5](https://github.com/ljharb/get-intrinsic/compare/v1.2.4...v1.2.5) - 2024-12-06 + +### Commits + +- [actions] split out node 10-20, and 20+ [`6e2b9dd`](https://github.com/ljharb/get-intrinsic/commit/6e2b9dd23902665681ebe453256ccfe21d7966f0) +- [Refactor] use `dunder-proto` and `call-bind-apply-helpers` instead of `has-proto` [`c095d17`](https://github.com/ljharb/get-intrinsic/commit/c095d179ad0f4fbfff20c8a3e0cb4fe668018998) +- [Refactor] use `gopd` [`9841d5b`](https://github.com/ljharb/get-intrinsic/commit/9841d5b35f7ab4fd2d193f0c741a50a077920e90) +- [Dev Deps] update `@ljharb/eslint-config`, `auto-changelog`, `es-abstract`, `es-value-fixtures`, `gopd`, `mock-property`, `object-inspect`, `tape` [`2d07e01`](https://github.com/ljharb/get-intrinsic/commit/2d07e01310cee2cbaedfead6903df128b1f5d425) +- [Deps] update `gopd`, `has-proto`, `has-symbols`, `hasown` [`974d8bf`](https://github.com/ljharb/get-intrinsic/commit/974d8bf5baad7939eef35c25cc1dd88c10a30fa6) +- [Dev Deps] update `call-bind`, `es-abstract`, `tape` [`df9dde1`](https://github.com/ljharb/get-intrinsic/commit/df9dde178186631ab8a3165ede056549918ce4bc) +- [Refactor] cache `es-define-property` as well [`43ef543`](https://github.com/ljharb/get-intrinsic/commit/43ef543cb02194401420e3a914a4ca9168691926) +- [Deps] update `has-proto`, `has-symbols`, `hasown` [`ad4949d`](https://github.com/ljharb/get-intrinsic/commit/ad4949d5467316505aad89bf75f9417ed782f7af) +- [Tests] use `call-bound` directly [`ad5c406`](https://github.com/ljharb/get-intrinsic/commit/ad5c4069774bfe90e520a35eead5fe5ca9d69e80) +- [Deps] update `has-proto`, `hasown` [`45414ca`](https://github.com/ljharb/get-intrinsic/commit/45414caa312333a2798953682c68f85c550627dd) +- [Tests] replace `aud` with `npm audit` [`18d3509`](https://github.com/ljharb/get-intrinsic/commit/18d3509f79460e7924da70409ee81e5053087523) +- [Deps] update `es-define-property` [`aadaa3b`](https://github.com/ljharb/get-intrinsic/commit/aadaa3b2188d77ad9bff394ce5d4249c49eb21f5) +- [Dev Deps] add missing peer dep [`c296a16`](https://github.com/ljharb/get-intrinsic/commit/c296a16246d0c9a5981944f4cc5cf61fbda0cf6a) + +## [v1.2.4](https://github.com/ljharb/get-intrinsic/compare/v1.2.3...v1.2.4) - 2024-02-05 + +### Commits + +- [Refactor] use all 7 <+ ES6 Errors from `es-errors` [`bcac811`](https://github.com/ljharb/get-intrinsic/commit/bcac811abdc1c982e12abf848a410d6aae148d14) + +## [v1.2.3](https://github.com/ljharb/get-intrinsic/compare/v1.2.2...v1.2.3) - 2024-02-03 + +### Commits + +- [Refactor] use `es-errors`, so things that only need those do not need `get-intrinsic` [`f11db9c`](https://github.com/ljharb/get-intrinsic/commit/f11db9c4fb97d87bbd53d3c73ac6b3db3613ad3b) +- [Dev Deps] update `aud`, `es-abstract`, `mock-property`, `npmignore` [`b7ac7d1`](https://github.com/ljharb/get-intrinsic/commit/b7ac7d1616fefb03877b1aed0c8f8d61aad32b6c) +- [meta] simplify `exports` [`faa0cc6`](https://github.com/ljharb/get-intrinsic/commit/faa0cc618e2830ffb51a8202490b0c215d965cbc) +- [meta] add missing `engines.node` [`774dd0b`](https://github.com/ljharb/get-intrinsic/commit/774dd0b3e8f741c3f05a6322d124d6087f146af1) +- [Dev Deps] update `tape` [`5828e8e`](https://github.com/ljharb/get-intrinsic/commit/5828e8e4a04e69312e87a36c0ea39428a7a4c3d8) +- [Robustness] use null objects for lookups [`eb9a11f`](https://github.com/ljharb/get-intrinsic/commit/eb9a11fa9eb3e13b193fcc05a7fb814341b1a7b7) +- [meta] add `sideEffects` flag [`89bcc7a`](https://github.com/ljharb/get-intrinsic/commit/89bcc7a42e19bf07b7c21e3094d5ab177109e6d2) + +## [v1.2.2](https://github.com/ljharb/get-intrinsic/compare/v1.2.1...v1.2.2) - 2023-10-20 + +### Commits + +- [Dev Deps] update `@ljharb/eslint-config`, `aud`, `call-bind`, `es-abstract`, `mock-property`, `object-inspect`, `tape` [`f51bcf2`](https://github.com/ljharb/get-intrinsic/commit/f51bcf26412d58d17ce17c91c9afd0ad271f0762) +- [Refactor] use `hasown` instead of `has` [`18d14b7`](https://github.com/ljharb/get-intrinsic/commit/18d14b799bea6b5765e1cec91890830cbcdb0587) +- [Deps] update `function-bind` [`6e109c8`](https://github.com/ljharb/get-intrinsic/commit/6e109c81e03804cc5e7824fb64353cdc3d8ee2c7) + +## [v1.2.1](https://github.com/ljharb/get-intrinsic/compare/v1.2.0...v1.2.1) - 2023-05-13 + +### Commits + +- [Fix] avoid a crash in envs without `__proto__` [`7bad8d0`](https://github.com/ljharb/get-intrinsic/commit/7bad8d061bf8721733b58b73a2565af2b6756b64) +- [Dev Deps] update `es-abstract` [`c60e6b7`](https://github.com/ljharb/get-intrinsic/commit/c60e6b7b4cf9660c7f27ed970970fd55fac48dc5) + +## [v1.2.0](https://github.com/ljharb/get-intrinsic/compare/v1.1.3...v1.2.0) - 2023-01-19 + +### Commits + +- [actions] update checkout action [`ca6b12f`](https://github.com/ljharb/get-intrinsic/commit/ca6b12f31eaacea4ea3b055e744cd61623385ffb) +- [Dev Deps] update `@ljharb/eslint-config`, `es-abstract`, `object-inspect`, `tape` [`41a3727`](https://github.com/ljharb/get-intrinsic/commit/41a3727d0026fa04273ae216a5f8e12eefd72da8) +- [Fix] ensure `Error.prototype` is undeniable [`c511e97`](https://github.com/ljharb/get-intrinsic/commit/c511e97ae99c764c4524b540dee7a70757af8da3) +- [Dev Deps] update `aud`, `es-abstract`, `tape` [`1bef8a8`](https://github.com/ljharb/get-intrinsic/commit/1bef8a8fd439ebb80863199b6189199e0851ac67) +- [Dev Deps] update `aud`, `es-abstract` [`0d41f16`](https://github.com/ljharb/get-intrinsic/commit/0d41f16bcd500bc28b7bfc98043ebf61ea081c26) +- [New] add `BigInt64Array` and `BigUint64Array` [`a6cca25`](https://github.com/ljharb/get-intrinsic/commit/a6cca25f29635889b7e9bd669baf9e04be90e48c) +- [Tests] use `gopd` [`ecf7722`](https://github.com/ljharb/get-intrinsic/commit/ecf7722240d15cfd16edda06acf63359c10fb9bd) + +## [v1.1.3](https://github.com/ljharb/get-intrinsic/compare/v1.1.2...v1.1.3) - 2022-09-12 + +### Commits + +- [Dev Deps] update `es-abstract`, `es-value-fixtures`, `tape` [`07ff291`](https://github.com/ljharb/get-intrinsic/commit/07ff291816406ebe5a12d7f16965bde0942dd688) +- [Fix] properly check for % signs [`50ac176`](https://github.com/ljharb/get-intrinsic/commit/50ac1760fe99c227e64eabde76e9c0e44cd881b5) + +## [v1.1.2](https://github.com/ljharb/get-intrinsic/compare/v1.1.1...v1.1.2) - 2022-06-08 + +### Fixed + +- [Fix] properly validate against extra % signs [`#16`](https://github.com/ljharb/get-intrinsic/issues/16) + +### Commits + +- [actions] reuse common workflows [`0972547`](https://github.com/ljharb/get-intrinsic/commit/0972547efd0abc863fe4c445a6ca7eb4f8c6901d) +- [meta] use `npmignore` to autogenerate an npmignore file [`5ba0b51`](https://github.com/ljharb/get-intrinsic/commit/5ba0b51d8d8d4f1c31d426d74abc0770fd106bad) +- [actions] use `node/install` instead of `node/run`; use `codecov` action [`c364492`](https://github.com/ljharb/get-intrinsic/commit/c364492af4af51333e6f81c0bf21fd3d602c3661) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `es-abstract`, `object-inspect`, `tape` [`dc04dad`](https://github.com/ljharb/get-intrinsic/commit/dc04dad86f6e5608775a2640cb0db5927ae29ed9) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `es-abstract`, `object-inspect`, `safe-publish-latest`, `tape` [`1c14059`](https://github.com/ljharb/get-intrinsic/commit/1c1405984e86dd2dc9366c15d8a0294a96a146a5) +- [Tests] use `mock-property` [`b396ef0`](https://github.com/ljharb/get-intrinsic/commit/b396ef05bb73b1d699811abd64b0d9b97997fdda) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `object-inspect`, `tape` [`c2c758d`](https://github.com/ljharb/get-intrinsic/commit/c2c758d3b90af4fef0a76910d8d3c292ec8d1d3e) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `es-abstract`, `es-value-fixtures`, `object-inspect`, `tape` [`29e3c09`](https://github.com/ljharb/get-intrinsic/commit/29e3c091c2bf3e17099969847e8729d0e46896de) +- [actions] update codecov uploader [`8cbc141`](https://github.com/ljharb/get-intrinsic/commit/8cbc1418940d7a8941f3a7985cbc4ac095c5e13d) +- [Dev Deps] update `@ljharb/eslint-config`, `es-abstract`, `es-value-fixtures`, `object-inspect`, `tape` [`10b6f5c`](https://github.com/ljharb/get-intrinsic/commit/10b6f5c02593fb3680c581d696ac124e30652932) +- [readme] add github actions/codecov badges [`4e25400`](https://github.com/ljharb/get-intrinsic/commit/4e25400d9f51ae9eb059cbe22d9144e70ea214e8) +- [Tests] use `for-each` instead of `foreach` [`c05b957`](https://github.com/ljharb/get-intrinsic/commit/c05b957ad9a7bc7721af7cc9e9be1edbfe057496) +- [Dev Deps] update `es-abstract` [`29b05ae`](https://github.com/ljharb/get-intrinsic/commit/29b05aec3e7330e9ad0b8e0f685a9112c20cdd97) +- [meta] use `prepublishOnly` script for npm 7+ [`95c285d`](https://github.com/ljharb/get-intrinsic/commit/95c285da810516057d3bbfa871176031af38f05d) +- [Deps] update `has-symbols` [`593cb4f`](https://github.com/ljharb/get-intrinsic/commit/593cb4fb38e7922e40e42c183f45274b636424cd) +- [readme] fix repo URLs [`1c8305b`](https://github.com/ljharb/get-intrinsic/commit/1c8305b5365827c9b6fc785434aac0e1328ff2f5) +- [Deps] update `has-symbols` [`c7138b6`](https://github.com/ljharb/get-intrinsic/commit/c7138b6c6d73132d859471fb8c13304e1e7c8b20) +- [Dev Deps] remove unused `has-bigints` [`bd63aff`](https://github.com/ljharb/get-intrinsic/commit/bd63aff6ad8f3a986c557fcda2914187bdaab359) + +## [v1.1.1](https://github.com/ljharb/get-intrinsic/compare/v1.1.0...v1.1.1) - 2021-02-03 + +### Fixed + +- [meta] export `./package.json` [`#9`](https://github.com/ljharb/get-intrinsic/issues/9) + +### Commits + +- [readme] flesh out the readme; use `evalmd` [`d12f12c`](https://github.com/ljharb/get-intrinsic/commit/d12f12c15345a0a0772cc65a7c64369529abd614) +- [eslint] set up proper globals config [`5a8c098`](https://github.com/ljharb/get-intrinsic/commit/5a8c0984e3319d1ac0e64b102f8ec18b64e79f36) +- [Dev Deps] update `eslint` [`7b9a5c0`](https://github.com/ljharb/get-intrinsic/commit/7b9a5c0d31a90ca1a1234181c74988fb046701cd) + +## [v1.1.0](https://github.com/ljharb/get-intrinsic/compare/v1.0.2...v1.1.0) - 2021-01-25 + +### Fixed + +- [Refactor] delay `Function` eval until syntax-derived values are requested [`#3`](https://github.com/ljharb/get-intrinsic/issues/3) + +### Commits + +- [Tests] migrate tests to Github Actions [`2ab762b`](https://github.com/ljharb/get-intrinsic/commit/2ab762b48164aea8af37a40ba105bbc8246ab8c4) +- [meta] do not publish github action workflow files [`5e7108e`](https://github.com/ljharb/get-intrinsic/commit/5e7108e4768b244d48d9567ba4f8a6cab9c65b8e) +- [Tests] add some coverage [`01ac7a8`](https://github.com/ljharb/get-intrinsic/commit/01ac7a87ac29738567e8524cd8c9e026b1fa8cb3) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `call-bind`, `es-abstract`, `tape`; add `call-bind` [`911b672`](https://github.com/ljharb/get-intrinsic/commit/911b672fbffae433a96924c6ce013585e425f4b7) +- [Refactor] rearrange evalled constructors a bit [`7e7e4bf`](https://github.com/ljharb/get-intrinsic/commit/7e7e4bf583f3799c8ac1c6c5e10d2cb553957347) +- [meta] add Automatic Rebase and Require Allow Edits workflows [`0199968`](https://github.com/ljharb/get-intrinsic/commit/01999687a263ffce0a3cb011dfbcb761754aedbc) + +## [v1.0.2](https://github.com/ljharb/get-intrinsic/compare/v1.0.1...v1.0.2) - 2020-12-17 + +### Commits + +- [Fix] Throw for non‑existent intrinsics [`68f873b`](https://github.com/ljharb/get-intrinsic/commit/68f873b013c732a05ad6f5fc54f697e55515461b) +- [Fix] Throw for non‑existent segments in the intrinsic path [`8325dee`](https://github.com/ljharb/get-intrinsic/commit/8325deee43128f3654d3399aa9591741ebe17b21) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `has-bigints`, `object-inspect` [`0c227a7`](https://github.com/ljharb/get-intrinsic/commit/0c227a7d8b629166f25715fd242553892e458525) +- [meta] do not lint coverage output [`70d2419`](https://github.com/ljharb/get-intrinsic/commit/70d24199b620043cd9110fc5f426d214ebe21dc9) + +## [v1.0.1](https://github.com/ljharb/get-intrinsic/compare/v1.0.0...v1.0.1) - 2020-10-30 + +### Commits + +- [Tests] gather coverage data on every job [`d1d280d`](https://github.com/ljharb/get-intrinsic/commit/d1d280dec714e3f0519cc877dbcb193057d9cac6) +- [Fix] add missing dependencies [`5031771`](https://github.com/ljharb/get-intrinsic/commit/5031771bb1095b38be88ce7c41d5de88718e432e) +- [Tests] use `es-value-fixtures` [`af48765`](https://github.com/ljharb/get-intrinsic/commit/af48765a23c5323fb0b6b38dbf00eb5099c7bebc) + +## v1.0.0 - 2020-10-29 + +### Commits + +- Implementation [`bbce57c`](https://github.com/ljharb/get-intrinsic/commit/bbce57c6f33d05b2d8d3efa273ceeb3ee01127bb) +- Tests [`17b4f0d`](https://github.com/ljharb/get-intrinsic/commit/17b4f0d56dea6b4059b56fc30ef3ee4d9500ebc2) +- Initial commit [`3153294`](https://github.com/ljharb/get-intrinsic/commit/31532948de363b0a27dd9fd4649e7b7028ec4b44) +- npm init [`fb326c4`](https://github.com/ljharb/get-intrinsic/commit/fb326c4d2817c8419ec31de1295f06bb268a7902) +- [meta] add Automatic Rebase and Require Allow Edits workflows [`48862fb`](https://github.com/ljharb/get-intrinsic/commit/48862fb2508c8f6a57968e6d08b7c883afc9d550) +- [meta] add `auto-changelog` [`5f28ad0`](https://github.com/ljharb/get-intrinsic/commit/5f28ad019e060a353d8028f9f2591a9cc93074a1) +- [meta] add "funding"; create `FUNDING.yml` [`c2bbdde`](https://github.com/ljharb/get-intrinsic/commit/c2bbddeba73a875be61484ee4680b129a6d4e0a1) +- [Tests] add `npm run lint` [`0a84b98`](https://github.com/ljharb/get-intrinsic/commit/0a84b98b22b7cf7a748666f705b0003a493c35fd) +- Only apps should have lockfiles [`9586c75`](https://github.com/ljharb/get-intrinsic/commit/9586c75866c1ee678e4d5d4dbbdef6997e511b05) diff --git a/node_modules/get-intrinsic/LICENSE b/node_modules/get-intrinsic/LICENSE new file mode 100644 index 0000000..48f05d0 --- /dev/null +++ b/node_modules/get-intrinsic/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2020 Jordan Harband + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/get-intrinsic/README.md b/node_modules/get-intrinsic/README.md new file mode 100644 index 0000000..3aa0bba --- /dev/null +++ b/node_modules/get-intrinsic/README.md @@ -0,0 +1,71 @@ +# get-intrinsic [![Version Badge][npm-version-svg]][package-url] + +[![github actions][actions-image]][actions-url] +[![coverage][codecov-image]][codecov-url] +[![dependency status][deps-svg]][deps-url] +[![dev dependency status][dev-deps-svg]][dev-deps-url] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][npm-badge-png]][package-url] + +Get and robustly cache all JS language-level intrinsics at first require time. + +See the syntax described [in the JS spec](https://tc39.es/ecma262/#sec-well-known-intrinsic-objects) for reference. + +## Example + +```js +var GetIntrinsic = require('get-intrinsic'); +var assert = require('assert'); + +// static methods +assert.equal(GetIntrinsic('%Math.pow%'), Math.pow); +assert.equal(Math.pow(2, 3), 8); +assert.equal(GetIntrinsic('%Math.pow%')(2, 3), 8); +delete Math.pow; +assert.equal(GetIntrinsic('%Math.pow%')(2, 3), 8); + +// instance methods +var arr = [1]; +assert.equal(GetIntrinsic('%Array.prototype.push%'), Array.prototype.push); +assert.deepEqual(arr, [1]); + +arr.push(2); +assert.deepEqual(arr, [1, 2]); + +GetIntrinsic('%Array.prototype.push%').call(arr, 3); +assert.deepEqual(arr, [1, 2, 3]); + +delete Array.prototype.push; +GetIntrinsic('%Array.prototype.push%').call(arr, 4); +assert.deepEqual(arr, [1, 2, 3, 4]); + +// missing features +delete JSON.parse; // to simulate a real intrinsic that is missing in the environment +assert.throws(() => GetIntrinsic('%JSON.parse%')); +assert.equal(undefined, GetIntrinsic('%JSON.parse%', true)); +``` + +## Tests +Simply clone the repo, `npm install`, and run `npm test` + +## Security + +Please email [@ljharb](https://github.com/ljharb) or see https://tidelift.com/security if you have a potential security vulnerability to report. + +[package-url]: https://npmjs.org/package/get-intrinsic +[npm-version-svg]: https://versionbadg.es/ljharb/get-intrinsic.svg +[deps-svg]: https://david-dm.org/ljharb/get-intrinsic.svg +[deps-url]: https://david-dm.org/ljharb/get-intrinsic +[dev-deps-svg]: https://david-dm.org/ljharb/get-intrinsic/dev-status.svg +[dev-deps-url]: https://david-dm.org/ljharb/get-intrinsic#info=devDependencies +[npm-badge-png]: https://nodei.co/npm/get-intrinsic.png?downloads=true&stars=true +[license-image]: https://img.shields.io/npm/l/get-intrinsic.svg +[license-url]: LICENSE +[downloads-image]: https://img.shields.io/npm/dm/get-intrinsic.svg +[downloads-url]: https://npm-stat.com/charts.html?package=get-intrinsic +[codecov-image]: https://codecov.io/gh/ljharb/get-intrinsic/branch/main/graphs/badge.svg +[codecov-url]: https://app.codecov.io/gh/ljharb/get-intrinsic/ +[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/ljharb/get-intrinsic +[actions-url]: https://github.com/ljharb/get-intrinsic/actions diff --git a/node_modules/get-intrinsic/index.js b/node_modules/get-intrinsic/index.js new file mode 100644 index 0000000..bd1d94b --- /dev/null +++ b/node_modules/get-intrinsic/index.js @@ -0,0 +1,378 @@ +'use strict'; + +var undefined; + +var $Object = require('es-object-atoms'); + +var $Error = require('es-errors'); +var $EvalError = require('es-errors/eval'); +var $RangeError = require('es-errors/range'); +var $ReferenceError = require('es-errors/ref'); +var $SyntaxError = require('es-errors/syntax'); +var $TypeError = require('es-errors/type'); +var $URIError = require('es-errors/uri'); + +var abs = require('math-intrinsics/abs'); +var floor = require('math-intrinsics/floor'); +var max = require('math-intrinsics/max'); +var min = require('math-intrinsics/min'); +var pow = require('math-intrinsics/pow'); +var round = require('math-intrinsics/round'); +var sign = require('math-intrinsics/sign'); + +var $Function = Function; + +// eslint-disable-next-line consistent-return +var getEvalledConstructor = function (expressionSyntax) { + try { + return $Function('"use strict"; return (' + expressionSyntax + ').constructor;')(); + } catch (e) {} +}; + +var $gOPD = require('gopd'); +var $defineProperty = require('es-define-property'); + +var throwTypeError = function () { + throw new $TypeError(); +}; +var ThrowTypeError = $gOPD + ? (function () { + try { + // eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties + arguments.callee; // IE 8 does not throw here + return throwTypeError; + } catch (calleeThrows) { + try { + // IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '') + return $gOPD(arguments, 'callee').get; + } catch (gOPDthrows) { + return throwTypeError; + } + } + }()) + : throwTypeError; + +var hasSymbols = require('has-symbols')(); + +var getProto = require('get-proto'); +var $ObjectGPO = require('get-proto/Object.getPrototypeOf'); +var $ReflectGPO = require('get-proto/Reflect.getPrototypeOf'); + +var $apply = require('call-bind-apply-helpers/functionApply'); +var $call = require('call-bind-apply-helpers/functionCall'); + +var needsEval = {}; + +var TypedArray = typeof Uint8Array === 'undefined' || !getProto ? undefined : getProto(Uint8Array); + +var INTRINSICS = { + __proto__: null, + '%AggregateError%': typeof AggregateError === 'undefined' ? undefined : AggregateError, + '%Array%': Array, + '%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer, + '%ArrayIteratorPrototype%': hasSymbols && getProto ? getProto([][Symbol.iterator]()) : undefined, + '%AsyncFromSyncIteratorPrototype%': undefined, + '%AsyncFunction%': needsEval, + '%AsyncGenerator%': needsEval, + '%AsyncGeneratorFunction%': needsEval, + '%AsyncIteratorPrototype%': needsEval, + '%Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics, + '%BigInt%': typeof BigInt === 'undefined' ? undefined : BigInt, + '%BigInt64Array%': typeof BigInt64Array === 'undefined' ? undefined : BigInt64Array, + '%BigUint64Array%': typeof BigUint64Array === 'undefined' ? undefined : BigUint64Array, + '%Boolean%': Boolean, + '%DataView%': typeof DataView === 'undefined' ? undefined : DataView, + '%Date%': Date, + '%decodeURI%': decodeURI, + '%decodeURIComponent%': decodeURIComponent, + '%encodeURI%': encodeURI, + '%encodeURIComponent%': encodeURIComponent, + '%Error%': $Error, + '%eval%': eval, // eslint-disable-line no-eval + '%EvalError%': $EvalError, + '%Float16Array%': typeof Float16Array === 'undefined' ? undefined : Float16Array, + '%Float32Array%': typeof Float32Array === 'undefined' ? undefined : Float32Array, + '%Float64Array%': typeof Float64Array === 'undefined' ? undefined : Float64Array, + '%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined : FinalizationRegistry, + '%Function%': $Function, + '%GeneratorFunction%': needsEval, + '%Int8Array%': typeof Int8Array === 'undefined' ? undefined : Int8Array, + '%Int16Array%': typeof Int16Array === 'undefined' ? undefined : Int16Array, + '%Int32Array%': typeof Int32Array === 'undefined' ? undefined : Int32Array, + '%isFinite%': isFinite, + '%isNaN%': isNaN, + '%IteratorPrototype%': hasSymbols && getProto ? getProto(getProto([][Symbol.iterator]())) : undefined, + '%JSON%': typeof JSON === 'object' ? JSON : undefined, + '%Map%': typeof Map === 'undefined' ? undefined : Map, + '%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Map()[Symbol.iterator]()), + '%Math%': Math, + '%Number%': Number, + '%Object%': $Object, + '%Object.getOwnPropertyDescriptor%': $gOPD, + '%parseFloat%': parseFloat, + '%parseInt%': parseInt, + '%Promise%': typeof Promise === 'undefined' ? undefined : Promise, + '%Proxy%': typeof Proxy === 'undefined' ? undefined : Proxy, + '%RangeError%': $RangeError, + '%ReferenceError%': $ReferenceError, + '%Reflect%': typeof Reflect === 'undefined' ? undefined : Reflect, + '%RegExp%': RegExp, + '%Set%': typeof Set === 'undefined' ? undefined : Set, + '%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Set()[Symbol.iterator]()), + '%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer, + '%String%': String, + '%StringIteratorPrototype%': hasSymbols && getProto ? getProto(''[Symbol.iterator]()) : undefined, + '%Symbol%': hasSymbols ? Symbol : undefined, + '%SyntaxError%': $SyntaxError, + '%ThrowTypeError%': ThrowTypeError, + '%TypedArray%': TypedArray, + '%TypeError%': $TypeError, + '%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array, + '%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray, + '%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array, + '%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array, + '%URIError%': $URIError, + '%WeakMap%': typeof WeakMap === 'undefined' ? undefined : WeakMap, + '%WeakRef%': typeof WeakRef === 'undefined' ? undefined : WeakRef, + '%WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet, + + '%Function.prototype.call%': $call, + '%Function.prototype.apply%': $apply, + '%Object.defineProperty%': $defineProperty, + '%Object.getPrototypeOf%': $ObjectGPO, + '%Math.abs%': abs, + '%Math.floor%': floor, + '%Math.max%': max, + '%Math.min%': min, + '%Math.pow%': pow, + '%Math.round%': round, + '%Math.sign%': sign, + '%Reflect.getPrototypeOf%': $ReflectGPO +}; + +if (getProto) { + try { + null.error; // eslint-disable-line no-unused-expressions + } catch (e) { + // https://github.com/tc39/proposal-shadowrealm/pull/384#issuecomment-1364264229 + var errorProto = getProto(getProto(e)); + INTRINSICS['%Error.prototype%'] = errorProto; + } +} + +var doEval = function doEval(name) { + var value; + if (name === '%AsyncFunction%') { + value = getEvalledConstructor('async function () {}'); + } else if (name === '%GeneratorFunction%') { + value = getEvalledConstructor('function* () {}'); + } else if (name === '%AsyncGeneratorFunction%') { + value = getEvalledConstructor('async function* () {}'); + } else if (name === '%AsyncGenerator%') { + var fn = doEval('%AsyncGeneratorFunction%'); + if (fn) { + value = fn.prototype; + } + } else if (name === '%AsyncIteratorPrototype%') { + var gen = doEval('%AsyncGenerator%'); + if (gen && getProto) { + value = getProto(gen.prototype); + } + } + + INTRINSICS[name] = value; + + return value; +}; + +var LEGACY_ALIASES = { + __proto__: null, + '%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'], + '%ArrayPrototype%': ['Array', 'prototype'], + '%ArrayProto_entries%': ['Array', 'prototype', 'entries'], + '%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'], + '%ArrayProto_keys%': ['Array', 'prototype', 'keys'], + '%ArrayProto_values%': ['Array', 'prototype', 'values'], + '%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'], + '%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'], + '%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'], + '%BooleanPrototype%': ['Boolean', 'prototype'], + '%DataViewPrototype%': ['DataView', 'prototype'], + '%DatePrototype%': ['Date', 'prototype'], + '%ErrorPrototype%': ['Error', 'prototype'], + '%EvalErrorPrototype%': ['EvalError', 'prototype'], + '%Float32ArrayPrototype%': ['Float32Array', 'prototype'], + '%Float64ArrayPrototype%': ['Float64Array', 'prototype'], + '%FunctionPrototype%': ['Function', 'prototype'], + '%Generator%': ['GeneratorFunction', 'prototype'], + '%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'], + '%Int8ArrayPrototype%': ['Int8Array', 'prototype'], + '%Int16ArrayPrototype%': ['Int16Array', 'prototype'], + '%Int32ArrayPrototype%': ['Int32Array', 'prototype'], + '%JSONParse%': ['JSON', 'parse'], + '%JSONStringify%': ['JSON', 'stringify'], + '%MapPrototype%': ['Map', 'prototype'], + '%NumberPrototype%': ['Number', 'prototype'], + '%ObjectPrototype%': ['Object', 'prototype'], + '%ObjProto_toString%': ['Object', 'prototype', 'toString'], + '%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'], + '%PromisePrototype%': ['Promise', 'prototype'], + '%PromiseProto_then%': ['Promise', 'prototype', 'then'], + '%Promise_all%': ['Promise', 'all'], + '%Promise_reject%': ['Promise', 'reject'], + '%Promise_resolve%': ['Promise', 'resolve'], + '%RangeErrorPrototype%': ['RangeError', 'prototype'], + '%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'], + '%RegExpPrototype%': ['RegExp', 'prototype'], + '%SetPrototype%': ['Set', 'prototype'], + '%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'], + '%StringPrototype%': ['String', 'prototype'], + '%SymbolPrototype%': ['Symbol', 'prototype'], + '%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'], + '%TypedArrayPrototype%': ['TypedArray', 'prototype'], + '%TypeErrorPrototype%': ['TypeError', 'prototype'], + '%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'], + '%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'], + '%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'], + '%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'], + '%URIErrorPrototype%': ['URIError', 'prototype'], + '%WeakMapPrototype%': ['WeakMap', 'prototype'], + '%WeakSetPrototype%': ['WeakSet', 'prototype'] +}; + +var bind = require('function-bind'); +var hasOwn = require('hasown'); +var $concat = bind.call($call, Array.prototype.concat); +var $spliceApply = bind.call($apply, Array.prototype.splice); +var $replace = bind.call($call, String.prototype.replace); +var $strSlice = bind.call($call, String.prototype.slice); +var $exec = bind.call($call, RegExp.prototype.exec); + +/* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */ +var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g; +var reEscapeChar = /\\(\\)?/g; /** Used to match backslashes in property paths. */ +var stringToPath = function stringToPath(string) { + var first = $strSlice(string, 0, 1); + var last = $strSlice(string, -1); + if (first === '%' && last !== '%') { + throw new $SyntaxError('invalid intrinsic syntax, expected closing `%`'); + } else if (last === '%' && first !== '%') { + throw new $SyntaxError('invalid intrinsic syntax, expected opening `%`'); + } + var result = []; + $replace(string, rePropName, function (match, number, quote, subString) { + result[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : number || match; + }); + return result; +}; +/* end adaptation */ + +var getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) { + var intrinsicName = name; + var alias; + if (hasOwn(LEGACY_ALIASES, intrinsicName)) { + alias = LEGACY_ALIASES[intrinsicName]; + intrinsicName = '%' + alias[0] + '%'; + } + + if (hasOwn(INTRINSICS, intrinsicName)) { + var value = INTRINSICS[intrinsicName]; + if (value === needsEval) { + value = doEval(intrinsicName); + } + if (typeof value === 'undefined' && !allowMissing) { + throw new $TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!'); + } + + return { + alias: alias, + name: intrinsicName, + value: value + }; + } + + throw new $SyntaxError('intrinsic ' + name + ' does not exist!'); +}; + +module.exports = function GetIntrinsic(name, allowMissing) { + if (typeof name !== 'string' || name.length === 0) { + throw new $TypeError('intrinsic name must be a non-empty string'); + } + if (arguments.length > 1 && typeof allowMissing !== 'boolean') { + throw new $TypeError('"allowMissing" argument must be a boolean'); + } + + if ($exec(/^%?[^%]*%?$/, name) === null) { + throw new $SyntaxError('`%` may not be present anywhere but at the beginning and end of the intrinsic name'); + } + var parts = stringToPath(name); + var intrinsicBaseName = parts.length > 0 ? parts[0] : ''; + + var intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing); + var intrinsicRealName = intrinsic.name; + var value = intrinsic.value; + var skipFurtherCaching = false; + + var alias = intrinsic.alias; + if (alias) { + intrinsicBaseName = alias[0]; + $spliceApply(parts, $concat([0, 1], alias)); + } + + for (var i = 1, isOwn = true; i < parts.length; i += 1) { + var part = parts[i]; + var first = $strSlice(part, 0, 1); + var last = $strSlice(part, -1); + if ( + ( + (first === '"' || first === "'" || first === '`') + || (last === '"' || last === "'" || last === '`') + ) + && first !== last + ) { + throw new $SyntaxError('property names with quotes must have matching quotes'); + } + if (part === 'constructor' || !isOwn) { + skipFurtherCaching = true; + } + + intrinsicBaseName += '.' + part; + intrinsicRealName = '%' + intrinsicBaseName + '%'; + + if (hasOwn(INTRINSICS, intrinsicRealName)) { + value = INTRINSICS[intrinsicRealName]; + } else if (value != null) { + if (!(part in value)) { + if (!allowMissing) { + throw new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.'); + } + return void undefined; + } + if ($gOPD && (i + 1) >= parts.length) { + var desc = $gOPD(value, part); + isOwn = !!desc; + + // By convention, when a data property is converted to an accessor + // property to emulate a data property that does not suffer from + // the override mistake, that accessor's getter is marked with + // an `originalValue` property. Here, when we detect this, we + // uphold the illusion by pretending to see that original data + // property, i.e., returning the value rather than the getter + // itself. + if (isOwn && 'get' in desc && !('originalValue' in desc.get)) { + value = desc.get; + } else { + value = value[part]; + } + } else { + isOwn = hasOwn(value, part); + value = value[part]; + } + + if (isOwn && !skipFurtherCaching) { + INTRINSICS[intrinsicRealName] = value; + } + } + } + return value; +}; diff --git a/node_modules/get-intrinsic/package.json b/node_modules/get-intrinsic/package.json new file mode 100644 index 0000000..2828e73 --- /dev/null +++ b/node_modules/get-intrinsic/package.json @@ -0,0 +1,97 @@ +{ + "name": "get-intrinsic", + "version": "1.3.0", + "description": "Get and robustly cache all JS language-level intrinsics at first require time", + "main": "index.js", + "exports": { + ".": "./index.js", + "./package.json": "./package.json" + }, + "sideEffects": false, + "scripts": { + "prepack": "npmignore --auto --commentLines=autogenerated", + "prepublish": "not-in-publish || npm run prepublishOnly", + "prepublishOnly": "safe-publish-latest", + "prelint": "evalmd README.md", + "lint": "eslint --ext=.js,.mjs .", + "pretest": "npm run lint", + "tests-only": "nyc tape 'test/**/*.js'", + "test": "npm run tests-only", + "posttest": "npx npm@'>= 10.2' audit --production", + "version": "auto-changelog && git add CHANGELOG.md", + "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/ljharb/get-intrinsic.git" + }, + "keywords": [ + "javascript", + "ecmascript", + "es", + "js", + "intrinsic", + "getintrinsic", + "es-abstract" + ], + "author": "Jordan Harband ", + "funding": { + "url": "https://github.com/sponsors/ljharb" + }, + "license": "MIT", + "bugs": { + "url": "https://github.com/ljharb/get-intrinsic/issues" + }, + "homepage": "https://github.com/ljharb/get-intrinsic#readme", + "dependencies": { + "call-bind-apply-helpers": "^1.0.2", + "es-define-property": "^1.0.1", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.1.1", + "function-bind": "^1.1.2", + "get-proto": "^1.0.1", + "gopd": "^1.2.0", + "has-symbols": "^1.1.0", + "hasown": "^2.0.2", + "math-intrinsics": "^1.1.0" + }, + "devDependencies": { + "@ljharb/eslint-config": "^21.1.1", + "auto-changelog": "^2.5.0", + "call-bound": "^1.0.3", + "encoding": "^0.1.13", + "es-abstract": "^1.23.9", + "es-value-fixtures": "^1.7.1", + "eslint": "=8.8.0", + "evalmd": "^0.0.19", + "for-each": "^0.3.5", + "make-async-function": "^1.0.0", + "make-async-generator-function": "^1.0.0", + "make-generator-function": "^2.0.0", + "mock-property": "^1.1.0", + "npmignore": "^0.3.1", + "nyc": "^10.3.2", + "object-inspect": "^1.13.4", + "safe-publish-latest": "^2.0.0", + "tape": "^5.9.0" + }, + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false, + "hideCredit": true + }, + "testling": { + "files": "test/GetIntrinsic.js" + }, + "publishConfig": { + "ignore": [ + ".github/workflows" + ] + }, + "engines": { + "node": ">= 0.4" + } +} diff --git a/node_modules/get-intrinsic/test/GetIntrinsic.js b/node_modules/get-intrinsic/test/GetIntrinsic.js new file mode 100644 index 0000000..d9c0f30 --- /dev/null +++ b/node_modules/get-intrinsic/test/GetIntrinsic.js @@ -0,0 +1,274 @@ +'use strict'; + +var GetIntrinsic = require('../'); + +var test = require('tape'); +var forEach = require('for-each'); +var debug = require('object-inspect'); +var generatorFns = require('make-generator-function')(); +var asyncFns = require('make-async-function').list(); +var asyncGenFns = require('make-async-generator-function')(); +var mockProperty = require('mock-property'); + +var callBound = require('call-bound'); +var v = require('es-value-fixtures'); +var $gOPD = require('gopd'); +var DefinePropertyOrThrow = require('es-abstract/2023/DefinePropertyOrThrow'); + +var $isProto = callBound('%Object.prototype.isPrototypeOf%'); + +test('export', function (t) { + t.equal(typeof GetIntrinsic, 'function', 'it is a function'); + t.equal(GetIntrinsic.length, 2, 'function has length of 2'); + + t.end(); +}); + +test('throws', function (t) { + t['throws']( + function () { GetIntrinsic('not an intrinsic'); }, + SyntaxError, + 'nonexistent intrinsic throws a syntax error' + ); + + t['throws']( + function () { GetIntrinsic(''); }, + TypeError, + 'empty string intrinsic throws a type error' + ); + + t['throws']( + function () { GetIntrinsic('.'); }, + SyntaxError, + '"just a dot" intrinsic throws a syntax error' + ); + + t['throws']( + function () { GetIntrinsic('%String'); }, + SyntaxError, + 'Leading % without trailing % throws a syntax error' + ); + + t['throws']( + function () { GetIntrinsic('String%'); }, + SyntaxError, + 'Trailing % without leading % throws a syntax error' + ); + + t['throws']( + function () { GetIntrinsic("String['prototype]"); }, + SyntaxError, + 'Dynamic property access is disallowed for intrinsics (unterminated string)' + ); + + t['throws']( + function () { GetIntrinsic('%Proxy.prototype.undefined%'); }, + TypeError, + "Throws when middle part doesn't exist (%Proxy.prototype.undefined%)" + ); + + t['throws']( + function () { GetIntrinsic('%Array.prototype%garbage%'); }, + SyntaxError, + 'Throws with extra percent signs' + ); + + t['throws']( + function () { GetIntrinsic('%Array.prototype%push%'); }, + SyntaxError, + 'Throws with extra percent signs, even on an existing intrinsic' + ); + + forEach(v.nonStrings, function (nonString) { + t['throws']( + function () { GetIntrinsic(nonString); }, + TypeError, + debug(nonString) + ' is not a String' + ); + }); + + forEach(v.nonBooleans, function (nonBoolean) { + t['throws']( + function () { GetIntrinsic('%', nonBoolean); }, + TypeError, + debug(nonBoolean) + ' is not a Boolean' + ); + }); + + forEach([ + 'toString', + 'propertyIsEnumerable', + 'hasOwnProperty' + ], function (objectProtoMember) { + t['throws']( + function () { GetIntrinsic(objectProtoMember); }, + SyntaxError, + debug(objectProtoMember) + ' is not an intrinsic' + ); + }); + + t.end(); +}); + +test('base intrinsics', function (t) { + t.equal(GetIntrinsic('%Object%'), Object, '%Object% yields Object'); + t.equal(GetIntrinsic('Object'), Object, 'Object yields Object'); + t.equal(GetIntrinsic('%Array%'), Array, '%Array% yields Array'); + t.equal(GetIntrinsic('Array'), Array, 'Array yields Array'); + + t.end(); +}); + +test('dotted paths', function (t) { + t.equal(GetIntrinsic('%Object.prototype.toString%'), Object.prototype.toString, '%Object.prototype.toString% yields Object.prototype.toString'); + t.equal(GetIntrinsic('Object.prototype.toString'), Object.prototype.toString, 'Object.prototype.toString yields Object.prototype.toString'); + t.equal(GetIntrinsic('%Array.prototype.push%'), Array.prototype.push, '%Array.prototype.push% yields Array.prototype.push'); + t.equal(GetIntrinsic('Array.prototype.push'), Array.prototype.push, 'Array.prototype.push yields Array.prototype.push'); + + test('underscore paths are aliases for dotted paths', { skip: !Object.isFrozen || Object.isFrozen(Object.prototype) }, function (st) { + var original = GetIntrinsic('%ObjProto_toString%'); + + forEach([ + '%Object.prototype.toString%', + 'Object.prototype.toString', + '%ObjectPrototype.toString%', + 'ObjectPrototype.toString', + '%ObjProto_toString%', + 'ObjProto_toString' + ], function (name) { + DefinePropertyOrThrow(Object.prototype, 'toString', { + '[[Value]]': function toString() { + return original.apply(this, arguments); + } + }); + st.equal(GetIntrinsic(name), original, name + ' yields original Object.prototype.toString'); + }); + + DefinePropertyOrThrow(Object.prototype, 'toString', { '[[Value]]': original }); + st.end(); + }); + + test('dotted paths cache', { skip: !Object.isFrozen || Object.isFrozen(Object.prototype) }, function (st) { + var original = GetIntrinsic('%Object.prototype.propertyIsEnumerable%'); + + forEach([ + '%Object.prototype.propertyIsEnumerable%', + 'Object.prototype.propertyIsEnumerable', + '%ObjectPrototype.propertyIsEnumerable%', + 'ObjectPrototype.propertyIsEnumerable' + ], function (name) { + var restore = mockProperty(Object.prototype, 'propertyIsEnumerable', { + value: function propertyIsEnumerable() { + return original.apply(this, arguments); + } + }); + st.equal(GetIntrinsic(name), original, name + ' yields cached Object.prototype.propertyIsEnumerable'); + + restore(); + }); + + st.end(); + }); + + test('dotted path reports correct error', function (st) { + st['throws'](function () { + GetIntrinsic('%NonExistentIntrinsic.prototype.property%'); + }, /%NonExistentIntrinsic%/, 'The base intrinsic of %NonExistentIntrinsic.prototype.property% is %NonExistentIntrinsic%'); + + st['throws'](function () { + GetIntrinsic('%NonExistentIntrinsicPrototype.property%'); + }, /%NonExistentIntrinsicPrototype%/, 'The base intrinsic of %NonExistentIntrinsicPrototype.property% is %NonExistentIntrinsicPrototype%'); + + st.end(); + }); + + t.end(); +}); + +test('accessors', { skip: !$gOPD || typeof Map !== 'function' }, function (t) { + var actual = $gOPD(Map.prototype, 'size'); + t.ok(actual, 'Map.prototype.size has a descriptor'); + t.equal(typeof actual.get, 'function', 'Map.prototype.size has a getter function'); + t.equal(GetIntrinsic('%Map.prototype.size%'), actual.get, '%Map.prototype.size% yields the getter for it'); + t.equal(GetIntrinsic('Map.prototype.size'), actual.get, 'Map.prototype.size yields the getter for it'); + + t.end(); +}); + +test('generator functions', { skip: !generatorFns.length }, function (t) { + var $GeneratorFunction = GetIntrinsic('%GeneratorFunction%'); + var $GeneratorFunctionPrototype = GetIntrinsic('%Generator%'); + var $GeneratorPrototype = GetIntrinsic('%GeneratorPrototype%'); + + forEach(generatorFns, function (genFn) { + var fnName = genFn.name; + fnName = fnName ? "'" + fnName + "'" : 'genFn'; + + t.ok(genFn instanceof $GeneratorFunction, fnName + ' instanceof %GeneratorFunction%'); + t.ok($isProto($GeneratorFunctionPrototype, genFn), '%Generator% is prototype of ' + fnName); + t.ok($isProto($GeneratorPrototype, genFn.prototype), '%GeneratorPrototype% is prototype of ' + fnName + '.prototype'); + }); + + t.end(); +}); + +test('async functions', { skip: !asyncFns.length }, function (t) { + var $AsyncFunction = GetIntrinsic('%AsyncFunction%'); + var $AsyncFunctionPrototype = GetIntrinsic('%AsyncFunctionPrototype%'); + + forEach(asyncFns, function (asyncFn) { + var fnName = asyncFn.name; + fnName = fnName ? "'" + fnName + "'" : 'asyncFn'; + + t.ok(asyncFn instanceof $AsyncFunction, fnName + ' instanceof %AsyncFunction%'); + t.ok($isProto($AsyncFunctionPrototype, asyncFn), '%AsyncFunctionPrototype% is prototype of ' + fnName); + }); + + t.end(); +}); + +test('async generator functions', { skip: asyncGenFns.length === 0 }, function (t) { + var $AsyncGeneratorFunction = GetIntrinsic('%AsyncGeneratorFunction%'); + var $AsyncGeneratorFunctionPrototype = GetIntrinsic('%AsyncGenerator%'); + var $AsyncGeneratorPrototype = GetIntrinsic('%AsyncGeneratorPrototype%'); + + forEach(asyncGenFns, function (asyncGenFn) { + var fnName = asyncGenFn.name; + fnName = fnName ? "'" + fnName + "'" : 'asyncGenFn'; + + t.ok(asyncGenFn instanceof $AsyncGeneratorFunction, fnName + ' instanceof %AsyncGeneratorFunction%'); + t.ok($isProto($AsyncGeneratorFunctionPrototype, asyncGenFn), '%AsyncGenerator% is prototype of ' + fnName); + t.ok($isProto($AsyncGeneratorPrototype, asyncGenFn.prototype), '%AsyncGeneratorPrototype% is prototype of ' + fnName + '.prototype'); + }); + + t.end(); +}); + +test('%ThrowTypeError%', function (t) { + var $ThrowTypeError = GetIntrinsic('%ThrowTypeError%'); + + t.equal(typeof $ThrowTypeError, 'function', 'is a function'); + t['throws']( + $ThrowTypeError, + TypeError, + '%ThrowTypeError% throws a TypeError' + ); + + t.end(); +}); + +test('allowMissing', { skip: asyncGenFns.length > 0 }, function (t) { + t['throws']( + function () { GetIntrinsic('%AsyncGeneratorPrototype%'); }, + TypeError, + 'throws when missing' + ); + + t.equal( + GetIntrinsic('%AsyncGeneratorPrototype%', true), + undefined, + 'does not throw when allowMissing' + ); + + t.end(); +}); diff --git a/node_modules/get-proto/.eslintrc b/node_modules/get-proto/.eslintrc new file mode 100644 index 0000000..1d21a8a --- /dev/null +++ b/node_modules/get-proto/.eslintrc @@ -0,0 +1,10 @@ +{ + "root": true, + + "extends": "@ljharb", + + "rules": { + "id-length": "off", + "sort-keys": "off", + }, +} diff --git a/node_modules/get-proto/.github/FUNDING.yml b/node_modules/get-proto/.github/FUNDING.yml new file mode 100644 index 0000000..93183ef --- /dev/null +++ b/node_modules/get-proto/.github/FUNDING.yml @@ -0,0 +1,12 @@ +# These are supported funding model platforms + +github: [ljharb] +patreon: # Replace with a single Patreon username +open_collective: # Replace with a single Open Collective username +ko_fi: # Replace with a single Ko-fi username +tidelift: npm/get-proto +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +otechie: # Replace with a single Otechie username +custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/node_modules/get-proto/.nycrc b/node_modules/get-proto/.nycrc new file mode 100644 index 0000000..bdd626c --- /dev/null +++ b/node_modules/get-proto/.nycrc @@ -0,0 +1,9 @@ +{ + "all": true, + "check-coverage": false, + "reporter": ["text-summary", "text", "html", "json"], + "exclude": [ + "coverage", + "test" + ] +} diff --git a/node_modules/get-proto/CHANGELOG.md b/node_modules/get-proto/CHANGELOG.md new file mode 100644 index 0000000..5860229 --- /dev/null +++ b/node_modules/get-proto/CHANGELOG.md @@ -0,0 +1,21 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [v1.0.1](https://github.com/ljharb/get-proto/compare/v1.0.0...v1.0.1) - 2025-01-02 + +### Commits + +- [Fix] for the `Object.getPrototypeOf` window, throw for non-objects [`7fe6508`](https://github.com/ljharb/get-proto/commit/7fe6508b71419ebe1976bedb86001d1feaeaa49a) + +## v1.0.0 - 2025-01-01 + +### Commits + +- Initial implementation, tests, readme, types [`5c70775`](https://github.com/ljharb/get-proto/commit/5c707751e81c3deeb2cf980d185fc7fd43611415) +- Initial commit [`7c65c2a`](https://github.com/ljharb/get-proto/commit/7c65c2ad4e33d5dae2f219ebe1a046ae2256972c) +- npm init [`0b8cf82`](https://github.com/ljharb/get-proto/commit/0b8cf824c9634e4a34ef7dd2a2cdc5be6ac79518) +- Only apps should have lockfiles [`a6d1bff`](https://github.com/ljharb/get-proto/commit/a6d1bffc364f5828377cea7194558b2dbef7aea2) diff --git a/node_modules/get-proto/LICENSE b/node_modules/get-proto/LICENSE new file mode 100644 index 0000000..eeabd1c --- /dev/null +++ b/node_modules/get-proto/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2025 Jordan Harband + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/get-proto/Object.getPrototypeOf.d.ts b/node_modules/get-proto/Object.getPrototypeOf.d.ts new file mode 100644 index 0000000..028b3ff --- /dev/null +++ b/node_modules/get-proto/Object.getPrototypeOf.d.ts @@ -0,0 +1,5 @@ +declare function getProto(object: O): object | null; + +declare const x: typeof getProto | null; + +export = x; \ No newline at end of file diff --git a/node_modules/get-proto/Object.getPrototypeOf.js b/node_modules/get-proto/Object.getPrototypeOf.js new file mode 100644 index 0000000..c2cbbdf --- /dev/null +++ b/node_modules/get-proto/Object.getPrototypeOf.js @@ -0,0 +1,6 @@ +'use strict'; + +var $Object = require('es-object-atoms'); + +/** @type {import('./Object.getPrototypeOf')} */ +module.exports = $Object.getPrototypeOf || null; diff --git a/node_modules/get-proto/README.md b/node_modules/get-proto/README.md new file mode 100644 index 0000000..f8b4cce --- /dev/null +++ b/node_modules/get-proto/README.md @@ -0,0 +1,50 @@ +# get-proto [![Version Badge][npm-version-svg]][package-url] + +[![github actions][actions-image]][actions-url] +[![coverage][codecov-image]][codecov-url] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][npm-badge-png]][package-url] + +Robustly get the [[Prototype]] of an object. Uses the best available method. + +## Getting started + +```sh +npm install --save get-proto +``` + +## Usage/Examples + +```js +const assert = require('assert'); +const getProto = require('get-proto'); + +const a = { a: 1, b: 2, [Symbol.toStringTag]: 'foo' }; +const b = { c: 3, __proto__: a }; + +assert.equal(getProto(b), a); +assert.equal(getProto(a), Object.prototype); +assert.equal(getProto({ __proto__: null }), null); +``` + +## Tests + +Clone the repo, `npm install`, and run `npm test` + +[package-url]: https://npmjs.org/package/get-proto +[npm-version-svg]: https://versionbadg.es/ljharb/get-proto.svg +[deps-svg]: https://david-dm.org/ljharb/get-proto.svg +[deps-url]: https://david-dm.org/ljharb/get-proto +[dev-deps-svg]: https://david-dm.org/ljharb/get-proto/dev-status.svg +[dev-deps-url]: https://david-dm.org/ljharb/get-proto#info=devDependencies +[npm-badge-png]: https://nodei.co/npm/get-proto.png?downloads=true&stars=true +[license-image]: https://img.shields.io/npm/l/get-proto.svg +[license-url]: LICENSE +[downloads-image]: https://img.shields.io/npm/dm/get-proto.svg +[downloads-url]: https://npm-stat.com/charts.html?package=get-proto +[codecov-image]: https://codecov.io/gh/ljharb/get-proto/branch/main/graphs/badge.svg +[codecov-url]: https://app.codecov.io/gh/ljharb/get-proto/ +[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/ljharb/get-proto +[actions-url]: https://github.com/ljharb/get-proto/actions diff --git a/node_modules/get-proto/Reflect.getPrototypeOf.d.ts b/node_modules/get-proto/Reflect.getPrototypeOf.d.ts new file mode 100644 index 0000000..2388fe0 --- /dev/null +++ b/node_modules/get-proto/Reflect.getPrototypeOf.d.ts @@ -0,0 +1,3 @@ +declare const x: typeof Reflect.getPrototypeOf | null; + +export = x; \ No newline at end of file diff --git a/node_modules/get-proto/Reflect.getPrototypeOf.js b/node_modules/get-proto/Reflect.getPrototypeOf.js new file mode 100644 index 0000000..e6c51be --- /dev/null +++ b/node_modules/get-proto/Reflect.getPrototypeOf.js @@ -0,0 +1,4 @@ +'use strict'; + +/** @type {import('./Reflect.getPrototypeOf')} */ +module.exports = (typeof Reflect !== 'undefined' && Reflect.getPrototypeOf) || null; diff --git a/node_modules/get-proto/index.d.ts b/node_modules/get-proto/index.d.ts new file mode 100644 index 0000000..2c021f3 --- /dev/null +++ b/node_modules/get-proto/index.d.ts @@ -0,0 +1,5 @@ +declare function getProto(object: O): object | null; + +declare const x: typeof getProto | null; + +export = x; diff --git a/node_modules/get-proto/index.js b/node_modules/get-proto/index.js new file mode 100644 index 0000000..7e5747b --- /dev/null +++ b/node_modules/get-proto/index.js @@ -0,0 +1,27 @@ +'use strict'; + +var reflectGetProto = require('./Reflect.getPrototypeOf'); +var originalGetProto = require('./Object.getPrototypeOf'); + +var getDunderProto = require('dunder-proto/get'); + +/** @type {import('.')} */ +module.exports = reflectGetProto + ? function getProto(O) { + // @ts-expect-error TS can't narrow inside a closure, for some reason + return reflectGetProto(O); + } + : originalGetProto + ? function getProto(O) { + if (!O || (typeof O !== 'object' && typeof O !== 'function')) { + throw new TypeError('getProto: not an object'); + } + // @ts-expect-error TS can't narrow inside a closure, for some reason + return originalGetProto(O); + } + : getDunderProto + ? function getProto(O) { + // @ts-expect-error TS can't narrow inside a closure, for some reason + return getDunderProto(O); + } + : null; diff --git a/node_modules/get-proto/package.json b/node_modules/get-proto/package.json new file mode 100644 index 0000000..9c35cec --- /dev/null +++ b/node_modules/get-proto/package.json @@ -0,0 +1,81 @@ +{ + "name": "get-proto", + "version": "1.0.1", + "description": "Robustly get the [[Prototype]] of an object", + "main": "index.js", + "exports": { + ".": "./index.js", + "./Reflect.getPrototypeOf": "./Reflect.getPrototypeOf.js", + "./Object.getPrototypeOf": "./Object.getPrototypeOf.js", + "./package.json": "./package.json" + }, + "scripts": { + "prepack": "npmignore --auto --commentLines=autogenerated", + "prepublish": "not-in-publish || npm run prepublishOnly", + "prepublishOnly": "safe-publish-latest", + "pretest": "npm run --silent lint", + "test": "npm run tests-only", + "posttest": "npx npm@\">=10.2\" audit --production", + "tests-only": "nyc tape 'test/**/*.js'", + "prelint": "evalmd README.md", + "lint": "eslint --ext=js,mjs .", + "postlint": "tsc && attw -P", + "version": "auto-changelog && git add CHANGELOG.md", + "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/ljharb/get-proto.git" + }, + "keywords": [ + "get", + "proto", + "prototype", + "getPrototypeOf", + "[[Prototype]]" + ], + "author": "Jordan Harband ", + "license": "MIT", + "bugs": { + "url": "https://github.com/ljharb/get-proto/issues" + }, + "homepage": "https://github.com/ljharb/get-proto#readme", + "dependencies": { + "dunder-proto": "^1.0.1", + "es-object-atoms": "^1.0.0" + }, + "devDependencies": { + "@arethetypeswrong/cli": "^0.17.2", + "@ljharb/eslint-config": "^21.1.1", + "@ljharb/tsconfig": "^0.2.3", + "@types/tape": "^5.8.0", + "auto-changelog": "^2.5.0", + "eslint": "=8.8.0", + "evalmd": "^0.0.19", + "in-publish": "^2.0.1", + "npmignore": "^0.3.1", + "nyc": "^10.3.2", + "safe-publish-latest": "^2.0.0", + "tape": "^5.9.0", + "typescript": "next" + }, + "engines": { + "node": ">= 0.4" + }, + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false, + "hideCredit": true + }, + "publishConfig": { + "ignore": [ + ".github/workflows" + ] + }, + "testling": { + "files": "test/index.js" + } +} diff --git a/node_modules/get-proto/test/index.js b/node_modules/get-proto/test/index.js new file mode 100644 index 0000000..5a2ece2 --- /dev/null +++ b/node_modules/get-proto/test/index.js @@ -0,0 +1,68 @@ +'use strict'; + +var test = require('tape'); + +var getProto = require('../'); + +test('getProto', function (t) { + t.equal(typeof getProto, 'function', 'is a function'); + + t.test('can get', { skip: !getProto }, function (st) { + if (getProto) { // TS doesn't understand tape's skip + var proto = { b: 2 }; + st.equal(getProto(proto), Object.prototype, 'proto: returns the [[Prototype]]'); + + st.test('nullish value', function (s2t) { + // @ts-expect-error + s2t['throws'](function () { return getProto(undefined); }, TypeError, 'undefined is not an object'); + // @ts-expect-error + s2t['throws'](function () { return getProto(null); }, TypeError, 'null is not an object'); + s2t.end(); + }); + + // @ts-expect-error + st['throws'](function () { getProto(true); }, 'throws for true'); + // @ts-expect-error + st['throws'](function () { getProto(false); }, 'throws for false'); + // @ts-expect-error + st['throws'](function () { getProto(42); }, 'throws for 42'); + // @ts-expect-error + st['throws'](function () { getProto(NaN); }, 'throws for NaN'); + // @ts-expect-error + st['throws'](function () { getProto(0); }, 'throws for +0'); + // @ts-expect-error + st['throws'](function () { getProto(-0); }, 'throws for -0'); + // @ts-expect-error + st['throws'](function () { getProto(Infinity); }, 'throws for ∞'); + // @ts-expect-error + st['throws'](function () { getProto(-Infinity); }, 'throws for -∞'); + // @ts-expect-error + st['throws'](function () { getProto(''); }, 'throws for empty string'); + // @ts-expect-error + st['throws'](function () { getProto('foo'); }, 'throws for non-empty string'); + st.equal(getProto(/a/g), RegExp.prototype); + st.equal(getProto(new Date()), Date.prototype); + st.equal(getProto(function () {}), Function.prototype); + st.equal(getProto([]), Array.prototype); + st.equal(getProto({}), Object.prototype); + + var nullObject = { __proto__: null }; + if ('toString' in nullObject) { + st.comment('no null objects in this engine'); + st.equal(getProto(nullObject), Object.prototype, '"null" object has Object.prototype as [[Prototype]]'); + } else { + st.equal(getProto(nullObject), null, 'null object has null [[Prototype]]'); + } + } + + st.end(); + }); + + t.test('can not get', { skip: !!getProto }, function (st) { + st.equal(getProto, null); + + st.end(); + }); + + t.end(); +}); diff --git a/node_modules/get-proto/tsconfig.json b/node_modules/get-proto/tsconfig.json new file mode 100644 index 0000000..60fb90e --- /dev/null +++ b/node_modules/get-proto/tsconfig.json @@ -0,0 +1,9 @@ +{ + "extends": "@ljharb/tsconfig", + "compilerOptions": { + //"target": "es2021", + }, + "exclude": [ + "coverage", + ], +} diff --git a/node_modules/gopd/.eslintrc b/node_modules/gopd/.eslintrc new file mode 100644 index 0000000..e2550c0 --- /dev/null +++ b/node_modules/gopd/.eslintrc @@ -0,0 +1,16 @@ +{ + "root": true, + + "extends": "@ljharb", + + "rules": { + "func-style": [2, "declaration"], + "id-length": 0, + "multiline-comment-style": 0, + "new-cap": [2, { + "capIsNewExceptions": [ + "GetIntrinsic", + ], + }], + }, +} diff --git a/node_modules/gopd/.github/FUNDING.yml b/node_modules/gopd/.github/FUNDING.yml new file mode 100644 index 0000000..94a44a8 --- /dev/null +++ b/node_modules/gopd/.github/FUNDING.yml @@ -0,0 +1,12 @@ +# These are supported funding model platforms + +github: [ljharb] +patreon: # Replace with a single Patreon username +open_collective: # Replace with a single Open Collective username +ko_fi: # Replace with a single Ko-fi username +tidelift: npm/gopd +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +otechie: # Replace with a single Otechie username +custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/node_modules/gopd/CHANGELOG.md b/node_modules/gopd/CHANGELOG.md new file mode 100644 index 0000000..87f5727 --- /dev/null +++ b/node_modules/gopd/CHANGELOG.md @@ -0,0 +1,45 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [v1.2.0](https://github.com/ljharb/gopd/compare/v1.1.0...v1.2.0) - 2024-12-03 + +### Commits + +- [New] add `gOPD` entry point; remove `get-intrinsic` [`5b61232`](https://github.com/ljharb/gopd/commit/5b61232dedea4591a314bcf16101b1961cee024e) + +## [v1.1.0](https://github.com/ljharb/gopd/compare/v1.0.1...v1.1.0) - 2024-11-29 + +### Commits + +- [New] add types [`f585e39`](https://github.com/ljharb/gopd/commit/f585e397886d270e4ba84e53d226e4f9ca2eb0e6) +- [Dev Deps] update `@ljharb/eslint-config`, `auto-changelog`, `tape` [`0b8e4fd`](https://github.com/ljharb/gopd/commit/0b8e4fded64397a7726a9daa144a6cc9a5e2edfa) +- [Dev Deps] update `aud`, `npmignore`, `tape` [`48378b2`](https://github.com/ljharb/gopd/commit/48378b2443f09a4f7efbd0fb6c3ee845a6cabcf3) +- [Dev Deps] update `@ljharb/eslint-config`, `aud`, `tape` [`78099ee`](https://github.com/ljharb/gopd/commit/78099eeed41bfdc134c912280483689cc8861c31) +- [Tests] replace `aud` with `npm audit` [`4e0d0ac`](https://github.com/ljharb/gopd/commit/4e0d0ac47619d24a75318a8e1f543ee04b2a2632) +- [meta] add missing `engines.node` [`1443316`](https://github.com/ljharb/gopd/commit/14433165d07835c680155b3dfd62d9217d735eca) +- [Deps] update `get-intrinsic` [`eee5f51`](https://github.com/ljharb/gopd/commit/eee5f51769f3dbaf578b70e2a3199116b01aa670) +- [Deps] update `get-intrinsic` [`550c378`](https://github.com/ljharb/gopd/commit/550c3780e3a9c77b62565712a001b4ed64ea61f5) +- [Dev Deps] add missing peer dep [`8c2ecf8`](https://github.com/ljharb/gopd/commit/8c2ecf848122e4e30abfc5b5086fb48b390dce75) + +## [v1.0.1](https://github.com/ljharb/gopd/compare/v1.0.0...v1.0.1) - 2022-11-01 + +### Commits + +- [Fix] actually export gOPD instead of dP [`4b624bf`](https://github.com/ljharb/gopd/commit/4b624bfbeff788c5e3ff16d9443a83627847234f) + +## v1.0.0 - 2022-11-01 + +### Commits + +- Initial implementation, tests, readme [`0911e01`](https://github.com/ljharb/gopd/commit/0911e012cd642092bd88b732c161c58bf4f20bea) +- Initial commit [`b84e33f`](https://github.com/ljharb/gopd/commit/b84e33f5808a805ac57ff88d4247ad935569acbe) +- [actions] add reusable workflows [`12ae28a`](https://github.com/ljharb/gopd/commit/12ae28ae5f50f86e750215b6e2188901646d0119) +- npm init [`280118b`](https://github.com/ljharb/gopd/commit/280118badb45c80b4483836b5cb5315bddf6e582) +- [meta] add `auto-changelog` [`bb78de5`](https://github.com/ljharb/gopd/commit/bb78de5639a180747fb290c28912beaaf1615709) +- [meta] create FUNDING.yml; add `funding` in package.json [`11c22e6`](https://github.com/ljharb/gopd/commit/11c22e6355bb01f24e7fac4c9bb3055eb5b25002) +- [meta] use `npmignore` to autogenerate an npmignore file [`4f4537a`](https://github.com/ljharb/gopd/commit/4f4537a843b39f698c52f072845092e6fca345bb) +- Only apps should have lockfiles [`c567022`](https://github.com/ljharb/gopd/commit/c567022a18573aa7951cf5399445d9840e23e98b) diff --git a/node_modules/gopd/LICENSE b/node_modules/gopd/LICENSE new file mode 100644 index 0000000..6abfe14 --- /dev/null +++ b/node_modules/gopd/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2022 Jordan Harband + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/gopd/README.md b/node_modules/gopd/README.md new file mode 100644 index 0000000..784e56a --- /dev/null +++ b/node_modules/gopd/README.md @@ -0,0 +1,40 @@ +# gopd [![Version Badge][npm-version-svg]][package-url] + +[![github actions][actions-image]][actions-url] +[![coverage][codecov-image]][codecov-url] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][npm-badge-png]][package-url] + +`Object.getOwnPropertyDescriptor`, but accounts for IE's broken implementation. + +## Usage + +```javascript +var gOPD = require('gopd'); +var assert = require('assert'); + +if (gOPD) { + assert.equal(typeof gOPD, 'function', 'descriptors supported'); + // use gOPD like Object.getOwnPropertyDescriptor here +} else { + assert.ok(!gOPD, 'descriptors not supported'); +} +``` + +[package-url]: https://npmjs.org/package/gopd +[npm-version-svg]: https://versionbadg.es/ljharb/gopd.svg +[deps-svg]: https://david-dm.org/ljharb/gopd.svg +[deps-url]: https://david-dm.org/ljharb/gopd +[dev-deps-svg]: https://david-dm.org/ljharb/gopd/dev-status.svg +[dev-deps-url]: https://david-dm.org/ljharb/gopd#info=devDependencies +[npm-badge-png]: https://nodei.co/npm/gopd.png?downloads=true&stars=true +[license-image]: https://img.shields.io/npm/l/gopd.svg +[license-url]: LICENSE +[downloads-image]: https://img.shields.io/npm/dm/gopd.svg +[downloads-url]: https://npm-stat.com/charts.html?package=gopd +[codecov-image]: https://codecov.io/gh/ljharb/gopd/branch/main/graphs/badge.svg +[codecov-url]: https://app.codecov.io/gh/ljharb/gopd/ +[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/ljharb/gopd +[actions-url]: https://github.com/ljharb/gopd/actions diff --git a/node_modules/gopd/gOPD.d.ts b/node_modules/gopd/gOPD.d.ts new file mode 100644 index 0000000..def48a3 --- /dev/null +++ b/node_modules/gopd/gOPD.d.ts @@ -0,0 +1 @@ +export = Object.getOwnPropertyDescriptor; diff --git a/node_modules/gopd/gOPD.js b/node_modules/gopd/gOPD.js new file mode 100644 index 0000000..cf9616c --- /dev/null +++ b/node_modules/gopd/gOPD.js @@ -0,0 +1,4 @@ +'use strict'; + +/** @type {import('./gOPD')} */ +module.exports = Object.getOwnPropertyDescriptor; diff --git a/node_modules/gopd/index.d.ts b/node_modules/gopd/index.d.ts new file mode 100644 index 0000000..e228065 --- /dev/null +++ b/node_modules/gopd/index.d.ts @@ -0,0 +1,5 @@ +declare function gOPD(obj: O, prop: K): PropertyDescriptor | undefined; + +declare const fn: typeof gOPD | undefined | null; + +export = fn; \ No newline at end of file diff --git a/node_modules/gopd/index.js b/node_modules/gopd/index.js new file mode 100644 index 0000000..a4081b0 --- /dev/null +++ b/node_modules/gopd/index.js @@ -0,0 +1,15 @@ +'use strict'; + +/** @type {import('.')} */ +var $gOPD = require('./gOPD'); + +if ($gOPD) { + try { + $gOPD([], 'length'); + } catch (e) { + // IE 8 has a broken gOPD + $gOPD = null; + } +} + +module.exports = $gOPD; diff --git a/node_modules/gopd/package.json b/node_modules/gopd/package.json new file mode 100644 index 0000000..01c5ffa --- /dev/null +++ b/node_modules/gopd/package.json @@ -0,0 +1,77 @@ +{ + "name": "gopd", + "version": "1.2.0", + "description": "`Object.getOwnPropertyDescriptor`, but accounts for IE's broken implementation.", + "main": "index.js", + "exports": { + ".": "./index.js", + "./gOPD": "./gOPD.js", + "./package.json": "./package.json" + }, + "sideEffects": false, + "scripts": { + "prepack": "npmignore --auto --commentLines=autogenerated", + "prepublishOnly": "safe-publish-latest", + "prepublish": "not-in-publish || npm run prepublishOnly", + "prelint": "tsc -p . && attw -P", + "lint": "eslint --ext=js,mjs .", + "postlint": "evalmd README.md", + "pretest": "npm run lint", + "tests-only": "tape 'test/**/*.js'", + "test": "npm run tests-only", + "posttest": "npx npm@'>=10.2' audit --production", + "version": "auto-changelog && git add CHANGELOG.md", + "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/ljharb/gopd.git" + }, + "keywords": [ + "ecmascript", + "javascript", + "getownpropertydescriptor", + "property", + "descriptor" + ], + "author": "Jordan Harband ", + "funding": { + "url": "https://github.com/sponsors/ljharb" + }, + "license": "MIT", + "bugs": { + "url": "https://github.com/ljharb/gopd/issues" + }, + "homepage": "https://github.com/ljharb/gopd#readme", + "devDependencies": { + "@arethetypeswrong/cli": "^0.17.0", + "@ljharb/eslint-config": "^21.1.1", + "@ljharb/tsconfig": "^0.2.0", + "@types/tape": "^5.6.5", + "auto-changelog": "^2.5.0", + "encoding": "^0.1.13", + "eslint": "=8.8.0", + "evalmd": "^0.0.19", + "in-publish": "^2.0.1", + "npmignore": "^0.3.1", + "safe-publish-latest": "^2.0.0", + "tape": "^5.9.0", + "typescript": "next" + }, + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false, + "hideCredit": true + }, + "publishConfig": { + "ignore": [ + ".github/workflows" + ] + }, + "engines": { + "node": ">= 0.4" + } +} diff --git a/node_modules/gopd/test/index.js b/node_modules/gopd/test/index.js new file mode 100644 index 0000000..6f43453 --- /dev/null +++ b/node_modules/gopd/test/index.js @@ -0,0 +1,36 @@ +'use strict'; + +var test = require('tape'); +var gOPD = require('../'); + +test('gOPD', function (t) { + t.test('supported', { skip: !gOPD }, function (st) { + st.equal(typeof gOPD, 'function', 'is a function'); + + var obj = { x: 1 }; + st.ok('x' in obj, 'property exists'); + + // @ts-expect-error TS can't figure out narrowing from `skip` + var desc = gOPD(obj, 'x'); + st.deepEqual( + desc, + { + configurable: true, + enumerable: true, + value: 1, + writable: true + }, + 'descriptor is as expected' + ); + + st.end(); + }); + + t.test('not supported', { skip: !!gOPD }, function (st) { + st.notOk(gOPD, 'is falsy'); + + st.end(); + }); + + t.end(); +}); diff --git a/node_modules/gopd/tsconfig.json b/node_modules/gopd/tsconfig.json new file mode 100644 index 0000000..d9a6668 --- /dev/null +++ b/node_modules/gopd/tsconfig.json @@ -0,0 +1,9 @@ +{ + "extends": "@ljharb/tsconfig", + "compilerOptions": { + "target": "es2021", + }, + "exclude": [ + "coverage", + ], +} diff --git a/node_modules/has-symbols/.eslintrc b/node_modules/has-symbols/.eslintrc new file mode 100644 index 0000000..2d9a66a --- /dev/null +++ b/node_modules/has-symbols/.eslintrc @@ -0,0 +1,11 @@ +{ + "root": true, + + "extends": "@ljharb", + + "rules": { + "max-statements-per-line": [2, { "max": 2 }], + "no-magic-numbers": 0, + "multiline-comment-style": 0, + } +} diff --git a/node_modules/has-symbols/.github/FUNDING.yml b/node_modules/has-symbols/.github/FUNDING.yml new file mode 100644 index 0000000..04cf87e --- /dev/null +++ b/node_modules/has-symbols/.github/FUNDING.yml @@ -0,0 +1,12 @@ +# These are supported funding model platforms + +github: [ljharb] +patreon: # Replace with a single Patreon username +open_collective: # Replace with a single Open Collective username +ko_fi: # Replace with a single Ko-fi username +tidelift: npm/has-symbols +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +otechie: # Replace with a single Otechie username +custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/node_modules/has-symbols/.nycrc b/node_modules/has-symbols/.nycrc new file mode 100644 index 0000000..bdd626c --- /dev/null +++ b/node_modules/has-symbols/.nycrc @@ -0,0 +1,9 @@ +{ + "all": true, + "check-coverage": false, + "reporter": ["text-summary", "text", "html", "json"], + "exclude": [ + "coverage", + "test" + ] +} diff --git a/node_modules/has-symbols/CHANGELOG.md b/node_modules/has-symbols/CHANGELOG.md new file mode 100644 index 0000000..cc3cf83 --- /dev/null +++ b/node_modules/has-symbols/CHANGELOG.md @@ -0,0 +1,91 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [v1.1.0](https://github.com/inspect-js/has-symbols/compare/v1.0.3...v1.1.0) - 2024-12-02 + +### Commits + +- [actions] update workflows [`548c0bf`](https://github.com/inspect-js/has-symbols/commit/548c0bf8c9b1235458df7a1c0490b0064647a282) +- [actions] further shard; update action deps [`bec56bb`](https://github.com/inspect-js/has-symbols/commit/bec56bb0fb44b43a786686b944875a3175cf3ff3) +- [meta] use `npmignore` to autogenerate an npmignore file [`ac81032`](https://github.com/inspect-js/has-symbols/commit/ac81032809157e0a079e5264e9ce9b6f1275777e) +- [New] add types [`6469cbf`](https://github.com/inspect-js/has-symbols/commit/6469cbff1866cfe367b2b3d181d9296ec14b2a3d) +- [actions] update rebase action to use reusable workflow [`9c9d4d0`](https://github.com/inspect-js/has-symbols/commit/9c9d4d0d8938e4b267acdf8e421f4e92d1716d72) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `tape` [`adb5887`](https://github.com/inspect-js/has-symbols/commit/adb5887ca9444849b08beb5caaa9e1d42320cdfb) +- [Dev Deps] update `@ljharb/eslint-config`, `aud`, `tape` [`13ec198`](https://github.com/inspect-js/has-symbols/commit/13ec198ec80f1993a87710af1606a1970b22c7cb) +- [Dev Deps] update `auto-changelog`, `core-js`, `tape` [`941be52`](https://github.com/inspect-js/has-symbols/commit/941be5248387cab1da72509b22acf3fdb223f057) +- [Tests] replace `aud` with `npm audit` [`74f49e9`](https://github.com/inspect-js/has-symbols/commit/74f49e9a9d17a443020784234a1c53ce765b3559) +- [Dev Deps] update `npmignore` [`9c0ac04`](https://github.com/inspect-js/has-symbols/commit/9c0ac0452a834f4c2a4b54044f2d6a89f17e9a70) +- [Dev Deps] add missing peer dep [`52337a5`](https://github.com/inspect-js/has-symbols/commit/52337a5621cced61f846f2afdab7707a8132cc12) + +## [v1.0.3](https://github.com/inspect-js/has-symbols/compare/v1.0.2...v1.0.3) - 2022-03-01 + +### Commits + +- [actions] use `node/install` instead of `node/run`; use `codecov` action [`518b28f`](https://github.com/inspect-js/has-symbols/commit/518b28f6c5a516cbccae30794e40aa9f738b1693) +- [meta] add `bugs` and `homepage` fields; reorder package.json [`c480b13`](https://github.com/inspect-js/has-symbols/commit/c480b13fd6802b557e1cef9749872cb5fdeef744) +- [actions] reuse common workflows [`01d0ee0`](https://github.com/inspect-js/has-symbols/commit/01d0ee0a8d97c0947f5edb73eb722027a77b2b07) +- [actions] update codecov uploader [`6424ebe`](https://github.com/inspect-js/has-symbols/commit/6424ebe86b2c9c7c3d2e9bd4413a4e4f168cb275) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `tape` [`dfa7e7f`](https://github.com/inspect-js/has-symbols/commit/dfa7e7ff38b594645d8c8222aab895157fa7e282) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `safe-publish-latest`, `tape` [`0c8d436`](https://github.com/inspect-js/has-symbols/commit/0c8d43685c45189cea9018191d4fd7eca91c9d02) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `tape` [`9026554`](https://github.com/inspect-js/has-symbols/commit/902655442a1bf88e72b42345494ef0c60f5d36ab) +- [readme] add actions and codecov badges [`eaa9682`](https://github.com/inspect-js/has-symbols/commit/eaa9682f990f481d3acf7a1c7600bec36f7b3adc) +- [Dev Deps] update `eslint`, `tape` [`bc7a3ba`](https://github.com/inspect-js/has-symbols/commit/bc7a3ba46f27b7743f8a2579732d59d1b9ac791e) +- [Dev Deps] update `eslint`, `auto-changelog` [`0ace00a`](https://github.com/inspect-js/has-symbols/commit/0ace00af08a88cdd1e6ce0d60357d941c60c2d9f) +- [meta] use `prepublishOnly` script for npm 7+ [`093f72b`](https://github.com/inspect-js/has-symbols/commit/093f72bc2b0ed00c781f444922a5034257bf561d) +- [Tests] test on all 16 minors [`9b80d3d`](https://github.com/inspect-js/has-symbols/commit/9b80d3d9102529f04c20ec5b1fcc6e38426c6b03) + +## [v1.0.2](https://github.com/inspect-js/has-symbols/compare/v1.0.1...v1.0.2) - 2021-02-27 + +### Fixed + +- [Fix] use a universal way to get the original Symbol [`#11`](https://github.com/inspect-js/has-symbols/issues/11) + +### Commits + +- [Tests] migrate tests to Github Actions [`90ae798`](https://github.com/inspect-js/has-symbols/commit/90ae79820bdfe7bc703d67f5f3c5e205f98556d3) +- [meta] do not publish github action workflow files [`29e60a1`](https://github.com/inspect-js/has-symbols/commit/29e60a1b7c25c7f1acf7acff4a9320d0d10c49b4) +- [Tests] run `nyc` on all tests [`8476b91`](https://github.com/inspect-js/has-symbols/commit/8476b915650d360915abe2522505abf4b0e8f0ae) +- [readme] fix repo URLs, remove defunct badges [`126288e`](https://github.com/inspect-js/has-symbols/commit/126288ecc1797c0a40247a6b78bcb2e0bc5d7036) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `core-js`, `get-own-property-symbols` [`d84bdfa`](https://github.com/inspect-js/has-symbols/commit/d84bdfa48ac5188abbb4904b42614cd6c030940a) +- [Tests] fix linting errors [`0df3070`](https://github.com/inspect-js/has-symbols/commit/0df3070b981b6c9f2ee530c09189a7f5c6def839) +- [actions] add "Allow Edits" workflow [`1e6bc29`](https://github.com/inspect-js/has-symbols/commit/1e6bc29b188f32b9648657b07eda08504be5aa9c) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `tape` [`36cea2a`](https://github.com/inspect-js/has-symbols/commit/36cea2addd4e6ec435f35a2656b4e9ef82498e9b) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `tape` [`1278338`](https://github.com/inspect-js/has-symbols/commit/127833801865fbc2cc8979beb9ca869c7bfe8222) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `tape` [`1493254`](https://github.com/inspect-js/has-symbols/commit/1493254eda13db5fb8fc5e4a3e8324b3d196029d) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `core-js` [`b090bf2`](https://github.com/inspect-js/has-symbols/commit/b090bf214d3679a30edc1e2d729d466ab5183e1d) +- [actions] switch Automatic Rebase workflow to `pull_request_target` event [`4addb7a`](https://github.com/inspect-js/has-symbols/commit/4addb7ab4dc73f927ae99928d68817554fc21dc0) +- [Dev Deps] update `auto-changelog`, `tape` [`81d0baf`](https://github.com/inspect-js/has-symbols/commit/81d0baf3816096a89a8558e8043895f7a7d10d8b) +- [Dev Deps] update `auto-changelog`; add `aud` [`1a4e561`](https://github.com/inspect-js/has-symbols/commit/1a4e5612c25d91c3a03d509721d02630bc4fe3da) +- [readme] remove unused testling URLs [`3000941`](https://github.com/inspect-js/has-symbols/commit/3000941f958046e923ed8152edb1ef4a599e6fcc) +- [Tests] only audit prod deps [`692e974`](https://github.com/inspect-js/has-symbols/commit/692e9743c912410e9440207631a643a34b4741a1) +- [Dev Deps] update `@ljharb/eslint-config` [`51c946c`](https://github.com/inspect-js/has-symbols/commit/51c946c7f6baa793ec5390bb5a45cdce16b4ba76) + +## [v1.0.1](https://github.com/inspect-js/has-symbols/compare/v1.0.0...v1.0.1) - 2019-11-16 + +### Commits + +- [Tests] use shared travis-ci configs [`ce396c9`](https://github.com/inspect-js/has-symbols/commit/ce396c9419ff11c43d0da5d05cdbb79f7fb42229) +- [Tests] up to `node` `v12.4`, `v11.15`, `v10.15`, `v9.11`, `v8.15`, `v7.10`, `v6.17`, `v4.9`; use `nvm install-latest-npm` [`0690732`](https://github.com/inspect-js/has-symbols/commit/0690732801f47ab429f39ba1962f522d5c462d6b) +- [meta] add `auto-changelog` [`2163d0b`](https://github.com/inspect-js/has-symbols/commit/2163d0b7f36343076b8f947cd1667dd1750f26fc) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `core-js`, `safe-publish-latest`, `tape` [`8e0951f`](https://github.com/inspect-js/has-symbols/commit/8e0951f1a7a2e52068222b7bb73511761e6e4d9c) +- [actions] add automatic rebasing / merge commit blocking [`b09cdb7`](https://github.com/inspect-js/has-symbols/commit/b09cdb7cd7ee39e7a769878f56e2d6066f5ccd1d) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `safe-publish-latest`, `core-js`, `get-own-property-symbols`, `tape` [`1dd42cd`](https://github.com/inspect-js/has-symbols/commit/1dd42cd86183ed0c50f99b1062345c458babca91) +- [meta] create FUNDING.yml [`aa57a17`](https://github.com/inspect-js/has-symbols/commit/aa57a17b19708906d1927f821ea8e73394d84ca4) +- Only apps should have lockfiles [`a2d8bea`](https://github.com/inspect-js/has-symbols/commit/a2d8bea23a97d15c09eaf60f5b107fcf9a4d57aa) +- [Tests] use `npx aud` instead of `nsp` or `npm audit` with hoops [`9e96cb7`](https://github.com/inspect-js/has-symbols/commit/9e96cb783746cbed0c10ef78e599a8eaa7ebe193) +- [meta] add `funding` field [`a0b32cf`](https://github.com/inspect-js/has-symbols/commit/a0b32cf68e803f963c1639b6d47b0a9d6440bab0) +- [Dev Deps] update `safe-publish-latest` [`cb9f0a5`](https://github.com/inspect-js/has-symbols/commit/cb9f0a521a3a1790f1064d437edd33bb6c3d6af0) + +## v1.0.0 - 2016-09-19 + +### Commits + +- Tests. [`ecb6eb9`](https://github.com/inspect-js/has-symbols/commit/ecb6eb934e4883137f3f93b965ba5e0a98df430d) +- package.json [`88a337c`](https://github.com/inspect-js/has-symbols/commit/88a337cee0864a0da35f5d19e69ff0ef0150e46a) +- Initial commit [`42e1e55`](https://github.com/inspect-js/has-symbols/commit/42e1e5502536a2b8ac529c9443984acd14836b1c) +- Initial implementation. [`33f5cc6`](https://github.com/inspect-js/has-symbols/commit/33f5cc6cdff86e2194b081ee842bfdc63caf43fb) +- read me [`01f1170`](https://github.com/inspect-js/has-symbols/commit/01f1170188ff7cb1558aa297f6ba5b516c6d7b0c) diff --git a/node_modules/has-symbols/LICENSE b/node_modules/has-symbols/LICENSE new file mode 100644 index 0000000..df31cbf --- /dev/null +++ b/node_modules/has-symbols/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2016 Jordan Harband + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/has-symbols/README.md b/node_modules/has-symbols/README.md new file mode 100644 index 0000000..33905f0 --- /dev/null +++ b/node_modules/has-symbols/README.md @@ -0,0 +1,46 @@ +# has-symbols [![Version Badge][2]][1] + +[![github actions][actions-image]][actions-url] +[![coverage][codecov-image]][codecov-url] +[![dependency status][5]][6] +[![dev dependency status][7]][8] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][11]][1] + +Determine if the JS environment has Symbol support. Supports spec, or shams. + +## Example + +```js +var hasSymbols = require('has-symbols'); + +hasSymbols() === true; // if the environment has native Symbol support. Not polyfillable, not forgeable. + +var hasSymbolsKinda = require('has-symbols/shams'); +hasSymbolsKinda() === true; // if the environment has a Symbol sham that mostly follows the spec. +``` + +## Supported Symbol shams + - get-own-property-symbols [npm](https://www.npmjs.com/package/get-own-property-symbols) | [github](https://github.com/WebReflection/get-own-property-symbols) + - core-js [npm](https://www.npmjs.com/package/core-js) | [github](https://github.com/zloirock/core-js) + +## Tests +Simply clone the repo, `npm install`, and run `npm test` + +[1]: https://npmjs.org/package/has-symbols +[2]: https://versionbadg.es/inspect-js/has-symbols.svg +[5]: https://david-dm.org/inspect-js/has-symbols.svg +[6]: https://david-dm.org/inspect-js/has-symbols +[7]: https://david-dm.org/inspect-js/has-symbols/dev-status.svg +[8]: https://david-dm.org/inspect-js/has-symbols#info=devDependencies +[11]: https://nodei.co/npm/has-symbols.png?downloads=true&stars=true +[license-image]: https://img.shields.io/npm/l/has-symbols.svg +[license-url]: LICENSE +[downloads-image]: https://img.shields.io/npm/dm/has-symbols.svg +[downloads-url]: https://npm-stat.com/charts.html?package=has-symbols +[codecov-image]: https://codecov.io/gh/inspect-js/has-symbols/branch/main/graphs/badge.svg +[codecov-url]: https://app.codecov.io/gh/inspect-js/has-symbols/ +[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/inspect-js/has-symbols +[actions-url]: https://github.com/inspect-js/has-symbols/actions diff --git a/node_modules/has-symbols/index.d.ts b/node_modules/has-symbols/index.d.ts new file mode 100644 index 0000000..9b98595 --- /dev/null +++ b/node_modules/has-symbols/index.d.ts @@ -0,0 +1,3 @@ +declare function hasNativeSymbols(): boolean; + +export = hasNativeSymbols; \ No newline at end of file diff --git a/node_modules/has-symbols/index.js b/node_modules/has-symbols/index.js new file mode 100644 index 0000000..fa65265 --- /dev/null +++ b/node_modules/has-symbols/index.js @@ -0,0 +1,14 @@ +'use strict'; + +var origSymbol = typeof Symbol !== 'undefined' && Symbol; +var hasSymbolSham = require('./shams'); + +/** @type {import('.')} */ +module.exports = function hasNativeSymbols() { + if (typeof origSymbol !== 'function') { return false; } + if (typeof Symbol !== 'function') { return false; } + if (typeof origSymbol('foo') !== 'symbol') { return false; } + if (typeof Symbol('bar') !== 'symbol') { return false; } + + return hasSymbolSham(); +}; diff --git a/node_modules/has-symbols/package.json b/node_modules/has-symbols/package.json new file mode 100644 index 0000000..d835e20 --- /dev/null +++ b/node_modules/has-symbols/package.json @@ -0,0 +1,111 @@ +{ + "name": "has-symbols", + "version": "1.1.0", + "description": "Determine if the JS environment has Symbol support. Supports spec, or shams.", + "main": "index.js", + "scripts": { + "prepack": "npmignore --auto --commentLines=autogenerated", + "prepublishOnly": "safe-publish-latest", + "prepublish": "not-in-publish || npm run prepublishOnly", + "pretest": "npm run --silent lint", + "test": "npm run tests-only", + "posttest": "npx npm@'>=10.2' audit --production", + "tests-only": "npm run test:stock && npm run test:shams", + "test:stock": "nyc node test", + "test:staging": "nyc node --harmony --es-staging test", + "test:shams": "npm run --silent test:shams:getownpropertysymbols && npm run --silent test:shams:corejs", + "test:shams:corejs": "nyc node test/shams/core-js.js", + "test:shams:getownpropertysymbols": "nyc node test/shams/get-own-property-symbols.js", + "lint": "eslint --ext=js,mjs .", + "postlint": "tsc -p . && attw -P", + "version": "auto-changelog && git add CHANGELOG.md", + "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" + }, + "repository": { + "type": "git", + "url": "git://github.com/inspect-js/has-symbols.git" + }, + "keywords": [ + "Symbol", + "symbols", + "typeof", + "sham", + "polyfill", + "native", + "core-js", + "ES6" + ], + "author": { + "name": "Jordan Harband", + "email": "ljharb@gmail.com", + "url": "http://ljharb.codes" + }, + "contributors": [ + { + "name": "Jordan Harband", + "email": "ljharb@gmail.com", + "url": "http://ljharb.codes" + } + ], + "funding": { + "url": "https://github.com/sponsors/ljharb" + }, + "license": "MIT", + "bugs": { + "url": "https://github.com/ljharb/has-symbols/issues" + }, + "homepage": "https://github.com/ljharb/has-symbols#readme", + "devDependencies": { + "@arethetypeswrong/cli": "^0.17.0", + "@ljharb/eslint-config": "^21.1.1", + "@ljharb/tsconfig": "^0.2.0", + "@types/core-js": "^2.5.8", + "@types/tape": "^5.6.5", + "auto-changelog": "^2.5.0", + "core-js": "^2.6.12", + "encoding": "^0.1.13", + "eslint": "=8.8.0", + "get-own-property-symbols": "^0.9.5", + "in-publish": "^2.0.1", + "npmignore": "^0.3.1", + "nyc": "^10.3.2", + "safe-publish-latest": "^2.0.0", + "tape": "^5.9.0", + "typescript": "next" + }, + "testling": { + "files": "test/index.js", + "browsers": [ + "iexplore/6.0..latest", + "firefox/3.0..6.0", + "firefox/15.0..latest", + "firefox/nightly", + "chrome/4.0..10.0", + "chrome/20.0..latest", + "chrome/canary", + "opera/10.0..latest", + "opera/next", + "safari/4.0..latest", + "ipad/6.0..latest", + "iphone/6.0..latest", + "android-browser/4.2" + ] + }, + "engines": { + "node": ">= 0.4" + }, + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false, + "hideCredit": true + }, + "publishConfig": { + "ignore": [ + ".github/workflows", + "types" + ] + } +} diff --git a/node_modules/has-symbols/shams.d.ts b/node_modules/has-symbols/shams.d.ts new file mode 100644 index 0000000..8d0bf24 --- /dev/null +++ b/node_modules/has-symbols/shams.d.ts @@ -0,0 +1,3 @@ +declare function hasSymbolShams(): boolean; + +export = hasSymbolShams; \ No newline at end of file diff --git a/node_modules/has-symbols/shams.js b/node_modules/has-symbols/shams.js new file mode 100644 index 0000000..f97b474 --- /dev/null +++ b/node_modules/has-symbols/shams.js @@ -0,0 +1,45 @@ +'use strict'; + +/** @type {import('./shams')} */ +/* eslint complexity: [2, 18], max-statements: [2, 33] */ +module.exports = function hasSymbols() { + if (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; } + if (typeof Symbol.iterator === 'symbol') { return true; } + + /** @type {{ [k in symbol]?: unknown }} */ + var obj = {}; + var sym = Symbol('test'); + var symObj = Object(sym); + if (typeof sym === 'string') { return false; } + + if (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; } + if (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; } + + // temp disabled per https://github.com/ljharb/object.assign/issues/17 + // if (sym instanceof Symbol) { return false; } + // temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4 + // if (!(symObj instanceof Symbol)) { return false; } + + // if (typeof Symbol.prototype.toString !== 'function') { return false; } + // if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; } + + var symVal = 42; + obj[sym] = symVal; + for (var _ in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop + if (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; } + + if (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; } + + var syms = Object.getOwnPropertySymbols(obj); + if (syms.length !== 1 || syms[0] !== sym) { return false; } + + if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; } + + if (typeof Object.getOwnPropertyDescriptor === 'function') { + // eslint-disable-next-line no-extra-parens + var descriptor = /** @type {PropertyDescriptor} */ (Object.getOwnPropertyDescriptor(obj, sym)); + if (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; } + } + + return true; +}; diff --git a/node_modules/has-symbols/test/index.js b/node_modules/has-symbols/test/index.js new file mode 100644 index 0000000..352129c --- /dev/null +++ b/node_modules/has-symbols/test/index.js @@ -0,0 +1,22 @@ +'use strict'; + +var test = require('tape'); +var hasSymbols = require('../'); +var runSymbolTests = require('./tests'); + +test('interface', function (t) { + t.equal(typeof hasSymbols, 'function', 'is a function'); + t.equal(typeof hasSymbols(), 'boolean', 'returns a boolean'); + t.end(); +}); + +test('Symbols are supported', { skip: !hasSymbols() }, function (t) { + runSymbolTests(t); + t.end(); +}); + +test('Symbols are not supported', { skip: hasSymbols() }, function (t) { + t.equal(typeof Symbol, 'undefined', 'global Symbol is undefined'); + t.equal(typeof Object.getOwnPropertySymbols, 'undefined', 'Object.getOwnPropertySymbols does not exist'); + t.end(); +}); diff --git a/node_modules/has-symbols/test/shams/core-js.js b/node_modules/has-symbols/test/shams/core-js.js new file mode 100644 index 0000000..1a29024 --- /dev/null +++ b/node_modules/has-symbols/test/shams/core-js.js @@ -0,0 +1,29 @@ +'use strict'; + +var test = require('tape'); + +if (typeof Symbol === 'function' && typeof Symbol() === 'symbol') { + test('has native Symbol support', function (t) { + t.equal(typeof Symbol, 'function'); + t.equal(typeof Symbol(), 'symbol'); + t.end(); + }); + // @ts-expect-error TS is stupid and doesn't know about top level return + return; +} + +var hasSymbols = require('../../shams'); + +test('polyfilled Symbols', function (t) { + /* eslint-disable global-require */ + t.equal(hasSymbols(), false, 'hasSymbols is false before polyfilling'); + require('core-js/fn/symbol'); + require('core-js/fn/symbol/to-string-tag'); + + require('../tests')(t); + + var hasSymbolsAfter = hasSymbols(); + t.equal(hasSymbolsAfter, true, 'hasSymbols is true after polyfilling'); + /* eslint-enable global-require */ + t.end(); +}); diff --git a/node_modules/has-symbols/test/shams/get-own-property-symbols.js b/node_modules/has-symbols/test/shams/get-own-property-symbols.js new file mode 100644 index 0000000..e0296f8 --- /dev/null +++ b/node_modules/has-symbols/test/shams/get-own-property-symbols.js @@ -0,0 +1,29 @@ +'use strict'; + +var test = require('tape'); + +if (typeof Symbol === 'function' && typeof Symbol() === 'symbol') { + test('has native Symbol support', function (t) { + t.equal(typeof Symbol, 'function'); + t.equal(typeof Symbol(), 'symbol'); + t.end(); + }); + // @ts-expect-error TS is stupid and doesn't know about top level return + return; +} + +var hasSymbols = require('../../shams'); + +test('polyfilled Symbols', function (t) { + /* eslint-disable global-require */ + t.equal(hasSymbols(), false, 'hasSymbols is false before polyfilling'); + + require('get-own-property-symbols'); + + require('../tests')(t); + + var hasSymbolsAfter = hasSymbols(); + t.equal(hasSymbolsAfter, true, 'hasSymbols is true after polyfilling'); + /* eslint-enable global-require */ + t.end(); +}); diff --git a/node_modules/has-symbols/test/tests.js b/node_modules/has-symbols/test/tests.js new file mode 100644 index 0000000..66a2cb8 --- /dev/null +++ b/node_modules/has-symbols/test/tests.js @@ -0,0 +1,58 @@ +'use strict'; + +/** @type {(t: import('tape').Test) => false | void} */ +// eslint-disable-next-line consistent-return +module.exports = function runSymbolTests(t) { + t.equal(typeof Symbol, 'function', 'global Symbol is a function'); + + if (typeof Symbol !== 'function') { return false; } + + t.notEqual(Symbol(), Symbol(), 'two symbols are not equal'); + + /* + t.equal( + Symbol.prototype.toString.call(Symbol('foo')), + Symbol.prototype.toString.call(Symbol('foo')), + 'two symbols with the same description stringify the same' + ); + */ + + /* + var foo = Symbol('foo'); + + t.notEqual( + String(foo), + String(Symbol('bar')), + 'two symbols with different descriptions do not stringify the same' + ); + */ + + t.equal(typeof Symbol.prototype.toString, 'function', 'Symbol#toString is a function'); + // t.equal(String(foo), Symbol.prototype.toString.call(foo), 'Symbol#toString equals String of the same symbol'); + + t.equal(typeof Object.getOwnPropertySymbols, 'function', 'Object.getOwnPropertySymbols is a function'); + + /** @type {{ [k in symbol]?: unknown }} */ + var obj = {}; + var sym = Symbol('test'); + var symObj = Object(sym); + t.notEqual(typeof sym, 'string', 'Symbol is not a string'); + t.equal(Object.prototype.toString.call(sym), '[object Symbol]', 'symbol primitive Object#toStrings properly'); + t.equal(Object.prototype.toString.call(symObj), '[object Symbol]', 'symbol primitive Object#toStrings properly'); + + var symVal = 42; + obj[sym] = symVal; + // eslint-disable-next-line no-restricted-syntax, no-unused-vars + for (var _ in obj) { t.fail('symbol property key was found in for..in of object'); } + + t.deepEqual(Object.keys(obj), [], 'no enumerable own keys on symbol-valued object'); + t.deepEqual(Object.getOwnPropertyNames(obj), [], 'no own names on symbol-valued object'); + t.deepEqual(Object.getOwnPropertySymbols(obj), [sym], 'one own symbol on symbol-valued object'); + t.equal(Object.prototype.propertyIsEnumerable.call(obj, sym), true, 'symbol is enumerable'); + t.deepEqual(Object.getOwnPropertyDescriptor(obj, sym), { + configurable: true, + enumerable: true, + value: 42, + writable: true + }, 'property descriptor is correct'); +}; diff --git a/node_modules/has-symbols/tsconfig.json b/node_modules/has-symbols/tsconfig.json new file mode 100644 index 0000000..ba99af4 --- /dev/null +++ b/node_modules/has-symbols/tsconfig.json @@ -0,0 +1,10 @@ +{ + "extends": "@ljharb/tsconfig", + "compilerOptions": { + "target": "ES2021", + "maxNodeModuleJsDepth": 0, + }, + "exclude": [ + "coverage" + ] +} diff --git a/node_modules/has-tostringtag/.eslintrc b/node_modules/has-tostringtag/.eslintrc new file mode 100644 index 0000000..3b5d9e9 --- /dev/null +++ b/node_modules/has-tostringtag/.eslintrc @@ -0,0 +1,5 @@ +{ + "root": true, + + "extends": "@ljharb", +} diff --git a/node_modules/has-tostringtag/.github/FUNDING.yml b/node_modules/has-tostringtag/.github/FUNDING.yml new file mode 100644 index 0000000..7a450e7 --- /dev/null +++ b/node_modules/has-tostringtag/.github/FUNDING.yml @@ -0,0 +1,12 @@ +# These are supported funding model platforms + +github: [ljharb] +patreon: # Replace with a single Patreon username +open_collective: # Replace with a single Open Collective username +ko_fi: # Replace with a single Ko-fi username +tidelift: npm/has-tostringtag +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +otechie: # Replace with a single Otechie username +custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/node_modules/has-tostringtag/.nycrc b/node_modules/has-tostringtag/.nycrc new file mode 100644 index 0000000..1826526 --- /dev/null +++ b/node_modules/has-tostringtag/.nycrc @@ -0,0 +1,13 @@ +{ + "all": true, + "check-coverage": false, + "reporter": ["text-summary", "text", "html", "json"], + "lines": 86, + "statements": 85.93, + "functions": 82.43, + "branches": 76.06, + "exclude": [ + "coverage", + "test" + ] +} diff --git a/node_modules/has-tostringtag/CHANGELOG.md b/node_modules/has-tostringtag/CHANGELOG.md new file mode 100644 index 0000000..eb186ec --- /dev/null +++ b/node_modules/has-tostringtag/CHANGELOG.md @@ -0,0 +1,42 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [v1.0.2](https://github.com/inspect-js/has-tostringtag/compare/v1.0.1...v1.0.2) - 2024-02-01 + +### Fixed + +- [Fix] move `has-symbols` back to prod deps [`#3`](https://github.com/inspect-js/has-tostringtag/issues/3) + +## [v1.0.1](https://github.com/inspect-js/has-tostringtag/compare/v1.0.0...v1.0.1) - 2024-02-01 + +### Commits + +- [patch] add types [`9276414`](https://github.com/inspect-js/has-tostringtag/commit/9276414b22fab3eeb234688841722c4be113201f) +- [meta] use `npmignore` to autogenerate an npmignore file [`5c0dcd1`](https://github.com/inspect-js/has-tostringtag/commit/5c0dcd1ff66419562a30d1fd88b966cc36bce5fc) +- [actions] reuse common workflows [`dee9509`](https://github.com/inspect-js/has-tostringtag/commit/dee950904ab5719b62cf8d73d2ac950b09093266) +- [actions] update codecov uploader [`b8cb3a0`](https://github.com/inspect-js/has-tostringtag/commit/b8cb3a0b8ffbb1593012c4c2daa45fb25642825d) +- [Tests] generate coverage [`be5b288`](https://github.com/inspect-js/has-tostringtag/commit/be5b28889e2735cdbcef387f84c2829995f2f05e) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `safe-publish-latest`, `tape` [`69a0827`](https://github.com/inspect-js/has-tostringtag/commit/69a0827974e9b877b2c75b70b057555da8f25a65) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `tape` [`4c9e210`](https://github.com/inspect-js/has-tostringtag/commit/4c9e210a5682f0557a3235d36b68ce809d7fb825) +- [actions] update rebase action to use reusable workflow [`ca8dcd3`](https://github.com/inspect-js/has-tostringtag/commit/ca8dcd3a6f3f5805d7e3fd461b654aedba0946e7) +- [Dev Deps] update `@ljharb/eslint-config`, `aud`, `npmignore`, `tape` [`07f3eaf`](https://github.com/inspect-js/has-tostringtag/commit/07f3eafa45dd98208c94479737da77f9a69b94c4) +- [Deps] update `has-symbols` [`999e009`](https://github.com/inspect-js/has-tostringtag/commit/999e0095a7d1749a58f55472ec8bf8108cdfdcf3) +- [Tests] remove staging tests since they fail on modern node [`9d9526b`](https://github.com/inspect-js/has-tostringtag/commit/9d9526b1dc1ca7f2292b52efda4c3d857b0e39bd) + +## v1.0.0 - 2021-08-05 + +### Commits + +- Tests [`6b6f573`](https://github.com/inspect-js/has-tostringtag/commit/6b6f5734dc2058badb300ff0783efdad95fe1a65) +- Initial commit [`2f8190e`](https://github.com/inspect-js/has-tostringtag/commit/2f8190e799fac32ba9b95a076c0255e01d7ce475) +- [meta] do not publish github action workflow files [`6e08cc4`](https://github.com/inspect-js/has-tostringtag/commit/6e08cc4e0fea7ec71ef66e70734b2af2c4a8b71b) +- readme [`94bed6c`](https://github.com/inspect-js/has-tostringtag/commit/94bed6c9560cbbfda034f8d6c260bb7b0db33c1a) +- npm init [`be67840`](https://github.com/inspect-js/has-tostringtag/commit/be67840ab92ee7adb98bcc65261975543f815fa5) +- Implementation [`c4914ec`](https://github.com/inspect-js/has-tostringtag/commit/c4914ecc51ddee692c85b471ae0a5d8123030fbf) +- [meta] use `auto-changelog` [`4aaf768`](https://github.com/inspect-js/has-tostringtag/commit/4aaf76895ae01d7b739f2b19f967ef2372506cd7) +- Only apps should have lockfiles [`bc4d99e`](https://github.com/inspect-js/has-tostringtag/commit/bc4d99e4bf494afbaa235c5f098df6e642edf724) +- [meta] add `safe-publish-latest` [`6523c05`](https://github.com/inspect-js/has-tostringtag/commit/6523c05c9b87140f3ae74c9daf91633dd9ff4e1f) diff --git a/node_modules/has-tostringtag/LICENSE b/node_modules/has-tostringtag/LICENSE new file mode 100644 index 0000000..7948bc0 --- /dev/null +++ b/node_modules/has-tostringtag/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2021 Inspect JS + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/has-tostringtag/README.md b/node_modules/has-tostringtag/README.md new file mode 100644 index 0000000..67a5e92 --- /dev/null +++ b/node_modules/has-tostringtag/README.md @@ -0,0 +1,46 @@ +# has-tostringtag [![Version Badge][2]][1] + +[![github actions][actions-image]][actions-url] +[![coverage][codecov-image]][codecov-url] +[![dependency status][5]][6] +[![dev dependency status][7]][8] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][11]][1] + +Determine if the JS environment has `Symbol.toStringTag` support. Supports spec, or shams. + +## Example + +```js +var hasSymbolToStringTag = require('has-tostringtag'); + +hasSymbolToStringTag() === true; // if the environment has native Symbol.toStringTag support. Not polyfillable, not forgeable. + +var hasSymbolToStringTagKinda = require('has-tostringtag/shams'); +hasSymbolToStringTagKinda() === true; // if the environment has a Symbol.toStringTag sham that mostly follows the spec. +``` + +## Supported Symbol shams + - get-own-property-symbols [npm](https://www.npmjs.com/package/get-own-property-symbols) | [github](https://github.com/WebReflection/get-own-property-symbols) + - core-js [npm](https://www.npmjs.com/package/core-js) | [github](https://github.com/zloirock/core-js) + +## Tests +Simply clone the repo, `npm install`, and run `npm test` + +[1]: https://npmjs.org/package/has-tostringtag +[2]: https://versionbadg.es/inspect-js/has-tostringtag.svg +[5]: https://david-dm.org/inspect-js/has-tostringtag.svg +[6]: https://david-dm.org/inspect-js/has-tostringtag +[7]: https://david-dm.org/inspect-js/has-tostringtag/dev-status.svg +[8]: https://david-dm.org/inspect-js/has-tostringtag#info=devDependencies +[11]: https://nodei.co/npm/has-tostringtag.png?downloads=true&stars=true +[license-image]: https://img.shields.io/npm/l/has-tostringtag.svg +[license-url]: LICENSE +[downloads-image]: https://img.shields.io/npm/dm/has-tostringtag.svg +[downloads-url]: https://npm-stat.com/charts.html?package=has-tostringtag +[codecov-image]: https://codecov.io/gh/inspect-js/has-tostringtag/branch/main/graphs/badge.svg +[codecov-url]: https://app.codecov.io/gh/inspect-js/has-tostringtag/ +[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/inspect-js/has-tostringtag +[actions-url]: https://github.com/inspect-js/has-tostringtag/actions diff --git a/node_modules/has-tostringtag/index.d.ts b/node_modules/has-tostringtag/index.d.ts new file mode 100644 index 0000000..a61bc60 --- /dev/null +++ b/node_modules/has-tostringtag/index.d.ts @@ -0,0 +1,3 @@ +declare function hasToStringTag(): boolean; + +export = hasToStringTag; diff --git a/node_modules/has-tostringtag/index.js b/node_modules/has-tostringtag/index.js new file mode 100644 index 0000000..77bfa00 --- /dev/null +++ b/node_modules/has-tostringtag/index.js @@ -0,0 +1,8 @@ +'use strict'; + +var hasSymbols = require('has-symbols'); + +/** @type {import('.')} */ +module.exports = function hasToStringTag() { + return hasSymbols() && typeof Symbol.toStringTag === 'symbol'; +}; diff --git a/node_modules/has-tostringtag/package.json b/node_modules/has-tostringtag/package.json new file mode 100644 index 0000000..e5b0300 --- /dev/null +++ b/node_modules/has-tostringtag/package.json @@ -0,0 +1,108 @@ +{ + "name": "has-tostringtag", + "version": "1.0.2", + "author": { + "name": "Jordan Harband", + "email": "ljharb@gmail.com", + "url": "http://ljharb.codes" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + }, + "contributors": [ + { + "name": "Jordan Harband", + "email": "ljharb@gmail.com", + "url": "http://ljharb.codes" + } + ], + "description": "Determine if the JS environment has `Symbol.toStringTag` support. Supports spec, or shams.", + "license": "MIT", + "main": "index.js", + "types": "./index.d.ts", + "exports": { + ".": [ + { + "types": "./index.d.ts", + "default": "./index.js" + }, + "./index.js" + ], + "./shams": [ + { + "types": "./shams.d.ts", + "default": "./shams.js" + }, + "./shams.js" + ], + "./package.json": "./package.json" + }, + "scripts": { + "prepack": "npmignore --auto --commentLines=autogenerated", + "prepublishOnly": "safe-publish-latest", + "prepublish": "not-in-publish || npm run prepublishOnly", + "pretest": "npm run --silent lint", + "test": "npm run tests-only", + "posttest": "aud --production", + "tests-only": "npm run test:stock && npm run test:shams", + "test:stock": "nyc node test", + "test:staging": "nyc node --harmony --es-staging test", + "test:shams": "npm run --silent test:shams:getownpropertysymbols && npm run --silent test:shams:corejs", + "test:shams:corejs": "nyc node test/shams/core-js.js", + "test:shams:getownpropertysymbols": "nyc node test/shams/get-own-property-symbols.js", + "lint": "eslint --ext=js,mjs .", + "version": "auto-changelog && git add CHANGELOG.md", + "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/inspect-js/has-tostringtag.git" + }, + "bugs": { + "url": "https://github.com/inspect-js/has-tostringtag/issues" + }, + "homepage": "https://github.com/inspect-js/has-tostringtag#readme", + "keywords": [ + "javascript", + "ecmascript", + "symbol", + "symbols", + "tostringtag", + "Symbol.toStringTag" + ], + "devDependencies": { + "@ljharb/eslint-config": "^21.1.0", + "@types/has-symbols": "^1.0.2", + "@types/tape": "^5.6.4", + "aud": "^2.0.4", + "auto-changelog": "^2.4.0", + "core-js": "^2.6.12", + "eslint": "=8.8.0", + "get-own-property-symbols": "^0.9.5", + "in-publish": "^2.0.1", + "npmignore": "^0.3.1", + "nyc": "^10.3.2", + "safe-publish-latest": "^2.0.0", + "tape": "^5.7.4", + "typescript": "next" + }, + "engines": { + "node": ">= 0.4" + }, + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false, + "hideCredit": true + }, + "publishConfig": { + "ignore": [ + ".github/workflows" + ] + }, + "dependencies": { + "has-symbols": "^1.0.3" + } +} diff --git a/node_modules/has-tostringtag/shams.d.ts b/node_modules/has-tostringtag/shams.d.ts new file mode 100644 index 0000000..ea4aeec --- /dev/null +++ b/node_modules/has-tostringtag/shams.d.ts @@ -0,0 +1,3 @@ +declare function hasToStringTagShams(): boolean; + +export = hasToStringTagShams; diff --git a/node_modules/has-tostringtag/shams.js b/node_modules/has-tostringtag/shams.js new file mode 100644 index 0000000..809580d --- /dev/null +++ b/node_modules/has-tostringtag/shams.js @@ -0,0 +1,8 @@ +'use strict'; + +var hasSymbols = require('has-symbols/shams'); + +/** @type {import('.')} */ +module.exports = function hasToStringTagShams() { + return hasSymbols() && !!Symbol.toStringTag; +}; diff --git a/node_modules/has-tostringtag/test/index.js b/node_modules/has-tostringtag/test/index.js new file mode 100644 index 0000000..0679afd --- /dev/null +++ b/node_modules/has-tostringtag/test/index.js @@ -0,0 +1,21 @@ +'use strict'; + +var test = require('tape'); +var hasSymbolToStringTag = require('../'); +var runSymbolTests = require('./tests'); + +test('interface', function (t) { + t.equal(typeof hasSymbolToStringTag, 'function', 'is a function'); + t.equal(typeof hasSymbolToStringTag(), 'boolean', 'returns a boolean'); + t.end(); +}); + +test('Symbol.toStringTag exists', { skip: !hasSymbolToStringTag() }, function (t) { + runSymbolTests(t); + t.end(); +}); + +test('Symbol.toStringTag does not exist', { skip: hasSymbolToStringTag() }, function (t) { + t.equal(typeof Symbol === 'undefined' ? 'undefined' : typeof Symbol.toStringTag, 'undefined', 'global Symbol.toStringTag is undefined'); + t.end(); +}); diff --git a/node_modules/has-tostringtag/test/shams/core-js.js b/node_modules/has-tostringtag/test/shams/core-js.js new file mode 100644 index 0000000..7ab214d --- /dev/null +++ b/node_modules/has-tostringtag/test/shams/core-js.js @@ -0,0 +1,31 @@ +'use strict'; + +var test = require('tape'); + +if (typeof Symbol === 'function' && typeof Symbol.toStringTag === 'symbol') { + test('has native Symbol.toStringTag support', function (t) { + t.equal(typeof Symbol, 'function'); + t.equal(typeof Symbol.toStringTag, 'symbol'); + t.end(); + }); + // @ts-expect-error CJS has top-level return + return; +} + +var hasSymbolToStringTag = require('../../shams'); + +test('polyfilled Symbols', function (t) { + /* eslint-disable global-require */ + t.equal(hasSymbolToStringTag(), false, 'hasSymbolToStringTag is false before polyfilling'); + // @ts-expect-error no types defined + require('core-js/fn/symbol'); + // @ts-expect-error no types defined + require('core-js/fn/symbol/to-string-tag'); + + require('../tests')(t); + + var hasToStringTagAfter = hasSymbolToStringTag(); + t.equal(hasToStringTagAfter, true, 'hasSymbolToStringTag is true after polyfilling'); + /* eslint-enable global-require */ + t.end(); +}); diff --git a/node_modules/has-tostringtag/test/shams/get-own-property-symbols.js b/node_modules/has-tostringtag/test/shams/get-own-property-symbols.js new file mode 100644 index 0000000..c8af44c --- /dev/null +++ b/node_modules/has-tostringtag/test/shams/get-own-property-symbols.js @@ -0,0 +1,30 @@ +'use strict'; + +var test = require('tape'); + +if (typeof Symbol === 'function' && typeof Symbol() === 'symbol') { + test('has native Symbol support', function (t) { + t.equal(typeof Symbol, 'function'); + t.equal(typeof Symbol(), 'symbol'); + t.end(); + }); + // @ts-expect-error CJS has top-level return + return; +} + +var hasSymbolToStringTag = require('../../shams'); + +test('polyfilled Symbols', function (t) { + /* eslint-disable global-require */ + t.equal(hasSymbolToStringTag(), false, 'hasSymbolToStringTag is false before polyfilling'); + + // @ts-expect-error no types defined + require('get-own-property-symbols'); + + require('../tests')(t); + + var hasToStringTagAfter = hasSymbolToStringTag(); + t.equal(hasToStringTagAfter, true, 'hasSymbolToStringTag is true after polyfilling'); + /* eslint-enable global-require */ + t.end(); +}); diff --git a/node_modules/has-tostringtag/test/tests.js b/node_modules/has-tostringtag/test/tests.js new file mode 100644 index 0000000..2aa0d48 --- /dev/null +++ b/node_modules/has-tostringtag/test/tests.js @@ -0,0 +1,15 @@ +'use strict'; + +// eslint-disable-next-line consistent-return +module.exports = /** @type {(t: import('tape').Test) => void | false} */ function runSymbolTests(t) { + t.equal(typeof Symbol, 'function', 'global Symbol is a function'); + t.ok(Symbol.toStringTag, 'Symbol.toStringTag exists'); + + if (typeof Symbol !== 'function' || !Symbol.toStringTag) { return false; } + + /** @type {{ [Symbol.toStringTag]?: 'test'}} */ + var obj = {}; + obj[Symbol.toStringTag] = 'test'; + + t.equal(Object.prototype.toString.call(obj), '[object test]'); +}; diff --git a/node_modules/has-tostringtag/tsconfig.json b/node_modules/has-tostringtag/tsconfig.json new file mode 100644 index 0000000..2002ce5 --- /dev/null +++ b/node_modules/has-tostringtag/tsconfig.json @@ -0,0 +1,49 @@ +{ + "compilerOptions": { + /* Visit https://aka.ms/tsconfig to read more about this file */ + + /* Projects */ + + /* Language and Environment */ + "target": "ESNext", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */ + // "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */ + // "noLib": true, /* Disable including any library files, including the default lib.d.ts. */ + "useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */ + // "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */ + + /* Modules */ + "module": "commonjs", /* Specify what module code is generated. */ + // "rootDir": "./", /* Specify the root folder within your source files. */ + // "moduleResolution": "node10", /* Specify how TypeScript looks up a file from a given module specifier. */ + // "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */ + // "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */ + // "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */ + "typeRoots": ["types"], /* Specify multiple folders that act like './node_modules/@types'. */ + "resolveJsonModule": true, /* Enable importing .json files. */ + // "allowArbitraryExtensions": true, /* Enable importing files with any extension, provided a declaration file is present. */ + + /* JavaScript Support */ + "allowJs": true, /* Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files. */ + "checkJs": true, /* Enable error reporting in type-checked JavaScript files. */ + "maxNodeModuleJsDepth": 0, /* Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'. */ + + /* Emit */ + "declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */ + "declarationMap": true, /* Create sourcemaps for d.ts files. */ + "noEmit": true, /* Disable emitting files from a compilation. */ + + /* Interop Constraints */ + "allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */ + "esModuleInterop": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */ + "forceConsistentCasingInFileNames": true, /* Ensure that casing is correct in imports. */ + + /* Type Checking */ + "strict": true, /* Enable all strict type-checking options. */ + + /* Completeness */ + //"skipLibCheck": true /* Skip type checking all .d.ts files. */ + }, + "exclude": [ + "coverage" + ] +} diff --git a/node_modules/hasown/.github/FUNDING.yml b/node_modules/hasown/.github/FUNDING.yml new file mode 100644 index 0000000..d68c8b7 --- /dev/null +++ b/node_modules/hasown/.github/FUNDING.yml @@ -0,0 +1,12 @@ +# These are supported funding model platforms + +github: [ljharb] +patreon: # Replace with a single Patreon username +open_collective: # Replace with a single Open Collective username +ko_fi: # Replace with a single Ko-fi username +tidelift: npm/hasown +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +otechie: # Replace with a single Otechie username +custom: # Replace with a single custom sponsorship URL diff --git a/node_modules/hasown/.nycrc b/node_modules/hasown/.nycrc new file mode 100644 index 0000000..1826526 --- /dev/null +++ b/node_modules/hasown/.nycrc @@ -0,0 +1,13 @@ +{ + "all": true, + "check-coverage": false, + "reporter": ["text-summary", "text", "html", "json"], + "lines": 86, + "statements": 85.93, + "functions": 82.43, + "branches": 76.06, + "exclude": [ + "coverage", + "test" + ] +} diff --git a/node_modules/hasown/CHANGELOG.md b/node_modules/hasown/CHANGELOG.md new file mode 100644 index 0000000..90a43dc --- /dev/null +++ b/node_modules/hasown/CHANGELOG.md @@ -0,0 +1,58 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [v2.0.4](https://github.com/inspect-js/hasOwn/compare/v2.0.3...v2.0.4) - 2026-05-28 + +### Commits + +- [types] drop the dead key-narrowing overload [`fdab00e`](https://github.com/inspect-js/hasOwn/commit/fdab00e2703e65411424e19bf86a7e72a8f10da9) +- [Dev Deps] update `@ljharb/eslint-config`, `auto-changelog`, `eslint` [`91f6247`](https://github.com/inspect-js/hasOwn/commit/91f624768dd0f7db0d019b89d4d86bd66e20ec30) + +## [v2.0.3](https://github.com/inspect-js/hasOwn/compare/v2.0.2...v2.0.3) - 2026-04-17 + +### Commits + +- [actions] update workflows [`fb837b8`](https://github.com/inspect-js/hasOwn/commit/fb837b849bcdb8416fdc8fd344edfacd5574696c) +- [Dev Deps] update `@arethetypeswrong/cli`, `@ljharb/eslint-config`, `@ljharb/tsconfig`, `@types/tape`, `auto-changelog`, `eslint`, `mock-property`, `npmignore`, `tape` [`f4b279b`](https://github.com/inspect-js/hasOwn/commit/f4b279bd682be34b3f0ede2a58d4e8acb58d6d47) +- [Dev Deps] update `eslint`, `@ljharb/eslint-config`; migrate to flat config [`7e415ce`](https://github.com/inspect-js/hasOwn/commit/7e415cee55ebf43b3c34d7fd86db73a9928b05f7) +- [Dev Deps] update `eslint` [`ef313da`](https://github.com/inspect-js/hasOwn/commit/ef313da342d33b60e23e738b9f5a86f6065f39ef) +- [meta] use `npm audit` instead of `aud` [`d5c6d4d`](https://github.com/inspect-js/hasOwn/commit/d5c6d4d7a19c6ca4f14ac173b30d8bf25abcabee) +- [types] add overload that narrows the key [`cc03a09`](https://github.com/inspect-js/hasOwn/commit/cc03a097e9402fb8b86d413050e67f790dd6c8c5) + +## [v2.0.2](https://github.com/inspect-js/hasOwn/compare/v2.0.1...v2.0.2) - 2024-03-10 + +### Commits + +- [types] use shared config [`68e9d4d`](https://github.com/inspect-js/hasOwn/commit/68e9d4dab6facb4f05f02c6baea94a3f2a4e44b2) +- [actions] remove redundant finisher; use reusable workflow [`241a68e`](https://github.com/inspect-js/hasOwn/commit/241a68e13ea1fe52bec5ba7f74144befc31fae7b) +- [Tests] increase coverage [`4125c0d`](https://github.com/inspect-js/hasOwn/commit/4125c0d6121db56ae30e38346dfb0c000b04f0a7) +- [Tests] skip `npm ls` in old node due to TS [`01b9282`](https://github.com/inspect-js/hasOwn/commit/01b92822f9971dea031eafdd14767df41d61c202) +- [types] improve predicate type [`d340f85`](https://github.com/inspect-js/hasOwn/commit/d340f85ce02e286ef61096cbbb6697081d40a12b) +- [Dev Deps] update `tape` [`70089fc`](https://github.com/inspect-js/hasOwn/commit/70089fcf544e64acc024cbe60f5a9b00acad86de) +- [Tests] use `@arethetypeswrong/cli` [`50b272c`](https://github.com/inspect-js/hasOwn/commit/50b272c829f40d053a3dd91c9796e0ac0b2af084) + +## [v2.0.1](https://github.com/inspect-js/hasOwn/compare/v2.0.0...v2.0.1) - 2024-02-10 + +### Commits + +- [types] use a handwritten d.ts file; fix exported type [`012b989`](https://github.com/inspect-js/hasOwn/commit/012b9898ccf91dc441e2ebf594ff70270a5fda58) +- [Dev Deps] update `@types/function-bind`, `@types/mock-property`, `@types/tape`, `aud`, `mock-property`, `npmignore`, `tape`, `typescript` [`977a56f`](https://github.com/inspect-js/hasOwn/commit/977a56f51a1f8b20566f3c471612137894644025) +- [meta] add `sideEffects` flag [`3a60b7b`](https://github.com/inspect-js/hasOwn/commit/3a60b7bf42fccd8c605e5f145a6fcc83b13cb46f) + +## [v2.0.0](https://github.com/inspect-js/hasOwn/compare/v1.0.1...v2.0.0) - 2023-10-19 + +### Commits + +- revamped implementation, tests, readme [`72bf8b3`](https://github.com/inspect-js/hasOwn/commit/72bf8b338e77a638f0a290c63ffaed18339c36b4) +- [meta] revamp package.json [`079775f`](https://github.com/inspect-js/hasOwn/commit/079775fb1ec72c1c6334069593617a0be3847458) +- Only apps should have lockfiles [`6640e23`](https://github.com/inspect-js/hasOwn/commit/6640e233d1bb8b65260880f90787637db157d215) + +## v1.0.1 - 2023-10-10 + +### Commits + +- Initial commit [`8dbfde6`](https://github.com/inspect-js/hasOwn/commit/8dbfde6e8fb0ebb076fab38d138f2984eb340a62) diff --git a/node_modules/hasown/LICENSE b/node_modules/hasown/LICENSE new file mode 100644 index 0000000..0314929 --- /dev/null +++ b/node_modules/hasown/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) Jordan Harband and contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/hasown/README.md b/node_modules/hasown/README.md new file mode 100644 index 0000000..f759b8a --- /dev/null +++ b/node_modules/hasown/README.md @@ -0,0 +1,40 @@ +# hasown [![Version Badge][npm-version-svg]][package-url] + +[![github actions][actions-image]][actions-url] +[![coverage][codecov-image]][codecov-url] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][npm-badge-png]][package-url] + +A robust, ES3 compatible, "has own property" predicate. + +## Example + +```js +const assert = require('assert'); +const hasOwn = require('hasown'); + +assert.equal(hasOwn({}, 'toString'), false); +assert.equal(hasOwn([], 'length'), true); +assert.equal(hasOwn({ a: 42 }, 'a'), true); +``` + +## Tests +Simply clone the repo, `npm install`, and run `npm test` + +[package-url]: https://npmjs.org/package/hasown +[npm-version-svg]: https://versionbadg.es/inspect-js/hasown.svg +[deps-svg]: https://david-dm.org/inspect-js/hasOwn.svg +[deps-url]: https://david-dm.org/inspect-js/hasOwn +[dev-deps-svg]: https://david-dm.org/inspect-js/hasOwn/dev-status.svg +[dev-deps-url]: https://david-dm.org/inspect-js/hasOwn#info=devDependencies +[npm-badge-png]: https://nodei.co/npm/hasown.png?downloads=true&stars=true +[license-image]: https://img.shields.io/npm/l/hasown.svg +[license-url]: LICENSE +[downloads-image]: https://img.shields.io/npm/dm/hasown.svg +[downloads-url]: https://npm-stat.com/charts.html?package=hasown +[codecov-image]: https://codecov.io/gh/inspect-js/hasOwn/branch/main/graphs/badge.svg +[codecov-url]: https://app.codecov.io/gh/inspect-js/hasOwn/ +[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/inspect-js/hasOwn +[actions-url]: https://github.com/inspect-js/hasOwn/actions diff --git a/node_modules/hasown/eslint.config.mjs b/node_modules/hasown/eslint.config.mjs new file mode 100644 index 0000000..3d634a0 --- /dev/null +++ b/node_modules/hasown/eslint.config.mjs @@ -0,0 +1,6 @@ +import ljharbConfig from '@ljharb/eslint-config/flat'; + +export default [ + ...ljharbConfig, + { rules: { 'no-extra-parens': 'off' } }, +]; diff --git a/node_modules/hasown/index.d.ts b/node_modules/hasown/index.d.ts new file mode 100644 index 0000000..aafdf3b --- /dev/null +++ b/node_modules/hasown/index.d.ts @@ -0,0 +1,3 @@ +declare function hasOwn(o: O, p: K): o is O & Record; + +export = hasOwn; diff --git a/node_modules/hasown/index.js b/node_modules/hasown/index.js new file mode 100644 index 0000000..34e6059 --- /dev/null +++ b/node_modules/hasown/index.js @@ -0,0 +1,8 @@ +'use strict'; + +var call = Function.prototype.call; +var $hasOwn = Object.prototype.hasOwnProperty; +var bind = require('function-bind'); + +/** @type {import('.')} */ +module.exports = bind.call(call, $hasOwn); diff --git a/node_modules/hasown/package.json b/node_modules/hasown/package.json new file mode 100644 index 0000000..fb86cc3 --- /dev/null +++ b/node_modules/hasown/package.json @@ -0,0 +1,91 @@ +{ + "name": "hasown", + "version": "2.0.4", + "description": "A robust, ES3 compatible, \"has own property\" predicate.", + "main": "index.js", + "exports": { + ".": "./index.js", + "./package.json": "./package.json" + }, + "types": "index.d.ts", + "sideEffects": false, + "scripts": { + "prepack": "npmignore --auto --commentLines=autogenerated", + "prepublish": "not-in-publish || npm run prepublishOnly", + "prepublishOnly": "safe-publish-latest", + "prelint": "evalmd README.md", + "lint": "eslint .", + "postlint": "npm run tsc", + "pretest": "npm run lint", + "tsc": "tsc -p .", + "posttsc": "attw -P", + "tests-only": "nyc tape 'test/**/*.js'", + "test": "npm run tests-only", + "posttest": "npx npm@\">= 10.2\" audit --production", + "version": "auto-changelog && git add CHANGELOG.md", + "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/inspect-js/hasOwn.git" + }, + "keywords": [ + "has", + "hasOwnProperty", + "hasOwn", + "has-own", + "own", + "has", + "property", + "in", + "javascript", + "ecmascript" + ], + "author": "Jordan Harband ", + "license": "MIT", + "bugs": { + "url": "https://github.com/inspect-js/hasOwn/issues" + }, + "homepage": "https://github.com/inspect-js/hasOwn#readme", + "dependencies": { + "function-bind": "^1.1.2" + }, + "devDependencies": { + "@arethetypeswrong/cli": "^0.18.2", + "@ljharb/eslint-config": "^22.2.3", + "@ljharb/tsconfig": "^0.3.2", + "@types/function-bind": "^1.1.10", + "@types/tape": "^5.8.1", + "auto-changelog": "^2.5.1", + "eslint": "^10.4.0", + "evalmd": "^0.0.19", + "in-publish": "^2.0.1", + "jiti": "^0.0.0", + "mock-property": "^1.1.0", + "npmignore": "^0.3.5", + "nyc": "^10.3.2", + "safe-publish-latest": "^2.0.0", + "tape": "^5.9.0", + "typescript": "next" + }, + "engines": { + "node": ">= 0.4" + }, + "testling": { + "files": "test/index.js" + }, + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false, + "hideCredit": true + }, + "publishConfig": { + "ignore": [ + ".github/workflows", + "test" + ] + } +} diff --git a/node_modules/hasown/tsconfig.json b/node_modules/hasown/tsconfig.json new file mode 100644 index 0000000..0930c56 --- /dev/null +++ b/node_modules/hasown/tsconfig.json @@ -0,0 +1,6 @@ +{ + "extends": "@ljharb/tsconfig", + "exclude": [ + "coverage", + ], +} diff --git a/node_modules/https-proxy-agent/README.md b/node_modules/https-proxy-agent/README.md new file mode 100644 index 0000000..328656a --- /dev/null +++ b/node_modules/https-proxy-agent/README.md @@ -0,0 +1,137 @@ +https-proxy-agent +================ +### An HTTP(s) proxy `http.Agent` implementation for HTTPS +[![Build Status](https://github.com/TooTallNate/node-https-proxy-agent/workflows/Node%20CI/badge.svg)](https://github.com/TooTallNate/node-https-proxy-agent/actions?workflow=Node+CI) + +This module provides an `http.Agent` implementation that connects to a specified +HTTP or HTTPS proxy server, and can be used with the built-in `https` module. + +Specifically, this `Agent` implementation connects to an intermediary "proxy" +server and issues the [CONNECT HTTP method][CONNECT], which tells the proxy to +open a direct TCP connection to the destination server. + +Since this agent implements the CONNECT HTTP method, it also works with other +protocols that use this method when connecting over proxies (i.e. WebSockets). +See the "Examples" section below for more. + + +Installation +------------ + +Install with `npm`: + +``` bash +$ npm install https-proxy-agent +``` + + +Examples +-------- + +#### `https` module example + +``` js +var url = require('url'); +var https = require('https'); +var HttpsProxyAgent = require('https-proxy-agent'); + +// HTTP/HTTPS proxy to connect to +var proxy = process.env.http_proxy || 'http://168.63.76.32:3128'; +console.log('using proxy server %j', proxy); + +// HTTPS endpoint for the proxy to connect to +var endpoint = process.argv[2] || 'https://graph.facebook.com/tootallnate'; +console.log('attempting to GET %j', endpoint); +var options = url.parse(endpoint); + +// create an instance of the `HttpsProxyAgent` class with the proxy server information +var agent = new HttpsProxyAgent(proxy); +options.agent = agent; + +https.get(options, function (res) { + console.log('"response" event!', res.headers); + res.pipe(process.stdout); +}); +``` + +#### `ws` WebSocket connection example + +``` js +var url = require('url'); +var WebSocket = require('ws'); +var HttpsProxyAgent = require('https-proxy-agent'); + +// HTTP/HTTPS proxy to connect to +var proxy = process.env.http_proxy || 'http://168.63.76.32:3128'; +console.log('using proxy server %j', proxy); + +// WebSocket endpoint for the proxy to connect to +var endpoint = process.argv[2] || 'ws://echo.websocket.org'; +var parsed = url.parse(endpoint); +console.log('attempting to connect to WebSocket %j', endpoint); + +// create an instance of the `HttpsProxyAgent` class with the proxy server information +var options = url.parse(proxy); + +var agent = new HttpsProxyAgent(options); + +// finally, initiate the WebSocket connection +var socket = new WebSocket(endpoint, { agent: agent }); + +socket.on('open', function () { + console.log('"open" event!'); + socket.send('hello world'); +}); + +socket.on('message', function (data, flags) { + console.log('"message" event! %j %j', data, flags); + socket.close(); +}); +``` + +API +--- + +### new HttpsProxyAgent(Object options) + +The `HttpsProxyAgent` class implements an `http.Agent` subclass that connects +to the specified "HTTP(s) proxy server" in order to proxy HTTPS and/or WebSocket +requests. This is achieved by using the [HTTP `CONNECT` method][CONNECT]. + +The `options` argument may either be a string URI of the proxy server to use, or an +"options" object with more specific properties: + + * `host` - String - Proxy host to connect to (may use `hostname` as well). Required. + * `port` - Number - Proxy port to connect to. Required. + * `protocol` - String - If `https:`, then use TLS to connect to the proxy. + * `headers` - Object - Additional HTTP headers to be sent on the HTTP CONNECT method. + * Any other options given are passed to the `net.connect()`/`tls.connect()` functions. + + +License +------- + +(The MIT License) + +Copyright (c) 2013 Nathan Rajlich <nathan@tootallnate.net> + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +'Software'), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +[CONNECT]: http://en.wikipedia.org/wiki/HTTP_tunnel#HTTP_CONNECT_Tunneling diff --git a/node_modules/https-proxy-agent/dist/agent.d.ts b/node_modules/https-proxy-agent/dist/agent.d.ts new file mode 100644 index 0000000..4f1c636 --- /dev/null +++ b/node_modules/https-proxy-agent/dist/agent.d.ts @@ -0,0 +1,30 @@ +/// +import net from 'net'; +import { Agent, ClientRequest, RequestOptions } from 'agent-base'; +import { HttpsProxyAgentOptions } from '.'; +/** + * The `HttpsProxyAgent` implements an HTTP Agent subclass that connects to + * the specified "HTTP(s) proxy server" in order to proxy HTTPS requests. + * + * Outgoing HTTP requests are first tunneled through the proxy server using the + * `CONNECT` HTTP request method to establish a connection to the proxy server, + * and then the proxy server connects to the destination target and issues the + * HTTP request from the proxy server. + * + * `https:` requests have their socket connection upgraded to TLS once + * the connection to the proxy server has been established. + * + * @api public + */ +export default class HttpsProxyAgent extends Agent { + private secureProxy; + private proxy; + constructor(_opts: string | HttpsProxyAgentOptions); + /** + * Called when the node-core HTTP client library is creating a + * new HTTP request. + * + * @api protected + */ + callback(req: ClientRequest, opts: RequestOptions): Promise; +} diff --git a/node_modules/https-proxy-agent/dist/agent.js b/node_modules/https-proxy-agent/dist/agent.js new file mode 100644 index 0000000..75d1136 --- /dev/null +++ b/node_modules/https-proxy-agent/dist/agent.js @@ -0,0 +1,177 @@ +"use strict"; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +const net_1 = __importDefault(require("net")); +const tls_1 = __importDefault(require("tls")); +const url_1 = __importDefault(require("url")); +const assert_1 = __importDefault(require("assert")); +const debug_1 = __importDefault(require("debug")); +const agent_base_1 = require("agent-base"); +const parse_proxy_response_1 = __importDefault(require("./parse-proxy-response")); +const debug = debug_1.default('https-proxy-agent:agent'); +/** + * The `HttpsProxyAgent` implements an HTTP Agent subclass that connects to + * the specified "HTTP(s) proxy server" in order to proxy HTTPS requests. + * + * Outgoing HTTP requests are first tunneled through the proxy server using the + * `CONNECT` HTTP request method to establish a connection to the proxy server, + * and then the proxy server connects to the destination target and issues the + * HTTP request from the proxy server. + * + * `https:` requests have their socket connection upgraded to TLS once + * the connection to the proxy server has been established. + * + * @api public + */ +class HttpsProxyAgent extends agent_base_1.Agent { + constructor(_opts) { + let opts; + if (typeof _opts === 'string') { + opts = url_1.default.parse(_opts); + } + else { + opts = _opts; + } + if (!opts) { + throw new Error('an HTTP(S) proxy server `host` and `port` must be specified!'); + } + debug('creating new HttpsProxyAgent instance: %o', opts); + super(opts); + const proxy = Object.assign({}, opts); + // If `true`, then connect to the proxy server over TLS. + // Defaults to `false`. + this.secureProxy = opts.secureProxy || isHTTPS(proxy.protocol); + // Prefer `hostname` over `host`, and set the `port` if needed. + proxy.host = proxy.hostname || proxy.host; + if (typeof proxy.port === 'string') { + proxy.port = parseInt(proxy.port, 10); + } + if (!proxy.port && proxy.host) { + proxy.port = this.secureProxy ? 443 : 80; + } + // ALPN is supported by Node.js >= v5. + // attempt to negotiate http/1.1 for proxy servers that support http/2 + if (this.secureProxy && !('ALPNProtocols' in proxy)) { + proxy.ALPNProtocols = ['http 1.1']; + } + if (proxy.host && proxy.path) { + // If both a `host` and `path` are specified then it's most likely + // the result of a `url.parse()` call... we need to remove the + // `path` portion so that `net.connect()` doesn't attempt to open + // that as a Unix socket file. + delete proxy.path; + delete proxy.pathname; + } + this.proxy = proxy; + } + /** + * Called when the node-core HTTP client library is creating a + * new HTTP request. + * + * @api protected + */ + callback(req, opts) { + return __awaiter(this, void 0, void 0, function* () { + const { proxy, secureProxy } = this; + // Create a socket connection to the proxy server. + let socket; + if (secureProxy) { + debug('Creating `tls.Socket`: %o', proxy); + socket = tls_1.default.connect(proxy); + } + else { + debug('Creating `net.Socket`: %o', proxy); + socket = net_1.default.connect(proxy); + } + const headers = Object.assign({}, proxy.headers); + const hostname = `${opts.host}:${opts.port}`; + let payload = `CONNECT ${hostname} HTTP/1.1\r\n`; + // Inject the `Proxy-Authorization` header if necessary. + if (proxy.auth) { + headers['Proxy-Authorization'] = `Basic ${Buffer.from(proxy.auth).toString('base64')}`; + } + // The `Host` header should only include the port + // number when it is not the default port. + let { host, port, secureEndpoint } = opts; + if (!isDefaultPort(port, secureEndpoint)) { + host += `:${port}`; + } + headers.Host = host; + headers.Connection = 'close'; + for (const name of Object.keys(headers)) { + payload += `${name}: ${headers[name]}\r\n`; + } + const proxyResponsePromise = parse_proxy_response_1.default(socket); + socket.write(`${payload}\r\n`); + const { statusCode, buffered } = yield proxyResponsePromise; + if (statusCode === 200) { + req.once('socket', resume); + if (opts.secureEndpoint) { + // The proxy is connecting to a TLS server, so upgrade + // this socket connection to a TLS connection. + debug('Upgrading socket connection to TLS'); + const servername = opts.servername || opts.host; + return tls_1.default.connect(Object.assign(Object.assign({}, omit(opts, 'host', 'hostname', 'path', 'port')), { socket, + servername })); + } + return socket; + } + // Some other status code that's not 200... need to re-play the HTTP + // header "data" events onto the socket once the HTTP machinery is + // attached so that the node core `http` can parse and handle the + // error status code. + // Close the original socket, and a new "fake" socket is returned + // instead, so that the proxy doesn't get the HTTP request + // written to it (which may contain `Authorization` headers or other + // sensitive data). + // + // See: https://hackerone.com/reports/541502 + socket.destroy(); + const fakeSocket = new net_1.default.Socket({ writable: false }); + fakeSocket.readable = true; + // Need to wait for the "socket" event to re-play the "data" events. + req.once('socket', (s) => { + debug('replaying proxy buffer for failed request'); + assert_1.default(s.listenerCount('data') > 0); + // Replay the "buffered" Buffer onto the fake `socket`, since at + // this point the HTTP module machinery has been hooked up for + // the user. + s.push(buffered); + s.push(null); + }); + return fakeSocket; + }); + } +} +exports.default = HttpsProxyAgent; +function resume(socket) { + socket.resume(); +} +function isDefaultPort(port, secure) { + return Boolean((!secure && port === 80) || (secure && port === 443)); +} +function isHTTPS(protocol) { + return typeof protocol === 'string' ? /^https:?$/i.test(protocol) : false; +} +function omit(obj, ...keys) { + const ret = {}; + let key; + for (key in obj) { + if (!keys.includes(key)) { + ret[key] = obj[key]; + } + } + return ret; +} +//# sourceMappingURL=agent.js.map \ No newline at end of file diff --git a/node_modules/https-proxy-agent/dist/agent.js.map b/node_modules/https-proxy-agent/dist/agent.js.map new file mode 100644 index 0000000..0af6c17 --- /dev/null +++ b/node_modules/https-proxy-agent/dist/agent.js.map @@ -0,0 +1 @@ +{"version":3,"file":"agent.js","sourceRoot":"","sources":["../src/agent.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,8CAAsB;AACtB,8CAAsB;AACt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CAAC;SACpB;KACD;IACD,OAAO,GAAG,CAAC;AACZ,CAAC"} \ No newline at end of file diff --git a/node_modules/https-proxy-agent/dist/index.d.ts b/node_modules/https-proxy-agent/dist/index.d.ts new file mode 100644 index 0000000..0d60062 --- /dev/null +++ b/node_modules/https-proxy-agent/dist/index.d.ts @@ -0,0 +1,23 @@ +/// +import net from 'net'; +import tls from 'tls'; +import { Url } from 'url'; +import { AgentOptions } from 'agent-base'; +import { OutgoingHttpHeaders } from 'http'; +import _HttpsProxyAgent from './agent'; +declare function createHttpsProxyAgent(opts: string | createHttpsProxyAgent.HttpsProxyAgentOptions): _HttpsProxyAgent; +declare namespace createHttpsProxyAgent { + interface BaseHttpsProxyAgentOptions { + headers?: OutgoingHttpHeaders; + secureProxy?: boolean; + host?: string | null; + path?: string | null; + port?: string | number | null; + } + export interface HttpsProxyAgentOptions extends AgentOptions, BaseHttpsProxyAgentOptions, Partial> { + } + export type HttpsProxyAgent = _HttpsProxyAgent; + export const HttpsProxyAgent: typeof _HttpsProxyAgent; + export {}; +} +export = createHttpsProxyAgent; diff --git a/node_modules/https-proxy-agent/dist/index.js b/node_modules/https-proxy-agent/dist/index.js new file mode 100644 index 0000000..b03e763 --- /dev/null +++ b/node_modules/https-proxy-agent/dist/index.js @@ -0,0 +1,14 @@ +"use strict"; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +const agent_1 = __importDefault(require("./agent")); +function createHttpsProxyAgent(opts) { + return new agent_1.default(opts); +} +(function (createHttpsProxyAgent) { + createHttpsProxyAgent.HttpsProxyAgent = agent_1.default; + createHttpsProxyAgent.prototype = agent_1.default.prototype; +})(createHttpsProxyAgent || (createHttpsProxyAgent = {})); +module.exports = createHttpsProxyAgent; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/https-proxy-agent/dist/index.js.map b/node_modules/https-proxy-agent/dist/index.js.map new file mode 100644 index 0000000..f3ce559 --- /dev/null +++ b/node_modules/https-proxy-agent/dist/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;AAKA,oDAAuC;AAEvC,SAAS,qBAAqB,CAC7B,IAA2D;IAE3D,OAAO,IAAI,eAAgB,CAAC,IAAI,CAAC,CAAC;AACnC,CAAC;AAED,WAAU,qBAAqB;IAoBjB,qCAAe,GAAG,eAAgB,CAAC;IAEhD,qBAAqB,CAAC,SAAS,GAAG,eAAgB,CAAC,SAAS,CAAC;AAC9D,CAAC,EAvBS,qBAAqB,KAArB,qBAAqB,QAuB9B;AAED,iBAAS,qBAAqB,CAAC"} \ No newline at end of file diff --git a/node_modules/https-proxy-agent/dist/parse-proxy-response.d.ts b/node_modules/https-proxy-agent/dist/parse-proxy-response.d.ts new file mode 100644 index 0000000..7565674 --- /dev/null +++ b/node_modules/https-proxy-agent/dist/parse-proxy-response.d.ts @@ -0,0 +1,7 @@ +/// +import { Readable } from 'stream'; +export interface ProxyResponse { + statusCode: number; + buffered: Buffer; +} +export default function parseProxyResponse(socket: Readable): Promise; diff --git a/node_modules/https-proxy-agent/dist/parse-proxy-response.js b/node_modules/https-proxy-agent/dist/parse-proxy-response.js new file mode 100644 index 0000000..aa5ce3c --- /dev/null +++ b/node_modules/https-proxy-agent/dist/parse-proxy-response.js @@ -0,0 +1,66 @@ +"use strict"; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +const debug_1 = __importDefault(require("debug")); +const debug = debug_1.default('https-proxy-agent:parse-proxy-response'); +function parseProxyResponse(socket) { + return new Promise((resolve, reject) => { + // we need to buffer any HTTP traffic that happens with the proxy before we get + // the CONNECT response, so that if the response is anything other than an "200" + // response code, then we can re-play the "data" events on the socket once the + // HTTP parser is hooked up... + let buffersLength = 0; + const buffers = []; + function read() { + const b = socket.read(); + if (b) + ondata(b); + else + socket.once('readable', read); + } + function cleanup() { + socket.removeListener('end', onend); + socket.removeListener('error', onerror); + socket.removeListener('close', onclose); + socket.removeListener('readable', read); + } + function onclose(err) { + debug('onclose had error %o', err); + } + function onend() { + debug('onend'); + } + function onerror(err) { + cleanup(); + debug('onerror %o', err); + reject(err); + } + function ondata(b) { + buffers.push(b); + buffersLength += b.length; + const buffered = Buffer.concat(buffers, buffersLength); + const endOfHeaders = buffered.indexOf('\r\n\r\n'); + if (endOfHeaders === -1) { + // keep buffering + debug('have not received end of HTTP headers yet...'); + read(); + return; + } + const firstLine = buffered.toString('ascii', 0, buffered.indexOf('\r\n')); + const statusCode = +firstLine.split(' ')[1]; + debug('got proxy server response: %o', firstLine); + resolve({ + statusCode, + buffered + }); + } + socket.on('error', onerror); + socket.on('close', onclose); + socket.on('end', onend); + read(); + }); +} +exports.default = parseProxyResponse; +//# sourceMappingURL=parse-proxy-response.js.map \ No newline at end of file diff --git a/node_modules/https-proxy-agent/dist/parse-proxy-response.js.map b/node_modules/https-proxy-agent/dist/parse-proxy-response.js.map new file mode 100644 index 0000000..bacdb84 --- /dev/null +++ b/node_modules/https-proxy-agent/dist/parse-proxy-response.js.map @@ -0,0 +1 @@ +{"version":3,"file":"parse-proxy-response.js","sourceRoot":"","sources":["../src/parse-proxy-response.ts"],"names":[],"mappings":";;;;;AAAA,kDAAgC;AAGhC,MAAM,KAAK,GAAG,eAAW,CAAC,wCAAwC,CAAC,CAAC;AAOpE,SAAwB,kBAAkB,CACzC,MAAgB;IAEhB,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;QACtC,+EAA+E;QAC/E,gFAAgF;QAChF,8EAA8E;QAC9E,8BAA8B;QAC9B,IAAI,aAAa,GAAG,CAAC,CAAC;QACtB,MAAM,OAAO,GAAa,EAAE,CAAC;QAE7B,SAAS,IAAI;YACZ,MAAM,CAAC,GAAG,MAAM,CAAC,IAAI,EAAE,CAAC;YACxB,IAAI,CAAC;gBAAE,MAAM,CAAC,CAAC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K,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;YAC5C,KAAK,CAAC,+BAA+B,EAAE,SAAS,CAAC,CAAC;YAClD,OAAO,CAAC;gBACP,UAAU;gBACV,QAAQ;aACR,CAAC,CAAC;QACJ,CAAC;QAED,MAAM,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;QAC5B,MAAM,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;QAC5B,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;QAExB,IAAI,EAAE,CAAC;IACR,CAAC,CAAC,CAAC;AACJ,CAAC;AAvED,qCAuEC"} \ No newline at end of file diff --git a/node_modules/https-proxy-agent/package.json b/node_modules/https-proxy-agent/package.json new file mode 100644 index 0000000..fb2aba1 --- /dev/null +++ b/node_modules/https-proxy-agent/package.json @@ -0,0 +1,56 @@ +{ + "name": "https-proxy-agent", + "version": "5.0.1", + "description": "An HTTP(s) proxy `http.Agent` implementation for HTTPS", + "main": "dist/index", + "types": "dist/index", + "files": [ + "dist" + ], + "scripts": { + "prebuild": "rimraf dist", + "build": "tsc", + "test": "mocha --reporter spec", + "test-lint": "eslint src --ext .js,.ts", + "prepublishOnly": "npm run build" + }, + "repository": { + "type": "git", + "url": "git://github.com/TooTallNate/node-https-proxy-agent.git" + }, + "keywords": [ + "https", + "proxy", + "endpoint", + "agent" + ], + "author": "Nathan Rajlich (http://n8.io/)", + "license": "MIT", + "bugs": { + "url": "https://github.com/TooTallNate/node-https-proxy-agent/issues" + }, + "dependencies": { + "agent-base": "6", + "debug": "4" + }, + "devDependencies": { + "@types/debug": "4", + "@types/node": "^12.12.11", + "@typescript-eslint/eslint-plugin": "1.6.0", + "@typescript-eslint/parser": "1.1.0", + "eslint": "5.16.0", + "eslint-config-airbnb": "17.1.0", + "eslint-config-prettier": "4.1.0", + "eslint-import-resolver-typescript": "1.1.1", + "eslint-plugin-import": "2.16.0", + "eslint-plugin-jsx-a11y": "6.2.1", + "eslint-plugin-react": "7.12.4", + "mocha": "^6.2.2", + "proxy": "1", + "rimraf": "^3.0.0", + "typescript": "^3.5.3" + }, + "engines": { + "node": ">= 6" + } +} diff --git a/node_modules/math-intrinsics/.eslintrc b/node_modules/math-intrinsics/.eslintrc new file mode 100644 index 0000000..d90a1bc --- /dev/null +++ b/node_modules/math-intrinsics/.eslintrc @@ -0,0 +1,16 @@ +{ + "root": true, + + "extends": "@ljharb", + + "rules": { + "eqeqeq": ["error", "allow-null"], + "id-length": "off", + "new-cap": ["error", { + "capIsNewExceptions": [ + "RequireObjectCoercible", + "ToObject", + ], + }], + }, +} diff --git a/node_modules/math-intrinsics/.github/FUNDING.yml b/node_modules/math-intrinsics/.github/FUNDING.yml new file mode 100644 index 0000000..868f4ff --- /dev/null +++ b/node_modules/math-intrinsics/.github/FUNDING.yml @@ -0,0 +1,12 @@ +# These are supported funding model platforms + +github: [ljharb] +patreon: # Replace with a single Patreon username +open_collective: # Replace with a single Open Collective username +ko_fi: # Replace with a single Ko-fi username +tidelift: npm/math-intrinsics +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +otechie: # Replace with a single Otechie username +custom: # Replace with a single custom sponsorship URL diff --git a/node_modules/math-intrinsics/CHANGELOG.md b/node_modules/math-intrinsics/CHANGELOG.md new file mode 100644 index 0000000..9cf48f5 --- /dev/null +++ b/node_modules/math-intrinsics/CHANGELOG.md @@ -0,0 +1,24 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [v1.1.0](https://github.com/es-shims/math-intrinsics/compare/v1.0.0...v1.1.0) - 2024-12-18 + +### Commits + +- [New] add `round` [`7cfb044`](https://github.com/es-shims/math-intrinsics/commit/7cfb04460c0fbdf1ca101eecbac3f59d11994130) +- [Tests] add attw [`e96be8f`](https://github.com/es-shims/math-intrinsics/commit/e96be8fbf58449eafe976446a0470e6ea561ad8d) +- [Dev Deps] update `@types/tape` [`30d0023`](https://github.com/es-shims/math-intrinsics/commit/30d00234ce8a3fa0094a61cd55d6686eb91e36ec) + +## v1.0.0 - 2024-12-11 + +### Commits + +- Initial implementation, tests, readme, types [`b898caa`](https://github.com/es-shims/math-intrinsics/commit/b898caae94e9994a94a42b8740f7bbcfd0a868fe) +- Initial commit [`02745b0`](https://github.com/es-shims/math-intrinsics/commit/02745b03a62255af8a332771987b55d127538d9c) +- [New] add `constants/maxArrayLength`, `mod` [`b978178`](https://github.com/es-shims/math-intrinsics/commit/b978178a57685bd23ed1c7efe2137f3784f5fcc5) +- npm init [`a39fc57`](https://github.com/es-shims/math-intrinsics/commit/a39fc57e5639a645d0bd52a0dc56202480223be2) +- Only apps should have lockfiles [`9451580`](https://github.com/es-shims/math-intrinsics/commit/94515800fb34db4f3cc7e99290042d45609ac7bd) diff --git a/node_modules/math-intrinsics/LICENSE b/node_modules/math-intrinsics/LICENSE new file mode 100644 index 0000000..34995e7 --- /dev/null +++ b/node_modules/math-intrinsics/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2024 ECMAScript Shims + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/math-intrinsics/README.md b/node_modules/math-intrinsics/README.md new file mode 100644 index 0000000..4a66dcf --- /dev/null +++ b/node_modules/math-intrinsics/README.md @@ -0,0 +1,50 @@ +# math-intrinsics [![Version Badge][npm-version-svg]][package-url] + +[![github actions][actions-image]][actions-url] +[![coverage][codecov-image]][codecov-url] +[![License][license-image]][license-url] +[![Downloads][downloads-image]][downloads-url] + +[![npm badge][npm-badge-png]][package-url] + +ES Math-related intrinsics and helpers, robustly cached. + + - `abs` + - `floor` + - `isFinite` + - `isInteger` + - `isNaN` + - `isNegativeZero` + - `max` + - `min` + - `mod` + - `pow` + - `round` + - `sign` + - `constants/maxArrayLength` + - `constants/maxSafeInteger` + - `constants/maxValue` + + +## Tests +Simply clone the repo, `npm install`, and run `npm test` + +## Security + +Please email [@ljharb](https://github.com/ljharb) or see https://tidelift.com/security if you have a potential security vulnerability to report. + +[package-url]: https://npmjs.org/package/math-intrinsics +[npm-version-svg]: https://versionbadg.es/es-shims/math-intrinsics.svg +[deps-svg]: https://david-dm.org/es-shims/math-intrinsics.svg +[deps-url]: https://david-dm.org/es-shims/math-intrinsics +[dev-deps-svg]: https://david-dm.org/es-shims/math-intrinsics/dev-status.svg +[dev-deps-url]: https://david-dm.org/es-shims/math-intrinsics#info=devDependencies +[npm-badge-png]: https://nodei.co/npm/math-intrinsics.png?downloads=true&stars=true +[license-image]: https://img.shields.io/npm/l/math-intrinsics.svg +[license-url]: LICENSE +[downloads-image]: https://img.shields.io/npm/dm/es-object.svg +[downloads-url]: https://npm-stat.com/charts.html?package=math-intrinsics +[codecov-image]: https://codecov.io/gh/es-shims/math-intrinsics/branch/main/graphs/badge.svg +[codecov-url]: https://app.codecov.io/gh/es-shims/math-intrinsics/ +[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/es-shims/math-intrinsics +[actions-url]: https://github.com/es-shims/math-intrinsics/actions diff --git a/node_modules/math-intrinsics/abs.d.ts b/node_modules/math-intrinsics/abs.d.ts new file mode 100644 index 0000000..14ad9c6 --- /dev/null +++ b/node_modules/math-intrinsics/abs.d.ts @@ -0,0 +1 @@ +export = Math.abs; \ No newline at end of file diff --git a/node_modules/math-intrinsics/abs.js b/node_modules/math-intrinsics/abs.js new file mode 100644 index 0000000..a751424 --- /dev/null +++ b/node_modules/math-intrinsics/abs.js @@ -0,0 +1,4 @@ +'use strict'; + +/** @type {import('./abs')} */ +module.exports = Math.abs; diff --git a/node_modules/math-intrinsics/constants/maxArrayLength.d.ts b/node_modules/math-intrinsics/constants/maxArrayLength.d.ts new file mode 100644 index 0000000..b92d46b --- /dev/null +++ b/node_modules/math-intrinsics/constants/maxArrayLength.d.ts @@ -0,0 +1,3 @@ +declare const MAX_ARRAY_LENGTH: 4294967295; + +export = MAX_ARRAY_LENGTH; \ No newline at end of file diff --git a/node_modules/math-intrinsics/constants/maxArrayLength.js b/node_modules/math-intrinsics/constants/maxArrayLength.js new file mode 100644 index 0000000..cfc6aff --- /dev/null +++ b/node_modules/math-intrinsics/constants/maxArrayLength.js @@ -0,0 +1,4 @@ +'use strict'; + +/** @type {import('./maxArrayLength')} */ +module.exports = 4294967295; // Math.pow(2, 32) - 1; diff --git a/node_modules/math-intrinsics/constants/maxSafeInteger.d.ts b/node_modules/math-intrinsics/constants/maxSafeInteger.d.ts new file mode 100644 index 0000000..fee3f62 --- /dev/null +++ b/node_modules/math-intrinsics/constants/maxSafeInteger.d.ts @@ -0,0 +1,3 @@ +declare const MAX_SAFE_INTEGER: 9007199254740991; + +export = MAX_SAFE_INTEGER; \ No newline at end of file diff --git a/node_modules/math-intrinsics/constants/maxSafeInteger.js b/node_modules/math-intrinsics/constants/maxSafeInteger.js new file mode 100644 index 0000000..b568ad3 --- /dev/null +++ b/node_modules/math-intrinsics/constants/maxSafeInteger.js @@ -0,0 +1,5 @@ +'use strict'; + +/** @type {import('./maxSafeInteger')} */ +// eslint-disable-next-line no-extra-parens +module.exports = /** @type {import('./maxSafeInteger')} */ (Number.MAX_SAFE_INTEGER) || 9007199254740991; // Math.pow(2, 53) - 1; diff --git a/node_modules/math-intrinsics/constants/maxValue.d.ts b/node_modules/math-intrinsics/constants/maxValue.d.ts new file mode 100644 index 0000000..292cb82 --- /dev/null +++ b/node_modules/math-intrinsics/constants/maxValue.d.ts @@ -0,0 +1,3 @@ +declare const MAX_VALUE: 1.7976931348623157e+308; + +export = MAX_VALUE; diff --git a/node_modules/math-intrinsics/constants/maxValue.js b/node_modules/math-intrinsics/constants/maxValue.js new file mode 100644 index 0000000..a2202dc --- /dev/null +++ b/node_modules/math-intrinsics/constants/maxValue.js @@ -0,0 +1,5 @@ +'use strict'; + +/** @type {import('./maxValue')} */ +// eslint-disable-next-line no-extra-parens +module.exports = /** @type {import('./maxValue')} */ (Number.MAX_VALUE) || 1.7976931348623157e+308; diff --git a/node_modules/math-intrinsics/floor.d.ts b/node_modules/math-intrinsics/floor.d.ts new file mode 100644 index 0000000..9265236 --- /dev/null +++ b/node_modules/math-intrinsics/floor.d.ts @@ -0,0 +1 @@ +export = Math.floor; \ No newline at end of file diff --git a/node_modules/math-intrinsics/floor.js b/node_modules/math-intrinsics/floor.js new file mode 100644 index 0000000..ab0e5d7 --- /dev/null +++ b/node_modules/math-intrinsics/floor.js @@ -0,0 +1,4 @@ +'use strict'; + +/** @type {import('./floor')} */ +module.exports = Math.floor; diff --git a/node_modules/math-intrinsics/isFinite.d.ts b/node_modules/math-intrinsics/isFinite.d.ts new file mode 100644 index 0000000..6daae33 --- /dev/null +++ b/node_modules/math-intrinsics/isFinite.d.ts @@ -0,0 +1,3 @@ +declare function isFinite(x: unknown): x is number | bigint; + +export = isFinite; \ No newline at end of file diff --git a/node_modules/math-intrinsics/isFinite.js b/node_modules/math-intrinsics/isFinite.js new file mode 100644 index 0000000..b201a5a --- /dev/null +++ b/node_modules/math-intrinsics/isFinite.js @@ -0,0 +1,12 @@ +'use strict'; + +var $isNaN = require('./isNaN'); + +/** @type {import('./isFinite')} */ +module.exports = function isFinite(x) { + return (typeof x === 'number' || typeof x === 'bigint') + && !$isNaN(x) + && x !== Infinity + && x !== -Infinity; +}; + diff --git a/node_modules/math-intrinsics/isInteger.d.ts b/node_modules/math-intrinsics/isInteger.d.ts new file mode 100644 index 0000000..13935a8 --- /dev/null +++ b/node_modules/math-intrinsics/isInteger.d.ts @@ -0,0 +1,3 @@ +declare function isInteger(argument: unknown): argument is number; + +export = isInteger; \ No newline at end of file diff --git a/node_modules/math-intrinsics/isInteger.js b/node_modules/math-intrinsics/isInteger.js new file mode 100644 index 0000000..4b1b9a5 --- /dev/null +++ b/node_modules/math-intrinsics/isInteger.js @@ -0,0 +1,16 @@ +'use strict'; + +var $abs = require('./abs'); +var $floor = require('./floor'); + +var $isNaN = require('./isNaN'); +var $isFinite = require('./isFinite'); + +/** @type {import('./isInteger')} */ +module.exports = function isInteger(argument) { + if (typeof argument !== 'number' || $isNaN(argument) || !$isFinite(argument)) { + return false; + } + var absValue = $abs(argument); + return $floor(absValue) === absValue; +}; diff --git a/node_modules/math-intrinsics/isNaN.d.ts b/node_modules/math-intrinsics/isNaN.d.ts new file mode 100644 index 0000000..c1d4c55 --- /dev/null +++ b/node_modules/math-intrinsics/isNaN.d.ts @@ -0,0 +1 @@ +export = Number.isNaN; \ No newline at end of file diff --git a/node_modules/math-intrinsics/isNaN.js b/node_modules/math-intrinsics/isNaN.js new file mode 100644 index 0000000..e36475c --- /dev/null +++ b/node_modules/math-intrinsics/isNaN.js @@ -0,0 +1,6 @@ +'use strict'; + +/** @type {import('./isNaN')} */ +module.exports = Number.isNaN || function isNaN(a) { + return a !== a; +}; diff --git a/node_modules/math-intrinsics/isNegativeZero.d.ts b/node_modules/math-intrinsics/isNegativeZero.d.ts new file mode 100644 index 0000000..7ad8819 --- /dev/null +++ b/node_modules/math-intrinsics/isNegativeZero.d.ts @@ -0,0 +1,3 @@ +declare function isNegativeZero(x: unknown): boolean; + +export = isNegativeZero; \ No newline at end of file diff --git a/node_modules/math-intrinsics/isNegativeZero.js b/node_modules/math-intrinsics/isNegativeZero.js new file mode 100644 index 0000000..b69adcc --- /dev/null +++ b/node_modules/math-intrinsics/isNegativeZero.js @@ -0,0 +1,6 @@ +'use strict'; + +/** @type {import('./isNegativeZero')} */ +module.exports = function isNegativeZero(x) { + return x === 0 && 1 / x === 1 / -0; +}; diff --git a/node_modules/math-intrinsics/max.d.ts b/node_modules/math-intrinsics/max.d.ts new file mode 100644 index 0000000..ad6f43e --- /dev/null +++ b/node_modules/math-intrinsics/max.d.ts @@ -0,0 +1 @@ +export = Math.max; \ No newline at end of file diff --git a/node_modules/math-intrinsics/max.js b/node_modules/math-intrinsics/max.js new file mode 100644 index 0000000..edb55df --- /dev/null +++ b/node_modules/math-intrinsics/max.js @@ -0,0 +1,4 @@ +'use strict'; + +/** @type {import('./max')} */ +module.exports = Math.max; diff --git a/node_modules/math-intrinsics/min.d.ts b/node_modules/math-intrinsics/min.d.ts new file mode 100644 index 0000000..fd90f2d --- /dev/null +++ b/node_modules/math-intrinsics/min.d.ts @@ -0,0 +1 @@ +export = Math.min; \ No newline at end of file diff --git a/node_modules/math-intrinsics/min.js b/node_modules/math-intrinsics/min.js new file mode 100644 index 0000000..5a4a7c7 --- /dev/null +++ b/node_modules/math-intrinsics/min.js @@ -0,0 +1,4 @@ +'use strict'; + +/** @type {import('./min')} */ +module.exports = Math.min; diff --git a/node_modules/math-intrinsics/mod.d.ts b/node_modules/math-intrinsics/mod.d.ts new file mode 100644 index 0000000..549dbd4 --- /dev/null +++ b/node_modules/math-intrinsics/mod.d.ts @@ -0,0 +1,3 @@ +declare function mod(number: number, modulo: number): number; + +export = mod; \ No newline at end of file diff --git a/node_modules/math-intrinsics/mod.js b/node_modules/math-intrinsics/mod.js new file mode 100644 index 0000000..4a98362 --- /dev/null +++ b/node_modules/math-intrinsics/mod.js @@ -0,0 +1,9 @@ +'use strict'; + +var $floor = require('./floor'); + +/** @type {import('./mod')} */ +module.exports = function mod(number, modulo) { + var remain = number % modulo; + return $floor(remain >= 0 ? remain : remain + modulo); +}; diff --git a/node_modules/math-intrinsics/package.json b/node_modules/math-intrinsics/package.json new file mode 100644 index 0000000..0676273 --- /dev/null +++ b/node_modules/math-intrinsics/package.json @@ -0,0 +1,86 @@ +{ + "name": "math-intrinsics", + "version": "1.1.0", + "description": "ES Math-related intrinsics and helpers, robustly cached.", + "main": false, + "exports": { + "./abs": "./abs.js", + "./floor": "./floor.js", + "./isFinite": "./isFinite.js", + "./isInteger": "./isInteger.js", + "./isNaN": "./isNaN.js", + "./isNegativeZero": "./isNegativeZero.js", + "./max": "./max.js", + "./min": "./min.js", + "./mod": "./mod.js", + "./pow": "./pow.js", + "./sign": "./sign.js", + "./round": "./round.js", + "./constants/maxArrayLength": "./constants/maxArrayLength.js", + "./constants/maxSafeInteger": "./constants/maxSafeInteger.js", + "./constants/maxValue": "./constants/maxValue.js", + "./package.json": "./package.json" + }, + "sideEffects": false, + "scripts": { + "prepack": "npmignore --auto --commentLines=autogenerated", + "prepublishOnly": "safe-publish-latest", + "prepublish": "not-in-publish || npm run prepublishOnly", + "pretest": "npm run lint", + "test": "npm run tests-only", + "tests-only": "nyc tape 'test/**/*.js'", + "posttest": "npx npm@'>= 10.2' audit --production", + "prelint": "evalmd README.md && eclint check $(git ls-files | xargs find 2> /dev/null | grep -vE 'node_modules|\\.git' | grep -v dist/)", + "lint": "eslint --ext=js,mjs .", + "postlint": "tsc && attw -P", + "version": "auto-changelog && git add CHANGELOG.md", + "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/es-shims/math-intrinsics.git" + }, + "author": "Jordan Harband ", + "license": "MIT", + "bugs": { + "url": "https://github.com/es-shims/math-intrinsics/issues" + }, + "homepage": "https://github.com/es-shims/math-intrinsics#readme", + "devDependencies": { + "@arethetypeswrong/cli": "^0.17.1", + "@ljharb/eslint-config": "^21.1.1", + "@ljharb/tsconfig": "^0.2.2", + "@types/for-each": "^0.3.3", + "@types/object-inspect": "^1.13.0", + "@types/tape": "^5.8.0", + "auto-changelog": "^2.5.0", + "eclint": "^2.8.1", + "es-value-fixtures": "^1.5.0", + "eslint": "^8.8.0", + "evalmd": "^0.0.19", + "for-each": "^0.3.3", + "in-publish": "^2.0.1", + "npmignore": "^0.3.1", + "nyc": "^10.3.2", + "object-inspect": "^1.13.3", + "safe-publish-latest": "^2.0.0", + "tape": "^5.9.0", + "typescript": "next" + }, + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false, + "hideCredit": true + }, + "publishConfig": { + "ignore": [ + ".github/workflows" + ] + }, + "engines": { + "node": ">= 0.4" + } +} diff --git a/node_modules/math-intrinsics/pow.d.ts b/node_modules/math-intrinsics/pow.d.ts new file mode 100644 index 0000000..5873c44 --- /dev/null +++ b/node_modules/math-intrinsics/pow.d.ts @@ -0,0 +1 @@ +export = Math.pow; \ No newline at end of file diff --git a/node_modules/math-intrinsics/pow.js b/node_modules/math-intrinsics/pow.js new file mode 100644 index 0000000..c0a4103 --- /dev/null +++ b/node_modules/math-intrinsics/pow.js @@ -0,0 +1,4 @@ +'use strict'; + +/** @type {import('./pow')} */ +module.exports = Math.pow; diff --git a/node_modules/math-intrinsics/round.d.ts b/node_modules/math-intrinsics/round.d.ts new file mode 100644 index 0000000..da1fde3 --- /dev/null +++ b/node_modules/math-intrinsics/round.d.ts @@ -0,0 +1 @@ +export = Math.round; \ No newline at end of file diff --git a/node_modules/math-intrinsics/round.js b/node_modules/math-intrinsics/round.js new file mode 100644 index 0000000..b792156 --- /dev/null +++ b/node_modules/math-intrinsics/round.js @@ -0,0 +1,4 @@ +'use strict'; + +/** @type {import('./round')} */ +module.exports = Math.round; diff --git a/node_modules/math-intrinsics/sign.d.ts b/node_modules/math-intrinsics/sign.d.ts new file mode 100644 index 0000000..c49ceca --- /dev/null +++ b/node_modules/math-intrinsics/sign.d.ts @@ -0,0 +1,3 @@ +declare function sign(x: number): number; + +export = sign; \ No newline at end of file diff --git a/node_modules/math-intrinsics/sign.js b/node_modules/math-intrinsics/sign.js new file mode 100644 index 0000000..9e5173c --- /dev/null +++ b/node_modules/math-intrinsics/sign.js @@ -0,0 +1,11 @@ +'use strict'; + +var $isNaN = require('./isNaN'); + +/** @type {import('./sign')} */ +module.exports = function sign(number) { + if ($isNaN(number) || number === 0) { + return number; + } + return number < 0 ? -1 : +1; +}; diff --git a/node_modules/math-intrinsics/test/index.js b/node_modules/math-intrinsics/test/index.js new file mode 100644 index 0000000..0f90a5d --- /dev/null +++ b/node_modules/math-intrinsics/test/index.js @@ -0,0 +1,192 @@ +'use strict'; + +var test = require('tape'); +var v = require('es-value-fixtures'); +var forEach = require('for-each'); +var inspect = require('object-inspect'); + +var abs = require('../abs'); +var floor = require('../floor'); +var isFinite = require('../isFinite'); +var isInteger = require('../isInteger'); +var isNaN = require('../isNaN'); +var isNegativeZero = require('../isNegativeZero'); +var max = require('../max'); +var min = require('../min'); +var mod = require('../mod'); +var pow = require('../pow'); +var round = require('../round'); +var sign = require('../sign'); + +var maxArrayLength = require('../constants/maxArrayLength'); +var maxSafeInteger = require('../constants/maxSafeInteger'); +var maxValue = require('../constants/maxValue'); + +test('abs', function (t) { + t.equal(abs(-1), 1, 'abs(-1) === 1'); + t.equal(abs(+1), 1, 'abs(+1) === 1'); + t.equal(abs(+0), +0, 'abs(+0) === +0'); + t.equal(abs(-0), +0, 'abs(-0) === +0'); + + t.end(); +}); + +test('floor', function (t) { + t.equal(floor(-1.1), -2, 'floor(-1.1) === -2'); + t.equal(floor(+1.1), 1, 'floor(+1.1) === 1'); + t.equal(floor(+0), +0, 'floor(+0) === +0'); + t.equal(floor(-0), -0, 'floor(-0) === -0'); + t.equal(floor(-Infinity), -Infinity, 'floor(-Infinity) === -Infinity'); + t.equal(floor(Number(Infinity)), Number(Infinity), 'floor(+Infinity) === +Infinity'); + t.equal(floor(NaN), NaN, 'floor(NaN) === NaN'); + t.equal(floor(0), +0, 'floor(0) === +0'); + t.equal(floor(-0), -0, 'floor(-0) === -0'); + t.equal(floor(1), 1, 'floor(1) === 1'); + t.equal(floor(-1), -1, 'floor(-1) === -1'); + t.equal(floor(1.1), 1, 'floor(1.1) === 1'); + t.equal(floor(-1.1), -2, 'floor(-1.1) === -2'); + t.equal(floor(maxValue), maxValue, 'floor(maxValue) === maxValue'); + t.equal(floor(maxSafeInteger), maxSafeInteger, 'floor(maxSafeInteger) === maxSafeInteger'); + + t.end(); +}); + +test('isFinite', function (t) { + t.equal(isFinite(0), true, 'isFinite(+0) === true'); + t.equal(isFinite(-0), true, 'isFinite(-0) === true'); + t.equal(isFinite(1), true, 'isFinite(1) === true'); + t.equal(isFinite(Infinity), false, 'isFinite(Infinity) === false'); + t.equal(isFinite(-Infinity), false, 'isFinite(-Infinity) === false'); + t.equal(isFinite(NaN), false, 'isFinite(NaN) === false'); + + forEach(v.nonNumbers, function (nonNumber) { + t.equal(isFinite(nonNumber), false, 'isFinite(' + inspect(nonNumber) + ') === false'); + }); + + t.end(); +}); + +test('isInteger', function (t) { + forEach([].concat( + // @ts-expect-error TS sucks with concat + v.nonNumbers, + v.nonIntegerNumbers + ), function (nonInteger) { + t.equal(isInteger(nonInteger), false, 'isInteger(' + inspect(nonInteger) + ') === false'); + }); + + t.end(); +}); + +test('isNaN', function (t) { + forEach([].concat( + // @ts-expect-error TS sucks with concat + v.nonNumbers, + v.infinities, + v.zeroes, + v.integerNumbers + ), function (nonNaN) { + t.equal(isNaN(nonNaN), false, 'isNaN(' + inspect(nonNaN) + ') === false'); + }); + + t.equal(isNaN(NaN), true, 'isNaN(NaN) === true'); + + t.end(); +}); + +test('isNegativeZero', function (t) { + t.equal(isNegativeZero(-0), true, 'isNegativeZero(-0) === true'); + t.equal(isNegativeZero(+0), false, 'isNegativeZero(+0) === false'); + t.equal(isNegativeZero(1), false, 'isNegativeZero(1) === false'); + t.equal(isNegativeZero(-1), false, 'isNegativeZero(-1) === false'); + t.equal(isNegativeZero(NaN), false, 'isNegativeZero(NaN) === false'); + t.equal(isNegativeZero(Infinity), false, 'isNegativeZero(Infinity) === false'); + t.equal(isNegativeZero(-Infinity), false, 'isNegativeZero(-Infinity) === false'); + + forEach(v.nonNumbers, function (nonNumber) { + t.equal(isNegativeZero(nonNumber), false, 'isNegativeZero(' + inspect(nonNumber) + ') === false'); + }); + + t.end(); +}); + +test('max', function (t) { + t.equal(max(1, 2), 2, 'max(1, 2) === 2'); + t.equal(max(1, 2, 3), 3, 'max(1, 2, 3) === 3'); + t.equal(max(1, 2, 3, 4), 4, 'max(1, 2, 3, 4) === 4'); + t.equal(max(1, 2, 3, 4, 5), 5, 'max(1, 2, 3, 4, 5) === 5'); + t.equal(max(1, 2, 3, 4, 5, 6), 6, 'max(1, 2, 3, 4, 5, 6) === 6'); + t.equal(max(1, 2, 3, 4, 5, 6, 7), 7, 'max(1, 2, 3, 4, 5, 6, 7) === 7'); + + t.end(); +}); + +test('min', function (t) { + t.equal(min(1, 2), 1, 'min(1, 2) === 1'); + t.equal(min(1, 2, 3), 1, 'min(1, 2, 3) === 1'); + t.equal(min(1, 2, 3, 4), 1, 'min(1, 2, 3, 4) === 1'); + t.equal(min(1, 2, 3, 4, 5), 1, 'min(1, 2, 3, 4, 5) === 1'); + t.equal(min(1, 2, 3, 4, 5, 6), 1, 'min(1, 2, 3, 4, 5, 6) === 1'); + + t.end(); +}); + +test('mod', function (t) { + t.equal(mod(1, 2), 1, 'mod(1, 2) === 1'); + t.equal(mod(2, 2), 0, 'mod(2, 2) === 0'); + t.equal(mod(3, 2), 1, 'mod(3, 2) === 1'); + t.equal(mod(4, 2), 0, 'mod(4, 2) === 0'); + t.equal(mod(5, 2), 1, 'mod(5, 2) === 1'); + t.equal(mod(6, 2), 0, 'mod(6, 2) === 0'); + t.equal(mod(7, 2), 1, 'mod(7, 2) === 1'); + t.equal(mod(8, 2), 0, 'mod(8, 2) === 0'); + t.equal(mod(9, 2), 1, 'mod(9, 2) === 1'); + t.equal(mod(10, 2), 0, 'mod(10, 2) === 0'); + t.equal(mod(11, 2), 1, 'mod(11, 2) === 1'); + + t.end(); +}); + +test('pow', function (t) { + t.equal(pow(2, 2), 4, 'pow(2, 2) === 4'); + t.equal(pow(2, 3), 8, 'pow(2, 3) === 8'); + t.equal(pow(2, 4), 16, 'pow(2, 4) === 16'); + t.equal(pow(2, 5), 32, 'pow(2, 5) === 32'); + t.equal(pow(2, 6), 64, 'pow(2, 6) === 64'); + t.equal(pow(2, 7), 128, 'pow(2, 7) === 128'); + t.equal(pow(2, 8), 256, 'pow(2, 8) === 256'); + t.equal(pow(2, 9), 512, 'pow(2, 9) === 512'); + t.equal(pow(2, 10), 1024, 'pow(2, 10) === 1024'); + + t.end(); +}); + +test('round', function (t) { + t.equal(round(1.1), 1, 'round(1.1) === 1'); + t.equal(round(1.5), 2, 'round(1.5) === 2'); + t.equal(round(1.9), 2, 'round(1.9) === 2'); + + t.end(); +}); + +test('sign', function (t) { + t.equal(sign(-1), -1, 'sign(-1) === -1'); + t.equal(sign(+1), +1, 'sign(+1) === +1'); + t.equal(sign(+0), +0, 'sign(+0) === +0'); + t.equal(sign(-0), -0, 'sign(-0) === -0'); + t.equal(sign(NaN), NaN, 'sign(NaN) === NaN'); + t.equal(sign(Infinity), +1, 'sign(Infinity) === +1'); + t.equal(sign(-Infinity), -1, 'sign(-Infinity) === -1'); + t.equal(sign(maxValue), +1, 'sign(maxValue) === +1'); + t.equal(sign(maxSafeInteger), +1, 'sign(maxSafeInteger) === +1'); + + t.end(); +}); + +test('constants', function (t) { + t.equal(typeof maxArrayLength, 'number', 'typeof maxArrayLength === "number"'); + t.equal(typeof maxSafeInteger, 'number', 'typeof maxSafeInteger === "number"'); + t.equal(typeof maxValue, 'number', 'typeof maxValue === "number"'); + + t.end(); +}); diff --git a/node_modules/math-intrinsics/tsconfig.json b/node_modules/math-intrinsics/tsconfig.json new file mode 100644 index 0000000..b131000 --- /dev/null +++ b/node_modules/math-intrinsics/tsconfig.json @@ -0,0 +1,3 @@ +{ + "extends": "@ljharb/tsconfig", +} diff --git a/node_modules/mime-db/HISTORY.md b/node_modules/mime-db/HISTORY.md new file mode 100644 index 0000000..7436f64 --- /dev/null +++ b/node_modules/mime-db/HISTORY.md @@ -0,0 +1,507 @@ +1.52.0 / 2022-02-21 +=================== + + * Add extensions from IANA for more `image/*` types + * Add extension `.asc` to `application/pgp-keys` + * Add extensions to various XML types + * Add new upstream MIME types + +1.51.0 / 2021-11-08 +=================== + + * Add new upstream MIME types + * Mark `image/vnd.microsoft.icon` as compressible + * Mark `image/vnd.ms-dds` as compressible + +1.50.0 / 2021-09-15 +=================== + + * Add deprecated iWorks mime types and extensions + * Add new upstream MIME types + +1.49.0 / 2021-07-26 +=================== + + * Add extension `.trig` to `application/trig` + * Add new upstream MIME types + +1.48.0 / 2021-05-30 +=================== + + * Add extension `.mvt` to `application/vnd.mapbox-vector-tile` + * Add new upstream MIME types + * Mark `text/yaml` as compressible + +1.47.0 / 2021-04-01 +=================== + + * Add new upstream MIME types + * Remove ambigious extensions from IANA for `application/*+xml` types + * Update primary extension to `.es` for `application/ecmascript` + +1.46.0 / 2021-02-13 +=================== + + * Add extension `.amr` to `audio/amr` + * Add extension `.m4s` to `video/iso.segment` + * Add extension `.opus` to `audio/ogg` + * Add new upstream MIME types + +1.45.0 / 2020-09-22 +=================== + + * Add `application/ubjson` with extension `.ubj` + * Add `image/avif` with extension `.avif` + * Add `image/ktx2` with extension `.ktx2` + * Add extension `.dbf` to `application/vnd.dbf` + * Add extension `.rar` to `application/vnd.rar` + * Add extension `.td` to `application/urc-targetdesc+xml` + * Add new upstream MIME types + * Fix extension of `application/vnd.apple.keynote` to be `.key` + +1.44.0 / 2020-04-22 +=================== + + * Add charsets from IANA + * Add extension `.cjs` to `application/node` + * Add new upstream MIME types + +1.43.0 / 2020-01-05 +=================== + + * Add `application/x-keepass2` with extension `.kdbx` + * Add extension `.mxmf` to `audio/mobile-xmf` + * Add extensions from IANA for `application/*+xml` types + * Add new upstream MIME types + +1.42.0 / 2019-09-25 +=================== + + * Add `image/vnd.ms-dds` with extension `.dds` + * Add new upstream MIME types + * Remove compressible from `multipart/mixed` + +1.41.0 / 2019-08-30 +=================== + + * Add new upstream MIME types + * Add `application/toml` with extension `.toml` + * Mark `font/ttf` as compressible + +1.40.0 / 2019-04-20 +=================== + + * Add extensions from IANA for `model/*` types + * Add `text/mdx` with extension `.mdx` + +1.39.0 / 2019-04-04 +=================== + + * Add extensions `.siv` and `.sieve` to `application/sieve` + * Add new upstream MIME types + +1.38.0 / 2019-02-04 +=================== + + * Add extension `.nq` to `application/n-quads` + * Add extension `.nt` to `application/n-triples` + * Add new upstream MIME types + * Mark `text/less` as compressible + +1.37.0 / 2018-10-19 +=================== + + * Add extensions to HEIC image types + * Add new upstream MIME types + +1.36.0 / 2018-08-20 +=================== + + * Add Apple file extensions from IANA + * Add extensions from IANA for `image/*` types + * Add new upstream MIME types + +1.35.0 / 2018-07-15 +=================== + + * Add extension `.owl` to `application/rdf+xml` + * Add new upstream MIME types + - Removes extension `.woff` from `application/font-woff` + +1.34.0 / 2018-06-03 +=================== + + * Add extension `.csl` to `application/vnd.citationstyles.style+xml` + * Add extension `.es` to `application/ecmascript` + * Add new upstream MIME types + * Add `UTF-8` as default charset for `text/turtle` + * Mark all XML-derived types as compressible + +1.33.0 / 2018-02-15 +=================== + + * Add extensions from IANA for `message/*` types + * Add new upstream MIME types + * Fix some incorrect OOXML types + * Remove `application/font-woff2` + +1.32.0 / 2017-11-29 +=================== + + * Add new upstream MIME types + * Update `text/hjson` to registered `application/hjson` + * Add `text/shex` with extension `.shex` + +1.31.0 / 2017-10-25 +=================== + + * Add `application/raml+yaml` with extension `.raml` + * Add `application/wasm` with extension `.wasm` + * Add new `font` type from IANA + * Add new upstream font extensions + * Add new upstream MIME types + * Add extensions for JPEG-2000 images + +1.30.0 / 2017-08-27 +=================== + + * Add `application/vnd.ms-outlook` + * Add `application/x-arj` + * Add extension `.mjs` to `application/javascript` + * Add glTF types and extensions + * Add new upstream MIME types + * Add `text/x-org` + * Add VirtualBox MIME types + * Fix `source` records for `video/*` types that are IANA + * Update `font/opentype` to registered `font/otf` + +1.29.0 / 2017-07-10 +=================== + + * Add `application/fido.trusted-apps+json` + * Add extension `.wadl` to `application/vnd.sun.wadl+xml` + * Add new upstream MIME types + * Add `UTF-8` as default charset for `text/css` + +1.28.0 / 2017-05-14 +=================== + + * Add new upstream MIME types + * Add extension `.gz` to `application/gzip` + * Update extensions `.md` and `.markdown` to be `text/markdown` + +1.27.0 / 2017-03-16 +=================== + + * Add new upstream MIME types + * Add `image/apng` with extension `.apng` + +1.26.0 / 2017-01-14 +=================== + + * Add new upstream MIME types + * Add extension `.geojson` to `application/geo+json` + +1.25.0 / 2016-11-11 +=================== + + * Add new upstream MIME types + +1.24.0 / 2016-09-18 +=================== + + * Add `audio/mp3` + * Add new upstream MIME types + +1.23.0 / 2016-05-01 +=================== + + * Add new upstream MIME types + * Add extension `.3gpp` to `audio/3gpp` + +1.22.0 / 2016-02-15 +=================== + + * Add `text/slim` + * Add extension `.rng` to `application/xml` + * Add new upstream MIME types + * Fix extension of `application/dash+xml` to be `.mpd` + * Update primary extension to `.m4a` for `audio/mp4` + +1.21.0 / 2016-01-06 +=================== + + * Add Google document types + * Add new upstream MIME types + +1.20.0 / 2015-11-10 +=================== + + * Add `text/x-suse-ymp` + * Add new upstream MIME types + +1.19.0 / 2015-09-17 +=================== + + * Add `application/vnd.apple.pkpass` + * Add new upstream MIME types + +1.18.0 / 2015-09-03 +=================== + + * Add new upstream MIME types + +1.17.0 / 2015-08-13 +=================== + + * Add `application/x-msdos-program` + * Add `audio/g711-0` + * Add `image/vnd.mozilla.apng` + * Add extension `.exe` to `application/x-msdos-program` + +1.16.0 / 2015-07-29 +=================== + + * Add `application/vnd.uri-map` + +1.15.0 / 2015-07-13 +=================== + + * Add `application/x-httpd-php` + +1.14.0 / 2015-06-25 +=================== + + * Add `application/scim+json` + * Add `application/vnd.3gpp.ussd+xml` + * Add `application/vnd.biopax.rdf+xml` + * Add `text/x-processing` + +1.13.0 / 2015-06-07 +=================== + + * Add nginx as a source + * Add `application/x-cocoa` + * Add `application/x-java-archive-diff` + * Add `application/x-makeself` + * Add `application/x-perl` + * Add `application/x-pilot` + * Add `application/x-redhat-package-manager` + * Add `application/x-sea` + * Add `audio/x-m4a` + * Add `audio/x-realaudio` + * Add `image/x-jng` + * Add `text/mathml` + +1.12.0 / 2015-06-05 +=================== + + * Add `application/bdoc` + * Add `application/vnd.hyperdrive+json` + * Add `application/x-bdoc` + * Add extension `.rtf` to `text/rtf` + +1.11.0 / 2015-05-31 +=================== + + * Add `audio/wav` + * Add `audio/wave` + * Add extension `.litcoffee` to `text/coffeescript` + * Add extension `.sfd-hdstx` to `application/vnd.hydrostatix.sof-data` + * Add extension `.n-gage` to `application/vnd.nokia.n-gage.symbian.install` + +1.10.0 / 2015-05-19 +=================== + + * Add `application/vnd.balsamiq.bmpr` + * Add `application/vnd.microsoft.portable-executable` + * Add `application/x-ns-proxy-autoconfig` + +1.9.1 / 2015-04-19 +================== + + * Remove `.json` extension from `application/manifest+json` + - This is causing bugs downstream + +1.9.0 / 2015-04-19 +================== + + * Add `application/manifest+json` + * Add `application/vnd.micro+json` + * Add `image/vnd.zbrush.pcx` + * Add `image/x-ms-bmp` + +1.8.0 / 2015-03-13 +================== + + * Add `application/vnd.citationstyles.style+xml` + * Add `application/vnd.fastcopy-disk-image` + * Add `application/vnd.gov.sk.xmldatacontainer+xml` + * Add extension `.jsonld` to `application/ld+json` + +1.7.0 / 2015-02-08 +================== + + * Add `application/vnd.gerber` + * Add `application/vnd.msa-disk-image` + +1.6.1 / 2015-02-05 +================== + + * Community extensions ownership transferred from `node-mime` + +1.6.0 / 2015-01-29 +================== + + * Add `application/jose` + * Add `application/jose+json` + * Add `application/json-seq` + * Add `application/jwk+json` + * Add `application/jwk-set+json` + * Add `application/jwt` + * Add `application/rdap+json` + * Add `application/vnd.gov.sk.e-form+xml` + * Add `application/vnd.ims.imsccv1p3` + +1.5.0 / 2014-12-30 +================== + + * Add `application/vnd.oracle.resource+json` + * Fix various invalid MIME type entries + - `application/mbox+xml` + - `application/oscp-response` + - `application/vwg-multiplexed` + - `audio/g721` + +1.4.0 / 2014-12-21 +================== + + * Add `application/vnd.ims.imsccv1p2` + * Fix various invalid MIME type entries + - `application/vnd-acucobol` + - `application/vnd-curl` + - `application/vnd-dart` + - `application/vnd-dxr` + - `application/vnd-fdf` + - `application/vnd-mif` + - `application/vnd-sema` + - `application/vnd-wap-wmlc` + - `application/vnd.adobe.flash-movie` + - `application/vnd.dece-zip` + - `application/vnd.dvb_service` + - `application/vnd.micrografx-igx` + - `application/vnd.sealed-doc` + - `application/vnd.sealed-eml` + - `application/vnd.sealed-mht` + - `application/vnd.sealed-ppt` + - `application/vnd.sealed-tiff` + - `application/vnd.sealed-xls` + - `application/vnd.sealedmedia.softseal-html` + - `application/vnd.sealedmedia.softseal-pdf` + - `application/vnd.wap-slc` + - `application/vnd.wap-wbxml` + - `audio/vnd.sealedmedia.softseal-mpeg` + - `image/vnd-djvu` + - `image/vnd-svf` + - `image/vnd-wap-wbmp` + - `image/vnd.sealed-png` + - `image/vnd.sealedmedia.softseal-gif` + - `image/vnd.sealedmedia.softseal-jpg` + - `model/vnd-dwf` + - `model/vnd.parasolid.transmit-binary` + - `model/vnd.parasolid.transmit-text` + - `text/vnd-a` + - `text/vnd-curl` + - `text/vnd.wap-wml` + * Remove example template MIME types + - `application/example` + - `audio/example` + - `image/example` + - `message/example` + - `model/example` + - `multipart/example` + - `text/example` + - `video/example` + +1.3.1 / 2014-12-16 +================== + + * Fix missing extensions + - `application/json5` + - `text/hjson` + +1.3.0 / 2014-12-07 +================== + + * Add `application/a2l` + * Add `application/aml` + * Add `application/atfx` + * Add `application/atxml` + * Add `application/cdfx+xml` + * Add `application/dii` + * Add `application/json5` + * Add `application/lxf` + * Add `application/mf4` + * Add `application/vnd.apache.thrift.compact` + * Add `application/vnd.apache.thrift.json` + * Add `application/vnd.coffeescript` + * Add `application/vnd.enphase.envoy` + * Add `application/vnd.ims.imsccv1p1` + * Add `text/csv-schema` + * Add `text/hjson` + * Add `text/markdown` + * Add `text/yaml` + +1.2.0 / 2014-11-09 +================== + + * Add `application/cea` + * Add `application/dit` + * Add `application/vnd.gov.sk.e-form+zip` + * Add `application/vnd.tmd.mediaflex.api+xml` + * Type `application/epub+zip` is now IANA-registered + +1.1.2 / 2014-10-23 +================== + + * Rebuild database for `application/x-www-form-urlencoded` change + +1.1.1 / 2014-10-20 +================== + + * Mark `application/x-www-form-urlencoded` as compressible. + +1.1.0 / 2014-09-28 +================== + + * Add `application/font-woff2` + +1.0.3 / 2014-09-25 +================== + + * Fix engine requirement in package + +1.0.2 / 2014-09-25 +================== + + * Add `application/coap-group+json` + * Add `application/dcd` + * Add `application/vnd.apache.thrift.binary` + * Add `image/vnd.tencent.tap` + * Mark all JSON-derived types as compressible + * Update `text/vtt` data + +1.0.1 / 2014-08-30 +================== + + * Fix extension ordering + +1.0.0 / 2014-08-30 +================== + + * Add `application/atf` + * Add `application/merge-patch+json` + * Add `multipart/x-mixed-replace` + * Add `source: 'apache'` metadata + * Add `source: 'iana'` metadata + * Remove badly-assumed charset data diff --git a/node_modules/mime-db/LICENSE b/node_modules/mime-db/LICENSE new file mode 100644 index 0000000..0751cb1 --- /dev/null +++ b/node_modules/mime-db/LICENSE @@ -0,0 +1,23 @@ +(The MIT License) + +Copyright (c) 2014 Jonathan Ong +Copyright (c) 2015-2022 Douglas Christopher Wilson + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +'Software'), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/mime-db/README.md b/node_modules/mime-db/README.md new file mode 100644 index 0000000..5a8fcfe --- /dev/null +++ b/node_modules/mime-db/README.md @@ -0,0 +1,100 @@ +# mime-db + +[![NPM Version][npm-version-image]][npm-url] +[![NPM Downloads][npm-downloads-image]][npm-url] +[![Node.js Version][node-image]][node-url] +[![Build Status][ci-image]][ci-url] +[![Coverage Status][coveralls-image]][coveralls-url] + +This is a large database of mime types and information about them. +It consists of a single, public JSON file and does not include any logic, +allowing it to remain as un-opinionated as possible with an API. +It aggregates data from the following sources: + +- http://www.iana.org/assignments/media-types/media-types.xhtml +- http://svn.apache.org/repos/asf/httpd/httpd/trunk/docs/conf/mime.types +- http://hg.nginx.org/nginx/raw-file/default/conf/mime.types + +## Installation + +```bash +npm install mime-db +``` + +### Database Download + +If you're crazy enough to use this in the browser, you can just grab the +JSON file using [jsDelivr](https://www.jsdelivr.com/). It is recommended to +replace `master` with [a release tag](https://github.com/jshttp/mime-db/tags) +as the JSON format may change in the future. + +``` +https://cdn.jsdelivr.net/gh/jshttp/mime-db@master/db.json +``` + +## Usage + +```js +var db = require('mime-db') + +// grab data on .js files +var data = db['application/javascript'] +``` + +## Data Structure + +The JSON file is a map lookup for lowercased mime types. +Each mime type has the following properties: + +- `.source` - where the mime type is defined. + If not set, it's probably a custom media type. + - `apache` - [Apache common media types](http://svn.apache.org/repos/asf/httpd/httpd/trunk/docs/conf/mime.types) + - `iana` - [IANA-defined media types](http://www.iana.org/assignments/media-types/media-types.xhtml) + - `nginx` - [nginx media types](http://hg.nginx.org/nginx/raw-file/default/conf/mime.types) +- `.extensions[]` - known extensions associated with this mime type. +- `.compressible` - whether a file of this type can be gzipped. +- `.charset` - the default charset associated with this type, if any. + +If unknown, every property could be `undefined`. + +## Contributing + +To edit the database, only make PRs against `src/custom-types.json` or +`src/custom-suffix.json`. + +The `src/custom-types.json` file is a JSON object with the MIME type as the +keys and the values being an object with the following keys: + +- `compressible` - leave out if you don't know, otherwise `true`/`false` to + indicate whether the data represented by the type is typically compressible. +- `extensions` - include an array of file extensions that are associated with + the type. +- `notes` - human-readable notes about the type, typically what the type is. +- `sources` - include an array of URLs of where the MIME type and the associated + extensions are sourced from. This needs to be a [primary source](https://en.wikipedia.org/wiki/Primary_source); + links to type aggregating sites and Wikipedia are _not acceptable_. + +To update the build, run `npm run build`. + +### Adding Custom Media Types + +The best way to get new media types included in this library is to register +them with the IANA. The community registration procedure is outlined in +[RFC 6838 section 5](http://tools.ietf.org/html/rfc6838#section-5). Types +registered with the IANA are automatically pulled into this library. + +If that is not possible / feasible, they can be added directly here as a +"custom" type. To do this, it is required to have a primary source that +definitively lists the media type. If an extension is going to be listed as +associateed with this media type, the source must definitively link the +media type and extension as well. + +[ci-image]: https://badgen.net/github/checks/jshttp/mime-db/master?label=ci +[ci-url]: https://github.com/jshttp/mime-db/actions?query=workflow%3Aci +[coveralls-image]: https://badgen.net/coveralls/c/github/jshttp/mime-db/master +[coveralls-url]: https://coveralls.io/r/jshttp/mime-db?branch=master +[node-image]: https://badgen.net/npm/node/mime-db +[node-url]: https://nodejs.org/en/download +[npm-downloads-image]: https://badgen.net/npm/dm/mime-db +[npm-url]: https://npmjs.org/package/mime-db +[npm-version-image]: https://badgen.net/npm/v/mime-db diff --git a/node_modules/mime-db/db.json b/node_modules/mime-db/db.json new file mode 100644 index 0000000..eb9c42c --- /dev/null +++ b/node_modules/mime-db/db.json @@ -0,0 +1,8519 @@ +{ + "application/1d-interleaved-parityfec": { + "source": "iana" + }, + "application/3gpdash-qoe-report+xml": { + "source": "iana", + "charset": "UTF-8", + "compressible": true + }, + "application/3gpp-ims+xml": { + "source": "iana", + "compressible": true + }, + "application/3gpphal+json": { + "source": "iana", + "compressible": true + }, + "application/3gpphalforms+json": { + "source": "iana", + "compressible": true + }, + "application/a2l": { + "source": "iana" + }, + "application/ace+cbor": { + "source": "iana" + }, + "application/activemessage": { + "source": "iana" + }, + "application/activity+json": { + "source": "iana", + "compressible": true + }, + "application/alto-costmap+json": { + "source": "iana", + "compressible": true + }, + "application/alto-costmapfilter+json": { + "source": "iana", + "compressible": true + }, + "application/alto-directory+json": { + "source": "iana", + "compressible": true + }, + "application/alto-endpointcost+json": { + "source": "iana", + "compressible": true + }, + "application/alto-endpointcostparams+json": { + "source": "iana", + "compressible": true + }, + "application/alto-endpointprop+json": { + "source": "iana", + "compressible": true + }, + "application/alto-endpointpropparams+json": { + "source": "iana", + "compressible": true + }, + "application/alto-error+json": { + "source": "iana", + "compressible": true + }, + "application/alto-networkmap+json": { + "source": "iana", + "compressible": true + }, + "application/alto-networkmapfilter+json": { + "source": "iana", + "compressible": true + }, + "application/alto-updatestreamcontrol+json": { + "source": "iana", + "compressible": true + }, + "application/alto-updatestreamparams+json": { + "source": "iana", + "compressible": true + }, + "application/aml": { + "source": "iana" + }, + "application/andrew-inset": { + "source": "iana", + "extensions": ["ez"] + }, + "application/applefile": { + "source": "iana" + }, + "application/applixware": { + "source": "apache", + "extensions": ["aw"] + }, + "application/at+jwt": { + "source": "iana" + }, + "application/atf": { + "source": "iana" + }, + "application/atfx": { + "source": "iana" + }, + "application/atom+xml": { + "source": "iana", + "compressible": true, + "extensions": ["atom"] + }, + "application/atomcat+xml": { + "source": "iana", + "compressible": true, + "extensions": ["atomcat"] + }, + "application/atomdeleted+xml": { + "source": "iana", + "compressible": true, + "extensions": ["atomdeleted"] + }, + "application/atomicmail": { + "source": "iana" + }, + "application/atomsvc+xml": { + "source": "iana", + "compressible": true, + "extensions": ["atomsvc"] + }, + "application/atsc-dwd+xml": { + "source": "iana", + "compressible": true, + "extensions": ["dwd"] + }, + "application/atsc-dynamic-event-message": { + "source": "iana" + }, + "application/atsc-held+xml": { + "source": "iana", + "compressible": true, + "extensions": ["held"] + }, + "application/atsc-rdt+json": { + "source": "iana", + "compressible": true + }, + "application/atsc-rsat+xml": { + "source": "iana", + "compressible": true, + "extensions": ["rsat"] + }, + "application/atxml": { + "source": "iana" + }, + "application/auth-policy+xml": { + "source": "iana", + "compressible": true + }, + "application/bacnet-xdd+zip": { + "source": "iana", + "compressible": false + }, + "application/batch-smtp": { + "source": "iana" + }, + "application/bdoc": { + "compressible": false, + "extensions": ["bdoc"] + }, + "application/beep+xml": { + "source": "iana", + "charset": "UTF-8", + "compressible": true + }, + "application/calendar+json": { + "source": "iana", + "compressible": true + }, + "application/calendar+xml": { + "source": "iana", + "compressible": true, + "extensions": ["xcs"] + }, + "application/call-completion": { + "source": "iana" + }, + "application/cals-1840": { + "source": "iana" + }, + "application/captive+json": { + "source": "iana", + "compressible": true + }, + "application/cbor": { + "source": "iana" + }, + "application/cbor-seq": { + "source": "iana" + }, + "application/cccex": { + "source": "iana" + }, + "application/ccmp+xml": { + "source": "iana", + "compressible": true + }, + "application/ccxml+xml": { + "source": "iana", + "compressible": true, + "extensions": ["ccxml"] + }, + "application/cdfx+xml": { + "source": "iana", + "compressible": true, + "extensions": ["cdfx"] + }, + "application/cdmi-capability": { + "source": "iana", + "extensions": ["cdmia"] + }, + "application/cdmi-container": { + "source": "iana", + "extensions": ["cdmic"] + }, + "application/cdmi-domain": { + "source": "iana", + "extensions": ["cdmid"] + }, + "application/cdmi-object": { + "source": "iana", + "extensions": ["cdmio"] + }, + "application/cdmi-queue": { + "source": "iana", + "extensions": ["cdmiq"] + }, + "application/cdni": { + "source": "iana" + }, + "application/cea": { + "source": "iana" + }, + "application/cea-2018+xml": { + "source": "iana", + "compressible": true + }, + "application/cellml+xml": { + "source": "iana", + "compressible": true + }, + "application/cfw": { + "source": "iana" + }, + "application/city+json": { + "source": "iana", + "compressible": true + }, + "application/clr": { + "source": "iana" + }, + "application/clue+xml": { + "source": "iana", + "compressible": true + }, + "application/clue_info+xml": { + "source": "iana", + "compressible": true + }, + "application/cms": { + "source": "iana" + }, + "application/cnrp+xml": { + "source": "iana", + "compressible": true + }, + "application/coap-group+json": { + "source": "iana", + "compressible": true + }, + "application/coap-payload": { + "source": "iana" + }, + "application/commonground": { + "source": "iana" + }, + "application/conference-info+xml": { + "source": "iana", + "compressible": true + }, + "application/cose": { + "source": "iana" + }, + "application/cose-key": { + "source": "iana" + }, + "application/cose-key-set": { + "source": "iana" + }, + "application/cpl+xml": { + "source": "iana", + "compressible": true, + "extensions": ["cpl"] + }, + "application/csrattrs": { + "source": "iana" + }, + "application/csta+xml": { + "source": "iana", + "compressible": true + }, + "application/cstadata+xml": { + "source": "iana", + "compressible": true + }, + "application/csvm+json": { + "source": "iana", + "compressible": true + }, + "application/cu-seeme": { + "source": "apache", + "extensions": ["cu"] + }, + "application/cwt": { + "source": "iana" + }, + "application/cybercash": { + "source": "iana" + }, + "application/dart": { + "compressible": true + }, + "application/dash+xml": { + "source": "iana", + "compressible": true, + "extensions": ["mpd"] + }, + "application/dash-patch+xml": { + "source": "iana", + "compressible": true, + "extensions": ["mpp"] + }, + "application/dashdelta": { + "source": "iana" + }, + "application/davmount+xml": { + "source": "iana", + "compressible": true, + "extensions": ["davmount"] + }, + "application/dca-rft": { + "source": "iana" + }, + "application/dcd": { + "source": "iana" + }, + "application/dec-dx": { + "source": "iana" + }, + "application/dialog-info+xml": { + "source": "iana", + "compressible": true + }, + "application/dicom": { + "source": "iana" + }, + "application/dicom+json": { + "source": "iana", + "compressible": true + }, + "application/dicom+xml": { + "source": "iana", + "compressible": true + }, + "application/dii": { + "source": "iana" + }, + "application/dit": { + "source": "iana" + }, + "application/dns": { + "source": "iana" + }, + "application/dns+json": { + "source": "iana", + "compressible": true + }, + "application/dns-message": { + "source": "iana" + }, + "application/docbook+xml": { + "source": "apache", + "compressible": true, + "extensions": ["dbk"] + }, + "application/dots+cbor": { + "source": "iana" + }, + "application/dskpp+xml": { + "source": "iana", + "compressible": true + }, + "application/dssc+der": { + "source": "iana", + "extensions": ["dssc"] + }, + "application/dssc+xml": { + "source": "iana", + "compressible": true, + "extensions": ["xdssc"] + }, + "application/dvcs": { + "source": "iana" + }, + "application/ecmascript": { + "source": "iana", + "compressible": true, + "extensions": ["es","ecma"] + }, + "application/edi-consent": { + "source": "iana" + }, + "application/edi-x12": { + "source": "iana", + "compressible": false + }, + "application/edifact": { + "source": "iana", + "compressible": false + }, + "application/efi": { + "source": "iana" + }, + "application/elm+json": { + "source": "iana", + "charset": "UTF-8", + "compressible": true + }, + "application/elm+xml": { + "source": "iana", + "compressible": true + }, + "application/emergencycalldata.cap+xml": { + "source": "iana", + "charset": "UTF-8", + "compressible": true + }, + "application/emergencycalldata.comment+xml": { + "source": "iana", + "compressible": true + }, + "application/emergencycalldata.control+xml": { + "source": "iana", + "compressible": true + }, + "application/emergencycalldata.deviceinfo+xml": { + "source": "iana", + "compressible": true + }, + "application/emergencycalldata.ecall.msd": { + "source": "iana" + }, + "application/emergencycalldata.providerinfo+xml": { + "source": "iana", + "compressible": true + }, + "application/emergencycalldata.serviceinfo+xml": { + "source": "iana", + "compressible": true + }, + "application/emergencycalldata.subscriberinfo+xml": { + "source": "iana", + "compressible": true + }, + "application/emergencycalldata.veds+xml": { + "source": "iana", + "compressible": true + }, + "application/emma+xml": { + "source": "iana", + "compressible": true, + "extensions": ["emma"] + }, + "application/emotionml+xml": { + "source": "iana", + "compressible": true, + "extensions": ["emotionml"] + }, + "application/encaprtp": { + "source": "iana" + }, + "application/epp+xml": { + "source": "iana", + "compressible": true + }, + "application/epub+zip": { + "source": "iana", + "compressible": false, + "extensions": ["epub"] + }, + "application/eshop": { + "source": "iana" + }, + "application/exi": { + "source": "iana", + "extensions": ["exi"] + }, + "application/expect-ct-report+json": { + "source": "iana", + "compressible": true + }, + "application/express": { + "source": "iana", + "extensions": ["exp"] + }, + "application/fastinfoset": { + "source": "iana" + }, + "application/fastsoap": { + "source": "iana" + }, + "application/fdt+xml": { + "source": "iana", + "compressible": true, + "extensions": ["fdt"] + }, + "application/fhir+json": { + "source": "iana", + "charset": "UTF-8", + "compressible": true + }, + "application/fhir+xml": { + "source": "iana", + "charset": "UTF-8", + "compressible": true + }, + "application/fido.trusted-apps+json": { + "compressible": true + }, + "application/fits": { + "source": "iana" + }, + "application/flexfec": { + "source": "iana" + }, + "application/font-sfnt": { + "source": "iana" + }, + "application/font-tdpfr": { + "source": "iana", + "extensions": ["pfr"] + }, + "application/font-woff": { + "source": "iana", + "compressible": false + }, + "application/framework-attributes+xml": { + "source": "iana", + "compressible": true + }, + "application/geo+json": { + "source": "iana", + "compressible": true, + "extensions": ["geojson"] + }, + "application/geo+json-seq": { + "source": "iana" + }, + "application/geopackage+sqlite3": { + "source": "iana" + }, + "application/geoxacml+xml": { + "source": "iana", + "compressible": true + }, + "application/gltf-buffer": { + "source": "iana" + }, + "application/gml+xml": { + "source": "iana", + "compressible": true, + "extensions": ["gml"] + }, + "application/gpx+xml": { + "source": "apache", + "compressible": true, + "extensions": ["gpx"] + }, + "application/gxf": { + "source": "apache", + "extensions": ["gxf"] + }, + "application/gzip": { + "source": "iana", + "compressible": false, + "extensions": ["gz"] + }, + "application/h224": { + "source": "iana" + }, + "application/held+xml": { + "source": "iana", + "compressible": true + }, + "application/hjson": { + "extensions": ["hjson"] + }, + "application/http": { + "source": "iana" + }, + "application/hyperstudio": { + "source": "iana", + "extensions": ["stk"] + }, + "application/ibe-key-request+xml": { + "source": "iana", + "compressible": true + }, + "application/ibe-pkg-reply+xml": { + "source": "iana", + "compressible": true + }, + "application/ibe-pp-data": { + "source": "iana" + }, + "application/iges": { + "source": "iana" + }, + "application/im-iscomposing+xml": { + "source": "iana", + "charset": "UTF-8", + "compressible": true + }, + "application/index": { + "source": "iana" + }, + "application/index.cmd": { + "source": "iana" + }, + "application/index.obj": { + "source": "iana" + }, + "application/index.response": { + "source": "iana" + }, + "application/index.vnd": { + "source": "iana" + }, + "application/inkml+xml": { + "source": "iana", + "compressible": true, + "extensions": ["ink","inkml"] + }, + "application/iotp": { + "source": "iana" + }, + "application/ipfix": { + "source": "iana", + "extensions": ["ipfix"] + }, + "application/ipp": { + "source": "iana" + }, + "application/isup": { + "source": "iana" + }, + "application/its+xml": { + "source": "iana", + "compressible": true, + "extensions": ["its"] + }, + "application/java-archive": { + "source": "apache", + "compressible": false, + "extensions": ["jar","war","ear"] + }, + "application/java-serialized-object": { + "source": "apache", + "compressible": false, + "extensions": ["ser"] + }, + "application/java-vm": { + "source": "apache", + "compressible": false, + "extensions": ["class"] + }, + "application/javascript": { + "source": "iana", + "charset": "UTF-8", + "compressible": true, + "extensions": ["js","mjs"] + }, + "application/jf2feed+json": { + "source": "iana", + "compressible": true + }, + "application/jose": { + "source": "iana" + }, + "application/jose+json": { + "source": "iana", + "compressible": true + }, + "application/jrd+json": { + "source": "iana", + "compressible": true + }, + "application/jscalendar+json": { + "source": "iana", + "compressible": true + }, + "application/json": { + "source": "iana", + "charset": "UTF-8", + "compressible": true, + "extensions": ["json","map"] + }, + "application/json-patch+json": { + "source": "iana", + "compressible": true + }, + "application/json-seq": { + "source": "iana" + }, + "application/json5": { + "extensions": ["json5"] + }, + "application/jsonml+json": { + "source": "apache", + "compressible": true, + "extensions": ["jsonml"] + }, + "application/jwk+json": { + "source": "iana", + "compressible": true + }, + "application/jwk-set+json": { + "source": "iana", + "compressible": true + }, + "application/jwt": { + "source": "iana" + }, + "application/kpml-request+xml": { + "source": "iana", + "compressible": true + }, + "application/kpml-response+xml": { + "source": "iana", + "compressible": true + }, + "application/ld+json": { + "source": "iana", + "compressible": true, + "extensions": ["jsonld"] + }, + "application/lgr+xml": { + "source": "iana", + "compressible": true, + "extensions": ["lgr"] + }, + "application/link-format": { + "source": "iana" + }, + "application/load-control+xml": { + "source": "iana", + "compressible": true + }, + "application/lost+xml": { + "source": "iana", + "compressible": true, + "extensions": ["lostxml"] + }, + "application/lostsync+xml": { + "source": "iana", + "compressible": true + }, + "application/lpf+zip": { + "source": "iana", + "compressible": false + }, + "application/lxf": { + "source": "iana" + }, + "application/mac-binhex40": { + "source": "iana", + "extensions": ["hqx"] + }, + "application/mac-compactpro": { + "source": "apache", + "extensions": ["cpt"] + }, + "application/macwriteii": { + "source": "iana" + }, + "application/mads+xml": { + "source": "iana", + "compressible": true, + "extensions": ["mads"] + }, + "application/manifest+json": { + "source": "iana", + "charset": "UTF-8", + "compressible": true, + "extensions": ["webmanifest"] + }, + "application/marc": { + "source": "iana", + "extensions": ["mrc"] + }, + "application/marcxml+xml": { + "source": "iana", + "compressible": true, + "extensions": ["mrcx"] + }, + "application/mathematica": { + "source": "iana", + "extensions": ["ma","nb","mb"] + }, + "application/mathml+xml": { + "source": "iana", + "compressible": true, + "extensions": ["mathml"] + }, + "application/mathml-content+xml": { + "source": "iana", + "compressible": true + }, + "application/mathml-presentation+xml": { + "source": "iana", + "compressible": true + }, + "application/mbms-associated-procedure-description+xml": { + "source": "iana", + "compressible": true + }, + "application/mbms-deregister+xml": { + "source": "iana", + "compressible": true + }, + "application/mbms-envelope+xml": { + "source": "iana", + "compressible": true + }, + "application/mbms-msk+xml": { + "source": "iana", + "compressible": true + }, + "application/mbms-msk-response+xml": { + "source": "iana", + "compressible": true + }, + "application/mbms-protection-description+xml": { + "source": "iana", + "compressible": true + }, + "application/mbms-reception-report+xml": { + "source": "iana", + "compressible": true + }, + "application/mbms-register+xml": { + "source": "iana", + "compressible": true + }, + "application/mbms-register-response+xml": { + "source": "iana", + "compressible": true + }, + "application/mbms-schedule+xml": { + "source": "iana", + "compressible": true + }, + "application/mbms-user-service-description+xml": { + "source": "iana", + "compressible": true + }, + "application/mbox": { + "source": "iana", + "extensions": ["mbox"] + }, + "application/media-policy-dataset+xml": { + "source": "iana", + "compressible": true, + "extensions": ["mpf"] + }, + "application/media_control+xml": { + "source": "iana", + "compressible": true + }, + "application/mediaservercontrol+xml": { + "source": "iana", + "compressible": true, + "extensions": ["mscml"] + }, + "application/merge-patch+json": { + "source": "iana", + "compressible": true + }, + "application/metalink+xml": { + "source": "apache", + "compressible": true, + "extensions": ["metalink"] + }, + "application/metalink4+xml": { + "source": "iana", + "compressible": true, + "extensions": ["meta4"] + }, + "application/mets+xml": { + "source": "iana", + "compressible": true, + "extensions": ["mets"] + }, + "application/mf4": { + "source": "iana" + }, + "application/mikey": { + "source": "iana" + }, + "application/mipc": { + "source": "iana" + }, + "application/missing-blocks+cbor-seq": { + "source": "iana" + }, + "application/mmt-aei+xml": { + "source": "iana", + "compressible": true, + "extensions": ["maei"] + }, + "application/mmt-usd+xml": { + "source": "iana", + "compressible": true, + "extensions": ["musd"] + }, + "application/mods+xml": { + "source": "iana", + "compressible": true, + "extensions": ["mods"] + }, + "application/moss-keys": { + "source": "iana" + }, + "application/moss-signature": { + "source": "iana" + }, + "application/mosskey-data": { + "source": "iana" + }, + "application/mosskey-request": { + "source": "iana" + }, + "application/mp21": { + "source": "iana", + "extensions": ["m21","mp21"] + }, + "application/mp4": { + "source": "iana", + "extensions": ["mp4s","m4p"] + }, + "application/mpeg4-generic": { + "source": "iana" + }, + "application/mpeg4-iod": { + "source": "iana" + }, + "application/mpeg4-iod-xmt": { + "source": "iana" + }, + "application/mrb-consumer+xml": { + "source": "iana", + "compressible": true + }, + "application/mrb-publish+xml": { + "source": "iana", + "compressible": true + }, + "application/msc-ivr+xml": { + "source": "iana", + "charset": "UTF-8", + "compressible": true + }, + "application/msc-mixer+xml": { + "source": "iana", + "charset": "UTF-8", + "compressible": true + }, + "application/msword": { + "source": "iana", + "compressible": false, + "extensions": ["doc","dot"] + }, + "application/mud+json": { + "source": "iana", + "compressible": true + }, + "application/multipart-core": { + "source": "iana" + }, + "application/mxf": { + "source": "iana", + "extensions": ["mxf"] + }, + "application/n-quads": { + "source": "iana", + "extensions": ["nq"] + }, + "application/n-triples": { + "source": "iana", + "extensions": ["nt"] + }, + "application/nasdata": { + "source": "iana" + }, + "application/news-checkgroups": { + "source": "iana", + "charset": "US-ASCII" + }, + "application/news-groupinfo": { + "source": "iana", + "charset": "US-ASCII" + }, + "application/news-transmission": { + "source": "iana" + }, + "application/nlsml+xml": { + "source": "iana", + "compressible": true + }, + "application/node": { + "source": "iana", + "extensions": ["cjs"] + }, + "application/nss": { + "source": "iana" + }, + "application/oauth-authz-req+jwt": { + "source": "iana" + }, + "application/oblivious-dns-message": { + "source": "iana" + }, + "application/ocsp-request": { + "source": "iana" + }, + "application/ocsp-response": { + "source": "iana" + }, + "application/octet-stream": { + "source": "iana", + "compressible": false, + "extensions": ["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","exe","dll","deb","dmg","iso","img","msi","msp","msm","buffer"] + }, + "application/oda": { + "source": "iana", + "extensions": ["oda"] + }, + "application/odm+xml": { + "source": "iana", + "compressible": true + }, + "application/odx": { + "source": "iana" + }, + "application/oebps-package+xml": { + "source": "iana", + "compressible": true, + "extensions": ["opf"] + }, + "application/ogg": { + "source": "iana", + "compressible": false, + "extensions": ["ogx"] + }, + "application/omdoc+xml": { + "source": "apache", + "compressible": true, + "extensions": ["omdoc"] + }, + "application/onenote": { + "source": "apache", + "extensions": ["onetoc","onetoc2","onetmp","onepkg"] + }, + "application/opc-nodeset+xml": { + "source": "iana", + "compressible": true + }, + "application/oscore": { + "source": "iana" + }, + "application/oxps": { + "source": "iana", + "extensions": ["oxps"] + }, + "application/p21": { + "source": "iana" + }, + "application/p21+zip": { + "source": "iana", + "compressible": false + }, + "application/p2p-overlay+xml": { + "source": "iana", + "compressible": true, + "extensions": ["relo"] + }, + "application/parityfec": { + "source": "iana" + }, + "application/passport": { + "source": "iana" + }, + "application/patch-ops-error+xml": { + "source": "iana", + "compressible": true, + "extensions": ["xer"] + }, + "application/pdf": { + "source": "iana", + "compressible": false, + "extensions": ["pdf"] + }, + "application/pdx": { + "source": "iana" + }, + "application/pem-certificate-chain": { + "source": "iana" + }, + "application/pgp-encrypted": { + "source": "iana", + "compressible": false, + "extensions": ["pgp"] + }, + "application/pgp-keys": { + "source": "iana", + "extensions": ["asc"] + }, + "application/pgp-signature": { + "source": "iana", + "extensions": ["asc","sig"] + }, + "application/pics-rules": { + "source": "apache", + "extensions": ["prf"] + }, + "application/pidf+xml": { + "source": "iana", + "charset": "UTF-8", + "compressible": true + }, + "application/pidf-diff+xml": { + "source": "iana", + "charset": "UTF-8", + "compressible": true + }, + "application/pkcs10": { + "source": "iana", + "extensions": ["p10"] + }, + "application/pkcs12": { + "source": "iana" + }, + "application/pkcs7-mime": { + "source": "iana", + "extensions": ["p7m","p7c"] + }, + "application/pkcs7-signature": { + "source": "iana", + "extensions": ["p7s"] + }, + "application/pkcs8": { + "source": "iana", + "extensions": ["p8"] + }, + "application/pkcs8-encrypted": { + "source": "iana" + }, + "application/pkix-attr-cert": { + "source": "iana", + "extensions": ["ac"] + }, + "application/pkix-cert": { + "source": "iana", + "extensions": ["cer"] + }, + "application/pkix-crl": { + "source": "iana", + "extensions": ["crl"] + }, + "application/pkix-pkipath": { + "source": "iana", + "extensions": ["pkipath"] + }, + "application/pkixcmp": { + "source": "iana", + "extensions": ["pki"] + }, + "application/pls+xml": { + "source": "iana", + "compressible": true, + "extensions": ["pls"] + }, + "application/poc-settings+xml": { + "source": "iana", + "charset": "UTF-8", + "compressible": true + }, + "application/postscript": { + "source": "iana", + "compressible": true, + "extensions": ["ai","eps","ps"] + }, + "application/ppsp-tracker+json": { + "source": "iana", + "compressible": true + }, + "application/problem+json": { + "source": "iana", + "compressible": true + }, + "application/problem+xml": { + "source": "iana", + "compressible": true + }, + "application/provenance+xml": { + "source": "iana", + "compressible": true, + "extensions": ["provx"] + }, + "application/prs.alvestrand.titrax-sheet": { + "source": "iana" + }, + "application/prs.cww": { + "source": "iana", + "extensions": ["cww"] + }, + "application/prs.cyn": { + "source": "iana", + "charset": "7-BIT" + }, + "application/prs.hpub+zip": { + "source": "iana", + "compressible": false + }, + "application/prs.nprend": { + "source": "iana" + }, + "application/prs.plucker": { + "source": "iana" + }, + "application/prs.rdf-xml-crypt": { + "source": "iana" + }, + "application/prs.xsf+xml": { + "source": "iana", + "compressible": true + }, + "application/pskc+xml": { + "source": "iana", + "compressible": true, + "extensions": ["pskcxml"] + }, + "application/pvd+json": { + "source": "iana", + "compressible": true + }, + "application/qsig": { + "source": "iana" + }, + "application/raml+yaml": { + "compressible": true, + "extensions": ["raml"] + }, + "application/raptorfec": { + "source": "iana" + }, + "application/rdap+json": { + "source": "iana", + "compressible": true + }, + "application/rdf+xml": { + "source": "iana", + "compressible": true, + "extensions": ["rdf","owl"] + }, + "application/reginfo+xml": { + "source": "iana", + "compressible": true, + "extensions": ["rif"] + }, + "application/relax-ng-compact-syntax": { + "source": "iana", + "extensions": ["rnc"] + }, + "application/remote-printing": { + "source": "iana" + }, + "application/reputon+json": { + "source": "iana", + "compressible": true + }, + "application/resource-lists+xml": { + "source": "iana", + "compressible": true, + "extensions": ["rl"] + }, + "application/resource-lists-diff+xml": { + "source": "iana", + "compressible": true, + "extensions": ["rld"] + }, + "application/rfc+xml": { + "source": "iana", + "compressible": true + }, + "application/riscos": { + "source": "iana" + }, + "application/rlmi+xml": { + "source": "iana", + "compressible": true + }, + "application/rls-services+xml": { + "source": "iana", + "compressible": true, + "extensions": ["rs"] + }, + "application/route-apd+xml": { + "source": "iana", + "compressible": true, + "extensions": ["rapd"] + }, + "application/route-s-tsid+xml": { + "source": "iana", + "compressible": true, + "extensions": ["sls"] + }, + "application/route-usd+xml": { + "source": "iana", + "compressible": true, + "extensions": ["rusd"] + }, + "application/rpki-ghostbusters": { + "source": "iana", + "extensions": ["gbr"] + }, + "application/rpki-manifest": { + "source": "iana", + "extensions": ["mft"] + }, + "application/rpki-publication": { + "source": "iana" + }, + "application/rpki-roa": { + "source": "iana", + "extensions": ["roa"] + }, + "application/rpki-updown": { + "source": "iana" + }, + "application/rsd+xml": { + "source": "apache", + "compressible": true, + "extensions": ["rsd"] + }, + "application/rss+xml": { + "source": "apache", + "compressible": true, + "extensions": ["rss"] + }, + "application/rtf": { + "source": "iana", + "compressible": true, + "extensions": ["rtf"] + }, + "application/rtploopback": { + "source": "iana" + }, + "application/rtx": { + "source": "iana" + }, + "application/samlassertion+xml": { + "source": "iana", + "compressible": true + }, + "application/samlmetadata+xml": { + "source": "iana", + "compressible": true + }, + "application/sarif+json": { + "source": "iana", + "compressible": true + }, + "application/sarif-external-properties+json": { + "source": "iana", + "compressible": true + }, + "application/sbe": { + "source": "iana" + }, + "application/sbml+xml": { + "source": "iana", + "compressible": true, + "extensions": ["sbml"] + }, + "application/scaip+xml": { + "source": "iana", + "compressible": true + }, + "application/scim+json": { + "source": "iana", + "compressible": true + }, + "application/scvp-cv-request": { + "source": "iana", + "extensions": ["scq"] + }, + "application/scvp-cv-response": { + "source": "iana", + "extensions": ["scs"] + }, + "application/scvp-vp-request": { + "source": "iana", + "extensions": ["spq"] + }, + "application/scvp-vp-response": { + "source": "iana", + "extensions": ["spp"] + }, + "application/sdp": { + "source": "iana", + "extensions": ["sdp"] + }, + "application/secevent+jwt": { + "source": "iana" + }, + "application/senml+cbor": { + "source": "iana" + }, + "application/senml+json": { + "source": "iana", + "compressible": true + }, + "application/senml+xml": { + "source": "iana", + "compressible": true, + "extensions": ["senmlx"] + }, + "application/senml-etch+cbor": { + "source": "iana" + }, + "application/senml-etch+json": { + "source": "iana", + "compressible": true + }, + "application/senml-exi": { + "source": "iana" + }, + "application/sensml+cbor": { + "source": "iana" + }, + "application/sensml+json": { + "source": "iana", + "compressible": true + }, + "application/sensml+xml": { + "source": "iana", + "compressible": true, + "extensions": ["sensmlx"] + }, + "application/sensml-exi": { + "source": "iana" + }, + "application/sep+xml": { + "source": "iana", + "compressible": true + }, + "application/sep-exi": { + "source": "iana" + }, + "application/session-info": { + "source": "iana" + }, + "application/set-payment": { + "source": "iana" + }, + "application/set-payment-initiation": { + "source": "iana", + "extensions": ["setpay"] + }, + "application/set-registration": { + "source": "iana" + }, + "application/set-registration-initiation": { + "source": "iana", + "extensions": ["setreg"] + }, + "application/sgml": { + "source": "iana" + }, + "application/sgml-open-catalog": { + "source": "iana" + }, + "application/shf+xml": { + "source": "iana", + "compressible": true, + "extensions": ["shf"] + }, + "application/sieve": { + "source": "iana", + "extensions": ["siv","sieve"] + }, + "application/simple-filter+xml": { + "source": "iana", + "compressible": true + }, + "application/simple-message-summary": { + "source": "iana" + }, + "application/simplesymbolcontainer": { + "source": "iana" + }, + "application/sipc": { + "source": "iana" + }, + "application/slate": { + "source": "iana" + }, + "application/smil": { + "source": "iana" + }, + "application/smil+xml": { + "source": "iana", + "compressible": true, + "extensions": ["smi","smil"] + }, + "application/smpte336m": { + "source": "iana" + }, + "application/soap+fastinfoset": { + "source": "iana" + }, + "application/soap+xml": { + "source": "iana", + "compressible": true + }, + "application/sparql-query": { + "source": "iana", + "extensions": ["rq"] + }, + "application/sparql-results+xml": { + "source": "iana", + "compressible": true, + "extensions": ["srx"] + }, + "application/spdx+json": { + "source": "iana", + "compressible": true + }, + "application/spirits-event+xml": { + "source": "iana", + "compressible": true + }, + "application/sql": { + "source": "iana" + }, + "application/srgs": { + "source": "iana", + "extensions": ["gram"] + }, + "application/srgs+xml": { + "source": "iana", + "compressible": true, + "extensions": ["grxml"] + }, + "application/sru+xml": { + "source": "iana", + "compressible": true, + "extensions": ["sru"] + }, + "application/ssdl+xml": { + "source": "apache", + "compressible": true, + "extensions": ["ssdl"] + }, + "application/ssml+xml": { + "source": "iana", + "compressible": true, + "extensions": ["ssml"] + }, + "application/stix+json": { + "source": "iana", + "compressible": true + }, + "application/swid+xml": { + "source": "iana", + "compressible": true, + "extensions": ["swidtag"] + }, + "application/tamp-apex-update": { + "source": "iana" + }, + "application/tamp-apex-update-confirm": { + "source": "iana" + }, + "application/tamp-community-update": { + "source": "iana" + }, + "application/tamp-community-update-confirm": { + "source": "iana" + }, + "application/tamp-error": { + "source": "iana" + }, + "application/tamp-sequence-adjust": { + "source": "iana" + }, + "application/tamp-sequence-adjust-confirm": { + "source": "iana" + }, + "application/tamp-status-query": { + "source": "iana" + }, + "application/tamp-status-response": { + "source": "iana" + }, + "application/tamp-update": { + "source": "iana" + }, + "application/tamp-update-confirm": { + "source": "iana" + }, + "application/tar": { + "compressible": true + }, + "application/taxii+json": { + "source": "iana", + "compressible": true + }, + "application/td+json": { + "source": "iana", + "compressible": true + }, + "application/tei+xml": { + "source": "iana", + "compressible": true, + "extensions": ["tei","teicorpus"] + }, + "application/tetra_isi": { + "source": "iana" + }, + "application/thraud+xml": { + "source": "iana", + "compressible": true, + "extensions": ["tfi"] + }, + "application/timestamp-query": { + "source": "iana" + }, + "application/timestamp-reply": { + "source": "iana" + }, + "application/timestamped-data": { + "source": "iana", + "extensions": ["tsd"] + }, + "application/tlsrpt+gzip": { + "source": "iana" + }, + "application/tlsrpt+json": { + "source": "iana", + "compressible": true + }, + "application/tnauthlist": { + "source": "iana" + }, + "application/token-introspection+jwt": { + "source": "iana" + }, + "application/toml": { + "compressible": true, + "extensions": ["toml"] + }, + "application/trickle-ice-sdpfrag": { + "source": "iana" + }, + "application/trig": { + "source": "iana", + "extensions": ["trig"] + }, + "application/ttml+xml": { + "source": "iana", + "compressible": true, + "extensions": ["ttml"] + }, + "application/tve-trigger": { + "source": "iana" + }, + "application/tzif": { + "source": "iana" + }, + "application/tzif-leap": { + "source": "iana" + }, + "application/ubjson": { + "compressible": false, + "extensions": ["ubj"] + }, + "application/ulpfec": { + "source": "iana" + }, + "application/urc-grpsheet+xml": { + "source": "iana", + "compressible": true + }, + "application/urc-ressheet+xml": { + "source": "iana", + "compressible": true, + "extensions": ["rsheet"] + }, + "application/urc-targetdesc+xml": { + "source": "iana", + "compressible": true, + "extensions": ["td"] + }, + "application/urc-uisocketdesc+xml": { + "source": "iana", + "compressible": true + }, + "application/vcard+json": { + "source": "iana", + "compressible": true + }, + "application/vcard+xml": { + "source": "iana", + "compressible": true + }, + "application/vemmi": { + "source": "iana" + }, + "application/vividence.scriptfile": { + "source": "apache" + }, + "application/vnd.1000minds.decision-model+xml": { + "source": "iana", + "compressible": true, + "extensions": ["1km"] + }, + "application/vnd.3gpp-prose+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp-prose-pc3ch+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp-v2x-local-service-information": { + "source": "iana" + }, + "application/vnd.3gpp.5gnas": { + "source": "iana" + }, + "application/vnd.3gpp.access-transfer-events+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.bsf+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.gmop+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.gtpc": { + "source": "iana" + }, + "application/vnd.3gpp.interworking-data": { + "source": "iana" + }, + "application/vnd.3gpp.lpp": { + "source": "iana" + }, + "application/vnd.3gpp.mc-signalling-ear": { + "source": "iana" + }, + "application/vnd.3gpp.mcdata-affiliation-command+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcdata-info+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcdata-payload": { + "source": "iana" + }, + "application/vnd.3gpp.mcdata-service-config+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcdata-signalling": { + "source": "iana" + }, + "application/vnd.3gpp.mcdata-ue-config+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcdata-user-profile+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcptt-affiliation-command+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcptt-floor-request+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcptt-info+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcptt-location-info+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcptt-mbms-usage-info+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcptt-service-config+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcptt-signed+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcptt-ue-config+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcptt-ue-init-config+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcptt-user-profile+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcvideo-affiliation-command+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcvideo-affiliation-info+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcvideo-info+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcvideo-location-info+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcvideo-mbms-usage-info+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcvideo-service-config+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcvideo-transmission-request+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcvideo-ue-config+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mcvideo-user-profile+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.mid-call+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.ngap": { + "source": "iana" + }, + "application/vnd.3gpp.pfcp": { + "source": "iana" + }, + "application/vnd.3gpp.pic-bw-large": { + "source": "iana", + "extensions": ["plb"] + }, + "application/vnd.3gpp.pic-bw-small": { + "source": "iana", + "extensions": ["psb"] + }, + "application/vnd.3gpp.pic-bw-var": { + "source": "iana", + "extensions": ["pvb"] + }, + "application/vnd.3gpp.s1ap": { + "source": "iana" + }, + "application/vnd.3gpp.sms": { + "source": "iana" + }, + "application/vnd.3gpp.sms+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.srvcc-ext+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.srvcc-info+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.state-and-event-info+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp.ussd+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp2.bcmcsinfo+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.3gpp2.sms": { + "source": "iana" + }, + "application/vnd.3gpp2.tcap": { + "source": "iana", + "extensions": ["tcap"] + }, + "application/vnd.3lightssoftware.imagescal": { + "source": "iana" + }, + "application/vnd.3m.post-it-notes": { + "source": "iana", + "extensions": ["pwn"] + }, + "application/vnd.accpac.simply.aso": { + "source": "iana", + "extensions": ["aso"] + }, + "application/vnd.accpac.simply.imp": { + "source": "iana", + "extensions": ["imp"] + }, + "application/vnd.acucobol": { + "source": "iana", + "extensions": ["acu"] + }, + "application/vnd.acucorp": { + "source": "iana", + "extensions": ["atc","acutc"] + }, + "application/vnd.adobe.air-application-installer-package+zip": { + "source": "apache", + "compressible": false, + "extensions": ["air"] + }, + "application/vnd.adobe.flash.movie": { + "source": "iana" + }, + "application/vnd.adobe.formscentral.fcdt": { + "source": "iana", + "extensions": ["fcdt"] + }, + "application/vnd.adobe.fxp": { + "source": "iana", + "extensions": ["fxp","fxpl"] + }, + "application/vnd.adobe.partial-upload": { + "source": "iana" + }, + "application/vnd.adobe.xdp+xml": { + "source": "iana", + "compressible": true, + "extensions": ["xdp"] + }, + "application/vnd.adobe.xfdf": { + "source": "iana", + "extensions": ["xfdf"] + }, + "application/vnd.aether.imp": { + "source": "iana" + }, + "application/vnd.afpc.afplinedata": { + "source": "iana" + }, + "application/vnd.afpc.afplinedata-pagedef": { + "source": "iana" + }, + "application/vnd.afpc.cmoca-cmresource": { + "source": "iana" + }, + "application/vnd.afpc.foca-charset": { + "source": "iana" + }, + "application/vnd.afpc.foca-codedfont": { + "source": "iana" + }, + "application/vnd.afpc.foca-codepage": { + "source": "iana" + }, + "application/vnd.afpc.modca": { + "source": "iana" + }, + "application/vnd.afpc.modca-cmtable": { + "source": "iana" + }, + "application/vnd.afpc.modca-formdef": { + "source": "iana" + }, + "application/vnd.afpc.modca-mediummap": { + "source": "iana" + }, + "application/vnd.afpc.modca-objectcontainer": { + "source": "iana" + }, + "application/vnd.afpc.modca-overlay": { + "source": "iana" + }, + "application/vnd.afpc.modca-pagesegment": { + "source": "iana" + }, + "application/vnd.age": { + "source": "iana", + "extensions": ["age"] + }, + "application/vnd.ah-barcode": { + "source": "iana" + }, + "application/vnd.ahead.space": { + "source": "iana", + "extensions": ["ahead"] + }, + "application/vnd.airzip.filesecure.azf": { + "source": "iana", + "extensions": ["azf"] + }, + "application/vnd.airzip.filesecure.azs": { + "source": "iana", + "extensions": ["azs"] + }, + "application/vnd.amadeus+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.amazon.ebook": { + "source": "apache", + "extensions": ["azw"] + }, + "application/vnd.amazon.mobi8-ebook": { + "source": "iana" + }, + "application/vnd.americandynamics.acc": { + "source": "iana", + "extensions": ["acc"] + }, + "application/vnd.amiga.ami": { + "source": "iana", + "extensions": ["ami"] + }, + "application/vnd.amundsen.maze+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.android.ota": { + "source": "iana" + }, + "application/vnd.android.package-archive": { + "source": "apache", + "compressible": false, + "extensions": ["apk"] + }, + "application/vnd.anki": { + "source": "iana" + }, + "application/vnd.anser-web-certificate-issue-initiation": { + "source": "iana", + "extensions": ["cii"] + }, + "application/vnd.anser-web-funds-transfer-initiation": { + "source": "apache", + "extensions": ["fti"] + }, + "application/vnd.antix.game-component": { + "source": "iana", + "extensions": ["atx"] + }, + "application/vnd.apache.arrow.file": { + "source": "iana" + }, + "application/vnd.apache.arrow.stream": { + "source": "iana" + }, + "application/vnd.apache.thrift.binary": { + "source": "iana" + }, + "application/vnd.apache.thrift.compact": { + "source": "iana" + }, + "application/vnd.apache.thrift.json": { + "source": "iana" + }, + "application/vnd.api+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.aplextor.warrp+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.apothekende.reservation+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.apple.installer+xml": { + "source": "iana", + "compressible": true, + "extensions": ["mpkg"] + }, + "application/vnd.apple.keynote": { + "source": "iana", + "extensions": ["key"] + }, + "application/vnd.apple.mpegurl": { + "source": "iana", + "extensions": ["m3u8"] + }, + "application/vnd.apple.numbers": { + "source": "iana", + "extensions": ["numbers"] + }, + "application/vnd.apple.pages": { + "source": "iana", + "extensions": ["pages"] + }, + "application/vnd.apple.pkpass": { + "compressible": false, + "extensions": ["pkpass"] + }, + "application/vnd.arastra.swi": { + "source": "iana" + }, + "application/vnd.aristanetworks.swi": { + "source": "iana", + "extensions": ["swi"] + }, + "application/vnd.artisan+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.artsquare": { + "source": "iana" + }, + "application/vnd.astraea-software.iota": { + "source": "iana", + "extensions": ["iota"] + }, + "application/vnd.audiograph": { + "source": "iana", + "extensions": ["aep"] + }, + "application/vnd.autopackage": { + "source": "iana" + }, + "application/vnd.avalon+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.avistar+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.balsamiq.bmml+xml": { + "source": "iana", + "compressible": true, + "extensions": ["bmml"] + }, + "application/vnd.balsamiq.bmpr": { + "source": "iana" + }, + "application/vnd.banana-accounting": { + "source": "iana" + }, + "application/vnd.bbf.usp.error": { + "source": "iana" + }, + "application/vnd.bbf.usp.msg": { + "source": "iana" + }, + "application/vnd.bbf.usp.msg+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.bekitzur-stech+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.bint.med-content": { + "source": "iana" + }, + "application/vnd.biopax.rdf+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.blink-idb-value-wrapper": { + "source": "iana" + }, + "application/vnd.blueice.multipass": { + "source": "iana", + "extensions": ["mpm"] + }, + "application/vnd.bluetooth.ep.oob": { + "source": "iana" + }, + "application/vnd.bluetooth.le.oob": { + "source": "iana" + }, + "application/vnd.bmi": { + "source": "iana", + "extensions": ["bmi"] + }, + "application/vnd.bpf": { + "source": "iana" + }, + "application/vnd.bpf3": { + "source": "iana" + }, + "application/vnd.businessobjects": { + "source": "iana", + "extensions": ["rep"] + }, + "application/vnd.byu.uapi+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.cab-jscript": { + "source": "iana" + }, + "application/vnd.canon-cpdl": { + "source": "iana" + }, + "application/vnd.canon-lips": { + "source": "iana" + }, + "application/vnd.capasystems-pg+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.cendio.thinlinc.clientconf": { + "source": "iana" + }, + "application/vnd.century-systems.tcp_stream": { + "source": "iana" + }, + "application/vnd.chemdraw+xml": { + "source": "iana", + "compressible": true, + "extensions": ["cdxml"] + }, + "application/vnd.chess-pgn": { + "source": "iana" + }, + "application/vnd.chipnuts.karaoke-mmd": { + "source": "iana", + "extensions": ["mmd"] + }, + "application/vnd.ciedi": { + "source": "iana" + }, + "application/vnd.cinderella": { + "source": "iana", + "extensions": ["cdy"] + }, + "application/vnd.cirpack.isdn-ext": { + "source": "iana" + }, + "application/vnd.citationstyles.style+xml": { + "source": "iana", + "compressible": true, + "extensions": ["csl"] + }, + "application/vnd.claymore": { + "source": "iana", + "extensions": ["cla"] + }, + "application/vnd.cloanto.rp9": { + "source": "iana", + "extensions": ["rp9"] + }, + "application/vnd.clonk.c4group": { + "source": "iana", + "extensions": ["c4g","c4d","c4f","c4p","c4u"] + }, + "application/vnd.cluetrust.cartomobile-config": { + "source": "iana", + "extensions": ["c11amc"] + }, + "application/vnd.cluetrust.cartomobile-config-pkg": { + "source": "iana", + "extensions": ["c11amz"] + }, + "application/vnd.coffeescript": { + "source": "iana" + }, + "application/vnd.collabio.xodocuments.document": { + "source": "iana" + }, + "application/vnd.collabio.xodocuments.document-template": { + "source": "iana" + }, + "application/vnd.collabio.xodocuments.presentation": { + "source": "iana" + }, + "application/vnd.collabio.xodocuments.presentation-template": { + "source": "iana" + }, + "application/vnd.collabio.xodocuments.spreadsheet": { + "source": "iana" + }, + "application/vnd.collabio.xodocuments.spreadsheet-template": { + "source": "iana" + }, + "application/vnd.collection+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.collection.doc+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.collection.next+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.comicbook+zip": { + "source": "iana", + "compressible": false + }, + "application/vnd.comicbook-rar": { + "source": "iana" + }, + "application/vnd.commerce-battelle": { + "source": "iana" + }, + "application/vnd.commonspace": { + "source": "iana", + "extensions": ["csp"] + }, + "application/vnd.contact.cmsg": { + "source": "iana", + "extensions": ["cdbcmsg"] + }, + "application/vnd.coreos.ignition+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.cosmocaller": { + "source": "iana", + "extensions": ["cmc"] + }, + "application/vnd.crick.clicker": { + "source": "iana", + "extensions": ["clkx"] + }, + "application/vnd.crick.clicker.keyboard": { + "source": "iana", + "extensions": ["clkk"] + }, + "application/vnd.crick.clicker.palette": { + "source": "iana", + "extensions": ["clkp"] + }, + "application/vnd.crick.clicker.template": { + "source": "iana", + "extensions": ["clkt"] + }, + "application/vnd.crick.clicker.wordbank": { + "source": "iana", + "extensions": ["clkw"] + }, + "application/vnd.criticaltools.wbs+xml": { + "source": "iana", + "compressible": true, + "extensions": ["wbs"] + }, + "application/vnd.cryptii.pipe+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.crypto-shade-file": { + "source": "iana" + }, + "application/vnd.cryptomator.encrypted": { + "source": "iana" + }, + "application/vnd.cryptomator.vault": { + "source": "iana" + }, + "application/vnd.ctc-posml": { + "source": "iana", + "extensions": ["pml"] + }, + "application/vnd.ctct.ws+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.cups-pdf": { + "source": "iana" + }, + "application/vnd.cups-postscript": { + "source": "iana" + }, + "application/vnd.cups-ppd": { + "source": "iana", + "extensions": ["ppd"] + }, + "application/vnd.cups-raster": { + "source": "iana" + }, + "application/vnd.cups-raw": { + "source": "iana" + }, + "application/vnd.curl": { + "source": "iana" + }, + "application/vnd.curl.car": { + "source": "apache", + "extensions": ["car"] + }, + "application/vnd.curl.pcurl": { + "source": "apache", + "extensions": ["pcurl"] + }, + "application/vnd.cyan.dean.root+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.cybank": { + "source": "iana" + }, + "application/vnd.cyclonedx+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.cyclonedx+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.d2l.coursepackage1p0+zip": { + "source": "iana", + "compressible": false + }, + "application/vnd.d3m-dataset": { + "source": "iana" + }, + "application/vnd.d3m-problem": { + "source": "iana" + }, + "application/vnd.dart": { + "source": "iana", + "compressible": true, + "extensions": ["dart"] + }, + "application/vnd.data-vision.rdz": { + "source": "iana", + "extensions": ["rdz"] + }, + "application/vnd.datapackage+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.dataresource+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.dbf": { + "source": "iana", + "extensions": ["dbf"] + }, + "application/vnd.debian.binary-package": { + "source": "iana" + }, + "application/vnd.dece.data": { + "source": "iana", + "extensions": ["uvf","uvvf","uvd","uvvd"] + }, + "application/vnd.dece.ttml+xml": { + "source": "iana", + "compressible": true, + "extensions": ["uvt","uvvt"] + }, + "application/vnd.dece.unspecified": { + "source": "iana", + "extensions": ["uvx","uvvx"] + }, + "application/vnd.dece.zip": { + "source": "iana", + "extensions": ["uvz","uvvz"] + }, + "application/vnd.denovo.fcselayout-link": { + "source": "iana", + "extensions": ["fe_launch"] + }, + "application/vnd.desmume.movie": { + "source": "iana" + }, + "application/vnd.dir-bi.plate-dl-nosuffix": { + "source": "iana" + }, + "application/vnd.dm.delegation+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.dna": { + "source": "iana", + "extensions": ["dna"] + }, + "application/vnd.document+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.dolby.mlp": { + "source": "apache", + "extensions": ["mlp"] + }, + "application/vnd.dolby.mobile.1": { + "source": "iana" + }, + "application/vnd.dolby.mobile.2": { + "source": "iana" + }, + "application/vnd.doremir.scorecloud-binary-document": { + "source": "iana" + }, + "application/vnd.dpgraph": { + "source": "iana", + "extensions": ["dpg"] + }, + "application/vnd.dreamfactory": { + "source": "iana", + "extensions": ["dfac"] + }, + "application/vnd.drive+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.ds-keypoint": { + "source": "apache", + "extensions": ["kpxx"] + }, + "application/vnd.dtg.local": { + "source": "iana" + }, + "application/vnd.dtg.local.flash": { + "source": "iana" + }, + "application/vnd.dtg.local.html": { + "source": "iana" + }, + "application/vnd.dvb.ait": { + "source": "iana", + "extensions": ["ait"] + }, + "application/vnd.dvb.dvbisl+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.dvb.dvbj": { + "source": "iana" + }, + "application/vnd.dvb.esgcontainer": { + "source": "iana" + }, + "application/vnd.dvb.ipdcdftnotifaccess": { + "source": "iana" + }, + "application/vnd.dvb.ipdcesgaccess": { + "source": "iana" + }, + "application/vnd.dvb.ipdcesgaccess2": { + "source": "iana" + }, + "application/vnd.dvb.ipdcesgpdd": { + "source": "iana" + }, + "application/vnd.dvb.ipdcroaming": { + "source": "iana" + }, + "application/vnd.dvb.iptv.alfec-base": { + "source": "iana" + }, + "application/vnd.dvb.iptv.alfec-enhancement": { + "source": "iana" + }, + "application/vnd.dvb.notif-aggregate-root+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.dvb.notif-container+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.dvb.notif-generic+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.dvb.notif-ia-msglist+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.dvb.notif-ia-registration-request+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.dvb.notif-ia-registration-response+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.dvb.notif-init+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.dvb.pfr": { + "source": "iana" + }, + "application/vnd.dvb.service": { + "source": "iana", + "extensions": ["svc"] + }, + "application/vnd.dxr": { + "source": "iana" + }, + "application/vnd.dynageo": { + "source": "iana", + "extensions": ["geo"] + }, + "application/vnd.dzr": { + "source": "iana" + }, + "application/vnd.easykaraoke.cdgdownload": { + "source": "iana" + }, + "application/vnd.ecdis-update": { + "source": "iana" + }, + "application/vnd.ecip.rlp": { + "source": "iana" + }, + "application/vnd.eclipse.ditto+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.ecowin.chart": { + "source": "iana", + "extensions": ["mag"] + }, + "application/vnd.ecowin.filerequest": { + "source": "iana" + }, + "application/vnd.ecowin.fileupdate": { + "source": "iana" + }, + "application/vnd.ecowin.series": { + "source": "iana" + }, + "application/vnd.ecowin.seriesrequest": { + "source": "iana" + }, + "application/vnd.ecowin.seriesupdate": { + "source": "iana" + }, + "application/vnd.efi.img": { + "source": "iana" + }, + "application/vnd.efi.iso": { + "source": "iana" + }, + "application/vnd.emclient.accessrequest+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.enliven": { + "source": "iana", + "extensions": ["nml"] + }, + "application/vnd.enphase.envoy": { + "source": "iana" + }, + "application/vnd.eprints.data+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.epson.esf": { + "source": "iana", + "extensions": ["esf"] + }, + "application/vnd.epson.msf": { + "source": "iana", + "extensions": ["msf"] + }, + "application/vnd.epson.quickanime": { + "source": "iana", + "extensions": ["qam"] + }, + "application/vnd.epson.salt": { + "source": "iana", + "extensions": ["slt"] + }, + "application/vnd.epson.ssf": { + "source": "iana", + "extensions": ["ssf"] + }, + "application/vnd.ericsson.quickcall": { + "source": "iana" + }, + "application/vnd.espass-espass+zip": { + "source": "iana", + "compressible": false + }, + "application/vnd.eszigno3+xml": { + "source": "iana", + "compressible": true, + "extensions": ["es3","et3"] + }, + "application/vnd.etsi.aoc+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.etsi.asic-e+zip": { + "source": "iana", + "compressible": false + }, + "application/vnd.etsi.asic-s+zip": { + "source": "iana", + "compressible": false + }, + "application/vnd.etsi.cug+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.etsi.iptvcommand+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.etsi.iptvdiscovery+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.etsi.iptvprofile+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.etsi.iptvsad-bc+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.etsi.iptvsad-cod+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.etsi.iptvsad-npvr+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.etsi.iptvservice+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.etsi.iptvsync+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.etsi.iptvueprofile+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.etsi.mcid+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.etsi.mheg5": { + "source": "iana" + }, + "application/vnd.etsi.overload-control-policy-dataset+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.etsi.pstn+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.etsi.sci+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.etsi.simservs+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.etsi.timestamp-token": { + "source": "iana" + }, + "application/vnd.etsi.tsl+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.etsi.tsl.der": { + "source": "iana" + }, + "application/vnd.eu.kasparian.car+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.eudora.data": { + "source": "iana" + }, + "application/vnd.evolv.ecig.profile": { + "source": "iana" + }, + "application/vnd.evolv.ecig.settings": { + "source": "iana" + }, + "application/vnd.evolv.ecig.theme": { + "source": "iana" + }, + "application/vnd.exstream-empower+zip": { + "source": "iana", + "compressible": false + }, + "application/vnd.exstream-package": { + "source": "iana" + }, + "application/vnd.ezpix-album": { + "source": "iana", + "extensions": ["ez2"] + }, + "application/vnd.ezpix-package": { + "source": "iana", + "extensions": ["ez3"] + }, + "application/vnd.f-secure.mobile": { + "source": "iana" + }, + "application/vnd.familysearch.gedcom+zip": { + "source": "iana", + "compressible": false + }, + "application/vnd.fastcopy-disk-image": { + "source": "iana" + }, + "application/vnd.fdf": { + "source": "iana", + "extensions": ["fdf"] + }, + "application/vnd.fdsn.mseed": { + "source": "iana", + "extensions": ["mseed"] + }, + "application/vnd.fdsn.seed": { + "source": "iana", + "extensions": ["seed","dataless"] + }, + "application/vnd.ffsns": { + "source": "iana" + }, + "application/vnd.ficlab.flb+zip": { + "source": "iana", + "compressible": false + }, + "application/vnd.filmit.zfc": { + "source": "iana" + }, + "application/vnd.fints": { + "source": "iana" + }, + "application/vnd.firemonkeys.cloudcell": { + "source": "iana" + }, + "application/vnd.flographit": { + "source": "iana", + "extensions": ["gph"] + }, + "application/vnd.fluxtime.clip": { + "source": "iana", + "extensions": ["ftc"] + }, + "application/vnd.font-fontforge-sfd": { + "source": "iana" + }, + "application/vnd.framemaker": { + "source": "iana", + "extensions": ["fm","frame","maker","book"] + }, + "application/vnd.frogans.fnc": { + "source": "iana", + "extensions": ["fnc"] + }, + "application/vnd.frogans.ltf": { + "source": "iana", + "extensions": ["ltf"] + }, + "application/vnd.fsc.weblaunch": { + "source": "iana", + "extensions": ["fsc"] + }, + "application/vnd.fujifilm.fb.docuworks": { + "source": "iana" + }, + "application/vnd.fujifilm.fb.docuworks.binder": { + "source": "iana" + }, + "application/vnd.fujifilm.fb.docuworks.container": { + "source": "iana" + }, + "application/vnd.fujifilm.fb.jfi+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.fujitsu.oasys": { + "source": "iana", + "extensions": ["oas"] + }, + "application/vnd.fujitsu.oasys2": { + "source": "iana", + "extensions": ["oa2"] + }, + "application/vnd.fujitsu.oasys3": { + "source": "iana", + "extensions": ["oa3"] + }, + "application/vnd.fujitsu.oasysgp": { + "source": "iana", + "extensions": ["fg5"] + }, + "application/vnd.fujitsu.oasysprs": { + "source": "iana", + "extensions": ["bh2"] + }, + "application/vnd.fujixerox.art-ex": { + "source": "iana" + }, + "application/vnd.fujixerox.art4": { + "source": "iana" + }, + "application/vnd.fujixerox.ddd": { + "source": "iana", + "extensions": ["ddd"] + }, + "application/vnd.fujixerox.docuworks": { + "source": "iana", + "extensions": ["xdw"] + }, + "application/vnd.fujixerox.docuworks.binder": { + "source": "iana", + "extensions": ["xbd"] + }, + "application/vnd.fujixerox.docuworks.container": { + "source": "iana" + }, + "application/vnd.fujixerox.hbpl": { + "source": "iana" + }, + "application/vnd.fut-misnet": { + "source": "iana" + }, + "application/vnd.futoin+cbor": { + "source": "iana" + }, + "application/vnd.futoin+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.fuzzysheet": { + "source": "iana", + "extensions": ["fzs"] + }, + "application/vnd.genomatix.tuxedo": { + "source": "iana", + "extensions": ["txd"] + }, + "application/vnd.gentics.grd+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.geo+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.geocube+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.geogebra.file": { + "source": "iana", + "extensions": ["ggb"] + }, + "application/vnd.geogebra.slides": { + "source": "iana" + }, + "application/vnd.geogebra.tool": { + "source": "iana", + "extensions": ["ggt"] + }, + "application/vnd.geometry-explorer": { + "source": "iana", + "extensions": ["gex","gre"] + }, + "application/vnd.geonext": { + "source": "iana", + "extensions": ["gxt"] + }, + "application/vnd.geoplan": { + "source": "iana", + "extensions": ["g2w"] + }, + "application/vnd.geospace": { + "source": "iana", + "extensions": ["g3w"] + }, + "application/vnd.gerber": { + "source": "iana" + }, + "application/vnd.globalplatform.card-content-mgt": { + "source": "iana" + }, + "application/vnd.globalplatform.card-content-mgt-response": { + "source": "iana" + }, + "application/vnd.gmx": { + "source": "iana", + "extensions": ["gmx"] + }, + "application/vnd.google-apps.document": { + "compressible": false, + "extensions": ["gdoc"] + }, + "application/vnd.google-apps.presentation": { + "compressible": false, + "extensions": ["gslides"] + }, + "application/vnd.google-apps.spreadsheet": { + "compressible": false, + "extensions": ["gsheet"] + }, + "application/vnd.google-earth.kml+xml": { + "source": "iana", + "compressible": true, + "extensions": ["kml"] + }, + "application/vnd.google-earth.kmz": { + "source": "iana", + "compressible": false, + "extensions": ["kmz"] + }, + "application/vnd.gov.sk.e-form+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.gov.sk.e-form+zip": { + "source": "iana", + "compressible": false + }, + "application/vnd.gov.sk.xmldatacontainer+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.grafeq": { + "source": "iana", + "extensions": ["gqf","gqs"] + }, + "application/vnd.gridmp": { + "source": "iana" + }, + "application/vnd.groove-account": { + "source": "iana", + "extensions": ["gac"] + }, + "application/vnd.groove-help": { + "source": "iana", + "extensions": ["ghf"] + }, + "application/vnd.groove-identity-message": { + "source": "iana", + "extensions": ["gim"] + }, + "application/vnd.groove-injector": { + "source": "iana", + "extensions": ["grv"] + }, + "application/vnd.groove-tool-message": { + "source": "iana", + "extensions": ["gtm"] + }, + "application/vnd.groove-tool-template": { + "source": "iana", + "extensions": ["tpl"] + }, + "application/vnd.groove-vcard": { + "source": "iana", + "extensions": ["vcg"] + }, + "application/vnd.hal+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.hal+xml": { + "source": "iana", + "compressible": true, + "extensions": ["hal"] + }, + "application/vnd.handheld-entertainment+xml": { + "source": "iana", + "compressible": true, + "extensions": ["zmm"] + }, + "application/vnd.hbci": { + "source": "iana", + "extensions": ["hbci"] + }, + "application/vnd.hc+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.hcl-bireports": { + "source": "iana" + }, + "application/vnd.hdt": { + "source": "iana" + }, + "application/vnd.heroku+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.hhe.lesson-player": { + "source": "iana", + "extensions": ["les"] + }, + "application/vnd.hl7cda+xml": { + "source": "iana", + "charset": "UTF-8", + "compressible": true + }, + "application/vnd.hl7v2+xml": { + "source": "iana", + "charset": "UTF-8", + "compressible": true + }, + "application/vnd.hp-hpgl": { + "source": "iana", + "extensions": ["hpgl"] + }, + "application/vnd.hp-hpid": { + "source": "iana", + "extensions": ["hpid"] + }, + "application/vnd.hp-hps": { + "source": "iana", + "extensions": ["hps"] + }, + "application/vnd.hp-jlyt": { + "source": "iana", + "extensions": ["jlt"] + }, + "application/vnd.hp-pcl": { + "source": "iana", + "extensions": ["pcl"] + }, + "application/vnd.hp-pclxl": { + "source": "iana", + "extensions": ["pclxl"] + }, + "application/vnd.httphone": { + "source": "iana" + }, + "application/vnd.hydrostatix.sof-data": { + "source": "iana", + "extensions": ["sfd-hdstx"] + }, + "application/vnd.hyper+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.hyper-item+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.hyperdrive+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.hzn-3d-crossword": { + "source": "iana" + }, + "application/vnd.ibm.afplinedata": { + "source": "iana" + }, + "application/vnd.ibm.electronic-media": { + "source": "iana" + }, + "application/vnd.ibm.minipay": { + "source": "iana", + "extensions": ["mpy"] + }, + "application/vnd.ibm.modcap": { + "source": "iana", + "extensions": ["afp","listafp","list3820"] + }, + "application/vnd.ibm.rights-management": { + "source": "iana", + "extensions": ["irm"] + }, + "application/vnd.ibm.secure-container": { + "source": "iana", + "extensions": ["sc"] + }, + "application/vnd.iccprofile": { + "source": "iana", + "extensions": ["icc","icm"] + }, + "application/vnd.ieee.1905": { + "source": "iana" + }, + "application/vnd.igloader": { + "source": "iana", + "extensions": ["igl"] + }, + "application/vnd.imagemeter.folder+zip": { + "source": "iana", + "compressible": false + }, + "application/vnd.imagemeter.image+zip": { + "source": "iana", + "compressible": false + }, + "application/vnd.immervision-ivp": { + "source": "iana", + "extensions": ["ivp"] + }, + "application/vnd.immervision-ivu": { + "source": "iana", + "extensions": ["ivu"] + }, + "application/vnd.ims.imsccv1p1": { + "source": "iana" + }, + "application/vnd.ims.imsccv1p2": { + "source": "iana" + }, + "application/vnd.ims.imsccv1p3": { + "source": "iana" + }, + "application/vnd.ims.lis.v2.result+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.ims.lti.v2.toolconsumerprofile+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.ims.lti.v2.toolproxy+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.ims.lti.v2.toolproxy.id+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.ims.lti.v2.toolsettings+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.ims.lti.v2.toolsettings.simple+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.informedcontrol.rms+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.informix-visionary": { + "source": "iana" + }, + "application/vnd.infotech.project": { + "source": "iana" + }, + "application/vnd.infotech.project+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.innopath.wamp.notification": { + "source": "iana" + }, + "application/vnd.insors.igm": { + "source": "iana", + "extensions": ["igm"] + }, + "application/vnd.intercon.formnet": { + "source": "iana", + "extensions": ["xpw","xpx"] + }, + "application/vnd.intergeo": { + "source": "iana", + "extensions": ["i2g"] + }, + "application/vnd.intertrust.digibox": { + "source": "iana" + }, + "application/vnd.intertrust.nncp": { + "source": "iana" + }, + "application/vnd.intu.qbo": { + "source": "iana", + "extensions": ["qbo"] + }, + "application/vnd.intu.qfx": { + "source": "iana", + "extensions": ["qfx"] + }, + "application/vnd.iptc.g2.catalogitem+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.iptc.g2.conceptitem+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.iptc.g2.knowledgeitem+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.iptc.g2.newsitem+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.iptc.g2.newsmessage+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.iptc.g2.packageitem+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.iptc.g2.planningitem+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.ipunplugged.rcprofile": { + "source": "iana", + "extensions": ["rcprofile"] + }, + "application/vnd.irepository.package+xml": { + "source": "iana", + "compressible": true, + "extensions": ["irp"] + }, + "application/vnd.is-xpr": { + "source": "iana", + "extensions": ["xpr"] + }, + "application/vnd.isac.fcs": { + "source": "iana", + "extensions": ["fcs"] + }, + "application/vnd.iso11783-10+zip": { + "source": "iana", + "compressible": false + }, + "application/vnd.jam": { + "source": "iana", + "extensions": ["jam"] + }, + "application/vnd.japannet-directory-service": { + "source": "iana" + }, + "application/vnd.japannet-jpnstore-wakeup": { + "source": "iana" + }, + "application/vnd.japannet-payment-wakeup": { + "source": "iana" + }, + "application/vnd.japannet-registration": { + "source": "iana" + }, + "application/vnd.japannet-registration-wakeup": { + "source": "iana" + }, + "application/vnd.japannet-setstore-wakeup": { + "source": "iana" + }, + "application/vnd.japannet-verification": { + "source": "iana" + }, + "application/vnd.japannet-verification-wakeup": { + "source": "iana" + }, + "application/vnd.jcp.javame.midlet-rms": { + "source": "iana", + "extensions": ["rms"] + }, + "application/vnd.jisp": { + "source": "iana", + "extensions": ["jisp"] + }, + "application/vnd.joost.joda-archive": { + "source": "iana", + "extensions": ["joda"] + }, + "application/vnd.jsk.isdn-ngn": { + "source": "iana" + }, + "application/vnd.kahootz": { + "source": "iana", + "extensions": ["ktz","ktr"] + }, + "application/vnd.kde.karbon": { + "source": "iana", + "extensions": ["karbon"] + }, + "application/vnd.kde.kchart": { + "source": "iana", + "extensions": ["chrt"] + }, + "application/vnd.kde.kformula": { + "source": "iana", + "extensions": ["kfo"] + }, + "application/vnd.kde.kivio": { + "source": "iana", + "extensions": ["flw"] + }, + "application/vnd.kde.kontour": { + "source": "iana", + "extensions": ["kon"] + }, + "application/vnd.kde.kpresenter": { + "source": "iana", + "extensions": ["kpr","kpt"] + }, + "application/vnd.kde.kspread": { + "source": "iana", + "extensions": ["ksp"] + }, + "application/vnd.kde.kword": { + "source": "iana", + "extensions": ["kwd","kwt"] + }, + "application/vnd.kenameaapp": { + "source": "iana", + "extensions": ["htke"] + }, + "application/vnd.kidspiration": { + "source": "iana", + "extensions": ["kia"] + }, + "application/vnd.kinar": { + "source": "iana", + "extensions": ["kne","knp"] + }, + "application/vnd.koan": { + "source": "iana", + "extensions": ["skp","skd","skt","skm"] + }, + "application/vnd.kodak-descriptor": { + "source": "iana", + "extensions": ["sse"] + }, + "application/vnd.las": { + "source": "iana" + }, + "application/vnd.las.las+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.las.las+xml": { + "source": "iana", + "compressible": true, + "extensions": ["lasxml"] + }, + "application/vnd.laszip": { + "source": "iana" + }, + "application/vnd.leap+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.liberty-request+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.llamagraphics.life-balance.desktop": { + "source": "iana", + "extensions": ["lbd"] + }, + "application/vnd.llamagraphics.life-balance.exchange+xml": { + "source": "iana", + "compressible": true, + "extensions": ["lbe"] + }, + "application/vnd.logipipe.circuit+zip": { + "source": "iana", + "compressible": false + }, + "application/vnd.loom": { + "source": "iana" + }, + "application/vnd.lotus-1-2-3": { + "source": "iana", + "extensions": ["123"] + }, + "application/vnd.lotus-approach": { + "source": "iana", + "extensions": ["apr"] + }, + "application/vnd.lotus-freelance": { + "source": "iana", + "extensions": ["pre"] + }, + "application/vnd.lotus-notes": { + "source": "iana", + "extensions": ["nsf"] + }, + "application/vnd.lotus-organizer": { + "source": "iana", + "extensions": ["org"] + }, + "application/vnd.lotus-screencam": { + "source": "iana", + "extensions": ["scm"] + }, + "application/vnd.lotus-wordpro": { + "source": "iana", + "extensions": ["lwp"] + }, + "application/vnd.macports.portpkg": { + "source": "iana", + "extensions": ["portpkg"] + }, + "application/vnd.mapbox-vector-tile": { + "source": "iana", + "extensions": ["mvt"] + }, + "application/vnd.marlin.drm.actiontoken+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.marlin.drm.conftoken+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.marlin.drm.license+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.marlin.drm.mdcf": { + "source": "iana" + }, + "application/vnd.mason+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.maxar.archive.3tz+zip": { + "source": "iana", + "compressible": false + }, + "application/vnd.maxmind.maxmind-db": { + "source": "iana" + }, + "application/vnd.mcd": { + "source": "iana", + "extensions": ["mcd"] + }, + "application/vnd.medcalcdata": { + "source": "iana", + "extensions": ["mc1"] + }, + "application/vnd.mediastation.cdkey": { + "source": "iana", + "extensions": ["cdkey"] + }, + "application/vnd.meridian-slingshot": { + "source": "iana" + }, + "application/vnd.mfer": { + "source": "iana", + "extensions": ["mwf"] + }, + "application/vnd.mfmp": { + "source": "iana", + "extensions": ["mfm"] + }, + "application/vnd.micro+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.micrografx.flo": { + "source": "iana", + "extensions": ["flo"] + }, + "application/vnd.micrografx.igx": { + "source": "iana", + "extensions": ["igx"] + }, + "application/vnd.microsoft.portable-executable": { + "source": "iana" + }, + "application/vnd.microsoft.windows.thumbnail-cache": { + "source": "iana" + }, + "application/vnd.miele+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.mif": { + "source": "iana", + "extensions": ["mif"] + }, + "application/vnd.minisoft-hp3000-save": { + "source": "iana" + }, + "application/vnd.mitsubishi.misty-guard.trustweb": { + "source": "iana" + }, + "application/vnd.mobius.daf": { + "source": "iana", + "extensions": ["daf"] + }, + "application/vnd.mobius.dis": { + "source": "iana", + "extensions": ["dis"] + }, + "application/vnd.mobius.mbk": { + "source": "iana", + "extensions": ["mbk"] + }, + "application/vnd.mobius.mqy": { + "source": "iana", + "extensions": ["mqy"] + }, + "application/vnd.mobius.msl": { + "source": "iana", + "extensions": ["msl"] + }, + "application/vnd.mobius.plc": { + "source": "iana", + "extensions": ["plc"] + }, + "application/vnd.mobius.txf": { + "source": "iana", + "extensions": ["txf"] + }, + "application/vnd.mophun.application": { + "source": "iana", + "extensions": ["mpn"] + }, + "application/vnd.mophun.certificate": { + "source": "iana", + "extensions": ["mpc"] + }, + "application/vnd.motorola.flexsuite": { + "source": "iana" + }, + "application/vnd.motorola.flexsuite.adsi": { + "source": "iana" + }, + "application/vnd.motorola.flexsuite.fis": { + "source": "iana" + }, + "application/vnd.motorola.flexsuite.gotap": { + "source": "iana" + }, + "application/vnd.motorola.flexsuite.kmr": { + "source": "iana" + }, + "application/vnd.motorola.flexsuite.ttc": { + "source": "iana" + }, + "application/vnd.motorola.flexsuite.wem": { + "source": "iana" + }, + "application/vnd.motorola.iprm": { + "source": "iana" + }, + "application/vnd.mozilla.xul+xml": { + "source": "iana", + "compressible": true, + "extensions": ["xul"] + }, + "application/vnd.ms-3mfdocument": { + "source": "iana" + }, + "application/vnd.ms-artgalry": { + "source": "iana", + "extensions": ["cil"] + }, + "application/vnd.ms-asf": { + "source": "iana" + }, + "application/vnd.ms-cab-compressed": { + "source": "iana", + "extensions": ["cab"] + }, + "application/vnd.ms-color.iccprofile": { + "source": "apache" + }, + "application/vnd.ms-excel": { + "source": "iana", + "compressible": false, + "extensions": ["xls","xlm","xla","xlc","xlt","xlw"] + }, + "application/vnd.ms-excel.addin.macroenabled.12": { + "source": "iana", + "extensions": ["xlam"] + }, + "application/vnd.ms-excel.sheet.binary.macroenabled.12": { + "source": "iana", + "extensions": ["xlsb"] + }, + "application/vnd.ms-excel.sheet.macroenabled.12": { + "source": "iana", + "extensions": ["xlsm"] + }, + "application/vnd.ms-excel.template.macroenabled.12": { + "source": "iana", + "extensions": ["xltm"] + }, + "application/vnd.ms-fontobject": { + "source": "iana", + "compressible": true, + "extensions": ["eot"] + }, + "application/vnd.ms-htmlhelp": { + "source": "iana", + "extensions": ["chm"] + }, + "application/vnd.ms-ims": { + "source": "iana", + "extensions": ["ims"] + }, + "application/vnd.ms-lrm": { + "source": "iana", + "extensions": ["lrm"] + }, + "application/vnd.ms-office.activex+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.ms-officetheme": { + "source": "iana", + "extensions": ["thmx"] + }, + "application/vnd.ms-opentype": { + "source": "apache", + "compressible": true + }, + "application/vnd.ms-outlook": { + "compressible": false, + "extensions": ["msg"] + }, + "application/vnd.ms-package.obfuscated-opentype": { + "source": "apache" + }, + "application/vnd.ms-pki.seccat": { + "source": "apache", + "extensions": ["cat"] + }, + "application/vnd.ms-pki.stl": { + "source": "apache", + "extensions": ["stl"] + }, + "application/vnd.ms-playready.initiator+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.ms-powerpoint": { + "source": "iana", + "compressible": false, + "extensions": ["ppt","pps","pot"] + }, + "application/vnd.ms-powerpoint.addin.macroenabled.12": { + "source": "iana", + "extensions": ["ppam"] + }, + "application/vnd.ms-powerpoint.presentation.macroenabled.12": { + "source": "iana", + "extensions": ["pptm"] + }, + "application/vnd.ms-powerpoint.slide.macroenabled.12": { + "source": "iana", + "extensions": ["sldm"] + }, + "application/vnd.ms-powerpoint.slideshow.macroenabled.12": { + "source": "iana", + "extensions": ["ppsm"] + }, + "application/vnd.ms-powerpoint.template.macroenabled.12": { + "source": "iana", + "extensions": ["potm"] + }, + "application/vnd.ms-printdevicecapabilities+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.ms-printing.printticket+xml": { + "source": "apache", + "compressible": true + }, + "application/vnd.ms-printschematicket+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.ms-project": { + "source": "iana", + "extensions": ["mpp","mpt"] + }, + "application/vnd.ms-tnef": { + "source": "iana" + }, + "application/vnd.ms-windows.devicepairing": { + "source": "iana" + }, + "application/vnd.ms-windows.nwprinting.oob": { + "source": "iana" + }, + "application/vnd.ms-windows.printerpairing": { + "source": "iana" + }, + "application/vnd.ms-windows.wsd.oob": { + "source": "iana" + }, + "application/vnd.ms-wmdrm.lic-chlg-req": { + "source": "iana" + }, + "application/vnd.ms-wmdrm.lic-resp": { + "source": "iana" + }, + "application/vnd.ms-wmdrm.meter-chlg-req": { + "source": "iana" + }, + "application/vnd.ms-wmdrm.meter-resp": { + "source": "iana" + }, + "application/vnd.ms-word.document.macroenabled.12": { + "source": "iana", + "extensions": ["docm"] + }, + "application/vnd.ms-word.template.macroenabled.12": { + "source": "iana", + "extensions": ["dotm"] + }, + "application/vnd.ms-works": { + "source": "iana", + "extensions": ["wps","wks","wcm","wdb"] + }, + "application/vnd.ms-wpl": { + "source": "iana", + "extensions": ["wpl"] + }, + "application/vnd.ms-xpsdocument": { + "source": "iana", + "compressible": false, + "extensions": ["xps"] + }, + "application/vnd.msa-disk-image": { + "source": "iana" + }, + "application/vnd.mseq": { + "source": "iana", + "extensions": ["mseq"] + }, + "application/vnd.msign": { + "source": "iana" + }, + "application/vnd.multiad.creator": { + "source": "iana" + }, + "application/vnd.multiad.creator.cif": { + "source": "iana" + }, + "application/vnd.music-niff": { + "source": "iana" + }, + "application/vnd.musician": { + "source": "iana", + "extensions": ["mus"] + }, + "application/vnd.muvee.style": { + "source": "iana", + "extensions": ["msty"] + }, + "application/vnd.mynfc": { + "source": "iana", + "extensions": ["taglet"] + }, + "application/vnd.nacamar.ybrid+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.ncd.control": { + "source": "iana" + }, + "application/vnd.ncd.reference": { + "source": "iana" + }, + "application/vnd.nearst.inv+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.nebumind.line": { + "source": "iana" + }, + "application/vnd.nervana": { + "source": "iana" + }, + "application/vnd.netfpx": { + "source": "iana" + }, + "application/vnd.neurolanguage.nlu": { + "source": "iana", + "extensions": ["nlu"] + }, + "application/vnd.nimn": { + "source": "iana" + }, + "application/vnd.nintendo.nitro.rom": { + "source": "iana" + }, + "application/vnd.nintendo.snes.rom": { + "source": "iana" + }, + "application/vnd.nitf": { + "source": "iana", + "extensions": ["ntf","nitf"] + }, + "application/vnd.noblenet-directory": { + "source": "iana", + "extensions": ["nnd"] + }, + "application/vnd.noblenet-sealer": { + "source": "iana", + "extensions": ["nns"] + }, + "application/vnd.noblenet-web": { + "source": "iana", + "extensions": ["nnw"] + }, + "application/vnd.nokia.catalogs": { + "source": "iana" + }, + "application/vnd.nokia.conml+wbxml": { + "source": "iana" + }, + "application/vnd.nokia.conml+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.nokia.iptv.config+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.nokia.isds-radio-presets": { + "source": "iana" + }, + "application/vnd.nokia.landmark+wbxml": { + "source": "iana" + }, + "application/vnd.nokia.landmark+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.nokia.landmarkcollection+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.nokia.n-gage.ac+xml": { + "source": "iana", + "compressible": true, + "extensions": ["ac"] + }, + "application/vnd.nokia.n-gage.data": { + "source": "iana", + "extensions": ["ngdat"] + }, + "application/vnd.nokia.n-gage.symbian.install": { + "source": "iana", + "extensions": ["n-gage"] + }, + "application/vnd.nokia.ncd": { + "source": "iana" + }, + "application/vnd.nokia.pcd+wbxml": { + "source": "iana" + }, + "application/vnd.nokia.pcd+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.nokia.radio-preset": { + "source": "iana", + "extensions": ["rpst"] + }, + "application/vnd.nokia.radio-presets": { + "source": "iana", + "extensions": ["rpss"] + }, + "application/vnd.novadigm.edm": { + "source": "iana", + "extensions": ["edm"] + }, + "application/vnd.novadigm.edx": { + "source": "iana", + "extensions": ["edx"] + }, + "application/vnd.novadigm.ext": { + "source": "iana", + "extensions": ["ext"] + }, + "application/vnd.ntt-local.content-share": { + "source": "iana" + }, + "application/vnd.ntt-local.file-transfer": { + "source": "iana" + }, + "application/vnd.ntt-local.ogw_remote-access": { + "source": "iana" + }, + "application/vnd.ntt-local.sip-ta_remote": { + "source": "iana" + }, + "application/vnd.ntt-local.sip-ta_tcp_stream": { + "source": "iana" + }, + "application/vnd.oasis.opendocument.chart": { + "source": "iana", + "extensions": ["odc"] + }, + "application/vnd.oasis.opendocument.chart-template": { + "source": "iana", + "extensions": ["otc"] + }, + "application/vnd.oasis.opendocument.database": { + "source": "iana", + "extensions": ["odb"] + }, + "application/vnd.oasis.opendocument.formula": { + "source": "iana", + "extensions": ["odf"] + }, + "application/vnd.oasis.opendocument.formula-template": { + "source": "iana", + "extensions": ["odft"] + }, + "application/vnd.oasis.opendocument.graphics": { + "source": "iana", + "compressible": false, + "extensions": ["odg"] + }, + "application/vnd.oasis.opendocument.graphics-template": { + "source": "iana", + "extensions": ["otg"] + }, + "application/vnd.oasis.opendocument.image": { + "source": "iana", + "extensions": ["odi"] + }, + "application/vnd.oasis.opendocument.image-template": { + "source": "iana", + "extensions": ["oti"] + }, + "application/vnd.oasis.opendocument.presentation": { + "source": "iana", + "compressible": false, + "extensions": ["odp"] + }, + "application/vnd.oasis.opendocument.presentation-template": { + "source": "iana", + "extensions": ["otp"] + }, + "application/vnd.oasis.opendocument.spreadsheet": { + "source": "iana", + "compressible": false, + "extensions": ["ods"] + }, + "application/vnd.oasis.opendocument.spreadsheet-template": { + "source": "iana", + "extensions": ["ots"] + }, + "application/vnd.oasis.opendocument.text": { + "source": "iana", + "compressible": false, + "extensions": ["odt"] + }, + "application/vnd.oasis.opendocument.text-master": { + "source": "iana", + "extensions": ["odm"] + }, + "application/vnd.oasis.opendocument.text-template": { + "source": "iana", + "extensions": ["ott"] + }, + "application/vnd.oasis.opendocument.text-web": { + "source": "iana", + "extensions": ["oth"] + }, + "application/vnd.obn": { + "source": "iana" + }, + "application/vnd.ocf+cbor": { + "source": "iana" + }, + "application/vnd.oci.image.manifest.v1+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.oftn.l10n+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.oipf.contentaccessdownload+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oipf.contentaccessstreaming+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oipf.cspg-hexbinary": { + "source": "iana" + }, + "application/vnd.oipf.dae.svg+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oipf.dae.xhtml+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oipf.mippvcontrolmessage+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oipf.pae.gem": { + "source": "iana" + }, + "application/vnd.oipf.spdiscovery+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oipf.spdlist+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oipf.ueprofile+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oipf.userprofile+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.olpc-sugar": { + "source": "iana", + "extensions": ["xo"] + }, + "application/vnd.oma-scws-config": { + "source": "iana" + }, + "application/vnd.oma-scws-http-request": { + "source": "iana" + }, + "application/vnd.oma-scws-http-response": { + "source": "iana" + }, + "application/vnd.oma.bcast.associated-procedure-parameter+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.bcast.drm-trigger+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.bcast.imd+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.bcast.ltkm": { + "source": "iana" + }, + "application/vnd.oma.bcast.notification+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.bcast.provisioningtrigger": { + "source": "iana" + }, + "application/vnd.oma.bcast.sgboot": { + "source": "iana" + }, + "application/vnd.oma.bcast.sgdd+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.bcast.sgdu": { + "source": "iana" + }, + "application/vnd.oma.bcast.simple-symbol-container": { + "source": "iana" + }, + "application/vnd.oma.bcast.smartcard-trigger+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.bcast.sprov+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.bcast.stkm": { + "source": "iana" + }, + "application/vnd.oma.cab-address-book+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.cab-feature-handler+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.cab-pcc+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.cab-subs-invite+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.cab-user-prefs+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.dcd": { + "source": "iana" + }, + "application/vnd.oma.dcdc": { + "source": "iana" + }, + "application/vnd.oma.dd2+xml": { + "source": "iana", + "compressible": true, + "extensions": ["dd2"] + }, + "application/vnd.oma.drm.risd+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.group-usage-list+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.lwm2m+cbor": { + "source": "iana" + }, + "application/vnd.oma.lwm2m+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.lwm2m+tlv": { + "source": "iana" + }, + "application/vnd.oma.pal+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.poc.detailed-progress-report+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.poc.final-report+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.poc.groups+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.poc.invocation-descriptor+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.poc.optimized-progress-report+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.push": { + "source": "iana" + }, + "application/vnd.oma.scidm.messages+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oma.xcap-directory+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.omads-email+xml": { + "source": "iana", + "charset": "UTF-8", + "compressible": true + }, + "application/vnd.omads-file+xml": { + "source": "iana", + "charset": "UTF-8", + "compressible": true + }, + "application/vnd.omads-folder+xml": { + "source": "iana", + "charset": "UTF-8", + "compressible": true + }, + "application/vnd.omaloc-supl-init": { + "source": "iana" + }, + "application/vnd.onepager": { + "source": "iana" + }, + "application/vnd.onepagertamp": { + "source": "iana" + }, + "application/vnd.onepagertamx": { + "source": "iana" + }, + "application/vnd.onepagertat": { + "source": "iana" + }, + "application/vnd.onepagertatp": { + "source": "iana" + }, + "application/vnd.onepagertatx": { + "source": "iana" + }, + "application/vnd.openblox.game+xml": { + "source": "iana", + "compressible": true, + "extensions": ["obgx"] + }, + "application/vnd.openblox.game-binary": { + "source": "iana" + }, + "application/vnd.openeye.oeb": { + "source": "iana" + }, + "application/vnd.openofficeorg.extension": { + "source": "apache", + "extensions": ["oxt"] + }, + "application/vnd.openstreetmap.data+xml": { + "source": "iana", + "compressible": true, + "extensions": ["osm"] + }, + "application/vnd.opentimestamps.ots": { + "source": "iana" + }, + "application/vnd.openxmlformats-officedocument.custom-properties+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.customxmlproperties+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.drawing+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.drawingml.chart+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.drawingml.chartshapes+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.drawingml.diagramcolors+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.drawingml.diagramdata+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.drawingml.diagramlayout+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.drawingml.diagramstyle+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.extended-properties+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.presentationml.commentauthors+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.presentationml.comments+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.presentationml.handoutmaster+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.presentationml.notesmaster+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.presentationml.notesslide+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.presentationml.presentation": { + "source": "iana", + "compressible": false, + "extensions": ["pptx"] + }, + "application/vnd.openxmlformats-officedocument.presentationml.presentation.main+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.presentationml.presprops+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.presentationml.slide": { + "source": "iana", + "extensions": ["sldx"] + }, + "application/vnd.openxmlformats-officedocument.presentationml.slide+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.presentationml.slidelayout+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.presentationml.slidemaster+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.presentationml.slideshow": { + "source": "iana", + "extensions": ["ppsx"] + }, + "application/vnd.openxmlformats-officedocument.presentationml.slideshow.main+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.presentationml.slideupdateinfo+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.presentationml.tablestyles+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.presentationml.tags+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.presentationml.template": { + "source": "iana", + "extensions": ["potx"] + }, + "application/vnd.openxmlformats-officedocument.presentationml.template.main+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.presentationml.viewprops+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.calcchain+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.connections+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.externallink+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcachedefinition+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcacherecords+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.pivottable+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.querytable+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.revisionheaders+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.revisionlog+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.sharedstrings+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": { + "source": "iana", + "compressible": false, + "extensions": ["xlsx"] + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.sheetmetadata+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.tablesinglecells+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.template": { + "source": "iana", + "extensions": ["xltx"] + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.usernames+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.volatiledependencies+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.theme+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.themeoverride+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.vmldrawing": { + "source": "iana" + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.document": { + "source": "iana", + "compressible": false, + "extensions": ["docx"] + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.document.glossary+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.fonttable+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.template": { + "source": "iana", + "extensions": ["dotx"] + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.template.main+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-officedocument.wordprocessingml.websettings+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-package.core-properties+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-package.digital-signature-xmlsignature+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.openxmlformats-package.relationships+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oracle.resource+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.orange.indata": { + "source": "iana" + }, + "application/vnd.osa.netdeploy": { + "source": "iana" + }, + "application/vnd.osgeo.mapguide.package": { + "source": "iana", + "extensions": ["mgp"] + }, + "application/vnd.osgi.bundle": { + "source": "iana" + }, + "application/vnd.osgi.dp": { + "source": "iana", + "extensions": ["dp"] + }, + "application/vnd.osgi.subsystem": { + "source": "iana", + "extensions": ["esa"] + }, + "application/vnd.otps.ct-kip+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.oxli.countgraph": { + "source": "iana" + }, + "application/vnd.pagerduty+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.palm": { + "source": "iana", + "extensions": ["pdb","pqa","oprc"] + }, + "application/vnd.panoply": { + "source": "iana" + }, + "application/vnd.paos.xml": { + "source": "iana" + }, + "application/vnd.patentdive": { + "source": "iana" + }, + "application/vnd.patientecommsdoc": { + "source": "iana" + }, + "application/vnd.pawaafile": { + "source": "iana", + "extensions": ["paw"] + }, + "application/vnd.pcos": { + "source": "iana" + }, + "application/vnd.pg.format": { + "source": "iana", + "extensions": ["str"] + }, + "application/vnd.pg.osasli": { + "source": "iana", + "extensions": ["ei6"] + }, + "application/vnd.piaccess.application-licence": { + "source": "iana" + }, + "application/vnd.picsel": { + "source": "iana", + "extensions": ["efif"] + }, + "application/vnd.pmi.widget": { + "source": "iana", + "extensions": ["wg"] + }, + "application/vnd.poc.group-advertisement+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.pocketlearn": { + "source": "iana", + "extensions": ["plf"] + }, + "application/vnd.powerbuilder6": { + "source": "iana", + "extensions": ["pbd"] + }, + "application/vnd.powerbuilder6-s": { + "source": "iana" + }, + "application/vnd.powerbuilder7": { + "source": "iana" + }, + "application/vnd.powerbuilder7-s": { + "source": "iana" + }, + "application/vnd.powerbuilder75": { + "source": "iana" + }, + "application/vnd.powerbuilder75-s": { + "source": "iana" + }, + "application/vnd.preminet": { + "source": "iana" + }, + "application/vnd.previewsystems.box": { + "source": "iana", + "extensions": ["box"] + }, + "application/vnd.proteus.magazine": { + "source": "iana", + "extensions": ["mgz"] + }, + "application/vnd.psfs": { + "source": "iana" + }, + "application/vnd.publishare-delta-tree": { + "source": "iana", + "extensions": ["qps"] + }, + "application/vnd.pvi.ptid1": { + "source": "iana", + "extensions": ["ptid"] + }, + "application/vnd.pwg-multiplexed": { + "source": "iana" + }, + "application/vnd.pwg-xhtml-print+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.qualcomm.brew-app-res": { + "source": "iana" + }, + "application/vnd.quarantainenet": { + "source": "iana" + }, + "application/vnd.quark.quarkxpress": { + "source": "iana", + "extensions": ["qxd","qxt","qwd","qwt","qxl","qxb"] + }, + "application/vnd.quobject-quoxdocument": { + "source": "iana" + }, + "application/vnd.radisys.moml+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.radisys.msml+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.radisys.msml-audit+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.radisys.msml-audit-conf+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.radisys.msml-audit-conn+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.radisys.msml-audit-dialog+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.radisys.msml-audit-stream+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.radisys.msml-conf+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.radisys.msml-dialog+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.radisys.msml-dialog-base+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.radisys.msml-dialog-fax-detect+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.radisys.msml-dialog-fax-sendrecv+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.radisys.msml-dialog-group+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.radisys.msml-dialog-speech+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.radisys.msml-dialog-transform+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.rainstor.data": { + "source": "iana" + }, + "application/vnd.rapid": { + "source": "iana" + }, + "application/vnd.rar": { + "source": "iana", + "extensions": ["rar"] + }, + "application/vnd.realvnc.bed": { + "source": "iana", + "extensions": ["bed"] + }, + "application/vnd.recordare.musicxml": { + "source": "iana", + "extensions": ["mxl"] + }, + "application/vnd.recordare.musicxml+xml": { + "source": "iana", + "compressible": true, + "extensions": ["musicxml"] + }, + "application/vnd.renlearn.rlprint": { + "source": "iana" + }, + "application/vnd.resilient.logic": { + "source": "iana" + }, + "application/vnd.restful+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.rig.cryptonote": { + "source": "iana", + "extensions": ["cryptonote"] + }, + "application/vnd.rim.cod": { + "source": "apache", + "extensions": ["cod"] + }, + "application/vnd.rn-realmedia": { + "source": "apache", + "extensions": ["rm"] + }, + "application/vnd.rn-realmedia-vbr": { + "source": "apache", + "extensions": ["rmvb"] + }, + "application/vnd.route66.link66+xml": { + "source": "iana", + "compressible": true, + "extensions": ["link66"] + }, + "application/vnd.rs-274x": { + "source": "iana" + }, + "application/vnd.ruckus.download": { + "source": "iana" + }, + "application/vnd.s3sms": { + "source": "iana" + }, + "application/vnd.sailingtracker.track": { + "source": "iana", + "extensions": ["st"] + }, + "application/vnd.sar": { + "source": "iana" + }, + "application/vnd.sbm.cid": { + "source": "iana" + }, + "application/vnd.sbm.mid2": { + "source": "iana" + }, + "application/vnd.scribus": { + "source": "iana" + }, + "application/vnd.sealed.3df": { + "source": "iana" + }, + "application/vnd.sealed.csf": { + "source": "iana" + }, + "application/vnd.sealed.doc": { + "source": "iana" + }, + "application/vnd.sealed.eml": { + "source": "iana" + }, + "application/vnd.sealed.mht": { + "source": "iana" + }, + "application/vnd.sealed.net": { + "source": "iana" + }, + "application/vnd.sealed.ppt": { + "source": "iana" + }, + "application/vnd.sealed.tiff": { + "source": "iana" + }, + "application/vnd.sealed.xls": { + "source": "iana" + }, + "application/vnd.sealedmedia.softseal.html": { + "source": "iana" + }, + "application/vnd.sealedmedia.softseal.pdf": { + "source": "iana" + }, + "application/vnd.seemail": { + "source": "iana", + "extensions": ["see"] + }, + "application/vnd.seis+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.sema": { + "source": "iana", + "extensions": ["sema"] + }, + "application/vnd.semd": { + "source": "iana", + "extensions": ["semd"] + }, + "application/vnd.semf": { + "source": "iana", + "extensions": ["semf"] + }, + "application/vnd.shade-save-file": { + "source": "iana" + }, + "application/vnd.shana.informed.formdata": { + "source": "iana", + "extensions": ["ifm"] + }, + "application/vnd.shana.informed.formtemplate": { + "source": "iana", + "extensions": ["itp"] + }, + "application/vnd.shana.informed.interchange": { + "source": "iana", + "extensions": ["iif"] + }, + "application/vnd.shana.informed.package": { + "source": "iana", + "extensions": ["ipk"] + }, + "application/vnd.shootproof+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.shopkick+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.shp": { + "source": "iana" + }, + "application/vnd.shx": { + "source": "iana" + }, + "application/vnd.sigrok.session": { + "source": "iana" + }, + "application/vnd.simtech-mindmapper": { + "source": "iana", + "extensions": ["twd","twds"] + }, + "application/vnd.siren+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.smaf": { + "source": "iana", + "extensions": ["mmf"] + }, + "application/vnd.smart.notebook": { + "source": "iana" + }, + "application/vnd.smart.teacher": { + "source": "iana", + "extensions": ["teacher"] + }, + "application/vnd.snesdev-page-table": { + "source": "iana" + }, + "application/vnd.software602.filler.form+xml": { + "source": "iana", + "compressible": true, + "extensions": ["fo"] + }, + "application/vnd.software602.filler.form-xml-zip": { + "source": "iana" + }, + "application/vnd.solent.sdkm+xml": { + "source": "iana", + "compressible": true, + "extensions": ["sdkm","sdkd"] + }, + "application/vnd.spotfire.dxp": { + "source": "iana", + "extensions": ["dxp"] + }, + "application/vnd.spotfire.sfs": { + "source": "iana", + "extensions": ["sfs"] + }, + "application/vnd.sqlite3": { + "source": "iana" + }, + "application/vnd.sss-cod": { + "source": "iana" + }, + "application/vnd.sss-dtf": { + "source": "iana" + }, + "application/vnd.sss-ntf": { + "source": "iana" + }, + "application/vnd.stardivision.calc": { + "source": "apache", + "extensions": ["sdc"] + }, + "application/vnd.stardivision.draw": { + "source": "apache", + "extensions": ["sda"] + }, + "application/vnd.stardivision.impress": { + "source": "apache", + "extensions": ["sdd"] + }, + "application/vnd.stardivision.math": { + "source": "apache", + "extensions": ["smf"] + }, + "application/vnd.stardivision.writer": { + "source": "apache", + "extensions": ["sdw","vor"] + }, + "application/vnd.stardivision.writer-global": { + "source": "apache", + "extensions": ["sgl"] + }, + "application/vnd.stepmania.package": { + "source": "iana", + "extensions": ["smzip"] + }, + "application/vnd.stepmania.stepchart": { + "source": "iana", + "extensions": ["sm"] + }, + "application/vnd.street-stream": { + "source": "iana" + }, + "application/vnd.sun.wadl+xml": { + "source": "iana", + "compressible": true, + "extensions": ["wadl"] + }, + "application/vnd.sun.xml.calc": { + "source": "apache", + "extensions": ["sxc"] + }, + "application/vnd.sun.xml.calc.template": { + "source": "apache", + "extensions": ["stc"] + }, + "application/vnd.sun.xml.draw": { + "source": "apache", + "extensions": ["sxd"] + }, + "application/vnd.sun.xml.draw.template": { + "source": "apache", + "extensions": ["std"] + }, + "application/vnd.sun.xml.impress": { + "source": "apache", + "extensions": ["sxi"] + }, + "application/vnd.sun.xml.impress.template": { + "source": "apache", + "extensions": ["sti"] + }, + "application/vnd.sun.xml.math": { + "source": "apache", + "extensions": ["sxm"] + }, + "application/vnd.sun.xml.writer": { + "source": "apache", + "extensions": ["sxw"] + }, + "application/vnd.sun.xml.writer.global": { + "source": "apache", + "extensions": ["sxg"] + }, + "application/vnd.sun.xml.writer.template": { + "source": "apache", + "extensions": ["stw"] + }, + "application/vnd.sus-calendar": { + "source": "iana", + "extensions": ["sus","susp"] + }, + "application/vnd.svd": { + "source": "iana", + "extensions": ["svd"] + }, + "application/vnd.swiftview-ics": { + "source": "iana" + }, + "application/vnd.sycle+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.syft+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.symbian.install": { + "source": "apache", + "extensions": ["sis","sisx"] + }, + "application/vnd.syncml+xml": { + "source": "iana", + "charset": "UTF-8", + "compressible": true, + "extensions": ["xsm"] + }, + "application/vnd.syncml.dm+wbxml": { + "source": "iana", + "charset": "UTF-8", + "extensions": ["bdm"] + }, + "application/vnd.syncml.dm+xml": { + "source": "iana", + "charset": "UTF-8", + "compressible": true, + "extensions": ["xdm"] + }, + "application/vnd.syncml.dm.notification": { + "source": "iana" + }, + "application/vnd.syncml.dmddf+wbxml": { + "source": "iana" + }, + "application/vnd.syncml.dmddf+xml": { + "source": "iana", + "charset": "UTF-8", + "compressible": true, + "extensions": ["ddf"] + }, + "application/vnd.syncml.dmtnds+wbxml": { + "source": "iana" + }, + "application/vnd.syncml.dmtnds+xml": { + "source": "iana", + "charset": "UTF-8", + "compressible": true + }, + "application/vnd.syncml.ds.notification": { + "source": "iana" + }, + "application/vnd.tableschema+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.tao.intent-module-archive": { + "source": "iana", + "extensions": ["tao"] + }, + "application/vnd.tcpdump.pcap": { + "source": "iana", + "extensions": ["pcap","cap","dmp"] + }, + "application/vnd.think-cell.ppttc+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.tmd.mediaflex.api+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.tml": { + "source": "iana" + }, + "application/vnd.tmobile-livetv": { + "source": "iana", + "extensions": ["tmo"] + }, + "application/vnd.tri.onesource": { + "source": "iana" + }, + "application/vnd.trid.tpt": { + "source": "iana", + "extensions": ["tpt"] + }, + "application/vnd.triscape.mxs": { + "source": "iana", + "extensions": ["mxs"] + }, + "application/vnd.trueapp": { + "source": "iana", + "extensions": ["tra"] + }, + "application/vnd.truedoc": { + "source": "iana" + }, + "application/vnd.ubisoft.webplayer": { + "source": "iana" + }, + "application/vnd.ufdl": { + "source": "iana", + "extensions": ["ufd","ufdl"] + }, + "application/vnd.uiq.theme": { + "source": "iana", + "extensions": ["utz"] + }, + "application/vnd.umajin": { + "source": "iana", + "extensions": ["umj"] + }, + "application/vnd.unity": { + "source": "iana", + "extensions": ["unityweb"] + }, + "application/vnd.uoml+xml": { + "source": "iana", + "compressible": true, + "extensions": ["uoml"] + }, + "application/vnd.uplanet.alert": { + "source": "iana" + }, + "application/vnd.uplanet.alert-wbxml": { + "source": "iana" + }, + "application/vnd.uplanet.bearer-choice": { + "source": "iana" + }, + "application/vnd.uplanet.bearer-choice-wbxml": { + "source": "iana" + }, + "application/vnd.uplanet.cacheop": { + "source": "iana" + }, + "application/vnd.uplanet.cacheop-wbxml": { + "source": "iana" + }, + "application/vnd.uplanet.channel": { + "source": "iana" + }, + "application/vnd.uplanet.channel-wbxml": { + "source": "iana" + }, + "application/vnd.uplanet.list": { + "source": "iana" + }, + "application/vnd.uplanet.list-wbxml": { + "source": "iana" + }, + "application/vnd.uplanet.listcmd": { + "source": "iana" + }, + "application/vnd.uplanet.listcmd-wbxml": { + "source": "iana" + }, + "application/vnd.uplanet.signal": { + "source": "iana" + }, + "application/vnd.uri-map": { + "source": "iana" + }, + "application/vnd.valve.source.material": { + "source": "iana" + }, + "application/vnd.vcx": { + "source": "iana", + "extensions": ["vcx"] + }, + "application/vnd.vd-study": { + "source": "iana" + }, + "application/vnd.vectorworks": { + "source": "iana" + }, + "application/vnd.vel+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.verimatrix.vcas": { + "source": "iana" + }, + "application/vnd.veritone.aion+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.veryant.thin": { + "source": "iana" + }, + "application/vnd.ves.encrypted": { + "source": "iana" + }, + "application/vnd.vidsoft.vidconference": { + "source": "iana" + }, + "application/vnd.visio": { + "source": "iana", + "extensions": ["vsd","vst","vss","vsw"] + }, + "application/vnd.visionary": { + "source": "iana", + "extensions": ["vis"] + }, + "application/vnd.vividence.scriptfile": { + "source": "iana" + }, + "application/vnd.vsf": { + "source": "iana", + "extensions": ["vsf"] + }, + "application/vnd.wap.sic": { + "source": "iana" + }, + "application/vnd.wap.slc": { + "source": "iana" + }, + "application/vnd.wap.wbxml": { + "source": "iana", + "charset": "UTF-8", + "extensions": ["wbxml"] + }, + "application/vnd.wap.wmlc": { + "source": "iana", + "extensions": ["wmlc"] + }, + "application/vnd.wap.wmlscriptc": { + "source": "iana", + "extensions": ["wmlsc"] + }, + "application/vnd.webturbo": { + "source": "iana", + "extensions": ["wtb"] + }, + "application/vnd.wfa.dpp": { + "source": "iana" + }, + "application/vnd.wfa.p2p": { + "source": "iana" + }, + "application/vnd.wfa.wsc": { + "source": "iana" + }, + "application/vnd.windows.devicepairing": { + "source": "iana" + }, + "application/vnd.wmc": { + "source": "iana" + }, + "application/vnd.wmf.bootstrap": { + "source": "iana" + }, + "application/vnd.wolfram.mathematica": { + "source": "iana" + }, + "application/vnd.wolfram.mathematica.package": { + "source": "iana" + }, + "application/vnd.wolfram.player": { + "source": "iana", + "extensions": ["nbp"] + }, + "application/vnd.wordperfect": { + "source": "iana", + "extensions": ["wpd"] + }, + "application/vnd.wqd": { + "source": "iana", + "extensions": ["wqd"] + }, + "application/vnd.wrq-hp3000-labelled": { + "source": "iana" + }, + "application/vnd.wt.stf": { + "source": "iana", + "extensions": ["stf"] + }, + "application/vnd.wv.csp+wbxml": { + "source": "iana" + }, + "application/vnd.wv.csp+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.wv.ssp+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.xacml+json": { + "source": "iana", + "compressible": true + }, + "application/vnd.xara": { + "source": "iana", + "extensions": ["xar"] + }, + "application/vnd.xfdl": { + "source": "iana", + "extensions": ["xfdl"] + }, + "application/vnd.xfdl.webform": { + "source": "iana" + }, + "application/vnd.xmi+xml": { + "source": "iana", + "compressible": true + }, + "application/vnd.xmpie.cpkg": { + "source": "iana" + }, + "application/vnd.xmpie.dpkg": { + "source": "iana" + }, + "application/vnd.xmpie.plan": { + "source": "iana" + }, + "application/vnd.xmpie.ppkg": { + "source": "iana" + }, + "application/vnd.xmpie.xlim": { + "source": "iana" + }, + "application/vnd.yamaha.hv-dic": { + "source": "iana", + "extensions": ["hvd"] + }, + "application/vnd.yamaha.hv-script": { + "source": "iana", + "extensions": ["hvs"] + }, + "application/vnd.yamaha.hv-voice": { + "source": "iana", + "extensions": ["hvp"] + }, + "application/vnd.yamaha.openscoreformat": { + "source": "iana", + "extensions": ["osf"] + }, + "application/vnd.yamaha.openscoreformat.osfpvg+xml": { + "source": "iana", + "compressible": true, + "extensions": ["osfpvg"] + }, + "application/vnd.yamaha.remote-setup": { + "source": "iana" + }, + "application/vnd.yamaha.smaf-audio": { + "source": "iana", + "extensions": ["saf"] + }, + "application/vnd.yamaha.smaf-phrase": { + "source": "iana", + "extensions": ["spf"] + }, + "application/vnd.yamaha.through-ngn": { + "source": "iana" + }, + "application/vnd.yamaha.tunnel-udpencap": { + "source": "iana" + }, + "application/vnd.yaoweme": { + "source": "iana" + }, + "application/vnd.yellowriver-custom-menu": { + "source": "iana", + "extensions": ["cmp"] + }, + "application/vnd.youtube.yt": { + "source": "iana" + }, + "application/vnd.zul": { + "source": "iana", + "extensions": ["zir","zirz"] + }, + "application/vnd.zzazz.deck+xml": { + "source": "iana", + "compressible": true, + "extensions": ["zaz"] + }, + "application/voicexml+xml": { + "source": "iana", + "compressible": true, + "extensions": ["vxml"] + }, + "application/voucher-cms+json": { + "source": "iana", + "compressible": true + }, + "application/vq-rtcpxr": { + "source": "iana" + }, + "application/wasm": { + "source": "iana", + "compressible": true, + "extensions": ["wasm"] + }, + "application/watcherinfo+xml": { + "source": "iana", + "compressible": true, + "extensions": ["wif"] + }, + "application/webpush-options+json": { + "source": "iana", + "compressible": true + }, + "application/whoispp-query": { + "source": "iana" + }, + "application/whoispp-response": { + "source": "iana" + }, + "application/widget": { + "source": "iana", + "extensions": ["wgt"] + }, + "application/winhlp": { + "source": "apache", + "extensions": ["hlp"] + }, + "application/wita": { + "source": "iana" + }, + "application/wordperfect5.1": { + "source": "iana" + }, + "application/wsdl+xml": { + "source": "iana", + "compressible": true, + "extensions": ["wsdl"] + }, + "application/wspolicy+xml": { + "source": "iana", + "compressible": true, + "extensions": ["wspolicy"] + }, + "application/x-7z-compressed": { + "source": "apache", + "compressible": false, + "extensions": ["7z"] + }, + "application/x-abiword": { + "source": "apache", + "extensions": ["abw"] + }, + "application/x-ace-compressed": { + "source": "apache", + "extensions": ["ace"] + }, + "application/x-amf": { + "source": "apache" + }, + "application/x-apple-diskimage": { + "source": "apache", + "extensions": ["dmg"] + }, + "application/x-arj": { + "compressible": false, + "extensions": ["arj"] + }, + "application/x-authorware-bin": { + "source": "apache", + "extensions": ["aab","x32","u32","vox"] + }, + "application/x-authorware-map": { + "source": "apache", + "extensions": ["aam"] + }, + "application/x-authorware-seg": { + "source": "apache", + "extensions": ["aas"] + }, + "application/x-bcpio": { + "source": "apache", + "extensions": ["bcpio"] + }, + "application/x-bdoc": { + "compressible": false, + "extensions": ["bdoc"] + }, + "application/x-bittorrent": { + "source": "apache", + "extensions": ["torrent"] + }, + "application/x-blorb": { + "source": "apache", + "extensions": ["blb","blorb"] + }, + "application/x-bzip": { + "source": "apache", + "compressible": false, + "extensions": ["bz"] + }, + "application/x-bzip2": { + "source": "apache", + "compressible": false, + "extensions": ["bz2","boz"] + }, + "application/x-cbr": { + "source": "apache", + "extensions": ["cbr","cba","cbt","cbz","cb7"] + }, + "application/x-cdlink": { + "source": "apache", + "extensions": ["vcd"] + }, + "application/x-cfs-compressed": { + "source": "apache", + "extensions": ["cfs"] + }, + "application/x-chat": { + "source": "apache", + "extensions": ["chat"] + }, + "application/x-chess-pgn": { + "source": "apache", + "extensions": ["pgn"] + }, + "application/x-chrome-extension": { + "extensions": ["crx"] + }, + "application/x-cocoa": { + "source": "nginx", + "extensions": ["cco"] + }, + "application/x-compress": { + "source": "apache" + }, + "application/x-conference": { + "source": "apache", + "extensions": ["nsc"] + }, + "application/x-cpio": { + "source": "apache", + "extensions": ["cpio"] + }, + "application/x-csh": { + "source": "apache", + "extensions": ["csh"] + }, + "application/x-deb": { + "compressible": false + }, + "application/x-debian-package": { + "source": "apache", + "extensions": ["deb","udeb"] + }, + "application/x-dgc-compressed": { + "source": "apache", + "extensions": ["dgc"] + }, + "application/x-director": { + "source": "apache", + "extensions": ["dir","dcr","dxr","cst","cct","cxt","w3d","fgd","swa"] + }, + "application/x-doom": { + "source": "apache", + "extensions": ["wad"] + }, + "application/x-dtbncx+xml": { + "source": "apache", + "compressible": true, + "extensions": ["ncx"] + }, + "application/x-dtbook+xml": { + "source": "apache", + "compressible": true, + "extensions": ["dtb"] + }, + "application/x-dtbresource+xml": { + "source": "apache", + "compressible": true, + "extensions": ["res"] + }, + "application/x-dvi": { + "source": "apache", + "compressible": false, + "extensions": ["dvi"] + }, + "application/x-envoy": { + "source": "apache", + "extensions": ["evy"] + }, + "application/x-eva": { + "source": "apache", + "extensions": ["eva"] + }, + "application/x-font-bdf": { + "source": "apache", + "extensions": ["bdf"] + }, + "application/x-font-dos": { + "source": "apache" + }, + "application/x-font-framemaker": { + "source": "apache" + }, + "application/x-font-ghostscript": { + "source": "apache", + "extensions": ["gsf"] + }, + "application/x-font-libgrx": { + "source": "apache" + }, + "application/x-font-linux-psf": { + "source": "apache", + "extensions": ["psf"] + }, + "application/x-font-pcf": { + "source": "apache", + "extensions": ["pcf"] + }, + "application/x-font-snf": { + "source": "apache", + "extensions": ["snf"] + }, + "application/x-font-speedo": { + "source": "apache" + }, + "application/x-font-sunos-news": { + "source": "apache" + }, + "application/x-font-type1": { + "source": "apache", + "extensions": ["pfa","pfb","pfm","afm"] + }, + "application/x-font-vfont": { + "source": "apache" + }, + "application/x-freearc": { + "source": "apache", + "extensions": ["arc"] + }, + "application/x-futuresplash": { + "source": "apache", + "extensions": ["spl"] + }, + "application/x-gca-compressed": { + "source": "apache", + "extensions": ["gca"] + }, + "application/x-glulx": { + "source": "apache", + "extensions": ["ulx"] + }, + "application/x-gnumeric": { + "source": "apache", + "extensions": ["gnumeric"] + }, + "application/x-gramps-xml": { + "source": "apache", + "extensions": ["gramps"] + }, + "application/x-gtar": { + "source": "apache", + "extensions": ["gtar"] + }, + "application/x-gzip": { + "source": "apache" + }, + "application/x-hdf": { + "source": "apache", + "extensions": ["hdf"] + }, + "application/x-httpd-php": { + "compressible": true, + "extensions": ["php"] + }, + "application/x-install-instructions": { + "source": "apache", + "extensions": ["install"] + }, + "application/x-iso9660-image": { + "source": "apache", + "extensions": ["iso"] + }, + "application/x-iwork-keynote-sffkey": { + "extensions": ["key"] + }, + "application/x-iwork-numbers-sffnumbers": { + "extensions": ["numbers"] + }, + "application/x-iwork-pages-sffpages": { + "extensions": ["pages"] + }, + "application/x-java-archive-diff": { + "source": "nginx", + "extensions": ["jardiff"] + }, + "application/x-java-jnlp-file": { + "source": "apache", + "compressible": false, + "extensions": ["jnlp"] + }, + "application/x-javascript": { + "compressible": true + }, + "application/x-keepass2": { + "extensions": ["kdbx"] + }, + "application/x-latex": { + "source": "apache", + "compressible": false, + "extensions": ["latex"] + }, + "application/x-lua-bytecode": { + "extensions": ["luac"] + }, + "application/x-lzh-compressed": { + "source": "apache", + "extensions": ["lzh","lha"] + }, + "application/x-makeself": { + "source": "nginx", + "extensions": ["run"] + }, + "application/x-mie": { + "source": "apache", + "extensions": ["mie"] + }, + "application/x-mobipocket-ebook": { + "source": "apache", + "extensions": ["prc","mobi"] + }, + "application/x-mpegurl": { + "compressible": false + }, + "application/x-ms-application": { + "source": "apache", + "extensions": ["application"] + }, + "application/x-ms-shortcut": { + "source": "apache", + "extensions": ["lnk"] + }, + "application/x-ms-wmd": { + "source": "apache", + "extensions": ["wmd"] + }, + "application/x-ms-wmz": { + "source": "apache", + "extensions": ["wmz"] + }, + "application/x-ms-xbap": { + "source": "apache", + "extensions": ["xbap"] + }, + "application/x-msaccess": { + "source": "apache", + "extensions": ["mdb"] + }, + "application/x-msbinder": { + "source": "apache", + "extensions": ["obd"] + }, + "application/x-mscardfile": { + "source": "apache", + "extensions": ["crd"] + }, + "application/x-msclip": { + "source": "apache", + "extensions": ["clp"] + }, + "application/x-msdos-program": { + "extensions": ["exe"] + }, + "application/x-msdownload": { + "source": "apache", + "extensions": ["exe","dll","com","bat","msi"] + }, + "application/x-msmediaview": { + "source": "apache", + "extensions": ["mvb","m13","m14"] + }, + "application/x-msmetafile": { + "source": "apache", + "extensions": ["wmf","wmz","emf","emz"] + }, + "application/x-msmoney": { + "source": "apache", + "extensions": ["mny"] + }, + "application/x-mspublisher": { + "source": "apache", + "extensions": ["pub"] + }, + "application/x-msschedule": { + "source": "apache", + "extensions": ["scd"] + }, + "application/x-msterminal": { + "source": "apache", + "extensions": ["trm"] + }, + "application/x-mswrite": { + "source": "apache", + "extensions": ["wri"] + }, + "application/x-netcdf": { + "source": "apache", + "extensions": ["nc","cdf"] + }, + "application/x-ns-proxy-autoconfig": { + "compressible": true, + "extensions": ["pac"] + }, + "application/x-nzb": { + "source": "apache", + "extensions": ["nzb"] + }, + "application/x-perl": { + "source": "nginx", + "extensions": ["pl","pm"] + }, + "application/x-pilot": { + "source": "nginx", + "extensions": ["prc","pdb"] + }, + "application/x-pkcs12": { + "source": "apache", + "compressible": false, + "extensions": ["p12","pfx"] + }, + "application/x-pkcs7-certificates": { + "source": "apache", + "extensions": ["p7b","spc"] + }, + "application/x-pkcs7-certreqresp": { + "source": "apache", + "extensions": ["p7r"] + }, + "application/x-pki-message": { + "source": "iana" + }, + "application/x-rar-compressed": { + "source": "apache", + "compressible": false, + "extensions": ["rar"] + }, + "application/x-redhat-package-manager": { + "source": "nginx", + "extensions": ["rpm"] + }, + "application/x-research-info-systems": { + "source": "apache", + "extensions": ["ris"] + }, + "application/x-sea": { + "source": "nginx", + "extensions": ["sea"] + }, + "application/x-sh": { + "source": "apache", + "compressible": true, + "extensions": ["sh"] + }, + "application/x-shar": { + "source": "apache", + "extensions": ["shar"] + }, + "application/x-shockwave-flash": { + "source": "apache", + "compressible": false, + "extensions": ["swf"] + }, + "application/x-silverlight-app": { + "source": "apache", + "extensions": ["xap"] + }, + "application/x-sql": { + "source": "apache", + "extensions": ["sql"] + }, + "application/x-stuffit": { + "source": "apache", + "compressible": false, + "extensions": ["sit"] + }, + "application/x-stuffitx": { + "source": "apache", + "extensions": ["sitx"] + }, + "application/x-subrip": { + "source": "apache", + "extensions": ["srt"] + }, + "application/x-sv4cpio": { + "source": "apache", + "extensions": ["sv4cpio"] + }, + "application/x-sv4crc": { + "source": "apache", + "extensions": ["sv4crc"] + }, + "application/x-t3vm-image": { + "source": "apache", + "extensions": ["t3"] + }, + "application/x-tads": { + "source": "apache", + "extensions": ["gam"] + }, + "application/x-tar": { + "source": "apache", + "compressible": true, + "extensions": ["tar"] + }, + "application/x-tcl": { + "source": "apache", + "extensions": ["tcl","tk"] + }, + "application/x-tex": { + "source": "apache", + "extensions": ["tex"] + }, + "application/x-tex-tfm": { + "source": "apache", + "extensions": ["tfm"] + }, + "application/x-texinfo": { + "source": "apache", + "extensions": ["texinfo","texi"] + }, + "application/x-tgif": { + "source": "apache", + "extensions": ["obj"] + }, + "application/x-ustar": { + "source": "apache", + "extensions": ["ustar"] + }, + "application/x-virtualbox-hdd": { + "compressible": true, + "extensions": ["hdd"] + }, + "application/x-virtualbox-ova": { + "compressible": true, + "extensions": ["ova"] + }, + "application/x-virtualbox-ovf": { + "compressible": true, + "extensions": ["ovf"] + }, + "application/x-virtualbox-vbox": { + "compressible": true, + "extensions": ["vbox"] + }, + "application/x-virtualbox-vbox-extpack": { + "compressible": false, + "extensions": ["vbox-extpack"] + }, + "application/x-virtualbox-vdi": { + "compressible": true, + "extensions": ["vdi"] + }, + "application/x-virtualbox-vhd": { + "compressible": true, + "extensions": ["vhd"] + }, + "application/x-virtualbox-vmdk": { + "compressible": true, + "extensions": ["vmdk"] + }, + "application/x-wais-source": { + "source": "apache", + "extensions": ["src"] + }, + "application/x-web-app-manifest+json": { + "compressible": true, + "extensions": ["webapp"] + }, + "application/x-www-form-urlencoded": { + "source": "iana", + "compressible": true + }, + "application/x-x509-ca-cert": { + "source": "iana", + "extensions": ["der","crt","pem"] + }, + "application/x-x509-ca-ra-cert": { + "source": "iana" + }, + "application/x-x509-next-ca-cert": { + "source": "iana" + }, + "application/x-xfig": { + "source": "apache", + "extensions": ["fig"] + }, + "application/x-xliff+xml": { + "source": "apache", + "compressible": true, + "extensions": ["xlf"] + }, + "application/x-xpinstall": { + "source": "apache", + "compressible": false, + "extensions": ["xpi"] + }, + "application/x-xz": { + "source": "apache", + "extensions": ["xz"] + }, + "application/x-zmachine": { + "source": "apache", + "extensions": ["z1","z2","z3","z4","z5","z6","z7","z8"] + }, + "application/x400-bp": { + "source": "iana" + }, + "application/xacml+xml": { + "source": "iana", + "compressible": true + }, + "application/xaml+xml": { + "source": "apache", + "compressible": true, + "extensions": ["xaml"] + }, + "application/xcap-att+xml": { + "source": "iana", + "compressible": true, + "extensions": ["xav"] + }, + "application/xcap-caps+xml": { + "source": "iana", + "compressible": true, + "extensions": ["xca"] + }, + "application/xcap-diff+xml": { + "source": "iana", + "compressible": true, + "extensions": ["xdf"] + }, + "application/xcap-el+xml": { + "source": "iana", + "compressible": true, + "extensions": ["xel"] + }, + "application/xcap-error+xml": { + "source": "iana", + "compressible": true + }, + "application/xcap-ns+xml": { + "source": "iana", + "compressible": true, + "extensions": ["xns"] + }, + "application/xcon-conference-info+xml": { + "source": "iana", + "compressible": true + }, + "application/xcon-conference-info-diff+xml": { + "source": "iana", + "compressible": true + }, + "application/xenc+xml": { + "source": "iana", + "compressible": true, + "extensions": ["xenc"] + }, + "application/xhtml+xml": { + "source": "iana", + "compressible": true, + "extensions": ["xhtml","xht"] + }, + "application/xhtml-voice+xml": { + "source": "apache", + "compressible": true + }, + "application/xliff+xml": { + "source": "iana", + "compressible": true, + "extensions": ["xlf"] + }, + "application/xml": { + "source": "iana", + "compressible": true, + "extensions": ["xml","xsl","xsd","rng"] + }, + "application/xml-dtd": { + "source": "iana", + "compressible": true, + "extensions": ["dtd"] + }, + "application/xml-external-parsed-entity": { + "source": "iana" + }, + "application/xml-patch+xml": { + "source": "iana", + "compressible": true + }, + "application/xmpp+xml": { + "source": "iana", + "compressible": true + }, + "application/xop+xml": { + "source": "iana", + "compressible": true, + "extensions": ["xop"] + }, + "application/xproc+xml": { + "source": "apache", + "compressible": true, + "extensions": ["xpl"] + }, + "application/xslt+xml": { + "source": "iana", + "compressible": true, + "extensions": ["xsl","xslt"] + }, + "application/xspf+xml": { + "source": "apache", + "compressible": true, + "extensions": ["xspf"] + }, + "application/xv+xml": { + "source": "iana", + "compressible": true, + "extensions": ["mxml","xhvml","xvml","xvm"] + }, + "application/yang": { + "source": "iana", + "extensions": ["yang"] + }, + "application/yang-data+json": { + "source": "iana", + "compressible": true + }, + "application/yang-data+xml": { + "source": "iana", + "compressible": true + }, + "application/yang-patch+json": { + "source": "iana", + "compressible": true + }, + "application/yang-patch+xml": { + "source": "iana", + "compressible": true + }, + "application/yin+xml": { + "source": "iana", + "compressible": true, + "extensions": ["yin"] + }, + "application/zip": { + "source": "iana", + "compressible": false, + "extensions": ["zip"] + }, + "application/zlib": { + "source": "iana" + }, + "application/zstd": { + "source": "iana" + }, + "audio/1d-interleaved-parityfec": { + "source": "iana" + }, + "audio/32kadpcm": { + "source": "iana" + }, + "audio/3gpp": { + "source": "iana", + "compressible": false, + "extensions": ["3gpp"] + }, + "audio/3gpp2": { + "source": "iana" + }, + "audio/aac": { + "source": "iana" + }, + "audio/ac3": { + "source": "iana" + }, + "audio/adpcm": { + "source": "apache", + "extensions": ["adp"] + }, + "audio/amr": { + "source": "iana", + "extensions": ["amr"] + }, + "audio/amr-wb": { + "source": "iana" + }, + "audio/amr-wb+": { + "source": "iana" + }, + "audio/aptx": { + "source": "iana" + }, + "audio/asc": { + "source": "iana" + }, + "audio/atrac-advanced-lossless": { + "source": "iana" + }, + "audio/atrac-x": { + "source": "iana" + }, + "audio/atrac3": { + "source": "iana" + }, + "audio/basic": { + "source": "iana", + "compressible": false, + "extensions": ["au","snd"] + }, + "audio/bv16": { + "source": "iana" + }, + "audio/bv32": { + "source": "iana" + }, + "audio/clearmode": { + "source": "iana" + }, + "audio/cn": { + "source": "iana" + }, + "audio/dat12": { + "source": "iana" + }, + "audio/dls": { + "source": "iana" + }, + "audio/dsr-es201108": { + "source": "iana" + }, + "audio/dsr-es202050": { + "source": "iana" + }, + "audio/dsr-es202211": { + "source": "iana" + }, + "audio/dsr-es202212": { + "source": "iana" + }, + "audio/dv": { + "source": "iana" + }, + "audio/dvi4": { + "source": "iana" + }, + "audio/eac3": { + "source": "iana" + }, + "audio/encaprtp": { + "source": "iana" + }, + "audio/evrc": { + "source": "iana" + }, + "audio/evrc-qcp": { + "source": "iana" + }, + "audio/evrc0": { + "source": "iana" + }, + "audio/evrc1": { + "source": "iana" + }, + "audio/evrcb": { + "source": "iana" + }, + "audio/evrcb0": { + "source": "iana" + }, + "audio/evrcb1": { + "source": "iana" + }, + "audio/evrcnw": { + "source": "iana" + }, + "audio/evrcnw0": { + "source": "iana" + }, + "audio/evrcnw1": { + "source": "iana" + }, + "audio/evrcwb": { + "source": "iana" + }, + "audio/evrcwb0": { + "source": "iana" + }, + "audio/evrcwb1": { + "source": "iana" + }, + "audio/evs": { + "source": "iana" + }, + "audio/flexfec": { + "source": "iana" + }, + "audio/fwdred": { + "source": "iana" + }, + "audio/g711-0": { + "source": "iana" + }, + "audio/g719": { + "source": "iana" + }, + "audio/g722": { + "source": "iana" + }, + "audio/g7221": { + "source": "iana" + }, + "audio/g723": { + "source": "iana" + }, + "audio/g726-16": { + "source": "iana" + }, + "audio/g726-24": { + "source": "iana" + }, + "audio/g726-32": { + "source": "iana" + }, + "audio/g726-40": { + "source": "iana" + }, + "audio/g728": { + "source": "iana" + }, + "audio/g729": { + "source": "iana" + }, + "audio/g7291": { + "source": "iana" + }, + "audio/g729d": { + "source": "iana" + }, + "audio/g729e": { + "source": "iana" + }, + "audio/gsm": { + "source": "iana" + }, + "audio/gsm-efr": { + "source": "iana" + }, + "audio/gsm-hr-08": { + "source": "iana" + }, + "audio/ilbc": { + "source": "iana" + }, + "audio/ip-mr_v2.5": { + "source": "iana" + }, + "audio/isac": { + "source": "apache" + }, + "audio/l16": { + "source": "iana" + }, + "audio/l20": { + "source": "iana" + }, + "audio/l24": { + "source": "iana", + "compressible": false + }, + "audio/l8": { + "source": "iana" + }, + "audio/lpc": { + "source": "iana" + }, + "audio/melp": { + "source": "iana" + }, + "audio/melp1200": { + "source": "iana" + }, + "audio/melp2400": { + "source": "iana" + }, + "audio/melp600": { + "source": "iana" + }, + "audio/mhas": { + "source": "iana" + }, + "audio/midi": { + "source": "apache", + "extensions": ["mid","midi","kar","rmi"] + }, + "audio/mobile-xmf": { + "source": "iana", + "extensions": ["mxmf"] + }, + "audio/mp3": { + "compressible": false, + "extensions": ["mp3"] + }, + "audio/mp4": { + "source": "iana", + "compressible": false, + "extensions": ["m4a","mp4a"] + }, + "audio/mp4a-latm": { + "source": "iana" + }, + "audio/mpa": { + "source": "iana" + }, + "audio/mpa-robust": { + "source": "iana" + }, + "audio/mpeg": { + "source": "iana", + "compressible": false, + "extensions": ["mpga","mp2","mp2a","mp3","m2a","m3a"] + }, + "audio/mpeg4-generic": { + "source": "iana" + }, + "audio/musepack": { + "source": "apache" + }, + "audio/ogg": { + "source": "iana", + "compressible": false, + "extensions": ["oga","ogg","spx","opus"] + }, + "audio/opus": { + "source": "iana" + }, + "audio/parityfec": { + "source": "iana" + }, + "audio/pcma": { + "source": "iana" + }, + "audio/pcma-wb": { + "source": "iana" + }, + "audio/pcmu": { + "source": "iana" + }, + "audio/pcmu-wb": { + "source": "iana" + }, + "audio/prs.sid": { + "source": "iana" + }, + "audio/qcelp": { + "source": "iana" + }, + "audio/raptorfec": { + "source": "iana" + }, + "audio/red": { + "source": "iana" + }, + "audio/rtp-enc-aescm128": { + "source": "iana" + }, + "audio/rtp-midi": { + "source": "iana" + }, + "audio/rtploopback": { + "source": "iana" + }, + "audio/rtx": { + "source": "iana" + }, + "audio/s3m": { + "source": "apache", + "extensions": ["s3m"] + }, + "audio/scip": { + "source": "iana" + }, + "audio/silk": { + "source": "apache", + "extensions": ["sil"] + }, + "audio/smv": { + "source": "iana" + }, + "audio/smv-qcp": { + "source": "iana" + }, + "audio/smv0": { + "source": "iana" + }, + "audio/sofa": { + "source": "iana" + }, + "audio/sp-midi": { + "source": "iana" + }, + "audio/speex": { + "source": "iana" + }, + "audio/t140c": { + "source": "iana" + }, + "audio/t38": { + "source": "iana" + }, + "audio/telephone-event": { + "source": "iana" + }, + "audio/tetra_acelp": { + "source": "iana" + }, + "audio/tetra_acelp_bb": { + "source": "iana" + }, + "audio/tone": { + "source": "iana" + }, + "audio/tsvcis": { + "source": "iana" + }, + "audio/uemclip": { + "source": "iana" + }, + "audio/ulpfec": { + "source": "iana" + }, + "audio/usac": { + "source": "iana" + }, + "audio/vdvi": { + "source": "iana" + }, + "audio/vmr-wb": { + "source": "iana" + }, + "audio/vnd.3gpp.iufp": { + "source": "iana" + }, + "audio/vnd.4sb": { + "source": "iana" + }, + "audio/vnd.audiokoz": { + "source": "iana" + }, + "audio/vnd.celp": { + "source": "iana" + }, + "audio/vnd.cisco.nse": { + "source": "iana" + }, + "audio/vnd.cmles.radio-events": { + "source": "iana" + }, + "audio/vnd.cns.anp1": { + "source": "iana" + }, + "audio/vnd.cns.inf1": { + "source": "iana" + }, + "audio/vnd.dece.audio": { + "source": "iana", + "extensions": ["uva","uvva"] + }, + "audio/vnd.digital-winds": { + "source": "iana", + "extensions": ["eol"] + }, + "audio/vnd.dlna.adts": { + "source": "iana" + }, + "audio/vnd.dolby.heaac.1": { + "source": "iana" + }, + "audio/vnd.dolby.heaac.2": { + "source": "iana" + }, + "audio/vnd.dolby.mlp": { + "source": "iana" + }, + "audio/vnd.dolby.mps": { + "source": "iana" + }, + "audio/vnd.dolby.pl2": { + "source": "iana" + }, + "audio/vnd.dolby.pl2x": { + "source": "iana" + }, + "audio/vnd.dolby.pl2z": { + "source": "iana" + }, + "audio/vnd.dolby.pulse.1": { + "source": "iana" + }, + "audio/vnd.dra": { + "source": "iana", + "extensions": ["dra"] + }, + "audio/vnd.dts": { + "source": "iana", + "extensions": ["dts"] + }, + "audio/vnd.dts.hd": { + "source": "iana", + "extensions": ["dtshd"] + }, + "audio/vnd.dts.uhd": { + "source": "iana" + }, + "audio/vnd.dvb.file": { + "source": "iana" + }, + "audio/vnd.everad.plj": { + "source": "iana" + }, + "audio/vnd.hns.audio": { + "source": "iana" + }, + "audio/vnd.lucent.voice": { + "source": "iana", + "extensions": ["lvp"] + }, + "audio/vnd.ms-playready.media.pya": { + "source": "iana", + "extensions": ["pya"] + }, + "audio/vnd.nokia.mobile-xmf": { + "source": "iana" + }, + "audio/vnd.nortel.vbk": { + "source": "iana" + }, + "audio/vnd.nuera.ecelp4800": { + "source": "iana", + "extensions": ["ecelp4800"] + }, + "audio/vnd.nuera.ecelp7470": { + "source": "iana", + "extensions": ["ecelp7470"] + }, + "audio/vnd.nuera.ecelp9600": { + "source": "iana", + "extensions": ["ecelp9600"] + }, + "audio/vnd.octel.sbc": { + "source": "iana" + }, + "audio/vnd.presonus.multitrack": { + "source": "iana" + }, + "audio/vnd.qcelp": { + "source": "iana" + }, + "audio/vnd.rhetorex.32kadpcm": { + "source": "iana" + }, + "audio/vnd.rip": { + "source": "iana", + "extensions": ["rip"] + }, + "audio/vnd.rn-realaudio": { + "compressible": false + }, + "audio/vnd.sealedmedia.softseal.mpeg": { + "source": "iana" + }, + "audio/vnd.vmx.cvsd": { + "source": "iana" + }, + "audio/vnd.wave": { + "compressible": false + }, + "audio/vorbis": { + "source": "iana", + "compressible": false + }, + "audio/vorbis-config": { + "source": "iana" + }, + "audio/wav": { + "compressible": false, + "extensions": ["wav"] + }, + "audio/wave": { + "compressible": false, + "extensions": ["wav"] + }, + "audio/webm": { + "source": "apache", + "compressible": false, + "extensions": ["weba"] + }, + "audio/x-aac": { + "source": "apache", + "compressible": false, + "extensions": ["aac"] + }, + "audio/x-aiff": { + "source": "apache", + "extensions": ["aif","aiff","aifc"] + }, + "audio/x-caf": { + "source": "apache", + "compressible": false, + "extensions": ["caf"] + }, + "audio/x-flac": { + "source": "apache", + "extensions": ["flac"] + }, + "audio/x-m4a": { + "source": "nginx", + "extensions": ["m4a"] + }, + "audio/x-matroska": { + "source": "apache", + "extensions": ["mka"] + }, + "audio/x-mpegurl": { + "source": "apache", + "extensions": ["m3u"] + }, + "audio/x-ms-wax": { + "source": "apache", + "extensions": ["wax"] + }, + "audio/x-ms-wma": { + "source": "apache", + "extensions": ["wma"] + }, + "audio/x-pn-realaudio": { + "source": "apache", + "extensions": ["ram","ra"] + }, + "audio/x-pn-realaudio-plugin": { + "source": "apache", + "extensions": ["rmp"] + }, + "audio/x-realaudio": { + "source": "nginx", + "extensions": ["ra"] + }, + "audio/x-tta": { + "source": "apache" + }, + "audio/x-wav": { + "source": "apache", + "extensions": ["wav"] + }, + "audio/xm": { + "source": "apache", + "extensions": ["xm"] + }, + "chemical/x-cdx": { + "source": "apache", + "extensions": ["cdx"] + }, + "chemical/x-cif": { + "source": "apache", + "extensions": ["cif"] + }, + "chemical/x-cmdf": { + "source": "apache", + "extensions": ["cmdf"] + }, + "chemical/x-cml": { + "source": "apache", + "extensions": ["cml"] + }, + "chemical/x-csml": { + "source": "apache", + "extensions": ["csml"] + }, + "chemical/x-pdb": { + "source": "apache" + }, + "chemical/x-xyz": { + "source": "apache", + "extensions": ["xyz"] + }, + "font/collection": { + "source": "iana", + "extensions": ["ttc"] + }, + "font/otf": { + "source": "iana", + "compressible": true, + "extensions": ["otf"] + }, + "font/sfnt": { + "source": "iana" + }, + "font/ttf": { + "source": "iana", + "compressible": true, + "extensions": ["ttf"] + }, + "font/woff": { + "source": "iana", + "extensions": ["woff"] + }, + "font/woff2": { + "source": "iana", + "extensions": ["woff2"] + }, + "image/aces": { + "source": "iana", + "extensions": ["exr"] + }, + "image/apng": { + "compressible": false, + "extensions": ["apng"] + }, + "image/avci": { + "source": "iana", + "extensions": ["avci"] + }, + "image/avcs": { + "source": "iana", + "extensions": ["avcs"] + }, + "image/avif": { + "source": "iana", + "compressible": false, + "extensions": ["avif"] + }, + "image/bmp": { + "source": "iana", + "compressible": true, + "extensions": ["bmp"] + }, + "image/cgm": { + "source": "iana", + "extensions": ["cgm"] + }, + "image/dicom-rle": { + "source": "iana", + "extensions": ["drle"] + }, + "image/emf": { + "source": "iana", + "extensions": ["emf"] + }, + "image/fits": { + "source": "iana", + "extensions": ["fits"] + }, + "image/g3fax": { + "source": "iana", + "extensions": ["g3"] + }, + "image/gif": { + "source": "iana", + "compressible": false, + "extensions": ["gif"] + }, + "image/heic": { + "source": "iana", + "extensions": ["heic"] + }, + "image/heic-sequence": { + "source": "iana", + "extensions": ["heics"] + }, + "image/heif": { + "source": "iana", + "extensions": ["heif"] + }, + "image/heif-sequence": { + "source": "iana", + "extensions": ["heifs"] + }, + "image/hej2k": { + "source": "iana", + "extensions": ["hej2"] + }, + "image/hsj2": { + "source": "iana", + "extensions": ["hsj2"] + }, + "image/ief": { + "source": "iana", + "extensions": ["ief"] + }, + "image/jls": { + "source": "iana", + "extensions": ["jls"] + }, + "image/jp2": { + "source": "iana", + "compressible": false, + "extensions": ["jp2","jpg2"] + }, + "image/jpeg": { + "source": "iana", + "compressible": false, + "extensions": ["jpeg","jpg","jpe"] + }, + "image/jph": { + "source": "iana", + "extensions": ["jph"] + }, + "image/jphc": { + "source": "iana", + "extensions": ["jhc"] + }, + "image/jpm": { + "source": "iana", + "compressible": false, + "extensions": ["jpm"] + }, + "image/jpx": { + "source": "iana", + "compressible": false, + "extensions": ["jpx","jpf"] + }, + "image/jxr": { + "source": "iana", + "extensions": ["jxr"] + }, + "image/jxra": { + "source": "iana", + "extensions": ["jxra"] + }, + "image/jxrs": { + "source": "iana", + "extensions": ["jxrs"] + }, + "image/jxs": { + "source": "iana", + "extensions": ["jxs"] + }, + "image/jxsc": { + "source": "iana", + "extensions": ["jxsc"] + }, + "image/jxsi": { + "source": "iana", + "extensions": ["jxsi"] + }, + "image/jxss": { + "source": "iana", + "extensions": ["jxss"] + }, + "image/ktx": { + "source": "iana", + "extensions": ["ktx"] + }, + "image/ktx2": { + "source": "iana", + "extensions": ["ktx2"] + }, + "image/naplps": { + "source": "iana" + }, + "image/pjpeg": { + "compressible": false + }, + "image/png": { + "source": "iana", + "compressible": false, + "extensions": ["png"] + }, + "image/prs.btif": { + "source": "iana", + "extensions": ["btif"] + }, + "image/prs.pti": { + "source": "iana", + "extensions": ["pti"] + }, + "image/pwg-raster": { + "source": "iana" + }, + "image/sgi": { + "source": "apache", + "extensions": ["sgi"] + }, + "image/svg+xml": { + "source": "iana", + "compressible": true, + "extensions": ["svg","svgz"] + }, + "image/t38": { + "source": "iana", + "extensions": ["t38"] + }, + "image/tiff": { + "source": "iana", + "compressible": false, + "extensions": ["tif","tiff"] + }, + "image/tiff-fx": { + "source": "iana", + "extensions": ["tfx"] + }, + "image/vnd.adobe.photoshop": { + "source": "iana", + "compressible": true, + "extensions": ["psd"] + }, + "image/vnd.airzip.accelerator.azv": { + "source": "iana", + "extensions": ["azv"] + }, + "image/vnd.cns.inf2": { + "source": "iana" + }, + "image/vnd.dece.graphic": { + "source": "iana", + "extensions": ["uvi","uvvi","uvg","uvvg"] + }, + "image/vnd.djvu": { + "source": "iana", + "extensions": ["djvu","djv"] + }, + "image/vnd.dvb.subtitle": { + "source": "iana", + "extensions": ["sub"] + }, + "image/vnd.dwg": { + "source": "iana", + "extensions": ["dwg"] + }, + "image/vnd.dxf": { + "source": "iana", + "extensions": ["dxf"] + }, + "image/vnd.fastbidsheet": { + "source": "iana", + "extensions": ["fbs"] + }, + "image/vnd.fpx": { + "source": "iana", + "extensions": ["fpx"] + }, + "image/vnd.fst": { + "source": "iana", + "extensions": ["fst"] + }, + "image/vnd.fujixerox.edmics-mmr": { + "source": "iana", + "extensions": ["mmr"] + }, + "image/vnd.fujixerox.edmics-rlc": { + "source": "iana", + "extensions": ["rlc"] + }, + "image/vnd.globalgraphics.pgb": { + "source": "iana" + }, + "image/vnd.microsoft.icon": { + "source": "iana", + "compressible": true, + "extensions": ["ico"] + }, + "image/vnd.mix": { + "source": "iana" + }, + "image/vnd.mozilla.apng": { + "source": "iana" + }, + "image/vnd.ms-dds": { + "compressible": true, + "extensions": ["dds"] + }, + "image/vnd.ms-modi": { + "source": "iana", + "extensions": ["mdi"] + }, + "image/vnd.ms-photo": { + "source": "apache", + "extensions": ["wdp"] + }, + "image/vnd.net-fpx": { + "source": "iana", + "extensions": ["npx"] + }, + "image/vnd.pco.b16": { + "source": "iana", + "extensions": ["b16"] + }, + "image/vnd.radiance": { + "source": "iana" + }, + "image/vnd.sealed.png": { + "source": "iana" + }, + "image/vnd.sealedmedia.softseal.gif": { + "source": "iana" + }, + "image/vnd.sealedmedia.softseal.jpg": { + "source": "iana" + }, + "image/vnd.svf": { + "source": "iana" + }, + "image/vnd.tencent.tap": { + "source": "iana", + "extensions": ["tap"] + }, + "image/vnd.valve.source.texture": { + "source": "iana", + "extensions": ["vtf"] + }, + "image/vnd.wap.wbmp": { + "source": "iana", + "extensions": ["wbmp"] + }, + "image/vnd.xiff": { + "source": "iana", + "extensions": ["xif"] + }, + "image/vnd.zbrush.pcx": { + "source": "iana", + "extensions": ["pcx"] + }, + "image/webp": { + "source": "apache", + "extensions": ["webp"] + }, + "image/wmf": { + "source": "iana", + "extensions": ["wmf"] + }, + "image/x-3ds": { + "source": "apache", + "extensions": ["3ds"] + }, + "image/x-cmu-raster": { + "source": "apache", + "extensions": ["ras"] + }, + "image/x-cmx": { + "source": "apache", + "extensions": ["cmx"] + }, + "image/x-freehand": { + "source": "apache", + "extensions": ["fh","fhc","fh4","fh5","fh7"] + }, + "image/x-icon": { + "source": "apache", + "compressible": true, + "extensions": ["ico"] + }, + "image/x-jng": { + "source": "nginx", + "extensions": ["jng"] + }, + "image/x-mrsid-image": { + "source": "apache", + "extensions": ["sid"] + }, + "image/x-ms-bmp": { + "source": "nginx", + "compressible": true, + "extensions": ["bmp"] + }, + "image/x-pcx": { + "source": "apache", + "extensions": ["pcx"] + }, + "image/x-pict": { + "source": "apache", + "extensions": ["pic","pct"] + }, + "image/x-portable-anymap": { + "source": "apache", + "extensions": ["pnm"] + }, + "image/x-portable-bitmap": { + "source": "apache", + "extensions": ["pbm"] + }, + "image/x-portable-graymap": { + "source": "apache", + "extensions": ["pgm"] + }, + "image/x-portable-pixmap": { + "source": "apache", + "extensions": ["ppm"] + }, + "image/x-rgb": { + "source": "apache", + "extensions": ["rgb"] + }, + "image/x-tga": { + "source": "apache", + "extensions": ["tga"] + }, + "image/x-xbitmap": { + "source": "apache", + "extensions": ["xbm"] + }, + "image/x-xcf": { + "compressible": false + }, + "image/x-xpixmap": { + "source": "apache", + "extensions": ["xpm"] + }, + "image/x-xwindowdump": { + "source": "apache", + "extensions": ["xwd"] + }, + "message/cpim": { + "source": "iana" + }, + "message/delivery-status": { + "source": "iana" + }, + "message/disposition-notification": { + "source": "iana", + "extensions": [ + "disposition-notification" + ] + }, + "message/external-body": { + "source": "iana" + }, + "message/feedback-report": { + "source": "iana" + }, + "message/global": { + "source": "iana", + "extensions": ["u8msg"] + }, + "message/global-delivery-status": { + "source": "iana", + "extensions": ["u8dsn"] + }, + "message/global-disposition-notification": { + "source": "iana", + "extensions": ["u8mdn"] + }, + "message/global-headers": { + "source": "iana", + "extensions": ["u8hdr"] + }, + "message/http": { + "source": "iana", + "compressible": false + }, + "message/imdn+xml": { + "source": "iana", + "compressible": true + }, + "message/news": { + "source": "iana" + }, + "message/partial": { + "source": "iana", + "compressible": false + }, + "message/rfc822": { + "source": "iana", + "compressible": true, + "extensions": ["eml","mime"] + }, + "message/s-http": { + "source": "iana" + }, + "message/sip": { + "source": "iana" + }, + "message/sipfrag": { + "source": "iana" + }, + "message/tracking-status": { + "source": "iana" + }, + "message/vnd.si.simp": { + "source": "iana" + }, + "message/vnd.wfa.wsc": { + "source": "iana", + "extensions": ["wsc"] + }, + "model/3mf": { + "source": "iana", + "extensions": ["3mf"] + }, + "model/e57": { + "source": "iana" + }, + "model/gltf+json": { + "source": "iana", + "compressible": true, + "extensions": ["gltf"] + }, + "model/gltf-binary": { + "source": "iana", + "compressible": true, + "extensions": ["glb"] + }, + "model/iges": { + "source": "iana", + "compressible": false, + "extensions": ["igs","iges"] + }, + "model/mesh": { + "source": "iana", + "compressible": false, + "extensions": ["msh","mesh","silo"] + }, + "model/mtl": { + "source": "iana", + "extensions": ["mtl"] + }, + "model/obj": { + "source": "iana", + "extensions": ["obj"] + }, + "model/step": { + "source": "iana" + }, + "model/step+xml": { + "source": "iana", + "compressible": true, + "extensions": ["stpx"] + }, + "model/step+zip": { + "source": "iana", + "compressible": false, + "extensions": ["stpz"] + }, + "model/step-xml+zip": { + "source": "iana", + "compressible": false, + "extensions": ["stpxz"] + }, + "model/stl": { + "source": "iana", + "extensions": ["stl"] + }, + "model/vnd.collada+xml": { + "source": "iana", + "compressible": true, + "extensions": ["dae"] + }, + "model/vnd.dwf": { + "source": "iana", + "extensions": ["dwf"] + }, + "model/vnd.flatland.3dml": { + "source": "iana" + }, + "model/vnd.gdl": { + "source": "iana", + "extensions": ["gdl"] + }, + "model/vnd.gs-gdl": { + "source": "apache" + }, + "model/vnd.gs.gdl": { + "source": "iana" + }, + "model/vnd.gtw": { + "source": "iana", + "extensions": ["gtw"] + }, + "model/vnd.moml+xml": { + "source": "iana", + "compressible": true + }, + "model/vnd.mts": { + "source": "iana", + "extensions": ["mts"] + }, + "model/vnd.opengex": { + "source": "iana", + "extensions": ["ogex"] + }, + "model/vnd.parasolid.transmit.binary": { + "source": "iana", + "extensions": ["x_b"] + }, + "model/vnd.parasolid.transmit.text": { + "source": "iana", + "extensions": ["x_t"] + }, + "model/vnd.pytha.pyox": { + "source": "iana" + }, + "model/vnd.rosette.annotated-data-model": { + "source": "iana" + }, + "model/vnd.sap.vds": { + "source": "iana", + "extensions": ["vds"] + }, + "model/vnd.usdz+zip": { + "source": "iana", + "compressible": false, + "extensions": ["usdz"] + }, + "model/vnd.valve.source.compiled-map": { + "source": "iana", + "extensions": ["bsp"] + }, + "model/vnd.vtu": { + "source": "iana", + "extensions": ["vtu"] + }, + "model/vrml": { + "source": "iana", + "compressible": false, + "extensions": ["wrl","vrml"] + }, + "model/x3d+binary": { + "source": "apache", + "compressible": false, + "extensions": ["x3db","x3dbz"] + }, + "model/x3d+fastinfoset": { + "source": "iana", + "extensions": ["x3db"] + }, + "model/x3d+vrml": { + "source": "apache", + "compressible": false, + "extensions": ["x3dv","x3dvz"] + }, + "model/x3d+xml": { + "source": "iana", + "compressible": true, + "extensions": ["x3d","x3dz"] + }, + "model/x3d-vrml": { + "source": "iana", + "extensions": ["x3dv"] + }, + "multipart/alternative": { + "source": "iana", + "compressible": false + }, + "multipart/appledouble": { + "source": "iana" + }, + "multipart/byteranges": { + "source": "iana" + }, + "multipart/digest": { + "source": "iana" + }, + "multipart/encrypted": { + "source": "iana", + "compressible": false + }, + "multipart/form-data": { + "source": "iana", + "compressible": false + }, + "multipart/header-set": { + "source": "iana" + }, + "multipart/mixed": { + "source": "iana" + }, + "multipart/multilingual": { + "source": "iana" + }, + "multipart/parallel": { + "source": "iana" + }, + "multipart/related": { + "source": "iana", + "compressible": false + }, + "multipart/report": { + "source": "iana" + }, + "multipart/signed": { + "source": "iana", + "compressible": false + }, + "multipart/vnd.bint.med-plus": { + "source": "iana" + }, + "multipart/voice-message": { + "source": "iana" + }, + "multipart/x-mixed-replace": { + "source": "iana" + }, + "text/1d-interleaved-parityfec": { + "source": "iana" + }, + "text/cache-manifest": { + "source": "iana", + "compressible": true, + "extensions": ["appcache","manifest"] + }, + "text/calendar": { + "source": "iana", + "extensions": ["ics","ifb"] + }, + "text/calender": { + "compressible": true + }, + "text/cmd": { + "compressible": true + }, + "text/coffeescript": { + "extensions": ["coffee","litcoffee"] + }, + "text/cql": { + "source": "iana" + }, + "text/cql-expression": { + "source": "iana" + }, + "text/cql-identifier": { + "source": "iana" + }, + "text/css": { + "source": "iana", + "charset": "UTF-8", + "compressible": true, + "extensions": ["css"] + }, + "text/csv": { + "source": "iana", + "compressible": true, + "extensions": ["csv"] + }, + "text/csv-schema": { + "source": "iana" + }, + "text/directory": { + "source": "iana" + }, + "text/dns": { + "source": "iana" + }, + "text/ecmascript": { + "source": "iana" + }, + "text/encaprtp": { + "source": "iana" + }, + "text/enriched": { + "source": "iana" + }, + "text/fhirpath": { + "source": "iana" + }, + "text/flexfec": { + "source": "iana" + }, + "text/fwdred": { + "source": "iana" + }, + "text/gff3": { + "source": "iana" + }, + "text/grammar-ref-list": { + "source": "iana" + }, + "text/html": { + "source": "iana", + "compressible": true, + "extensions": ["html","htm","shtml"] + }, + "text/jade": { + "extensions": ["jade"] + }, + "text/javascript": { + "source": "iana", + "compressible": true + }, + "text/jcr-cnd": { + "source": "iana" + }, + "text/jsx": { + "compressible": true, + "extensions": ["jsx"] + }, + "text/less": { + "compressible": true, + "extensions": ["less"] + }, + "text/markdown": { + "source": "iana", + "compressible": true, + "extensions": ["markdown","md"] + }, + "text/mathml": { + "source": "nginx", + "extensions": ["mml"] + }, + "text/mdx": { + "compressible": true, + "extensions": ["mdx"] + }, + "text/mizar": { + "source": "iana" + }, + "text/n3": { + "source": "iana", + "charset": "UTF-8", + "compressible": true, + "extensions": ["n3"] + }, + "text/parameters": { + "source": "iana", + "charset": "UTF-8" + }, + "text/parityfec": { + "source": "iana" + }, + "text/plain": { + "source": "iana", + "compressible": true, + "extensions": ["txt","text","conf","def","list","log","in","ini"] + }, + "text/provenance-notation": { + "source": "iana", + "charset": "UTF-8" + }, + "text/prs.fallenstein.rst": { + "source": "iana" + }, + "text/prs.lines.tag": { + "source": "iana", + "extensions": ["dsc"] + }, + "text/prs.prop.logic": { + "source": "iana" + }, + "text/raptorfec": { + "source": "iana" + }, + "text/red": { + "source": "iana" + }, + "text/rfc822-headers": { + "source": "iana" + }, + "text/richtext": { + "source": "iana", + "compressible": true, + "extensions": ["rtx"] + }, + "text/rtf": { + "source": "iana", + "compressible": true, + "extensions": ["rtf"] + }, + "text/rtp-enc-aescm128": { + "source": "iana" + }, + "text/rtploopback": { + "source": "iana" + }, + "text/rtx": { + "source": "iana" + }, + "text/sgml": { + "source": "iana", + "extensions": ["sgml","sgm"] + }, + "text/shaclc": { + "source": "iana" + }, + "text/shex": { + "source": "iana", + "extensions": ["shex"] + }, + "text/slim": { + "extensions": ["slim","slm"] + }, + "text/spdx": { + "source": "iana", + "extensions": ["spdx"] + }, + "text/strings": { + "source": "iana" + }, + "text/stylus": { + "extensions": ["stylus","styl"] + }, + "text/t140": { + "source": "iana" + }, + "text/tab-separated-values": { + "source": "iana", + "compressible": true, + "extensions": ["tsv"] + }, + "text/troff": { + "source": "iana", + "extensions": ["t","tr","roff","man","me","ms"] + }, + "text/turtle": { + "source": "iana", + "charset": "UTF-8", + "extensions": ["ttl"] + }, + "text/ulpfec": { + "source": "iana" + }, + "text/uri-list": { + "source": "iana", + "compressible": true, + "extensions": ["uri","uris","urls"] + }, + "text/vcard": { + "source": "iana", + "compressible": true, + "extensions": ["vcard"] + }, + "text/vnd.a": { + "source": "iana" + }, + "text/vnd.abc": { + "source": "iana" + }, + "text/vnd.ascii-art": { + "source": "iana" + }, + "text/vnd.curl": { + "source": "iana", + "extensions": ["curl"] + }, + "text/vnd.curl.dcurl": { + "source": "apache", + "extensions": ["dcurl"] + }, + "text/vnd.curl.mcurl": { + "source": "apache", + "extensions": ["mcurl"] + }, + "text/vnd.curl.scurl": { + "source": "apache", + "extensions": ["scurl"] + }, + "text/vnd.debian.copyright": { + "source": "iana", + "charset": "UTF-8" + }, + "text/vnd.dmclientscript": { + "source": "iana" + }, + "text/vnd.dvb.subtitle": { + "source": "iana", + "extensions": ["sub"] + }, + "text/vnd.esmertec.theme-descriptor": { + "source": "iana", + "charset": "UTF-8" + }, + "text/vnd.familysearch.gedcom": { + "source": "iana", + "extensions": ["ged"] + }, + "text/vnd.ficlab.flt": { + "source": "iana" + }, + "text/vnd.fly": { + "source": "iana", + "extensions": ["fly"] + }, + "text/vnd.fmi.flexstor": { + "source": "iana", + "extensions": ["flx"] + }, + "text/vnd.gml": { + "source": "iana" + }, + "text/vnd.graphviz": { + "source": "iana", + "extensions": ["gv"] + }, + "text/vnd.hans": { + "source": "iana" + }, + "text/vnd.hgl": { + "source": "iana" + }, + "text/vnd.in3d.3dml": { + "source": "iana", + "extensions": ["3dml"] + }, + "text/vnd.in3d.spot": { + "source": "iana", + "extensions": ["spot"] + }, + "text/vnd.iptc.newsml": { + "source": "iana" + }, + "text/vnd.iptc.nitf": { + "source": "iana" + }, + "text/vnd.latex-z": { + "source": "iana" + }, + "text/vnd.motorola.reflex": { + "source": "iana" + }, + "text/vnd.ms-mediapackage": { + "source": "iana" + }, + "text/vnd.net2phone.commcenter.command": { + "source": "iana" + }, + "text/vnd.radisys.msml-basic-layout": { + "source": "iana" + }, + "text/vnd.senx.warpscript": { + "source": "iana" + }, + "text/vnd.si.uricatalogue": { + "source": "iana" + }, + "text/vnd.sosi": { + "source": "iana" + }, + "text/vnd.sun.j2me.app-descriptor": { + "source": "iana", + "charset": "UTF-8", + "extensions": ["jad"] + }, + "text/vnd.trolltech.linguist": { + "source": "iana", + "charset": "UTF-8" + }, + "text/vnd.wap.si": { + "source": "iana" + }, + "text/vnd.wap.sl": { + "source": "iana" + }, + "text/vnd.wap.wml": { + "source": "iana", + "extensions": ["wml"] + }, + "text/vnd.wap.wmlscript": { + "source": "iana", + "extensions": ["wmls"] + }, + "text/vtt": { + "source": "iana", + "charset": "UTF-8", + "compressible": true, + "extensions": ["vtt"] + }, + "text/x-asm": { + "source": "apache", + "extensions": ["s","asm"] + }, + "text/x-c": { + "source": "apache", + "extensions": ["c","cc","cxx","cpp","h","hh","dic"] + }, + "text/x-component": { + "source": "nginx", + "extensions": ["htc"] + }, + "text/x-fortran": { + "source": "apache", + "extensions": ["f","for","f77","f90"] + }, + "text/x-gwt-rpc": { + "compressible": true + }, + "text/x-handlebars-template": { + "extensions": ["hbs"] + }, + "text/x-java-source": { + "source": "apache", + "extensions": ["java"] + }, + "text/x-jquery-tmpl": { + "compressible": true + }, + "text/x-lua": { + "extensions": ["lua"] + }, + "text/x-markdown": { + "compressible": true, + "extensions": ["mkd"] + }, + "text/x-nfo": { + "source": "apache", + "extensions": ["nfo"] + }, + "text/x-opml": { + "source": "apache", + "extensions": ["opml"] + }, + "text/x-org": { + "compressible": true, + "extensions": ["org"] + }, + "text/x-pascal": { + "source": "apache", + "extensions": ["p","pas"] + }, + "text/x-processing": { + "compressible": true, + "extensions": ["pde"] + }, + "text/x-sass": { + "extensions": ["sass"] + }, + "text/x-scss": { + "extensions": ["scss"] + }, + "text/x-setext": { + "source": "apache", + "extensions": ["etx"] + }, + "text/x-sfv": { + "source": "apache", + "extensions": ["sfv"] + }, + "text/x-suse-ymp": { + "compressible": true, + "extensions": ["ymp"] + }, + "text/x-uuencode": { + "source": "apache", + "extensions": ["uu"] + }, + "text/x-vcalendar": { + "source": "apache", + "extensions": ["vcs"] + }, + "text/x-vcard": { + "source": "apache", + "extensions": ["vcf"] + }, + "text/xml": { + "source": "iana", + "compressible": true, + "extensions": ["xml"] + }, + "text/xml-external-parsed-entity": { + "source": "iana" + }, + "text/yaml": { + "compressible": true, + "extensions": ["yaml","yml"] + }, + "video/1d-interleaved-parityfec": { + "source": "iana" + }, + "video/3gpp": { + "source": "iana", + "extensions": ["3gp","3gpp"] + }, + "video/3gpp-tt": { + "source": "iana" + }, + "video/3gpp2": { + "source": "iana", + "extensions": ["3g2"] + }, + "video/av1": { + "source": "iana" + }, + "video/bmpeg": { + "source": "iana" + }, + "video/bt656": { + "source": "iana" + }, + "video/celb": { + "source": "iana" + }, + "video/dv": { + "source": "iana" + }, + "video/encaprtp": { + "source": "iana" + }, + "video/ffv1": { + "source": "iana" + }, + "video/flexfec": { + "source": "iana" + }, + "video/h261": { + "source": "iana", + "extensions": ["h261"] + }, + "video/h263": { + "source": "iana", + "extensions": ["h263"] + }, + "video/h263-1998": { + "source": "iana" + }, + "video/h263-2000": { + "source": "iana" + }, + "video/h264": { + "source": "iana", + "extensions": ["h264"] + }, + "video/h264-rcdo": { + "source": "iana" + }, + "video/h264-svc": { + "source": "iana" + }, + "video/h265": { + "source": "iana" + }, + "video/iso.segment": { + "source": "iana", + "extensions": ["m4s"] + }, + "video/jpeg": { + "source": "iana", + "extensions": ["jpgv"] + }, + "video/jpeg2000": { + "source": "iana" + }, + "video/jpm": { + "source": "apache", + "extensions": ["jpm","jpgm"] + }, + "video/jxsv": { + "source": "iana" + }, + "video/mj2": { + "source": "iana", + "extensions": ["mj2","mjp2"] + }, + "video/mp1s": { + "source": "iana" + }, + "video/mp2p": { + "source": "iana" + }, + "video/mp2t": { + "source": "iana", + "extensions": ["ts"] + }, + "video/mp4": { + "source": "iana", + "compressible": false, + "extensions": ["mp4","mp4v","mpg4"] + }, + "video/mp4v-es": { + "source": "iana" + }, + "video/mpeg": { + "source": "iana", + "compressible": false, + "extensions": ["mpeg","mpg","mpe","m1v","m2v"] + }, + "video/mpeg4-generic": { + "source": "iana" + }, + "video/mpv": { + "source": "iana" + }, + "video/nv": { + "source": "iana" + }, + "video/ogg": { + "source": "iana", + "compressible": false, + "extensions": ["ogv"] + }, + "video/parityfec": { + "source": "iana" + }, + "video/pointer": { + "source": "iana" + }, + "video/quicktime": { + "source": "iana", + "compressible": false, + "extensions": ["qt","mov"] + }, + "video/raptorfec": { + "source": "iana" + }, + "video/raw": { + "source": "iana" + }, + "video/rtp-enc-aescm128": { + "source": "iana" + }, + "video/rtploopback": { + "source": "iana" + }, + "video/rtx": { + "source": "iana" + }, + "video/scip": { + "source": "iana" + }, + "video/smpte291": { + "source": "iana" + }, + "video/smpte292m": { + "source": "iana" + }, + "video/ulpfec": { + "source": "iana" + }, + "video/vc1": { + "source": "iana" + }, + "video/vc2": { + "source": "iana" + }, + "video/vnd.cctv": { + "source": "iana" + }, + "video/vnd.dece.hd": { + "source": "iana", + "extensions": ["uvh","uvvh"] + }, + "video/vnd.dece.mobile": { + "source": "iana", + "extensions": ["uvm","uvvm"] + }, + "video/vnd.dece.mp4": { + "source": "iana" + }, + "video/vnd.dece.pd": { + "source": "iana", + "extensions": ["uvp","uvvp"] + }, + "video/vnd.dece.sd": { + "source": "iana", + "extensions": ["uvs","uvvs"] + }, + "video/vnd.dece.video": { + "source": "iana", + "extensions": ["uvv","uvvv"] + }, + "video/vnd.directv.mpeg": { + "source": "iana" + }, + "video/vnd.directv.mpeg-tts": { + "source": "iana" + }, + "video/vnd.dlna.mpeg-tts": { + "source": "iana" + }, + "video/vnd.dvb.file": { + "source": "iana", + "extensions": ["dvb"] + }, + "video/vnd.fvt": { + "source": "iana", + "extensions": ["fvt"] + }, + "video/vnd.hns.video": { + "source": "iana" + }, + "video/vnd.iptvforum.1dparityfec-1010": { + "source": "iana" + }, + "video/vnd.iptvforum.1dparityfec-2005": { + "source": "iana" + }, + "video/vnd.iptvforum.2dparityfec-1010": { + "source": "iana" + }, + "video/vnd.iptvforum.2dparityfec-2005": { + "source": "iana" + }, + "video/vnd.iptvforum.ttsavc": { + "source": "iana" + }, + "video/vnd.iptvforum.ttsmpeg2": { + "source": "iana" + }, + "video/vnd.motorola.video": { + "source": "iana" + }, + "video/vnd.motorola.videop": { + "source": "iana" + }, + "video/vnd.mpegurl": { + "source": "iana", + "extensions": ["mxu","m4u"] + }, + "video/vnd.ms-playready.media.pyv": { + "source": "iana", + "extensions": ["pyv"] + }, + "video/vnd.nokia.interleaved-multimedia": { + "source": "iana" + }, + "video/vnd.nokia.mp4vr": { + "source": "iana" + }, + "video/vnd.nokia.videovoip": { + "source": "iana" + }, + "video/vnd.objectvideo": { + "source": "iana" + }, + "video/vnd.radgamettools.bink": { + "source": "iana" + }, + "video/vnd.radgamettools.smacker": { + "source": "iana" + }, + "video/vnd.sealed.mpeg1": { + "source": "iana" + }, + "video/vnd.sealed.mpeg4": { + "source": "iana" + }, + "video/vnd.sealed.swf": { + "source": "iana" + }, + "video/vnd.sealedmedia.softseal.mov": { + "source": "iana" + }, + "video/vnd.uvvu.mp4": { + "source": "iana", + "extensions": ["uvu","uvvu"] + }, + "video/vnd.vivo": { + "source": "iana", + "extensions": ["viv"] + }, + "video/vnd.youtube.yt": { + "source": "iana" + }, + "video/vp8": { + "source": "iana" + }, + "video/vp9": { + "source": "iana" + }, + "video/webm": { + "source": "apache", + "compressible": false, + "extensions": ["webm"] + }, + "video/x-f4v": { + "source": "apache", + "extensions": ["f4v"] + }, + "video/x-fli": { + "source": "apache", + "extensions": ["fli"] + }, + "video/x-flv": { + "source": "apache", + "compressible": false, + "extensions": ["flv"] + }, + "video/x-m4v": { + "source": "apache", + "extensions": ["m4v"] + }, + "video/x-matroska": { + "source": "apache", + "compressible": false, + "extensions": ["mkv","mk3d","mks"] + }, + "video/x-mng": { + "source": "apache", + "extensions": ["mng"] + }, + "video/x-ms-asf": { + "source": "apache", + "extensions": ["asf","asx"] + }, + "video/x-ms-vob": { + "source": "apache", + "extensions": ["vob"] + }, + "video/x-ms-wm": { + "source": "apache", + "extensions": ["wm"] + }, + "video/x-ms-wmv": { + "source": "apache", + "compressible": false, + "extensions": ["wmv"] + }, + "video/x-ms-wmx": { + "source": "apache", + "extensions": ["wmx"] + }, + "video/x-ms-wvx": { + "source": "apache", + "extensions": ["wvx"] + }, + "video/x-msvideo": { + "source": "apache", + "extensions": ["avi"] + }, + "video/x-sgi-movie": { + "source": "apache", + "extensions": ["movie"] + }, + "video/x-smv": { + "source": "apache", + "extensions": ["smv"] + }, + "x-conference/x-cooltalk": { + "source": "apache", + "extensions": ["ice"] + }, + "x-shader/x-fragment": { + "compressible": true + }, + "x-shader/x-vertex": { + "compressible": true + } +} diff --git a/node_modules/mime-db/index.js b/node_modules/mime-db/index.js new file mode 100644 index 0000000..ec2be30 --- /dev/null +++ b/node_modules/mime-db/index.js @@ -0,0 +1,12 @@ +/*! + * mime-db + * Copyright(c) 2014 Jonathan Ong + * Copyright(c) 2015-2022 Douglas Christopher Wilson + * MIT Licensed + */ + +/** + * Module exports. + */ + +module.exports = require('./db.json') diff --git a/node_modules/mime-db/package.json b/node_modules/mime-db/package.json new file mode 100644 index 0000000..32c14b8 --- /dev/null +++ b/node_modules/mime-db/package.json @@ -0,0 +1,60 @@ +{ + "name": "mime-db", + "description": "Media Type Database", + "version": "1.52.0", + "contributors": [ + "Douglas Christopher Wilson ", + "Jonathan Ong (http://jongleberry.com)", + "Robert Kieffer (http://github.com/broofa)" + ], + "license": "MIT", + "keywords": [ + "mime", + "db", + "type", + "types", + "database", + "charset", + "charsets" + ], + "repository": "jshttp/mime-db", + "devDependencies": { + "bluebird": "3.7.2", + "co": "4.6.0", + "cogent": "1.0.1", + "csv-parse": "4.16.3", + "eslint": "7.32.0", + "eslint-config-standard": "15.0.1", + "eslint-plugin-import": "2.25.4", + "eslint-plugin-markdown": "2.2.1", + "eslint-plugin-node": "11.1.0", + "eslint-plugin-promise": "5.1.1", + "eslint-plugin-standard": "4.1.0", + "gnode": "0.1.2", + "media-typer": "1.1.0", + "mocha": "9.2.1", + "nyc": "15.1.0", + "raw-body": "2.5.0", + "stream-to-array": "2.3.0" + }, + "files": [ + "HISTORY.md", + "LICENSE", + "README.md", + "db.json", + "index.js" + ], + "engines": { + "node": ">= 0.6" + }, + "scripts": { + "build": "node scripts/build", + "fetch": "node scripts/fetch-apache && gnode scripts/fetch-iana && node scripts/fetch-nginx", + "lint": "eslint .", + "test": "mocha --reporter spec --bail --check-leaks test/", + "test-ci": "nyc --reporter=lcov --reporter=text npm test", + "test-cov": "nyc --reporter=html --reporter=text npm test", + "update": "npm run fetch && npm run build", + "version": "node scripts/version-history.js && git add HISTORY.md" + } +} diff --git a/node_modules/mime-types/HISTORY.md b/node_modules/mime-types/HISTORY.md new file mode 100644 index 0000000..c5043b7 --- /dev/null +++ b/node_modules/mime-types/HISTORY.md @@ -0,0 +1,397 @@ +2.1.35 / 2022-03-12 +=================== + + * deps: mime-db@1.52.0 + - Add extensions from IANA for more `image/*` types + - Add extension `.asc` to `application/pgp-keys` + - Add extensions to various XML types + - Add new upstream MIME types + +2.1.34 / 2021-11-08 +=================== + + * deps: mime-db@1.51.0 + - Add new upstream MIME types + +2.1.33 / 2021-10-01 +=================== + + * deps: mime-db@1.50.0 + - Add deprecated iWorks mime types and extensions + - Add new upstream MIME types + +2.1.32 / 2021-07-27 +=================== + + * deps: mime-db@1.49.0 + - Add extension `.trig` to `application/trig` + - Add new upstream MIME types + +2.1.31 / 2021-06-01 +=================== + + * deps: mime-db@1.48.0 + - Add extension `.mvt` to `application/vnd.mapbox-vector-tile` + - Add new upstream MIME types + +2.1.30 / 2021-04-02 +=================== + + * deps: mime-db@1.47.0 + - Add extension `.amr` to `audio/amr` + - Remove ambigious extensions from IANA for `application/*+xml` types + - Update primary extension to `.es` for `application/ecmascript` + +2.1.29 / 2021-02-17 +=================== + + * deps: mime-db@1.46.0 + - Add extension `.amr` to `audio/amr` + - Add extension `.m4s` to `video/iso.segment` + - Add extension `.opus` to `audio/ogg` + - Add new upstream MIME types + +2.1.28 / 2021-01-01 +=================== + + * deps: mime-db@1.45.0 + - Add `application/ubjson` with extension `.ubj` + - Add `image/avif` with extension `.avif` + - Add `image/ktx2` with extension `.ktx2` + - Add extension `.dbf` to `application/vnd.dbf` + - Add extension `.rar` to `application/vnd.rar` + - Add extension `.td` to `application/urc-targetdesc+xml` + - Add new upstream MIME types + - Fix extension of `application/vnd.apple.keynote` to be `.key` + +2.1.27 / 2020-04-23 +=================== + + * deps: mime-db@1.44.0 + - Add charsets from IANA + - Add extension `.cjs` to `application/node` + - Add new upstream MIME types + +2.1.26 / 2020-01-05 +=================== + + * deps: mime-db@1.43.0 + - Add `application/x-keepass2` with extension `.kdbx` + - Add extension `.mxmf` to `audio/mobile-xmf` + - Add extensions from IANA for `application/*+xml` types + - Add new upstream MIME types + +2.1.25 / 2019-11-12 +=================== + + * deps: mime-db@1.42.0 + - Add new upstream MIME types + - Add `application/toml` with extension `.toml` + - Add `image/vnd.ms-dds` with extension `.dds` + +2.1.24 / 2019-04-20 +=================== + + * deps: mime-db@1.40.0 + - Add extensions from IANA for `model/*` types + - Add `text/mdx` with extension `.mdx` + +2.1.23 / 2019-04-17 +=================== + + * deps: mime-db@~1.39.0 + - Add extensions `.siv` and `.sieve` to `application/sieve` + - Add new upstream MIME types + +2.1.22 / 2019-02-14 +=================== + + * deps: mime-db@~1.38.0 + - Add extension `.nq` to `application/n-quads` + - Add extension `.nt` to `application/n-triples` + - Add new upstream MIME types + +2.1.21 / 2018-10-19 +=================== + + * deps: mime-db@~1.37.0 + - Add extensions to HEIC image types + - Add new upstream MIME types + +2.1.20 / 2018-08-26 +=================== + + * deps: mime-db@~1.36.0 + - Add Apple file extensions from IANA + - Add extensions from IANA for `image/*` types + - Add new upstream MIME types + +2.1.19 / 2018-07-17 +=================== + + * deps: mime-db@~1.35.0 + - Add extension `.csl` to `application/vnd.citationstyles.style+xml` + - Add extension `.es` to `application/ecmascript` + - Add extension `.owl` to `application/rdf+xml` + - Add new upstream MIME types + - Add UTF-8 as default charset for `text/turtle` + +2.1.18 / 2018-02-16 +=================== + + * deps: mime-db@~1.33.0 + - Add `application/raml+yaml` with extension `.raml` + - Add `application/wasm` with extension `.wasm` + - Add `text/shex` with extension `.shex` + - Add extensions for JPEG-2000 images + - Add extensions from IANA for `message/*` types + - Add new upstream MIME types + - Update font MIME types + - Update `text/hjson` to registered `application/hjson` + +2.1.17 / 2017-09-01 +=================== + + * deps: mime-db@~1.30.0 + - Add `application/vnd.ms-outlook` + - Add `application/x-arj` + - Add extension `.mjs` to `application/javascript` + - Add glTF types and extensions + - Add new upstream MIME types + - Add `text/x-org` + - Add VirtualBox MIME types + - Fix `source` records for `video/*` types that are IANA + - Update `font/opentype` to registered `font/otf` + +2.1.16 / 2017-07-24 +=================== + + * deps: mime-db@~1.29.0 + - Add `application/fido.trusted-apps+json` + - Add extension `.wadl` to `application/vnd.sun.wadl+xml` + - Add extension `.gz` to `application/gzip` + - Add new upstream MIME types + - Update extensions `.md` and `.markdown` to be `text/markdown` + +2.1.15 / 2017-03-23 +=================== + + * deps: mime-db@~1.27.0 + - Add new mime types + - Add `image/apng` + +2.1.14 / 2017-01-14 +=================== + + * deps: mime-db@~1.26.0 + - Add new mime types + +2.1.13 / 2016-11-18 +=================== + + * deps: mime-db@~1.25.0 + - Add new mime types + +2.1.12 / 2016-09-18 +=================== + + * deps: mime-db@~1.24.0 + - Add new mime types + - Add `audio/mp3` + +2.1.11 / 2016-05-01 +=================== + + * deps: mime-db@~1.23.0 + - Add new mime types + +2.1.10 / 2016-02-15 +=================== + + * deps: mime-db@~1.22.0 + - Add new mime types + - Fix extension of `application/dash+xml` + - Update primary extension for `audio/mp4` + +2.1.9 / 2016-01-06 +================== + + * deps: mime-db@~1.21.0 + - Add new mime types + +2.1.8 / 2015-11-30 +================== + + * deps: mime-db@~1.20.0 + - Add new mime types + +2.1.7 / 2015-09-20 +================== + + * deps: mime-db@~1.19.0 + - Add new mime types + +2.1.6 / 2015-09-03 +================== + + * deps: mime-db@~1.18.0 + - Add new mime types + +2.1.5 / 2015-08-20 +================== + + * deps: mime-db@~1.17.0 + - Add new mime types + +2.1.4 / 2015-07-30 +================== + + * deps: mime-db@~1.16.0 + - Add new mime types + +2.1.3 / 2015-07-13 +================== + + * deps: mime-db@~1.15.0 + - Add new mime types + +2.1.2 / 2015-06-25 +================== + + * deps: mime-db@~1.14.0 + - Add new mime types + +2.1.1 / 2015-06-08 +================== + + * perf: fix deopt during mapping + +2.1.0 / 2015-06-07 +================== + + * Fix incorrectly treating extension-less file name as extension + - i.e. `'path/to/json'` will no longer return `application/json` + * Fix `.charset(type)` to accept parameters + * Fix `.charset(type)` to match case-insensitive + * Improve generation of extension to MIME mapping + * Refactor internals for readability and no argument reassignment + * Prefer `application/*` MIME types from the same source + * Prefer any type over `application/octet-stream` + * deps: mime-db@~1.13.0 + - Add nginx as a source + - Add new mime types + +2.0.14 / 2015-06-06 +=================== + + * deps: mime-db@~1.12.0 + - Add new mime types + +2.0.13 / 2015-05-31 +=================== + + * deps: mime-db@~1.11.0 + - Add new mime types + +2.0.12 / 2015-05-19 +=================== + + * deps: mime-db@~1.10.0 + - Add new mime types + +2.0.11 / 2015-05-05 +=================== + + * deps: mime-db@~1.9.1 + - Add new mime types + +2.0.10 / 2015-03-13 +=================== + + * deps: mime-db@~1.8.0 + - Add new mime types + +2.0.9 / 2015-02-09 +================== + + * deps: mime-db@~1.7.0 + - Add new mime types + - Community extensions ownership transferred from `node-mime` + +2.0.8 / 2015-01-29 +================== + + * deps: mime-db@~1.6.0 + - Add new mime types + +2.0.7 / 2014-12-30 +================== + + * deps: mime-db@~1.5.0 + - Add new mime types + - Fix various invalid MIME type entries + +2.0.6 / 2014-12-30 +================== + + * deps: mime-db@~1.4.0 + - Add new mime types + - Fix various invalid MIME type entries + - Remove example template MIME types + +2.0.5 / 2014-12-29 +================== + + * deps: mime-db@~1.3.1 + - Fix missing extensions + +2.0.4 / 2014-12-10 +================== + + * deps: mime-db@~1.3.0 + - Add new mime types + +2.0.3 / 2014-11-09 +================== + + * deps: mime-db@~1.2.0 + - Add new mime types + +2.0.2 / 2014-09-28 +================== + + * deps: mime-db@~1.1.0 + - Add new mime types + - Update charsets + +2.0.1 / 2014-09-07 +================== + + * Support Node.js 0.6 + +2.0.0 / 2014-09-02 +================== + + * Use `mime-db` + * Remove `.define()` + +1.0.2 / 2014-08-04 +================== + + * Set charset=utf-8 for `text/javascript` + +1.0.1 / 2014-06-24 +================== + + * Add `text/jsx` type + +1.0.0 / 2014-05-12 +================== + + * Return `false` for unknown types + * Set charset=utf-8 for `application/json` + +0.1.0 / 2014-05-02 +================== + + * Initial release diff --git a/node_modules/mime-types/LICENSE b/node_modules/mime-types/LICENSE new file mode 100644 index 0000000..0616607 --- /dev/null +++ b/node_modules/mime-types/LICENSE @@ -0,0 +1,23 @@ +(The MIT License) + +Copyright (c) 2014 Jonathan Ong +Copyright (c) 2015 Douglas Christopher Wilson + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +'Software'), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/mime-types/README.md b/node_modules/mime-types/README.md new file mode 100644 index 0000000..48d2fb4 --- /dev/null +++ b/node_modules/mime-types/README.md @@ -0,0 +1,113 @@ +# mime-types + +[![NPM Version][npm-version-image]][npm-url] +[![NPM Downloads][npm-downloads-image]][npm-url] +[![Node.js Version][node-version-image]][node-version-url] +[![Build Status][ci-image]][ci-url] +[![Test Coverage][coveralls-image]][coveralls-url] + +The ultimate javascript content-type utility. + +Similar to [the `mime@1.x` module](https://www.npmjs.com/package/mime), except: + +- __No fallbacks.__ Instead of naively returning the first available type, + `mime-types` simply returns `false`, so do + `var type = mime.lookup('unrecognized') || 'application/octet-stream'`. +- No `new Mime()` business, so you could do `var lookup = require('mime-types').lookup`. +- No `.define()` functionality +- Bug fixes for `.lookup(path)` + +Otherwise, the API is compatible with `mime` 1.x. + +## Install + +This is a [Node.js](https://nodejs.org/en/) module available through the +[npm registry](https://www.npmjs.com/). Installation is done using the +[`npm install` command](https://docs.npmjs.com/getting-started/installing-npm-packages-locally): + +```sh +$ npm install mime-types +``` + +## Adding Types + +All mime types are based on [mime-db](https://www.npmjs.com/package/mime-db), +so open a PR there if you'd like to add mime types. + +## API + +```js +var mime = require('mime-types') +``` + +All functions return `false` if input is invalid or not found. + +### mime.lookup(path) + +Lookup the content-type associated with a file. + +```js +mime.lookup('json') // 'application/json' +mime.lookup('.md') // 'text/markdown' +mime.lookup('file.html') // 'text/html' +mime.lookup('folder/file.js') // 'application/javascript' +mime.lookup('folder/.htaccess') // false + +mime.lookup('cats') // false +``` + +### mime.contentType(type) + +Create a full content-type header given a content-type or extension. +When given an extension, `mime.lookup` is used to get the matching +content-type, otherwise the given content-type is used. Then if the +content-type does not already have a `charset` parameter, `mime.charset` +is used to get the default charset and add to the returned content-type. + +```js +mime.contentType('markdown') // 'text/x-markdown; charset=utf-8' +mime.contentType('file.json') // 'application/json; charset=utf-8' +mime.contentType('text/html') // 'text/html; charset=utf-8' +mime.contentType('text/html; charset=iso-8859-1') // 'text/html; charset=iso-8859-1' + +// from a full path +mime.contentType(path.extname('/path/to/file.json')) // 'application/json; charset=utf-8' +``` + +### mime.extension(type) + +Get the default extension for a content-type. + +```js +mime.extension('application/octet-stream') // 'bin' +``` + +### mime.charset(type) + +Lookup the implied default charset of a content-type. + +```js +mime.charset('text/markdown') // 'UTF-8' +``` + +### var type = mime.types[extension] + +A map of content-types by extension. + +### [extensions...] = mime.extensions[type] + +A map of extensions by content-type. + +## License + +[MIT](LICENSE) + +[ci-image]: https://badgen.net/github/checks/jshttp/mime-types/master?label=ci +[ci-url]: https://github.com/jshttp/mime-types/actions/workflows/ci.yml +[coveralls-image]: https://badgen.net/coveralls/c/github/jshttp/mime-types/master +[coveralls-url]: https://coveralls.io/r/jshttp/mime-types?branch=master +[node-version-image]: https://badgen.net/npm/node/mime-types +[node-version-url]: https://nodejs.org/en/download +[npm-downloads-image]: https://badgen.net/npm/dm/mime-types +[npm-url]: https://npmjs.org/package/mime-types +[npm-version-image]: https://badgen.net/npm/v/mime-types diff --git a/node_modules/mime-types/index.js b/node_modules/mime-types/index.js new file mode 100644 index 0000000..b9f34d5 --- /dev/null +++ b/node_modules/mime-types/index.js @@ -0,0 +1,188 @@ +/*! + * mime-types + * Copyright(c) 2014 Jonathan Ong + * Copyright(c) 2015 Douglas Christopher Wilson + * MIT Licensed + */ + +'use strict' + +/** + * Module dependencies. + * @private + */ + +var db = require('mime-db') +var extname = require('path').extname + +/** + * Module variables. + * @private + */ + +var EXTRACT_TYPE_REGEXP = /^\s*([^;\s]*)(?:;|\s|$)/ +var TEXT_TYPE_REGEXP = /^text\//i + +/** + * Module exports. + * @public + */ + +exports.charset = charset +exports.charsets = { lookup: charset } +exports.contentType = contentType +exports.extension = extension +exports.extensions = Object.create(null) +exports.lookup = lookup +exports.types = Object.create(null) + +// Populate the extensions/types maps +populateMaps(exports.extensions, exports.types) + +/** + * Get the default charset for a MIME type. + * + * @param {string} type + * @return {boolean|string} + */ + +function charset (type) { + if (!type || typeof type !== 'string') { + return false + } + + // TODO: use media-typer + var match = EXTRACT_TYPE_REGEXP.exec(type) + var mime = match && db[match[1].toLowerCase()] + + if (mime && mime.charset) { + return mime.charset + } + + // default text/* to utf-8 + if (match && TEXT_TYPE_REGEXP.test(match[1])) { + return 'UTF-8' + } + + return false +} + +/** + * Create a full Content-Type header given a MIME type or extension. + * + * @param {string} str + * @return {boolean|string} + */ + +function contentType (str) { + // TODO: should this even be in this module? + if (!str || typeof str !== 'string') { + return false + } + + var mime = str.indexOf('/') === -1 + ? exports.lookup(str) + : str + + if (!mime) { + return false + } + + // TODO: use content-type or other module + if (mime.indexOf('charset') === -1) { + var charset = exports.charset(mime) + if (charset) mime += '; charset=' + charset.toLowerCase() + } + + return mime +} + +/** + * Get the default extension for a MIME type. + * + * @param {string} type + * @return {boolean|string} + */ + +function extension (type) { + if (!type || typeof type !== 'string') { + return false + } + + // TODO: use media-typer + var match = EXTRACT_TYPE_REGEXP.exec(type) + + // get extensions + var exts = match && exports.extensions[match[1].toLowerCase()] + + if (!exts || !exts.length) { + return false + } + + return exts[0] +} + +/** + * Lookup the MIME type for a file path/extension. + * + * @param {string} path + * @return {boolean|string} + */ + +function lookup (path) { + if (!path || typeof path !== 'string') { + return false + } + + // get the extension ("ext" or ".ext" or full path) + var extension = extname('x.' + path) + .toLowerCase() + .substr(1) + + if (!extension) { + return false + } + + return exports.types[extension] || false +} + +/** + * Populate the extensions and types maps. + * @private + */ + +function populateMaps (extensions, types) { + // source preference (least -> most) + var preference = ['nginx', 'apache', undefined, 'iana'] + + Object.keys(db).forEach(function forEachMimeType (type) { + var mime = db[type] + var exts = mime.extensions + + if (!exts || !exts.length) { + return + } + + // mime -> extensions + extensions[type] = exts + + // extension -> mime + for (var i = 0; i < exts.length; i++) { + var extension = exts[i] + + if (types[extension]) { + var from = preference.indexOf(db[types[extension]].source) + var to = preference.indexOf(mime.source) + + if (types[extension] !== 'application/octet-stream' && + (from > to || (from === to && types[extension].substr(0, 12) === 'application/'))) { + // skip the remapping + continue + } + } + + // set the extension -> mime + types[extension] = type + } + }) +} diff --git a/node_modules/mime-types/package.json b/node_modules/mime-types/package.json new file mode 100644 index 0000000..bbef696 --- /dev/null +++ b/node_modules/mime-types/package.json @@ -0,0 +1,44 @@ +{ + "name": "mime-types", + "description": "The ultimate javascript content-type utility.", + "version": "2.1.35", + "contributors": [ + "Douglas Christopher Wilson ", + "Jeremiah Senkpiel (https://searchbeam.jit.su)", + "Jonathan Ong (http://jongleberry.com)" + ], + "license": "MIT", + "keywords": [ + "mime", + "types" + ], + "repository": "jshttp/mime-types", + "dependencies": { + "mime-db": "1.52.0" + }, + "devDependencies": { + "eslint": "7.32.0", + "eslint-config-standard": "14.1.1", + "eslint-plugin-import": "2.25.4", + "eslint-plugin-markdown": "2.2.1", + "eslint-plugin-node": "11.1.0", + "eslint-plugin-promise": "5.2.0", + "eslint-plugin-standard": "4.1.0", + "mocha": "9.2.2", + "nyc": "15.1.0" + }, + "files": [ + "HISTORY.md", + "LICENSE", + "index.js" + ], + "engines": { + "node": ">= 0.6" + }, + "scripts": { + "lint": "eslint .", + "test": "mocha --reporter spec test/test.js", + "test-ci": "nyc --reporter=lcov --reporter=text npm test", + "test-cov": "nyc --reporter=html --reporter=text npm test" + } +} diff --git a/node_modules/ms/index.js b/node_modules/ms/index.js new file mode 100644 index 0000000..ea734fb --- /dev/null +++ b/node_modules/ms/index.js @@ -0,0 +1,162 @@ +/** + * Helpers. + */ + +var s = 1000; +var m = s * 60; +var h = m * 60; +var d = h * 24; +var w = d * 7; +var y = d * 365.25; + +/** + * Parse or format the given `val`. + * + * Options: + * + * - `long` verbose formatting [false] + * + * @param {String|Number} val + * @param {Object} [options] + * @throws {Error} throw an error if val is not a non-empty string or a number + * @return {String|Number} + * @api public + */ + +module.exports = function (val, options) { + options = options || {}; + var type = typeof val; + if (type === 'string' && val.length > 0) { + return parse(val); + } else if (type === 'number' && isFinite(val)) { + return options.long ? fmtLong(val) : fmtShort(val); + } + throw new Error( + 'val is not a non-empty string or a valid number. val=' + + JSON.stringify(val) + ); +}; + +/** + * Parse the given `str` and return milliseconds. + * + * @param {String} str + * @return {Number} + * @api private + */ + +function parse(str) { + str = String(str); + if (str.length > 100) { + return; + } + var match = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec( + str + ); + if (!match) { + return; + } + var n = parseFloat(match[1]); + var type = (match[2] || 'ms').toLowerCase(); + switch (type) { + case 'years': + case 'year': + case 'yrs': + case 'yr': + case 'y': + return n * y; + case 'weeks': + case 'week': + case 'w': + return n * w; + case 'days': + case 'day': + case 'd': + return n * d; + case 'hours': + case 'hour': + case 'hrs': + case 'hr': + case 'h': + return n * h; + case 'minutes': + case 'minute': + case 'mins': + case 'min': + case 'm': + return n * m; + case 'seconds': + case 'second': + case 'secs': + case 'sec': + case 's': + return n * s; + case 'milliseconds': + case 'millisecond': + case 'msecs': + case 'msec': + case 'ms': + return n; + default: + return undefined; + } +} + +/** + * Short format for `ms`. + * + * @param {Number} ms + * @return {String} + * @api private + */ + +function fmtShort(ms) { + var msAbs = Math.abs(ms); + if (msAbs >= d) { + return Math.round(ms / d) + 'd'; + } + if (msAbs >= h) { + return Math.round(ms / h) + 'h'; + } + if (msAbs >= m) { + return Math.round(ms / m) + 'm'; + } + if (msAbs >= s) { + return Math.round(ms / s) + 's'; + } + return ms + 'ms'; +} + +/** + * Long format for `ms`. + * + * @param {Number} ms + * @return {String} + * @api private + */ + +function fmtLong(ms) { + var msAbs = Math.abs(ms); + if (msAbs >= d) { + return plural(ms, msAbs, d, 'day'); + } + if (msAbs >= h) { + return plural(ms, msAbs, h, 'hour'); + } + if (msAbs >= m) { + return plural(ms, msAbs, m, 'minute'); + } + if (msAbs >= s) { + return plural(ms, msAbs, s, 'second'); + } + return ms + ' ms'; +} + +/** + * Pluralization helper. + */ + +function plural(ms, msAbs, n, name) { + var isPlural = msAbs >= n * 1.5; + return Math.round(ms / n) + ' ' + name + (isPlural ? 's' : ''); +} diff --git a/node_modules/ms/license.md b/node_modules/ms/license.md new file mode 100644 index 0000000..fa5d39b --- /dev/null +++ b/node_modules/ms/license.md @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2020 Vercel, Inc. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/ms/package.json b/node_modules/ms/package.json new file mode 100644 index 0000000..4997189 --- /dev/null +++ b/node_modules/ms/package.json @@ -0,0 +1,38 @@ +{ + "name": "ms", + "version": "2.1.3", + "description": "Tiny millisecond conversion utility", + "repository": "vercel/ms", + "main": "./index", + "files": [ + "index.js" + ], + "scripts": { + "precommit": "lint-staged", + "lint": "eslint lib/* bin/*", + "test": "mocha tests.js" + }, + "eslintConfig": { + "extends": "eslint:recommended", + "env": { + "node": true, + "es6": true + } + }, + "lint-staged": { + "*.js": [ + "npm run lint", + "prettier --single-quote --write", + "git add" + ] + }, + "license": "MIT", + "devDependencies": { + "eslint": "4.18.2", + "expect.js": "0.3.1", + "husky": "0.14.3", + "lint-staged": "5.0.0", + "mocha": "4.0.1", + "prettier": "2.0.5" + } +} diff --git a/node_modules/ms/readme.md b/node_modules/ms/readme.md new file mode 100644 index 0000000..0fc1abb --- /dev/null +++ b/node_modules/ms/readme.md @@ -0,0 +1,59 @@ +# ms + +![CI](https://github.com/vercel/ms/workflows/CI/badge.svg) + +Use this package to easily convert various time formats to milliseconds. + +## Examples + +```js +ms('2 days') // 172800000 +ms('1d') // 86400000 +ms('10h') // 36000000 +ms('2.5 hrs') // 9000000 +ms('2h') // 7200000 +ms('1m') // 60000 +ms('5s') // 5000 +ms('1y') // 31557600000 +ms('100') // 100 +ms('-3 days') // -259200000 +ms('-1h') // -3600000 +ms('-200') // -200 +``` + +### Convert from Milliseconds + +```js +ms(60000) // "1m" +ms(2 * 60000) // "2m" +ms(-3 * 60000) // "-3m" +ms(ms('10 hours')) // "10h" +``` + +### Time Format Written-Out + +```js +ms(60000, { long: true }) // "1 minute" +ms(2 * 60000, { long: true }) // "2 minutes" +ms(-3 * 60000, { long: true }) // "-3 minutes" +ms(ms('10 hours'), { long: true }) // "10 hours" +``` + +## Features + +- Works both in [Node.js](https://nodejs.org) and in the browser +- If a number is supplied to `ms`, a string with a unit is returned +- If a string that contains the number is supplied, it returns it as a number (e.g.: it returns `100` for `'100'`) +- If you pass a string with a number and a valid unit, the number of equivalent milliseconds is returned + +## Related Packages + +- [ms.macro](https://github.com/knpwrs/ms.macro) - Run `ms` as a macro at build-time. + +## Caught a Bug? + +1. [Fork](https://help.github.com/articles/fork-a-repo/) this repository to your own GitHub account and then [clone](https://help.github.com/articles/cloning-a-repository/) it to your local device +2. Link the package to the global module directory: `npm link` +3. Within the module you want to test your local development instance of ms, just link it to the dependencies: `npm link ms`. Instead of the default one from npm, Node.js will now use your clone of ms! + +As always, you can run the tests using: `npm test` diff --git a/node_modules/proxy-from-env/LICENSE b/node_modules/proxy-from-env/LICENSE new file mode 100644 index 0000000..8f25097 --- /dev/null +++ b/node_modules/proxy-from-env/LICENSE @@ -0,0 +1,20 @@ +The MIT License + +Copyright (C) 2016-2018 Rob Wu + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/proxy-from-env/README.md b/node_modules/proxy-from-env/README.md new file mode 100644 index 0000000..1c00ecf --- /dev/null +++ b/node_modules/proxy-from-env/README.md @@ -0,0 +1,163 @@ +# proxy-from-env + +![Build Status](https://github.com/Rob--W/proxy-from-env/actions/workflows/run-tests.yaml/badge.svg?branch=master) +[![Coverage Status](https://coveralls.io/repos/github/Rob--W/proxy-from-env/badge.svg?branch=master)](https://coveralls.io/github/Rob--W/proxy-from-env?branch=master) + +`proxy-from-env` is a Node.js package that exports a function (`getProxyForUrl`) +that takes an input URL (a string, an instance of +[`URL`](https://nodejs.org/docs/latest/api/url.html#the-whatwg-url-api), +or [`url.parse`](https://nodejs.org/docs/latest/api/url.html#url_url_parsing)'s +return value) and returns the desired proxy URL (also a string) based on +standard proxy environment variables. If no proxy is set, an empty string is +returned. + +If your application makes important (security) decisions based on the URL, be +consistent in the mechanism to parse and validate URLs, as differences in URL +parsing behavior can affect the outcome of proxy resolution. +Strings are parsed with the standard `URL` API, as of `proxy-from-env@2.0.0`. +Older versions relied on the (now deprecated) `url.parse` method instead. + +Invalid values in environment variables are not handled by the library +([#41](https://github.com/Rob--W/proxy-from-env/issues/41)). + +It is your responsibility to actually proxy the request using the given URL. + +Installation: + +```sh +npm install proxy-from-env +``` + +## Example +This example shows how the data for a URL can be fetched via the +[`http` module](https://nodejs.org/api/http.html), in a proxy-aware way. + +warning: this simple example works for http requests only. To support https, +you must establish a proxy tunnel via the +[http `connect` method](https://developer.mozilla.org/en-us/docs/web/http/reference/methods/connect). + +```javascript +import http from 'node:test'; +import { getProxyForUrl } from 'proxy-from-env'; +// ^ or: var getProxyForUrl = require('proxy-from-env').getProxyForUrl; + +var some_url = 'http://example.com/something'; + +// // Example, if there is a proxy server at 10.0.0.1:1234, then setting the +// // http_proxy environment variable causes the request to go through a proxy. +// process.env.http_proxy = 'http://10.0.0.1:1234'; +// +// // But if the host to be proxied is listed in NO_PROXY, then the request is +// // not proxied (but a direct request is made). +// process.env.no_proxy = 'example.com'; + +var proxy_url = getProxyForUrl(some_url); // <-- Our magic. +if (proxy_url) { + // Should be proxied through proxy_url. + var parsed_some_url = new URL(some_url); + var parsed_proxy_url = new URL(proxy_url); + // A HTTP proxy is quite simple. It is similar to a normal request, except the + // path is an absolute URL, and the proxied URL's host is put in the header + // instead of the server's actual host. + httpOptions = { + protocol: parsed_proxy_url.protocol, + hostname: parsed_proxy_url.hostname, + port: parsed_proxy_url.port, + path: parsed_some_url.href, + headers: { + Host: parsed_some_url.host, // = host name + optional port. + }, + }; +} else { + // Direct request. + httpOptions = some_url; +} +http.get(httpOptions, function(res) { + var responses = []; + res.on('data', function(chunk) { responses.push(chunk); }); + res.on('end', function() { console.log(responses.join('')); }); +}); +``` + +### Full proxy support +The simple example above works for http requests only. To support https, you +must establish a proxy tunnel via the +[http `connect` method](https://developer.mozilla.org/en-us/docs/web/http/reference/methods/connect). + +An example of that is shown in the +[`https-proxy-agent` npm package](https://www.npmjs.com/package/https-proxy-agent). +The [`proxy-agent` npm package](https://www.npmjs.com/package/proxy-agent) +combines `https-proxy-agent` and `proxy-from-env` to offer a `http.Agent` that +supports proxies from environment variables. + +### Built-in proxy support +Node.js is working on built-in support for proxy environment variables, +currently behind `NODE_USE_ENV_PROXY=1` or `--use-env-proxy`. For details, see: + +- https://github.com/nodejs/node/issues/57872 +- https://nodejs.org/api/http.html#built-in-proxy-support + + +## Environment variables +The environment variables can be specified in all lowercase or all uppercase, +with lowercase taking precedence over the uppercase variant. A variable that is +not set has the same meaning as a variable that is set but has no value. + +### NO\_PROXY + +`NO_PROXY` is a list of host names (optionally with a port). If the input URL +matches any of the entries in `NO_PROXY`, then the input URL should be fetched +by a direct request (i.e. without a proxy). + +Matching follows the following rules: + +- `NO_PROXY=*` disables all proxies. +- Space and commas may be used to separate the entries in the `NO_PROXY` list. +- If `NO_PROXY` does not contain any entries, then proxies are never disabled. +- If a port is added after the host name, then the ports must match. If the URL + does not have an explicit port name, the protocol's default port is used. +- Generally, the proxy is only disabled if the host name is an exact match for + an entry in the `NO_PROXY` list. The only exceptions are entries that start + with a dot or with a wildcard; then the proxy is disabled if the host name + ends with the entry. + +See `test.js` for examples of what should match and what does not. + +### \*\_PROXY + +The environment variable used for the proxy depends on the protocol of the URL. +For example, `https://example.com` uses the "https" protocol, and therefore the +proxy to be used is `HTTPS_PROXY` (_NOT_ `HTTP_PROXY`, which is _only_ used for +http:-URLs). + +The library is not limited to http(s), other schemes such as +`FTP_PROXY` (ftp:), +`WSS_PROXY` (wss:), +`WS_PROXY` (ws:) +are also supported. + +If present, `ALL_PROXY` is used as fallback if there is no other match. + + +## External resources +The exact way of parsing the environment variables is not codified in any +standard. This library is designed to be compatible with formats as expected by +existing software. +The following resources were used to determine the desired behavior: + +- cURL: + https://curl.haxx.se/docs/manpage.html#ENVIRONMENT + https://github.com/curl/curl/blob/4af40b3646d3b09f68e419f7ca866ff395d1f897/lib/url.c#L4446-L4514 + https://github.com/curl/curl/blob/4af40b3646d3b09f68e419f7ca866ff395d1f897/lib/url.c#L4608-L4638 + +- wget: + https://www.gnu.org/software/wget/manual/wget.html#Proxies + http://git.savannah.gnu.org/cgit/wget.git/tree/src/init.c?id=636a5f9a1c508aa39e35a3a8e9e54520a284d93d#n383 + http://git.savannah.gnu.org/cgit/wget.git/tree/src/retr.c?id=93c1517c4071c4288ba5a4b038e7634e4c6b5482#n1278 + +- W3: + https://www.w3.org/Daemon/User/Proxies/ProxyClients.html + +- Python's urllib: + https://github.com/python/cpython/blob/936135bb97fe04223aa30ca6e98eac8f3ed6b349/Lib/urllib/request.py#L755-L782 + https://github.com/python/cpython/blob/936135bb97fe04223aa30ca6e98eac8f3ed6b349/Lib/urllib/request.py#L2444-L2479 diff --git a/node_modules/proxy-from-env/index.cjs b/node_modules/proxy-from-env/index.cjs new file mode 100644 index 0000000..ede2a9f --- /dev/null +++ b/node_modules/proxy-from-env/index.cjs @@ -0,0 +1,105 @@ +'use strict'; + +var DEFAULT_PORTS = { + ftp: 21, + gopher: 70, + http: 80, + https: 443, + ws: 80, + wss: 443, +}; + +function parseUrl(urlString) { + try { + return new URL(urlString); + } catch { + return null; + } +} + +/** + * @param {string|object|URL} url - The URL as a string or URL instance, or a + * compatible object (such as the result from legacy url.parse). + * @return {string} The URL of the proxy that should handle the request to the + * given URL. If no proxy is set, this will be an empty string. + */ +function getProxyForUrl(url) { + var parsedUrl = (typeof url === 'string' ? parseUrl(url) : url) || {}; + var proto = parsedUrl.protocol; + var hostname = parsedUrl.host; + var port = parsedUrl.port; + if (typeof hostname !== 'string' || !hostname || typeof proto !== 'string') { + return ''; // Don't proxy URLs without a valid scheme or host. + } + + proto = proto.split(':', 1)[0]; + // Stripping ports in this way instead of using parsedUrl.hostname to make + // sure that the brackets around IPv6 addresses are kept. + hostname = hostname.replace(/:\d*$/, ''); + port = parseInt(port) || DEFAULT_PORTS[proto] || 0; + if (!shouldProxy(hostname, port)) { + return ''; // Don't proxy URLs that match NO_PROXY. + } + + var proxy = getEnv(proto + '_proxy') || getEnv('all_proxy'); + if (proxy && proxy.indexOf('://') === -1) { + // Missing scheme in proxy, default to the requested URL's scheme. + proxy = proto + '://' + proxy; + } + return proxy; +} + +/** + * Determines whether a given URL should be proxied. + * + * @param {string} hostname - The host name of the URL. + * @param {number} port - The effective port of the URL. + * @returns {boolean} Whether the given URL should be proxied. + * @private + */ +function shouldProxy(hostname, port) { + var NO_PROXY = getEnv('no_proxy').toLowerCase(); + if (!NO_PROXY) { + return true; // Always proxy if NO_PROXY is not set. + } + if (NO_PROXY === '*') { + return false; // Never proxy if wildcard is set. + } + + return NO_PROXY.split(/[,\s]/).every(function(proxy) { + if (!proxy) { + return true; // Skip zero-length hosts. + } + var parsedProxy = proxy.match(/^(.+):(\d+)$/); + var parsedProxyHostname = parsedProxy ? parsedProxy[1] : proxy; + var parsedProxyPort = parsedProxy ? parseInt(parsedProxy[2]) : 0; + if (parsedProxyPort && parsedProxyPort !== port) { + return true; // Skip if ports don't match. + } + + if (!/^[.*]/.test(parsedProxyHostname)) { + // No wildcards, so stop proxying if there is an exact match. + return hostname !== parsedProxyHostname; + } + + if (parsedProxyHostname.charAt(0) === '*') { + // Remove leading wildcard. + parsedProxyHostname = parsedProxyHostname.slice(1); + } + // Stop proxying if the hostname ends with the no_proxy host. + return !hostname.endsWith(parsedProxyHostname); + }); +} + +/** + * Get the value for an environment variable. + * + * @param {string} key - The name of the environment variable. + * @return {string} The value of the environment variable. + * @private + */ +function getEnv(key) { + return process.env[key.toLowerCase()] || process.env[key.toUpperCase()] || ''; +} + +exports.getProxyForUrl = getProxyForUrl; diff --git a/node_modules/proxy-from-env/index.js b/node_modules/proxy-from-env/index.js new file mode 100644 index 0000000..333f45a --- /dev/null +++ b/node_modules/proxy-from-env/index.js @@ -0,0 +1,103 @@ +'use strict'; + +var DEFAULT_PORTS = { + ftp: 21, + gopher: 70, + http: 80, + https: 443, + ws: 80, + wss: 443, +}; + +function parseUrl(urlString) { + try { + return new URL(urlString); + } catch { + return null; + } +} + +/** + * @param {string|object|URL} url - The URL as a string or URL instance, or a + * compatible object (such as the result from legacy url.parse). + * @return {string} The URL of the proxy that should handle the request to the + * given URL. If no proxy is set, this will be an empty string. + */ +export function getProxyForUrl(url) { + var parsedUrl = (typeof url === 'string' ? parseUrl(url) : url) || {}; + var proto = parsedUrl.protocol; + var hostname = parsedUrl.host; + var port = parsedUrl.port; + if (typeof hostname !== 'string' || !hostname || typeof proto !== 'string') { + return ''; // Don't proxy URLs without a valid scheme or host. + } + + proto = proto.split(':', 1)[0]; + // Stripping ports in this way instead of using parsedUrl.hostname to make + // sure that the brackets around IPv6 addresses are kept. + hostname = hostname.replace(/:\d*$/, ''); + port = parseInt(port) || DEFAULT_PORTS[proto] || 0; + if (!shouldProxy(hostname, port)) { + return ''; // Don't proxy URLs that match NO_PROXY. + } + + var proxy = getEnv(proto + '_proxy') || getEnv('all_proxy'); + if (proxy && proxy.indexOf('://') === -1) { + // Missing scheme in proxy, default to the requested URL's scheme. + proxy = proto + '://' + proxy; + } + return proxy; +} + +/** + * Determines whether a given URL should be proxied. + * + * @param {string} hostname - The host name of the URL. + * @param {number} port - The effective port of the URL. + * @returns {boolean} Whether the given URL should be proxied. + * @private + */ +function shouldProxy(hostname, port) { + var NO_PROXY = getEnv('no_proxy').toLowerCase(); + if (!NO_PROXY) { + return true; // Always proxy if NO_PROXY is not set. + } + if (NO_PROXY === '*') { + return false; // Never proxy if wildcard is set. + } + + return NO_PROXY.split(/[,\s]/).every(function(proxy) { + if (!proxy) { + return true; // Skip zero-length hosts. + } + var parsedProxy = proxy.match(/^(.+):(\d+)$/); + var parsedProxyHostname = parsedProxy ? parsedProxy[1] : proxy; + var parsedProxyPort = parsedProxy ? parseInt(parsedProxy[2]) : 0; + if (parsedProxyPort && parsedProxyPort !== port) { + return true; // Skip if ports don't match. + } + + if (!/^[.*]/.test(parsedProxyHostname)) { + // No wildcards, so stop proxying if there is an exact match. + return hostname !== parsedProxyHostname; + } + + if (parsedProxyHostname.charAt(0) === '*') { + // Remove leading wildcard. + parsedProxyHostname = parsedProxyHostname.slice(1); + } + // Stop proxying if the hostname ends with the no_proxy host. + return !hostname.endsWith(parsedProxyHostname); + }); +} + +/** + * Get the value for an environment variable. + * + * @param {string} key - The name of the environment variable. + * @return {string} The value of the environment variable. + * @private + */ +function getEnv(key) { + return process.env[key.toLowerCase()] || process.env[key.toUpperCase()] || ''; +} diff --git a/node_modules/proxy-from-env/package.json b/node_modules/proxy-from-env/package.json new file mode 100644 index 0000000..3960f35 --- /dev/null +++ b/node_modules/proxy-from-env/package.json @@ -0,0 +1,43 @@ +{ + "name": "proxy-from-env", + "version": "2.1.0", + "description": "Offers getProxyForUrl to get the proxy URL for a URL, respecting the *_PROXY (e.g. HTTP_PROXY) and NO_PROXY environment variables.", + "main": "index.cjs", + "exports": { + "import": "./index.js", + "require": "./index.cjs" + }, + "files": ["index.js", "index.cjs"], + "scripts": { + "lint": "eslint *.js *.mjs *.cjs", + "test": "node --test ./test.js", + "test-require": "node ./test-require.cjs", + "test-coverage": "node --experimental-test-coverage --test-reporter=lcov --test-reporter-destination=lcov.info ./test.js", + "test-coverage-as-html": "npm run test-coverage && genhtml lcov.info -o coverage/" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/Rob--W/proxy-from-env.git" + }, + "keywords": [ + "proxy", + "http_proxy", + "https_proxy", + "no_proxy", + "environment" + ], + "author": "Rob Wu (https://robwu.nl/)", + "license": "MIT", + "bugs": { + "url": "https://github.com/Rob--W/proxy-from-env/issues" + }, + "homepage": "https://github.com/Rob--W/proxy-from-env#readme", + "devDependencies": { + "eslint": "^9.39.2" + }, + "type": "module", + "engines": { + "node": ">=10" + }, + "sideEffects": false +} diff --git a/package-lock.json b/package-lock.json index 3fd8f0c..142407a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8,6 +8,7 @@ "name": "hong", "version": "0.0.0", "dependencies": { + "axios": "^1.21.1", "pinia": "^3.0.4", "pinia-plugin-persistedstate": "^4.7.1", "vue": "^3.5.30", @@ -658,6 +659,18 @@ "node": ">=0.4.0" } }, + "node_modules/agent-base": { + "version": "6.0.2", + "resolved": "https://registry.npmmirror.com/agent-base/-/agent-base-6.0.2.tgz", + "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", + "license": "MIT", + "dependencies": { + "debug": "4" + }, + "engines": { + "node": ">= 6.0.0" + } + }, "node_modules/alien-signals": { "version": "3.1.2", "resolved": "https://registry.npmmirror.com/alien-signals/-/alien-signals-3.1.2.tgz", @@ -697,6 +710,24 @@ "url": "https://github.com/sponsors/sxzz" } }, + "node_modules/asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmmirror.com/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", + "license": "MIT" + }, + "node_modules/axios": { + "version": "1.21.1", + "resolved": "https://registry.npmmirror.com/axios/-/axios-1.21.1.tgz", + "integrity": "sha512-6eI5Q/Y4u/Um9dDlsRoq5pY2rxnUTv+L4PpLitnbk/i4jb3MxLZ5CsN5Ih3IysbeRYK4pR+P7qfMsOQl9fwwFQ==", + "license": "MIT", + "dependencies": { + "follow-redirects": "^1.16.2", + "form-data": "^4.0.6", + "https-proxy-agent": "^5.0.1", + "proxy-from-env": "^2.1.0" + } + }, "node_modules/birpc": { "version": "2.9.0", "resolved": "https://registry.npmmirror.com/birpc/-/birpc-2.9.0.tgz", @@ -706,6 +737,19 @@ "url": "https://github.com/sponsors/antfu" } }, + "node_modules/call-bind-apply-helpers": { + "version": "1.0.2", + "resolved": "https://registry.npmmirror.com/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz", + "integrity": "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/chokidar": { "version": "5.0.0", "resolved": "https://registry.npmmirror.com/chokidar/-/chokidar-5.0.0.tgz", @@ -721,6 +765,18 @@ "url": "https://paulmillr.com/funding/" } }, + "node_modules/combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmmirror.com/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "license": "MIT", + "dependencies": { + "delayed-stream": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, "node_modules/confbox": { "version": "0.2.4", "resolved": "https://registry.npmmirror.com/confbox/-/confbox-0.2.4.tgz", @@ -748,12 +804,38 @@ "integrity": "sha512-z1HGKcYy2xA8AGQfwrn0PAy+PB7X/GSj3UVJW9qKyn43xWa+gl5nXmU4qqLMRzWVLFC8KusUX8T/0kCiOYpAIQ==", "license": "MIT" }, + "node_modules/debug": { + "version": "4.4.3", + "resolved": "https://registry.npmmirror.com/debug/-/debug-4.4.3.tgz", + "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==", + "license": "MIT", + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, "node_modules/defu": { "version": "6.1.7", "resolved": "https://registry.npmjs.org/defu/-/defu-6.1.7.tgz", "integrity": "sha512-7z22QmUWiQ/2d0KkdYmANbRUVABpZ9SNYyH5vx6PZ+nE5bcC0l7uFvEfHlyld/HcGBFTL536ClDt3DEcSlEJAQ==", "license": "MIT" }, + "node_modules/delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmmirror.com/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", + "license": "MIT", + "engines": { + "node": ">=0.4.0" + } + }, "node_modules/detect-libc": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.1.2.tgz", @@ -764,6 +846,20 @@ "node": ">=8" } }, + "node_modules/dunder-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmmirror.com/dunder-proto/-/dunder-proto-1.0.1.tgz", + "integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==", + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.1", + "es-errors": "^1.3.0", + "gopd": "^1.2.0" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/entities": { "version": "7.0.1", "resolved": "https://registry.npmmirror.com/entities/-/entities-7.0.1.tgz", @@ -776,6 +872,51 @@ "url": "https://github.com/fb55/entities?sponsor=1" } }, + "node_modules/es-define-property": { + "version": "1.0.1", + "resolved": "https://registry.npmmirror.com/es-define-property/-/es-define-property-1.0.1.tgz", + "integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-errors": { + "version": "1.3.0", + "resolved": "https://registry.npmmirror.com/es-errors/-/es-errors-1.3.0.tgz", + "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-object-atoms": { + "version": "1.1.2", + "resolved": "https://registry.npmmirror.com/es-object-atoms/-/es-object-atoms-1.1.2.tgz", + "integrity": "sha512-HWcBoN6NileqtSydK2FqHbS/LoDd2pqrnQHLyJzBj4kOp/ky2MWMN694xOfkK8/SnUsW2DH7EfyVlydKCsm1Zw==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-set-tostringtag": { + "version": "2.1.0", + "resolved": "https://registry.npmmirror.com/es-set-tostringtag/-/es-set-tostringtag-2.1.0.tgz", + "integrity": "sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.6", + "has-tostringtag": "^1.0.2", + "hasown": "^2.0.2" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/estree-walker": { "version": "2.0.2", "resolved": "https://registry.npmmirror.com/estree-walker/-/estree-walker-2.0.2.tgz", @@ -805,6 +946,42 @@ } } }, + "node_modules/follow-redirects": { + "version": "1.16.3", + "resolved": "https://registry.npmmirror.com/follow-redirects/-/follow-redirects-1.16.3.tgz", + "integrity": "sha512-toOSoqN6d51Wjf1aOFJYcoVv1aND9rj/CwjLU0Vz40oDuSpWDayCeKe4JpL5NL0WdFvoOOCI3BRo69HahjbR1A==", + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/RubenVerborgh" + } + ], + "license": "MIT", + "engines": { + "node": ">=4.0" + }, + "peerDependenciesMeta": { + "debug": { + "optional": true + } + } + }, + "node_modules/form-data": { + "version": "4.0.6", + "resolved": "https://registry.npmmirror.com/form-data/-/form-data-4.0.6.tgz", + "integrity": "sha512-vKatAh4SlVfgbv+YtmhiRjhEMJsYpsG1Y2rMQtR+SVSbytsSD1YGzDIcrAJmdFec88u/+VoGmxnl+80gL1tRCQ==", + "license": "MIT", + "dependencies": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "es-set-tostringtag": "^2.1.0", + "hasown": "^2.0.4", + "mime-types": "^2.1.35" + }, + "engines": { + "node": ">= 6" + } + }, "node_modules/fsevents": { "version": "2.3.3", "resolved": "https://registry.npmmirror.com/fsevents/-/fsevents-2.3.3.tgz", @@ -820,12 +997,122 @@ "node": "^8.16.0 || ^10.6.0 || >=11.0.0" } }, + "node_modules/function-bind": { + "version": "1.1.2", + "resolved": "https://registry.npmmirror.com/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-intrinsic": { + "version": "1.3.0", + "resolved": "https://registry.npmmirror.com/get-intrinsic/-/get-intrinsic-1.3.0.tgz", + "integrity": "sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==", + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.2", + "es-define-property": "^1.0.1", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.1.1", + "function-bind": "^1.1.2", + "get-proto": "^1.0.1", + "gopd": "^1.2.0", + "has-symbols": "^1.1.0", + "hasown": "^2.0.2", + "math-intrinsics": "^1.1.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmmirror.com/get-proto/-/get-proto-1.0.1.tgz", + "integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==", + "license": "MIT", + "dependencies": { + "dunder-proto": "^1.0.1", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/gopd": { + "version": "1.2.0", + "resolved": "https://registry.npmmirror.com/gopd/-/gopd-1.2.0.tgz", + "integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-symbols": { + "version": "1.1.0", + "resolved": "https://registry.npmmirror.com/has-symbols/-/has-symbols-1.1.0.tgz", + "integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-tostringtag": { + "version": "1.0.2", + "resolved": "https://registry.npmmirror.com/has-tostringtag/-/has-tostringtag-1.0.2.tgz", + "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==", + "license": "MIT", + "dependencies": { + "has-symbols": "^1.0.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/hasown": { + "version": "2.0.4", + "resolved": "https://registry.npmmirror.com/hasown/-/hasown-2.0.4.tgz", + "integrity": "sha512-T2UbfbBEF32wiepXIsMlTW9+dDYC6wMh/t/vYA4tuOMKqWz/n3vr1NFSxQiyP+zk2mXsoMA/i/7qV6LKut1t1A==", + "license": "MIT", + "dependencies": { + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/hookable": { "version": "5.5.3", "resolved": "https://registry.npmmirror.com/hookable/-/hookable-5.5.3.tgz", "integrity": "sha512-Yc+BQe8SvoXH1643Qez1zqLRmbA5rCL+sSmk6TVos0LWVfNIB7PGncdlId77WzLGSIB5KaWgTaNTs2lNVEI6VQ==", "license": "MIT" }, + "node_modules/https-proxy-agent": { + "version": "5.0.1", + "resolved": "https://registry.npmmirror.com/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz", + "integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==", + "license": "MIT", + "dependencies": { + "agent-base": "6", + "debug": "4" + }, + "engines": { + "node": ">= 6" + } + }, "node_modules/is-what": { "version": "5.5.0", "resolved": "https://registry.npmmirror.com/is-what/-/is-what-5.5.0.tgz", @@ -1164,6 +1451,36 @@ "url": "https://github.com/sponsors/sxzz" } }, + "node_modules/math-intrinsics": { + "version": "1.1.0", + "resolved": "https://registry.npmmirror.com/math-intrinsics/-/math-intrinsics-1.1.0.tgz", + "integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/mime-db": { + "version": "1.52.0", + "resolved": "https://registry.npmmirror.com/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime-types": { + "version": "2.1.35", + "resolved": "https://registry.npmmirror.com/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "license": "MIT", + "dependencies": { + "mime-db": "1.52.0" + }, + "engines": { + "node": ">= 0.6" + } + }, "node_modules/mitt": { "version": "3.0.1", "resolved": "https://registry.npmmirror.com/mitt/-/mitt-3.0.1.tgz", @@ -1199,6 +1516,12 @@ "pathe": "^2.0.1" } }, + "node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmmirror.com/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "license": "MIT" + }, "node_modules/muggle-string": { "version": "0.4.1", "resolved": "https://registry.npmmirror.com/muggle-string/-/muggle-string-0.4.1.tgz", @@ -1384,6 +1707,15 @@ "node": "^10 || ^12 || >=14" } }, + "node_modules/proxy-from-env": { + "version": "2.1.0", + "resolved": "https://registry.npmmirror.com/proxy-from-env/-/proxy-from-env-2.1.0.tgz", + "integrity": "sha512-cJ+oHTW1VAEa8cJslgmUZrc+sjRKgAKl3Zyse6+PV38hZe/V6Z14TbCuXcan9F9ghlz4QrFr2c92TNF82UkYHA==", + "license": "MIT", + "engines": { + "node": ">=10" + } + }, "node_modules/quansync": { "version": "0.2.11", "resolved": "https://registry.npmmirror.com/quansync/-/quansync-0.2.11.tgz", diff --git a/package.json b/package.json index 35e4f02..817c4b1 100644 --- a/package.json +++ b/package.json @@ -9,6 +9,7 @@ "preview": "vite preview" }, "dependencies": { + "axios": "^1.21.1", "pinia": "^3.0.4", "pinia-plugin-persistedstate": "^4.7.1", "vue": "^3.5.30", diff --git a/src/App.vue b/src/App.vue index e89982a..5d484e3 100644 --- a/src/App.vue +++ b/src/App.vue @@ -1,13 +1,30 @@