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EA,WACZ,MAAM,QAAQ,GAChB,EAAM,SAAQ,SAAU,GACtB,EAAI,EACN,IACK,EAAI,EACb,EAEJ,CAZK,CAYH,EAAM,IAIZ,OAAO,CACT,EAEO,EAGP,SAAS,EAAI,GAEX,GADqB,iBAAV,IAAoB,EAAQ,CAAC,IACnB,IAAjB,EAAM,OAAV,CACA,KAAM,aAAiB,OAAQ,MAAM,IAAI,MAAM,0CAA4C,GAC3F,IAAI,EAAW,KAAK,KAAK,QAAQ,MAAO,sBACpC,EAAU,KAAK,KAAK,EAA+B,UAArB,QAAQ,SAAuB,WAAa,QAC1E,EAAU,CAAE,MAAO,CAAC,EAAG,EAAG,IACL,UAArB,QAAQ,WAAsB,EAAQ,OAAQ,GAClD,GAAG,UAAU,EAAS,EAAO,EANL,CAO1B,CACF","file":"/npm/gulp-nodemon@2.5.0/index.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/gulp-nodemon@2.5.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\nvar nodemon\n  , colors  = require('colors')\n  , gulp    = require('gulp')\n  , cp      = require('child_process')\n  , bus     = require('nodemon/lib/utils/bus')\n  , path    = require('path')\n\nmodule.exports = function (options) {\n  options = options || {};\n\n  // plug nodemon\n  if (options.nodemon && typeof options.nodemon === 'function') {\n    nodemon = options.nodemon\n    delete options.nodemon\n  } else {\n    nodemon = require('nodemon')\n  }\n\n  // Our script\n  var script            = nodemon(options)\n    , originalOn        = script.on\n    , originalListeners = bus.listeners('restart')\n\n  // Allow for injection of tasks on file change\n  if (options.tasks) {\n    // Remove all 'restart' listeners\n    bus.removeAllListeners('restart')\n\n    // Place our listener in first position\n    bus.on('restart', function (files){\n      if (!options.quiet) nodemonLog('running tasks...')\n\n      if (typeof options.tasks === 'function') run(options.tasks(files))\n      else run(options.tasks)\n    })\n\n    // Re-add all other listeners\n    for (var i = 0; i < originalListeners.length; i++) {\n      bus.on('restart', originalListeners[i])\n    }\n  }\n\n  // Capture ^C\n  process.once('SIGINT', function () {\n    script.emit('quit')\n    script.quitEmitted = true\n  })\n  script.on('exit', function () {\n    // Ignore exit event during restart\n    if (script.quitEmitted) {\n      // Properly signal async completion by calling the callback provided by gulp\n      if (typeof options.done === \"function\") {\n        options.done()\n      }\n\n      process.exit(0)\n    }\n  })\n\n  // Forward log messages and stdin\n  script.on('log', function (log){\n    nodemonLog(log.colour)\n  })\n\n  // Shim 'on' for use with gulp tasks\n  script.on = function (event, tasks){\n    var tasks = Array.prototype.slice.call(arguments)\n      , event = tasks.shift()\n\n    if (event === 'change') {\n      script.changeTasks = tasks\n    } else {\n      for (var i = 0; i < tasks.length; i++) {\n        void function (tasks){\n          if (tasks instanceof Function) {\n            originalOn(event, tasks)\n          } else {\n            originalOn(event, function (){\n              if (Array.isArray(tasks)) {\n                tasks.forEach(function (task){\n                  run(task)\n                })\n              } else run(tasks)\n            })\n          }\n        }(tasks[i])\n      }\n    }\n\n    return script\n  }\n\n  return script\n\n  // Synchronous alternative to gulp.run()\n  function run(tasks) {\n    if (typeof tasks === 'string') tasks = [tasks]\n    if (tasks.length === 0) return\n    if (!(tasks instanceof Array)) throw new Error('Expected task name or array but found: ' + tasks)\n    var gulpPath = path.join(process.cwd(), 'node_modules/.bin/')\n    var gulpCmd = path.join(gulpPath, process.platform === 'win32' ? 'gulp.cmd' : 'gulp')\n    var options = { stdio: [0, 1, 2] }\n    if (process.platform === 'win32') options.shell = true\n    cp.spawnSync(gulpCmd, tasks, options)\n  }\n}\n\nfunction nodemonLog(message){\n  console.log('[' + new Date().toString().split(' ')[4].gray + '] ' + message)\n}\n"]}