'
106 | reply +='
Invoice '
107 | reply += "pay "+Number(amt_in) * 100000000 +" sats to get wifi access
"
108 |
109 |
110 |
111 |
112 | reply += '
'
115 | reply += '
'
116 | reply += ' copy '
117 | reply += '
'
118 | //QR
119 | reply += '
'
120 |
121 | reply+='
'
122 |
123 | reply +='You will be redirect when the invoice is paid. If the invoice is paid and you are not redirected in a few seconds, click check button.
'
124 |
125 |
126 |
127 |
128 | //acabar.
129 | reply +='
'
137 |
138 |
139 |
140 | reply +='
'
143 |
144 |
145 |
146 |
147 |
148 | reply += ''
173 |
174 |
175 | reply +=''
176 | reply +=''
177 | resolve(reply);
178 |
179 |
180 |
181 | })
182 | }
183 |
--------------------------------------------------------------------------------
/lnwifi.js:
--------------------------------------------------------------------------------
1 |
2 | var http = require("http");
3 | var express = require('express');
4 | var fs = require('fs');
5 | var request = require('request');
6 | var app = express();
7 | var bodyParser = require('body-parser');
8 | var urlencodedParser = bodyParser.urlencoded({ extended: true });
9 | var path = require("path");
10 | const { exec } = require('child_process');
11 |
12 | const charged_server_url='http://YOUR_CHARGED_SERVER:9112' //EX: http://1.2.3.4:9112
13 | const charged_token='your_charged_token'
14 | const listen_port=8888
15 |
16 | const charge = require('lightning-charge-client')(charged_server_url, charged_token)
17 |
18 |
19 | app.use(require('cookie-parser')())
20 | app.use(require('body-parser').json())
21 | app.use(require('body-parser').urlencoded({ extended: true }))
22 |
23 | var clientId = 0;
24 | var clients = {}; // <- Keep a map of attached clients
25 | var users = {};
26 |
27 | lpoppay=require("./lib_poppay.js")
28 |
29 | var server = app.listen(listen_port, function () {
30 | var host = server.address().address
31 | var port = server.address().port
32 | console.log("listening at %s:%s Port", host, port)
33 | });
34 |
35 | app.use(require('morgan')('dev'))
36 | app.use(require('csurf')({ cookie: true }))
37 |
38 | app.use(express.static('public'))
39 |
40 |
41 | //main page
42 | app.get('/', urlencodedParser, function (req, res){
43 | var client_ip=req.query.clientip
44 | var client_redir=req.query.redir
45 | console.log('clientIP:'+client_ip)
46 | console.log('url_redirect:'+client_redir)
47 | var csrf= req.csrfToken()
48 | nodog_get_client(client_ip).then(function(client_info){
49 | console.log(client_info)
50 | var jclient=JSON.parse(client_info)
51 | console.log(jclient.token)
52 | lpoppay.show_index(csrf,jclient.token,client_redir).then(function(data){
53 | res.send(data)
54 | })
55 |
56 | })
57 |
58 |
59 | });
60 |
61 | app.post('/invoice', urlencodedParser, function (req, res){
62 | console.log(req.body._csrf)
63 | console.log(req.body._token)
64 | console.log(req.body._redir)
65 | console.log(req.body._amt)
66 | new_invoice(req.body._amt,req.body._csrf,req.body._token).then(function(invoice){
67 | lpoppay.show_invoice(invoice.payreq,req.body._csrf,req.body._token,req.body._amt,req.body._redir,invoice.id).then(function(invoice1){
68 | console.log("Invoice:"+invoice)
69 | console.log(`invoice ${ invoice.id } created with rhash=${ invoice.rhash }, payreq=${ invoice.payreq }`)
70 |
71 | res.send(invoice1)
72 | pay_wait(invoice,req.body._csrf,req.body._token,req.body._redir)
73 | })
74 |
75 |
76 |
77 | })
78 | });
79 |
80 | app.post('/check_invoice', urlencodedParser, function (req, res){
81 | console.log(req.body._csrf)
82 | console.log(req.body._token)
83 | console.log(req.body._redir)
84 | console.log(req.body._amt)
85 | console.log(req.body._id)
86 | check_invoice(req.body._id).then(function(invoice){
87 |
88 | console.log("Invoice:"+invoice)
89 | if(invoice.status=="unpaid"){
90 | lpoppay.show_notpayed().then(function(reply){
91 | res.send(reply)
92 | })
93 | }else{
94 | //ALLOW ACCESS AND REDIRECT.
95 | console.log("success")
96 | nodog_allow_client(req.body._token).then(function(auth){
97 | console.log(auth)
98 | if (auth.indexOf(" authenticated.")!=-1){
99 | for (clientId in clients) {
100 | console.log(clientId)
101 | if(users[clientId]==csrf_in){
102 |
103 | //you can redirect to the original url request using redir_in
104 | clients[clientId].write("data: https://duckduckgo.com/\n\n"); // <- Push a message to a single attached client
105 | }
106 | }
107 | }else{
108 | console.log("error")
109 | for (clientId in clients) {
110 | console.log(clientId)
111 | if(users[clientId]==csrf_in){
112 | clients[clientId].write("data: /\n\n"); // <- Push a message to a single attached client
113 | }
114 | }
115 | }
116 | })
117 |
118 |
119 |
120 | }
121 | console.log(`invoice ${ invoice.id } created with rhash=${ invoice.rhash }, payreq=${ invoice.payreq }`)
122 |
123 | })
124 | });
125 |
126 |
127 |
128 | // Called once for each new client. Note, this response is left open!
129 | app.get('/inv_event/:csrf', function (req, res) {
130 | req.socket.setTimeout(Number.MAX_VALUE);
131 | console.log(req.params.csrf)
132 | //users[clientId] = req.csrf;
133 | res.writeHead(200, {
134 | 'Content-Type': 'text/event-stream', // <- Important headers
135 | 'Cache-Control': 'no-cache',
136 | 'Connection': 'keep-alive'
137 | });
138 | res.write('\n');
139 | (function (clientId) {
140 | clients[clientId] = res; // <- Add this client to those we consider "attached"
141 | users[clientId] = req.params.csrf;
142 | //console.log(tmp_csrf)
143 | req.on("close", function () {
144 | delete clients[clientId]
145 | delete users[clientId]
146 | }); // <- Remove this client when he disconnects
147 | })(++clientId)
148 | });
149 |
150 |
151 |
152 | setInterval(function () {
153 | console.log(users.length)
154 | if(clientId==0){
155 | console.log("No connected clients")
156 | }else{
157 | console.log(users)
158 | }
159 | }, 30000);
160 |
161 |
162 | //new invoice
163 | function new_invoice(amount_in,description_in,token_in){
164 | return new Promise(function(resolve,reject){
165 | const inv =charge.invoice({
166 | amount: amount_in
167 | , currency: 'BTC'
168 | , description: description_in
169 | , metadata: { source: 'poppay', product: token_in }
170 | }).then(inv => resolve(inv))
171 |
172 | })
173 | }
174 |
175 |
176 | //check if invoice is payed
177 | function check_invoice(hash_in){
178 | return new Promise(function(resolve,reject){
179 | const inv =charge.fetch(hash_in).then(function(inv){
180 | resolve(inv)
181 |
182 | })
183 |
184 | })
185 | }
186 |
187 |
188 | //this.pay_wait=async function(inv){
189 | async function pay_wait(inv,csrf_in,token_in,redir_in){
190 | var paid=null
191 | do {
192 | paid = await charge.wait(inv.id, /* timeout: */ 2 /* seconds */)
193 |
194 | if (paid){
195 | console.log(`invoice ${ paid.id } of ${ paid.msatoshi } paid, updated invoice:`, paid)
196 | //create temp folder with file.
197 | //AUTHENTICATE AND REDIRECT
198 | console.log("ok")
199 | nodog_allow_client(token_in).then(function(auth){
200 | console.log(auth)
201 | if (auth.indexOf(" authenticated.")!=-1){
202 | for (clientId in clients) {
203 | console.log(clientId)
204 | if(users[clientId]==csrf_in){
205 |
206 | //you can redirect to the original url request using redir_in
207 | clients[clientId].write("data: https://duckduckgo.com/\n\n"); // <- Push a message to a single attached client
208 | }
209 | }
210 | }else{
211 | console.log("error")
212 | for (clientId in clients) {
213 | console.log(clientId)
214 | if(users[clientId]==csrf_in){
215 | clients[clientId].write("data: /\n\n"); // <- Push a message to a single attached client
216 | }
217 | }
218 | }
219 | })
220 |
221 | } else if (paid === false) {
222 | console.log('invoice expired and can no longer be paid')
223 | }
224 | } while (paid === null)
225 |
226 | }
227 |
228 | //get nodogsplash client info.
229 | function nodog_get_client(clientip){
230 | return new Promise(function(resolve, reject) {
231 | //var client_info=''
232 |
233 | var command='sudo ndsctl json '+clientip
234 | console.log(command)
235 | //resolve(command)
236 | exec(command, (error, stdout, stderr) => {
237 | if (error) {
238 | console.error(`exec error: ${error}`);
239 | resolve(null)
240 | return;
241 | }
242 |
243 | resolve(stdout)
244 | });
245 | });
246 | }
247 |
248 | //allow access (nodogsplash) authenticated device
249 | function nodog_allow_client(token){
250 | return new Promise(function(resolve, reject) {
251 | //var client_info=''
252 |
253 | var command='sudo ndsctl auth '+token
254 | console.log(command)
255 | //resolve(command)
256 | exec(command, (error, stdout, stderr) => {
257 | if (error) {
258 | console.error(`exec error: ${error}`);
259 | resolve(null)
260 | return;
261 | }
262 | //console.log(stdout)
263 | resolve(stdout)
264 | });
265 | });
266 | }
267 |
--------------------------------------------------------------------------------
/package-lock.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "lnwifi",
3 | "version": "1.0.0",
4 | "lockfileVersion": 1,
5 | "requires": true,
6 | "dependencies": {
7 | "accepts": {
8 | "version": "1.3.5",
9 | "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.5.tgz",
10 | "integrity": "sha1-63d99gEXI6OxTopywIBcjoZ0a9I=",
11 | "requires": {
12 | "mime-types": "~2.1.18",
13 | "negotiator": "0.6.1"
14 | }
15 | },
16 | "ajv": {
17 | "version": "6.7.0",
18 | "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.7.0.tgz",
19 | "integrity": "sha512-RZXPviBTtfmtka9n9sy1N5M5b82CbxWIR6HIis4s3WQTXDJamc/0gpCWNGz6EWdWp4DOfjzJfhz/AS9zVPjjWg==",
20 | "requires": {
21 | "fast-deep-equal": "^2.0.1",
22 | "fast-json-stable-stringify": "^2.0.0",
23 | "json-schema-traverse": "^0.4.1",
24 | "uri-js": "^4.2.2"
25 | }
26 | },
27 | "array-flatten": {
28 | "version": "1.1.1",
29 | "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz",
30 | "integrity": "sha1-ml9pkFGx5wczKPKgCJaLZOopVdI="
31 | },
32 | "asn1": {
33 | "version": "0.2.4",
34 | "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz",
35 | "integrity": "sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg==",
36 | "requires": {
37 | "safer-buffer": "~2.1.0"
38 | }
39 | },
40 | "assert-plus": {
41 | "version": "1.0.0",
42 | "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz",
43 | "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU="
44 | },
45 | "asynckit": {
46 | "version": "0.4.0",
47 | "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",
48 | "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k="
49 | },
50 | "aws-sign2": {
51 | "version": "0.7.0",
52 | "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz",
53 | "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg="
54 | },
55 | "aws4": {
56 | "version": "1.8.0",
57 | "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.8.0.tgz",
58 | "integrity": "sha512-ReZxvNHIOv88FlT7rxcXIIC0fPt4KZqZbOlivyWtXLt8ESx84zd3kMC6iK5jVeS2qt+g7ftS7ye4fi06X5rtRQ=="
59 | },
60 | "basic-auth": {
61 | "version": "2.0.1",
62 | "resolved": "https://registry.npmjs.org/basic-auth/-/basic-auth-2.0.1.tgz",
63 | "integrity": "sha512-NF+epuEdnUYVlGuhaxbbq+dvJttwLnGY+YixlXlME5KpQ5W3CnXA5cVTneY3SPbPDRkcjMbifrwmFYcClgOZeg==",
64 | "requires": {
65 | "safe-buffer": "5.1.2"
66 | }
67 | },
68 | "bcrypt-pbkdf": {
69 | "version": "1.0.2",
70 | "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz",
71 | "integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=",
72 | "requires": {
73 | "tweetnacl": "^0.14.3"
74 | }
75 | },
76 | "body-parser": {
77 | "version": "1.18.3",
78 | "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.18.3.tgz",
79 | "integrity": "sha1-WykhmP/dVTs6DyDe0FkrlWlVyLQ=",
80 | "requires": {
81 | "bytes": "3.0.0",
82 | "content-type": "~1.0.4",
83 | "debug": "2.6.9",
84 | "depd": "~1.1.2",
85 | "http-errors": "~1.6.3",
86 | "iconv-lite": "0.4.23",
87 | "on-finished": "~2.3.0",
88 | "qs": "6.5.2",
89 | "raw-body": "2.3.3",
90 | "type-is": "~1.6.16"
91 | }
92 | },
93 | "bytes": {
94 | "version": "3.0.0",
95 | "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.0.0.tgz",
96 | "integrity": "sha1-0ygVQE1olpn4Wk6k+odV3ROpYEg="
97 | },
98 | "caseless": {
99 | "version": "0.12.0",
100 | "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz",
101 | "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw="
102 | },
103 | "combined-stream": {
104 | "version": "1.0.7",
105 | "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.7.tgz",
106 | "integrity": "sha512-brWl9y6vOB1xYPZcpZde3N9zDByXTosAeMDo4p1wzo6UMOX4vumB+TP1RZ76sfE6Md68Q0NJSrE/gbezd4Ul+w==",
107 | "requires": {
108 | "delayed-stream": "~1.0.0"
109 | }
110 | },
111 | "component-emitter": {
112 | "version": "1.2.1",
113 | "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.2.1.tgz",
114 | "integrity": "sha1-E3kY1teCg/ffemt8WmPhQOaUJeY="
115 | },
116 | "content-disposition": {
117 | "version": "0.5.2",
118 | "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.2.tgz",
119 | "integrity": "sha1-DPaLud318r55YcOoUXjLhdunjLQ="
120 | },
121 | "content-type": {
122 | "version": "1.0.4",
123 | "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz",
124 | "integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA=="
125 | },
126 | "cookie": {
127 | "version": "0.3.1",
128 | "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.3.1.tgz",
129 | "integrity": "sha1-5+Ch+e9DtMi6klxcWpboBtFoc7s="
130 | },
131 | "cookie-parser": {
132 | "version": "1.4.3",
133 | "resolved": "https://registry.npmjs.org/cookie-parser/-/cookie-parser-1.4.3.tgz",
134 | "integrity": "sha1-D+MfoZ0AC5X0qt8fU/3CuKIDuqU=",
135 | "requires": {
136 | "cookie": "0.3.1",
137 | "cookie-signature": "1.0.6"
138 | }
139 | },
140 | "cookie-signature": {
141 | "version": "1.0.6",
142 | "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz",
143 | "integrity": "sha1-4wOogrNCzD7oylE6eZmXNNqzriw="
144 | },
145 | "cookiejar": {
146 | "version": "2.1.2",
147 | "resolved": "https://registry.npmjs.org/cookiejar/-/cookiejar-2.1.2.tgz",
148 | "integrity": "sha512-Mw+adcfzPxcPeI+0WlvRrr/3lGVO0bD75SxX6811cxSh1Wbxx7xZBGK1eVtDf6si8rg2lhnUjsVLMFMfbRIuwA=="
149 | },
150 | "core-util-is": {
151 | "version": "1.0.2",
152 | "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz",
153 | "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac="
154 | },
155 | "csrf": {
156 | "version": "3.0.6",
157 | "resolved": "https://registry.npmjs.org/csrf/-/csrf-3.0.6.tgz",
158 | "integrity": "sha1-thEg3c7q/JHnbtUxO7XAsmZ7cQo=",
159 | "requires": {
160 | "rndm": "1.2.0",
161 | "tsscmp": "1.0.5",
162 | "uid-safe": "2.1.4"
163 | }
164 | },
165 | "csurf": {
166 | "version": "1.9.0",
167 | "resolved": "https://registry.npmjs.org/csurf/-/csurf-1.9.0.tgz",
168 | "integrity": "sha1-SdLGkl/87Ht95VlZfBU/pTM2QTM=",
169 | "requires": {
170 | "cookie": "0.3.1",
171 | "cookie-signature": "1.0.6",
172 | "csrf": "~3.0.3",
173 | "http-errors": "~1.5.0"
174 | },
175 | "dependencies": {
176 | "http-errors": {
177 | "version": "1.5.1",
178 | "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.5.1.tgz",
179 | "integrity": "sha1-eIwNLB3iyBuebowBhDtrl+uSB1A=",
180 | "requires": {
181 | "inherits": "2.0.3",
182 | "setprototypeof": "1.0.2",
183 | "statuses": ">= 1.3.1 < 2"
184 | }
185 | },
186 | "setprototypeof": {
187 | "version": "1.0.2",
188 | "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.0.2.tgz",
189 | "integrity": "sha1-gaVSFB7BBLiOic44MQOtXGZWTQg="
190 | }
191 | }
192 | },
193 | "dashdash": {
194 | "version": "1.14.1",
195 | "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz",
196 | "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=",
197 | "requires": {
198 | "assert-plus": "^1.0.0"
199 | }
200 | },
201 | "debug": {
202 | "version": "2.6.9",
203 | "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
204 | "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
205 | "requires": {
206 | "ms": "2.0.0"
207 | }
208 | },
209 | "delayed-stream": {
210 | "version": "1.0.0",
211 | "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",
212 | "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk="
213 | },
214 | "depd": {
215 | "version": "1.1.2",
216 | "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz",
217 | "integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak="
218 | },
219 | "destroy": {
220 | "version": "1.0.4",
221 | "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz",
222 | "integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA="
223 | },
224 | "ecc-jsbn": {
225 | "version": "0.1.2",
226 | "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz",
227 | "integrity": "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=",
228 | "requires": {
229 | "jsbn": "~0.1.0",
230 | "safer-buffer": "^2.1.0"
231 | }
232 | },
233 | "ee-first": {
234 | "version": "1.1.1",
235 | "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz",
236 | "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0="
237 | },
238 | "encodeurl": {
239 | "version": "1.0.2",
240 | "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz",
241 | "integrity": "sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k="
242 | },
243 | "escape-html": {
244 | "version": "1.0.3",
245 | "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz",
246 | "integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg="
247 | },
248 | "etag": {
249 | "version": "1.8.1",
250 | "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz",
251 | "integrity": "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc="
252 | },
253 | "eventsource": {
254 | "version": "1.0.7",
255 | "resolved": "https://registry.npmjs.org/eventsource/-/eventsource-1.0.7.tgz",
256 | "integrity": "sha512-4Ln17+vVT0k8aWq+t/bF5arcS3EpT9gYtW66EPacdj/mAFevznsnyoHLPy2BA8gbIQeIHoPsvwmfBftfcG//BQ==",
257 | "requires": {
258 | "original": "^1.0.0"
259 | }
260 | },
261 | "express": {
262 | "version": "4.16.4",
263 | "resolved": "https://registry.npmjs.org/express/-/express-4.16.4.tgz",
264 | "integrity": "sha512-j12Uuyb4FMrd/qQAm6uCHAkPtO8FDTRJZBDd5D2KOL2eLaz1yUNdUB/NOIyq0iU4q4cFarsUCrnFDPBcnksuOg==",
265 | "requires": {
266 | "accepts": "~1.3.5",
267 | "array-flatten": "1.1.1",
268 | "body-parser": "1.18.3",
269 | "content-disposition": "0.5.2",
270 | "content-type": "~1.0.4",
271 | "cookie": "0.3.1",
272 | "cookie-signature": "1.0.6",
273 | "debug": "2.6.9",
274 | "depd": "~1.1.2",
275 | "encodeurl": "~1.0.2",
276 | "escape-html": "~1.0.3",
277 | "etag": "~1.8.1",
278 | "finalhandler": "1.1.1",
279 | "fresh": "0.5.2",
280 | "merge-descriptors": "1.0.1",
281 | "methods": "~1.1.2",
282 | "on-finished": "~2.3.0",
283 | "parseurl": "~1.3.2",
284 | "path-to-regexp": "0.1.7",
285 | "proxy-addr": "~2.0.4",
286 | "qs": "6.5.2",
287 | "range-parser": "~1.2.0",
288 | "safe-buffer": "5.1.2",
289 | "send": "0.16.2",
290 | "serve-static": "1.13.2",
291 | "setprototypeof": "1.1.0",
292 | "statuses": "~1.4.0",
293 | "type-is": "~1.6.16",
294 | "utils-merge": "1.0.1",
295 | "vary": "~1.1.2"
296 | }
297 | },
298 | "extend": {
299 | "version": "3.0.2",
300 | "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz",
301 | "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g=="
302 | },
303 | "extsprintf": {
304 | "version": "1.3.0",
305 | "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz",
306 | "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU="
307 | },
308 | "fast-deep-equal": {
309 | "version": "2.0.1",
310 | "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz",
311 | "integrity": "sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk="
312 | },
313 | "fast-json-stable-stringify": {
314 | "version": "2.0.0",
315 | "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz",
316 | "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I="
317 | },
318 | "finalhandler": {
319 | "version": "1.1.1",
320 | "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.1.tgz",
321 | "integrity": "sha512-Y1GUDo39ez4aHAw7MysnUD5JzYX+WaIj8I57kO3aEPT1fFRL4sr7mjei97FgnwhAyyzRYmQZaTHb2+9uZ1dPtg==",
322 | "requires": {
323 | "debug": "2.6.9",
324 | "encodeurl": "~1.0.2",
325 | "escape-html": "~1.0.3",
326 | "on-finished": "~2.3.0",
327 | "parseurl": "~1.3.2",
328 | "statuses": "~1.4.0",
329 | "unpipe": "~1.0.0"
330 | }
331 | },
332 | "forever-agent": {
333 | "version": "0.6.1",
334 | "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz",
335 | "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE="
336 | },
337 | "form-data": {
338 | "version": "2.3.3",
339 | "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz",
340 | "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==",
341 | "requires": {
342 | "asynckit": "^0.4.0",
343 | "combined-stream": "^1.0.6",
344 | "mime-types": "^2.1.12"
345 | }
346 | },
347 | "formidable": {
348 | "version": "1.2.1",
349 | "resolved": "https://registry.npmjs.org/formidable/-/formidable-1.2.1.tgz",
350 | "integrity": "sha512-Fs9VRguL0gqGHkXS5GQiMCr1VhZBxz0JnJs4JmMp/2jL18Fmbzvv7vOFRU+U8TBkHEE/CX1qDXzJplVULgsLeg=="
351 | },
352 | "forwarded": {
353 | "version": "0.1.2",
354 | "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.1.2.tgz",
355 | "integrity": "sha1-mMI9qxF1ZXuMBXPozszZGw/xjIQ="
356 | },
357 | "fresh": {
358 | "version": "0.5.2",
359 | "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz",
360 | "integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac="
361 | },
362 | "getpass": {
363 | "version": "0.1.7",
364 | "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz",
365 | "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=",
366 | "requires": {
367 | "assert-plus": "^1.0.0"
368 | }
369 | },
370 | "har-schema": {
371 | "version": "2.0.0",
372 | "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz",
373 | "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI="
374 | },
375 | "har-validator": {
376 | "version": "5.1.3",
377 | "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.3.tgz",
378 | "integrity": "sha512-sNvOCzEQNr/qrvJgc3UG/kD4QtlHycrzwS+6mfTrrSq97BvaYcPZZI1ZSqGSPR73Cxn4LKTD4PttRwfU7jWq5g==",
379 | "requires": {
380 | "ajv": "^6.5.5",
381 | "har-schema": "^2.0.0"
382 | }
383 | },
384 | "http-errors": {
385 | "version": "1.6.3",
386 | "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.3.tgz",
387 | "integrity": "sha1-i1VoC7S+KDoLW/TqLjhYC+HZMg0=",
388 | "requires": {
389 | "depd": "~1.1.2",
390 | "inherits": "2.0.3",
391 | "setprototypeof": "1.1.0",
392 | "statuses": ">= 1.4.0 < 2"
393 | }
394 | },
395 | "http-signature": {
396 | "version": "1.2.0",
397 | "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz",
398 | "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=",
399 | "requires": {
400 | "assert-plus": "^1.0.0",
401 | "jsprim": "^1.2.2",
402 | "sshpk": "^1.7.0"
403 | }
404 | },
405 | "iconv-lite": {
406 | "version": "0.4.23",
407 | "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.23.tgz",
408 | "integrity": "sha512-neyTUVFtahjf0mB3dZT77u+8O0QB89jFdnBkd5P1JgYPbPaia3gXXOVL2fq8VyU2gMMD7SaN7QukTB/pmXYvDA==",
409 | "requires": {
410 | "safer-buffer": ">= 2.1.2 < 3"
411 | }
412 | },
413 | "inherits": {
414 | "version": "2.0.3",
415 | "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz",
416 | "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4="
417 | },
418 | "ipaddr.js": {
419 | "version": "1.8.0",
420 | "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.8.0.tgz",
421 | "integrity": "sha1-6qM9bd16zo9/b+DJygRA5wZzix4="
422 | },
423 | "is-typedarray": {
424 | "version": "1.0.0",
425 | "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz",
426 | "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo="
427 | },
428 | "isarray": {
429 | "version": "1.0.0",
430 | "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
431 | "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE="
432 | },
433 | "isstream": {
434 | "version": "0.1.2",
435 | "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz",
436 | "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo="
437 | },
438 | "jsbn": {
439 | "version": "0.1.1",
440 | "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz",
441 | "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM="
442 | },
443 | "json-schema": {
444 | "version": "0.2.3",
445 | "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz",
446 | "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM="
447 | },
448 | "json-schema-traverse": {
449 | "version": "0.4.1",
450 | "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz",
451 | "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg=="
452 | },
453 | "json-stringify-safe": {
454 | "version": "5.0.1",
455 | "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz",
456 | "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus="
457 | },
458 | "jsprim": {
459 | "version": "1.4.1",
460 | "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz",
461 | "integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=",
462 | "requires": {
463 | "assert-plus": "1.0.0",
464 | "extsprintf": "1.3.0",
465 | "json-schema": "0.2.3",
466 | "verror": "1.10.0"
467 | }
468 | },
469 | "lightning-charge-client": {
470 | "version": "0.1.10",
471 | "resolved": "https://registry.npmjs.org/lightning-charge-client/-/lightning-charge-client-0.1.10.tgz",
472 | "integrity": "sha512-4+QiOBrVg0jzSjZTYbiPmOuicofKiuuhocf8geJDrVyMI/EP7qHqgEssX/ohD4oRzX63YVfdNJR3Fpk8Fb+d5g==",
473 | "requires": {
474 | "eventsource": "^1.0.7",
475 | "superagent": "^3.8.3",
476 | "superagent-baseuri": "^0.1.1"
477 | }
478 | },
479 | "media-typer": {
480 | "version": "0.3.0",
481 | "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz",
482 | "integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g="
483 | },
484 | "merge-descriptors": {
485 | "version": "1.0.1",
486 | "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz",
487 | "integrity": "sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E="
488 | },
489 | "methods": {
490 | "version": "1.1.2",
491 | "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz",
492 | "integrity": "sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4="
493 | },
494 | "mime": {
495 | "version": "1.4.1",
496 | "resolved": "https://registry.npmjs.org/mime/-/mime-1.4.1.tgz",
497 | "integrity": "sha512-KI1+qOZu5DcW6wayYHSzR/tXKCDC5Om4s1z2QJjDULzLcmf3DvzS7oluY4HCTrc+9FiKmWUgeNLg7W3uIQvxtQ=="
498 | },
499 | "mime-db": {
500 | "version": "1.37.0",
501 | "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.37.0.tgz",
502 | "integrity": "sha512-R3C4db6bgQhlIhPU48fUtdVmKnflq+hRdad7IyKhtFj06VPNVdk2RhiYL3UjQIlso8L+YxAtFkobT0VK+S/ybg=="
503 | },
504 | "mime-types": {
505 | "version": "2.1.21",
506 | "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.21.tgz",
507 | "integrity": "sha512-3iL6DbwpyLzjR3xHSFNFeb9Nz/M8WDkX33t1GFQnFOllWk8pOrh/LSrB5OXlnlW5P9LH73X6loW/eogc+F5lJg==",
508 | "requires": {
509 | "mime-db": "~1.37.0"
510 | }
511 | },
512 | "morgan": {
513 | "version": "1.9.1",
514 | "resolved": "https://registry.npmjs.org/morgan/-/morgan-1.9.1.tgz",
515 | "integrity": "sha512-HQStPIV4y3afTiCYVxirakhlCfGkI161c76kKFca7Fk1JusM//Qeo1ej2XaMniiNeaZklMVrh3vTtIzpzwbpmA==",
516 | "requires": {
517 | "basic-auth": "~2.0.0",
518 | "debug": "2.6.9",
519 | "depd": "~1.1.2",
520 | "on-finished": "~2.3.0",
521 | "on-headers": "~1.0.1"
522 | }
523 | },
524 | "ms": {
525 | "version": "2.0.0",
526 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
527 | "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g="
528 | },
529 | "negotiator": {
530 | "version": "0.6.1",
531 | "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.1.tgz",
532 | "integrity": "sha1-KzJxhOiZIQEXeyhWP7XnECrNDKk="
533 | },
534 | "oauth-sign": {
535 | "version": "0.9.0",
536 | "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz",
537 | "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ=="
538 | },
539 | "on-finished": {
540 | "version": "2.3.0",
541 | "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz",
542 | "integrity": "sha1-IPEzZIGwg811M3mSoWlxqi2QaUc=",
543 | "requires": {
544 | "ee-first": "1.1.1"
545 | }
546 | },
547 | "on-headers": {
548 | "version": "1.0.1",
549 | "resolved": "https://registry.npmjs.org/on-headers/-/on-headers-1.0.1.tgz",
550 | "integrity": "sha1-ko9dD0cNSTQmUepnlLCFfBAGk/c="
551 | },
552 | "original": {
553 | "version": "1.0.2",
554 | "resolved": "https://registry.npmjs.org/original/-/original-1.0.2.tgz",
555 | "integrity": "sha512-hyBVl6iqqUOJ8FqRe+l/gS8H+kKYjrEndd5Pm1MfBtsEKA038HkkdbAl/72EAXGyonD/PFsvmVG+EvcIpliMBg==",
556 | "requires": {
557 | "url-parse": "^1.4.3"
558 | }
559 | },
560 | "parseurl": {
561 | "version": "1.3.2",
562 | "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.2.tgz",
563 | "integrity": "sha1-/CidTtiZMRlGDBViUyYs3I3mW/M="
564 | },
565 | "path-to-regexp": {
566 | "version": "0.1.7",
567 | "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz",
568 | "integrity": "sha1-32BBeABfUi8V60SQ5yR6G/qmf4w="
569 | },
570 | "performance-now": {
571 | "version": "2.1.0",
572 | "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz",
573 | "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns="
574 | },
575 | "process-nextick-args": {
576 | "version": "2.0.0",
577 | "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz",
578 | "integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw=="
579 | },
580 | "proxy-addr": {
581 | "version": "2.0.4",
582 | "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.4.tgz",
583 | "integrity": "sha512-5erio2h9jp5CHGwcybmxmVqHmnCBZeewlfJ0pex+UW7Qny7OOZXTtH56TGNyBizkgiOwhJtMKrVzDTeKcySZwA==",
584 | "requires": {
585 | "forwarded": "~0.1.2",
586 | "ipaddr.js": "1.8.0"
587 | }
588 | },
589 | "psl": {
590 | "version": "1.1.31",
591 | "resolved": "https://registry.npmjs.org/psl/-/psl-1.1.31.tgz",
592 | "integrity": "sha512-/6pt4+C+T+wZUieKR620OpzN/LlnNKuWjy1iFLQ/UG35JqHlR/89MP1d96dUfkf6Dne3TuLQzOYEYshJ+Hx8mw=="
593 | },
594 | "punycode": {
595 | "version": "2.1.1",
596 | "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz",
597 | "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A=="
598 | },
599 | "qs": {
600 | "version": "6.5.2",
601 | "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz",
602 | "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA=="
603 | },
604 | "querystringify": {
605 | "version": "2.1.0",
606 | "resolved": "https://registry.npmjs.org/querystringify/-/querystringify-2.1.0.tgz",
607 | "integrity": "sha512-sluvZZ1YiTLD5jsqZcDmFyV2EwToyXZBfpoVOmktMmW+VEnhgakFHnasVph65fOjGPTWN0Nw3+XQaSeMayr0kg=="
608 | },
609 | "random-bytes": {
610 | "version": "1.0.0",
611 | "resolved": "https://registry.npmjs.org/random-bytes/-/random-bytes-1.0.0.tgz",
612 | "integrity": "sha1-T2ih3Arli9P7lYSMMDJNt11kNgs="
613 | },
614 | "range-parser": {
615 | "version": "1.2.0",
616 | "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.0.tgz",
617 | "integrity": "sha1-9JvmtIeJTdxA3MlKMi9hEJLgDV4="
618 | },
619 | "raw-body": {
620 | "version": "2.3.3",
621 | "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.3.3.tgz",
622 | "integrity": "sha512-9esiElv1BrZoI3rCDuOuKCBRbuApGGaDPQfjSflGxdy4oyzqghxu6klEkkVIvBje+FF0BX9coEv8KqW6X/7njw==",
623 | "requires": {
624 | "bytes": "3.0.0",
625 | "http-errors": "1.6.3",
626 | "iconv-lite": "0.4.23",
627 | "unpipe": "1.0.0"
628 | }
629 | },
630 | "readable-stream": {
631 | "version": "2.3.6",
632 | "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz",
633 | "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==",
634 | "requires": {
635 | "core-util-is": "~1.0.0",
636 | "inherits": "~2.0.3",
637 | "isarray": "~1.0.0",
638 | "process-nextick-args": "~2.0.0",
639 | "safe-buffer": "~5.1.1",
640 | "string_decoder": "~1.1.1",
641 | "util-deprecate": "~1.0.1"
642 | }
643 | },
644 | "request": {
645 | "version": "2.88.0",
646 | "resolved": "https://registry.npmjs.org/request/-/request-2.88.0.tgz",
647 | "integrity": "sha512-NAqBSrijGLZdM0WZNsInLJpkJokL72XYjUpnB0iwsRgxh7dB6COrHnTBNwN0E+lHDAJzu7kLAkDeY08z2/A0hg==",
648 | "requires": {
649 | "aws-sign2": "~0.7.0",
650 | "aws4": "^1.8.0",
651 | "caseless": "~0.12.0",
652 | "combined-stream": "~1.0.6",
653 | "extend": "~3.0.2",
654 | "forever-agent": "~0.6.1",
655 | "form-data": "~2.3.2",
656 | "har-validator": "~5.1.0",
657 | "http-signature": "~1.2.0",
658 | "is-typedarray": "~1.0.0",
659 | "isstream": "~0.1.2",
660 | "json-stringify-safe": "~5.0.1",
661 | "mime-types": "~2.1.19",
662 | "oauth-sign": "~0.9.0",
663 | "performance-now": "^2.1.0",
664 | "qs": "~6.5.2",
665 | "safe-buffer": "^5.1.2",
666 | "tough-cookie": "~2.4.3",
667 | "tunnel-agent": "^0.6.0",
668 | "uuid": "^3.3.2"
669 | }
670 | },
671 | "requires-port": {
672 | "version": "1.0.0",
673 | "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz",
674 | "integrity": "sha1-kl0mAdOaxIXgkc8NpcbmlNw9yv8="
675 | },
676 | "rndm": {
677 | "version": "1.2.0",
678 | "resolved": "https://registry.npmjs.org/rndm/-/rndm-1.2.0.tgz",
679 | "integrity": "sha1-8z/pz7Urv9UgqhgyO8ZdsRCht2w="
680 | },
681 | "safe-buffer": {
682 | "version": "5.1.2",
683 | "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
684 | "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g=="
685 | },
686 | "safer-buffer": {
687 | "version": "2.1.2",
688 | "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",
689 | "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg=="
690 | },
691 | "send": {
692 | "version": "0.16.2",
693 | "resolved": "https://registry.npmjs.org/send/-/send-0.16.2.tgz",
694 | "integrity": "sha512-E64YFPUssFHEFBvpbbjr44NCLtI1AohxQ8ZSiJjQLskAdKuriYEP6VyGEsRDH8ScozGpkaX1BGvhanqCwkcEZw==",
695 | "requires": {
696 | "debug": "2.6.9",
697 | "depd": "~1.1.2",
698 | "destroy": "~1.0.4",
699 | "encodeurl": "~1.0.2",
700 | "escape-html": "~1.0.3",
701 | "etag": "~1.8.1",
702 | "fresh": "0.5.2",
703 | "http-errors": "~1.6.2",
704 | "mime": "1.4.1",
705 | "ms": "2.0.0",
706 | "on-finished": "~2.3.0",
707 | "range-parser": "~1.2.0",
708 | "statuses": "~1.4.0"
709 | }
710 | },
711 | "serve-static": {
712 | "version": "1.13.2",
713 | "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.13.2.tgz",
714 | "integrity": "sha512-p/tdJrO4U387R9oMjb1oj7qSMaMfmOyd4j9hOFoxZe2baQszgHcSWjuya/CiT5kgZZKRudHNOA0pYXOl8rQ5nw==",
715 | "requires": {
716 | "encodeurl": "~1.0.2",
717 | "escape-html": "~1.0.3",
718 | "parseurl": "~1.3.2",
719 | "send": "0.16.2"
720 | }
721 | },
722 | "setprototypeof": {
723 | "version": "1.1.0",
724 | "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.0.tgz",
725 | "integrity": "sha512-BvE/TwpZX4FXExxOxZyRGQQv651MSwmWKZGqvmPcRIjDqWub67kTKuIMx43cZZrS/cBBzwBcNDWoFxt2XEFIpQ=="
726 | },
727 | "sshpk": {
728 | "version": "1.16.1",
729 | "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.16.1.tgz",
730 | "integrity": "sha512-HXXqVUq7+pcKeLqqZj6mHFUMvXtOJt1uoUx09pFW6011inTMxqI8BA8PM95myrIyyKwdnzjdFjLiE6KBPVtJIg==",
731 | "requires": {
732 | "asn1": "~0.2.3",
733 | "assert-plus": "^1.0.0",
734 | "bcrypt-pbkdf": "^1.0.0",
735 | "dashdash": "^1.12.0",
736 | "ecc-jsbn": "~0.1.1",
737 | "getpass": "^0.1.1",
738 | "jsbn": "~0.1.0",
739 | "safer-buffer": "^2.0.2",
740 | "tweetnacl": "~0.14.0"
741 | }
742 | },
743 | "statuses": {
744 | "version": "1.4.0",
745 | "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.4.0.tgz",
746 | "integrity": "sha512-zhSCtt8v2NDrRlPQpCNtw/heZLtfUDqxBM1udqikb/Hbk52LK4nQSwr10u77iopCW5LsyHpuXS0GnEc48mLeew=="
747 | },
748 | "string_decoder": {
749 | "version": "1.1.1",
750 | "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
751 | "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==",
752 | "requires": {
753 | "safe-buffer": "~5.1.0"
754 | }
755 | },
756 | "superagent": {
757 | "version": "3.8.3",
758 | "resolved": "https://registry.npmjs.org/superagent/-/superagent-3.8.3.tgz",
759 | "integrity": "sha512-GLQtLMCoEIK4eDv6OGtkOoSMt3D+oq0y3dsxMuYuDvaNUvuT8eFBuLmfR0iYYzHC1e8hpzC6ZsxbuP6DIalMFA==",
760 | "requires": {
761 | "component-emitter": "^1.2.0",
762 | "cookiejar": "^2.1.0",
763 | "debug": "^3.1.0",
764 | "extend": "^3.0.0",
765 | "form-data": "^2.3.1",
766 | "formidable": "^1.2.0",
767 | "methods": "^1.1.1",
768 | "mime": "^1.4.1",
769 | "qs": "^6.5.1",
770 | "readable-stream": "^2.3.5"
771 | },
772 | "dependencies": {
773 | "debug": {
774 | "version": "3.2.6",
775 | "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz",
776 | "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==",
777 | "requires": {
778 | "ms": "^2.1.1"
779 | }
780 | },
781 | "ms": {
782 | "version": "2.1.1",
783 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz",
784 | "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg=="
785 | }
786 | }
787 | },
788 | "superagent-baseuri": {
789 | "version": "0.1.1",
790 | "resolved": "https://registry.npmjs.org/superagent-baseuri/-/superagent-baseuri-0.1.1.tgz",
791 | "integrity": "sha1-uWsH2//DwY2yL7GGNI5/DMTPquk=",
792 | "requires": {
793 | "superagent-prefix": "0.0.2"
794 | },
795 | "dependencies": {
796 | "superagent-use": {
797 | "version": "git://github.com/shesek/superagent-use.git#30b946f04608c6e894162dee4afab10eeb4251af",
798 | "from": "git://github.com/shesek/superagent-use.git#30b946f04608c6e894162dee4afab10eeb4251af",
799 | "requires": {
800 | "extend": "^3.0.0",
801 | "methods": "~1.1.2"
802 | }
803 | }
804 | }
805 | },
806 | "superagent-prefix": {
807 | "version": "0.0.2",
808 | "resolved": "https://registry.npmjs.org/superagent-prefix/-/superagent-prefix-0.0.2.tgz",
809 | "integrity": "sha1-sVu7E1P4ibANJa8QtPEbNQ0gOwY="
810 | },
811 | "tough-cookie": {
812 | "version": "2.4.3",
813 | "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.4.3.tgz",
814 | "integrity": "sha512-Q5srk/4vDM54WJsJio3XNn6K2sCG+CQ8G5Wz6bZhRZoAe/+TxjWB/GlFAnYEbkYVlON9FMk/fE3h2RLpPXo4lQ==",
815 | "requires": {
816 | "psl": "^1.1.24",
817 | "punycode": "^1.4.1"
818 | },
819 | "dependencies": {
820 | "punycode": {
821 | "version": "1.4.1",
822 | "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz",
823 | "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4="
824 | }
825 | }
826 | },
827 | "tsscmp": {
828 | "version": "1.0.5",
829 | "resolved": "https://registry.npmjs.org/tsscmp/-/tsscmp-1.0.5.tgz",
830 | "integrity": "sha1-fcSjOvcVgatDN9qR2FylQn69mpc="
831 | },
832 | "tunnel-agent": {
833 | "version": "0.6.0",
834 | "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz",
835 | "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=",
836 | "requires": {
837 | "safe-buffer": "^5.0.1"
838 | }
839 | },
840 | "tweetnacl": {
841 | "version": "0.14.5",
842 | "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz",
843 | "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q="
844 | },
845 | "type-is": {
846 | "version": "1.6.16",
847 | "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.16.tgz",
848 | "integrity": "sha512-HRkVv/5qY2G6I8iab9cI7v1bOIdhm94dVjQCPFElW9W+3GeDOSHmy2EBYe4VTApuzolPcmgFTN3ftVJRKR2J9Q==",
849 | "requires": {
850 | "media-typer": "0.3.0",
851 | "mime-types": "~2.1.18"
852 | }
853 | },
854 | "uid-safe": {
855 | "version": "2.1.4",
856 | "resolved": "https://registry.npmjs.org/uid-safe/-/uid-safe-2.1.4.tgz",
857 | "integrity": "sha1-Otbzg2jG1MjHXsF2I/t5qh0HHYE=",
858 | "requires": {
859 | "random-bytes": "~1.0.0"
860 | }
861 | },
862 | "unpipe": {
863 | "version": "1.0.0",
864 | "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz",
865 | "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw="
866 | },
867 | "uri-js": {
868 | "version": "4.2.2",
869 | "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.2.2.tgz",
870 | "integrity": "sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ==",
871 | "requires": {
872 | "punycode": "^2.1.0"
873 | }
874 | },
875 | "url-parse": {
876 | "version": "1.4.4",
877 | "resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.4.4.tgz",
878 | "integrity": "sha512-/92DTTorg4JjktLNLe6GPS2/RvAd/RGr6LuktmWSMLEOa6rjnlrFXNgSbSmkNvCoL2T028A0a1JaJLzRMlFoHg==",
879 | "requires": {
880 | "querystringify": "^2.0.0",
881 | "requires-port": "^1.0.0"
882 | }
883 | },
884 | "util-deprecate": {
885 | "version": "1.0.2",
886 | "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
887 | "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8="
888 | },
889 | "utils-merge": {
890 | "version": "1.0.1",
891 | "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz",
892 | "integrity": "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM="
893 | },
894 | "uuid": {
895 | "version": "3.3.2",
896 | "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz",
897 | "integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA=="
898 | },
899 | "vary": {
900 | "version": "1.1.2",
901 | "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz",
902 | "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw="
903 | },
904 | "verror": {
905 | "version": "1.10.0",
906 | "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz",
907 | "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=",
908 | "requires": {
909 | "assert-plus": "^1.0.0",
910 | "core-util-is": "1.0.2",
911 | "extsprintf": "^1.2.0"
912 | }
913 | }
914 | }
915 | }
916 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "lnwifi",
3 | "version": "1.0.0",
4 | "description": "",
5 | "main": "lnwifi.js",
6 | "scripts": {
7 | "test": "echo \"Error: no test specified\" && exit 1"
8 | },
9 | "author": "",
10 | "license": "ISC",
11 | "dependencies": {
12 | "cookie-parser": "^1.4.3",
13 | "csurf": "^1.9.0",
14 | "express": "^4.16.4",
15 | "lightning-charge-client": "^0.1.10",
16 | "morgan": "^1.9.1",
17 | "request": "^2.88.0"
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/public/code/qrcode.min.js:
--------------------------------------------------------------------------------
1 | var QRCode;!function(){function a(a){this.mode=c.MODE_8BIT_BYTE,this.data=a,this.parsedData=[];for(var b=[],d=0,e=this.data.length;e>d;d++){var f=this.data.charCodeAt(d);f>65536?(b[0]=240|(1835008&f)>>>18,b[1]=128|(258048&f)>>>12,b[2]=128|(4032&f)>>>6,b[3]=128|63&f):f>2048?(b[0]=224|(61440&f)>>>12,b[1]=128|(4032&f)>>>6,b[2]=128|63&f):f>128?(b[0]=192|(1984&f)>>>6,b[1]=128|63&f):b[0]=f,this.parsedData=this.parsedData.concat(b)}this.parsedData.length!=this.data.length&&(this.parsedData.unshift(191),this.parsedData.unshift(187),this.parsedData.unshift(239))}function b(a,b){this.typeNumber=a,this.errorCorrectLevel=b,this.modules=null,this.moduleCount=0,this.dataCache=null,this.dataList=[]}function i(a,b){if(void 0==a.length)throw new Error(a.length+"/"+b);for(var c=0;c
=f;f++){var h=0;switch(b){case d.L:h=l[f][0];break;case d.M:h=l[f][1];break;case d.Q:h=l[f][2];break;case d.H:h=l[f][3]}if(h>=e)break;c++}if(c>l.length)throw new Error("Too long data");return c}function s(a){var b=encodeURI(a).toString().replace(/\%[0-9a-fA-F]{2}/g,"a");return b.length+(b.length!=a?3:0)}a.prototype={getLength:function(){return this.parsedData.length},write:function(a){for(var b=0,c=this.parsedData.length;c>b;b++)a.put(this.parsedData[b],8)}},b.prototype={addData:function(b){var c=new a(b);this.dataList.push(c),this.dataCache=null},isDark:function(a,b){if(0>a||this.moduleCount<=a||0>b||this.moduleCount<=b)throw new Error(a+","+b);return this.modules[a][b]},getModuleCount:function(){return this.moduleCount},make:function(){this.makeImpl(!1,this.getBestMaskPattern())},makeImpl:function(a,c){this.moduleCount=4*this.typeNumber+17,this.modules=new Array(this.moduleCount);for(var d=0;d=7&&this.setupTypeNumber(a),null==this.dataCache&&(this.dataCache=b.createData(this.typeNumber,this.errorCorrectLevel,this.dataList)),this.mapData(this.dataCache,c)},setupPositionProbePattern:function(a,b){for(var c=-1;7>=c;c++)if(!(-1>=a+c||this.moduleCount<=a+c))for(var d=-1;7>=d;d++)-1>=b+d||this.moduleCount<=b+d||(this.modules[a+c][b+d]=c>=0&&6>=c&&(0==d||6==d)||d>=0&&6>=d&&(0==c||6==c)||c>=2&&4>=c&&d>=2&&4>=d?!0:!1)},getBestMaskPattern:function(){for(var a=0,b=0,c=0;8>c;c++){this.makeImpl(!0,c);var d=f.getLostPoint(this);(0==c||a>d)&&(a=d,b=c)}return b},createMovieClip:function(a,b,c){var d=a.createEmptyMovieClip(b,c),e=1;this.make();for(var f=0;f=g;g++)for(var h=-2;2>=h;h++)this.modules[d+g][e+h]=-2==g||2==g||-2==h||2==h||0==g&&0==h?!0:!1}},setupTypeNumber:function(a){for(var b=f.getBCHTypeNumber(this.typeNumber),c=0;18>c;c++){var d=!a&&1==(1&b>>c);this.modules[Math.floor(c/3)][c%3+this.moduleCount-8-3]=d}for(var c=0;18>c;c++){var d=!a&&1==(1&b>>c);this.modules[c%3+this.moduleCount-8-3][Math.floor(c/3)]=d}},setupTypeInfo:function(a,b){for(var c=this.errorCorrectLevel<<3|b,d=f.getBCHTypeInfo(c),e=0;15>e;e++){var g=!a&&1==(1&d>>e);6>e?this.modules[e][8]=g:8>e?this.modules[e+1][8]=g:this.modules[this.moduleCount-15+e][8]=g}for(var e=0;15>e;e++){var g=!a&&1==(1&d>>e);8>e?this.modules[8][this.moduleCount-e-1]=g:9>e?this.modules[8][15-e-1+1]=g:this.modules[8][15-e-1]=g}this.modules[this.moduleCount-8][8]=!a},mapData:function(a,b){for(var c=-1,d=this.moduleCount-1,e=7,g=0,h=this.moduleCount-1;h>0;h-=2)for(6==h&&h--;;){for(var i=0;2>i;i++)if(null==this.modules[d][h-i]){var j=!1;g>>e));var k=f.getMask(b,d,h-i);k&&(j=!j),this.modules[d][h-i]=j,e--,-1==e&&(g++,e=7)}if(d+=c,0>d||this.moduleCount<=d){d-=c,c=-c;break}}}},b.PAD0=236,b.PAD1=17,b.createData=function(a,c,d){for(var e=j.getRSBlocks(a,c),g=new k,h=0;h8*l)throw new Error("code length overflow. ("+g.getLengthInBits()+">"+8*l+")");for(g.getLengthInBits()+4<=8*l&&g.put(0,4);0!=g.getLengthInBits()%8;)g.putBit(!1);for(;;){if(g.getLengthInBits()>=8*l)break;if(g.put(b.PAD0,8),g.getLengthInBits()>=8*l)break;g.put(b.PAD1,8)}return b.createBytes(g,e)},b.createBytes=function(a,b){for(var c=0,d=0,e=0,g=new Array(b.length),h=new Array(b.length),j=0;j=0?p.get(q):0}}for(var r=0,m=0;mm;m++)for(var j=0;jm;m++)for(var j=0;j=0;)b^=f.G15<=0;)b^=f.G18<>>=1;return b},getPatternPosition:function(a){return f.PATTERN_POSITION_TABLE[a-1]},getMask:function(a,b,c){switch(a){case e.PATTERN000:return 0==(b+c)%2;case e.PATTERN001:return 0==b%2;case e.PATTERN010:return 0==c%3;case e.PATTERN011:return 0==(b+c)%3;case e.PATTERN100:return 0==(Math.floor(b/2)+Math.floor(c/3))%2;case e.PATTERN101:return 0==b*c%2+b*c%3;case e.PATTERN110:return 0==(b*c%2+b*c%3)%2;case e.PATTERN111:return 0==(b*c%3+(b+c)%2)%2;default:throw new Error("bad maskPattern:"+a)}},getErrorCorrectPolynomial:function(a){for(var b=new i([1],0),c=0;a>c;c++)b=b.multiply(new i([1,g.gexp(c)],0));return b},getLengthInBits:function(a,b){if(b>=1&&10>b)switch(a){case c.MODE_NUMBER:return 10;case c.MODE_ALPHA_NUM:return 9;case c.MODE_8BIT_BYTE:return 8;case c.MODE_KANJI:return 8;default:throw new Error("mode:"+a)}else if(27>b)switch(a){case c.MODE_NUMBER:return 12;case c.MODE_ALPHA_NUM:return 11;case c.MODE_8BIT_BYTE:return 16;case c.MODE_KANJI:return 10;default:throw new Error("mode:"+a)}else{if(!(41>b))throw new Error("type:"+b);switch(a){case c.MODE_NUMBER:return 14;case c.MODE_ALPHA_NUM:return 13;case c.MODE_8BIT_BYTE:return 16;case c.MODE_KANJI:return 12;default:throw new Error("mode:"+a)}}},getLostPoint:function(a){for(var b=a.getModuleCount(),c=0,d=0;b>d;d++)for(var e=0;b>e;e++){for(var f=0,g=a.isDark(d,e),h=-1;1>=h;h++)if(!(0>d+h||d+h>=b))for(var i=-1;1>=i;i++)0>e+i||e+i>=b||(0!=h||0!=i)&&g==a.isDark(d+h,e+i)&&f++;f>5&&(c+=3+f-5)}for(var d=0;b-1>d;d++)for(var e=0;b-1>e;e++){var j=0;a.isDark(d,e)&&j++,a.isDark(d+1,e)&&j++,a.isDark(d,e+1)&&j++,a.isDark(d+1,e+1)&&j++,(0==j||4==j)&&(c+=3)}for(var d=0;b>d;d++)for(var e=0;b-6>e;e++)a.isDark(d,e)&&!a.isDark(d,e+1)&&a.isDark(d,e+2)&&a.isDark(d,e+3)&&a.isDark(d,e+4)&&!a.isDark(d,e+5)&&a.isDark(d,e+6)&&(c+=40);for(var e=0;b>e;e++)for(var d=0;b-6>d;d++)a.isDark(d,e)&&!a.isDark(d+1,e)&&a.isDark(d+2,e)&&a.isDark(d+3,e)&&a.isDark(d+4,e)&&!a.isDark(d+5,e)&&a.isDark(d+6,e)&&(c+=40);for(var k=0,e=0;b>e;e++)for(var d=0;b>d;d++)a.isDark(d,e)&&k++;var l=Math.abs(100*k/b/b-50)/5;return c+=10*l}},g={glog:function(a){if(1>a)throw new Error("glog("+a+")");return g.LOG_TABLE[a]},gexp:function(a){for(;0>a;)a+=255;for(;a>=256;)a-=255;return g.EXP_TABLE[a]},EXP_TABLE:new Array(256),LOG_TABLE:new Array(256)},h=0;8>h;h++)g.EXP_TABLE[h]=1<h;h++)g.EXP_TABLE[h]=g.EXP_TABLE[h-4]^g.EXP_TABLE[h-5]^g.EXP_TABLE[h-6]^g.EXP_TABLE[h-8];for(var h=0;255>h;h++)g.LOG_TABLE[g.EXP_TABLE[h]]=h;i.prototype={get:function(a){return this.num[a]},getLength:function(){return this.num.length},multiply:function(a){for(var b=new Array(this.getLength()+a.getLength()-1),c=0;cf;f++)for(var g=c[3*f+0],h=c[3*f+1],i=c[3*f+2],k=0;g>k;k++)e.push(new j(h,i));return e},j.getRsBlockTable=function(a,b){switch(b){case d.L:return j.RS_BLOCK_TABLE[4*(a-1)+0];case d.M:return j.RS_BLOCK_TABLE[4*(a-1)+1];case d.Q:return j.RS_BLOCK_TABLE[4*(a-1)+2];case d.H:return j.RS_BLOCK_TABLE[4*(a-1)+3];default:return void 0}},k.prototype={get:function(a){var b=Math.floor(a/8);return 1==(1&this.buffer[b]>>>7-a%8)},put:function(a,b){for(var c=0;b>c;c++)this.putBit(1==(1&a>>>b-c-1))},getLengthInBits:function(){return this.length},putBit:function(a){var b=Math.floor(this.length/8);this.buffer.length<=b&&this.buffer.push(0),a&&(this.buffer[b]|=128>>>this.length%8),this.length++}};var l=[[17,14,11,7],[32,26,20,14],[53,42,32,24],[78,62,46,34],[106,84,60,44],[134,106,74,58],[154,122,86,64],[192,152,108,84],[230,180,130,98],[271,213,151,119],[321,251,177,137],[367,287,203,155],[425,331,241,177],[458,362,258,194],[520,412,292,220],[586,450,322,250],[644,504,364,280],[718,560,394,310],[792,624,442,338],[858,666,482,382],[929,711,509,403],[1003,779,565,439],[1091,857,611,461],[1171,911,661,511],[1273,997,715,535],[1367,1059,751,593],[1465,1125,805,625],[1528,1190,868,658],[1628,1264,908,698],[1732,1370,982,742],[1840,1452,1030,790],[1952,1538,1112,842],[2068,1628,1168,898],[2188,1722,1228,958],[2303,1809,1283,983],[2431,1911,1351,1051],[2563,1989,1423,1093],[2699,2099,1499,1139],[2809,2213,1579,1219],[2953,2331,1663,1273]],o=function(){var a=function(a,b){this._el=a,this._htOption=b};return a.prototype.draw=function(a){function g(a,b){var c=document.createElementNS("http://www.w3.org/2000/svg",a);for(var d in b)b.hasOwnProperty(d)&&c.setAttribute(d,b[d]);return c}var b=this._htOption,c=this._el,d=a.getModuleCount();Math.floor(b.width/d),Math.floor(b.height/d),this.clear();var h=g("svg",{viewBox:"0 0 "+String(d)+" "+String(d),width:"100%",height:"100%",fill:b.colorLight});h.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink","http://www.w3.org/1999/xlink"),c.appendChild(h),h.appendChild(g("rect",{fill:b.colorDark,width:"1",height:"1",id:"template"}));for(var i=0;d>i;i++)for(var j=0;d>j;j++)if(a.isDark(i,j)){var k=g("use",{x:String(i),y:String(j)});k.setAttributeNS("http://www.w3.org/1999/xlink","href","#template"),h.appendChild(k)}},a.prototype.clear=function(){for(;this._el.hasChildNodes();)this._el.removeChild(this._el.lastChild)},a}(),p="svg"===document.documentElement.tagName.toLowerCase(),q=p?o:m()?function(){function a(){this._elImage.src=this._elCanvas.toDataURL("image/png"),this._elImage.style.display="block",this._elCanvas.style.display="none"}function d(a,b){var c=this;if(c._fFail=b,c._fSuccess=a,null===c._bSupportDataURI){var d=document.createElement("img"),e=function(){c._bSupportDataURI=!1,c._fFail&&_fFail.call(c)},f=function(){c._bSupportDataURI=!0,c._fSuccess&&c._fSuccess.call(c)};return d.onabort=e,d.onerror=e,d.onload=f,d.src="data:image/gif;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg==",void 0}c._bSupportDataURI===!0&&c._fSuccess?c._fSuccess.call(c):c._bSupportDataURI===!1&&c._fFail&&c._fFail.call(c)}if(this._android&&this._android<=2.1){var b=1/window.devicePixelRatio,c=CanvasRenderingContext2D.prototype.drawImage;CanvasRenderingContext2D.prototype.drawImage=function(a,d,e,f,g,h,i,j){if("nodeName"in a&&/img/i.test(a.nodeName))for(var l=arguments.length-1;l>=1;l--)arguments[l]=arguments[l]*b;else"undefined"==typeof j&&(arguments[1]*=b,arguments[2]*=b,arguments[3]*=b,arguments[4]*=b);c.apply(this,arguments)}}var e=function(a,b){this._bIsPainted=!1,this._android=n(),this._htOption=b,this._elCanvas=document.createElement("canvas"),this._elCanvas.width=b.width,this._elCanvas.height=b.height,a.appendChild(this._elCanvas),this._el=a,this._oContext=this._elCanvas.getContext("2d"),this._bIsPainted=!1,this._elImage=document.createElement("img"),this._elImage.style.display="none",this._el.appendChild(this._elImage),this._bSupportDataURI=null};return e.prototype.draw=function(a){var b=this._elImage,c=this._oContext,d=this._htOption,e=a.getModuleCount(),f=d.width/e,g=d.height/e,h=Math.round(f),i=Math.round(g);b.style.display="none",this.clear();for(var j=0;e>j;j++)for(var k=0;e>k;k++){var l=a.isDark(j,k),m=k*f,n=j*g;c.strokeStyle=l?d.colorDark:d.colorLight,c.lineWidth=1,c.fillStyle=l?d.colorDark:d.colorLight,c.fillRect(m,n,f,g),c.strokeRect(Math.floor(m)+.5,Math.floor(n)+.5,h,i),c.strokeRect(Math.ceil(m)-.5,Math.ceil(n)-.5,h,i)}this._bIsPainted=!0},e.prototype.makeImage=function(){this._bIsPainted&&d.call(this,a)},e.prototype.isPainted=function(){return this._bIsPainted},e.prototype.clear=function(){this._oContext.clearRect(0,0,this._elCanvas.width,this._elCanvas.height),this._bIsPainted=!1},e.prototype.round=function(a){return a?Math.floor(1e3*a)/1e3:a},e}():function(){var a=function(a,b){this._el=a,this._htOption=b};return a.prototype.draw=function(a){for(var b=this._htOption,c=this._el,d=a.getModuleCount(),e=Math.floor(b.width/d),f=Math.floor(b.height/d),g=[''],h=0;d>h;h++){g.push("");for(var i=0;d>i;i++)g.push(' ');g.push(" ")}g.push("
"),c.innerHTML=g.join("");var j=c.childNodes[0],k=(b.width-j.offsetWidth)/2,l=(b.height-j.offsetHeight)/2;k>0&&l>0&&(j.style.margin=l+"px "+k+"px")},a.prototype.clear=function(){this._el.innerHTML=""},a}();QRCode=function(a,b){if(this._htOption={width:256,height:256,typeNumber:4,colorDark:"#000000",colorLight:"#ffffff",correctLevel:d.H},"string"==typeof b&&(b={text:b}),b)for(var c in b)this._htOption[c]=b[c];"string"==typeof a&&(a=document.getElementById(a)),this._android=n(),this._el=a,this._oQRCode=null,this._oDrawing=new q(this._el,this._htOption),this._htOption.text&&this.makeCode(this._htOption.text)},QRCode.prototype.makeCode=function(a){this._oQRCode=new b(r(a,this._htOption.correctLevel),this._htOption.correctLevel),this._oQRCode.addData(a),this._oQRCode.make(),this._el.title=a,this._oDrawing.draw(this._oQRCode),this.makeImage()},QRCode.prototype.makeImage=function(){"function"==typeof this._oDrawing.makeImage&&(!this._android||this._android>=3)&&this._oDrawing.makeImage()},QRCode.prototype.clear=function(){this._oDrawing.clear()},QRCode.CorrectLevel=d}();
--------------------------------------------------------------------------------
/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/poperbu/lightning-captive-portal/dda9aa607adbeef39b4b34d47ed0aad175aecedd/public/favicon.ico
--------------------------------------------------------------------------------