Ignore:
Timestamp:
12/12/24 17:06:06 (5 weeks ago)
Author:
stefan toskovski <stefantoska84@…>
Branches:
main
Parents:
d565449
Message:

Pred finalna verzija

File:
1 edited

Legend:

Unmodified
Added
Removed
  • imaps-frontend/node_modules/axios/dist/esm/axios.js

    rd565449 r0c6b92a  
    1 // Axios v1.7.7 Copyright (c) 2024 Matt Zabriskie and contributors
     1// Axios v1.7.8 Copyright (c) 2024 Matt Zabriskie and contributors
    22function bind(fn, thisArg) {
    33  return function wrap() {
     
    11511151 * @param {string} url The base of the url (e.g., http://www.google.com)
    11521152 * @param {object} [params] The params to be appended
    1153  * @param {?object} options
     1153 * @param {?(object|Function)} options
    11541154 *
    11551155 * @returns {string} The formatted url
     
    11621162 
    11631163  const _encode = options && options.encode || encode;
     1164
     1165  if (utils$1.isFunction(options)) {
     1166    options = {
     1167      serialize: options
     1168    };
     1169  }
    11641170
    11651171  const serializeFn = options && options.serialize;
     
    21512157const asyncDecorator = (fn) => (...args) => utils$1.asap(() => fn(...args));
    21522158
    2153 const isURLSameOrigin = platform.hasStandardBrowserEnv ?
    2154 
    2155 // Standard browser envs have full support of the APIs needed to test
    2156 // whether the request URL is of the same origin as current location.
    2157   (function standardBrowserEnv() {
    2158     const msie = platform.navigator && /(msie|trident)/i.test(platform.navigator.userAgent);
    2159     const urlParsingNode = document.createElement('a');
    2160     let originURL;
    2161 
    2162     /**
    2163     * Parse a URL to discover its components
    2164     *
    2165     * @param {String} url The URL to be parsed
    2166     * @returns {Object}
    2167     */
    2168     function resolveURL(url) {
    2169       let href = url;
    2170 
    2171       if (msie) {
    2172         // IE needs attribute set twice to normalize properties
    2173         urlParsingNode.setAttribute('href', href);
    2174         href = urlParsingNode.href;
    2175       }
    2176 
    2177       urlParsingNode.setAttribute('href', href);
    2178 
    2179       // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils
    2180       return {
    2181         href: urlParsingNode.href,
    2182         protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '',
    2183         host: urlParsingNode.host,
    2184         search: urlParsingNode.search ? urlParsingNode.search.replace(/^\?/, '') : '',
    2185         hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '',
    2186         hostname: urlParsingNode.hostname,
    2187         port: urlParsingNode.port,
    2188         pathname: (urlParsingNode.pathname.charAt(0) === '/') ?
    2189           urlParsingNode.pathname :
    2190           '/' + urlParsingNode.pathname
    2191       };
    2192     }
    2193 
    2194     originURL = resolveURL(window.location.href);
    2195 
    2196     /**
    2197     * Determine if a URL shares the same origin as the current location
    2198     *
    2199     * @param {String} requestURL The URL to test
    2200     * @returns {boolean} True if URL shares the same origin, otherwise false
    2201     */
    2202     return function isURLSameOrigin(requestURL) {
    2203       const parsed = (utils$1.isString(requestURL)) ? resolveURL(requestURL) : requestURL;
    2204       return (parsed.protocol === originURL.protocol &&
    2205           parsed.host === originURL.host);
    2206     };
    2207   })() :
    2208 
    2209   // Non standard browser envs (web workers, react-native) lack needed support.
    2210   (function nonStandardBrowserEnv() {
    2211     return function isURLSameOrigin() {
    2212       return true;
    2213     };
    2214   })();
     2159const isURLSameOrigin = platform.hasStandardBrowserEnv ? ((origin, isMSIE) => (url) => {
     2160  url = new URL(url, platform.origin);
     2161
     2162  return (
     2163    origin.protocol === url.protocol &&
     2164    origin.host === url.host &&
     2165    (isMSIE || origin.port === url.port)
     2166  );
     2167})(
     2168  new URL(platform.origin),
     2169  platform.navigator && /(msie|trident)/i.test(platform.navigator.userAgent)
     2170) : () => true;
    22152171
    22162172const cookies = platform.hasStandardBrowserEnv ?
     
    23142270  const config = {};
    23152271
    2316   function getMergedValue(target, source, caseless) {
     2272  function getMergedValue(target, source, prop, caseless) {
    23172273    if (utils$1.isPlainObject(target) && utils$1.isPlainObject(source)) {
    23182274      return utils$1.merge.call({caseless}, target, source);
     
    23262282
    23272283  // eslint-disable-next-line consistent-return
    2328   function mergeDeepProperties(a, b, caseless) {
     2284  function mergeDeepProperties(a, b, prop , caseless) {
    23292285    if (!utils$1.isUndefined(b)) {
    2330       return getMergedValue(a, b, caseless);
     2286      return getMergedValue(a, b, prop , caseless);
    23312287    } else if (!utils$1.isUndefined(a)) {
    2332       return getMergedValue(undefined, a, caseless);
     2288      return getMergedValue(undefined, a, prop , caseless);
    23332289    }
    23342290  }
     
    23882344    responseEncoding: defaultToConfig2,
    23892345    validateStatus: mergeDirectKeys,
    2390     headers: (a, b) => mergeDeepProperties(headersToObject(a), headersToObject(b), true)
     2346    headers: (a, b , prop) => mergeDeepProperties(headersToObject(a), headersToObject(b),prop, true)
    23912347  };
    23922348
     
    31323088}
    31333089
    3134 const VERSION$1 = "1.7.7";
     3090const VERSION$1 = "1.7.8";
    31353091
    31363092const validators$1 = {};
     
    31813137    return validator ? validator(value, opt, opts) : true;
    31823138  };
     3139};
     3140
     3141validators$1.spelling = function spelling(correctSpelling) {
     3142  return (value, opt) => {
     3143    // eslint-disable-next-line no-console
     3144    console.warn(`${opt} is likely a misspelling of ${correctSpelling}`);
     3145    return true;
     3146  }
    31833147};
    31843148
     
    32523216    } catch (err) {
    32533217      if (err instanceof Error) {
    3254         let dummy;
    3255 
    3256         Error.captureStackTrace ? Error.captureStackTrace(dummy = {}) : (dummy = new Error());
     3218        let dummy = {};
     3219
     3220        Error.captureStackTrace ? Error.captureStackTrace(dummy) : (dummy = new Error());
    32573221
    32583222        // slice off the Error: ... line
     
    33083272      }
    33093273    }
     3274
     3275    validator.assertOptions(config, {
     3276      baseUrl: validators.spelling('baseURL'),
     3277      withXsrfToken: validators.spelling('withXSRFToken')
     3278    }, true);
    33103279
    33113280    // Set config.method
Note: See TracChangeset for help on using the changeset viewer.