{"version":3,"sources":["jsdelivr-header.js","/npm/@hcfy/fetch-error@1.1.0/dist/index.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA,ACNA,aAGA,SAAS,OAAO,GACZ,OAAI,aAAa,MACN,EAAE,QAEN,8CACX,CAPA,OAAO,eAAe,QAAS,aAAc,CAAE,OAAO,IACtD,QAAQ,kBAAe,EAOvB,MAAM,mBAAmB,MACrB,QACA,SACA,WAAA,CAAY,EAAO,GACf,MAAM,EAAQ,aAAiB,SAC/B,MAAM,EAAQ,mCAAmC,EAAM,UAAY,OAAO,IAC1E,KAAK,QAAU,EACf,KAAK,KAAO,aACR,EACA,KAAK,SAAW,EAGhB,KAAK,MAAQ,CAErB,EAGJ,SAAS,aAAa,GAClB,OAAO,aAAa,UACxB,CAHA,QAAQ,QAAU,WAIlB,QAAQ,aAAe","file":"/npm/@hcfy/fetch-error@1.1.0/dist/index.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/@hcfy/fetch-error@1.1.0/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.isFetchError = void 0;\nfunction getMsg(x) {\n    if (x instanceof Error) {\n        return x.message;\n    }\n    return 'Unknown error. See `error.cause` for detail.';\n}\nclass FetchError extends Error {\n    request;\n    response;\n    constructor(cause, request) {\n        const isRes = cause instanceof Response;\n        super(isRes ? `Request failed with status code ${cause.status}.` : getMsg(cause));\n        this.request = request;\n        this.name = 'FetchError';\n        if (isRes) {\n            this.response = cause;\n        }\n        else {\n            this.cause = cause;\n        }\n    }\n}\nexports.default = FetchError;\nfunction isFetchError(e) {\n    return e instanceof FetchError;\n}\nexports.isFetchError = isFetchError;\n"]}