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AQ,OAAO,GAAG,QAAQ,KAAM,KAAQ,sBACxJ,QAAQ,SAAU,UAC9B,IAAI,MAAM,GAGlB,MADA,QAAQ,IAAI,GACN,IAAI,MAAM,qBAClB,CACA,KAAK,OAAS,EACd,KAAK,KAAO,KAAK,OAAO,KAAO,KAAK,OAAO,KAAO,QAAQ,KAC5D,KAA6B,iBAAX,GAChB,KAAK,OAAS,KAAK,KAAK,GACxB,KAAK,KAAO,KAAK,OAAO,KAAO,KAAK,OAAO,KAAO,IAElD,KAAK,OAAS,CAAC,EACf,KAAK,KAAO,QAAQ,OAKtB,GAHK,KAAK,KAAK,MAAM,SACnB,KAAK,KAAO,EAAK,UAAW,QAAQ,MAAS,IAAM,KAAK,QAEtC,IAAhB,KAAK,OACP,MAAM,IAAI,MAAM,8BAAgC,KAAK,KAAO,MAK9D,OAHK,KAAK,OAAO,OACf,KAAK,OAAO,KAAO,cAEd,IACT,EAEA,OAAO,QAAU,CAElB,GAAE,KAAK","file":"/npm/autocode-js@0.22.0/lib/autocode.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/autocode-js@0.22.0/lib/autocode.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","// Generated by CoffeeScript 1.10.0\n(function() {\n  var autocode, path;\n\n  path = require('path');\n\n  process.env['NODE_TLS_REJECT_UNAUTHORIZED'] = '0';\n\n  global.ErrorInvalid = function(name, type) {\n    this.name = 'ErrorInvalid';\n    return this.message = \"'\" + name + \"' is invalid.\";\n  };\n\n  global.ErrorInvalid.prototype = Error.prototype;\n\n  global.ErrorType = function(name, type) {\n    this.name = 'ErrorType';\n    return this.message = \"'\" + name + \"' must be of type (\" + type + \").\";\n  };\n\n  global.ErrorType.prototype = Error.prototype;\n\n  global.ErrorRequired = function(name) {\n    this.name = 'ErrorRequired';\n    return this.message = \"'\" + name + \"' is required.\";\n  };\n\n  global.ErrorRequired.prototype = Error.prototype;\n\n  autocode = function(config) {\n    var i, len, match, message, method, methods, validate;\n    methods = ['build', 'cache', 'generate', 'init', 'install', 'load', 'run', 'save', 'search', 'stop', 'test', 'update', 'validate'];\n    for (i = 0, len = methods.length; i < len; i++) {\n      method = methods[i];\n      this[method] = require(\"./autocode/\" + method);\n    }\n    if (typeof config === 'object') {\n      validate = this.validate(config);\n      if (!validate.valid) {\n        match = 'Failed \"type\" criteria:';\n        if (validate.errors[0].message.match(match)) {\n          message = validate.errors[0].message.replace(/Failed \"type\" criteria: expecting (.*?), found (.*?)$/, \"`\" + (validate.errors[0].context.substr(2)) + \"` must be a `$1`, not a `$2`.\");\n          message = message.replace(/\\ or\\ /, '` or `');\n          throw new Error(message);\n        }\n        match = 'Failed \"required\" criteria:';\n        if (validate.errors[0].message.match(match)) {\n          message = validate.errors[0].message.replace(/Failed \"required\" criteria: missing property \\((.*?)\\)$/, \"`\" + (validate.errors[0].context.substr(2).replace(/\\//, '.')) + \".$1` is required.\");\n          message = message.replace(/\\ or\\ /, '` or `');\n          throw new Error(message);\n        }\n        console.log(validate);\n        throw new Error(\"Config is invalid.\");\n      }\n      this.config = config;\n      this.path = this.config.path ? this.config.path : process.cwd();\n    } else if (typeof config === 'string') {\n      this.config = this.load(config);\n      this.path = this.config.path ? this.config.path : config;\n    } else {\n      this.config = {};\n      this.path = process.cwd();\n    }\n    if (!this.path.match(/^\\//)) {\n      this.path = path.normalize((process.cwd()) + \"/\" + this.path);\n    }\n    if (this.config === false) {\n      throw new Error(\"Unable to load config for (\" + this.path + \").\");\n    }\n    if (!this.config.host) {\n      this.config.host = 'github.com';\n    }\n    return this;\n  };\n\n  module.exports = autocode;\n\n}).call(this);\n"]}