{"version":3,"sources":["jsdelivr-header.js","/npm/webpack-hashed-chunk-id-plugin@1.0.3-beta/index.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA,ACNA,aACA,MAAM,OAAS,QAAQ,UACjB,MAAQ,QAAQ,QAEtB,SAAS,qBAAqB,EAAU,CAAC,GACvC,KAAK,QAAU,OAAO,OACpB,CACE,OAAQ,GAEV,EAEJ,CAEA,qBAAqB,UAAU,MAAQ,SAAS,GAC9C,IAAI,EAAU,KAAK,QACnB,EAAS,OAAO,eAAe,SAAS,GACtC,EAAY,OAAO,mBAAmB,SAAS,GAC7C,MAAM,EAAS,IAAI,IACnB,EAAO,SAAQ,IACb,IAAI,EACD,EAAM,aAAe,EAAM,YAAY,UACvC,EAAM,aAAe,EAAM,YAAY,MACxC,EAAM,KAER,EAAO,MAAM,SAAS,KAAM,GAC5B,IAAI,EAAO,OACR,WAAW,OACX,OAAO,GACP,OAAO,OAEN,EAAM,OAAO,EAAQ,QACzB,KAAO,EAAO,IAAI,EAAK,OAAO,EAAG,KAC/B,IAEF,EAAO,EAAK,OAAO,EAAG,GACtB,EAAO,IAAI,GACX,EAAM,GAAK,IAEf,GACF,GACF,EAEA,OAAO,QAAU","file":"/npm/webpack-hashed-chunk-id-plugin@1.0.3-beta/index.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/webpack-hashed-chunk-id-plugin@1.0.3-beta/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'\nconst crypto = require('crypto')\nconst _path = require('path')\n\nfunction hashedChunkIdsPlugin(options = {}) {\n  this.options = Object.assign(\n    {\n      length: 4\n    },\n    options\n  )\n}\n\nhashedChunkIdsPlugin.prototype.apply = function(compiler) {\n  let options = this.options\n  compiler.plugin('compilation', function(compilation) {\n    compilation.plugin('optimize-chunks', function(chunks) {\n      const hashes = new Set()\n      chunks.forEach(chunk => {\n        let path =\n          (chunk.entryModule && chunk.entryModule.resource) ||\n          (chunk.entryModule && chunk.entryModule.name) ||\n          chunk.name\n\n        path = _path.relative('./', path)\n        let hash = crypto\n          .createHash('md5')\n          .update(path)\n          .digest('hex')\n\n        let len = Number(options.length)\n        while (hashes.has(hash.substr(0, len))) {\n          len++\n        }\n        hash = hash.substr(0, len)\n        hashes.add(hash)\n        chunk.id = hash\n      })\n    })\n  })\n}\n\nmodule.exports = hashedChunkIdsPlugin\n"]}