katoikia-app/web-ui/web-react/node_modules/.cache/babel-loader/ebbfb1786fa0513e5e29647789e...

1 line
6.1 KiB
JSON

{"ast":null,"code":"'use strict';\n\nvar utils = require('./../utils');\n\nvar transformData = require('./transformData');\n\nvar isCancel = require('../cancel/isCancel');\n\nvar defaults = require('../defaults');\n/**\n * Throws a `Cancel` if cancellation has been requested.\n */\n\n\nfunction throwIfCancellationRequested(config) {\n if (config.cancelToken) {\n config.cancelToken.throwIfRequested();\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 * @returns {Promise} The Promise to be fulfilled\n */\n\n\nmodule.exports = function dispatchRequest(config) {\n throwIfCancellationRequested(config); // Ensure headers exist\n\n config.headers = config.headers || {}; // Transform request data\n\n config.data = transformData(config.data, config.headers, config.transformRequest); // Flatten headers\n\n config.headers = utils.merge(config.headers.common || {}, config.headers[config.method] || {}, config.headers);\n utils.forEach(['delete', 'get', 'head', 'post', 'put', 'patch', 'common'], function cleanHeaderConfig(method) {\n delete config.headers[method];\n });\n var adapter = config.adapter || defaults.adapter;\n return adapter(config).then(function onAdapterResolution(response) {\n throwIfCancellationRequested(config); // Transform response data\n\n response.data = transformData(response.data, response.headers, config.transformResponse);\n return response;\n }, function onAdapterRejection(reason) {\n if (!isCancel(reason)) {\n throwIfCancellationRequested(config); // Transform response data\n\n if (reason && reason.response) {\n reason.response.data = transformData(reason.response.data, reason.response.headers, config.transformResponse);\n }\n }\n\n return Promise.reject(reason);\n });\n};","map":{"version":3,"names":["utils","require","transformData","isCancel","defaults","throwIfCancellationRequested","config","cancelToken","throwIfRequested","module","exports","dispatchRequest","headers","data","transformRequest","merge","common","method","forEach","cleanHeaderConfig","adapter","then","onAdapterResolution","response","transformResponse","onAdapterRejection","reason","Promise","reject"],"sources":["/Users/paolasanchez/Desktop/Pry4/Katoikia/katoikia-app/web-ui/sakai-react/node_modules/axios/lib/core/dispatchRequest.js"],"sourcesContent":["'use strict';\n\nvar utils = require('./../utils');\nvar transformData = require('./transformData');\nvar isCancel = require('../cancel/isCancel');\nvar defaults = require('../defaults');\n\n/**\n * Throws a `Cancel` if cancellation has been requested.\n */\nfunction throwIfCancellationRequested(config) {\n if (config.cancelToken) {\n config.cancelToken.throwIfRequested();\n }\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 * @returns {Promise} The Promise to be fulfilled\n */\nmodule.exports = function dispatchRequest(config) {\n throwIfCancellationRequested(config);\n\n // Ensure headers exist\n config.headers = config.headers || {};\n\n // Transform request data\n config.data = transformData(\n config.data,\n config.headers,\n config.transformRequest\n );\n\n // Flatten headers\n config.headers = utils.merge(\n config.headers.common || {},\n config.headers[config.method] || {},\n config.headers\n );\n\n utils.forEach(\n ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'],\n function cleanHeaderConfig(method) {\n delete config.headers[method];\n }\n );\n\n var adapter = config.adapter || defaults.adapter;\n\n return adapter(config).then(function onAdapterResolution(response) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n response.data = transformData(\n response.data,\n response.headers,\n config.transformResponse\n );\n\n return response;\n }, function onAdapterRejection(reason) {\n if (!isCancel(reason)) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n if (reason && reason.response) {\n reason.response.data = transformData(\n reason.response.data,\n reason.response.headers,\n config.transformResponse\n );\n }\n }\n\n return Promise.reject(reason);\n });\n};\n"],"mappings":"AAAA;;AAEA,IAAIA,KAAK,GAAGC,OAAO,CAAC,YAAD,CAAnB;;AACA,IAAIC,aAAa,GAAGD,OAAO,CAAC,iBAAD,CAA3B;;AACA,IAAIE,QAAQ,GAAGF,OAAO,CAAC,oBAAD,CAAtB;;AACA,IAAIG,QAAQ,GAAGH,OAAO,CAAC,aAAD,CAAtB;AAEA;AACA;AACA;;;AACA,SAASI,4BAAT,CAAsCC,MAAtC,EAA8C;EAC5C,IAAIA,MAAM,CAACC,WAAX,EAAwB;IACtBD,MAAM,CAACC,WAAP,CAAmBC,gB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