{"version":3,"sources":["jsdelivr-header.js","/npm/bot-detector@1.0.10/botDetect.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA,ACNA,aACA,IAAI,GAAK,QAAQ,MAEb,QAAU,QAAQ,kBAElB,cAAgB,QAAQ,wBAExB,QAAU,CAAC,EACX,QAAU,OAAO,QAAU,CAAC,EAE5B,UAAY,WACd,QAAQ,IAAI,QACd,EACA,QAAQ,UAAY,UAEpB,IAAI,QAAU,SAAS,GACrB,EAAS,OAAO,KAAK,SAAS,OAChC,EACA,QAAQ,QAAU,QAElB,IAAI,MAAQ,SAAS,GACnB,QAAI,QAAQ,EAId,EACA,QAAQ,MAAQ,MAEhB,IAAI,YAAc,SAAS,GAEzB,IAAK,IAAI,KADT,QAAU,QACW,cACnB,QAAQ,GAAY,cAAc,GAEpC,EAAS,KACX,EAEA,QAAQ,YAAc,YAEtB,aAAY,WACT,SAAQ,SAAS,GACD,IAAV,EACF,QAAQ,IAAI,qDAEZ,QAAQ,IAAI,yCAA2C,EAE5D,GACF","file":"/npm/bot-detector@1.0.10/botDetect.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/bot-detector@1.0.10/botDetect.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';\nvar fs = require('fs');\n// Read bot list from user-agents.org\nvar botlist = require('./botlist.json');\n// Read custom bot list\nvar custombotlist = require('./customBotlist.json');\n\nvar ua_list = {};\nvar exports = module.exports = {};\n\nvar printList = function() {\n  console.log(ua_list);\n}\nexports.printList = printList;\n\nvar uaCount = function(callback) {\n  callback(Object.keys(ua_list).length);\n}\nexports.uaCount = uaCount;\n\nvar isBot = function(ua_string) {\n  if (ua_list[ua_string]) {\n    return true;\n  }\n  return false;\n}\nexports.isBot = isBot;\n\nvar loadBotList = function(callback) {\n  ua_list = botlist;\n  for (var attrname in custombotlist) {\n    ua_list[attrname] = custombotlist[attrname];\n  }\n  callback(null);\n}\n// Added so that tests would wait until the bot list is loaded before executing\nexports.loadBotList = loadBotList;\n\nloadBotList(function() {\n   uaCount(function(count) {\n     if (count === 0) {\n       console.log(\"WARNING: No bot list loaded.  Bot list count is 0\");\n     } else {\n       console.log(\"Bot detector loaded.  Bot list count: \" + count);\n     }\n  });\n});\n"]}