{"version":3,"sources":["jsdelivr-header.js","/npm/ss-stylus@0.1.9/wrapper.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA,ACJA,IAGI,iBAHA,GAAK,QAAQ,MACb,OAAS,QAAQ,UACjB,IAAM,QAAQ,OAGlB,QAAQ,cAAgB,SAAS,GACD,iBAApB,IACR,iBAAmB,EAEvB,EAEA,QAAQ,KAAO,SAAS,EAAM,GAE5B,MAAO,CAEL,KAAM,SAEN,WAAY,CAAC,OAAQ,UAErB,UAAW,MAEX,YAAa,WAEb,QAAS,SAAS,EAAM,EAAS,GAG/B,IAAI,EAAM,EAAK,MAAM,KAAM,EAAI,MAE/B,IAAI,EAAQ,GAAG,aAAa,EAAM,QAEnB,GAAW,EAAQ,SAE/B,mBACD,EAAQ,iBAAmB,KAAO,GAGpC,IAAI,EAAM,OAAO,EAAO,CAAC,SAAU,EAAM,MAAO,CAAC,EAAI,KAAK,QAC1D,IAAK,IAAI,KAAK,EACZ,EAAI,IAAI,EAAG,EAAO,IAEpB,EAAI,IAAI,OACL,QAAO,SAAS,EAAK,GACtB,GAAI,EAAK,CACP,IAAI,EAAU,gDACd,QAAQ,IAAI,OAAO,UAAU,eAAe,QAAU,EAAQ,KAAO,EAAS,GAC9E,QAAQ,IAAI,EACd,CACA,EAAG,EACL,GACF,EAEJ","file":"/npm/ss-stylus@0.1.9/wrapper.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/ss-stylus@0.1.9/wrapper.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","// Stylus 'CSS' wrapper for SocketStream 0.3\n\nvar fs = require('fs'),\n    stylus = require('stylus'),\n    nib = require('nib'),\n    _prependedStylus;\n\nexports.prependStylus = function(prependedStylus) {\n  if(typeof prependedStylus === 'string') {\n    _prependedStylus = prependedStylus;\n  }\n};\n\nexports.init = function(root, config) {\n\n  return {\n\n    name: 'Stylus',\n\n    extensions: ['styl', 'stylus'],\n\n    assetType: 'css',\n\n    contentType: 'text/css',\n\n    compile: function(path, options, cb) {\n      \n      // Get dir from path to enable @include commmand\n      var dir = path.split('/'); dir.pop();\n\n      var input = fs.readFileSync(path, 'utf8');\n\n      var compress = options && options.compress;\n\n      if(_prependedStylus) {\n        input = _prependedStylus + '\\n' + input;\n      }\n\n      var sss = stylus(input, {filename: path, paths: [dir.join('/')]});\n      for (var c in config) {\n        sss.set(c, config[c]);\n      }\n      sss.use(nib())\n        .render(function(err, css) {\n        if (err) {\n          var message = '! - Unable to compile Stylus file %s into CSS';\n          console.log(String.prototype.hasOwnProperty('red') && message.red || message, path);\n          console.log(err);\n        }\n        cb(css);\n      });\n    }\n  };\n};\n"]}