{"version":3,"sources":["jsdelivr-header.js","/npm/citationstyles@0.0.3-228dee2/csl.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA,ACJA,IAAI,GAAK,QAAQ,YACb,KAAO,QAAQ,QACf,MAAQ,QAAQ,SAEhB,OAAS,QAAQ,iBACjB,IAAM,CAAC,EACP,OAAS,GAEb,OAAO,OAAS,OAAO,SACvB,OAAO,QAAU,IAKjB,IAAI,KAAO,SAAe,GAExB,IAAK,OAAO,OACV,OAAO,EAAS,IAAI,MAAM,qBAG1B,EAAS,KAAM,OAGnB,EAQC,WAGC,IAAI,EAAS,KAAK,QAAQ,KAAK,KAAK,OAAO,OAAQ,MAAQ,OAAO,OAAO,aAGrE,EAAQ,GAAG,YAAY,GAGtB,GACH,SAAS,KAAO,IAAI,MAAM,oBAM5B,EAAM,SAAS,SAAgB,GAG3B,GAAI,KAAK,QAAQ,KAAU,OAAO,IAAK,CAGrC,IAAI,EAAM,CACR,GAAM,EAAK,QAAQ,OAAO,IAAK,IAC/B,KAAQ,KAAK,QAAQ,OAAO,OAAQ,KAAM,OAAO,OAAO,YAAa,IAIvE,OAAO,KAAK,EACd,CAEJ,GACF,CAhCA","file":"/npm/citationstyles@0.0.3-228dee2/csl.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/citationstyles@0.0.3-228dee2/csl.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","// # Setup    \n// \nvar fs = require('fs-extra'),\n    path = require('path'),\n    async = require('async'),\n    // non-modules\n    config = require('./config.json'),\n    csl = {},\n    styles = [];\n\nconfig.mypath = module.filename;\nmodule.exports = csl;\n\n// \n// # API\n// \ncsl.list = function list (callback) {\n\n  if (!styles.length) {\n    return callback(new Error(\"No styles found!\"));\n  } \n  else {\n    callback(null, styles);\n  }\n\n};\n\n// \n// # Internals\n// \n// ## Init\n// \n// everything is \"sync\" since here since it happens when we are `require`d.\n(function initSync() {\n  \n  // \"independent\" styles only, for now\n  var source = path.resolve(path.join(config.mypath, '..'),  config.source.independent);\n\n  // - get list of independent styles …\n  var files = fs.readdirSync(source);\n\n  // - catch error/empty result\n  if (!files) { \n    callback(err || new Error(\"No files found!\")); \n  }\n\n  // - filter the non-csl files from `files` list\n  // - make obj for each item, push that to `styles`\n\n  files.forEach( function filter(item) {\n\n      // - if it is \"foo.csl\"\n      if (path.extname(item) === config.ext) {\n    \n        // TODO: read some props from xml…\n        var obj = {\n          \"id\": item.replace(config.ext, ''), // \"foo\"\n          \"path\": path.resolve(config.mypath, '..', config.source.independent, item)\n        };\n\n        // - push to results\n        styles.push(obj);\n      }\n    \n  });\n}());"]}