{"version":3,"sources":["jsdelivr-header.js","/npm/broccoli-merge-trees@4.2.0/index.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA,ACNA,aAEA,MAAM,OAAS,QAAQ,mBACjB,WAAa,QAAQ,eAE3B,MAAM,2BAA2B,OAC/B,WAAA,CAAY,EAAY,EAAU,CAAC,GACjC,IAAI,EAAO,yBAA2B,EAAQ,YAAc,IAC5D,IAAK,MAAM,QAAQ,GACjB,MAAM,IAAI,UAAU,EAAO,2BAA6B,EAAY,KAEtE,MAAM,EAAY,CAChB,kBAAkB,EAClB,YAAY,EACZ,WAAY,EAAQ,aAGtB,KAAK,WAAa,EAClB,KAAK,QAAU,CACjB,CAEA,KAAA,GACE,GAAuB,MAAnB,KAAK,WAAoB,CAG3B,IAAI,EAAa,GAAG,KAAK,aAAa,KAAK,QAAQ,QAAU,IAAM,KAAK,QAAQ,QAAU,KAC1F,KAAK,WAAa,IAAI,WAAW,KAAK,WAAY,EAAY,CAC5D,UAAW,KAAK,QAAQ,UACxB,WAAY,KAAK,QAAQ,YAE7B,CAEA,IACE,KAAK,WAAW,OAClB,CAAE,MAAM,GACN,GAAY,OAAR,GAA+B,iBAAR,EAAkB,CAC3C,IAAI,EAAY,KAAK,WAAW,KAAI,CAAC,EAAM,IAAM,KAAK,EAAE,OAAO,EAAK,eAAc,KAAK,MACnF,EAAU,GAAG,KAAK,kDAAkD,IAExE,EAAI,QAAU,GAAG,MAAY,EAAI,SACnC,CACA,MAAM,CACR,CACF,EAGF,OAAO,QAAU,YAAuB,GACtC,OAAO,IAAI,sBAAsB,EACnC,EAEA,OAAO,QAAQ,WAAa","file":"/npm/broccoli-merge-trees@4.2.0/index.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.19.2.\n * Original file: /npm/broccoli-merge-trees@4.2.0/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\nconst Plugin = require('broccoli-plugin');\nconst MergeTrees = require('merge-trees');\n\nclass BroccoliMergeTrees extends Plugin {\n  constructor(inputNodes, options = {}) {\n    let name = 'broccoli-merge-trees:' + (options.annotation || '');\n    if (!Array.isArray(inputNodes)) {\n      throw new TypeError(name + ': Expected array, got: [' + inputNodes +']');\n    }\n    super(inputNodes, {\n      persistentOutput: true,\n      needsCache: false,\n      annotation: options.annotation\n    });\n\n    this.inputNodes = inputNodes;\n    this.options = options;\n  }\n\n  build() {\n    if (this.mergeTrees == null) {\n      // Defer instantiation until the first build because we only\n      // have this.inputPaths and this.outputPath once we build.\n      let outputPath = `${this.outputPath}${this.options.destDir ? '/' + this.options.destDir : ''}`;\n      this.mergeTrees = new MergeTrees(this.inputPaths, outputPath, {\n        overwrite: this.options.overwrite,\n        annotation: this.options.annotation\n      });\n    }\n\n    try {\n      this.mergeTrees.merge();\n    } catch(err) {\n      if (err !== null && typeof err === 'object') {\n        let nodesList = this.inputNodes.map((node, i) => `  ${i+1}.  ${node.toString()}`).join('\\n');\n        let message = `${this.toString()} error while merging the following:\\n${nodesList}`;\n\n        err.message = `${message}\\n${err.message}`;\n      }\n      throw err;\n    }\n  }\n}\n\nmodule.exports = function mergeTrees(...params) {\n  return new BroccoliMergeTrees(...params);\n};\n\nmodule.exports.MergeTrees = BroccoliMergeTrees;\n"]}