v0.3
This commit is contained in:
1 parent
d1ee8edbbd
commit
7733a44362
429 files changed
+75840
-94
No files matched your search
+6547
File diff suppressed because it is too large.
Load diff
+3
@@ -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<o;r++)t.call(null,e[r],r,e);else{if(m(e))return;const o=n?Object.getOwnPropertyNames(e):Object.keys(e),s=o.length;let i;for(r=0;r<s;r++)i=o[r],t.call(null,e[i],i,e)}}const L="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,F=e=>!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<n;e++){const n=t[e];if(!n||m(n))continue;if(D(n,a),"object"!=typeof n||p(n)||!Object.getOwnPropertySymbols)continue;const r=Object.getOwnPropertySymbols(n);for(let e=0;e<r.length;e++){const t=r[e];q.call(n,t)&&a(n[t],t)}}return o},extend:(t,n,r,{allOwnKeys:o}={})=>(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[Line truncated
|
||||
//# sourceMappingURL=axios.min.js.map
|
||||
+1
@@ -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 thLine truncated
|
||||
Reference in new issue
Block a user