{"version":3,"sources":["jsdelivr-header.js","/npm/connected@0.0.2/index.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA,ACNA,aAeA,OAAO,QAAU,WACf,IAAI,EAAO,MAAM,UAAU,MAAM,KAAK,UAAW,GAC7C,EAAS,EAAK,QACd,EAAK,EAAK,MASd,SAAS,EAAU,GAIjB,GAHA,EAAO,eAAe,QAAS,GAC/B,EAAO,eAAe,YAAa,GAE/B,EAAI,EAAG,MAAM,EAAQ,gBACpB,GAAI,EAAK,MAAM,CACtB,CAaA,MARI,mBAAsB,IACxB,EAAK,KAAK,GACV,EAAK,MAGP,EAAO,KAAK,YAAa,GACzB,EAAO,KAAK,QAAS,GAEd,EAAO,OAAO,MAAM,EAAQ,EACrC","file":"/npm/connected@0.0.2/index.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/connected@0.0.2/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\n/**\n * Simple abstraction to merge the awfully emitted `error` events for listening\n * to a callback.\n *\n * ```js\n * var app = require('net').createServer();\n * require('listening')(app, function (err) {\n *   .. handle listen errors here ..\n * });\n * ```\n *\n * @api public\n */\nmodule.exports = function listen() {\n  var args = Array.prototype.slice.call(arguments, 0)\n    , server = args.shift()\n    , fn = args.pop();\n\n  /**\n   * The actual callback method that is passed in to the server which collects\n   * the different events and passes it to the given callback method.\n   *\n   * @param {Error}\n   * @api private\n   */\n  function collector(err) {\n    server.removeListener('error', collector);\n    server.removeListener('listening', collector);\n\n    if (fn) fn.apply(server, arguments);\n    else if (err) throw err;\n  }\n\n  //\n  // Allow people to supply the server with no callback function.\n  //\n  if ('function' !== typeof fn) {\n    args.push(fn);\n    fn = null;\n  }\n\n  server.once('listening', collector);\n  server.once('error', collector);\n\n  return server.listen.apply(server, args);\n};\n"]}