{"version":3,"sources":["jsdelivr-header.js","/npm/@socket-mesh/server@18.1.5/dist/index.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA,OCNO,SAAU,cACR,WAAc,qBACd,iBAAoB,4BACpB,WAAc,qBAShB,SAAS,OAAO,EAAQ,GAK3B,OAJe,MAAX,IACA,EAAU,CAAC,GAEf,EAAQ,OAAS,EACV,IAAI,OAAO,EACtB,QACO,SAAS,OAAO,EAAM,EAAS,GACX,mBAAZ,GACP,EAAK,EACL,EAAU,CAAC,GAEL,IACN,EAAU,CAAC,GAEf,MAAM,EAAS,KAAK,cAAa,CAAC,EAAK,KACnC,EAAI,UAAU,KACd,EAAI,IAAI,kBAAkB,IAE9B,EAAQ,OAAS,EACjB,MAAM,EAAsB,OAAO,EAAQ,GAE3C,OADA,EAAO,OAAO,EAAM,GACb,CACX","file":"/npm/@socket-mesh/server@18.1.5/dist/index.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/@socket-mesh/server@18.1.5/dist/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","import http from 'http';\nimport { Server } from './server.js';\nexport { ServerSocket } from './server-socket.js';\nexport { Server } from './server.js';\n/**\n * Captures upgrade requests for a http.Server.\n *\n * @param {http.Server} server\n * @param {Object} options\n * @return {AGServer} websocket cluster server\n * @api public\n */\nexport function attach(server, options) {\n    if (options == null) {\n        options = {};\n    }\n    options.server = server;\n    return new Server(options);\n}\nexport function listen(port, options, fn) {\n    if (typeof options === 'function') {\n        fn = options;\n        options = {};\n    }\n    else if (!options) {\n        options = {};\n    }\n    const server = http.createServer((req, res) => {\n        res.writeHead(501);\n        res.end('Not Implemented');\n    });\n    options.server = server;\n    const socketClusterServer = attach(server, options);\n    server.listen(port, fn);\n    return socketClusterServer;\n}\n;\n"]}