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/browser/axios.cjs

    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
    22'use strict';
    33
     
    11531153 * @param {string} url The base of the url (e.g., http://www.google.com)
    11541154 * @param {object} [params] The params to be appended
    1155  * @param {?object} options
     1155 * @param {?(object|Function)} options
    11561156 *
    11571157 * @returns {string} The formatted url
     
    11641164 
    11651165  const _encode = options && options.encode || encode;
     1166
     1167  if (utils$1.isFunction(options)) {
     1168    options = {
     1169      serialize: options
     1170    };
     1171  }
    11661172
    11671173  const serializeFn = options && options.serialize;
     
    21532159const asyncDecorator = (fn) => (...args) => utils$1.asap(() => fn(...args));
    21542160
    2155 var isURLSameOrigin = platform.hasStandardBrowserEnv ?
    2156 
    2157 // Standard browser envs have full support of the APIs needed to test
    2158 // whether the request URL is of the same origin as current location.
    2159   (function standardBrowserEnv() {
    2160     const msie = platform.navigator && /(msie|trident)/i.test(platform.navigator.userAgent);
    2161     const urlParsingNode = document.createElement('a');
    2162     let originURL;
    2163 
    2164     /**
    2165     * Parse a URL to discover its components
    2166     *
    2167     * @param {String} url The URL to be parsed
    2168     * @returns {Object}
    2169     */
    2170     function resolveURL(url) {
    2171       let href = url;
    2172 
    2173       if (msie) {
    2174         // IE needs attribute set twice to normalize properties
    2175         urlParsingNode.setAttribute('href', href);
    2176         href = urlParsingNode.href;
    2177       }
    2178 
    2179       urlParsingNode.setAttribute('href', href);
    2180 
    2181       // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils
    2182       return {
    2183         href: urlParsingNode.href,
    2184         protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '',
    2185         host: urlParsingNode.host,
    2186         search: urlParsingNode.search ? urlParsingNode.search.replace(/^\?/, '') : '',
    2187         hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '',
    2188         hostname: urlParsingNode.hostname,
    2189         port: urlParsingNode.port,
    2190         pathname: (urlParsingNode.pathname.charAt(0) === '/') ?
    2191           urlParsingNode.pathname :
    2192           '/' + urlParsingNode.pathname
    2193       };
    2194     }
    2195 
    2196     originURL = resolveURL(window.location.href);
    2197 
    2198     /**
    2199     * Determine if a URL shares the same origin as the current location
    2200     *
    2201     * @param {String} requestURL The URL to test
    2202     * @returns {boolean} True if URL shares the same origin, otherwise false
    2203     */
    2204     return function isURLSameOrigin(requestURL) {
    2205       const parsed = (utils$1.isString(requestURL)) ? resolveURL(requestURL) : requestURL;
    2206       return (parsed.protocol === originURL.protocol &&
    2207           parsed.host === originURL.host);
    2208     };
    2209   })() :
    2210 
    2211   // Non standard browser envs (web workers, react-native) lack needed support.
    2212   (function nonStandardBrowserEnv() {
    2213     return function isURLSameOrigin() {
    2214       return true;
    2215     };
    2216   })();
     2161var isURLSameOrigin = platform.hasStandardBrowserEnv ? ((origin, isMSIE) => (url) => {
     2162  url = new URL(url, platform.origin);
     2163
     2164  return (
     2165    origin.protocol === url.protocol &&
     2166    origin.host === url.host &&
     2167    (isMSIE || origin.port === url.port)
     2168  );
     2169})(
     2170  new URL(platform.origin),
     2171  platform.navigator && /(msie|trident)/i.test(platform.navigator.userAgent)
     2172) : () => true;
    22172173
    22182174var cookies = platform.hasStandardBrowserEnv ?
     
    23162272  const config = {};
    23172273
    2318   function getMergedValue(target, source, caseless) {
     2274  function getMergedValue(target, source, prop, caseless) {
    23192275    if (utils$1.isPlainObject(target) && utils$1.isPlainObject(source)) {
    23202276      return utils$1.merge.call({caseless}, target, source);
     
    23282284
    23292285  // eslint-disable-next-line consistent-return
    2330   function mergeDeepProperties(a, b, caseless) {
     2286  function mergeDeepProperties(a, b, prop , caseless) {
    23312287    if (!utils$1.isUndefined(b)) {
    2332       return getMergedValue(a, b, caseless);
     2288      return getMergedValue(a, b, prop , caseless);
    23332289    } else if (!utils$1.isUndefined(a)) {
    2334       return getMergedValue(undefined, a, caseless);
     2290      return getMergedValue(undefined, a, prop , caseless);
    23352291    }
    23362292  }
     
    23902346    responseEncoding: defaultToConfig2,
    23912347    validateStatus: mergeDirectKeys,
    2392     headers: (a, b) => mergeDeepProperties(headersToObject(a), headersToObject(b), true)
     2348    headers: (a, b , prop) => mergeDeepProperties(headersToObject(a), headersToObject(b),prop, true)
    23932349  };
    23942350
     
    31343090}
    31353091
    3136 const VERSION = "1.7.7";
     3092const VERSION = "1.7.8";
    31373093
    31383094const validators$1 = {};
     
    31833139    return validator ? validator(value, opt, opts) : true;
    31843140  };
     3141};
     3142
     3143validators$1.spelling = function spelling(correctSpelling) {
     3144  return (value, opt) => {
     3145    // eslint-disable-next-line no-console
     3146    console.warn(`${opt} is likely a misspelling of ${correctSpelling}`);
     3147    return true;
     3148  }
    31853149};
    31863150
     
    32543218    } catch (err) {
    32553219      if (err instanceof Error) {
    3256         let dummy;
    3257 
    3258         Error.captureStackTrace ? Error.captureStackTrace(dummy = {}) : (dummy = new Error());
     3220        let dummy = {};
     3221
     3222        Error.captureStackTrace ? Error.captureStackTrace(dummy) : (dummy = new Error());
    32593223
    32603224        // slice off the Error: ... line
     
    33103274      }
    33113275    }
     3276
     3277    validator.assertOptions(config, {
     3278      baseUrl: validators.spelling('baseURL'),
     3279      withXsrfToken: validators.spelling('withXSRFToken')
     3280    }, true);
    33123281
    33133282    // Set config.method
Note: See TracChangeset for help on using the changeset viewer.