BankliPlus/temparea/solarbank/frontend/node_modules/.cache/babel-loader/969af825920457feee83c2ddb6eb3d72cb940a37661349554ef37dd0812b3bb5.json
2025-08-13 18:05:26 +02:00

1 line
7.0 KiB
JSON

{"ast":null,"code":"import platform from \"../platform/index.js\";\nimport utils from \"../utils.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 buildURL from \"./buildURL.js\";\nexport default config => {\n const newConfig = mergeConfig({}, config);\n let {\n data,\n withXSRFToken,\n xsrfHeaderName,\n xsrfCookieName,\n headers,\n auth\n } = newConfig;\n newConfig.headers = headers = AxiosHeaders.from(headers);\n newConfig.url = buildURL(buildFullPath(newConfig.baseURL, newConfig.url, newConfig.allowAbsoluteUrls), config.params, config.paramsSerializer);\n\n // HTTP basic authentication\n if (auth) {\n headers.set('Authorization', 'Basic ' + btoa((auth.username || '') + ':' + (auth.password ? unescape(encodeURIComponent(auth.password)) : '')));\n }\n let contentType;\n if (utils.isFormData(data)) {\n if (platform.hasStandardBrowserEnv || platform.hasStandardBrowserWebWorkerEnv) {\n headers.setContentType(undefined); // Let the browser set it\n } else if ((contentType = headers.getContentType()) !== false) {\n // fix semicolon duplication issue for ReactNative FormData implementation\n const [type, ...tokens] = contentType ? contentType.split(';').map(token => token.trim()).filter(Boolean) : [];\n headers.setContentType([type || 'multipart/form-data', ...tokens].join('; '));\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 withXSRFToken && utils.isFunction(withXSRFToken) && (withXSRFToken = withXSRFToken(newConfig));\n if (withXSRFToken || withXSRFToken !== false && isURLSameOrigin(newConfig.url)) {\n // Add xsrf header\n const xsrfValue = xsrfHeaderName && xsrfCookieName && cookies.read(xsrfCookieName);\n if (xsrfValue) {\n headers.set(xsrfHeaderName, xsrfValue);\n }\n }\n }\n return newConfig;\n};","map":{"version":3,"names":["platform","utils","isURLSameOrigin","cookies","buildFullPath","mergeConfig","AxiosHeaders","buildURL","config","newConfig","data","withXSRFToken","xsrfHeaderName","xsrfCookieName","headers","auth","from","url","baseURL","allowAbsoluteUrls","params","paramsSerializer","set","btoa","username","password","unescape","encodeURIComponent","contentType","isFormData","hasStandardBrowserEnv","hasStandardBrowserWebWorkerEnv","setContentType","undefined","getContentType","type","tokens","split","map","token","trim","filter","Boolean","join","isFunction","xsrfValue","read"],"sources":["/home/m3mo/Desktop/temparea/solarbank/frontend/node_modules/axios/lib/helpers/resolveConfig.js"],"sourcesContent":["import platform from \"../platform/index.js\";\nimport utils from \"../utils.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 buildURL from \"./buildURL.js\";\n\nexport default (config) => {\n const newConfig = mergeConfig({}, config);\n\n let {data, withXSRFToken, xsrfHeaderName, xsrfCookieName, headers, auth} = newConfig;\n\n newConfig.headers = headers = AxiosHeaders.from(headers);\n\n newConfig.url = buildURL(buildFullPath(newConfig.baseURL, newConfig.url, newConfig.allowAbsoluteUrls), config.params, config.paramsSerializer);\n\n // HTTP basic authentication\n if (auth) {\n headers.set('Authorization', 'Basic ' +\n btoa((auth.username || '') + ':' + (auth.password ? unescape(encodeURIComponent(auth.password)) : ''))\n );\n }\n\n let contentType;\n\n if (utils.isFormData(data)) {\n if (platform.hasStandardBrowserEnv || platform.hasStandardBrowserWebWorkerEnv) {\n headers.setContentType(undefined); // Let the browser set it\n } else if ((contentType = headers.getContentType()) !== false) {\n // fix semicolon duplication issue for ReactNative FormData implementation\n const [type, ...tokens] = contentType ? contentType.split(';').map(token => token.trim()).filter(Boolean) : [];\n headers.setContentType([type || 'multipart/form-data', ...tokens].join('; '));\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 withXSRFToken && utils.isFunction(withXSRFToken) && (withXSRFToken = withXSRFToken(newConfig));\n\n if (withXSRFToken || (withXSRFToken !== false && isURLSameOrigin(newConfig.url))) {\n // Add xsrf header\n const xsrfValue = xsrfHeaderName && xsrfCookieName && cookies.read(xsrfCookieName);\n\n if (xsrfValue) {\n headers.set(xsrfHeaderName, xsrfValue);\n }\n }\n }\n\n return newConfig;\n}\n\n"],"mappings":"AAAA,OAAOA,QAAQ,MAAM,sBAAsB;AAC3C,OAAOC,KAAK,MAAM,aAAa;AAC/B,OAAOC,eAAe,MAAM,sBAAsB;AAClD,OAAOC,OAAO,MAAM,cAAc;AAClC,OAAOC,aAAa,MAAM,0BAA0B;AACpD,OAAOC,WAAW,MAAM,wBAAwB;AAChD,OAAOC,YAAY,MAAM,yBAAyB;AAClD,OAAOC,QAAQ,MAAM,eAAe;AAEpC,eAAgBC,MAAM,IAAK;EACzB,MAAMC,SAAS,GAAGJ,WAAW,CAAC,CAAC,CAAC,EAAEG,MAAM,CAAC;EAEzC,IAAI;IAACE,IAAI;IAAEC,aAAa;IAAEC,cAAc;IAAEC,cAAc;IAAEC,OAAO;IAAEC;EAAI,CAAC,GAAGN,SAAS;EAEpFA,SAAS,CAACK,OAAO,GAAGA,OAAO,GAAGR,YAAY,CAACU,IAAI,CAACF,OAAO,CAAC;EAExDL,SAAS,CAACQ,GAAG,GAAGV,QAAQ,CAACH,aAAa,CAACK,SAAS,CAACS,OAAO,EAAET,SAAS,CAACQ,GAAG,EAAER,SAAS,CAACU,iBAAiB,CAAC,EAAEX,MAAM,CAACY,MAAM,EAAEZ,MAAM,CAACa,gBAAgB,CAAC;;EAE9I;EACA,IAAIN,IAAI,EAAE;IACRD,OAAO,CAACQ,GAAG,CAAC,eAAe,EAAE,QAAQ,GACn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