├── .gitignore ├── dist ├── fonts │ ├── Inter-UI-Black.woff2 │ ├── Inter-UI-Bold.woff2 │ ├── Inter-UI-Italic.woff2 │ ├── Inter-UI-Medium.woff2 │ ├── Montserrat-Bold.woff2 │ ├── Montserrat-Thin.woff2 │ ├── Inter-UI-Regular.woff2 │ ├── Montserrat-Black.woff2 │ ├── Montserrat-Italic.woff2 │ ├── Montserrat-Light.woff2 │ ├── Montserrat-Medium.woff2 │ ├── Inter-UI-BlackItalic.woff2 │ ├── Inter-UI-BoldItalic.woff2 │ ├── Montserrat-ExtraBold.woff2 │ ├── Montserrat-Regular.woff2 │ ├── Montserrat-SemiBold.woff2 │ ├── Inter-UI-MediumItalic.woff2 │ ├── Montserrat-BlackItalic.woff2 │ ├── Montserrat-BoldItalic.woff2 │ ├── Montserrat-ExtraLight.woff2 │ ├── Montserrat-LightItalic.woff2 │ ├── Montserrat-ThinItalic.woff2 │ ├── Montserrat-MediumItalic.woff2 │ ├── Montserrat-SemiBoldItalic.woff2 │ ├── Montserrat-ExtraBoldItalic.woff2 │ ├── Montserrat-ExtraLightItalic.woff2 │ ├── Inter-UI-LICENSE.txt │ └── Montserrat-LICENSE.txt ├── index.html ├── ipfs.css └── bundle.js ├── src ├── index.js ├── index.html ├── page.js └── store.js ├── .github └── workflows │ ├── stale.yml │ └── generated-pr.yml ├── README.md ├── LICENSE └── package.json /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules -------------------------------------------------------------------------------- /dist/fonts/Inter-UI-Black.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ipfs-shipyard/demo-ipfs-todo/HEAD/dist/fonts/Inter-UI-Black.woff2 -------------------------------------------------------------------------------- /dist/fonts/Inter-UI-Bold.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ipfs-shipyard/demo-ipfs-todo/HEAD/dist/fonts/Inter-UI-Bold.woff2 -------------------------------------------------------------------------------- /dist/fonts/Inter-UI-Italic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ipfs-shipyard/demo-ipfs-todo/HEAD/dist/fonts/Inter-UI-Italic.woff2 -------------------------------------------------------------------------------- /dist/fonts/Inter-UI-Medium.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ipfs-shipyard/demo-ipfs-todo/HEAD/dist/fonts/Inter-UI-Medium.woff2 -------------------------------------------------------------------------------- /dist/fonts/Montserrat-Bold.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ipfs-shipyard/demo-ipfs-todo/HEAD/dist/fonts/Montserrat-Bold.woff2 -------------------------------------------------------------------------------- /dist/fonts/Montserrat-Thin.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ipfs-shipyard/demo-ipfs-todo/HEAD/dist/fonts/Montserrat-Thin.woff2 -------------------------------------------------------------------------------- /dist/fonts/Inter-UI-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ipfs-shipyard/demo-ipfs-todo/HEAD/dist/fonts/Inter-UI-Regular.woff2 -------------------------------------------------------------------------------- /dist/fonts/Montserrat-Black.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ipfs-shipyard/demo-ipfs-todo/HEAD/dist/fonts/Montserrat-Black.woff2 -------------------------------------------------------------------------------- /dist/fonts/Montserrat-Italic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ipfs-shipyard/demo-ipfs-todo/HEAD/dist/fonts/Montserrat-Italic.woff2 -------------------------------------------------------------------------------- /dist/fonts/Montserrat-Light.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ipfs-shipyard/demo-ipfs-todo/HEAD/dist/fonts/Montserrat-Light.woff2 -------------------------------------------------------------------------------- /dist/fonts/Montserrat-Medium.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ipfs-shipyard/demo-ipfs-todo/HEAD/dist/fonts/Montserrat-Medium.woff2 -------------------------------------------------------------------------------- /dist/fonts/Inter-UI-BlackItalic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ipfs-shipyard/demo-ipfs-todo/HEAD/dist/fonts/Inter-UI-BlackItalic.woff2 -------------------------------------------------------------------------------- /dist/fonts/Inter-UI-BoldItalic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ipfs-shipyard/demo-ipfs-todo/HEAD/dist/fonts/Inter-UI-BoldItalic.woff2 -------------------------------------------------------------------------------- /dist/fonts/Montserrat-ExtraBold.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ipfs-shipyard/demo-ipfs-todo/HEAD/dist/fonts/Montserrat-ExtraBold.woff2 -------------------------------------------------------------------------------- /dist/fonts/Montserrat-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ipfs-shipyard/demo-ipfs-todo/HEAD/dist/fonts/Montserrat-Regular.woff2 -------------------------------------------------------------------------------- /dist/fonts/Montserrat-SemiBold.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ipfs-shipyard/demo-ipfs-todo/HEAD/dist/fonts/Montserrat-SemiBold.woff2 -------------------------------------------------------------------------------- /dist/fonts/Inter-UI-MediumItalic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ipfs-shipyard/demo-ipfs-todo/HEAD/dist/fonts/Inter-UI-MediumItalic.woff2 -------------------------------------------------------------------------------- /dist/fonts/Montserrat-BlackItalic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ipfs-shipyard/demo-ipfs-todo/HEAD/dist/fonts/Montserrat-BlackItalic.woff2 -------------------------------------------------------------------------------- /dist/fonts/Montserrat-BoldItalic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ipfs-shipyard/demo-ipfs-todo/HEAD/dist/fonts/Montserrat-BoldItalic.woff2 -------------------------------------------------------------------------------- /dist/fonts/Montserrat-ExtraLight.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ipfs-shipyard/demo-ipfs-todo/HEAD/dist/fonts/Montserrat-ExtraLight.woff2 -------------------------------------------------------------------------------- /dist/fonts/Montserrat-LightItalic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ipfs-shipyard/demo-ipfs-todo/HEAD/dist/fonts/Montserrat-LightItalic.woff2 -------------------------------------------------------------------------------- /dist/fonts/Montserrat-ThinItalic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ipfs-shipyard/demo-ipfs-todo/HEAD/dist/fonts/Montserrat-ThinItalic.woff2 -------------------------------------------------------------------------------- /dist/fonts/Montserrat-MediumItalic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ipfs-shipyard/demo-ipfs-todo/HEAD/dist/fonts/Montserrat-MediumItalic.woff2 -------------------------------------------------------------------------------- /dist/fonts/Montserrat-SemiBoldItalic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ipfs-shipyard/demo-ipfs-todo/HEAD/dist/fonts/Montserrat-SemiBoldItalic.woff2 -------------------------------------------------------------------------------- /dist/fonts/Montserrat-ExtraBoldItalic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ipfs-shipyard/demo-ipfs-todo/HEAD/dist/fonts/Montserrat-ExtraBoldItalic.woff2 -------------------------------------------------------------------------------- /dist/fonts/Montserrat-ExtraLightItalic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ipfs-shipyard/demo-ipfs-todo/HEAD/dist/fonts/Montserrat-ExtraLightItalic.woff2 -------------------------------------------------------------------------------- /src/index.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | const choo = require('choo') 4 | const store = require('./store') 5 | const page = require('./page') 6 | 7 | const app = choo() 8 | 9 | app.use(store) 10 | app.route('*', page) 11 | app.mount('#root') 12 | -------------------------------------------------------------------------------- /.github/workflows/stale.yml: -------------------------------------------------------------------------------- 1 | name: Close Stale Issues 2 | 3 | on: 4 | schedule: 5 | - cron: '0 0 * * *' 6 | workflow_dispatch: 7 | 8 | permissions: 9 | issues: write 10 | pull-requests: write 11 | 12 | jobs: 13 | stale: 14 | uses: ipdxco/unified-github-workflows/.github/workflows/reusable-stale-issue.yml@v1 15 | -------------------------------------------------------------------------------- /.github/workflows/generated-pr.yml: -------------------------------------------------------------------------------- 1 | name: Close Generated PRs 2 | 3 | on: 4 | schedule: 5 | - cron: '0 0 * * *' 6 | workflow_dispatch: 7 | 8 | permissions: 9 | issues: write 10 | pull-requests: write 11 | 12 | jobs: 13 | stale: 14 | uses: ipdxco/unified-github-workflows/.github/workflows/reusable-generated-pr.yml@v1 15 | -------------------------------------------------------------------------------- /dist/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | IPFS TODO 5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | -------------------------------------------------------------------------------- /src/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | IPFS TODO 5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # IPFS ToDo App 2 | 3 | ![](https://user-images.githubusercontent.com/5447088/38440844-a1e5b402-39da-11e8-9822-54ba81c22756.png) 4 | 5 | Demo: https://ipfs.io/ipfs/QmSGQrmvHe6fFiWdV2H8YnhLaoX4qe5nYEmJfUFx6LdUYa/ 6 | 7 | ## Install 8 | 9 | 1. This app requires `window.ipfs`. Install the IPFS Companion web extension: 10 | 11 | 12 | 13 | 2. Install dependencies `npm install` 14 | 3. Build the app `npm run build` 15 | 4. Start the app `npm start` 16 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 Henrique Dias 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 | -------------------------------------------------------------------------------- /src/page.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | const html = require('choo/html') 4 | 5 | function page (state, emit) { 6 | return html` 7 |
8 |
9 |

Your ToDos

10 |
11 | 12 | ${state.error 13 | ? html` 14 |
15 |

${state.error.message}

16 |
17 | ` 18 | : null} 19 | 20 | 24 | 25 | 36 |
37 | ` 38 | 39 | function keyup (event) { 40 | if (event.keyCode === 13) { 41 | const val = event.currentTarget.value 42 | if (val !== '') { emit('addTodo', event.currentTarget.value) } 43 | } 44 | } 45 | 46 | function remove (event) { 47 | emit('removeTodo', event.target.dataset.index) 48 | } 49 | } 50 | 51 | module.exports = page 52 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ipfs-todo", 3 | "description": "A simple TODO app using IPFS's MFS.", 4 | "version": "1.0.0", 5 | "private": true, 6 | "author": "Henrique Dias ", 7 | "main": "dist/index.html", 8 | "scripts": { 9 | "start": "ecstatic dist", 10 | "clean": "shx rm -rf dist", 11 | "build": "run-s build:*", 12 | "build:copy": "run-p build:copy:*", 13 | "build:copy:html": "shx mkdir -p dist && shx cp src/index.html dist/index.html", 14 | "build:copy:ipfs-css": "run-p build:copy:ipfs-css:*", 15 | "build:copy:ipfs-css:css": "shx mkdir -p dist && shx cp node_modules/ipfs-css/ipfs.css dist", 16 | "build:copy:ipfs-css:fonts": "shx mkdir -p dist/fonts && shx cp node_modules/ipfs-css/fonts/* dist/fonts", 17 | "build:copy:tachyons": "shx mkdir -p dist && shx cp node_modules/tachyons/css/tachyons.css dist", 18 | "build:js": "browserify -g uglifyify src/index.js -o dist/bundle.js", 19 | "test": "standard" 20 | }, 21 | "license": "MIT", 22 | "keywords": [ 23 | "ipfs", 24 | "qr", 25 | "example", 26 | "demo" 27 | ], 28 | "dependencies": { 29 | "choo": "^6.13.3", 30 | "ipfs-css": "^0.12.0", 31 | "tachyons": "^4.11.1", 32 | "window.ipfs-is-required": "^1.0.2" 33 | }, 34 | "devDependencies": { 35 | "browserify": "^16.3.0", 36 | "ecstatic": "^4.1.2", 37 | "npm-run-all": "^4.1.5", 38 | "shx": "^0.3.2", 39 | "standard": "^13.0.2", 40 | "uglifyify": "^5.0.1" 41 | }, 42 | "repository": { 43 | "type": "git", 44 | "url": "git+https://github.com/hacdias/ipfs-todo.git" 45 | }, 46 | "bugs": { 47 | "url": "https://github.com/hacdias/ipfs-todo/issues" 48 | }, 49 | "homepage": "https://github.com/hacdias/ipfs-todo#readme" 50 | } 51 | -------------------------------------------------------------------------------- /src/store.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | const ipfsRequired = require('window.ipfs-is-required') 4 | 5 | const FILE = '/todos.json' 6 | 7 | function store (state, emitter) { 8 | let ipfs = null 9 | state.todos = [] 10 | state.error = null 11 | 12 | const writeTodos = async () => { 13 | const todos = JSON.stringify(state.todos) 14 | const buf = Buffer.from(todos) 15 | 16 | try { 17 | await ipfs.files.write(FILE, buf, { create: true, truncate: true }) 18 | } catch (e) { 19 | state.error = e 20 | } 21 | } 22 | 23 | emitter.on('DOMContentLoaded', async () => { 24 | // Checks if window.ipfs is available through window.ipfs-is-required 25 | // which shows an information bar to download IPFS Companion if window.ipfs 26 | // is undefined. 27 | if (!ipfsRequired()) { 28 | state.error = new Error('You do not have IPFS Companion installed.') 29 | emitter.emit('render') 30 | return 31 | } 32 | 33 | try { 34 | ipfs = await window.ipfs.enable({ commands: ['files'] }) 35 | } catch (e) { 36 | state.error = e 37 | } 38 | 39 | try { 40 | // Reads the file with the ToDos and if it doesn't exist 41 | // just creates a new empty one. 42 | const buf = await ipfs.files.read(FILE) 43 | const str = buf.toString() 44 | state.todos = JSON.parse(str) 45 | emitter.emit('render') 46 | } catch (e) { 47 | writeTodos() 48 | } 49 | }) 50 | 51 | // Adds the ToDo to the list and saves it. 52 | emitter.on('addTodo', (todo) => { 53 | state.todos.push(todo) 54 | emitter.emit('render') 55 | writeTodos() 56 | }) 57 | 58 | // Removes the ToDo from the list and saves it. 59 | emitter.on('removeTodo', (index) => { 60 | state.todos.splice(index, 1) 61 | emitter.emit('render') 62 | writeTodos() 63 | }) 64 | } 65 | 66 | module.exports = store 67 | -------------------------------------------------------------------------------- /dist/fonts/Inter-UI-LICENSE.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) 2017 The Inter UI Project Authors (me@rsms.me) 2 | 3 | This Font Software is licensed under the SIL Open Font License, Version 1.1. 4 | This license is copied below, and is also available with a FAQ at: 5 | http://scripts.sil.org/OFL 6 | 7 | ----------------------------------------------------------- 8 | SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 9 | ----------------------------------------------------------- 10 | 11 | PREAMBLE 12 | The goals of the Open Font License (OFL) are to stimulate worldwide 13 | development of collaborative font projects, to support the font creation 14 | efforts of academic and linguistic communities, and to provide a free and 15 | open framework in which fonts may be shared and improved in partnership 16 | with others. 17 | 18 | The OFL allows the licensed fonts to be used, studied, modified and 19 | redistributed freely as long as they are not sold by themselves. The 20 | fonts, including any derivative works, can be bundled, embedded, 21 | redistributed and/or sold with any software provided that any reserved 22 | names are not used by derivative works. The fonts and derivatives, 23 | however, cannot be released under any other type of license. The 24 | requirement for fonts to remain under this license does not apply 25 | to any document created using the fonts or their derivatives. 26 | 27 | DEFINITIONS 28 | "Font Software" refers to the set of files released by the Copyright 29 | Holder(s) under this license and clearly marked as such. This may 30 | include source files, build scripts and documentation. 31 | 32 | "Reserved Font Name" refers to any names specified as such after the 33 | copyright statement(s). 34 | 35 | "Original Version" refers to the collection of Font Software components as 36 | distributed by the Copyright Holder(s). 37 | 38 | "Modified Version" refers to any derivative made by adding to, deleting, 39 | or substituting -- in part or in whole -- any of the components of the 40 | Original Version, by changing formats or by porting the Font Software to a 41 | new environment. 42 | 43 | "Author" refers to any designer, engineer, programmer, technical 44 | writer or other person who contributed to the Font Software. 45 | 46 | PERMISSION AND CONDITIONS 47 | Permission is hereby granted, free of charge, to any person obtaining 48 | a copy of the Font Software, to use, study, copy, merge, embed, modify, 49 | redistribute, and sell modified and unmodified copies of the Font 50 | Software, subject to the following conditions: 51 | 52 | 1) Neither the Font Software nor any of its individual components, 53 | in Original or Modified Versions, may be sold by itself. 54 | 55 | 2) Original or Modified Versions of the Font Software may be bundled, 56 | redistributed and/or sold with any software, provided that each copy 57 | contains the above copyright notice and this license. These can be 58 | included either as stand-alone text files, human-readable headers or 59 | in the appropriate machine-readable metadata fields within text or 60 | binary files as long as those fields can be easily viewed by the user. 61 | 62 | 3) No Modified Version of the Font Software may use the Reserved Font 63 | Name(s) unless explicit written permission is granted by the corresponding 64 | Copyright Holder. This restriction only applies to the primary font name as 65 | presented to the users. 66 | 67 | 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font 68 | Software shall not be used to promote, endorse or advertise any 69 | Modified Version, except to acknowledge the contribution(s) of the 70 | Copyright Holder(s) and the Author(s) or with their explicit written 71 | permission. 72 | 73 | 5) The Font Software, modified or unmodified, in part or in whole, 74 | must be distributed entirely under this license, and must not be 75 | distributed under any other license. The requirement for fonts to 76 | remain under this license does not apply to any document created 77 | using the Font Software. 78 | 79 | TERMINATION 80 | This license becomes null and void if any of the above conditions are 81 | not met. 82 | 83 | DISCLAIMER 84 | THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 85 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF 86 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT 87 | OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE 88 | COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 89 | INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL 90 | DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 91 | FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM 92 | OTHER DEALINGS IN THE FONT SOFTWARE. 93 | -------------------------------------------------------------------------------- /dist/fonts/Montserrat-LICENSE.txt: -------------------------------------------------------------------------------- 1 | Copyright 2011 The Montserrat Project Authors (https://github.com/JulietaUla/Montserrat) 2 | 3 | This Font Software is licensed under the SIL Open Font License, Version 1.1. 4 | This license is copied below, and is also available with a FAQ at: 5 | http://scripts.sil.org/OFL 6 | 7 | 8 | ----------------------------------------------------------- 9 | SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 10 | ----------------------------------------------------------- 11 | 12 | PREAMBLE 13 | The goals of the Open Font License (OFL) are to stimulate worldwide 14 | development of collaborative font projects, to support the font creation 15 | efforts of academic and linguistic communities, and to provide a free and 16 | open framework in which fonts may be shared and improved in partnership 17 | with others. 18 | 19 | The OFL allows the licensed fonts to be used, studied, modified and 20 | redistributed freely as long as they are not sold by themselves. The 21 | fonts, including any derivative works, can be bundled, embedded, 22 | redistributed and/or sold with any software provided that any reserved 23 | names are not used by derivative works. The fonts and derivatives, 24 | however, cannot be released under any other type of license. The 25 | requirement for fonts to remain under this license does not apply 26 | to any document created using the fonts or their derivatives. 27 | 28 | DEFINITIONS 29 | "Font Software" refers to the set of files released by the Copyright 30 | Holder(s) under this license and clearly marked as such. This may 31 | include source files, build scripts and documentation. 32 | 33 | "Reserved Font Name" refers to any names specified as such after the 34 | copyright statement(s). 35 | 36 | "Original Version" refers to the collection of Font Software components as 37 | distributed by the Copyright Holder(s). 38 | 39 | "Modified Version" refers to any derivative made by adding to, deleting, 40 | or substituting -- in part or in whole -- any of the components of the 41 | Original Version, by changing formats or by porting the Font Software to a 42 | new environment. 43 | 44 | "Author" refers to any designer, engineer, programmer, technical 45 | writer or other person who contributed to the Font Software. 46 | 47 | PERMISSION & CONDITIONS 48 | Permission is hereby granted, free of charge, to any person obtaining 49 | a copy of the Font Software, to use, study, copy, merge, embed, modify, 50 | redistribute, and sell modified and unmodified copies of the Font 51 | Software, subject to the following conditions: 52 | 53 | 1) Neither the Font Software nor any of its individual components, 54 | in Original or Modified Versions, may be sold by itself. 55 | 56 | 2) Original or Modified Versions of the Font Software may be bundled, 57 | redistributed and/or sold with any software, provided that each copy 58 | contains the above copyright notice and this license. These can be 59 | included either as stand-alone text files, human-readable headers or 60 | in the appropriate machine-readable metadata fields within text or 61 | binary files as long as those fields can be easily viewed by the user. 62 | 63 | 3) No Modified Version of the Font Software may use the Reserved Font 64 | Name(s) unless explicit written permission is granted by the corresponding 65 | Copyright Holder. This restriction only applies to the primary font name as 66 | presented to the users. 67 | 68 | 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font 69 | Software shall not be used to promote, endorse or advertise any 70 | Modified Version, except to acknowledge the contribution(s) of the 71 | Copyright Holder(s) and the Author(s) or with their explicit written 72 | permission. 73 | 74 | 5) The Font Software, modified or unmodified, in part or in whole, 75 | must be distributed entirely under this license, and must not be 76 | distributed under any other license. The requirement for fonts to 77 | remain under this license does not apply to any document created 78 | using the Font Software. 79 | 80 | TERMINATION 81 | This license becomes null and void if any of the above conditions are 82 | not met. 83 | 84 | DISCLAIMER 85 | THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 86 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF 87 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT 88 | OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE 89 | COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 90 | INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL 91 | DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 92 | FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM 93 | OTHER DEALINGS IN THE FONT SOFTWARE. 94 | -------------------------------------------------------------------------------- /dist/ipfs.css: -------------------------------------------------------------------------------- 1 | /* _| _ \ __| __| 2 | | __/ _| \__ \ _| (_-< (_-< 3 | ___| _| _| ____/ _) \__| ___/ ___/ 4 | 5 | See: https://github.com/ipfs-shipyard/ipfs-css 6 | */ 7 | 8 | @font-face { 9 | font-family: 'Inter UI'; 10 | font-style: normal; 11 | font-weight: 400; 12 | src: local('Inter UI'), local('InterUI-Regular'), url("fonts/Inter-UI-Regular.woff2") format("woff2"); 13 | } 14 | 15 | @font-face { 16 | font-family: 'Inter UI'; 17 | font-style: italic; 18 | font-weight: 400; 19 | src: local('Inter UI Italic'), local('InterUI-Italic'), url("fonts/Inter-UI-Italic.woff2") format("woff2"); 20 | } 21 | 22 | @font-face { 23 | font-family: 'Inter UI'; 24 | font-style: normal; 25 | font-weight: 500; 26 | src: local('Inter UI Medium'), local('InterUI-Medium'), url("fonts/Inter-UI-Medium.woff2") format("woff2"); 27 | } 28 | 29 | @font-face { 30 | font-family: 'Inter UI'; 31 | font-style: italic; 32 | font-weight: 500; 33 | src: local('Inter UI Medium Italic'), local('InterUI-MediumItalic'), url("fonts/Inter-UI-MediumItalic.woff2") format("woff2"); 34 | } 35 | 36 | @font-face { 37 | font-family: 'Inter UI'; 38 | font-style: normal; 39 | font-weight: 700; 40 | src: local('Inter UI Bold'), local('InterUI-Bold'), url("fonts/Inter-UI-Bold.woff2") format("woff2"); 41 | } 42 | 43 | @font-face { 44 | font-family: 'Inter UI'; 45 | font-style: italic; 46 | font-weight: 700; 47 | src: local('Inter UI Bold Italic'), local('InterUI-BoldItalic'), url("fonts/Inter-UI-BoldItalic.woff2") format("woff2"); 48 | } 49 | 50 | @font-face { 51 | font-family: 'Montserrat'; 52 | font-style: normal; 53 | font-weight: 300; 54 | src: local('Montserrat Light'), local('Montserrat-Light'), url('fonts/Montserrat-Light.woff2') format('woff2'); 55 | } 56 | 57 | @font-face { 58 | font-family: 'Montserrat'; 59 | font-style: italic; 60 | font-weight: 300; 61 | src: local('Montserrat Light Italic'), local('Montserrat-LightItalic'), url('fonts/Montserrat-LightItalic.woff2') format('woff2'); 62 | } 63 | 64 | @font-face { 65 | font-family: 'Montserrat'; 66 | font-style: normal; 67 | font-weight: 400; 68 | src: local('Montserrat Regular'), local('Montserrat-Regular'), url('fonts/Montserrat-Regular.woff2') format('woff2'); 69 | } 70 | 71 | @font-face { 72 | font-family: 'Montserrat'; 73 | font-style: italic; 74 | font-weight: 400; 75 | src: local('Montserrat Italic'), local('Montserrat-Italic'), url('fonts/Montserrat-Italic.woff2') format('woff2'); 76 | } 77 | 78 | @font-face { 79 | font-family: 'Montserrat'; 80 | font-style: normal; 81 | font-weight: 600; 82 | src: local('Montserrat SemiBold'), local('Montserrat-SemiBold'), url('fonts/Montserrat-SemiBold.woff2') format('woff2'); 83 | } 84 | 85 | @font-face { 86 | font-family: 'Montserrat'; 87 | font-style: italic; 88 | font-weight: 600; 89 | src: local('Montserrat SemiBold Italic'), local('Montserrat-SemiBoldItalic'), url('fonts/Montserrat-SemiBoldItalic.woff2') format('woff2'); 90 | } 91 | 92 | @font-face { 93 | font-family: 'Montserrat'; 94 | font-style: normal; 95 | font-weight: 700; 96 | src: local('Montserrat Bold'), local('Montserrat-Bold'), url('fonts/Montserrat-Bold.woff2') format('woff2'); 97 | } 98 | 99 | @font-face { 100 | font-family: 'Montserrat'; 101 | font-style: italic; 102 | font-weight: 700; 103 | src: local('Montserrat Bold Italic'), local('Montserrat-BoldItalic'), url('fonts/Montserrat-BoldItalic.woff2') format('woff2'); 104 | } 105 | 106 | /* IPFS theme.css - Generated from https://github.com/ipfs-shipyard/ipfs-css/blob/master/theme.json */ 107 | 108 | /* ---- font ----- */ 109 | 110 | .sans-serif { font-family: 'Inter UI', system-ui, sans-serif; } 111 | 112 | .montserrat { font-family: 'Montserrat', 'Verdana', system-ui, sans-serif; } 113 | 114 | .monospace { font-family: Consolas, monaco, monospace; } 115 | 116 | /* ---- color ----- */ 117 | 118 | .navy { color: #0b3a53; } 119 | 120 | .navy-muted { color: #244e66; } 121 | 122 | .aqua { color: #69c4cd; } 123 | 124 | .aqua-muted { color: #9ad4db; } 125 | 126 | .gray { color: #b7bbc8; } 127 | 128 | .gray-muted { color: #d9dbe2; } 129 | 130 | .charcoal { color: #34373f; } 131 | 132 | .charcoal-muted { color: #7f8491; } 133 | 134 | .red { color: #ea5037; } 135 | 136 | .red-muted { color: #f36149; } 137 | 138 | .yellow { color: #f39021; } 139 | 140 | .yellow-muted { color: #f9a13e; } 141 | 142 | .teal { color: #3e9096; } 143 | 144 | .teal-muted { color: #439a9d; } 145 | 146 | .green { color: #0cb892; } 147 | 148 | .green-muted { color: #0aca9f; } 149 | 150 | .snow { color: #edf0f4; } 151 | 152 | .snow-muted { color: #f7f8fa; } 153 | 154 | .bg-navy { background-color: #0b3a53; } 155 | 156 | .bg-navy-muted { background-color: #244e66; } 157 | 158 | .bg-aqua { background-color: #69c4cd; } 159 | 160 | .bg-aqua-muted { background-color: #9ad4db; } 161 | 162 | .bg-gray { background-color: #b7bbc8; } 163 | 164 | .bg-gray-muted { background-color: #d9dbe2; } 165 | 166 | .bg-charcoal { background-color: #34373f; } 167 | 168 | .bg-charcoal-muted { background-color: #7f8491; } 169 | 170 | .bg-red { background-color: #ea5037; } 171 | 172 | .bg-red-muted { background-color: #f36149; } 173 | 174 | .bg-yellow { background-color: #f39021; } 175 | 176 | .bg-yellow-muted { background-color: #f9a13e; } 177 | 178 | .bg-teal { background-color: #3e9096; } 179 | 180 | .bg-teal-muted { background-color: #439a9d; } 181 | 182 | .bg-green { background-color: #0cb892; } 183 | 184 | .bg-green-muted { background-color: #0aca9f; } 185 | 186 | .bg-snow { background-color: #edf0f4; } 187 | 188 | .bg-snow-muted { background-color: #f7f8fa; } 189 | 190 | .hover-navy:hover, .hover-navy:focus { color: #0b3a53; } 191 | 192 | .hover-navy-muted:hover, .hover-navy-muted:focus { color: #244e66; } 193 | 194 | .hover-aqua:hover, .hover-aqua:focus { color: #69c4cd; } 195 | 196 | .hover-aqua-muted:hover, .hover-aqua-muted:focus { color: #9ad4db; } 197 | 198 | .hover-gray:hover, .hover-gray:focus { color: #b7bbc8; } 199 | 200 | .hover-gray-muted:hover, .hover-gray-muted:focus { color: #d9dbe2; } 201 | 202 | .hover-charcoal:hover, .hover-charcoal:focus { color: #34373f; } 203 | 204 | .hover-charcoal-muted:hover, .hover-charcoal-muted:focus { color: #7f8491; } 205 | 206 | .hover-red:hover, .hover-red:focus { color: #ea5037; } 207 | 208 | .hover-red-muted:hover, .hover-red-muted:focus { color: #f36149; } 209 | 210 | .hover-yellow:hover, .hover-yellow:focus { color: #f39021; } 211 | 212 | .hover-yellow-muted:hover, .hover-yellow-muted:focus { color: #f9a13e; } 213 | 214 | .hover-teal:hover, .hover-teal:focus { color: #3e9096; } 215 | 216 | .hover-teal-muted:hover, .hover-teal-muted:focus { color: #439a9d; } 217 | 218 | .hover-green:hover, .hover-green:focus { color: #0cb892; } 219 | 220 | .hover-green-muted:hover, .hover-green-muted:focus { color: #0aca9f; } 221 | 222 | .hover-snow:hover, .hover-snow:focus { color: #edf0f4; } 223 | 224 | .hover-snow-muted:hover, .hover-snow-muted:focus { color: #f7f8fa; } 225 | 226 | .hover-bg-navy:hover, .hover-bg-navy:focus { background-color: #0b3a53; } 227 | 228 | .hover-bg-navy-muted:hover, .hover-bg-navy-muted:focus { background-color: #244e66; } 229 | 230 | .hover-bg-aqua:hover, .hover-bg-aqua:focus { background-color: #69c4cd; } 231 | 232 | .hover-bg-aqua-muted:hover, .hover-bg-aqua-muted:focus { background-color: #9ad4db; } 233 | 234 | .hover-bg-gray:hover, .hover-bg-gray:focus { background-color: #b7bbc8; } 235 | 236 | .hover-bg-gray-muted:hover, .hover-bg-gray-muted:focus { background-color: #d9dbe2; } 237 | 238 | .hover-bg-charcoal:hover, .hover-bg-charcoal:focus { background-color: #34373f; } 239 | 240 | .hover-bg-charcoal-muted:hover, .hover-bg-charcoal-muted:focus { background-color: #7f8491; } 241 | 242 | .hover-bg-red:hover, .hover-bg-red:focus { background-color: #ea5037; } 243 | 244 | .hover-bg-red-muted:hover, .hover-bg-red-muted:focus { background-color: #f36149; } 245 | 246 | .hover-bg-yellow:hover, .hover-bg-yellow:focus { background-color: #f39021; } 247 | 248 | .hover-bg-yellow-muted:hover, .hover-bg-yellow-muted:focus { background-color: #f9a13e; } 249 | 250 | .hover-bg-teal:hover, .hover-bg-teal:focus { background-color: #3e9096; } 251 | 252 | .hover-bg-teal-muted:hover, .hover-bg-teal-muted:focus { background-color: #439a9d; } 253 | 254 | .hover-bg-green:hover, .hover-bg-green:focus { background-color: #0cb892; } 255 | 256 | .hover-bg-green-muted:hover, .hover-bg-green-muted:focus { background-color: #0aca9f; } 257 | 258 | .hover-bg-snow:hover, .hover-bg-snow:focus { background-color: #edf0f4; } 259 | 260 | .hover-bg-snow-muted:hover, .hover-bg-snow-muted:focus { background-color: #f7f8fa; } 261 | 262 | .fill-navy { fill: #0b3a53; } 263 | 264 | .fill-navy-muted { fill: #244e66; } 265 | 266 | .fill-aqua { fill: #69c4cd; } 267 | 268 | .fill-aqua-muted { fill: #9ad4db; } 269 | 270 | .fill-gray { fill: #b7bbc8; } 271 | 272 | .fill-gray-muted { fill: #d9dbe2; } 273 | 274 | .fill-charcoal { fill: #34373f; } 275 | 276 | .fill-charcoal-muted { fill: #7f8491; } 277 | 278 | .fill-red { fill: #ea5037; } 279 | 280 | .fill-red-muted { fill: #f36149; } 281 | 282 | .fill-yellow { fill: #f39021; } 283 | 284 | .fill-yellow-muted { fill: #f9a13e; } 285 | 286 | .fill-teal { fill: #3e9096; } 287 | 288 | .fill-teal-muted { fill: #439a9d; } 289 | 290 | .fill-green { fill: #0cb892; } 291 | 292 | .fill-green-muted { fill: #0aca9f; } 293 | 294 | .fill-snow { fill: #edf0f4; } 295 | 296 | .fill-snow-muted { fill: #f7f8fa; } 297 | 298 | .hover-fill-navy:hover, .hover-fill-navy:focus { fill: #0b3a53; } 299 | 300 | .hover-fill-navy-muted:hover, .hover-fill-navy-muted:focus { fill: #244e66; } 301 | 302 | .hover-fill-aqua:hover, .hover-fill-aqua:focus { fill: #69c4cd; } 303 | 304 | .hover-fill-aqua-muted:hover, .hover-fill-aqua-muted:focus { fill: #9ad4db; } 305 | 306 | .hover-fill-gray:hover, .hover-fill-gray:focus { fill: #b7bbc8; } 307 | 308 | .hover-fill-gray-muted:hover, .hover-fill-gray-muted:focus { fill: #d9dbe2; } 309 | 310 | .hover-fill-charcoal:hover, .hover-fill-charcoal:focus { fill: #34373f; } 311 | 312 | .hover-fill-charcoal-muted:hover, .hover-fill-charcoal-muted:focus { fill: #7f8491; } 313 | 314 | .hover-fill-red:hover, .hover-fill-red:focus { fill: #ea5037; } 315 | 316 | .hover-fill-red-muted:hover, .hover-fill-red-muted:focus { fill: #f36149; } 317 | 318 | .hover-fill-yellow:hover, .hover-fill-yellow:focus { fill: #f39021; } 319 | 320 | .hover-fill-yellow-muted:hover, .hover-fill-yellow-muted:focus { fill: #f9a13e; } 321 | 322 | .hover-fill-teal:hover, .hover-fill-teal:focus { fill: #3e9096; } 323 | 324 | .hover-fill-teal-muted:hover, .hover-fill-teal-muted:focus { fill: #439a9d; } 325 | 326 | .hover-fill-green:hover, .hover-fill-green:focus { fill: #0cb892; } 327 | 328 | .hover-fill-green-muted:hover, .hover-fill-green-muted:focus { fill: #0aca9f; } 329 | 330 | .hover-fill-snow:hover, .hover-fill-snow:focus { fill: #edf0f4; } 331 | 332 | .hover-fill-snow-muted:hover, .hover-fill-snow-muted:focus { fill: #f7f8fa; } 333 | 334 | .border-navy, .b--navy { border-color: #0b3a53; } 335 | 336 | .border-navy-muted, .b--navy-muted { border-color: #244e66; } 337 | 338 | .border-aqua, .b--aqua { border-color: #69c4cd; } 339 | 340 | .border-aqua-muted, .b--aqua-muted { border-color: #9ad4db; } 341 | 342 | .border-gray, .b--gray { border-color: #b7bbc8; } 343 | 344 | .border-gray-muted, .b--gray-muted { border-color: #d9dbe2; } 345 | 346 | .border-charcoal, .b--charcoal { border-color: #34373f; } 347 | 348 | .border-charcoal-muted, .b--charcoal-muted { border-color: #7f8491; } 349 | 350 | .border-red, .b--red { border-color: #ea5037; } 351 | 352 | .border-red-muted, .b--red-muted { border-color: #f36149; } 353 | 354 | .border-yellow, .b--yellow { border-color: #f39021; } 355 | 356 | .border-yellow-muted, .b--yellow-muted { border-color: #f9a13e; } 357 | 358 | .border-teal, .b--teal { border-color: #3e9096; } 359 | 360 | .border-teal-muted, .b--teal-muted { border-color: #439a9d; } 361 | 362 | .border-green, .b--green { border-color: #0cb892; } 363 | 364 | .border-green-muted, .b--green-muted { border-color: #0aca9f; } 365 | 366 | .border-snow, .b--snow { border-color: #edf0f4; } 367 | 368 | .border-snow-muted, .b--snow-muted { border-color: #f7f8fa; } 369 | 370 | .ipfs-gradient-0 { background-image: linear-gradient(to top, #041727 0%,#043b55 100%); } 371 | 372 | .transition-all { 373 | transition: .2s ease all; 374 | } 375 | 376 | .no-select { 377 | -webkit-user-select: none; 378 | -moz-user-select: none; 379 | -ms-user-select: none; 380 | user-select: none; 381 | } 382 | 383 | .force-select { 384 | -webkit-user-select: all; 385 | -moz-user-select: all; 386 | -ms-user-select: all; 387 | user-select: all; 388 | } 389 | 390 | .no-pointer-events { 391 | pointer-events: none; 392 | } 393 | 394 | .focus-underline:focus { 395 | text-decoration: underline; 396 | } 397 | 398 | .focus-outline:focus { 399 | outline: 0; 400 | box-shadow: 0 0 0 .2rem rgba(201, 210, 215, .4); 401 | } 402 | 403 | .focus-outline-red:focus { 404 | outline: 0; 405 | box-shadow: 0 0 0 0.2rem rgba(243, 97, 73, 0.4); 406 | } 407 | 408 | .focus-outline-green:focus { 409 | outline: 0; 410 | box-shadow: 0 0 0 0.2rem rgba(10, 202, 159, 0.4); 411 | } 412 | 413 | .stroke-current-color { 414 | stroke: currentColor; 415 | } 416 | 417 | .fill-current-color { 418 | fill: currentColor; 419 | } 420 | 421 | .fill-white { 422 | fill: white; 423 | } 424 | 425 | 426 | -------------------------------------------------------------------------------- /dist/bundle.js: -------------------------------------------------------------------------------- 1 | (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i=0;u--)if(o[u]!==c[u])return!1;for(u=o.length-1;u>=0;u--)if(!_deepEqual(t[s=o[u]],e[s],r,i))return!1;return!0}function notDeepStrictEqual(t,e,r){_deepEqual(t,e,!0)&&fail(t,e,r,"notDeepStrictEqual",notDeepStrictEqual)}function expectedException(t,e){if(!t||!e)return!1;if("[object RegExp]"==Object.prototype.toString.call(e))return e.test(t);try{if(t instanceof e)return!0}catch(t){}return!Error.isPrototypeOf(e)&&!0===e.call({},t)}function _tryBlock(t){var e;try{t()}catch(t){e=t}return e}function _throws(t,e,r,i){var n;if("function"!=typeof e)throw new TypeError('"block" argument must be a function');"string"==typeof r&&(i=r,r=null),n=_tryBlock(e),i=(r&&r.name?" ("+r.name+").":".")+(i?" "+i:"."),t&&!n&&fail(n,r,"Missing expected exception"+i);var a="string"==typeof i,s=!t&&n&&!r;if((!t&&util.isError(n)&&a&&expectedException(n,r)||s)&&fail(n,r,"Got unwanted exception"+i),t&&n&&r&&!expectedException(n,r)||!t&&n)throw n}function strict(t,e){t||fail(t,!0,e,"==",strict)}assert.AssertionError=function(t){this.name="AssertionError",this.actual=t.actual,this.expected=t.expected,this.operator=t.operator,t.message?(this.message=t.message,this.generatedMessage=!1):(this.message=getMessage(this),this.generatedMessage=!0);var e=t.stackStartFunction||fail;if(Error.captureStackTrace)Error.captureStackTrace(this,e);else{var r=new Error;if(r.stack){var i=r.stack,n=getName(e),a=i.indexOf("\n"+n);if(a>=0){var s=i.indexOf("\n",a+1);i=i.substring(s+1)}this.stack=i}}},util.inherits(assert.AssertionError,Error),assert.fail=fail,assert.ok=ok,assert.equal=function(t,e,r){t!=e&&fail(t,e,r,"==",assert.equal)},assert.notEqual=function(t,e,r){t==e&&fail(t,e,r,"!=",assert.notEqual)},assert.deepEqual=function(t,e,r){_deepEqual(t,e,!1)||fail(t,e,r,"deepEqual",assert.deepEqual)},assert.deepStrictEqual=function(t,e,r){_deepEqual(t,e,!0)||fail(t,e,r,"deepStrictEqual",assert.deepStrictEqual)},assert.notDeepEqual=function(t,e,r){_deepEqual(t,e,!1)&&fail(t,e,r,"notDeepEqual",assert.notDeepEqual)},assert.notDeepStrictEqual=notDeepStrictEqual,assert.strictEqual=function(t,e,r){t!==e&&fail(t,e,r,"===",assert.strictEqual)},assert.notStrictEqual=function(t,e,r){t===e&&fail(t,e,r,"!==",assert.notStrictEqual)},assert.throws=function(t,e,r){_throws(!0,t,e,r)},assert.doesNotThrow=function(t,e,r){_throws(!1,t,e,r)},assert.ifError=function(t){if(t)throw t},assert.strict=objectAssign(strict,assert,{equal:assert.strictEqual,deepEqual:assert.deepStrictEqual,notEqual:assert.notStrictEqual,notDeepEqual:assert.notDeepStrictEqual}),assert.strict.strict=assert.strict;var objectKeys=Object.keys||function(t){var e=[];for(var r in t)hasOwn.call(t,r)&&e.push(r);return e}; 4 | 5 | }).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) 6 | },{"object-assign":31,"util/":4}],2:[function(require,module,exports){ 7 | "function"==typeof Object.create?module.exports=function(t,e){t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}:module.exports=function(t,e){t.super_=e;var o=function(){};o.prototype=e.prototype,t.prototype=new o,t.prototype.constructor=t}; 8 | 9 | },{}],3:[function(require,module,exports){ 10 | module.exports=function(o){return o&&"object"==typeof o&&"function"==typeof o.copy&&"function"==typeof o.fill&&"function"==typeof o.readUInt8}; 11 | 12 | },{}],4:[function(require,module,exports){ 13 | (function (process,global){ 14 | var formatRegExp=/%[sdj%]/g;exports.format=function(e){if(!isString(e)){for(var r=[],t=0;t=i)return e;switch(e){case"%s":return String(n[t++]);case"%d":return Number(n[t++]);case"%j":try{return JSON.stringify(n[t++])}catch(e){return"[Circular]"}default:return e}}),s=n[t];t=3&&(t.depth=arguments[2]),arguments.length>=4&&(t.colors=arguments[3]),isBoolean(r)?t.showHidden=r:r&&exports._extend(t,r),isUndefined(t.showHidden)&&(t.showHidden=!1),isUndefined(t.depth)&&(t.depth=2),isUndefined(t.colors)&&(t.colors=!1),isUndefined(t.customInspect)&&(t.customInspect=!0),t.colors&&(t.stylize=stylizeWithColor),formatValue(t,e,t.depth)}function stylizeWithColor(e,r){var t=inspect.styles[r];return t?"["+inspect.colors[t][0]+"m"+e+"["+inspect.colors[t][1]+"m":e}function stylizeNoColor(e,r){return e}function arrayToHash(e){var r={};return e.forEach(function(e,t){r[e]=!0}),r}function formatValue(e,r,t){if(e.customInspect&&r&&isFunction(r.inspect)&&r.inspect!==exports.inspect&&(!r.constructor||r.constructor.prototype!==r)){var n=r.inspect(t,e);return isString(n)||(n=formatValue(e,n,t)),n}var i=formatPrimitive(e,r);if(i)return i;var o=Object.keys(r),s=arrayToHash(o);if(e.showHidden&&(o=Object.getOwnPropertyNames(r)),isError(r)&&(o.indexOf("message")>=0||o.indexOf("description")>=0))return formatError(r);if(0===o.length){if(isFunction(r)){var u=r.name?": "+r.name:"";return e.stylize("[Function"+u+"]","special")}if(isRegExp(r))return e.stylize(RegExp.prototype.toString.call(r),"regexp");if(isDate(r))return e.stylize(Date.prototype.toString.call(r),"date");if(isError(r))return formatError(r)}var c,a="",l=!1,p=["{","}"];(isArray(r)&&(l=!0,p=["[","]"]),isFunction(r))&&(a=" [Function"+(r.name?": "+r.name:"")+"]");return isRegExp(r)&&(a=" "+RegExp.prototype.toString.call(r)),isDate(r)&&(a=" "+Date.prototype.toUTCString.call(r)),isError(r)&&(a=" "+formatError(r)),0!==o.length||l&&0!=r.length?t<0?isRegExp(r)?e.stylize(RegExp.prototype.toString.call(r),"regexp"):e.stylize("[Object]","special"):(e.seen.push(r),c=l?formatArray(e,r,t,s,o):o.map(function(n){return formatProperty(e,r,t,s,n,l)}),e.seen.pop(),reduceToSingleString(c,a,p)):p[0]+a+p[1]}function formatPrimitive(e,r){if(isUndefined(r))return e.stylize("undefined","undefined");if(isString(r)){var t="'"+JSON.stringify(r).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(t,"string")}return isNumber(r)?e.stylize(""+r,"number"):isBoolean(r)?e.stylize(""+r,"boolean"):isNull(r)?e.stylize("null","null"):void 0}function formatError(e){return"["+Error.prototype.toString.call(e)+"]"}function formatArray(e,r,t,n,i){for(var o=[],s=0,u=r.length;s-1&&(u=o?u.split("\n").map(function(e){return" "+e}).join("\n").substr(2):"\n"+u.split("\n").map(function(e){return" "+e}).join("\n")):u=e.stylize("[Circular]","special")),isUndefined(s)){if(o&&i.match(/^\d+$/))return u;(s=JSON.stringify(""+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(s=s.substr(1,s.length-2),s=e.stylize(s,"name")):(s=s.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),s=e.stylize(s,"string"))}return s+": "+u}function reduceToSingleString(e,r,t){return e.reduce(function(e,r){return 0,r.indexOf("\n")>=0&&0,e+r.replace(/\u001b\[\d\d?m/g,"").length+1},0)>60?t[0]+(""===r?"":r+"\n ")+" "+e.join(",\n ")+" "+t[1]:t[0]+r+" "+e.join(", ")+" "+t[1]}function isArray(e){return Array.isArray(e)}function isBoolean(e){return"boolean"==typeof e}function isNull(e){return null===e}function isNullOrUndefined(e){return null==e}function isNumber(e){return"number"==typeof e}function isString(e){return"string"==typeof e}function isSymbol(e){return"symbol"==typeof e}function isUndefined(e){return void 0===e}function isRegExp(e){return isObject(e)&&"[object RegExp]"===objectToString(e)}function isObject(e){return"object"==typeof e&&null!==e}function isDate(e){return isObject(e)&&"[object Date]"===objectToString(e)}function isError(e){return isObject(e)&&("[object Error]"===objectToString(e)||e instanceof Error)}function isFunction(e){return"function"==typeof e}function isPrimitive(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e}function objectToString(e){return Object.prototype.toString.call(e)}function pad(e){return e<10?"0"+e.toString(10):e.toString(10)}exports.debuglog=function(e){if(isUndefined(debugEnviron)&&(debugEnviron=process.env.NODE_DEBUG||""),e=e.toUpperCase(),!debugs[e])if(new RegExp("\\b"+e+"\\b","i").test(debugEnviron)){var r=process.pid;debugs[e]=function(){var t=exports.format.apply(exports,arguments);console.error("%s %d: %s",e,r,t)}}else debugs[e]=function(){};return debugs[e]},exports.inspect=inspect,inspect.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},inspect.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},exports.isArray=isArray,exports.isBoolean=isBoolean,exports.isNull=isNull,exports.isNullOrUndefined=isNullOrUndefined,exports.isNumber=isNumber,exports.isString=isString,exports.isSymbol=isSymbol,exports.isUndefined=isUndefined,exports.isRegExp=isRegExp,exports.isObject=isObject,exports.isDate=isDate,exports.isError=isError,exports.isFunction=isFunction,exports.isPrimitive=isPrimitive,exports.isBuffer=require("./support/isBuffer");var months=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function timestamp(){var e=new Date,r=[pad(e.getHours()),pad(e.getMinutes()),pad(e.getSeconds())].join(":");return[e.getDate(),months[e.getMonth()],r].join(" ")}function hasOwnProperty(e,r){return Object.prototype.hasOwnProperty.call(e,r)}exports.log=function(){console.log("%s - %s",timestamp(),exports.format.apply(exports,arguments))},exports.inherits=require("inherits"),exports._extend=function(e,r){if(!r||!isObject(r))return e;for(var t=Object.keys(r),n=t.length;n--;)e[t[n]]=r[t[n]];return e}; 15 | 16 | }).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) 17 | },{"./support/isBuffer":3,"_process":32,"inherits":2}],5:[function(require,module,exports){ 18 | "use strict";exports.byteLength=byteLength,exports.toByteArray=toByteArray,exports.fromByteArray=fromByteArray;for(var lookup=[],revLookup=[],Arr="undefined"!=typeof Uint8Array?Uint8Array:Array,code="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",i=0,len=code.length;i0)throw new Error("Invalid string. Length must be a multiple of 4");var e=o.indexOf("=");return-1===e&&(e=r),[e,e===r?0:4-e%4]}function byteLength(o){var r=getLens(o),e=r[0],t=r[1];return 3*(e+t)/4-t}function _byteLength(o,r,e){return 3*(r+e)/4-e}function toByteArray(o){for(var r,e=getLens(o),t=e[0],n=e[1],u=new Arr(_byteLength(o,t,n)),p=0,a=n>0?t-4:t,h=0;h>16&255,u[p++]=r>>8&255,u[p++]=255&r;return 2===n&&(r=revLookup[o.charCodeAt(h)]<<2|revLookup[o.charCodeAt(h+1)]>>4,u[p++]=255&r),1===n&&(r=revLookup[o.charCodeAt(h)]<<10|revLookup[o.charCodeAt(h+1)]<<4|revLookup[o.charCodeAt(h+2)]>>2,u[p++]=r>>8&255,u[p++]=255&r),u}function tripletToBase64(o){return lookup[o>>18&63]+lookup[o>>12&63]+lookup[o>>6&63]+lookup[63&o]}function encodeChunk(o,r,e){for(var t,n=[],u=r;up?p:u+16383));return 1===t?(r=o[e-1],n.push(lookup[r>>2]+lookup[r<<4&63]+"==")):2===t&&(r=(o[e-2]<<8)+o[e-1],n.push(lookup[r>>10]+lookup[r>>4&63]+lookup[r<<2&63]+"=")),n.join("")}revLookup["-".charCodeAt(0)]=62,revLookup["_".charCodeAt(0)]=63; 19 | 20 | },{}],6:[function(require,module,exports){ 21 | (function (Buffer){ 22 | "use strict";var base64=require("base64-js"),ieee754=require("ieee754");exports.Buffer=Buffer,exports.SlowBuffer=SlowBuffer,exports.INSPECT_MAX_BYTES=50;var K_MAX_LENGTH=2147483647;function typedArraySupport(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()}catch(e){return!1}}function createBuffer(e){if(e>K_MAX_LENGTH)throw new RangeError('The value "'+e+'" is invalid for option "size"');var t=new Uint8Array(e);return t.__proto__=Buffer.prototype,t}function Buffer(e,t,r){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return allocUnsafe(e)}return from(e,t,r)}function from(e,t,r){if("string"==typeof e)return fromString(e,t);if(ArrayBuffer.isView(e))return fromArrayLike(e);if(null==e)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(isInstance(e,ArrayBuffer)||e&&isInstance(e.buffer,ArrayBuffer))return fromArrayBuffer(e,t,r);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');var n=e.valueOf&&e.valueOf();if(null!=n&&n!==e)return Buffer.from(n,t,r);var f=fromObject(e);if(f)return f;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return Buffer.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function assertSize(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function alloc(e,t,r){return assertSize(e),e<=0?createBuffer(e):void 0!==t?"string"==typeof r?createBuffer(e).fill(t,r):createBuffer(e).fill(t):createBuffer(e)}function allocUnsafe(e){return assertSize(e),createBuffer(e<0?0:0|checked(e))}function fromString(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!Buffer.isEncoding(t))throw new TypeError("Unknown encoding: "+t);var r=0|byteLength(e,t),n=createBuffer(r),f=n.write(e,t);return f!==r&&(n=n.slice(0,f)),n}function fromArrayLike(e){for(var t=e.length<0?0:0|checked(e.length),r=createBuffer(t),n=0;n=K_MAX_LENGTH)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+K_MAX_LENGTH.toString(16)+" bytes");return 0|e}function SlowBuffer(e){return+e!=e&&(e=0),Buffer.alloc(+e)}function byteLength(e,t){if(Buffer.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||isInstance(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);var r=e.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;for(var f=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return utf8ToBytes(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return base64ToBytes(e).length;default:if(f)return n?-1:utf8ToBytes(e).length;t=(""+t).toLowerCase(),f=!0}}function slowToString(e,t,r){var n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return hexSlice(this,t,r);case"utf8":case"utf-8":return utf8Slice(this,t,r);case"ascii":return asciiSlice(this,t,r);case"latin1":case"binary":return latin1Slice(this,t,r);case"base64":return base64Slice(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return utf16leSlice(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function swap(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function bidirectionalIndexOf(e,t,r,n,f){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),numberIsNaN(r=+r)&&(r=f?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(f)return-1;r=e.length-1}else if(r<0){if(!f)return-1;r=0}if("string"==typeof t&&(t=Buffer.from(t,n)),Buffer.isBuffer(t))return 0===t.length?-1:arrayIndexOf(e,t,r,n,f);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?f?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):arrayIndexOf(e,[t],r,n,f);throw new TypeError("val must be string, number or Buffer")}function arrayIndexOf(e,t,r,n,f){var i,o=1,u=e.length,s=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;o=2,u/=2,s/=2,r/=2}function a(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}if(f){var h=-1;for(i=r;iu&&(r=u-s),i=r;i>=0;i--){for(var c=!0,l=0;lf&&(n=f):n=f;var i=t.length;n>i/2&&(n=i/2);for(var o=0;o239?4:a>223?3:a>191?2:1;if(f+c<=r)switch(c){case 1:a<128&&(h=a);break;case 2:128==(192&(i=e[f+1]))&&(s=(31&a)<<6|63&i)>127&&(h=s);break;case 3:i=e[f+1],o=e[f+2],128==(192&i)&&128==(192&o)&&(s=(15&a)<<12|(63&i)<<6|63&o)>2047&&(s<55296||s>57343)&&(h=s);break;case 4:i=e[f+1],o=e[f+2],u=e[f+3],128==(192&i)&&128==(192&o)&&128==(192&u)&&(s=(15&a)<<18|(63&i)<<12|(63&o)<<6|63&u)>65535&&s<1114112&&(h=s)}null===h?(h=65533,c=1):h>65535&&(h-=65536,n.push(h>>>10&1023|55296),h=56320|1023&h),n.push(h),f+=c}return decodeCodePointsArray(n)}exports.kMaxLength=K_MAX_LENGTH,Buffer.TYPED_ARRAY_SUPPORT=typedArraySupport(),Buffer.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(Buffer.prototype,"parent",{enumerable:!0,get:function(){if(Buffer.isBuffer(this))return this.buffer}}),Object.defineProperty(Buffer.prototype,"offset",{enumerable:!0,get:function(){if(Buffer.isBuffer(this))return this.byteOffset}}),"undefined"!=typeof Symbol&&null!=Symbol.species&&Buffer[Symbol.species]===Buffer&&Object.defineProperty(Buffer,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}),Buffer.poolSize=8192,Buffer.from=function(e,t,r){return from(e,t,r)},Buffer.prototype.__proto__=Uint8Array.prototype,Buffer.__proto__=Uint8Array,Buffer.alloc=function(e,t,r){return alloc(e,t,r)},Buffer.allocUnsafe=function(e){return allocUnsafe(e)},Buffer.allocUnsafeSlow=function(e){return allocUnsafe(e)},Buffer.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==Buffer.prototype},Buffer.compare=function(e,t){if(isInstance(e,Uint8Array)&&(e=Buffer.from(e,e.offset,e.byteLength)),isInstance(t,Uint8Array)&&(t=Buffer.from(t,t.offset,t.byteLength)),!Buffer.isBuffer(e)||!Buffer.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;for(var r=e.length,n=t.length,f=0,i=Math.min(r,n);ft&&(e+=" ... "),""},Buffer.prototype.compare=function(e,t,r,n,f){if(isInstance(e,Uint8Array)&&(e=Buffer.from(e,e.offset,e.byteLength)),!Buffer.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===f&&(f=this.length),t<0||r>e.length||n<0||f>this.length)throw new RangeError("out of range index");if(n>=f&&t>=r)return 0;if(n>=f)return-1;if(t>=r)return 1;if(this===e)return 0;for(var i=(f>>>=0)-(n>>>=0),o=(r>>>=0)-(t>>>=0),u=Math.min(i,o),s=this.slice(n,f),a=e.slice(t,r),h=0;h>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var f=this.length-t;if((void 0===r||r>f)&&(r=f),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var i=!1;;)switch(n){case"hex":return hexWrite(this,e,t,r);case"utf8":case"utf-8":return utf8Write(this,e,t,r);case"ascii":return asciiWrite(this,e,t,r);case"latin1":case"binary":return latin1Write(this,e,t,r);case"base64":return base64Write(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ucs2Write(this,e,t,r);default:if(i)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),i=!0}},Buffer.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var MAX_ARGUMENTS_LENGTH=4096;function decodeCodePointsArray(e){var t=e.length;if(t<=MAX_ARGUMENTS_LENGTH)return String.fromCharCode.apply(String,e);for(var r="",n=0;nn)&&(r=n);for(var f="",i=t;ir)throw new RangeError("Trying to access beyond buffer length")}function checkInt(e,t,r,n,f,i){if(!Buffer.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>f||te.length)throw new RangeError("Index out of range")}function checkIEEE754(e,t,r,n,f,i){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function writeFloat(e,t,r,n,f){return t=+t,r>>>=0,f||checkIEEE754(e,t,r,4,3.4028234663852886e38,-3.4028234663852886e38),ieee754.write(e,t,r,n,23,4),r+4}function writeDouble(e,t,r,n,f){return t=+t,r>>>=0,f||checkIEEE754(e,t,r,8,1.7976931348623157e308,-1.7976931348623157e308),ieee754.write(e,t,r,n,52,8),r+8}Buffer.prototype.slice=function(e,t){var r=this.length;(e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t>>=0,t>>>=0,r||checkOffset(e,t,this.length);for(var n=this[e],f=1,i=0;++i>>=0,t>>>=0,r||checkOffset(e,t,this.length);for(var n=this[e+--t],f=1;t>0&&(f*=256);)n+=this[e+--t]*f;return n},Buffer.prototype.readUInt8=function(e,t){return e>>>=0,t||checkOffset(e,1,this.length),this[e]},Buffer.prototype.readUInt16LE=function(e,t){return e>>>=0,t||checkOffset(e,2,this.length),this[e]|this[e+1]<<8},Buffer.prototype.readUInt16BE=function(e,t){return e>>>=0,t||checkOffset(e,2,this.length),this[e]<<8|this[e+1]},Buffer.prototype.readUInt32LE=function(e,t){return e>>>=0,t||checkOffset(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},Buffer.prototype.readUInt32BE=function(e,t){return e>>>=0,t||checkOffset(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},Buffer.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||checkOffset(e,t,this.length);for(var n=this[e],f=1,i=0;++i=(f*=128)&&(n-=Math.pow(2,8*t)),n},Buffer.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||checkOffset(e,t,this.length);for(var n=t,f=1,i=this[e+--n];n>0&&(f*=256);)i+=this[e+--n]*f;return i>=(f*=128)&&(i-=Math.pow(2,8*t)),i},Buffer.prototype.readInt8=function(e,t){return e>>>=0,t||checkOffset(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},Buffer.prototype.readInt16LE=function(e,t){e>>>=0,t||checkOffset(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},Buffer.prototype.readInt16BE=function(e,t){e>>>=0,t||checkOffset(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},Buffer.prototype.readInt32LE=function(e,t){return e>>>=0,t||checkOffset(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},Buffer.prototype.readInt32BE=function(e,t){return e>>>=0,t||checkOffset(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},Buffer.prototype.readFloatLE=function(e,t){return e>>>=0,t||checkOffset(e,4,this.length),ieee754.read(this,e,!0,23,4)},Buffer.prototype.readFloatBE=function(e,t){return e>>>=0,t||checkOffset(e,4,this.length),ieee754.read(this,e,!1,23,4)},Buffer.prototype.readDoubleLE=function(e,t){return e>>>=0,t||checkOffset(e,8,this.length),ieee754.read(this,e,!0,52,8)},Buffer.prototype.readDoubleBE=function(e,t){return e>>>=0,t||checkOffset(e,8,this.length),ieee754.read(this,e,!1,52,8)},Buffer.prototype.writeUIntLE=function(e,t,r,n){(e=+e,t>>>=0,r>>>=0,n)||checkInt(this,e,t,r,Math.pow(2,8*r)-1,0);var f=1,i=0;for(this[t]=255&e;++i>>=0,r>>>=0,n)||checkInt(this,e,t,r,Math.pow(2,8*r)-1,0);var f=r-1,i=1;for(this[t+f]=255&e;--f>=0&&(i*=256);)this[t+f]=e/i&255;return t+r},Buffer.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||checkInt(this,e,t,1,255,0),this[t]=255&e,t+1},Buffer.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||checkInt(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},Buffer.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||checkInt(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},Buffer.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||checkInt(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},Buffer.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||checkInt(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},Buffer.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t>>>=0,!n){var f=Math.pow(2,8*r-1);checkInt(this,e,t,r,f-1,-f)}var i=0,o=1,u=0;for(this[t]=255&e;++i>0)-u&255;return t+r},Buffer.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t>>>=0,!n){var f=Math.pow(2,8*r-1);checkInt(this,e,t,r,f-1,-f)}var i=r-1,o=1,u=0;for(this[t+i]=255&e;--i>=0&&(o*=256);)e<0&&0===u&&0!==this[t+i+1]&&(u=1),this[t+i]=(e/o>>0)-u&255;return t+r},Buffer.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||checkInt(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},Buffer.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||checkInt(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},Buffer.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||checkInt(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},Buffer.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||checkInt(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},Buffer.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||checkInt(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},Buffer.prototype.writeFloatLE=function(e,t,r){return writeFloat(this,e,t,!0,r)},Buffer.prototype.writeFloatBE=function(e,t,r){return writeFloat(this,e,t,!1,r)},Buffer.prototype.writeDoubleLE=function(e,t,r){return writeDouble(this,e,t,!0,r)},Buffer.prototype.writeDoubleBE=function(e,t,r){return writeDouble(this,e,t,!1,r)},Buffer.prototype.copy=function(e,t,r,n){if(!Buffer.isBuffer(e))throw new TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t=0;--i)e[i+t]=this[i+r];else Uint8Array.prototype.set.call(e,this.subarray(r,n),t);return f},Buffer.prototype.fill=function(e,t,r,n){if("string"==typeof e){if("string"==typeof t?(n=t,t=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!Buffer.isEncoding(n))throw new TypeError("Unknown encoding: "+n);if(1===e.length){var f=e.charCodeAt(0);("utf8"===n&&f<128||"latin1"===n)&&(e=f)}}else"number"==typeof e&&(e&=255);if(t<0||this.length>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(i=t;i55295&&r<57344){if(!f){if(r>56319){(t-=3)>-1&&i.push(239,191,189);continue}if(o+1===n){(t-=3)>-1&&i.push(239,191,189);continue}f=r;continue}if(r<56320){(t-=3)>-1&&i.push(239,191,189),f=r;continue}r=65536+(f-55296<<10|r-56320)}else f&&(t-=3)>-1&&i.push(239,191,189);if(f=null,r<128){if((t-=1)<0)break;i.push(r)}else if(r<2048){if((t-=2)<0)break;i.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;i.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;i.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return i}function asciiToBytes(e){for(var t=[],r=0;r>8,f=r%256,i.push(f),i.push(n);return i}function base64ToBytes(e){return base64.toByteArray(base64clean(e))}function blitBuffer(e,t,r,n){for(var f=0;f=t.length||f>=e.length);++f)t[f+r]=e[f];return f}function isInstance(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function numberIsNaN(e){return e!=e} 23 | 24 | }).call(this,require("buffer").Buffer) 25 | },{"base64-js":5,"buffer":6,"ieee754":13}],7:[function(require,module,exports){ 26 | var assert=require("assert"),LRU=require("nanolru");function ChooComponentCache(e,o,t){assert.ok(this instanceof ChooComponentCache,"ChooComponentCache should be created with `new`"),assert.equal(typeof e,"object","ChooComponentCache: state should be type object"),assert.equal(typeof o,"function","ChooComponentCache: emit should be type function"),this.cache="number"==typeof t?new LRU(t):t||new LRU(100),this.state=e,this.emit=o}function newCall(e){return new(e.bind.apply(e,arguments))}module.exports=ChooComponentCache,ChooComponentCache.prototype.render=function(e,o){assert.equal(typeof e,"function","ChooComponentCache.render: Component should be type function"),assert.ok("string"==typeof o||"number"==typeof o,"ChooComponentCache.render: id should be type string or type number");var t=this.cache.get(o);if(!t){for(var n=[],h=2,s=arguments.length;h is not the same type as the new node <"+o.nodeName.toLowerCase()+">.");var n=nanotiming("choo.morph");nanomorph(e._tree,o),n(),t()})),documentReady(function(){e.emitter.emit(e._events.DOMCONTENTLOADED),e._loaded=!0}),this._tree},Choo.prototype.mount=function(e){if("object"!=typeof window)return assert.ok("string"==typeof e,"choo.mount: selector should be type String"),this.selector=e,this;assert.ok("string"==typeof e||"object"==typeof e,"choo.mount: selector should be type String or HTMLElement");var t=this;documentReady(function(){var o=nanotiming("choo.render"),n=t.start();t._tree="string"==typeof e?document.querySelector(e):e,assert.ok(t._tree,"choo.mount: could not query selector: "+e),assert.equal(t._tree.nodeName,n.nodeName,"choo.mount: The target node <"+t._tree.nodeName.toLowerCase()+"> is not the same type as the new node <"+n.nodeName.toLowerCase()+">.");var r=nanotiming("choo.morph");nanomorph(t._tree,n),r(),o()})},Choo.prototype.toString=function(e,t){this.state=xtend(this.state,t||{}),assert.notEqual(typeof window,"object","choo.mount: window was found. .toString() must be called in Node, use .start() or .mount() if running in the browser"),assert.equal(typeof e,"string","choo.toString: location should be type string"),assert.equal(typeof this.state,"object","choo.toString: state should be type object");var o=this;this._setCache(this.state),this._stores.forEach(function(e){e(o.state)}),this._matchRoute(e);var n=this._prerender(this.state);return assert.ok(n,"choo.toString: no valid value returned for the route "+e),assert(!Array.isArray(n),"choo.toString: return value was an array for the route "+e),"string"==typeof n.outerHTML?n.outerHTML:n.toString()},Choo.prototype._matchRoute=function(e){var t,o;e?(t=e.replace(/\?.+$/,"").replace(/\/$/,""),this._hashEnabled||(t=t.replace(/#.+$/,"")),o=e):(t=window.location.pathname.replace(/\/$/,""),this._hashEnabled&&(t+=window.location.hash.replace(/^#/,"/")),o=window.location.search);var n=this.router.match(t);return this._handler=n.cb,this.state.href=t,this.state.query=nanoquery(o),this.state.route=n.route,this.state.params=n.params,this.state},Choo.prototype._prerender=function(e){var t=nanotiming("choo.prerender('"+e.route+"')"),o=this._handler(e,this.emit);return t(),o},Choo.prototype._setCache=function(e){var t=new Cache(e,this.emitter.emit.bind(this.emitter),this._cache);function o(e,o){assert.equal(typeof e,"function","choo.state.cache: Component should be type function");for(var n=[],r=0,s=arguments.length;r1&&(f.pop(),f[f.length-1][0][2][a]=T(p[0],p[1],p[2].length?p[2]:void 0))}else if(u===OPEN){var g=[l[1],{},[]];p[2].push(g),f.push([g,p[2].length-1])}else if(u===ATTR_KEY||u===VAR&&l[1]===ATTR_KEY){for(var L,V="";_1&&/^\s*$/.test(i[2][0])&&i[2].shift(),i[2].length>2||2===i[2].length&&/\S/.test(i[2][1])){if(e.createFragment)return e.createFragment(i[2]);throw new Error("multiple root elements must be wrapped in an enclosing tag")}return Array.isArray(i[2][0])&&"string"==typeof i[2][0][0]&&Array.isArray(i[2][0][2])&&(i[2][0]=T(i[2][0][0],i[2][0][1],i[2][0][2])),i[2][0];function U(T){var A=[];n===ATTR_VALUE_W&&(n=ATTR);for(var t=0;t"!==E||quot(n)||n===COMMENT?n===COMMENT&&/-$/.test(r)&&"-"===E?(e.comments&&A.push([ATTR_VALUE,r.substr(0,r.length-1)]),r="",n=TEXT):n===OPEN&&/^!--$/.test(r)?(e.comments&&A.push([OPEN,r],[ATTR_KEY,"comment"],[ATTR_EQ]),r=E,n=COMMENT):n===TEXT||n===COMMENT?r+=E:n===OPEN&&"/"===E&&r.length||(n===OPEN&&/\s/.test(E)?(r.length&&A.push([OPEN,r]),r="",n=ATTR):n===OPEN?r+=E:n===ATTR&&/[^\s"'=\/]/.test(E)?(n=ATTR_KEY,r=E):n===ATTR&&/\s/.test(E)?(r.length&&A.push([ATTR_KEY,r]),A.push([ATTR_BREAK])):n===ATTR_KEY&&/\s/.test(E)?(A.push([ATTR_KEY,r]),r="",n=ATTR_KEY_W):n===ATTR_KEY&&"="===E?(A.push([ATTR_KEY,r],[ATTR_EQ]),r="",n=ATTR_VALUE_W):n===ATTR_KEY?r+=E:n!==ATTR_KEY_W&&n!==ATTR||"="!==E?n!==ATTR_KEY_W&&n!==ATTR||/\s/.test(E)?n===ATTR_VALUE_W&&'"'===E?n=ATTR_VALUE_DQ:n===ATTR_VALUE_W&&"'"===E?n=ATTR_VALUE_SQ:n===ATTR_VALUE_DQ&&'"'===E?(A.push([ATTR_VALUE,r],[ATTR_BREAK]),r="",n=ATTR):n===ATTR_VALUE_SQ&&"'"===E?(A.push([ATTR_VALUE,r],[ATTR_BREAK]),r="",n=ATTR):n!==ATTR_VALUE_W||/\s/.test(E)?n===ATTR_VALUE&&/\s/.test(E)?(A.push([ATTR_VALUE,r],[ATTR_BREAK]),r="",n=ATTR):n!==ATTR_VALUE&&n!==ATTR_VALUE_SQ&&n!==ATTR_VALUE_DQ||(r+=E):(n=ATTR_VALUE,t--):(A.push([ATTR_BREAK]),/[\w-]/.test(E)?(r+=E,n=ATTR_KEY):n=ATTR):(A.push([ATTR_EQ]),n=ATTR_VALUE_W)):(n===OPEN&&r.length?A.push([OPEN,r]):n===ATTR_KEY?A.push([ATTR_KEY,r]):n===ATTR_VALUE&&r.length&&A.push([ATTR_VALUE,r]),A.push([CLOSE]),r="",n=TEXT)}return n===TEXT&&r.length?(A.push([TEXT,r]),r=""):n===ATTR_VALUE&&r.length?(A.push([ATTR_VALUE,r]),r=""):n===ATTR_VALUE_DQ&&r.length?(A.push([ATTR_VALUE,r]),r=""):n===ATTR_VALUE_SQ&&r.length?(A.push([ATTR_VALUE,r]),r=""):n===ATTR_KEY&&(A.push([ATTR_KEY,r]),r=""),A}};function t(T){return"function"==typeof T?T:"string"==typeof T?T:T&&"object"==typeof T?T:null==T?T:A("",T)}};var closeRE=RegExp("^("+["area","base","basefont","bgsound","br","col","command","embed","frame","hr","img","input","isindex","keygen","link","meta","param","source","track","wbr","!--","animate","animateTransform","circle","cursor","desc","ellipse","feBlend","feColorMatrix","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","font-face-format","font-face-name","font-face-uri","glyph","glyphRef","hkern","image","line","missing-glyph","mpath","path","polygon","polyline","rect","set","stop","tref","use","view","vkern"].join("|")+")(?:[.#][a-zA-Z0-9-￿_:-]+)*$");function selfClosing(T){return closeRE.test(T)} 42 | 43 | },{"hyperscript-attribute-to-property":11}],13:[function(require,module,exports){ 44 | exports.read=function(a,o,t,r,h){var M,p,w=8*h-r-1,f=(1<>1,i=-7,N=t?h-1:0,n=t?-1:1,s=a[o+N];for(N+=n,M=s&(1<<-i)-1,s>>=-i,i+=w;i>0;M=256*M+a[o+N],N+=n,i-=8);for(p=M&(1<<-i)-1,M>>=-i,i+=r;i>0;p=256*p+a[o+N],N+=n,i-=8);if(0===M)M=1-e;else{if(M===f)return p?NaN:1/0*(s?-1:1);p+=Math.pow(2,r),M-=e}return(s?-1:1)*p*Math.pow(2,M-r)},exports.write=function(a,o,t,r,h,M){var p,w,f,e=8*M-h-1,i=(1<>1,n=23===h?Math.pow(2,-24)-Math.pow(2,-77):0,s=r?0:M-1,u=r?1:-1,l=o<0||0===o&&1/o<0?1:0;for(o=Math.abs(o),isNaN(o)||o===1/0?(w=isNaN(o)?1:0,p=i):(p=Math.floor(Math.log(o)/Math.LN2),o*(f=Math.pow(2,-p))<1&&(p--,f*=2),(o+=p+N>=1?n/f:n*Math.pow(2,1-N))*f>=2&&(p++,f/=2),p+N>=i?(w=0,p=i):p+N>=1?(w=(o*f-1)*Math.pow(2,h),p+=N):(w=o*Math.pow(2,N-1)*Math.pow(2,h),p=0));h>=8;a[t+s]=255&w,s+=u,w/=256,h-=8);for(p=p<0;a[t+s]=255&p,s+=u,p/=256,e-=8);a[t+s-u]|=128*l}; 45 | 46 | },{}],14:[function(require,module,exports){ 47 | function equal(s,t,r){assert(s==t,r)}function notEqual(s,t,r){assert(s!=t,r)}function notOk(s,t){assert(!s,t)}function assert(s,t){if(!s)throw new Error(t||"AssertionError")}assert.notEqual=notEqual,assert.notOk=notOk,assert.equal=equal,assert.ok=assert,module.exports=assert; 48 | 49 | },{}],15:[function(require,module,exports){ 50 | var splice=require("remove-array-items"),nanotiming=require("nanotiming"),assert=require("assert");function Nanobus(e){if(!(this instanceof Nanobus))return new Nanobus(e);this._name=e||"nanobus",this._starListeners=[],this._listeners={}}module.exports=Nanobus,Nanobus.prototype.emit=function(e){assert.ok("string"==typeof e||"symbol"==typeof e,"nanobus.emit: eventName should be type string or symbol");for(var t=[],s=1,n=arguments.length;s0&&this._emit(this._listeners[e],t),this._starListeners.length>0&&this._emit(this._starListeners,e,t,i.uuid),i(),this},Nanobus.prototype.on=Nanobus.prototype.addListener=function(e,t){return assert.ok("string"==typeof e||"symbol"==typeof e,"nanobus.on: eventName should be type string or symbol"),assert.equal(typeof t,"function","nanobus.on: listener should be type function"),"*"===e?this._starListeners.push(t):(this._listeners[e]||(this._listeners[e]=[]),this._listeners[e].push(t)),this},Nanobus.prototype.prependListener=function(e,t){return assert.ok("string"==typeof e||"symbol"==typeof e,"nanobus.prependListener: eventName should be type string or symbol"),assert.equal(typeof t,"function","nanobus.prependListener: listener should be type function"),"*"===e?this._starListeners.unshift(t):(this._listeners[e]||(this._listeners[e]=[]),this._listeners[e].unshift(t)),this},Nanobus.prototype.once=function(e,t){assert.ok("string"==typeof e||"symbol"==typeof e,"nanobus.once: eventName should be type string or symbol"),assert.equal(typeof t,"function","nanobus.once: listener should be type function");var s=this;return this.on(e,function n(){t.apply(s,arguments);s.removeListener(e,n)}),this},Nanobus.prototype.prependOnceListener=function(e,t){assert.ok("string"==typeof e||"symbol"==typeof e,"nanobus.prependOnceListener: eventName should be type string or symbol"),assert.equal(typeof t,"function","nanobus.prependOnceListener: listener should be type function");var s=this;return this.prependListener(e,function n(){t.apply(s,arguments);s.removeListener(e,n)}),this},Nanobus.prototype.removeListener=function(e,t){return assert.ok("string"==typeof e||"symbol"==typeof e,"nanobus.removeListener: eventName should be type string or symbol"),assert.equal(typeof t,"function","nanobus.removeListener: listener should be type function"),"*"===e?(this._starListeners=this._starListeners.slice(),s(this._starListeners,t)):(void 0!==this._listeners[e]&&(this._listeners[e]=this._listeners[e].slice()),s(this._listeners[e],t));function s(e,t){if(e){var s=e.indexOf(t);return-1!==s?(splice(e,s,1),!0):void 0}}},Nanobus.prototype.removeAllListeners=function(e){return e?"*"===e?this._starListeners=[]:this._listeners[e]=[]:(this._starListeners=[],this._listeners={}),this},Nanobus.prototype.listeners=function(e){var t="*"!==e?this._listeners[e]:this._starListeners,s=[];if(t)for(var n=t.length,i=0;ithis.maxAge)||(this.remove(t),!1)},LRU.prototype.get=function(t){if("string"!=typeof t&&(t=""+t),this.cache.hasOwnProperty(t)){var e=this.cache[t];if(this._checkAge(t,e))return this.head!==t&&(t===this.tail?(this.tail=e.next,this.cache[this.tail].prev=null):this.cache[e.prev].next=e.next,this.cache[e.next].prev=e.prev,this.cache[this.head].next=t,e.prev=this.head,e.next=null,this.head=t),e.value}},LRU.prototype.evict=function(){this.tail&&this.remove(this.tail)}; 72 | 73 | },{}],23:[function(require,module,exports){ 74 | var assert=require("nanoassert"),morph=require("./lib/morph"),TEXT_NODE=3;function nanomorph(e,o,n){return assert.equal(typeof e,"object","nanomorph: oldTree should be an object"),assert.equal(typeof o,"object","nanomorph: newTree should be an object"),n&&n.childrenOnly?(updateChildren(o,e),e):(assert.notEqual(o.nodeType,11,"nanomorph: newTree should have one root node (which is not a DocumentFragment)"),walk(o,e))}function walk(e,o){return o?e?e.isSameNode&&e.isSameNode(o)?o:e.tagName!==o.tagName||getComponentId(e)!==getComponentId(o)?e:(morph(e,o),updateChildren(e,o),o):null:e}function getComponentId(e){return e.dataset?e.dataset.nanomorphComponentId:void 0}function updateChildren(e,o){for(var n,a,r,t,d=0,l=0;n=o.childNodes[l],a=e.childNodes[l-d],n||a;l++)if(a)if(n)if(same(a,n))(r=walk(a,n))!==n&&(o.replaceChild(r,n),d++);else{t=null;for(var i=l;i=0;--o)l=(i=a[o]).name,r=i.namespaceURI,n=i.value,r?(l=i.localName||l,t.getAttributeNS(r,l)!==n&&t.setAttributeNS(r,l,n)):t.hasAttribute(l)?t.getAttribute(l)!==n&&("null"===n||"undefined"===n?t.removeAttribute(l):t.setAttribute(l,n)):t.setAttribute(l,n);for(var v=u.length-1;v>=0;--v)!1!==(i=u[v]).specified&&(l=i.name,(r=i.namespaceURI)?(l=i.localName||l,e.hasAttributeNS(r,l)||t.removeAttributeNS(r,l)):e.hasAttributeNS(null,l)||t.removeAttribute(l))}function copyEvents(e,t){for(var u=0;u0;)e.queue.shift()(n);e.scheduled=!1,e.queue.length&&e.schedule()})}},NanoScheduler.prototype.setTimeout=function(e){setTimeout(e,0,{timeRemaining:function(){return 1}})},module.exports=createScheduler; 93 | 94 | },{"assert":14}],30:[function(require,module,exports){ 95 | var perf,scheduler=require("nanoscheduler")(),assert=require("assert");nanotiming.disabled=!0;try{perf=window.performance,nanotiming.disabled="true"===window.localStorage.DISABLE_NANOTIMING||!perf.mark}catch(r){}function nanotiming(r){if(assert.equal(typeof r,"string","nanotiming: name should be type string"),nanotiming.disabled)return noop;var e=(1e4*perf.now()).toFixed()%Number.MAX_SAFE_INTEGER,n="start-"+e+"-"+r;function a(a){var i="end-"+e+"-"+r;perf.mark(i),scheduler.push(function(){var t=null;try{var o=r+" ["+e+"]";perf.measure(o,n,i),perf.clearMarks(n),perf.clearMarks(i)}catch(r){t=r}a&&a(t,r)})}return perf.mark(n),a.uuid=e,a}function noop(r){r&&scheduler.push(function(){r(new Error("nanotiming: performance API unavailable"))})}module.exports=nanotiming; 96 | 97 | },{"assert":14,"nanoscheduler":29}],31:[function(require,module,exports){ 98 | "use strict";var getOwnPropertySymbols=Object.getOwnPropertySymbols,hasOwnProperty=Object.prototype.hasOwnProperty,propIsEnumerable=Object.prototype.propertyIsEnumerable;function toObject(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}function shouldUseNative(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var r={},t=0;t<10;t++)r["_"+String.fromCharCode(t)]=t;if("0123456789"!==Object.getOwnPropertyNames(r).map(function(e){return r[e]}).join(""))return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach(function(e){n[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},n)).join("")}catch(e){return!1}}module.exports=shouldUseNative()?Object.assign:function(e,r){for(var t,n,o=toObject(e),a=1;a1)for(var r=1;r=o||0===r)){var f=o-(r=e+r>o?o-e:r);for(n=e;nIt seems that this application requires IPFS Companion to be installed. Click here to install it!";var t=document.createElement("span");return t.style.border="1px solid rgba(255, 255, 255, 0.3)",t.style.padding="0.3rem",t.style.borderRadius="2px",t.style.color="rgba(255, 255, 255, 0.8)",t.style.fontSize="0.8rem",t.style.marginLeft="auto",t.innerText="Close",t.addEventListener("click",t=>{t.preventDefault(),t.stopPropagation(),document.body.removeChild(e)}),e.appendChild(t),document.body.appendChild(e),!1}"undefined"!=typeof exports?module.exports=verify:document.addEventListener("DOMContentLoaded",()=>{verify()}); 117 | 118 | },{}],38:[function(require,module,exports){ 119 | module.exports=extend;var hasOwnProperty=Object.prototype.hasOwnProperty;function extend(){for(var r={},e=0;e 130 |
131 |

Your ToDos

132 |
133 | 134 | ${e.error?html` 135 |
136 |

${e.error.message}

137 |
138 | `:null} 139 | 140 | 144 | 145 |
    146 | ${e.todos.map((e,a)=>html` 147 |
  • 148 | 152 | ${e} 153 |
  • 154 | `)} 155 |
156 | 157 | `}module.exports=page; 158 | 159 | },{"choo/html":8}],42:[function(require,module,exports){ 160 | (function (Buffer){ 161 | "use strict";const ipfsRequired=require("window.ipfs-is-required"),FILE="/todos.json";function store(e,o){let r=null;e.todos=[],e.error=null;const t=async()=>{const o=JSON.stringify(e.todos),t=Buffer.from(o);try{await r.files.write(FILE,t,{create:!0,truncate:!0})}catch(o){e.error=o}};o.on("DOMContentLoaded",async()=>{if(!ipfsRequired())return e.error=new Error("You do not have IPFS Companion installed."),void o.emit("render");try{r=await window.ipfs.enable({commands:["files"]})}catch(o){e.error=o}try{const n=(await r.files.read(FILE)).toString();e.todos=JSON.parse(n),o.emit("render")}catch(e){t()}}),o.on("addTodo",r=>{e.todos.push(r),o.emit("render"),t()}),o.on("removeTodo",r=>{e.todos.splice(r,1),o.emit("render"),t()})}module.exports=store; 162 | 163 | }).call(this,require("buffer").Buffer) 164 | },{"buffer":6,"window.ipfs-is-required":37}]},{},[40]); 165 | --------------------------------------------------------------------------------