{"version":3,"sources":["jsdelivr-header.js","/npm/buffer-image-size@0.6.4/lib/index.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA,ACNA,aAEA,IAAI,aAAe,QAAQ,WACvB,SAAW,QAAQ,cAQvB,SAAS,OAAQ,GAEf,IAAI,EAAO,SAAS,GAGpB,GAAI,KAAQ,aAAc,CACxB,IAAI,EAAO,aAAa,GAAM,UAAU,GACxC,IAAa,IAAT,EAEF,OADA,EAAK,KAAO,EACL,CAEX,CAGA,MAAM,IAAI,UAAU,0BAA4B,EAClD,CAKA,OAAO,QAAU,SAAU,GAGzB,GAAI,OAAO,SAAS,GAClB,OAAO,OAAO,GAIhB,MAAM,IAAI,UAAU,mCACtB,EAEA,OAAO,QAAQ,MAAQ,OAAO,KAAK","file":"/npm/buffer-image-size@0.6.4/lib/index.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/buffer-image-size@0.6.4/lib/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","'use strict';\n\nvar typeHandlers = require('./types');\nvar detector = require('./detector');\n\n/**\n * Return size information based on a buffer\n *\n * @param {Buffer} buffer\n * @returns {Object}\n */\nfunction lookup (buffer) {\n  // detect the file type.. don't rely on the extension\n  var type = detector(buffer);\n\n  // find an appropriate handler for this file type\n  if (type in typeHandlers) {\n    var size = typeHandlers[type].calculate(buffer);\n    if (size !== false) {\n      size.type = type;\n      return size;\n    }\n  }\n\n  // throw up, if we don't understand the file\n  throw new TypeError('unsupported file type: ' + type);\n}\n\n/**\n * @param {Buffer|string} input - buffer or relative/absolute path of the image file\n */\nmodule.exports = function (input) {\n\n  // Handle buffer input\n  if (Buffer.isBuffer(input)) {\n    return lookup(input);\n  }\n\n  // input should be a buffer at this point\n  throw new TypeError('expecting only a buffer as input');\n};\n\nmodule.exports.types = Object.keys(typeHandlers);\n"]}