{"version":3,"sources":["jsdelivr-header.js","/npm/autoprefixer-stylus@1.0.0/index.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA,ACNA,MAAM,aAAe,QAAQ,gBACvB,QAAU,QAAQ,WAClB,IAAM,QAAQ,yBACd,KAAO,QAAQ,QAcrB,OAAO,QAAU,SAAS,EAAO,CAAC,GAEhC,MAAM,GAAgB,EAAK,aAG3B,cAFO,EAAK,aAEL,SAAS,GAEd,MAAM,GADN,EAAQ,MAAQ,GACO,QAAQ,SAE/B,EAAM,GAAG,OAAO,SAAS,EAAK,GAC5B,GAAI,EAAK,MAAM,IAAI,MAAM,GAEzB,MAAM,EAAc,CAClB,KAAM,EACN,GACE,KAAK,KACH,KAAK,QAAQ,GACb,KAAK,SAAS,EAAU,KAAK,QAAQ,KACnC,QAIJ,EAAM,YACR,EAAY,IAAM,CAAE,YAAY,IAIlC,IAAI,EAAM,QAAQ,CAAC,aAAa,KAAQ,QAAQ,EAAK,GAGrD,GAAI,EAAI,KAAO,EAAM,UAAW,CAC9B,IAAI,EAAc,IAAI,SAAS,CAC7B,cAAe,EAAI,IAAI,WACvB,YAAa,EAAM,YAIrB,EAAM,UAAY,KAAK,MAAM,EAC/B,CAOA,OALI,GACF,EAAI,WAAW,QAAQ,QAAQ,OAI1B,EAAI,GACb,GACF,CACF","file":"/npm/autoprefixer-stylus@1.0.0/index.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.37.0.\n * Original file: /npm/autoprefixer-stylus@1.0.0/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","const autoprefixer = require('autoprefixer')\nconst postcss = require('postcss')\nconst map = require('multi-stage-sourcemap')\nconst path = require('path')\n\n/**\n * Returns a stylus function that autoprefixes css.\n *\n * - Grabs any arguments passed, filters down to only string\n *   args, as anything other than a string crashes autoprefixer\n * - Returns a function for stylus to use\n * - This function uses the `end` event, and runs autoprefixer on\n *   the css, applying any arguments if present\n *\n * @return {Function} - stylus plugin function\n */\n\nmodule.exports = function(opts = {}) {\n  // pull `hideWarnings` out so we can pass opts to autoprefixer\n  const showWarnings = !opts.hideWarnings\n  delete opts.hideWarnings\n\n  return function(style) {\n    style = this || style\n    const filename = style.options.filename\n\n    style.on('end', function(err, css) {\n      if (err) throw new Error(err)\n      // configure the options to be passed to autoprefixer\n      const processOpts = {\n        from: filename,\n        to:\n          path.join(\n            path.dirname(filename),\n            path.basename(filename, path.extname(filename))\n          ) + '.css'\n      }\n\n      // if there is a stylus sourcemap, ensure autoprefixer also generates one\n      if (style.sourcemap) {\n        processOpts.map = { annotation: false }\n      }\n\n      // run autoprefixer\n      var res = postcss([autoprefixer(opts)]).process(css, processOpts)\n\n      // if sourcemaps are generated, combine the two\n      if (res.map && style.sourcemap) {\n        var combinedMap = map.transfer({\n          fromSourceMap: res.map.toString(),\n          toSourceMap: style.sourcemap\n        })\n\n        // then set the combined result as the new sourcemap\n        style.sourcemap = JSON.parse(combinedMap)\n      }\n\n      if (showWarnings) {\n        res.warnings().forEach(console.error)\n      }\n\n      // return the css output\n      return res.css\n    })\n  }\n}\n"]}