GoScrobble/web/node_modules/.cache/babel-loader/e5346e06e39c18d41cfe7683f7bd4948.json

1 line
6.6 KiB
JSON
Raw Permalink Normal View History

2022-04-25 02:47:15 +00:00
{"ast":null,"code":"'use strict';\n\nvar utils = require('./../utils');\n\nmodule.exports = utils.isStandardBrowserEnv() ? // Standard browser envs have full support of the APIs needed to test\n// whether the request URL is of the same origin as current location.\nfunction standardBrowserEnv() {\n var msie = /(msie|trident)/i.test(navigator.userAgent);\n var urlParsingNode = document.createElement('a');\n var originURL;\n /**\n * Parse a URL to discover it's components\n *\n * @param {String} url The URL to be parsed\n * @returns {Object}\n */\n\n function resolveURL(url) {\n var href = url;\n\n if (msie) {\n // IE needs attribute set twice to normalize properties\n urlParsingNode.setAttribute('href', href);\n href = urlParsingNode.href;\n }\n\n urlParsingNode.setAttribute('href', href); // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils\n\n return {\n href: urlParsingNode.href,\n protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '',\n host: urlParsingNode.host,\n search: urlParsingNode.search ? urlParsingNode.search.replace(/^\\?/, '') : '',\n hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '',\n hostname: urlParsingNode.hostname,\n port: urlParsingNode.port,\n pathname: urlParsingNode.pathname.charAt(0) === '/' ? urlParsingNode.pathname : '/' + urlParsingNode.pathname\n };\n }\n\n originURL = resolveURL(window.location.href);\n /**\n * Determine if a URL shares the same origin as the current location\n *\n * @param {String} requestURL The URL to test\n * @returns {boolean} True if URL shares the same origin, otherwise false\n */\n\n return function isURLSameOrigin(requestURL) {\n var parsed = utils.isString(requestURL) ? resolveURL(requestURL) : requestURL;\n return parsed.protocol === originURL.protocol && parsed.host === originURL.host;\n };\n}() : // Non standard browser envs (web workers, react-native) lack needed support.\nfunction nonStandardBrowserEnv() {\n return function isURLSameOrigin() {\n return true;\n };\n}();","map":{"version":3,"sources":["/app/node_modules/axios/lib/helpers/isURLSameOrigin.js"],"names":["utils","require","module","exports","isStandardBrowserEnv","standardBrowserEnv","msie","test","navigator","userAgent","urlParsingNode","document","createElement","originURL","resolveURL","url","href","setAttribute","protocol","replace","host","search","hash","hostname","port","pathname","charAt","window","location","isURLSameOrigin","requestURL","parsed","isString","nonStandardBrowserEnv"],"mappings":"AAAA;;AAEA,IAAIA,KAAK,GAAGC,OAAO,CAAC,YAAD,CAAnB;;AAEAC,MAAM,CAACC,OAAP,GACEH,KAAK,CAACI,oBAAN,KAEA;AACA;AACG,SAASC,kBAAT,GAA8B;AAC7B,MAAIC,IAAI,GAAG,kBAAkBC,IAAlB,CAAuBC,SAAS,CAACC,SAAjC,CAAX;AACA,MAAIC,cAAc,GAAGC,QAAQ,CAACC,aAAT,CAAuB,GAAvB,CAArB;AACA,MAAIC,SAAJ;AAEA;AACN;AACA;AACA;AACA;AACA;;AACM,WAASC,UAAT,CAAoBC,GAApB,EAAyB;AACvB,QAAIC,IAAI,GAAGD,GAAX;;AAEA,QAAIT,IAAJ,EAAU;AACV;AACEI,MAAAA,cAAc,CAACO,YAAf,CAA4B,MAA5B,EAAoCD,IAApC;AACAA,MAAAA,IAAI,GAAGN,cAAc,CAACM,IAAtB;AACD;;AAEDN,IAAAA,cAAc,CAACO,YAAf,CAA4B,MAA5B,EAAoCD,IAApC,EATuB,CAWvB;;AACA,WAAO;AACLA,MAAAA,IAAI,EAAEN,cAAc,CAACM,IADhB;AAELE,MAAAA,QAAQ,EAAER,cAAc,CAACQ,QAAf,GAA0BR,cAAc,CAACQ,QAAf,CAAwBC,OAAxB,CAAgC,IAAhC,EAAsC,EAAtC,CAA1B,GAAsE,EAF3E;AAGLC,MAAAA,IAAI,EAAEV,cAAc,CAACU,IAHhB;AAILC,MAAAA,MAAM,EAAEX,cAAc,CAACW,MAAf,GAAwBX,cAAc,CAACW,MAAf,CAAsBF,OAAtB,CAA8B,KAA9B,EAAqC,EAArC,CAAxB,GAAmE,EAJtE;AAKLG,MAAAA,IAAI,EAAEZ,cA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