{"version":3,"sources":["jsdelivr-header.js","/npm/axios-with-cookies@1.0.2/dist/index.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA,ACNA,aACA,OAAO,eAAe,QAAS,aAAc,CAAE,OAAO,IACtD,QAAQ,aAAU,EAClB,MAAM,OAAS,QAAQ,0BACvB,SAAS,mBAAmB,GACxB,IAAK,EAAO,IACR,OAAO,EAGX,IAAmB,IAAf,EAAO,IACP,MAAM,IAAI,MAAM,2EAIpB,OAFA,EAAO,UAAY,EAAO,WAAa,IAAI,OAAO,gBAAgB,CAAE,QAAS,CAAE,IAAK,EAAO,OAC3F,EAAO,WAAa,EAAO,YAAc,IAAI,OAAO,iBAAiB,CAAE,QAAS,CAAE,IAAK,EAAO,OACvF,CACX,CACA,SAAS,QAAQ,GAEb,GADkB,EAAM,aAAa,QAAQ,SAAS,MAAK,EAAG,eAAgB,IAAc,qBAExF,OAAO,EAGX,GADA,EAAM,aAAa,QAAQ,IAAI,oBAC3B,WAAY,EAAO,CACnB,MAAM,EAAS,EAAM,OACrB,EAAM,OAAS,IAAI,KACf,MAAM,EAAW,EAAO,MAAM,EAAO,GAErC,OADA,EAAS,aAAa,QAAQ,IAAI,oBAC3B,CAAQ,CAEvB,CACA,OAAO,CACX,CACA,QAAQ,QAAU","file":"/npm/axios-with-cookies@1.0.2/dist/index.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/axios-with-cookies@1.0.2/dist/index.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.wrapper = void 0;\nconst http_1 = require(\"http-cookie-agent/http\");\nfunction requestInterceptor(config) {\n    if (!config.jar) {\n        return config;\n    }\n    // @ts-expect-error ...\n    if (config.jar === true) {\n        throw new Error('config.jar does not accept boolean since axios-cookiejar-support@2.0.0.');\n    }\n    config.httpAgent = config.httpAgent || new http_1.HttpCookieAgent({ cookies: { jar: config.jar } });\n    config.httpsAgent = config.httpsAgent || new http_1.HttpsCookieAgent({ cookies: { jar: config.jar } });\n    return config;\n}\nfunction wrapper(axios) {\n    const isWrapped = axios.interceptors.request.handlers.find(({ fulfilled }) => fulfilled === requestInterceptor);\n    if (isWrapped) {\n        return axios;\n    }\n    axios.interceptors.request.use(requestInterceptor);\n    if ('create' in axios) {\n        const create = axios.create;\n        axios.create = (...args) => {\n            const instance = create.apply(axios, args);\n            instance.interceptors.request.use(requestInterceptor);\n            return instance;\n        };\n    }\n    return axios;\n}\nexports.wrapper = wrapper;\n"]}