├── .env.sample ├── .gitignore ├── LICENSE ├── Procfile ├── README.md ├── deta.json ├── index.js ├── package-lock.json ├── package.json └── src ├── middleware.js ├── schemas.js ├── static ├── images │ ├── api-icon.png │ ├── contact-icon.png │ ├── favicons │ │ ├── android-chrome-192x192.png │ │ ├── android-chrome-512x512.png │ │ ├── apple-touch-icon.png │ │ ├── favicon-16x16.png │ │ ├── favicon-32x32.png │ │ ├── favicon.ico │ │ └── site.webmanifest │ ├── github-icon.png │ ├── privacy-icon.png │ └── save.svg └── js │ ├── js.cookie.min.js │ ├── main.js │ ├── paste.js │ └── sweetalert2.min.js ├── utils.js └── views ├── error.ejs ├── main.ejs ├── paste.ejs └── template.ejs /.env.sample: -------------------------------------------------------------------------------- 1 | HOST = "0.0.0.0" 2 | PORT = 8000 3 | DETA_BASE_NAME = "pasting" 4 | DETA_PROJECT_KEY = "" 5 | KEY_LENGTH = 8 6 | WEBSITE_NAME = "pasting" 7 | BINARY_CONTENT_TYPES = "*" -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | *.env 3 | .deta -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2021 Adnan Ahmad 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /Procfile: -------------------------------------------------------------------------------- 1 | web: npm run heroku -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |

Introduction

2 |

Pasting is a minimalist publishing tool that allows you to create richly formatted posts and push them to the Web in just a click. 3 | In simple words it's a website like Telegraph but it can be used as a pastebin too.   4 | 5 | 6 | Deploy 7 | 8 | 9 | ## Installing 10 | It can be deployed on deta or you need node v16.13.0 or later and also need deta's project key if not deploying on deta. 11 | 12 | ### Configuration 13 | - Set `HOST` and `PORT` in environment variables or in arguments. Default it will listen on `127.0.0.1:8000`. 14 | - Set `DETA_PROJECT_KEY` in environment varibales. 15 | 16 | ### Deployment 17 | - Install dependencies using `npm` 18 | ``` 19 | npm install 20 | ``` 21 | - Run it using `node` 22 | ``` 23 | node index.js 24 | ``` 25 | 26 | ### Copyright & License 27 | Copyright (©) 2022 by [Adnan Ahmad](https://github.com/viperadnan-git). 28 | Licensed under the terms of the [MIT](./LICENSE) -------------------------------------------------------------------------------- /deta.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Pasting", 3 | "description": "Pasting is a minimalist publishing tool that allows you to create richly formatted posts and push them to the Web in just a click. In simple words it's a website like Telegraph but it can be used as a pastebin too.", 4 | "env": [ 5 | { 6 | "key": "WEBSITE_NAME", 7 | "description": "Your website name, defaults to \"pasting\"", 8 | "value": "pasting", 9 | "required": false 10 | }, 11 | { 12 | "key": "BINARY_CONTENT_TYPES", 13 | "description": "This should be (*) to serve types of static files.", 14 | "value": "*", 15 | "required": true 16 | }, 17 | { 18 | "key": "DETA_BASE_NAME", 19 | "description": "Deta Base name to use be used.", 20 | "value": "pasting", 21 | "required": false 22 | }, 23 | { 24 | "key": "KEY_LENGTH", 25 | "description": "Length of the random generated key, default to 8", 26 | "value": "8", 27 | "required": false 28 | } 29 | ] 30 | } -------------------------------------------------------------------------------- /index.js: -------------------------------------------------------------------------------- 1 | require('dotenv').config() 2 | 3 | const path = require('path'); 4 | const { Deta } = require('deta'); 5 | const express = require('express'); 6 | const { marked } = require('marked'); 7 | const schemas = require('./src/schemas'); 8 | const { JoiValidate } = require('./src/middleware'); 9 | const { pages, generateKey, generateDomainName } = require('./src/utils'); 10 | 11 | 12 | const app = express(); 13 | const deta = Deta(process.env.DETA_PROJECT_KEY); 14 | const db = deta.Base(process.env.DETA_BASE_NAME || 'pasting'); 15 | 16 | const port = process.argv[3] || process.env.PORT || 8000; 17 | const hostname = process.argv[2] || process.env.HOST || '127.0.0.1'; 18 | const domain = generateDomainName(hostname, port); 19 | const websiteName = process.env.WEBSITE_NAME || 'pasting'; 20 | 21 | 22 | app.use(async (req, res, next) => { 23 | console.log(`${req.method} ${req.path}`); 24 | next(); 25 | }); 26 | 27 | 28 | app.use(express.json({ limit: '2mb' })); 29 | app.use('/static', express.static('./src/static')); 30 | app.set('view engine', 'ejs'); 31 | app.set('views', path.join(__dirname, './src/views')); 32 | 33 | 34 | app.get("/", async (req, res) => { 35 | res.render('main', { website_name: websiteName }) 36 | }); 37 | 38 | 39 | app.post("/api", JoiValidate(schemas.Paste), async (req, res) => { 40 | console.log(req.body); 41 | try { 42 | if (!req.body.key) { 43 | req.body.key = await generateKey() 44 | } 45 | data = await db.insert(req.body) 46 | res.json({ 47 | 'key': data.key, 48 | 'url': `http://${domain}/${data.key}` 49 | }) 50 | } catch (error) { 51 | res.status(400).json({ 52 | 'error': error.message 53 | }); 54 | } 55 | }); 56 | 57 | 58 | app.get("/raw/:key", async (req, res) => { 59 | data = await db.get(req.params.key); 60 | if (data && data.raw) { 61 | res.setHeader('Content-Type', 'text/plain'); 62 | res.end(data.content); 63 | } else { 64 | res.setHeader('Content-Type', 'text/html'); 65 | res.end(await getPage(page_404)); 66 | } 67 | }); 68 | 69 | 70 | app.get("/:key", async (req, res) => { 71 | data = await db.get(req.params.key); 72 | if (data) { 73 | if (!data.code) { 74 | data.content = marked.parse(data.content) 75 | } 76 | res.render('paste', { data: data, website_name: websiteName }); 77 | } else { 78 | res.render('paste', { data: pages.Page404, website_name: websiteName }) 79 | } 80 | }); 81 | 82 | 83 | if (process.env.DETA_RUNTIME) { 84 | module.exports = app; 85 | } else { 86 | app.listen(port, hostname, async () => { 87 | console.log(`Listening at ${hostname}:${port}`); 88 | }); 89 | } -------------------------------------------------------------------------------- /package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "pasting", 3 | "version": "0.4.1", 4 | "lockfileVersion": 2, 5 | "requires": true, 6 | "packages": { 7 | "": { 8 | "name": "pasting", 9 | "version": "0.4.1", 10 | "license": "MIT", 11 | "dependencies": { 12 | "deta": "^1.0.1", 13 | "dotenv": "^10.0.0", 14 | "ejs": "^3.1.7", 15 | "express": "^4.17.1", 16 | "joi": "^17.5.0", 17 | "marked": "^4.0.8" 18 | }, 19 | "engines": { 20 | "node": "16.13.0", 21 | "npm": "8.1.4" 22 | } 23 | }, 24 | "node_modules/@hapi/hoek": { 25 | "version": "9.2.1", 26 | "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-9.2.1.tgz", 27 | "integrity": "sha512-gfta+H8aziZsm8pZa0vj04KO6biEiisppNgA1kbJvFrrWu9Vm7eaUEy76DIxsuTaWvti5fkJVhllWc6ZTE+Mdw==" 28 | }, 29 | "node_modules/@hapi/topo": { 30 | "version": "5.1.0", 31 | "resolved": "https://registry.npmjs.org/@hapi/topo/-/topo-5.1.0.tgz", 32 | "integrity": "sha512-foQZKJig7Ob0BMAYBfcJk8d77QtOe7Wo4ox7ff1lQYoNNAb6jwcY1ncdoy2e9wQZzvNy7ODZCYJkK8kzmcAnAg==", 33 | "dependencies": { 34 | "@hapi/hoek": "^9.0.0" 35 | } 36 | }, 37 | "node_modules/@sideway/address": { 38 | "version": "4.1.3", 39 | "resolved": "https://registry.npmjs.org/@sideway/address/-/address-4.1.3.tgz", 40 | "integrity": "sha512-8ncEUtmnTsMmL7z1YPB47kPUq7LpKWJNFPsRzHiIajGC5uXlWGn+AmkYPcHNl8S4tcEGx+cnORnNYaw2wvL+LQ==", 41 | "dependencies": { 42 | "@hapi/hoek": "^9.0.0" 43 | } 44 | }, 45 | "node_modules/@sideway/formula": { 46 | "version": "3.0.1", 47 | "resolved": "https://registry.npmjs.org/@sideway/formula/-/formula-3.0.1.tgz", 48 | "integrity": "sha512-/poHZJJVjx3L+zVD6g9KgHfYnb443oi7wLu/XKojDviHy6HOEOA6z1Trk5aR1dGcmPenJEgb2sK2I80LeS3MIg==" 49 | }, 50 | "node_modules/@sideway/pinpoint": { 51 | "version": "2.0.0", 52 | "resolved": "https://registry.npmjs.org/@sideway/pinpoint/-/pinpoint-2.0.0.tgz", 53 | "integrity": "sha512-RNiOoTPkptFtSVzQevY/yWtZwf/RxyVnPy/OcA9HBM3MlGDnBEYL5B41H0MTn0Uec8Hi+2qUtTfG2WWZBmMejQ==" 54 | }, 55 | "node_modules/accepts": { 56 | "version": "1.3.7", 57 | "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.7.tgz", 58 | "integrity": "sha512-Il80Qs2WjYlJIBNzNkK6KYqlVMTbZLXgHx2oT0pU/fjRHyEp+PEfEPY0R3WCwAGVOtauxh1hOxNgIf5bv7dQpA==", 59 | "dependencies": { 60 | "mime-types": "~2.1.24", 61 | "negotiator": "0.6.2" 62 | }, 63 | "engines": { 64 | "node": ">= 0.6" 65 | } 66 | }, 67 | "node_modules/ansi-styles": { 68 | "version": "4.3.0", 69 | "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", 70 | "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", 71 | "dependencies": { 72 | "color-convert": "^2.0.1" 73 | }, 74 | "engines": { 75 | "node": ">=8" 76 | }, 77 | "funding": { 78 | "url": "https://github.com/chalk/ansi-styles?sponsor=1" 79 | } 80 | }, 81 | "node_modules/array-flatten": { 82 | "version": "1.1.1", 83 | "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", 84 | "integrity": "sha1-ml9pkFGx5wczKPKgCJaLZOopVdI=" 85 | }, 86 | "node_modules/async": { 87 | "version": "3.2.5", 88 | "resolved": "https://registry.npmjs.org/async/-/async-3.2.5.tgz", 89 | "integrity": "sha512-baNZyqaaLhyLVKm/DlvdW051MSgO6b8eVfIezl9E5PqWxFgzLm/wQntEW4zOytVburDEr0JlALEpdOFwvErLsg==" 90 | }, 91 | "node_modules/balanced-match": { 92 | "version": "1.0.2", 93 | "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", 94 | "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" 95 | }, 96 | "node_modules/body-parser": { 97 | "version": "1.19.0", 98 | "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.19.0.tgz", 99 | "integrity": "sha512-dhEPs72UPbDnAQJ9ZKMNTP6ptJaionhP5cBb541nXPlW60Jepo9RV/a4fX4XWW9CuFNK22krhrj1+rgzifNCsw==", 100 | "dependencies": { 101 | "bytes": "3.1.0", 102 | "content-type": "~1.0.4", 103 | "debug": "2.6.9", 104 | "depd": "~1.1.2", 105 | "http-errors": "1.7.2", 106 | "iconv-lite": "0.4.24", 107 | "on-finished": "~2.3.0", 108 | "qs": "6.7.0", 109 | "raw-body": "2.4.0", 110 | "type-is": "~1.6.17" 111 | }, 112 | "engines": { 113 | "node": ">= 0.8" 114 | } 115 | }, 116 | "node_modules/body-parser/node_modules/qs": { 117 | "version": "6.7.0", 118 | "resolved": "https://registry.npmjs.org/qs/-/qs-6.7.0.tgz", 119 | "integrity": "sha512-VCdBRNFTX1fyE7Nb6FYoURo/SPe62QCaAyzJvUjwRaIsc+NePBEniHlvxFmmX56+HZphIGtV0XeCirBtpDrTyQ==", 120 | "engines": { 121 | "node": ">=0.6" 122 | } 123 | }, 124 | "node_modules/brace-expansion": { 125 | "version": "1.1.11", 126 | "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", 127 | "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", 128 | "dependencies": { 129 | "balanced-match": "^1.0.0", 130 | "concat-map": "0.0.1" 131 | } 132 | }, 133 | "node_modules/bytes": { 134 | "version": "3.1.0", 135 | "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.0.tgz", 136 | "integrity": "sha512-zauLjrfCG+xvoyaqLoV8bLVXXNGC4JqlxFCutSDWA6fJrTo2ZuvLYTqZ7aHBLZSMOopbzwv8f+wZcVzfVTI2Dg==", 137 | "engines": { 138 | "node": ">= 0.8" 139 | } 140 | }, 141 | "node_modules/chalk": { 142 | "version": "4.1.2", 143 | "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", 144 | "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", 145 | "dependencies": { 146 | "ansi-styles": "^4.1.0", 147 | "supports-color": "^7.1.0" 148 | }, 149 | "engines": { 150 | "node": ">=10" 151 | }, 152 | "funding": { 153 | "url": "https://github.com/chalk/chalk?sponsor=1" 154 | } 155 | }, 156 | "node_modules/color-convert": { 157 | "version": "2.0.1", 158 | "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", 159 | "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", 160 | "dependencies": { 161 | "color-name": "~1.1.4" 162 | }, 163 | "engines": { 164 | "node": ">=7.0.0" 165 | } 166 | }, 167 | "node_modules/color-name": { 168 | "version": "1.1.4", 169 | "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", 170 | "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" 171 | }, 172 | "node_modules/concat-map": { 173 | "version": "0.0.1", 174 | "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", 175 | "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==" 176 | }, 177 | "node_modules/content-disposition": { 178 | "version": "0.5.3", 179 | "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.3.tgz", 180 | "integrity": "sha512-ExO0774ikEObIAEV9kDo50o+79VCUdEB6n6lzKgGwupcVeRlhrj3qGAfwq8G6uBJjkqLrhT0qEYFcWng8z1z0g==", 181 | "dependencies": { 182 | "safe-buffer": "5.1.2" 183 | }, 184 | "engines": { 185 | "node": ">= 0.6" 186 | } 187 | }, 188 | "node_modules/content-type": { 189 | "version": "1.0.4", 190 | "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz", 191 | "integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==", 192 | "engines": { 193 | "node": ">= 0.6" 194 | } 195 | }, 196 | "node_modules/cookie": { 197 | "version": "0.4.0", 198 | "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.0.tgz", 199 | "integrity": "sha512-+Hp8fLp57wnUSt0tY0tHEXh4voZRDnoIrZPqlo3DPiI4y9lwg/jqx+1Om94/W6ZaPDOUbnjOt/99w66zk+l1Xg==", 200 | "engines": { 201 | "node": ">= 0.6" 202 | } 203 | }, 204 | "node_modules/cookie-signature": { 205 | "version": "1.0.6", 206 | "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", 207 | "integrity": "sha1-4wOogrNCzD7oylE6eZmXNNqzriw=" 208 | }, 209 | "node_modules/debug": { 210 | "version": "2.6.9", 211 | "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", 212 | "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", 213 | "dependencies": { 214 | "ms": "2.0.0" 215 | } 216 | }, 217 | "node_modules/depd": { 218 | "version": "1.1.2", 219 | "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", 220 | "integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=", 221 | "engines": { 222 | "node": ">= 0.6" 223 | } 224 | }, 225 | "node_modules/destroy": { 226 | "version": "1.0.4", 227 | "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz", 228 | "integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA=" 229 | }, 230 | "node_modules/deta": { 231 | "version": "1.0.1", 232 | "resolved": "https://registry.npmjs.org/deta/-/deta-1.0.1.tgz", 233 | "integrity": "sha512-7PoMfBoZp1b8g8KRrvS0EIbym9D+mTiJeEqK3yMrkqHw1RPXKURDqIU9imG+vTogEquPmsxmWKjiEwWuxMm8lQ==", 234 | "dependencies": { 235 | "node-fetch": "^2.6.1" 236 | } 237 | }, 238 | "node_modules/dotenv": { 239 | "version": "10.0.0", 240 | "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-10.0.0.tgz", 241 | "integrity": "sha512-rlBi9d8jpv9Sf1klPjNfFAuWDjKLwTIJJ/VxtoTwIR6hnZxcEOQCZg2oIL3MWBYw5GpUDKOEnND7LXTbIpQ03Q==", 242 | "engines": { 243 | "node": ">=10" 244 | } 245 | }, 246 | "node_modules/ee-first": { 247 | "version": "1.1.1", 248 | "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", 249 | "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=" 250 | }, 251 | "node_modules/ejs": { 252 | "version": "3.1.7", 253 | "resolved": "https://registry.npmjs.org/ejs/-/ejs-3.1.7.tgz", 254 | "integrity": "sha512-BIar7R6abbUxDA3bfXrO4DSgwo8I+fB5/1zgujl3HLLjwd6+9iOnrT+t3grn2qbk9vOgBubXOFwX2m9axoFaGw==", 255 | "dependencies": { 256 | "jake": "^10.8.5" 257 | }, 258 | "bin": { 259 | "ejs": "bin/cli.js" 260 | }, 261 | "engines": { 262 | "node": ">=0.10.0" 263 | } 264 | }, 265 | "node_modules/encodeurl": { 266 | "version": "1.0.2", 267 | "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", 268 | "integrity": "sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k=", 269 | "engines": { 270 | "node": ">= 0.8" 271 | } 272 | }, 273 | "node_modules/escape-html": { 274 | "version": "1.0.3", 275 | "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", 276 | "integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg=" 277 | }, 278 | "node_modules/etag": { 279 | "version": "1.8.1", 280 | "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", 281 | "integrity": "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=", 282 | "engines": { 283 | "node": ">= 0.6" 284 | } 285 | }, 286 | "node_modules/express": { 287 | "version": "4.17.1", 288 | "resolved": "https://registry.npmjs.org/express/-/express-4.17.1.tgz", 289 | "integrity": "sha512-mHJ9O79RqluphRrcw2X/GTh3k9tVv8YcoyY4Kkh4WDMUYKRZUq0h1o0w2rrrxBqM7VoeUVqgb27xlEMXTnYt4g==", 290 | "dependencies": { 291 | "accepts": "~1.3.7", 292 | "array-flatten": "1.1.1", 293 | "body-parser": "1.19.0", 294 | "content-disposition": "0.5.3", 295 | "content-type": "~1.0.4", 296 | "cookie": "0.4.0", 297 | "cookie-signature": "1.0.6", 298 | "debug": "2.6.9", 299 | "depd": "~1.1.2", 300 | "encodeurl": "~1.0.2", 301 | "escape-html": "~1.0.3", 302 | "etag": "~1.8.1", 303 | "finalhandler": "~1.1.2", 304 | "fresh": "0.5.2", 305 | "merge-descriptors": "1.0.1", 306 | "methods": "~1.1.2", 307 | "on-finished": "~2.3.0", 308 | "parseurl": "~1.3.3", 309 | "path-to-regexp": "0.1.7", 310 | "proxy-addr": "~2.0.5", 311 | "qs": "6.7.0", 312 | "range-parser": "~1.2.1", 313 | "safe-buffer": "5.1.2", 314 | "send": "0.17.1", 315 | "serve-static": "1.14.1", 316 | "setprototypeof": "1.1.1", 317 | "statuses": "~1.5.0", 318 | "type-is": "~1.6.18", 319 | "utils-merge": "1.0.1", 320 | "vary": "~1.1.2" 321 | }, 322 | "engines": { 323 | "node": ">= 0.10.0" 324 | } 325 | }, 326 | "node_modules/express/node_modules/qs": { 327 | "version": "6.7.0", 328 | "resolved": "https://registry.npmjs.org/qs/-/qs-6.7.0.tgz", 329 | "integrity": "sha512-VCdBRNFTX1fyE7Nb6FYoURo/SPe62QCaAyzJvUjwRaIsc+NePBEniHlvxFmmX56+HZphIGtV0XeCirBtpDrTyQ==", 330 | "engines": { 331 | "node": ">=0.6" 332 | } 333 | }, 334 | "node_modules/filelist": { 335 | "version": "1.0.4", 336 | "resolved": "https://registry.npmjs.org/filelist/-/filelist-1.0.4.tgz", 337 | "integrity": "sha512-w1cEuf3S+DrLCQL7ET6kz+gmlJdbq9J7yXCSjK/OZCPA+qEN1WyF4ZAf0YYJa4/shHJra2t/d/r8SV4Ji+x+8Q==", 338 | "dependencies": { 339 | "minimatch": "^5.0.1" 340 | } 341 | }, 342 | "node_modules/filelist/node_modules/brace-expansion": { 343 | "version": "2.0.1", 344 | "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", 345 | "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", 346 | "dependencies": { 347 | "balanced-match": "^1.0.0" 348 | } 349 | }, 350 | "node_modules/filelist/node_modules/minimatch": { 351 | "version": "5.1.6", 352 | "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", 353 | "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", 354 | "dependencies": { 355 | "brace-expansion": "^2.0.1" 356 | }, 357 | "engines": { 358 | "node": ">=10" 359 | } 360 | }, 361 | "node_modules/finalhandler": { 362 | "version": "1.1.2", 363 | "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.2.tgz", 364 | "integrity": "sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA==", 365 | "dependencies": { 366 | "debug": "2.6.9", 367 | "encodeurl": "~1.0.2", 368 | "escape-html": "~1.0.3", 369 | "on-finished": "~2.3.0", 370 | "parseurl": "~1.3.3", 371 | "statuses": "~1.5.0", 372 | "unpipe": "~1.0.0" 373 | }, 374 | "engines": { 375 | "node": ">= 0.8" 376 | } 377 | }, 378 | "node_modules/forwarded": { 379 | "version": "0.1.2", 380 | "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.1.2.tgz", 381 | "integrity": "sha1-mMI9qxF1ZXuMBXPozszZGw/xjIQ=", 382 | "engines": { 383 | "node": ">= 0.6" 384 | } 385 | }, 386 | "node_modules/fresh": { 387 | "version": "0.5.2", 388 | "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", 389 | "integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=", 390 | "engines": { 391 | "node": ">= 0.6" 392 | } 393 | }, 394 | "node_modules/has-flag": { 395 | "version": "4.0.0", 396 | "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", 397 | "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", 398 | "engines": { 399 | "node": ">=8" 400 | } 401 | }, 402 | "node_modules/http-errors": { 403 | "version": "1.7.2", 404 | "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.7.2.tgz", 405 | "integrity": "sha512-uUQBt3H/cSIVfch6i1EuPNy/YsRSOUBXTVfZ+yR7Zjez3qjBz6i9+i4zjNaoqcoFVI4lQJ5plg63TvGfRSDCRg==", 406 | "dependencies": { 407 | "depd": "~1.1.2", 408 | "inherits": "2.0.3", 409 | "setprototypeof": "1.1.1", 410 | "statuses": ">= 1.5.0 < 2", 411 | "toidentifier": "1.0.0" 412 | }, 413 | "engines": { 414 | "node": ">= 0.6" 415 | } 416 | }, 417 | "node_modules/iconv-lite": { 418 | "version": "0.4.24", 419 | "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", 420 | "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", 421 | "dependencies": { 422 | "safer-buffer": ">= 2.1.2 < 3" 423 | }, 424 | "engines": { 425 | "node": ">=0.10.0" 426 | } 427 | }, 428 | "node_modules/inherits": { 429 | "version": "2.0.3", 430 | "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", 431 | "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" 432 | }, 433 | "node_modules/ipaddr.js": { 434 | "version": "1.9.1", 435 | "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", 436 | "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==", 437 | "engines": { 438 | "node": ">= 0.10" 439 | } 440 | }, 441 | "node_modules/jake": { 442 | "version": "10.8.7", 443 | "resolved": "https://registry.npmjs.org/jake/-/jake-10.8.7.tgz", 444 | "integrity": "sha512-ZDi3aP+fG/LchyBzUM804VjddnwfSfsdeYkwt8NcbKRvo4rFkjhs456iLFn3k2ZUWvNe4i48WACDbza8fhq2+w==", 445 | "dependencies": { 446 | "async": "^3.2.3", 447 | "chalk": "^4.0.2", 448 | "filelist": "^1.0.4", 449 | "minimatch": "^3.1.2" 450 | }, 451 | "bin": { 452 | "jake": "bin/cli.js" 453 | }, 454 | "engines": { 455 | "node": ">=10" 456 | } 457 | }, 458 | "node_modules/joi": { 459 | "version": "17.5.0", 460 | "resolved": "https://registry.npmjs.org/joi/-/joi-17.5.0.tgz", 461 | "integrity": "sha512-R7hR50COp7StzLnDi4ywOXHrBrgNXuUUfJWIR5lPY5Bm/pOD3jZaTwpluUXVLRWcoWZxkrHBBJ5hLxgnlehbdw==", 462 | "dependencies": { 463 | "@hapi/hoek": "^9.0.0", 464 | "@hapi/topo": "^5.0.0", 465 | "@sideway/address": "^4.1.3", 466 | "@sideway/formula": "^3.0.0", 467 | "@sideway/pinpoint": "^2.0.0" 468 | } 469 | }, 470 | "node_modules/marked": { 471 | "version": "4.0.10", 472 | "resolved": "https://registry.npmjs.org/marked/-/marked-4.0.10.tgz", 473 | "integrity": "sha512-+QvuFj0nGgO970fySghXGmuw+Fd0gD2x3+MqCWLIPf5oxdv1Ka6b2q+z9RP01P/IaKPMEramy+7cNy/Lw8c3hw==", 474 | "bin": { 475 | "marked": "bin/marked.js" 476 | }, 477 | "engines": { 478 | "node": ">= 12" 479 | } 480 | }, 481 | "node_modules/media-typer": { 482 | "version": "0.3.0", 483 | "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", 484 | "integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=", 485 | "engines": { 486 | "node": ">= 0.6" 487 | } 488 | }, 489 | "node_modules/merge-descriptors": { 490 | "version": "1.0.1", 491 | "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", 492 | "integrity": "sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E=" 493 | }, 494 | "node_modules/methods": { 495 | "version": "1.1.2", 496 | "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", 497 | "integrity": "sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4=", 498 | "engines": { 499 | "node": ">= 0.6" 500 | } 501 | }, 502 | "node_modules/mime": { 503 | "version": "1.6.0", 504 | "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", 505 | "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", 506 | "bin": { 507 | "mime": "cli.js" 508 | }, 509 | "engines": { 510 | "node": ">=4" 511 | } 512 | }, 513 | "node_modules/mime-db": { 514 | "version": "1.47.0", 515 | "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.47.0.tgz", 516 | "integrity": "sha512-QBmA/G2y+IfeS4oktet3qRZ+P5kPhCKRXxXnQEudYqUaEioAU1/Lq2us3D/t1Jfo4hE9REQPrbB7K5sOczJVIw==", 517 | "engines": { 518 | "node": ">= 0.6" 519 | } 520 | }, 521 | "node_modules/mime-types": { 522 | "version": "2.1.30", 523 | "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.30.tgz", 524 | "integrity": "sha512-crmjA4bLtR8m9qLpHvgxSChT+XoSlZi8J4n/aIdn3z92e/U47Z0V/yl+Wh9W046GgFVAmoNR/fmdbZYcSSIUeg==", 525 | "dependencies": { 526 | "mime-db": "1.47.0" 527 | }, 528 | "engines": { 529 | "node": ">= 0.6" 530 | } 531 | }, 532 | "node_modules/minimatch": { 533 | "version": "3.1.2", 534 | "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", 535 | "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", 536 | "dependencies": { 537 | "brace-expansion": "^1.1.7" 538 | }, 539 | "engines": { 540 | "node": "*" 541 | } 542 | }, 543 | "node_modules/ms": { 544 | "version": "2.0.0", 545 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", 546 | "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" 547 | }, 548 | "node_modules/negotiator": { 549 | "version": "0.6.2", 550 | "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.2.tgz", 551 | "integrity": "sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw==", 552 | "engines": { 553 | "node": ">= 0.6" 554 | } 555 | }, 556 | "node_modules/node-fetch": { 557 | "version": "2.6.11", 558 | "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.11.tgz", 559 | "integrity": "sha512-4I6pdBY1EthSqDmJkiNk3JIT8cswwR9nfeW/cPdUagJYEQG7R95WRH74wpz7ma8Gh/9dI9FP+OU+0E4FvtA55w==", 560 | "dependencies": { 561 | "whatwg-url": "^5.0.0" 562 | }, 563 | "engines": { 564 | "node": "4.x || >=6.0.0" 565 | }, 566 | "peerDependencies": { 567 | "encoding": "^0.1.0" 568 | }, 569 | "peerDependenciesMeta": { 570 | "encoding": { 571 | "optional": true 572 | } 573 | } 574 | }, 575 | "node_modules/on-finished": { 576 | "version": "2.3.0", 577 | "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", 578 | "integrity": "sha1-IPEzZIGwg811M3mSoWlxqi2QaUc=", 579 | "dependencies": { 580 | "ee-first": "1.1.1" 581 | }, 582 | "engines": { 583 | "node": ">= 0.8" 584 | } 585 | }, 586 | "node_modules/parseurl": { 587 | "version": "1.3.3", 588 | "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", 589 | "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==", 590 | "engines": { 591 | "node": ">= 0.8" 592 | } 593 | }, 594 | "node_modules/path-to-regexp": { 595 | "version": "0.1.7", 596 | "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", 597 | "integrity": "sha1-32BBeABfUi8V60SQ5yR6G/qmf4w=" 598 | }, 599 | "node_modules/proxy-addr": { 600 | "version": "2.0.6", 601 | "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.6.tgz", 602 | "integrity": "sha512-dh/frvCBVmSsDYzw6n926jv974gddhkFPfiN8hPOi30Wax25QZyZEGveluCgliBnqmuM+UJmBErbAUFIoDbjOw==", 603 | "dependencies": { 604 | "forwarded": "~0.1.2", 605 | "ipaddr.js": "1.9.1" 606 | }, 607 | "engines": { 608 | "node": ">= 0.10" 609 | } 610 | }, 611 | "node_modules/range-parser": { 612 | "version": "1.2.1", 613 | "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", 614 | "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==", 615 | "engines": { 616 | "node": ">= 0.6" 617 | } 618 | }, 619 | "node_modules/raw-body": { 620 | "version": "2.4.0", 621 | "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.4.0.tgz", 622 | "integrity": "sha512-4Oz8DUIwdvoa5qMJelxipzi/iJIi40O5cGV1wNYp5hvZP8ZN0T+jiNkL0QepXs+EsQ9XJ8ipEDoiH70ySUJP3Q==", 623 | "dependencies": { 624 | "bytes": "3.1.0", 625 | "http-errors": "1.7.2", 626 | "iconv-lite": "0.4.24", 627 | "unpipe": "1.0.0" 628 | }, 629 | "engines": { 630 | "node": ">= 0.8" 631 | } 632 | }, 633 | "node_modules/safe-buffer": { 634 | "version": "5.1.2", 635 | "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", 636 | "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" 637 | }, 638 | "node_modules/safer-buffer": { 639 | "version": "2.1.2", 640 | "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", 641 | "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" 642 | }, 643 | "node_modules/send": { 644 | "version": "0.17.1", 645 | "resolved": "https://registry.npmjs.org/send/-/send-0.17.1.tgz", 646 | "integrity": "sha512-BsVKsiGcQMFwT8UxypobUKyv7irCNRHk1T0G680vk88yf6LBByGcZJOTJCrTP2xVN6yI+XjPJcNuE3V4fT9sAg==", 647 | "dependencies": { 648 | "debug": "2.6.9", 649 | "depd": "~1.1.2", 650 | "destroy": "~1.0.4", 651 | "encodeurl": "~1.0.2", 652 | "escape-html": "~1.0.3", 653 | "etag": "~1.8.1", 654 | "fresh": "0.5.2", 655 | "http-errors": "~1.7.2", 656 | "mime": "1.6.0", 657 | "ms": "2.1.1", 658 | "on-finished": "~2.3.0", 659 | "range-parser": "~1.2.1", 660 | "statuses": "~1.5.0" 661 | }, 662 | "engines": { 663 | "node": ">= 0.8.0" 664 | } 665 | }, 666 | "node_modules/send/node_modules/ms": { 667 | "version": "2.1.1", 668 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", 669 | "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==" 670 | }, 671 | "node_modules/serve-static": { 672 | "version": "1.14.1", 673 | "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.14.1.tgz", 674 | "integrity": "sha512-JMrvUwE54emCYWlTI+hGrGv5I8dEwmco/00EvkzIIsR7MqrHonbD9pO2MOfFnpFntl7ecpZs+3mW+XbQZu9QCg==", 675 | "dependencies": { 676 | "encodeurl": "~1.0.2", 677 | "escape-html": "~1.0.3", 678 | "parseurl": "~1.3.3", 679 | "send": "0.17.1" 680 | }, 681 | "engines": { 682 | "node": ">= 0.8.0" 683 | } 684 | }, 685 | "node_modules/setprototypeof": { 686 | "version": "1.1.1", 687 | "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.1.tgz", 688 | "integrity": "sha512-JvdAWfbXeIGaZ9cILp38HntZSFSo3mWg6xGcJJsd+d4aRMOqauag1C63dJfDw7OaMYwEbHMOxEZ1lqVRYP2OAw==" 689 | }, 690 | "node_modules/statuses": { 691 | "version": "1.5.0", 692 | "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz", 693 | "integrity": "sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow=", 694 | "engines": { 695 | "node": ">= 0.6" 696 | } 697 | }, 698 | "node_modules/supports-color": { 699 | "version": "7.2.0", 700 | "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", 701 | "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", 702 | "dependencies": { 703 | "has-flag": "^4.0.0" 704 | }, 705 | "engines": { 706 | "node": ">=8" 707 | } 708 | }, 709 | "node_modules/toidentifier": { 710 | "version": "1.0.0", 711 | "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.0.tgz", 712 | "integrity": "sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw==", 713 | "engines": { 714 | "node": ">=0.6" 715 | } 716 | }, 717 | "node_modules/tr46": { 718 | "version": "0.0.3", 719 | "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", 720 | "integrity": "sha1-gYT9NH2snNwYWZLzpmIuFLnZq2o=" 721 | }, 722 | "node_modules/type-is": { 723 | "version": "1.6.18", 724 | "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", 725 | "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", 726 | "dependencies": { 727 | "media-typer": "0.3.0", 728 | "mime-types": "~2.1.24" 729 | }, 730 | "engines": { 731 | "node": ">= 0.6" 732 | } 733 | }, 734 | "node_modules/unpipe": { 735 | "version": "1.0.0", 736 | "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", 737 | "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=", 738 | "engines": { 739 | "node": ">= 0.8" 740 | } 741 | }, 742 | "node_modules/utils-merge": { 743 | "version": "1.0.1", 744 | "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", 745 | "integrity": "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=", 746 | "engines": { 747 | "node": ">= 0.4.0" 748 | } 749 | }, 750 | "node_modules/vary": { 751 | "version": "1.1.2", 752 | "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", 753 | "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=", 754 | "engines": { 755 | "node": ">= 0.8" 756 | } 757 | }, 758 | "node_modules/webidl-conversions": { 759 | "version": "3.0.1", 760 | "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", 761 | "integrity": "sha1-JFNCdeKnvGvnvIZhHMFq4KVlSHE=" 762 | }, 763 | "node_modules/whatwg-url": { 764 | "version": "5.0.0", 765 | "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", 766 | "integrity": "sha1-lmRU6HZUYuN2RNNib2dCzotwll0=", 767 | "dependencies": { 768 | "tr46": "~0.0.3", 769 | "webidl-conversions": "^3.0.0" 770 | } 771 | } 772 | }, 773 | "dependencies": { 774 | "@hapi/hoek": { 775 | "version": "9.2.1", 776 | "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-9.2.1.tgz", 777 | "integrity": "sha512-gfta+H8aziZsm8pZa0vj04KO6biEiisppNgA1kbJvFrrWu9Vm7eaUEy76DIxsuTaWvti5fkJVhllWc6ZTE+Mdw==" 778 | }, 779 | "@hapi/topo": { 780 | "version": "5.1.0", 781 | "resolved": "https://registry.npmjs.org/@hapi/topo/-/topo-5.1.0.tgz", 782 | "integrity": "sha512-foQZKJig7Ob0BMAYBfcJk8d77QtOe7Wo4ox7ff1lQYoNNAb6jwcY1ncdoy2e9wQZzvNy7ODZCYJkK8kzmcAnAg==", 783 | "requires": { 784 | "@hapi/hoek": "^9.0.0" 785 | } 786 | }, 787 | "@sideway/address": { 788 | "version": "4.1.3", 789 | "resolved": "https://registry.npmjs.org/@sideway/address/-/address-4.1.3.tgz", 790 | "integrity": "sha512-8ncEUtmnTsMmL7z1YPB47kPUq7LpKWJNFPsRzHiIajGC5uXlWGn+AmkYPcHNl8S4tcEGx+cnORnNYaw2wvL+LQ==", 791 | "requires": { 792 | "@hapi/hoek": "^9.0.0" 793 | } 794 | }, 795 | "@sideway/formula": { 796 | "version": "3.0.1", 797 | "resolved": "https://registry.npmjs.org/@sideway/formula/-/formula-3.0.1.tgz", 798 | "integrity": "sha512-/poHZJJVjx3L+zVD6g9KgHfYnb443oi7wLu/XKojDviHy6HOEOA6z1Trk5aR1dGcmPenJEgb2sK2I80LeS3MIg==" 799 | }, 800 | "@sideway/pinpoint": { 801 | "version": "2.0.0", 802 | "resolved": "https://registry.npmjs.org/@sideway/pinpoint/-/pinpoint-2.0.0.tgz", 803 | "integrity": "sha512-RNiOoTPkptFtSVzQevY/yWtZwf/RxyVnPy/OcA9HBM3MlGDnBEYL5B41H0MTn0Uec8Hi+2qUtTfG2WWZBmMejQ==" 804 | }, 805 | "accepts": { 806 | "version": "1.3.7", 807 | "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.7.tgz", 808 | "integrity": "sha512-Il80Qs2WjYlJIBNzNkK6KYqlVMTbZLXgHx2oT0pU/fjRHyEp+PEfEPY0R3WCwAGVOtauxh1hOxNgIf5bv7dQpA==", 809 | "requires": { 810 | "mime-types": "~2.1.24", 811 | "negotiator": "0.6.2" 812 | } 813 | }, 814 | "ansi-styles": { 815 | "version": "4.3.0", 816 | "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", 817 | "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", 818 | "requires": { 819 | "color-convert": "^2.0.1" 820 | } 821 | }, 822 | "array-flatten": { 823 | "version": "1.1.1", 824 | "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", 825 | "integrity": "sha1-ml9pkFGx5wczKPKgCJaLZOopVdI=" 826 | }, 827 | "async": { 828 | "version": "3.2.5", 829 | "resolved": "https://registry.npmjs.org/async/-/async-3.2.5.tgz", 830 | "integrity": "sha512-baNZyqaaLhyLVKm/DlvdW051MSgO6b8eVfIezl9E5PqWxFgzLm/wQntEW4zOytVburDEr0JlALEpdOFwvErLsg==" 831 | }, 832 | "balanced-match": { 833 | "version": "1.0.2", 834 | "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", 835 | "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" 836 | }, 837 | "body-parser": { 838 | "version": "1.19.0", 839 | "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.19.0.tgz", 840 | "integrity": "sha512-dhEPs72UPbDnAQJ9ZKMNTP6ptJaionhP5cBb541nXPlW60Jepo9RV/a4fX4XWW9CuFNK22krhrj1+rgzifNCsw==", 841 | "requires": { 842 | "bytes": "3.1.0", 843 | "content-type": "~1.0.4", 844 | "debug": "2.6.9", 845 | "depd": "~1.1.2", 846 | "http-errors": "1.7.2", 847 | "iconv-lite": "0.4.24", 848 | "on-finished": "~2.3.0", 849 | "qs": "6.7.0", 850 | "raw-body": "2.4.0", 851 | "type-is": "~1.6.17" 852 | }, 853 | "dependencies": { 854 | "qs": { 855 | "version": "6.7.0", 856 | "resolved": "https://registry.npmjs.org/qs/-/qs-6.7.0.tgz", 857 | "integrity": "sha512-VCdBRNFTX1fyE7Nb6FYoURo/SPe62QCaAyzJvUjwRaIsc+NePBEniHlvxFmmX56+HZphIGtV0XeCirBtpDrTyQ==" 858 | } 859 | } 860 | }, 861 | "brace-expansion": { 862 | "version": "1.1.11", 863 | "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", 864 | "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", 865 | "requires": { 866 | "balanced-match": "^1.0.0", 867 | "concat-map": "0.0.1" 868 | } 869 | }, 870 | "bytes": { 871 | "version": "3.1.0", 872 | "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.0.tgz", 873 | "integrity": "sha512-zauLjrfCG+xvoyaqLoV8bLVXXNGC4JqlxFCutSDWA6fJrTo2ZuvLYTqZ7aHBLZSMOopbzwv8f+wZcVzfVTI2Dg==" 874 | }, 875 | "chalk": { 876 | "version": "4.1.2", 877 | "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", 878 | "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", 879 | "requires": { 880 | "ansi-styles": "^4.1.0", 881 | "supports-color": "^7.1.0" 882 | } 883 | }, 884 | "color-convert": { 885 | "version": "2.0.1", 886 | "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", 887 | "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", 888 | "requires": { 889 | "color-name": "~1.1.4" 890 | } 891 | }, 892 | "color-name": { 893 | "version": "1.1.4", 894 | "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", 895 | "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" 896 | }, 897 | "concat-map": { 898 | "version": "0.0.1", 899 | "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", 900 | "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==" 901 | }, 902 | "content-disposition": { 903 | "version": "0.5.3", 904 | "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.3.tgz", 905 | "integrity": "sha512-ExO0774ikEObIAEV9kDo50o+79VCUdEB6n6lzKgGwupcVeRlhrj3qGAfwq8G6uBJjkqLrhT0qEYFcWng8z1z0g==", 906 | "requires": { 907 | "safe-buffer": "5.1.2" 908 | } 909 | }, 910 | "content-type": { 911 | "version": "1.0.4", 912 | "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz", 913 | "integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==" 914 | }, 915 | "cookie": { 916 | "version": "0.4.0", 917 | "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.0.tgz", 918 | "integrity": "sha512-+Hp8fLp57wnUSt0tY0tHEXh4voZRDnoIrZPqlo3DPiI4y9lwg/jqx+1Om94/W6ZaPDOUbnjOt/99w66zk+l1Xg==" 919 | }, 920 | "cookie-signature": { 921 | "version": "1.0.6", 922 | "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", 923 | "integrity": "sha1-4wOogrNCzD7oylE6eZmXNNqzriw=" 924 | }, 925 | "debug": { 926 | "version": "2.6.9", 927 | "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", 928 | "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", 929 | "requires": { 930 | "ms": "2.0.0" 931 | } 932 | }, 933 | "depd": { 934 | "version": "1.1.2", 935 | "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", 936 | "integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=" 937 | }, 938 | "destroy": { 939 | "version": "1.0.4", 940 | "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz", 941 | "integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA=" 942 | }, 943 | "deta": { 944 | "version": "1.0.1", 945 | "resolved": "https://registry.npmjs.org/deta/-/deta-1.0.1.tgz", 946 | "integrity": "sha512-7PoMfBoZp1b8g8KRrvS0EIbym9D+mTiJeEqK3yMrkqHw1RPXKURDqIU9imG+vTogEquPmsxmWKjiEwWuxMm8lQ==", 947 | "requires": { 948 | "node-fetch": "^2.6.1" 949 | } 950 | }, 951 | "dotenv": { 952 | "version": "10.0.0", 953 | "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-10.0.0.tgz", 954 | "integrity": "sha512-rlBi9d8jpv9Sf1klPjNfFAuWDjKLwTIJJ/VxtoTwIR6hnZxcEOQCZg2oIL3MWBYw5GpUDKOEnND7LXTbIpQ03Q==" 955 | }, 956 | "ee-first": { 957 | "version": "1.1.1", 958 | "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", 959 | "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=" 960 | }, 961 | "ejs": { 962 | "version": "3.1.7", 963 | "resolved": "https://registry.npmjs.org/ejs/-/ejs-3.1.7.tgz", 964 | "integrity": "sha512-BIar7R6abbUxDA3bfXrO4DSgwo8I+fB5/1zgujl3HLLjwd6+9iOnrT+t3grn2qbk9vOgBubXOFwX2m9axoFaGw==", 965 | "requires": { 966 | "jake": "^10.8.5" 967 | } 968 | }, 969 | "encodeurl": { 970 | "version": "1.0.2", 971 | "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", 972 | "integrity": "sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k=" 973 | }, 974 | "escape-html": { 975 | "version": "1.0.3", 976 | "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", 977 | "integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg=" 978 | }, 979 | "etag": { 980 | "version": "1.8.1", 981 | "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", 982 | "integrity": "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=" 983 | }, 984 | "express": { 985 | "version": "4.17.1", 986 | "resolved": "https://registry.npmjs.org/express/-/express-4.17.1.tgz", 987 | "integrity": "sha512-mHJ9O79RqluphRrcw2X/GTh3k9tVv8YcoyY4Kkh4WDMUYKRZUq0h1o0w2rrrxBqM7VoeUVqgb27xlEMXTnYt4g==", 988 | "requires": { 989 | "accepts": "~1.3.7", 990 | "array-flatten": "1.1.1", 991 | "body-parser": "1.19.0", 992 | "content-disposition": "0.5.3", 993 | "content-type": "~1.0.4", 994 | "cookie": "0.4.0", 995 | "cookie-signature": "1.0.6", 996 | "debug": "2.6.9", 997 | "depd": "~1.1.2", 998 | "encodeurl": "~1.0.2", 999 | "escape-html": "~1.0.3", 1000 | "etag": "~1.8.1", 1001 | "finalhandler": "~1.1.2", 1002 | "fresh": "0.5.2", 1003 | "merge-descriptors": "1.0.1", 1004 | "methods": "~1.1.2", 1005 | "on-finished": "~2.3.0", 1006 | "parseurl": "~1.3.3", 1007 | "path-to-regexp": "0.1.7", 1008 | "proxy-addr": "~2.0.5", 1009 | "qs": "6.7.0", 1010 | "range-parser": "~1.2.1", 1011 | "safe-buffer": "5.1.2", 1012 | "send": "0.17.1", 1013 | "serve-static": "1.14.1", 1014 | "setprototypeof": "1.1.1", 1015 | "statuses": "~1.5.0", 1016 | "type-is": "~1.6.18", 1017 | "utils-merge": "1.0.1", 1018 | "vary": "~1.1.2" 1019 | }, 1020 | "dependencies": { 1021 | "qs": { 1022 | "version": "6.7.0", 1023 | "resolved": "https://registry.npmjs.org/qs/-/qs-6.7.0.tgz", 1024 | "integrity": "sha512-VCdBRNFTX1fyE7Nb6FYoURo/SPe62QCaAyzJvUjwRaIsc+NePBEniHlvxFmmX56+HZphIGtV0XeCirBtpDrTyQ==" 1025 | } 1026 | } 1027 | }, 1028 | "filelist": { 1029 | "version": "1.0.4", 1030 | "resolved": "https://registry.npmjs.org/filelist/-/filelist-1.0.4.tgz", 1031 | "integrity": "sha512-w1cEuf3S+DrLCQL7ET6kz+gmlJdbq9J7yXCSjK/OZCPA+qEN1WyF4ZAf0YYJa4/shHJra2t/d/r8SV4Ji+x+8Q==", 1032 | "requires": { 1033 | "minimatch": "^5.0.1" 1034 | }, 1035 | "dependencies": { 1036 | "brace-expansion": { 1037 | "version": "2.0.1", 1038 | "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", 1039 | "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", 1040 | "requires": { 1041 | "balanced-match": "^1.0.0" 1042 | } 1043 | }, 1044 | "minimatch": { 1045 | "version": "5.1.6", 1046 | "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", 1047 | "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", 1048 | "requires": { 1049 | "brace-expansion": "^2.0.1" 1050 | } 1051 | } 1052 | } 1053 | }, 1054 | "finalhandler": { 1055 | "version": "1.1.2", 1056 | "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.2.tgz", 1057 | "integrity": "sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA==", 1058 | "requires": { 1059 | "debug": "2.6.9", 1060 | "encodeurl": "~1.0.2", 1061 | "escape-html": "~1.0.3", 1062 | "on-finished": "~2.3.0", 1063 | "parseurl": "~1.3.3", 1064 | "statuses": "~1.5.0", 1065 | "unpipe": "~1.0.0" 1066 | } 1067 | }, 1068 | "forwarded": { 1069 | "version": "0.1.2", 1070 | "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.1.2.tgz", 1071 | "integrity": "sha1-mMI9qxF1ZXuMBXPozszZGw/xjIQ=" 1072 | }, 1073 | "fresh": { 1074 | "version": "0.5.2", 1075 | "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", 1076 | "integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=" 1077 | }, 1078 | "has-flag": { 1079 | "version": "4.0.0", 1080 | "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", 1081 | "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==" 1082 | }, 1083 | "http-errors": { 1084 | "version": "1.7.2", 1085 | "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.7.2.tgz", 1086 | "integrity": "sha512-uUQBt3H/cSIVfch6i1EuPNy/YsRSOUBXTVfZ+yR7Zjez3qjBz6i9+i4zjNaoqcoFVI4lQJ5plg63TvGfRSDCRg==", 1087 | "requires": { 1088 | "depd": "~1.1.2", 1089 | "inherits": "2.0.3", 1090 | "setprototypeof": "1.1.1", 1091 | "statuses": ">= 1.5.0 < 2", 1092 | "toidentifier": "1.0.0" 1093 | } 1094 | }, 1095 | "iconv-lite": { 1096 | "version": "0.4.24", 1097 | "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", 1098 | "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", 1099 | "requires": { 1100 | "safer-buffer": ">= 2.1.2 < 3" 1101 | } 1102 | }, 1103 | "inherits": { 1104 | "version": "2.0.3", 1105 | "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", 1106 | "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" 1107 | }, 1108 | "ipaddr.js": { 1109 | "version": "1.9.1", 1110 | "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", 1111 | "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==" 1112 | }, 1113 | "jake": { 1114 | "version": "10.8.7", 1115 | "resolved": "https://registry.npmjs.org/jake/-/jake-10.8.7.tgz", 1116 | "integrity": "sha512-ZDi3aP+fG/LchyBzUM804VjddnwfSfsdeYkwt8NcbKRvo4rFkjhs456iLFn3k2ZUWvNe4i48WACDbza8fhq2+w==", 1117 | "requires": { 1118 | "async": "^3.2.3", 1119 | "chalk": "^4.0.2", 1120 | "filelist": "^1.0.4", 1121 | "minimatch": "^3.1.2" 1122 | } 1123 | }, 1124 | "joi": { 1125 | "version": "17.5.0", 1126 | "resolved": "https://registry.npmjs.org/joi/-/joi-17.5.0.tgz", 1127 | "integrity": "sha512-R7hR50COp7StzLnDi4ywOXHrBrgNXuUUfJWIR5lPY5Bm/pOD3jZaTwpluUXVLRWcoWZxkrHBBJ5hLxgnlehbdw==", 1128 | "requires": { 1129 | "@hapi/hoek": "^9.0.0", 1130 | "@hapi/topo": "^5.0.0", 1131 | "@sideway/address": "^4.1.3", 1132 | "@sideway/formula": "^3.0.0", 1133 | "@sideway/pinpoint": "^2.0.0" 1134 | } 1135 | }, 1136 | "marked": { 1137 | "version": "4.0.10", 1138 | "resolved": "https://registry.npmjs.org/marked/-/marked-4.0.10.tgz", 1139 | "integrity": "sha512-+QvuFj0nGgO970fySghXGmuw+Fd0gD2x3+MqCWLIPf5oxdv1Ka6b2q+z9RP01P/IaKPMEramy+7cNy/Lw8c3hw==" 1140 | }, 1141 | "media-typer": { 1142 | "version": "0.3.0", 1143 | "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", 1144 | "integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=" 1145 | }, 1146 | "merge-descriptors": { 1147 | "version": "1.0.1", 1148 | "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", 1149 | "integrity": "sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E=" 1150 | }, 1151 | "methods": { 1152 | "version": "1.1.2", 1153 | "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", 1154 | "integrity": "sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4=" 1155 | }, 1156 | "mime": { 1157 | "version": "1.6.0", 1158 | "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", 1159 | "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==" 1160 | }, 1161 | "mime-db": { 1162 | "version": "1.47.0", 1163 | "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.47.0.tgz", 1164 | "integrity": "sha512-QBmA/G2y+IfeS4oktet3qRZ+P5kPhCKRXxXnQEudYqUaEioAU1/Lq2us3D/t1Jfo4hE9REQPrbB7K5sOczJVIw==" 1165 | }, 1166 | "mime-types": { 1167 | "version": "2.1.30", 1168 | "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.30.tgz", 1169 | "integrity": "sha512-crmjA4bLtR8m9qLpHvgxSChT+XoSlZi8J4n/aIdn3z92e/U47Z0V/yl+Wh9W046GgFVAmoNR/fmdbZYcSSIUeg==", 1170 | "requires": { 1171 | "mime-db": "1.47.0" 1172 | } 1173 | }, 1174 | "minimatch": { 1175 | "version": "3.1.2", 1176 | "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", 1177 | "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", 1178 | "requires": { 1179 | "brace-expansion": "^1.1.7" 1180 | } 1181 | }, 1182 | "ms": { 1183 | "version": "2.0.0", 1184 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", 1185 | "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" 1186 | }, 1187 | "negotiator": { 1188 | "version": "0.6.2", 1189 | "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.2.tgz", 1190 | "integrity": "sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw==" 1191 | }, 1192 | "node-fetch": { 1193 | "version": "2.6.11", 1194 | "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.11.tgz", 1195 | "integrity": "sha512-4I6pdBY1EthSqDmJkiNk3JIT8cswwR9nfeW/cPdUagJYEQG7R95WRH74wpz7ma8Gh/9dI9FP+OU+0E4FvtA55w==", 1196 | "requires": { 1197 | "whatwg-url": "^5.0.0" 1198 | } 1199 | }, 1200 | "on-finished": { 1201 | "version": "2.3.0", 1202 | "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", 1203 | "integrity": "sha1-IPEzZIGwg811M3mSoWlxqi2QaUc=", 1204 | "requires": { 1205 | "ee-first": "1.1.1" 1206 | } 1207 | }, 1208 | "parseurl": { 1209 | "version": "1.3.3", 1210 | "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", 1211 | "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==" 1212 | }, 1213 | "path-to-regexp": { 1214 | "version": "0.1.7", 1215 | "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", 1216 | "integrity": "sha1-32BBeABfUi8V60SQ5yR6G/qmf4w=" 1217 | }, 1218 | "proxy-addr": { 1219 | "version": "2.0.6", 1220 | "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.6.tgz", 1221 | "integrity": "sha512-dh/frvCBVmSsDYzw6n926jv974gddhkFPfiN8hPOi30Wax25QZyZEGveluCgliBnqmuM+UJmBErbAUFIoDbjOw==", 1222 | "requires": { 1223 | "forwarded": "~0.1.2", 1224 | "ipaddr.js": "1.9.1" 1225 | } 1226 | }, 1227 | "range-parser": { 1228 | "version": "1.2.1", 1229 | "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", 1230 | "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==" 1231 | }, 1232 | "raw-body": { 1233 | "version": "2.4.0", 1234 | "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.4.0.tgz", 1235 | "integrity": "sha512-4Oz8DUIwdvoa5qMJelxipzi/iJIi40O5cGV1wNYp5hvZP8ZN0T+jiNkL0QepXs+EsQ9XJ8ipEDoiH70ySUJP3Q==", 1236 | "requires": { 1237 | "bytes": "3.1.0", 1238 | "http-errors": "1.7.2", 1239 | "iconv-lite": "0.4.24", 1240 | "unpipe": "1.0.0" 1241 | } 1242 | }, 1243 | "safe-buffer": { 1244 | "version": "5.1.2", 1245 | "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", 1246 | "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" 1247 | }, 1248 | "safer-buffer": { 1249 | "version": "2.1.2", 1250 | "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", 1251 | "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" 1252 | }, 1253 | "send": { 1254 | "version": "0.17.1", 1255 | "resolved": "https://registry.npmjs.org/send/-/send-0.17.1.tgz", 1256 | "integrity": "sha512-BsVKsiGcQMFwT8UxypobUKyv7irCNRHk1T0G680vk88yf6LBByGcZJOTJCrTP2xVN6yI+XjPJcNuE3V4fT9sAg==", 1257 | "requires": { 1258 | "debug": "2.6.9", 1259 | "depd": "~1.1.2", 1260 | "destroy": "~1.0.4", 1261 | "encodeurl": "~1.0.2", 1262 | "escape-html": "~1.0.3", 1263 | "etag": "~1.8.1", 1264 | "fresh": "0.5.2", 1265 | "http-errors": "~1.7.2", 1266 | "mime": "1.6.0", 1267 | "ms": "2.1.1", 1268 | "on-finished": "~2.3.0", 1269 | "range-parser": "~1.2.1", 1270 | "statuses": "~1.5.0" 1271 | }, 1272 | "dependencies": { 1273 | "ms": { 1274 | "version": "2.1.1", 1275 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", 1276 | "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==" 1277 | } 1278 | } 1279 | }, 1280 | "serve-static": { 1281 | "version": "1.14.1", 1282 | "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.14.1.tgz", 1283 | "integrity": "sha512-JMrvUwE54emCYWlTI+hGrGv5I8dEwmco/00EvkzIIsR7MqrHonbD9pO2MOfFnpFntl7ecpZs+3mW+XbQZu9QCg==", 1284 | "requires": { 1285 | "encodeurl": "~1.0.2", 1286 | "escape-html": "~1.0.3", 1287 | "parseurl": "~1.3.3", 1288 | "send": "0.17.1" 1289 | } 1290 | }, 1291 | "setprototypeof": { 1292 | "version": "1.1.1", 1293 | "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.1.tgz", 1294 | "integrity": "sha512-JvdAWfbXeIGaZ9cILp38HntZSFSo3mWg6xGcJJsd+d4aRMOqauag1C63dJfDw7OaMYwEbHMOxEZ1lqVRYP2OAw==" 1295 | }, 1296 | "statuses": { 1297 | "version": "1.5.0", 1298 | "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz", 1299 | "integrity": "sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow=" 1300 | }, 1301 | "supports-color": { 1302 | "version": "7.2.0", 1303 | "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", 1304 | "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", 1305 | "requires": { 1306 | "has-flag": "^4.0.0" 1307 | } 1308 | }, 1309 | "toidentifier": { 1310 | "version": "1.0.0", 1311 | "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.0.tgz", 1312 | "integrity": "sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw==" 1313 | }, 1314 | "tr46": { 1315 | "version": "0.0.3", 1316 | "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", 1317 | "integrity": "sha1-gYT9NH2snNwYWZLzpmIuFLnZq2o=" 1318 | }, 1319 | "type-is": { 1320 | "version": "1.6.18", 1321 | "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", 1322 | "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", 1323 | "requires": { 1324 | "media-typer": "0.3.0", 1325 | "mime-types": "~2.1.24" 1326 | } 1327 | }, 1328 | "unpipe": { 1329 | "version": "1.0.0", 1330 | "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", 1331 | "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=" 1332 | }, 1333 | "utils-merge": { 1334 | "version": "1.0.1", 1335 | "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", 1336 | "integrity": "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=" 1337 | }, 1338 | "vary": { 1339 | "version": "1.1.2", 1340 | "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", 1341 | "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=" 1342 | }, 1343 | "webidl-conversions": { 1344 | "version": "3.0.1", 1345 | "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", 1346 | "integrity": "sha1-JFNCdeKnvGvnvIZhHMFq4KVlSHE=" 1347 | }, 1348 | "whatwg-url": { 1349 | "version": "5.0.0", 1350 | "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", 1351 | "integrity": "sha1-lmRU6HZUYuN2RNNib2dCzotwll0=", 1352 | "requires": { 1353 | "tr46": "~0.0.3", 1354 | "webidl-conversions": "^3.0.0" 1355 | } 1356 | } 1357 | } 1358 | } 1359 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "pasting", 3 | "version": "0.4.1", 4 | "description": "A website to render html and markdown codes.", 5 | "main": "index.js", 6 | "scripts": { 7 | "start": "node index.js", 8 | "heroku": "node index.js 0.0.0.0", 9 | "test": "node index.js 127.0.0.1 8000" 10 | }, 11 | "repository": { 12 | "type": "git", 13 | "url": "git+https://github.com/viperadnan-git/pasting.git" 14 | }, 15 | "keywords": [ 16 | "render", 17 | "render-html", 18 | "render-md", 19 | "html", 20 | "markdown", 21 | "pastebin", 22 | "highlighter" 23 | ], 24 | "author": "viperadnan", 25 | "license": "MIT", 26 | "bugs": { 27 | "url": "https://github.com/viperadnan-git/pasting/issues" 28 | }, 29 | "homepage": "https://github.com/viperadnan-git/pasting#readme", 30 | "engines": { 31 | "npm": "8.1.4", 32 | "node": "16.13.0" 33 | }, 34 | "dependencies": { 35 | "deta": "^1.0.1", 36 | "dotenv": "^10.0.0", 37 | "ejs": "^3.1.7", 38 | "express": "^4.17.1", 39 | "joi": "^17.5.0", 40 | "marked": "^4.0.8" 41 | } 42 | } -------------------------------------------------------------------------------- /src/middleware.js: -------------------------------------------------------------------------------- 1 | const Joi = require('joi'); 2 | 3 | 4 | const JoiValidate = (schema) => { 5 | return (req, res, next) => { 6 | const { error } = schema.validate(req.body); 7 | const valid = error == null; 8 | 9 | if (valid) { 10 | next(); 11 | } else { 12 | const { details } = error; 13 | const message = details.map(i => i.message).join(','); 14 | 15 | console.log("error", message); 16 | res.status(422).json({ error: message }) 17 | } 18 | } 19 | } 20 | 21 | 22 | module.exports = { 23 | JoiValidate 24 | } -------------------------------------------------------------------------------- /src/schemas.js: -------------------------------------------------------------------------------- 1 | const Joi = require('joi'); 2 | const websiteName = process.env.WEBSITE_NAME || 'pasting'; 3 | 4 | 5 | const schemas = { 6 | Paste: Joi.object().keys({ 7 | content: Joi.string().required(), 8 | key: Joi.string().empty(['', false, null]).alphanum().max(16), 9 | heading: Joi.string().default(websiteName), 10 | code: Joi.bool().default(false), 11 | raw: Joi.bool().default(true), 12 | }) 13 | }; 14 | 15 | 16 | module.exports = schemas; -------------------------------------------------------------------------------- /src/static/images/api-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/viperadnan-git/pasting/e25b2eeadd32e1f7034de44ee0b9dd4308adfa45/src/static/images/api-icon.png -------------------------------------------------------------------------------- /src/static/images/contact-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/viperadnan-git/pasting/e25b2eeadd32e1f7034de44ee0b9dd4308adfa45/src/static/images/contact-icon.png -------------------------------------------------------------------------------- /src/static/images/favicons/android-chrome-192x192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/viperadnan-git/pasting/e25b2eeadd32e1f7034de44ee0b9dd4308adfa45/src/static/images/favicons/android-chrome-192x192.png -------------------------------------------------------------------------------- /src/static/images/favicons/android-chrome-512x512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/viperadnan-git/pasting/e25b2eeadd32e1f7034de44ee0b9dd4308adfa45/src/static/images/favicons/android-chrome-512x512.png -------------------------------------------------------------------------------- /src/static/images/favicons/apple-touch-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/viperadnan-git/pasting/e25b2eeadd32e1f7034de44ee0b9dd4308adfa45/src/static/images/favicons/apple-touch-icon.png -------------------------------------------------------------------------------- /src/static/images/favicons/favicon-16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/viperadnan-git/pasting/e25b2eeadd32e1f7034de44ee0b9dd4308adfa45/src/static/images/favicons/favicon-16x16.png -------------------------------------------------------------------------------- /src/static/images/favicons/favicon-32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/viperadnan-git/pasting/e25b2eeadd32e1f7034de44ee0b9dd4308adfa45/src/static/images/favicons/favicon-32x32.png -------------------------------------------------------------------------------- /src/static/images/favicons/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/viperadnan-git/pasting/e25b2eeadd32e1f7034de44ee0b9dd4308adfa45/src/static/images/favicons/favicon.ico -------------------------------------------------------------------------------- /src/static/images/favicons/site.webmanifest: -------------------------------------------------------------------------------- 1 | {"name":"","short_name":"","icons":[{"src":"/android-chrome-192x192.png","sizes":"192x192","type":"image/png"},{"src":"/android-chrome-512x512.png","sizes":"512x512","type":"image/png"}],"theme_color":"#ffffff","background_color":"#ffffff","display":"standalone"} -------------------------------------------------------------------------------- /src/static/images/github-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/viperadnan-git/pasting/e25b2eeadd32e1f7034de44ee0b9dd4308adfa45/src/static/images/github-icon.png -------------------------------------------------------------------------------- /src/static/images/privacy-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/viperadnan-git/pasting/e25b2eeadd32e1f7034de44ee0b9dd4308adfa45/src/static/images/privacy-icon.png -------------------------------------------------------------------------------- /src/static/images/save.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /src/static/js/js.cookie.min.js: -------------------------------------------------------------------------------- 1 | /*! js-cookie v3.0.1 | MIT */ 2 | !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e=e||self,function(){var n=e.Cookies,o=e.Cookies=t();o.noConflict=function(){return e.Cookies=n,o}}())}(this,(function(){"use strict";function e(e){for(var t=1;t { 9 | toast.addEventListener('mouseenter', Swal.stopTimer) 10 | toast.addEventListener('mouseleave', Swal.resumeTimer) 11 | } 12 | }) 13 | 14 | 15 | const rawRadio = $('#is-raw'); 16 | const codeRadio = $('#is-code'); 17 | const liveOutputRadio = $('#live-output'); 18 | const inputTextarea = $("#inputext"); 19 | const contentDiv = $('#content'); 20 | const saveButton = $("#save"); 21 | 22 | 23 | $(document).ready((event) => { 24 | [ 25 | { 26 | 'id': 'is-raw', 27 | 'jqObj': rawRadio 28 | }, 29 | { 30 | 'id': 'is-code', 31 | 'jqObj': codeRadio 32 | }, 33 | { 34 | 'id': 'live-output', 35 | 'jqObj': liveOutputRadio 36 | } 37 | ].forEach((value, index, arr) => { 38 | if (Cookies.get(value.id) == 'true') { 39 | if (value.id == 'live-output') { 40 | value.jqObj.click() 41 | } else { 42 | value.jqObj.prop("checked", true); 43 | } 44 | } else if (Cookies.get(value.id) == 'false') { 45 | value.jqObj.prop("checked", false); 46 | } 47 | if (value.id != 'live-output') { 48 | value.jqObj.click((event) => { 49 | if (value.jqObj.is(":checked")) { 50 | Cookies.set(value.id, 'true', { expires: 365 }) 51 | } else { 52 | Cookies.set(value.id, 'false', { expires: 365 }) 53 | } 54 | }) 55 | } 56 | }) 57 | }) 58 | 59 | 60 | saveButton.click(function () { 61 | saveButton.html(`

Loading...
`); 62 | inputData = { 63 | "heading": $("#heading").text(), 64 | "content": inputTextarea.val(), 65 | "code": codeRadio.is(":checked") ? true : false, 66 | "raw": rawRadio.is(":checked") ? true : false, 67 | "key": $("#key-name").val() 68 | } 69 | // if ($("#key-name").val()) { 70 | // inputData.key = 71 | // } 72 | $.ajax({ 73 | "url": "/api", 74 | "method": "POST", 75 | "timeout": 0, 76 | "data": JSON.stringify(inputData), 77 | "headers": { 78 | "Content-Type": "application/json" 79 | } 80 | }).done((response) => { 81 | window.location.href = '/' + response.key; 82 | }).fail((request, status, error) => { 83 | let errorMessage = request.responseText; 84 | try { 85 | errorMessage = JSON.parse(errorMessage).error 86 | } catch (e) { console.log(e); } 87 | Toast.fire({ 88 | title: error, 89 | text: errorMessage, 90 | icon: 'error' 91 | }) 92 | }).always(() => { 93 | saveButton.html(``); 94 | }) 95 | }); 96 | 97 | 98 | inputTextarea.keyup(function () { 99 | if (!contentDiv.hasClass("d-none")) { 100 | if (codeRadio.is(":checked")) { 101 | contentDiv.html("
"); 102 | $("#code").text($(this).val()); 103 | } else { 104 | contentDiv.html(marked.parse($(this).val())); 105 | } 106 | } 107 | }); 108 | 109 | 110 | liveOutputRadio.click(function () { 111 | if (liveOutputRadio.is(":checked")) { 112 | inputTextarea.css("height", (screen.height / 1.5) + "px"); 113 | contentDiv.addClass("d-none"); 114 | Cookies.set('live-output', 'true', { expires: 365 }) 115 | } else { 116 | inputTextarea.css("height", (screen.height / 3) + "px"); 117 | contentDiv.removeClass("d-none"); 118 | Cookies.set('live-output', 'false', { expires: 365 }) 119 | } 120 | }); 121 | 122 | 123 | $('#upload-file').change((event) => { 124 | const input = event.target; 125 | if ('files' in input && input.files.length > 0) { 126 | readFileContent(input.files[0]).then(content => { 127 | inputTextarea.val(content); 128 | }).catch(error => alert(error)); 129 | } 130 | }); 131 | 132 | 133 | function readFileContent(file) { 134 | const reader = new FileReader(); 135 | if (file.type.includes("image")) { 136 | return new Promise((resolve, reject) => { 137 | reader.onload = event => resolve("\"image\""); 138 | reader.onerror = error => reject(error); 139 | reader.readAsDataURL(file); 140 | }); 141 | } else { 142 | return new Promise((resolve, reject) => { 143 | reader.onload = event => resolve(event.target.result); 144 | reader.onerror = error => reject(error); 145 | reader.readAsText(file); 146 | }); 147 | } 148 | } -------------------------------------------------------------------------------- /src/static/js/paste.js: -------------------------------------------------------------------------------- 1 | const Toast = Swal.mixin({ 2 | toast: true, 3 | position: 'top', 4 | showConfirmButton: false, 5 | timer: 3000, 6 | // timerProgressBar: true, 7 | showCloseButton: true, 8 | didOpen: (toast) => { 9 | toast.addEventListener('mouseenter', Swal.stopTimer) 10 | toast.addEventListener('mouseleave', Swal.resumeTimer) 11 | } 12 | }) 13 | 14 | function copyToClipboard(id) { 15 | var range = document.createRange(); 16 | range.selectNode(document.getElementById(id)); 17 | window.getSelection().removeAllRanges(); 18 | window.getSelection().addRange(range); 19 | document.execCommand('copy'); 20 | window.getSelection().removeAllRanges(); 21 | } 22 | 23 | const copyButton = $('#copy-content'); 24 | copyButton.click(function (e) { 25 | e.preventDefault(); 26 | copyToClipboard('content') 27 | Toast.fire({ 28 | icon: "success", 29 | title: "Copied Successfully", 30 | text: "Text copied to clipboard successfully." 31 | }) 32 | }); -------------------------------------------------------------------------------- /src/static/js/sweetalert2.min.js: -------------------------------------------------------------------------------- 1 | !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e=e||self).Sweetalert2=t()}(this,function(){"use strict";const u=Object.freeze({cancel:"cancel",backdrop:"backdrop",close:"close",esc:"esc",timer:"timer"}),t="SweetAlert2:",o=e=>e.charAt(0).toUpperCase()+e.slice(1),s=e=>Array.prototype.slice.call(e),a=e=>{console.warn("".concat(t," ").concat("object"==typeof e?e.join(" "):e))},r=e=>{console.error("".concat(t," ").concat(e))},n=[],i=(e,t)=>{t='"'.concat(e,'" is deprecated and will be removed in the next major release. Please use "').concat(t,'" instead.'),n.includes(t)||(n.push(t),a(t))},d=e=>"function"==typeof e?e():e,c=e=>e&&"function"==typeof e.toPromise,l=e=>c(e)?e.toPromise():Promise.resolve(e),p=e=>e&&Promise.resolve(e)===e,m=e=>"object"==typeof e&&e.jquery,g=e=>e instanceof Element||m(e);var e=e=>{const t={};for(const n in e)t[e[n]]="swal2-"+e[n];return t};const h=e(["container","shown","height-auto","iosfix","popup","modal","no-backdrop","no-transition","toast","toast-shown","show","hide","close","title","html-container","actions","confirm","deny","cancel","default-outline","footer","icon","icon-content","image","input","file","range","select","radio","checkbox","label","textarea","inputerror","input-label","validation-message","progress-steps","active-progress-step","progress-step","progress-step-line","loader","loading","styled","top","top-start","top-end","top-left","top-right","center","center-start","center-end","center-left","center-right","bottom","bottom-start","bottom-end","bottom-left","bottom-right","grow-row","grow-column","grow-fullscreen","rtl","timer-progress-bar","timer-progress-bar-container","scrollbar-measure","icon-success","icon-warning","icon-info","icon-question","icon-error"]),f=e(["success","warning","info","question","error"]),b=()=>document.body.querySelector(".".concat(h.container)),y=e=>{const t=b();return t?t.querySelector(e):null},v=e=>y(".".concat(e)),w=()=>v(h.popup),C=()=>v(h.icon),k=()=>v(h.title),A=()=>v(h["html-container"]),P=()=>v(h.image),B=()=>v(h["progress-steps"]),x=()=>v(h["validation-message"]),E=()=>y(".".concat(h.actions," .").concat(h.confirm)),S=()=>y(".".concat(h.actions," .").concat(h.deny));const T=()=>y(".".concat(h.loader)),O=()=>y(".".concat(h.actions," .").concat(h.cancel)),L=()=>v(h.actions),j=()=>v(h.footer),D=()=>v(h["timer-progress-bar"]),M=()=>v(h.close),I=()=>{const e=s(w().querySelectorAll('[tabindex]:not([tabindex="-1"]):not([tabindex="0"])')).sort((e,t)=>(e=parseInt(e.getAttribute("tabindex")),(t=parseInt(t.getAttribute("tabindex")))"-1"!==e.getAttribute("tabindex"));return(t=>{const n=[];for(let e=0;eee(e))},H=()=>!F(document.body,h["toast-shown"])&&!F(document.body,h["no-backdrop"]),q=()=>w()&&F(w(),h.toast);function V(e){var t=1{n.style.transition="width ".concat(e/1e3,"s linear"),n.style.width="0%"},10))}const N={previousBodyPadding:null},U=(t,e)=>{if(t.textContent="",e){const n=new DOMParser,o=n.parseFromString(e,"text/html");s(o.querySelector("head").childNodes).forEach(e=>{t.appendChild(e)}),s(o.querySelector("body").childNodes).forEach(e=>{t.appendChild(e)})}},F=(t,e)=>{if(!e)return!1;var n=e.split(/\s+/);for(let e=0;e{var o,i;if(o=e,i=t,s(o.classList).forEach(e=>{Object.values(h).includes(e)||Object.values(f).includes(e)||Object.values(i.showClass).includes(e)||o.classList.remove(e)}),t.customClass&&t.customClass[n]){if("string"!=typeof t.customClass[n]&&!t.customClass[n].forEach)return a("Invalid type of customClass.".concat(n,'! Expected string or iterable object, got "').concat(typeof t.customClass[n],'"'));K(e,t.customClass[n])}},z=(e,t)=>{if(!t)return null;switch(t){case"select":case"textarea":case"file":return Z(e,h[t]);case"checkbox":return e.querySelector(".".concat(h.checkbox," input"));case"radio":return e.querySelector(".".concat(h.radio," input:checked"))||e.querySelector(".".concat(h.radio," input:first-child"));case"range":return e.querySelector(".".concat(h.range," input"));default:return Z(e,h.input)}},W=e=>{var t;e.focus(),"file"!==e.type&&(t=e.value,e.value="",e.value=t)},_=(e,t,n)=>{e&&t&&(t="string"==typeof t?t.split(/\s+/).filter(Boolean):t).forEach(t=>{e.forEach?e.forEach(e=>{n?e.classList.add(t):e.classList.remove(t)}):n?e.classList.add(t):e.classList.remove(t)})},K=(e,t)=>{_(e,t,!0)},Y=(e,t)=>{_(e,t,!1)},Z=(t,n)=>{for(let e=0;e{(n=n==="".concat(parseInt(n))?parseInt(n):n)||0===parseInt(n)?e.style[t]="number"==typeof n?"".concat(n,"px"):n:e.style.removeProperty(t)},X=function(e){e.style.display=1{e.style.display="none"},G=(e,t,n,o)=>{const i=e.querySelector(t);i&&(i.style[n]=o)},Q=(e,t,n)=>{t?X(e,n):$(e)},ee=e=>!(!e||!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)),te=()=>!ee(E())&&!ee(S())&&!ee(O()),ne=e=>!!(e.scrollHeight>e.clientHeight),oe=e=>{const t=window.getComputedStyle(e);var n=parseFloat(t.getPropertyValue("animation-duration")||"0"),e=parseFloat(t.getPropertyValue("transition-duration")||"0");return 0"undefined"==typeof window||"undefined"==typeof document,se='\n
\n \n
    \n
    \n \n

    \n
    \n \n \n
    \n \n \n
    \n \n
    \n \n \n
    \n
    \n
    \n \n \n \n
    \n
    \n
    \n
    \n
    \n
    \n').replace(/(^|\n)\s*/g,""),ae=()=>{on.isVisible()&&on.resetValidationMessage()},re=e=>{var t=(()=>{const e=b();return!!e&&(e.remove(),Y([document.documentElement,document.body],[h["no-backdrop"],h["toast-shown"],h["has-column"]]),!0)})();if(ie())r("SweetAlert2 requires document to initialize");else{const n=document.createElement("div");n.className=h.container,t&&K(n,h["no-transition"]),U(n,se);const o="string"==typeof(t=e.target)?document.querySelector(t):t;o.appendChild(n),(e=>{const t=w();t.setAttribute("role",e.toast?"alert":"dialog"),t.setAttribute("aria-live",e.toast?"polite":"assertive"),e.toast||t.setAttribute("aria-modal","true")})(e),e=o,"rtl"===window.getComputedStyle(e).direction&&K(b(),h.rtl),(()=>{const e=w(),t=Z(e,h.input),n=Z(e,h.file),o=e.querySelector(".".concat(h.range," input")),i=e.querySelector(".".concat(h.range," output")),s=Z(e,h.select),a=e.querySelector(".".concat(h.checkbox," input")),r=Z(e,h.textarea);t.oninput=ae,n.onchange=ae,s.onchange=ae,a.onchange=ae,r.oninput=ae,o.oninput=()=>{ae(),i.value=o.value},o.onchange=()=>{ae(),o.nextSibling.value=o.value}})()}},ce=(e,t)=>{e instanceof HTMLElement?t.appendChild(e):"object"==typeof e?((e,t)=>{if(e.jquery)le(t,e);else U(t,e.toString())})(e,t):e&&U(t,e)},le=(t,n)=>{if(t.textContent="",0 in n)for(let e=0;e in n;e++)t.appendChild(n[e].cloneNode(!0));else t.appendChild(n.cloneNode(!0))},ue=(()=>{if(ie())return!1;var e=document.createElement("div"),t={WebkitAnimation:"webkitAnimationEnd",OAnimation:"oAnimationEnd oanimationend",animation:"animationend"};for(const n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&void 0!==e.style[n])return t[n];return!1})(),de=(e,t)=>{var n,o,i,s,a,r=L(),c=T();(t.showConfirmButton||t.showDenyButton||t.showCancelButton?X:$)(r),R(r,t,"actions"),n=r,o=c,i=t,s=E(),a=S(),r=O(),pe(s,"confirm",i),pe(a,"deny",i),pe(r,"cancel",i),function(e,t,n,o){if(!o.buttonsStyling)return Y([e,t,n],h.styled);K([e,t,n],h.styled),o.confirmButtonColor&&(e.style.backgroundColor=o.confirmButtonColor,K(e,h["default-outline"]));o.denyButtonColor&&(t.style.backgroundColor=o.denyButtonColor,K(t,h["default-outline"]));o.cancelButtonColor&&(n.style.backgroundColor=o.cancelButtonColor,K(n,h["default-outline"]))}(s,a,r,i),i.reverseButtons&&(i.toast?(n.insertBefore(r,s),n.insertBefore(a,s)):(n.insertBefore(r,o),n.insertBefore(a,o),n.insertBefore(s,o))),U(c,t.loaderHtml),R(c,t,"loader")};function pe(e,t,n){Q(e,n["show".concat(o(t),"Button")],"inline-block"),U(e,n["".concat(t,"ButtonText")]),e.setAttribute("aria-label",n["".concat(t,"ButtonAriaLabel")]),e.className=h[t],R(e,n,"".concat(t,"Button")),K(e,n["".concat(t,"ButtonClass")])}const me=(e,t)=>{var n,o,i=b();i&&(o=i,"string"==typeof(n=t.backdrop)?o.style.background=n:n||K([document.documentElement,document.body],h["no-backdrop"]),o=i,(n=t.position)in h?K(o,h[n]):(a('The "position" parameter is not valid, defaulting to "center"'),K(o,h.center)),n=i,!(o=t.grow)||"string"!=typeof o||(o="grow-".concat(o))in h&&K(n,h[o]),R(i,t,"container"))};var ge={awaitingPromise:new WeakMap,promise:new WeakMap,innerParams:new WeakMap,domCache:new WeakMap};const he=["input","file","range","select","radio","checkbox","textarea"],fe=(e,o)=>{const i=w();e=ge.innerParams.get(e);const s=!e||o.input!==e.input;he.forEach(e=>{var t=h[e];const n=Z(i,t);((e,t)=>{const n=z(w(),e);if(n){be(n);for(const o in t)n.setAttribute(o,t[o])}})(e,o.inputAttributes),n.className=t,s&&$(n)}),o.input&&(s&&(e=>{if(!Ce[e.input])return r('Unexpected type of input! Expected "text", "email", "password", "number", "tel", "select", "radio", "checkbox", "textarea", "file" or "url", got "'.concat(e.input,'"'));const t=we(e.input),n=Ce[e.input](t,e);X(n),setTimeout(()=>{W(n)})})(o),(e=>{const t=we(e.input);if(e.customClass)K(t,e.customClass.input)})(o))},be=t=>{for(let e=0;e{e.placeholder&&!t.inputPlaceholder||(e.placeholder=t.inputPlaceholder)},ve=(e,t,n)=>{if(n.inputLabel){e.id=h.input;const i=document.createElement("label");var o=h["input-label"];i.setAttribute("for",e.id),i.className=o,K(i,n.customClass.inputLabel),i.innerText=n.inputLabel,t.insertAdjacentElement("beforebegin",i)}},we=e=>{e=h[e]||h.input;return Z(w(),e)},Ce={};Ce.text=Ce.email=Ce.password=Ce.number=Ce.tel=Ce.url=(e,t)=>("string"==typeof t.inputValue||"number"==typeof t.inputValue?e.value=t.inputValue:p(t.inputValue)||a('Unexpected type of inputValue! Expected "string", "number" or "Promise", got "'.concat(typeof t.inputValue,'"')),ve(e,e,t),ye(e,t),e.type=t.input,e),Ce.file=(e,t)=>(ve(e,e,t),ye(e,t),e),Ce.range=(e,t)=>{const n=e.querySelector("input"),o=e.querySelector("output");return n.value=t.inputValue,n.type=t.input,o.value=t.inputValue,ve(n,e,t),e},Ce.select=(e,t)=>{if(e.textContent="",t.inputPlaceholder){const n=document.createElement("option");U(n,t.inputPlaceholder),n.value="",n.disabled=!0,n.selected=!0,e.appendChild(n)}return ve(e,e,t),e},Ce.radio=e=>(e.textContent="",e),Ce.checkbox=(e,t)=>{const n=z(w(),"checkbox");n.value=1,n.id=h.checkbox,n.checked=Boolean(t.inputValue);var o=e.querySelector("span");return U(o,t.inputPlaceholder),e},Ce.textarea=(n,e)=>{n.value=e.inputValue,ye(n,e),ve(n,n,e);return setTimeout(()=>{if("MutationObserver"in window){const t=parseInt(window.getComputedStyle(w()).width);new MutationObserver(()=>{var e,e=n.offsetWidth+(e=n,parseInt(window.getComputedStyle(e).marginLeft)+parseInt(window.getComputedStyle(e).marginRight));e>t?w().style.width="".concat(e,"px"):w().style.width=null}).observe(n,{attributes:!0,attributeFilter:["style"]})}}),n};const ke=(e,t)=>{const n=A();R(n,t,"htmlContainer"),t.html?(ce(t.html,n),X(n,"block")):t.text?(n.textContent=t.text,X(n,"block")):$(n),fe(e,t)},Ae=(e,t)=>{var n=j();Q(n,t.footer),t.footer&&ce(t.footer,n),R(n,t,"footer")},Pe=(e,t)=>{const n=M();U(n,t.closeButtonHtml),R(n,t,"closeButton"),Q(n,t.showCloseButton),n.setAttribute("aria-label",t.closeButtonAriaLabel)},Be=(e,t)=>{var n=ge.innerParams.get(e),e=C();return n&&t.icon===n.icon?(Se(e,t),void xe(e,t)):t.icon||t.iconHtml?t.icon&&-1===Object.keys(f).indexOf(t.icon)?(r('Unknown icon! Expected "success", "error", "warning", "info" or "question", got "'.concat(t.icon,'"')),$(e)):(X(e),Se(e,t),xe(e,t),void K(e,t.showClass.icon)):$(e)},xe=(e,t)=>{for(const n in f)t.icon!==n&&Y(e,f[n]);K(e,f[t.icon]),Te(e,t),Ee(),R(e,t,"icon")},Ee=()=>{const e=w();var t=window.getComputedStyle(e).getPropertyValue("background-color");const n=e.querySelectorAll("[class^=swal2-success-circular-line], .swal2-success-fix");for(let e=0;e{var n;e.textContent="",t.iconHtml?U(e,Oe(t.iconHtml)):"success"===t.icon?U(e,'\n
    \n \n
    \n
    \n '):"error"===t.icon?U(e,'\n \n \n \n \n '):(n={question:"?",warning:"!",info:"i"},U(e,Oe(n[t.icon])))},Te=(e,t)=>{if(t.iconColor){e.style.color=t.iconColor,e.style.borderColor=t.iconColor;for(const n of[".swal2-success-line-tip",".swal2-success-line-long",".swal2-x-mark-line-left",".swal2-x-mark-line-right"])G(e,n,"backgroundColor",t.iconColor);G(e,".swal2-success-ring","borderColor",t.iconColor)}},Oe=e=>'
    ').concat(e,"
    "),Le=(e,t)=>{const n=P();if(!t.imageUrl)return $(n);X(n,""),n.setAttribute("src",t.imageUrl),n.setAttribute("alt",t.imageAlt),J(n,"width",t.imageWidth),J(n,"height",t.imageHeight),n.className=h.image,R(n,t,"image")},je=(e,o)=>{const i=B();if(!o.progressSteps||0===o.progressSteps.length)return $(i);X(i),i.textContent="",o.currentProgressStep>=o.progressSteps.length&&a("Invalid currentProgressStep parameter, it should be less than progressSteps.length (currentProgressStep like JS arrays starts from 0)"),o.progressSteps.forEach((e,t)=>{var n,e=(n=e,e=document.createElement("li"),K(e,h["progress-step"]),U(e,n),e);i.appendChild(e),t===o.currentProgressStep&&K(e,h["active-progress-step"]),t!==o.progressSteps.length-1&&(t=(e=>{const t=document.createElement("li");return K(t,h["progress-step-line"]),e.progressStepsDistance&&(t.style.width=e.progressStepsDistance),t})(o),i.appendChild(t))})},De=(e,t)=>{const n=k();Q(n,t.title||t.titleText,"block"),t.title&&ce(t.title,n),t.titleText&&(n.innerText=t.titleText),R(n,t,"title")},Me=(e,t)=>{var n=b();const o=w();t.toast?(J(n,"width",t.width),o.style.width="100%",o.insertBefore(T(),C())):J(o,"width",t.width),J(o,"padding",t.padding),t.color&&(o.style.color=t.color),t.background&&(o.style.background=t.background),$(x()),((e,t)=>{if(e.className="".concat(h.popup," ").concat(ee(e)?t.showClass.popup:""),t.toast){K([document.documentElement,document.body],h["toast-shown"]);K(e,h.toast)}else K(e,h.modal);if(R(e,t,"popup"),typeof t.customClass==="string")K(e,t.customClass);if(t.icon)K(e,h["icon-".concat(t.icon)])})(o,t)},Ie=(e,t)=>{Me(e,t),me(e,t),je(e,t),Be(e,t),Le(e,t),De(e,t),Pe(e,t),ke(e,t),de(e,t),Ae(e,t),"function"==typeof t.didRender&&t.didRender(w())};const He=()=>E()&&E().click();const qe=e=>{let t=w();t||on.fire(),t=w();var n=T();q()?$(C()):((e,t)=>{const n=L(),o=T();if(!t&&ee(E()))t=E();if(X(n),t){$(t);o.setAttribute("data-button-to-replace",t.className)}o.parentNode.insertBefore(o,t),K([e,n],h.loading)})(t,e),X(n),t.setAttribute("data-loading",!0),t.setAttribute("aria-busy",!0),t.focus()},Ve=100,Ne={},Ue=()=>{Ne.previousActiveElement&&Ne.previousActiveElement.focus?(Ne.previousActiveElement.focus(),Ne.previousActiveElement=null):document.body&&document.body.focus()},Fe=o=>new Promise(e=>{if(!o)return e();var t=window.scrollX,n=window.scrollY;Ne.restoreFocusTimeout=setTimeout(()=>{Ue(),e()},Ve),window.scrollTo(t,n)});const Re=()=>{if(Ne.timeout)return(()=>{const e=D();var t=parseInt(window.getComputedStyle(e).width);e.style.removeProperty("transition"),e.style.width="100%";var n=parseInt(window.getComputedStyle(e).width),n=parseInt(t/n*100);e.style.removeProperty("transition"),e.style.width="".concat(n,"%")})(),Ne.timeout.stop()},ze=()=>{if(Ne.timeout){var e=Ne.timeout.start();return V(e),e}};let We=!1;const _e={};const Ke=t=>{for(let e=t.target;e&&e!==document;e=e.parentNode)for(const o in _e){var n=e.getAttribute(o);if(n)return void _e[o].fire({template:n})}},Ye={title:"",titleText:"",text:"",html:"",footer:"",icon:void 0,iconColor:void 0,iconHtml:void 0,template:void 0,toast:!1,showClass:{popup:"swal2-show",backdrop:"swal2-backdrop-show",icon:"swal2-icon-show"},hideClass:{popup:"swal2-hide",backdrop:"swal2-backdrop-hide",icon:"swal2-icon-hide"},customClass:{},target:"body",color:void 0,backdrop:!0,heightAuto:!0,allowOutsideClick:!0,allowEscapeKey:!0,allowEnterKey:!0,stopKeydownPropagation:!0,keydownListenerCapture:!1,showConfirmButton:!0,showDenyButton:!1,showCancelButton:!1,preConfirm:void 0,preDeny:void 0,confirmButtonText:"OK",confirmButtonAriaLabel:"",confirmButtonColor:void 0,denyButtonText:"No",denyButtonAriaLabel:"",denyButtonColor:void 0,cancelButtonText:"Cancel",cancelButtonAriaLabel:"",cancelButtonColor:void 0,buttonsStyling:!0,reverseButtons:!1,focusConfirm:!0,focusDeny:!1,focusCancel:!1,returnFocus:!0,showCloseButton:!1,closeButtonHtml:"×",closeButtonAriaLabel:"Close this dialog",loaderHtml:"",showLoaderOnConfirm:!1,showLoaderOnDeny:!1,imageUrl:void 0,imageWidth:void 0,imageHeight:void 0,imageAlt:"",timer:void 0,timerProgressBar:!1,width:void 0,padding:void 0,background:void 0,input:void 0,inputPlaceholder:"",inputLabel:"",inputValue:"",inputOptions:{},inputAutoTrim:!0,inputAttributes:{},inputValidator:void 0,returnInputValueOnDeny:!1,validationMessage:void 0,grow:!1,position:"center",progressSteps:[],currentProgressStep:void 0,progressStepsDistance:void 0,willOpen:void 0,didOpen:void 0,didRender:void 0,willClose:void 0,didClose:void 0,didDestroy:void 0,scrollbarPadding:!0},Ze=["allowEscapeKey","allowOutsideClick","background","buttonsStyling","cancelButtonAriaLabel","cancelButtonColor","cancelButtonText","closeButtonAriaLabel","closeButtonHtml","color","confirmButtonAriaLabel","confirmButtonColor","confirmButtonText","currentProgressStep","customClass","denyButtonAriaLabel","denyButtonColor","denyButtonText","didClose","didDestroy","footer","hideClass","html","icon","iconColor","iconHtml","imageAlt","imageHeight","imageUrl","imageWidth","preConfirm","preDeny","progressSteps","returnFocus","reverseButtons","showCancelButton","showCloseButton","showConfirmButton","showDenyButton","text","title","titleText","willClose"],Je={},Xe=["allowOutsideClick","allowEnterKey","backdrop","focusConfirm","focusDeny","focusCancel","returnFocus","heightAuto","keydownListenerCapture"],$e=e=>Object.prototype.hasOwnProperty.call(Ye,e);const Ge=e=>Je[e],Qe=e=>{$e(e)||a('Unknown parameter "'.concat(e,'"'))},et=e=>{Xe.includes(e)&&a('The parameter "'.concat(e,'" is incompatible with toasts'))},tt=e=>{Ge(e)&&i(e,Ge(e))};var nt=Object.freeze({isValidParameter:$e,isUpdatableParameter:e=>-1!==Ze.indexOf(e),isDeprecatedParameter:Ge,argsToParams:n=>{const o={};return"object"!=typeof n[0]||g(n[0])?["title","html","icon"].forEach((e,t)=>{t=n[t];"string"==typeof t||g(t)?o[e]=t:void 0!==t&&r("Unexpected type of ".concat(e,'! Expected "string" or "Element", got ').concat(typeof t))}):Object.assign(o,n[0]),o},isVisible:()=>ee(w()),clickConfirm:He,clickDeny:()=>S()&&S().click(),clickCancel:()=>O()&&O().click(),getContainer:b,getPopup:w,getTitle:k,getHtmlContainer:A,getImage:P,getIcon:C,getInputLabel:()=>v(h["input-label"]),getCloseButton:M,getActions:L,getConfirmButton:E,getDenyButton:S,getCancelButton:O,getLoader:T,getFooter:j,getTimerProgressBar:D,getFocusableElements:I,getValidationMessage:x,isLoading:()=>w().hasAttribute("data-loading"),fire:function(){for(var e=arguments.length,t=new Array(e),n=0;nNe.timeout&&Ne.timeout.getTimerLeft(),stopTimer:Re,resumeTimer:ze,toggleTimer:()=>{var e=Ne.timeout;return e&&(e.running?Re:ze)()},increaseTimer:e=>{if(Ne.timeout){e=Ne.timeout.increase(e);return V(e,!0),e}},isTimerRunning:()=>Ne.timeout&&Ne.timeout.isRunning(),bindClickHandler:function(){var e=0{const t=e.popup.getElementsByClassName(e.loader.getAttribute("data-button-to-replace"));if(t.length)X(t[0],"inline-block");else if(te())$(e.actions)})(t),Y([t.popup,t.actions],h.loading),t.popup.removeAttribute("aria-busy"),t.popup.removeAttribute("data-loading"),t.confirmButton.disabled=!1,t.denyButton.disabled=!1,t.cancelButton.disabled=!1}}const it=()=>{null===N.previousBodyPadding&&document.body.scrollHeight>window.innerHeight&&(N.previousBodyPadding=parseInt(window.getComputedStyle(document.body).getPropertyValue("padding-right")),document.body.style.paddingRight="".concat(N.previousBodyPadding+(()=>{const e=document.createElement("div");e.className=h["scrollbar-measure"],document.body.appendChild(e);var t=e.getBoundingClientRect().width-e.clientWidth;return document.body.removeChild(e),t})(),"px"))},st=()=>{null!==N.previousBodyPadding&&(document.body.style.paddingRight="".concat(N.previousBodyPadding,"px"),N.previousBodyPadding=null)},at=()=>{var e;(/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream||"MacIntel"===navigator.platform&&1{const e=b();let t;e.ontouchstart=e=>{t=rt(e)},e.ontouchmove=e=>{if(t){e.preventDefault();e.stopPropagation()}}})(),(()=>{const e=!navigator.userAgent.match(/(CriOS|FxiOS|EdgiOS|YaBrowser|UCBrowser)/i);if(e){const t=44;if(w().scrollHeight>window.innerHeight-t)b().style.paddingBottom="".concat(t,"px")}})())},rt=e=>{var t,n=e.target,o=b();return!((t=e).touches&&t.touches.length&&"stylus"===t.touches[0].touchType||(e=e).touches&&1{var e;F(document.body,h.iosfix)&&(e=parseInt(document.body.style.top,10),Y(document.body,h.iosfix),document.body.style.top="",document.body.scrollTop=-1*e)},lt=()=>{const e=s(document.body.children);e.forEach(e=>{e.hasAttribute("data-previous-aria-hidden")?(e.setAttribute("aria-hidden",e.getAttribute("data-previous-aria-hidden")),e.removeAttribute("data-previous-aria-hidden")):e.removeAttribute("aria-hidden")})};var ut={swalPromiseResolve:new WeakMap,swalPromiseReject:new WeakMap};function dt(e,t,n,o){q()?ht(e,o):(Fe(n).then(()=>ht(e,o)),Ne.keydownTarget.removeEventListener("keydown",Ne.keydownHandler,{capture:Ne.keydownListenerCapture}),Ne.keydownHandlerAdded=!1),/^((?!chrome|android).)*safari/i.test(navigator.userAgent)?(t.setAttribute("style","display:none !important"),t.removeAttribute("class"),t.innerHTML=""):t.remove(),H()&&(st(),ct(),lt()),Y([document.documentElement,document.body],[h.shown,h["height-auto"],h["no-backdrop"],h["toast-shown"]])}function pt(e){e=void 0!==(n=e)?Object.assign({isConfirmed:!1,isDenied:!1,isDismissed:!1},n):{isConfirmed:!1,isDenied:!1,isDismissed:!0};const t=ut.swalPromiseResolve.get(this);var n=(e=>{const t=w();if(!t)return false;const n=ge.innerParams.get(e);if(!n||F(t,n.hideClass.popup))return false;Y(t,n.showClass.popup),K(t,n.hideClass.popup);const o=b();return Y(o,n.showClass.backdrop),K(o,n.hideClass.backdrop),gt(e,t,n),true})(this);this.isAwaitingPromise()?e.isDismissed||(mt(this),t(e)):n&&t(e)}const mt=e=>{e.isAwaitingPromise()&&(ge.awaitingPromise.delete(e),ge.innerParams.get(e)||e._destroy())},gt=(e,t,n)=>{var o,i,s,a=b(),r=ue&&oe(t);"function"==typeof n.willClose&&n.willClose(t),r?(o=e,i=t,s=a,r=n.returnFocus,t=n.didClose,Ne.swalCloseEventFinishedCallback=dt.bind(null,o,s,r,t),i.addEventListener(ue,function(e){e.target===i&&(Ne.swalCloseEventFinishedCallback(),delete Ne.swalCloseEventFinishedCallback)})):dt(e,a,n.returnFocus,n.didClose)},ht=(e,t)=>{setTimeout(()=>{"function"==typeof t&&t.bind(e.params)(),e._destroy()})};function ft(e,t,n){const o=ge.domCache.get(e);t.forEach(e=>{o[e].disabled=n})}function bt(e,t){if(!e)return!1;if("radio"===e.type){const n=e.parentNode.parentNode,o=n.querySelectorAll("input");for(let e=0;e/^[a-zA-Z0-9.+_-]+@[a-zA-Z0-9.-]+\.[a-zA-Z0-9-]{2,24}$/.test(e)?Promise.resolve():Promise.resolve(t||"Invalid email address"),url:(e,t)=>/^https?:\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-z]{2,63}\b([-a-zA-Z0-9@:%_+.~#?&/=]*)$/.test(e)?Promise.resolve():Promise.resolve(t||"Invalid URL")};function wt(e){var t,n;(t=e).inputValidator||Object.keys(vt).forEach(e=>{t.input===e&&(t.inputValidator=vt[e])}),e.showLoaderOnConfirm&&!e.preConfirm&&a("showLoaderOnConfirm is set to true, but preConfirm is not defined.\nshowLoaderOnConfirm should be used together with preConfirm, see usage example:\nhttps://sweetalert2.github.io/#ajax-request"),(n=e).target&&("string"!=typeof n.target||document.querySelector(n.target))&&("string"==typeof n.target||n.target.appendChild)||(a('Target parameter is not valid, defaulting to "body"'),n.target="body"),"string"==typeof e.title&&(e.title=e.title.split("\n").join("
    ")),re(e)}const Ct=["swal-title","swal-html","swal-footer"],kt=e=>{e="string"==typeof e.template?document.querySelector(e.template):e.template;if(!e)return{};e=e.content;return(e=>{const n=Ct.concat(["swal-param","swal-button","swal-image","swal-icon","swal-input","swal-input-option"]);s(e.children).forEach(e=>{const t=e.tagName.toLowerCase();if(n.indexOf(t)===-1)a("Unrecognized element <".concat(t,">"))})})(e),Object.assign((e=>{const o={};return s(e.querySelectorAll("swal-param")).forEach(e=>{At(e,["name","value"]);const t=e.getAttribute("name");let n=e.getAttribute("value");if(typeof Ye[t]==="boolean"&&n==="false")n=false;if(typeof Ye[t]==="object")n=JSON.parse(n);o[t]=n}),o})(e),(e=>{const n={};return s(e.querySelectorAll("swal-button")).forEach(e=>{At(e,["type","color","aria-label"]);const t=e.getAttribute("type");n["".concat(t,"ButtonText")]=e.innerHTML;n["show".concat(o(t),"Button")]=true;if(e.hasAttribute("color"))n["".concat(t,"ButtonColor")]=e.getAttribute("color");if(e.hasAttribute("aria-label"))n["".concat(t,"ButtonAriaLabel")]=e.getAttribute("aria-label")}),n})(e),(e=>{const t={},n=e.querySelector("swal-image");if(n){At(n,["src","width","height","alt"]);if(n.hasAttribute("src"))t.imageUrl=n.getAttribute("src");if(n.hasAttribute("width"))t.imageWidth=n.getAttribute("width");if(n.hasAttribute("height"))t.imageHeight=n.getAttribute("height");if(n.hasAttribute("alt"))t.imageAlt=n.getAttribute("alt")}return t})(e),(e=>{const t={},n=e.querySelector("swal-icon");if(n){At(n,["type","color"]);if(n.hasAttribute("type"))t.icon=n.getAttribute("type");if(n.hasAttribute("color"))t.iconColor=n.getAttribute("color");t.iconHtml=n.innerHTML}return t})(e),(e=>{const o={},t=e.querySelector("swal-input");if(t){At(t,["type","label","placeholder","value"]);o.input=t.getAttribute("type")||"text";if(t.hasAttribute("label"))o.inputLabel=t.getAttribute("label");if(t.hasAttribute("placeholder"))o.inputPlaceholder=t.getAttribute("placeholder");if(t.hasAttribute("value"))o.inputValue=t.getAttribute("value")}const n=e.querySelectorAll("swal-input-option");if(n.length){o.inputOptions={};s(n).forEach(e=>{At(e,["value"]);const t=e.getAttribute("value");const n=e.innerHTML;o.inputOptions[t]=n})}return o})(e),((e,t)=>{const n={};for(const o in t){const i=t[o];const s=e.querySelector(i);if(s){At(s,[]);n[i.replace(/^swal-/,"")]=s.innerHTML.trim()}}return n})(e,Ct))},At=(t,n)=>{s(t.attributes).forEach(e=>{-1===n.indexOf(e.name)&&a(['Unrecognized attribute "'.concat(e.name,'" on <').concat(t.tagName.toLowerCase(),">."),"".concat(n.length?"Allowed attributes are: ".concat(n.join(", ")):"To set the value, use HTML within the element.")])})},Pt=10,Bt=e=>{const t=b(),n=w();"function"==typeof e.willOpen&&e.willOpen(n);var o=window.getComputedStyle(document.body).overflowY;((e,t,n)=>{if(K(e,n.showClass.backdrop),t.style.setProperty("opacity","0","important"),X(t,"grid"),setTimeout(()=>{K(t,n.showClass.popup);t.style.removeProperty("opacity")},Pt),K([document.documentElement,document.body],h.shown),n.heightAuto&&n.backdrop&&!n.toast)K([document.documentElement,document.body],h["height-auto"])})(t,n,e),setTimeout(()=>{((e,t)=>{if(ue&&oe(t)){e.style.overflowY="hidden";t.addEventListener(ue,xt)}else e.style.overflowY="auto"})(t,n)},Pt),H()&&(((e,t,n)=>{if(at(),t&&n!=="hidden")it();setTimeout(()=>{e.scrollTop=0})})(t,e.scrollbarPadding,o),(()=>{const e=s(document.body.children);e.forEach(e=>{e===b()||e.contains(b())||(e.hasAttribute("aria-hidden")&&e.setAttribute("data-previous-aria-hidden",e.getAttribute("aria-hidden")),e.setAttribute("aria-hidden","true"))})})()),q()||Ne.previousActiveElement||(Ne.previousActiveElement=document.activeElement),"function"==typeof e.didOpen&&setTimeout(()=>e.didOpen(n)),Y(t,h["no-transition"])},xt=e=>{const t=w();if(e.target===t){const n=b();t.removeEventListener(ue,xt),n.style.overflowY="auto"}},Et=(e,t)=>{"select"===t.input||"radio"===t.input?((t,n)=>{const o=w(),i=e=>Tt[n.input](o,Ot(e),n);if(c(n.inputOptions)||p(n.inputOptions)){qe(E());l(n.inputOptions).then(e=>{t.hideLoading();i(e)})}else if(typeof n.inputOptions==="object")i(n.inputOptions);else r("Unexpected type of inputOptions! Expected object, Map or Promise, got ".concat(typeof n.inputOptions))})(e,t):["text","email","number","tel","textarea"].includes(t.input)&&(c(t.inputValue)||p(t.inputValue))&&(qe(E()),((t,n)=>{const o=t.getInput();$(o),l(n.inputValue).then(e=>{o.value=n.input==="number"?parseFloat(e)||0:"".concat(e);X(o);o.focus();t.hideLoading()}).catch(e=>{r("Error in inputValue promise: ".concat(e));o.value="";X(o);o.focus();t.hideLoading()})})(e,t))},St=(e,t)=>{const n=e.getInput();if(!n)return null;switch(t.input){case"checkbox":return n.checked?1:0;case"radio":return(o=n).checked?o.value:null;case"file":return(o=n).files.length?null!==o.getAttribute("multiple")?o.files:o.files[0]:null;default:return t.inputAutoTrim?n.value.trim():n.value}var o},Tt={select:(e,t,i)=>{const s=Z(e,h.select),a=(e,t,n)=>{const o=document.createElement("option");o.value=n,U(o,t),o.selected=Lt(n,i.inputValue),e.appendChild(o)};t.forEach(e=>{var t=e[0];const n=e[1];if(Array.isArray(n)){const o=document.createElement("optgroup");o.label=t,o.disabled=!1,s.appendChild(o),n.forEach(e=>a(o,e[1],e[0]))}else a(s,n,t)}),s.focus()},radio:(e,t,s)=>{const a=Z(e,h.radio);t.forEach(e=>{var t=e[0],e=e[1];const n=document.createElement("input"),o=document.createElement("label");n.type="radio",n.name=h.radio,n.value=t,Lt(t,s.inputValue)&&(n.checked=!0);const i=document.createElement("span");U(i,e),i.className=h.label,o.appendChild(n),o.appendChild(i),a.appendChild(o)});const n=a.querySelectorAll("input");n.length&&n[0].focus()}},Ot=n=>{const o=[];return"undefined"!=typeof Map&&n instanceof Map?n.forEach((e,t)=>{let n=e;"object"==typeof n&&(n=Ot(n)),o.push([t,n])}):Object.keys(n).forEach(e=>{let t=n[e];"object"==typeof t&&(t=Ot(t)),o.push([e,t])}),o},Lt=(e,t)=>t&&t.toString()===e.toString(),jt=e=>{var t=ge.innerParams.get(e);e.disableButtons(),t.input?It(e,"confirm"):Ut(e,!0)},Dt=e=>{var t=ge.innerParams.get(e);e.disableButtons(),t.returnInputValueOnDeny?It(e,"deny"):qt(e,!1)},Mt=(e,t)=>{e.disableButtons(),t(u.cancel)},It=(e,t)=>{var n=ge.innerParams.get(e),o=St(e,n);n.inputValidator?Ht(e,o,t):e.getInput().checkValidity()?("deny"===t?qt:Ut)(e,o):(e.enableButtons(),e.showValidationMessage(n.validationMessage))},Ht=(t,n,o)=>{const e=ge.innerParams.get(t);t.disableInput();const i=Promise.resolve().then(()=>l(e.inputValidator(n,e.validationMessage)));i.then(e=>{t.enableButtons(),t.enableInput(),e?t.showValidationMessage(e):("deny"===o?qt:Ut)(t,n)})},qt=(t,n)=>{const e=ge.innerParams.get(t||void 0);if(e.showLoaderOnDeny&&qe(S()),e.preDeny){ge.awaitingPromise.set(t||void 0,!0);const o=Promise.resolve().then(()=>l(e.preDeny(n,e.validationMessage)));o.then(e=>{!1===e?t.hideLoading():t.closePopup({isDenied:!0,value:void 0===e?n:e})}).catch(e=>Nt(t||void 0,e))}else t.closePopup({isDenied:!0,value:n})},Vt=(e,t)=>{e.closePopup({isConfirmed:!0,value:t})},Nt=(e,t)=>{e.rejectPromise(t)},Ut=(t,n)=>{const e=ge.innerParams.get(t||void 0);if(e.showLoaderOnConfirm&&qe(),e.preConfirm){t.resetValidationMessage(),ge.awaitingPromise.set(t||void 0,!0);const o=Promise.resolve().then(()=>l(e.preConfirm(n,e.validationMessage)));o.then(e=>{ee(x())||!1===e?t.hideLoading():Vt(t,void 0===e?n:e)}).catch(e=>Nt(t||void 0,e))}else Vt(t,n)},Ft=(t,e,n,o)=>{e.keydownTarget&&e.keydownHandlerAdded&&(e.keydownTarget.removeEventListener("keydown",e.keydownHandler,{capture:e.keydownListenerCapture}),e.keydownHandlerAdded=!1),n.toast||(e.keydownHandler=e=>((e,t,n)=>{const o=ge.innerParams.get(e);o&&(o.stopKeydownPropagation&&t.stopPropagation(),"Enter"===t.key?_t(e,t,o):"Tab"===t.key?Kt(t,o):[...zt,...Wt].includes(t.key)?Yt(t.key):"Escape"===t.key&&Zt(t,o,n))})(t,e,o),e.keydownTarget=n.keydownListenerCapture?window:w(),e.keydownListenerCapture=n.keydownListenerCapture,e.keydownTarget.addEventListener("keydown",e.keydownHandler,{capture:e.keydownListenerCapture}),e.keydownHandlerAdded=!0)},Rt=(e,t,n)=>{const o=I();if(o.length)return(t+=n)===o.length?t=0:-1===t&&(t=o.length-1),o[t].focus();w().focus()},zt=["ArrowRight","ArrowDown"],Wt=["ArrowLeft","ArrowUp"],_t=(e,t,n)=>{t.isComposing||t.target&&e.getInput()&&t.target.outerHTML===e.getInput().outerHTML&&(["textarea","file"].includes(n.input)||(He(),t.preventDefault()))},Kt=(e,t)=>{var n=e.target,o=I();let i=-1;for(let e=0;e{const t=E(),n=S(),o=O();if([t,n,o].includes(document.activeElement)){e=zt.includes(e)?"nextElementSibling":"previousElementSibling";const i=document.activeElement[e];i&&i.focus()}},Zt=(e,t,n)=>{d(t.allowEscapeKey)&&(e.preventDefault(),n(u.esc))},Jt=(e,t,n)=>{var o,i,s,a,r,c,l;ge.innerParams.get(e).toast?(c=e,l=n,t.popup.onclick=()=>{var e=ge.innerParams.get(c);e.showConfirmButton||e.showDenyButton||e.showCancelButton||e.showCloseButton||e.timer||e.input||l(u.close)}):((r=t).popup.onmousedown=()=>{r.container.onmouseup=function(e){r.container.onmouseup=void 0,e.target===r.container&&(Xt=!0)}},(a=t).container.onmousedown=()=>{a.popup.onmouseup=function(e){a.popup.onmouseup=void 0,e.target!==a.popup&&!a.popup.contains(e.target)||(Xt=!0)}},o=e,s=n,(i=t).container.onclick=e=>{var t=ge.innerParams.get(o);Xt?Xt=!1:e.target===i.container&&d(t.allowOutsideClick)&&s(u.backdrop)})};let Xt=!1;const $t=(e,t,n)=>{var o=D();$(o),t.timer&&(e.timeout=new yt(()=>{n("timer"),delete e.timeout},t.timer),t.timerProgressBar&&(X(o),setTimeout(()=>{e.timeout&&e.timeout.running&&V(t.timer)})))},Gt=(e,t)=>{if(!t.toast)return d(t.allowEnterKey)?void(((e,t)=>{if(t.focusDeny&&ee(e.denyButton)){e.denyButton.focus();return true}if(t.focusCancel&&ee(e.cancelButton)){e.cancelButton.focus();return true}if(t.focusConfirm&&ee(e.confirmButton)){e.confirmButton.focus();return true}return false})(e,t)||Rt(0,-1,1)):(()=>{if(document.activeElement&&typeof document.activeElement.blur==="function")document.activeElement.blur()})()};const Qt=e=>{e.isAwaitingPromise()?(en(ge,e),ge.awaitingPromise.set(e,!0)):(en(ut,e),en(ge,e))},en=(e,t)=>{for(const n in e)e[n].delete(t)};e=Object.freeze({hideLoading:ot,disableLoading:ot,getInput:function(e){var t=ge.innerParams.get(e||this);return(e=ge.domCache.get(e||this))?z(e.popup,t.input):null},close:pt,isAwaitingPromise:function(){return!!ge.awaitingPromise.get(this)},rejectPromise:function(e){const t=ut.swalPromiseReject.get(this);mt(this),t&&t(e)},closePopup:pt,closeModal:pt,closeToast:pt,enableButtons:function(){ft(this,["confirmButton","denyButton","cancelButton"],!1)},disableButtons:function(){ft(this,["confirmButton","denyButton","cancelButton"],!0)},enableInput:function(){return bt(this.getInput(),!1)},disableInput:function(){return bt(this.getInput(),!0)},showValidationMessage:function(e){const t=ge.domCache.get(this);var n=ge.innerParams.get(this);U(t.validationMessage,e),t.validationMessage.className=h["validation-message"],n.customClass&&n.customClass.validationMessage&&K(t.validationMessage,n.customClass.validationMessage),X(t.validationMessage);const o=this.getInput();o&&(o.setAttribute("aria-invalid",!0),o.setAttribute("aria-describedby",h["validation-message"]),W(o),K(o,h.inputerror))},resetValidationMessage:function(){var e=ge.domCache.get(this);e.validationMessage&&$(e.validationMessage);const t=this.getInput();t&&(t.removeAttribute("aria-invalid"),t.removeAttribute("aria-describedby"),Y(t,h.inputerror))},getProgressSteps:function(){return ge.domCache.get(this).progressSteps},_main:function(e){var t=1{!e.backdrop&&e.allowOutsideClick&&a('"allowOutsideClick" parameter requires `backdrop` parameter to be set to `true`');for(const t in e)Qe(t),e.toast&&et(t),tt(t)})(Object.assign({},t,e)),Ne.currentInstance&&(Ne.currentInstance._destroy(),H()&<()),Ne.currentInstance=this,wt(e=((e,t)=>{const n=kt(e),o=Object.assign({},Ye,t,n,e);return o.showClass=Object.assign({},Ye.showClass,o.showClass),o.hideClass=Object.assign({},Ye.hideClass,o.hideClass),o})(e,t)),Object.freeze(e),Ne.timeout&&(Ne.timeout.stop(),delete Ne.timeout),clearTimeout(Ne.restoreFocusTimeout);var o,i,s,t=(e=>{const t={popup:w(),container:b(),actions:L(),confirmButton:E(),denyButton:S(),cancelButton:O(),loader:T(),closeButton:M(),validationMessage:x(),progressSteps:B()};return ge.domCache.set(e,t),t})(this);return Ie(this,e),ge.innerParams.set(this,e),o=this,i=t,s=e,new Promise((e,t)=>{const n=e=>{o.closePopup({isDismissed:!0,dismiss:e})};ut.swalPromiseResolve.set(o,e),ut.swalPromiseReject.set(o,t),i.confirmButton.onclick=()=>jt(o),i.denyButton.onclick=()=>Dt(o),i.cancelButton.onclick=()=>Mt(o,n),i.closeButton.onclick=()=>n(u.close),Jt(o,i,n),Ft(o,Ne,s,n),Et(o,s),Bt(s),$t(Ne,s,n),Gt(i,s),setTimeout(()=>{i.container.scrollTop=0})})},update:function(t){var e=w(),n=ge.innerParams.get(this);if(!e||F(e,n.hideClass.popup))return a("You're trying to update the closed or closing popup, that won't work. Use the update() method in preConfirm parameter or show a new popup.");const o={};Object.keys(t).forEach(e=>{on.isUpdatableParameter(e)?o[e]=t[e]:a('Invalid parameter to update: "'.concat(e,'". Updatable params are listed here: https://github.com/sweetalert2/sweetalert2/blob/master/src/utils/params.js\n\nIf you think this parameter should be updatable, request it here: https://github.com/sweetalert2/sweetalert2/issues/new?template=02_feature_request.md'))}),n=Object.assign({},n,o),Ie(this,n),ge.innerParams.set(this,n),Object.defineProperties(this,{params:{value:Object.assign({},this.params,t),writable:!1,enumerable:!0}})},_destroy:function(){var e=ge.domCache.get(this);const t=ge.innerParams.get(this);t?(e.popup&&Ne.swalCloseEventFinishedCallback&&(Ne.swalCloseEventFinishedCallback(),delete Ne.swalCloseEventFinishedCallback),Ne.deferDisposalTimer&&(clearTimeout(Ne.deferDisposalTimer),delete Ne.deferDisposalTimer),"function"==typeof t.didDestroy&&t.didDestroy(),e=this,Qt(e),delete e.params,delete Ne.keydownHandler,delete Ne.keydownTarget,delete Ne.currentInstance):Qt(this)}});let tn;class nn{constructor(){if("undefined"!=typeof window){tn=this;for(var e=arguments.length,t=new Array(e),n=0;n{nn[e]=function(){if(tn)return tn[e](...arguments)}}),nn.DismissReason=u,nn.version="11.3.0";const on=nn;return on.default=on,on}),void 0!==this&&this.Sweetalert2&&(this.swal=this.sweetAlert=this.Swal=this.SweetAlert=this.Sweetalert2); 2 | "undefined"!=typeof document&&function(e,t){var n=e.createElement("style");if(e.getElementsByTagName("head")[0].appendChild(n),n.styleSheet)n.styleSheet.disabled||(n.styleSheet.cssText=t);else try{n.innerHTML=t}catch(e){n.innerText=t}}(document,".swal2-popup.swal2-toast{box-sizing:border-box;grid-column:1/4!important;grid-row:1/4!important;grid-template-columns:1fr 99fr 1fr;padding:1em;overflow-y:hidden;background:#fff;box-shadow:0 0 1px rgba(0,0,0,.075),0 1px 2px rgba(0,0,0,.075),1px 2px 4px rgba(0,0,0,.075),1px 3px 8px rgba(0,0,0,.075),2px 4px 16px rgba(0,0,0,.075);pointer-events:all}.swal2-popup.swal2-toast>*{grid-column:2}.swal2-popup.swal2-toast .swal2-title{margin:.5em 1em;padding:0;font-size:1em;text-align:initial}.swal2-popup.swal2-toast .swal2-loading{justify-content:center}.swal2-popup.swal2-toast .swal2-input{height:2em;margin:.5em;font-size:1em}.swal2-popup.swal2-toast .swal2-validation-message{font-size:1em}.swal2-popup.swal2-toast .swal2-footer{margin:.5em 0 0;padding:.5em 0 0;font-size:.8em}.swal2-popup.swal2-toast .swal2-close{grid-column:3/3;grid-row:1/99;align-self:center;width:.8em;height:.8em;margin:0;font-size:2em}.swal2-popup.swal2-toast .swal2-html-container{margin:.5em 1em;padding:0;font-size:1em;text-align:initial}.swal2-popup.swal2-toast .swal2-html-container:empty{padding:0}.swal2-popup.swal2-toast .swal2-loader{grid-column:1;grid-row:1/99;align-self:center;width:2em;height:2em;margin:.25em}.swal2-popup.swal2-toast .swal2-icon{grid-column:1;grid-row:1/99;align-self:center;width:2em;min-width:2em;height:2em;margin:0 .5em 0 0}.swal2-popup.swal2-toast .swal2-icon .swal2-icon-content{display:flex;align-items:center;font-size:1.8em;font-weight:700}.swal2-popup.swal2-toast .swal2-icon.swal2-success .swal2-success-ring{width:2em;height:2em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line]{top:.875em;width:1.375em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=left]{left:.3125em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=right]{right:.3125em}.swal2-popup.swal2-toast .swal2-actions{justify-content:flex-start;height:auto;margin:0;margin-top:.5em;padding:0 .5em}.swal2-popup.swal2-toast .swal2-styled{margin:.25em .5em;padding:.4em .6em;font-size:1em}.swal2-popup.swal2-toast .swal2-success{border-color:#a5dc86}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line]{position:absolute;width:1.6em;height:3em;transform:rotate(45deg);border-radius:50%}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=left]{top:-.8em;left:-.5em;transform:rotate(-45deg);transform-origin:2em 2em;border-radius:4em 0 0 4em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=right]{top:-.25em;left:.9375em;transform-origin:0 1.5em;border-radius:0 4em 4em 0}.swal2-popup.swal2-toast .swal2-success .swal2-success-ring{width:2em;height:2em}.swal2-popup.swal2-toast .swal2-success .swal2-success-fix{top:0;left:.4375em;width:.4375em;height:2.6875em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line]{height:.3125em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line][class$=tip]{top:1.125em;left:.1875em;width:.75em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line][class$=long]{top:.9375em;right:.1875em;width:1.375em}.swal2-popup.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-tip{-webkit-animation:swal2-toast-animate-success-line-tip .75s;animation:swal2-toast-animate-success-line-tip .75s}.swal2-popup.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-long{-webkit-animation:swal2-toast-animate-success-line-long .75s;animation:swal2-toast-animate-success-line-long .75s}.swal2-popup.swal2-toast.swal2-show{-webkit-animation:swal2-toast-show .5s;animation:swal2-toast-show .5s}.swal2-popup.swal2-toast.swal2-hide{-webkit-animation:swal2-toast-hide .1s forwards;animation:swal2-toast-hide .1s forwards}.swal2-container{display:grid;position:fixed;z-index:1060;top:0;right:0;bottom:0;left:0;box-sizing:border-box;grid-template-areas:\"top-start top top-end\" \"center-start center center-end\" \"bottom-start bottom-center bottom-end\";grid-template-rows:minmax(-webkit-min-content,auto) minmax(-webkit-min-content,auto) minmax(-webkit-min-content,auto);grid-template-rows:minmax(min-content,auto) minmax(min-content,auto) minmax(min-content,auto);height:100%;padding:.625em;overflow-x:hidden;transition:background-color .1s;-webkit-overflow-scrolling:touch}.swal2-container.swal2-backdrop-show,.swal2-container.swal2-noanimation{background:rgba(0,0,0,.4)}.swal2-container.swal2-backdrop-hide{background:0 0!important}.swal2-container.swal2-bottom-start,.swal2-container.swal2-center-start,.swal2-container.swal2-top-start{grid-template-columns:minmax(0,1fr) auto auto}.swal2-container.swal2-bottom,.swal2-container.swal2-center,.swal2-container.swal2-top{grid-template-columns:auto minmax(0,1fr) auto}.swal2-container.swal2-bottom-end,.swal2-container.swal2-center-end,.swal2-container.swal2-top-end{grid-template-columns:auto auto minmax(0,1fr)}.swal2-container.swal2-top-start>.swal2-popup{align-self:start}.swal2-container.swal2-top>.swal2-popup{grid-column:2;align-self:start;justify-self:center}.swal2-container.swal2-top-end>.swal2-popup,.swal2-container.swal2-top-right>.swal2-popup{grid-column:3;align-self:start;justify-self:end}.swal2-container.swal2-center-left>.swal2-popup,.swal2-container.swal2-center-start>.swal2-popup{grid-row:2;align-self:center}.swal2-container.swal2-center>.swal2-popup{grid-column:2;grid-row:2;align-self:center;justify-self:center}.swal2-container.swal2-center-end>.swal2-popup,.swal2-container.swal2-center-right>.swal2-popup{grid-column:3;grid-row:2;align-self:center;justify-self:end}.swal2-container.swal2-bottom-left>.swal2-popup,.swal2-container.swal2-bottom-start>.swal2-popup{grid-column:1;grid-row:3;align-self:end}.swal2-container.swal2-bottom>.swal2-popup{grid-column:2;grid-row:3;justify-self:center;align-self:end}.swal2-container.swal2-bottom-end>.swal2-popup,.swal2-container.swal2-bottom-right>.swal2-popup{grid-column:3;grid-row:3;align-self:end;justify-self:end}.swal2-container.swal2-grow-fullscreen>.swal2-popup,.swal2-container.swal2-grow-row>.swal2-popup{grid-column:1/4;width:100%}.swal2-container.swal2-grow-column>.swal2-popup,.swal2-container.swal2-grow-fullscreen>.swal2-popup{grid-row:1/4;align-self:stretch}.swal2-container.swal2-no-transition{transition:none!important}.swal2-popup{display:none;position:relative;box-sizing:border-box;grid-template-columns:minmax(0,100%);width:32em;max-width:100%;padding:0 0 1.25em;border:none;border-radius:5px;background:#fff;color:#545454;font-family:inherit;font-size:1rem}.swal2-popup:focus{outline:0}.swal2-popup.swal2-loading{overflow-y:hidden}.swal2-title{position:relative;max-width:100%;margin:0;padding:.8em 1em 0;color:inherit;font-size:1.875em;font-weight:600;text-align:center;text-transform:none;word-wrap:break-word}.swal2-actions{display:flex;z-index:1;box-sizing:border-box;flex-wrap:wrap;align-items:center;justify-content:center;width:auto;margin:1.25em auto 0;padding:0}.swal2-actions:not(.swal2-loading) .swal2-styled[disabled]{opacity:.4}.swal2-actions:not(.swal2-loading) .swal2-styled:hover{background-image:linear-gradient(rgba(0,0,0,.1),rgba(0,0,0,.1))}.swal2-actions:not(.swal2-loading) .swal2-styled:active{background-image:linear-gradient(rgba(0,0,0,.2),rgba(0,0,0,.2))}.swal2-loader{display:none;align-items:center;justify-content:center;width:2.2em;height:2.2em;margin:0 1.875em;-webkit-animation:swal2-rotate-loading 1.5s linear 0s infinite normal;animation:swal2-rotate-loading 1.5s linear 0s infinite normal;border-width:.25em;border-style:solid;border-radius:100%;border-color:#2778c4 transparent #2778c4 transparent}.swal2-styled{margin:.3125em;padding:.625em 1.1em;transition:box-shadow .1s;box-shadow:0 0 0 3px transparent;font-weight:500}.swal2-styled:not([disabled]){cursor:pointer}.swal2-styled.swal2-confirm{border:0;border-radius:.25em;background:initial;background-color:#7066e0;color:#fff;font-size:1em}.swal2-styled.swal2-confirm:focus{box-shadow:0 0 0 3px rgba(112,102,224,.5)}.swal2-styled.swal2-deny{border:0;border-radius:.25em;background:initial;background-color:#dc3741;color:#fff;font-size:1em}.swal2-styled.swal2-deny:focus{box-shadow:0 0 0 3px rgba(220,55,65,.5)}.swal2-styled.swal2-cancel{border:0;border-radius:.25em;background:initial;background-color:#6e7881;color:#fff;font-size:1em}.swal2-styled.swal2-cancel:focus{box-shadow:0 0 0 3px rgba(110,120,129,.5)}.swal2-styled.swal2-default-outline:focus{box-shadow:0 0 0 3px rgba(100,150,200,.5)}.swal2-styled:focus{outline:0}.swal2-styled::-moz-focus-inner{border:0}.swal2-footer{justify-content:center;margin:1em 0 0;padding:1em 1em 0;border-top:1px solid #eee;color:inherit;font-size:1em}.swal2-timer-progress-bar-container{position:absolute;right:0;bottom:0;left:0;grid-column:auto!important;height:.25em;overflow:hidden;border-bottom-right-radius:5px;border-bottom-left-radius:5px}.swal2-timer-progress-bar{width:100%;height:.25em;background:rgba(0,0,0,.2)}.swal2-image{max-width:100%;margin:2em auto 1em}.swal2-close{z-index:2;align-items:center;justify-content:center;width:1.2em;height:1.2em;margin-top:0;margin-right:0;margin-bottom:-1.2em;padding:0;overflow:hidden;transition:color .1s,box-shadow .1s;border:none;border-radius:5px;background:0 0;color:#ccc;font-family:serif;font-family:monospace;font-size:2.5em;cursor:pointer;justify-self:end}.swal2-close:hover{transform:none;background:0 0;color:#f27474}.swal2-close:focus{outline:0;box-shadow:inset 0 0 0 3px rgba(100,150,200,.5)}.swal2-close::-moz-focus-inner{border:0}.swal2-html-container{z-index:1;justify-content:center;margin:1em 1.6em .3em;padding:0;overflow:auto;color:inherit;font-size:1.125em;font-weight:400;line-height:normal;text-align:center;word-wrap:break-word;word-break:break-word}.swal2-checkbox,.swal2-file,.swal2-input,.swal2-radio,.swal2-select,.swal2-textarea{margin:1em 2em 0}.swal2-file,.swal2-input,.swal2-textarea{box-sizing:border-box;width:auto;transition:border-color .1s,box-shadow .1s;border:1px solid #d9d9d9;border-radius:.1875em;background:inherit;box-shadow:inset 0 1px 1px rgba(0,0,0,.06),0 0 0 3px transparent;color:inherit;font-size:1.125em}.swal2-file.swal2-inputerror,.swal2-input.swal2-inputerror,.swal2-textarea.swal2-inputerror{border-color:#f27474!important;box-shadow:0 0 2px #f27474!important}.swal2-file:focus,.swal2-input:focus,.swal2-textarea:focus{border:1px solid #b4dbed;outline:0;box-shadow:inset 0 1px 1px rgba(0,0,0,.06),0 0 0 3px rgba(100,150,200,.5)}.swal2-file::-moz-placeholder,.swal2-input::-moz-placeholder,.swal2-textarea::-moz-placeholder{color:#ccc}.swal2-file:-ms-input-placeholder,.swal2-input:-ms-input-placeholder,.swal2-textarea:-ms-input-placeholder{color:#ccc}.swal2-file::placeholder,.swal2-input::placeholder,.swal2-textarea::placeholder{color:#ccc}.swal2-range{margin:1em 2em 0;background:#fff}.swal2-range input{width:80%}.swal2-range output{width:20%;color:inherit;font-weight:600;text-align:center}.swal2-range input,.swal2-range output{height:2.625em;padding:0;font-size:1.125em;line-height:2.625em}.swal2-input{height:2.625em;padding:0 .75em}.swal2-file{width:75%;margin-right:auto;margin-left:auto;background:inherit;font-size:1.125em}.swal2-textarea{height:6.75em;padding:.75em}.swal2-select{min-width:50%;max-width:100%;padding:.375em .625em;background:inherit;color:inherit;font-size:1.125em}.swal2-checkbox,.swal2-radio{align-items:center;justify-content:center;background:#fff;color:inherit}.swal2-checkbox label,.swal2-radio label{margin:0 .6em;font-size:1.125em}.swal2-checkbox input,.swal2-radio input{flex-shrink:0;margin:0 .4em}.swal2-input-label{display:flex;justify-content:center;margin:1em auto 0}.swal2-validation-message{align-items:center;justify-content:center;margin:1em 0 0;padding:.625em;overflow:hidden;background:#f0f0f0;color:#666;font-size:1em;font-weight:300}.swal2-validation-message::before{content:\"!\";display:inline-block;width:1.5em;min-width:1.5em;height:1.5em;margin:0 .625em;border-radius:50%;background-color:#f27474;color:#fff;font-weight:600;line-height:1.5em;text-align:center}.swal2-icon{position:relative;box-sizing:content-box;justify-content:center;width:5em;height:5em;margin:2.5em auto .6em;border:.25em solid transparent;border-radius:50%;border-color:#000;font-family:inherit;line-height:5em;cursor:default;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.swal2-icon .swal2-icon-content{display:flex;align-items:center;font-size:3.75em}.swal2-icon.swal2-error{border-color:#f27474;color:#f27474}.swal2-icon.swal2-error .swal2-x-mark{position:relative;flex-grow:1}.swal2-icon.swal2-error [class^=swal2-x-mark-line]{display:block;position:absolute;top:2.3125em;width:2.9375em;height:.3125em;border-radius:.125em;background-color:#f27474}.swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=left]{left:1.0625em;transform:rotate(45deg)}.swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=right]{right:1em;transform:rotate(-45deg)}.swal2-icon.swal2-error.swal2-icon-show{-webkit-animation:swal2-animate-error-icon .5s;animation:swal2-animate-error-icon .5s}.swal2-icon.swal2-error.swal2-icon-show .swal2-x-mark{-webkit-animation:swal2-animate-error-x-mark .5s;animation:swal2-animate-error-x-mark .5s}.swal2-icon.swal2-warning{border-color:#facea8;color:#f8bb86}.swal2-icon.swal2-warning.swal2-icon-show{-webkit-animation:swal2-animate-error-icon .5s;animation:swal2-animate-error-icon .5s}.swal2-icon.swal2-warning.swal2-icon-show .swal2-icon-content{-webkit-animation:swal2-animate-i-mark .5s;animation:swal2-animate-i-mark .5s}.swal2-icon.swal2-info{border-color:#9de0f6;color:#3fc3ee}.swal2-icon.swal2-info.swal2-icon-show{-webkit-animation:swal2-animate-error-icon .5s;animation:swal2-animate-error-icon .5s}.swal2-icon.swal2-info.swal2-icon-show .swal2-icon-content{-webkit-animation:swal2-animate-i-mark .8s;animation:swal2-animate-i-mark .8s}.swal2-icon.swal2-question{border-color:#c9dae1;color:#87adbd}.swal2-icon.swal2-question.swal2-icon-show{-webkit-animation:swal2-animate-error-icon .5s;animation:swal2-animate-error-icon .5s}.swal2-icon.swal2-question.swal2-icon-show .swal2-icon-content{-webkit-animation:swal2-animate-question-mark .8s;animation:swal2-animate-question-mark .8s}.swal2-icon.swal2-success{border-color:#a5dc86;color:#a5dc86}.swal2-icon.swal2-success [class^=swal2-success-circular-line]{position:absolute;width:3.75em;height:7.5em;transform:rotate(45deg);border-radius:50%}.swal2-icon.swal2-success [class^=swal2-success-circular-line][class$=left]{top:-.4375em;left:-2.0635em;transform:rotate(-45deg);transform-origin:3.75em 3.75em;border-radius:7.5em 0 0 7.5em}.swal2-icon.swal2-success [class^=swal2-success-circular-line][class$=right]{top:-.6875em;left:1.875em;transform:rotate(-45deg);transform-origin:0 3.75em;border-radius:0 7.5em 7.5em 0}.swal2-icon.swal2-success .swal2-success-ring{position:absolute;z-index:2;top:-.25em;left:-.25em;box-sizing:content-box;width:100%;height:100%;border:.25em solid rgba(165,220,134,.3);border-radius:50%}.swal2-icon.swal2-success .swal2-success-fix{position:absolute;z-index:1;top:.5em;left:1.625em;width:.4375em;height:5.625em;transform:rotate(-45deg)}.swal2-icon.swal2-success [class^=swal2-success-line]{display:block;position:absolute;z-index:2;height:.3125em;border-radius:.125em;background-color:#a5dc86}.swal2-icon.swal2-success [class^=swal2-success-line][class$=tip]{top:2.875em;left:.8125em;width:1.5625em;transform:rotate(45deg)}.swal2-icon.swal2-success [class^=swal2-success-line][class$=long]{top:2.375em;right:.5em;width:2.9375em;transform:rotate(-45deg)}.swal2-icon.swal2-success.swal2-icon-show .swal2-success-line-tip{-webkit-animation:swal2-animate-success-line-tip .75s;animation:swal2-animate-success-line-tip .75s}.swal2-icon.swal2-success.swal2-icon-show .swal2-success-line-long{-webkit-animation:swal2-animate-success-line-long .75s;animation:swal2-animate-success-line-long .75s}.swal2-icon.swal2-success.swal2-icon-show .swal2-success-circular-line-right{-webkit-animation:swal2-rotate-success-circular-line 4.25s ease-in;animation:swal2-rotate-success-circular-line 4.25s ease-in}.swal2-progress-steps{flex-wrap:wrap;align-items:center;max-width:100%;margin:1.25em auto;padding:0;background:inherit;font-weight:600}.swal2-progress-steps li{display:inline-block;position:relative}.swal2-progress-steps .swal2-progress-step{z-index:20;flex-shrink:0;width:2em;height:2em;border-radius:2em;background:#2778c4;color:#fff;line-height:2em;text-align:center}.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step{background:#2778c4}.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step~.swal2-progress-step{background:#add8e6;color:#fff}.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step~.swal2-progress-step-line{background:#add8e6}.swal2-progress-steps .swal2-progress-step-line{z-index:10;flex-shrink:0;width:2.5em;height:.4em;margin:0 -1px;background:#2778c4}[class^=swal2]{-webkit-tap-highlight-color:transparent}.swal2-show{-webkit-animation:swal2-show .3s;animation:swal2-show .3s}.swal2-hide{-webkit-animation:swal2-hide .15s forwards;animation:swal2-hide .15s forwards}.swal2-noanimation{transition:none}.swal2-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}.swal2-rtl .swal2-close{margin-right:initial;margin-left:0}.swal2-rtl .swal2-timer-progress-bar{right:0;left:auto}@-webkit-keyframes swal2-toast-show{0%{transform:translateY(-.625em) rotateZ(2deg)}33%{transform:translateY(0) rotateZ(-2deg)}66%{transform:translateY(.3125em) rotateZ(2deg)}100%{transform:translateY(0) rotateZ(0)}}@keyframes swal2-toast-show{0%{transform:translateY(-.625em) rotateZ(2deg)}33%{transform:translateY(0) rotateZ(-2deg)}66%{transform:translateY(.3125em) rotateZ(2deg)}100%{transform:translateY(0) rotateZ(0)}}@-webkit-keyframes swal2-toast-hide{100%{transform:rotateZ(1deg);opacity:0}}@keyframes swal2-toast-hide{100%{transform:rotateZ(1deg);opacity:0}}@-webkit-keyframes swal2-toast-animate-success-line-tip{0%{top:.5625em;left:.0625em;width:0}54%{top:.125em;left:.125em;width:0}70%{top:.625em;left:-.25em;width:1.625em}84%{top:1.0625em;left:.75em;width:.5em}100%{top:1.125em;left:.1875em;width:.75em}}@keyframes swal2-toast-animate-success-line-tip{0%{top:.5625em;left:.0625em;width:0}54%{top:.125em;left:.125em;width:0}70%{top:.625em;left:-.25em;width:1.625em}84%{top:1.0625em;left:.75em;width:.5em}100%{top:1.125em;left:.1875em;width:.75em}}@-webkit-keyframes swal2-toast-animate-success-line-long{0%{top:1.625em;right:1.375em;width:0}65%{top:1.25em;right:.9375em;width:0}84%{top:.9375em;right:0;width:1.125em}100%{top:.9375em;right:.1875em;width:1.375em}}@keyframes swal2-toast-animate-success-line-long{0%{top:1.625em;right:1.375em;width:0}65%{top:1.25em;right:.9375em;width:0}84%{top:.9375em;right:0;width:1.125em}100%{top:.9375em;right:.1875em;width:1.375em}}@-webkit-keyframes swal2-show{0%{transform:scale(.7)}45%{transform:scale(1.05)}80%{transform:scale(.95)}100%{transform:scale(1)}}@keyframes swal2-show{0%{transform:scale(.7)}45%{transform:scale(1.05)}80%{transform:scale(.95)}100%{transform:scale(1)}}@-webkit-keyframes swal2-hide{0%{transform:scale(1);opacity:1}100%{transform:scale(.5);opacity:0}}@keyframes swal2-hide{0%{transform:scale(1);opacity:1}100%{transform:scale(.5);opacity:0}}@-webkit-keyframes swal2-animate-success-line-tip{0%{top:1.1875em;left:.0625em;width:0}54%{top:1.0625em;left:.125em;width:0}70%{top:2.1875em;left:-.375em;width:3.125em}84%{top:3em;left:1.3125em;width:1.0625em}100%{top:2.8125em;left:.8125em;width:1.5625em}}@keyframes swal2-animate-success-line-tip{0%{top:1.1875em;left:.0625em;width:0}54%{top:1.0625em;left:.125em;width:0}70%{top:2.1875em;left:-.375em;width:3.125em}84%{top:3em;left:1.3125em;width:1.0625em}100%{top:2.8125em;left:.8125em;width:1.5625em}}@-webkit-keyframes swal2-animate-success-line-long{0%{top:3.375em;right:2.875em;width:0}65%{top:3.375em;right:2.875em;width:0}84%{top:2.1875em;right:0;width:3.4375em}100%{top:2.375em;right:.5em;width:2.9375em}}@keyframes swal2-animate-success-line-long{0%{top:3.375em;right:2.875em;width:0}65%{top:3.375em;right:2.875em;width:0}84%{top:2.1875em;right:0;width:3.4375em}100%{top:2.375em;right:.5em;width:2.9375em}}@-webkit-keyframes swal2-rotate-success-circular-line{0%{transform:rotate(-45deg)}5%{transform:rotate(-45deg)}12%{transform:rotate(-405deg)}100%{transform:rotate(-405deg)}}@keyframes swal2-rotate-success-circular-line{0%{transform:rotate(-45deg)}5%{transform:rotate(-45deg)}12%{transform:rotate(-405deg)}100%{transform:rotate(-405deg)}}@-webkit-keyframes swal2-animate-error-x-mark{0%{margin-top:1.625em;transform:scale(.4);opacity:0}50%{margin-top:1.625em;transform:scale(.4);opacity:0}80%{margin-top:-.375em;transform:scale(1.15)}100%{margin-top:0;transform:scale(1);opacity:1}}@keyframes swal2-animate-error-x-mark{0%{margin-top:1.625em;transform:scale(.4);opacity:0}50%{margin-top:1.625em;transform:scale(.4);opacity:0}80%{margin-top:-.375em;transform:scale(1.15)}100%{margin-top:0;transform:scale(1);opacity:1}}@-webkit-keyframes swal2-animate-error-icon{0%{transform:rotateX(100deg);opacity:0}100%{transform:rotateX(0);opacity:1}}@keyframes swal2-animate-error-icon{0%{transform:rotateX(100deg);opacity:0}100%{transform:rotateX(0);opacity:1}}@-webkit-keyframes swal2-rotate-loading{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}@keyframes swal2-rotate-loading{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}@-webkit-keyframes swal2-animate-question-mark{0%{transform:rotateY(-360deg)}100%{transform:rotateY(0)}}@keyframes swal2-animate-question-mark{0%{transform:rotateY(-360deg)}100%{transform:rotateY(0)}}@-webkit-keyframes swal2-animate-i-mark{0%{transform:rotateZ(45deg);opacity:0}25%{transform:rotateZ(-25deg);opacity:.4}50%{transform:rotateZ(15deg);opacity:.8}75%{transform:rotateZ(-5deg);opacity:1}100%{transform:rotateX(0);opacity:1}}@keyframes swal2-animate-i-mark{0%{transform:rotateZ(45deg);opacity:0}25%{transform:rotateZ(-25deg);opacity:.4}50%{transform:rotateZ(15deg);opacity:.8}75%{transform:rotateZ(-5deg);opacity:1}100%{transform:rotateX(0);opacity:1}}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown){overflow:hidden}body.swal2-height-auto{height:auto!important}body.swal2-no-backdrop .swal2-container{background-color:transparent!important;pointer-events:none}body.swal2-no-backdrop .swal2-container .swal2-popup{pointer-events:all}body.swal2-no-backdrop .swal2-container .swal2-modal{box-shadow:0 0 10px rgba(0,0,0,.4)}@media print{body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown){overflow-y:scroll!important}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown)>[aria-hidden=true]{display:none}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown) .swal2-container{position:static!important}}body.swal2-toast-shown .swal2-container{box-sizing:border-box;width:360px;max-width:100%;background-color:transparent;pointer-events:none}body.swal2-toast-shown .swal2-container.swal2-top{top:0;right:auto;bottom:auto;left:50%;transform:translateX(-50%)}body.swal2-toast-shown .swal2-container.swal2-top-end,body.swal2-toast-shown .swal2-container.swal2-top-right{top:0;right:0;bottom:auto;left:auto}body.swal2-toast-shown .swal2-container.swal2-top-left,body.swal2-toast-shown .swal2-container.swal2-top-start{top:0;right:auto;bottom:auto;left:0}body.swal2-toast-shown .swal2-container.swal2-center-left,body.swal2-toast-shown .swal2-container.swal2-center-start{top:50%;right:auto;bottom:auto;left:0;transform:translateY(-50%)}body.swal2-toast-shown .swal2-container.swal2-center{top:50%;right:auto;bottom:auto;left:50%;transform:translate(-50%,-50%)}body.swal2-toast-shown .swal2-container.swal2-center-end,body.swal2-toast-shown .swal2-container.swal2-center-right{top:50%;right:0;bottom:auto;left:auto;transform:translateY(-50%)}body.swal2-toast-shown .swal2-container.swal2-bottom-left,body.swal2-toast-shown .swal2-container.swal2-bottom-start{top:auto;right:auto;bottom:0;left:0}body.swal2-toast-shown .swal2-container.swal2-bottom{top:auto;right:auto;bottom:0;left:50%;transform:translateX(-50%)}body.swal2-toast-shown .swal2-container.swal2-bottom-end,body.swal2-toast-shown .swal2-container.swal2-bottom-right{top:auto;right:0;bottom:0;left:auto}"); -------------------------------------------------------------------------------- /src/utils.js: -------------------------------------------------------------------------------- 1 | const keyLength = process.env.KEY_LENGTH || 8; 2 | 3 | 4 | const pages = { 5 | Page404: { 6 | heading: "404", 7 | content: `

    404 - Page not found

    Unable to find your pasted code maybe it doesn't exists.

    Tap to go home
    `, 8 | }, 9 | Page500: { 10 | heading: "500", 11 | content: `

    500 - Unknown Error

    An unknown error has occurred. Contact the developer with the url to fix it. Inconvenience is strictly regretted.

    Tap to go home
    `, 12 | } 13 | } 14 | 15 | 16 | const generateKey = async () => { 17 | var randomChars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'; 18 | var result = ''; 19 | for (var i = 0; i < keyLength; i++) { 20 | result += randomChars.charAt(Math.floor(Math.random() * randomChars.length)); 21 | } 22 | return result; 23 | } 24 | 25 | 26 | const generateDomainName = (hostname, port) => { 27 | if (process.env.DOMAIN_NAME) { 28 | return process.env.DOMAIN_NAME 29 | } else if (process.env.DETA_RUNTIME) { 30 | return process.env.DETA_PATH + '.deta.dev' 31 | } else { 32 | return hostname + ":" + port 33 | } 34 | } 35 | 36 | 37 | module.exports = { 38 | pages, 39 | generateKey, 40 | generateDomainName 41 | } -------------------------------------------------------------------------------- /src/views/error.ejs: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | pasting.codes 6 | 7 | 8 | 9 | 10 | 11 | 12 | 30 | 31 | 32 | 33 | 34 |
    35 |

    404

    36 |

    37 | Unable to find your pasted code maybe it doesn't exists. 38 |

    39 | Tap to go home 40 |
    41 |
    42 | 43 | 44 | -------------------------------------------------------------------------------- /src/views/main.ejs: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | <%- website_name %> 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 67 | 68 | 69 | 70 | 80 |
    81 |
    82 |
    83 | 84 | 85 |
    86 |
    87 | 88 | 89 |
    90 |
    91 | 92 | 93 |
    94 |
    95 | Upload File 96 | 97 |
    98 |
    99 | 101 |
    102 |
    103 | 105 |
    106 | <%- include('template', { website_name:website_name }); %> 107 |
    108 |
    109 | 110 | 111 | 112 | 113 | -------------------------------------------------------------------------------- /src/views/paste.ejs: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | <%- data.heading || website_name %> 6 | 7 | 8 | 10 | 12 | 14 | 16 | 17 | 18 | <% if (data.code) { %> 19 | 20 | 21 | <% } %> 22 | 23 | 24 | 38 | 39 | 40 | 41 | 66 |
    67 |
    <%- data.content %>
    68 |
    69 | <% if (data.code) { %> 70 | 75 | <% } %> 76 | 77 | 78 | 79 | -------------------------------------------------------------------------------- /src/views/template.ejs: -------------------------------------------------------------------------------- 1 |
    2 |

    3 | <%- website_name %> 4 | is a minimalist publishing tool that allows you to create richly formatted posts and push them to the Web 5 | in just a click. 6 | In simple words it's a website like Telegra.ph but it can be used as a pastebin too.   7 |

    8 | 22 |
    --------------------------------------------------------------------------------