{"version":3,"sources":["jsdelivr-header.js","/npm/localhost.daplie.com-certificates@1.2.5/lib/index.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA,ACNA,aAQA,IAAI,GAAK,QAAQ,MACb,KAAO,QAAQ,QAKf,WAAa,CACf,IAAK,GAAG,aAAa,KAAK,KAAK,UAAW,KAAM,gBAChD,KAAM,GAAG,aAAa,KAAK,KAAK,UAAW,KAAM,kBACjD,aAAa,EACb,oBAAoB,GAElB,cAAgB,QAAQ,OAAO,oBAAoB,YACnD,QAAU,CACZ,IAAK,WAAW,IAChB,KAAM,WAAW,KACjB,YAAa,WAAW,YACxB,mBAAoB,WAAW,mBAG/B,YAAa,SAAU,EAAY,GAKjC,GAAI,mBAAsB,EAIxB,OADA,QAAQ,MAAM,kEACP,cAHP,EAAG,KAAM,cAKb,GAGF,OAAO,QAAU,QAAQ,QAAU,QACnC,OAAO,QAAQ,OAAS,SAAU,GAChC,EAAO,GAAQ,CAAC,EAEhB,IAAI,EAAS,CAAC,EAKd,OAJA,OAAO,KAAK,GAAM,SAAQ,SAAU,GAClC,EAAO,GAAO,EAAK,EACrB,IAEO,OAAO,QAAQ,MAAM,EAC9B,EACA,OAAO,QAAQ,MAAQ,SAAU,GAa/B,OAZA,EAAO,GAAQ,CAAC,EAEhB,OAAO,KAAK,SAAS,SAAQ,SAAU,GAC/B,KAAO,IACX,EAAK,GAAO,QAAQ,GAExB,WAGO,EAAK,aACL,EAAK,cACL,EAAK,QACL,CACT","file":"/npm/localhost.daplie.com-certificates@1.2.5/lib/index.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/localhost.daplie.com-certificates@1.2.5/lib/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// Assumptions:\n//   you have a project with a web app such as ~/my-project/lib/server.js\n//   you will place the certs in ~/my-project/certs/\n//\n// git clone https://git.daplie.com/Daplie/localhost.daplie.com-certificates.git ../certs\n\nvar fs = require('fs');\nvar path = require('path');\n\n//\n// SSL Certificates\n//\nvar tlsOptions = {\n  key: fs.readFileSync(path.join(__dirname, '..', 'privkey.pem'))\n, cert: fs.readFileSync(path.join(__dirname, '..', 'fullchain.pem'))\n, requestCert: false\n, rejectUnauthorized: true\n};\nvar secureContext = require('tls').createSecureContext(tlsOptions);\nvar options = {\n  key: tlsOptions.key\n, cert: tlsOptions.cert\n, requestCert: tlsOptions.requestCert\n, rejectUnauthorized: tlsOptions.rejectUnauthorized\n\n  // If you need to use SNICallback you should be using io.js >= 1.x (possibly node >= 0.12)\n, SNICallback: function (domainname, cb) {\n    // null means all requests will default to this certificate\n    // var secureContext = null;\n    // Instead we explicitly set the context to this one (for example's sake)\n\n    if ('function' === typeof cb) {\n      cb(null, secureContext);\n    } else {\n      console.error('your version of node is too old to properly handle SNICallback');\n      return secureContext;\n    }\n  }\n};\n\nmodule.exports = options.options = options;\nmodule.exports.create = function (opts) {\n  opts = opts || {};\n\n  var newObj = {};\n  Object.keys(opts).forEach(function (key) {\n    newObj[key] = opts[key];\n  });\n\n  return module.exports.merge(newObj);\n};\nmodule.exports.merge = function (opts) {\n  opts = opts || {};\n\n  Object.keys(options).forEach(function (key) {\n    if (!(key in opts)) {\n      opts[key] = options[key];\n    }\n  });\n\n  // prevent circular refs (until v2.0.0 when this can be removed)\n  delete opts.merge;\n  delete opts.create;\n  delete opts.options;\n  return opts;\n};\n// var server = https.createServer(options || require('localhost.daplie.com-certificates'));\n// server.on('request', function (req, res) { res.end('hello'); });\n// server.listen(443, function () { console.log('<https://localhost.daplie.com>'); });\n"]}