diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 00000000..ffd9e417 Binary files /dev/null and b/.DS_Store differ diff --git a/app.css b/app.css index bc7c9b7f..1e81c085 100644 --- a/app.css +++ b/app.css @@ -1,7 +1,8 @@ /* General Styles */ + body { background: rgb(111, 208, 224); - background: linear-gradient(0deg,rgb(111, 208, 224) 0%, rgb(171, 228, 167) 100%); + background: linear-gradient(0deg, rgb(111, 208, 224) 0%, rgb(171, 228, 167) 100%); font-family: 'Open Sans', sans-serif; text-align: center; min-height: 100vh; @@ -35,13 +36,15 @@ p { font-weight: 100; } + /* Grid Styles */ + #grid { background: #fff url(images/tracks.png) no-repeat; background-size: cover; display: flex; margin: 2em; - box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24); + box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24); flex-wrap: wrap; } @@ -51,39 +54,39 @@ p { width: 100%; } -.grid-item:nth-child(1){ +.grid-item:nth-child(1) { background: #009687f5; } -.grid-item:nth-child(2){ +.grid-item:nth-child(2) { background: #dc7657f5; } -.grid-item:nth-child(3){ +.grid-item:nth-child(3) { background: #4bb3c1fa; } -.grid-item:nth-child(4){ +.grid-item:nth-child(4) { background: #fac069f9; } -.grid-item:nth-child(5){ +.grid-item:nth-child(5) { background: #67a866f9; } -.grid-item:nth-child(6){ +.grid-item:nth-child(6) { background: #b94169fa; } -.grid-item:nth-child(7){ +.grid-item:nth-child(7) { background: #7f62b3fa; } -.grid-item:nth-child(8){ +.grid-item:nth-child(8) { background: #9fc376f9; } -.grid-item:nth-child(9){ +.grid-item:nth-child(9) { background: #677bcbfa; } @@ -104,19 +107,21 @@ p { } .grid-item p { - background: rgba(000,000,000, .3); + background: rgba(000, 000, 000, .3); position: absolute; bottom: 0; width: 100%; padding: 0.8em 0.8em 1.8em; - margin:0; + margin: 0; box-sizing: border-box; font-size: 1.2em; font-weight: 600; color: #fff; } + /* Form Styles */ + .form-container { background: #eee; padding: 1.3em; @@ -167,7 +172,9 @@ select { cursor: pointer; } + /* Footer */ + .fine-print { display: block; font-size: 0.7em; diff --git a/app.js b/app.js index 36c871d0..6b9234d9 100644 --- a/app.js +++ b/app.js @@ -1,32 +1,288 @@ +const data = [ - // Create Dino Constructor + { + "species": "Triceratops", + "weight": 13000, + "height": 114, + "diet": "herbavor", + "where": "North America", + "when": "Late Cretaceous", + "fact": "First discovered in 1889 by Othniel Charles Marsh" + }, + { + "species": "Tyrannosaurus Rex", + "weight": 11905, + "height": 144, + "diet": "carnivor", + "where": "North America", + "when": "Late Cretaceous", + "fact": "The largest known skull measures in at 5 feet long." + }, + { + "species": "Anklyosaurus", + "weight": 10500, + "height": 55, + "diet": "herbavor", + "where": "North America", + "when": "Late Cretaceous", + "fact": "Anklyosaurus survived for approximately 135 million years." + }, + { + "species": "Brachiosaurus", + "weight": 70000, + "height": "372", + "diet": "herbavor", + "where": "North America", + "when": "Late Jurasic", + "fact": "An asteroid was named 9954 Brachiosaurus in 1991." + }, + { + "species": "Stegosaurus", + "weight": 11600, + "height": 79, + "diet": "herbavor", + "where": "North America, Europe, Asia", + "when": "Late Jurasic to Early Cretaceous", + "fact": "The Stegosaurus had between 17 and 22 seperate places and flat spines." + }, + { + "species": "Elasmosaurus", + "weight": 16000, + "height": 59, + "diet": "carnivor", + "where": "North America", + "when": "Late Cretaceous", + "fact": "Elasmosaurus was a marine reptile first discovered in Kansas." + }, + { + "species": "Pteranodon", + "weight": 44, + "height": 20, + "diet": "carnivor", + "where": "North America", + "when": "Late Cretaceous", + "fact": "Actually a flying reptile, the Pteranodon is not a dinosaur." + }, + { + "species": "Pigeon", + "weight": 0.5, + "height": 9, + "diet": "herbavor", + "where": "World Wide", + "when": "Holocene", + "fact": "All birds are living dinosaurs." + } +] +const button = document.getElementById("btn"); +const container = document.getElementById("grid"); - // Create Dino Objects - +// Create Dino Constructor +function Dinosaur(species, weight, height, diet, where, when, fact) { + this.species = species; + this.weight = weight; + this.height = height; + this.diet = diet; + this.where = where; + this.when = when; + this.fact = fact; + // this.getHeightDif = function() { + + // if (human.height < this.height) { + // console.log("human shorter") + // return `${human.name} is ${this.height - human.height} inches shorter than ${this.species}!`; + // } else(human.height > this.height) + // { + // console.log("human taller") + // return `${human.name} is ${this.height - human.height} inches taller than ${this.species}!`; + + // } + + // }; + - // Create Human Object +} - // Use IIFE to get human data from form +// Create Dino Objects +const dinosaur = data.map((data) => + new Dinosaur( + data.species, + data.weight, + data.height, + data.diet, + data.where, + data.when, + data.fact + )) +Dinosaur.prototype.compareHeight= function compareHeight(human){ + - // Create Dino Compare Method 1 - // NOTE: Weight in JSON file is in lbs, height in inches. + if(human.height +

${shuffledboard[i].species}

+ image of ${shuffledboard[i].species} +

+ ${shuffledboard[i].fact} +

+ + ` + break; + - // Remove form from screen + case 2: + console.log("Case 2: compareHeight") + grid.innerHTML += ` +
+

${shuffledboard[i].species}

+ image of ${shuffledboard[i].species} +

+ ${shuffledboard[i].compareHeight(human)} +

+
` + + break; + case 3: + console.log("Case 3: compareWeight") + grid.innerHTML += ` +
+

${shuffledboard[i].species}

+ image of ${shuffledboard[i].species} +

+ ${shuffledboard[i].compareWeight(human)} +

+
` + + break; + + case 4: + console.log("Case 4: compareDiet") + grid.innerHTML += ` +
+

${shuffledboard[i].species}

+ image of ${shuffledboard[i].species} +

+ ${shuffledboard[i].compareDiet(human)} +

+
+ ` + break; + } + } + + else if (i == 4) { + grid.innerHTML += ` +
+

${human.name}

+ image of ${human.species} +
+ + ` + } + + else if (shuffledboard[i].species == "Pigeon") { + + grid.innerHTML += ` +
+

${shuffledboard[i].species}

+ image of ${shuffledboard[i].species} +

${shuffledboard[i].fact}

+
+ + ` + } + + + } + // grid.innerHTML += ` + //
+ //

${shuffledboard[i].species}

+ // image of ${shuffledboard[i].species} + //

+ + + // ${shuffledboard[i].fact} + // ${shuffledboard[i].compareHeight(human)} + // ${shuffledboard[i].compareWeight(human)} + // ${shuffledboard[i].compareDiet(human)} + //

+ //
+ + // ` + +} + + +button.addEventListener("click", function(e) { + e.preventDefault(); + document.getElementById("dino-compare").style.display = "none"; + dinoTiles() + +}) -// On button click, prepare and display infographic diff --git a/index.html b/index.html index 0f18eef3..fcf85d6c 100644 --- a/index.html +++ b/index.html @@ -1,5 +1,6 @@ + @@ -13,9 +14,10 @@ +
-

Natural History Museum

+

Natural History Museum

Dinosaurs

How do you compare?

@@ -31,9 +33,9 @@

How do you compare?

Diet:

Compare Me!
@@ -45,4 +47,5 @@

How do you compare?

Data Sourced from Wikipedia.org, all numbers are approximations.

+ \ No newline at end of file diff --git a/makeGrid b/makeGrid new file mode 100644 index 00000000..35368ae2 --- /dev/null +++ b/makeGrid @@ -0,0 +1,36 @@ +function formSubmit(event) { + event.preventDefault(); + let grid = document.getElementById('pixelCanvas'); + grid.innerHTML = ""; + console.log('grid cleared'); + + // Select size input + var gridHeight = document.getElementById("inputHeight").value; + var gridWidth = document.getElementById("inputWidth").value; + makeGrid(gridHeight, gridWidth); +}; + +// Grid Creation Loop +function makeGrid(rows, columns) { + // Select color input + var colorChoice = document.getElementById("colorPicker").value; + // Select size input + var gridHeight = document.getElementById("inputHeight").value; + var gridWidth = document.getElementById("inputWidth").value; + console.log("make grid invoked"); + // Testing output------------------------------------------------------------------ + console.log("color chosen: " + colorChoice); + console.log("Dimensions chosen: Width - " + gridWidth + " Height - " + gridHeight); + // -------------------------------------------------------------------------------- + let colorPicker = document.getElementById('colorPicker'); + let grid = document.getElementById('pixelCanvas'); + for (var r = 0; r < rows; r++) { + var row = grid.insertRow(r); + for (var c = 0; c < columns; c++) { + var cell = row.insertCell(c); + cell.addEventListener('click', e => { + e.target.style.background = colorPicker.value; + }); + }; + }; +}; \ No newline at end of file diff --git a/node_modules/.DS_Store b/node_modules/.DS_Store new file mode 100644 index 00000000..e6db292e Binary files /dev/null and b/node_modules/.DS_Store differ diff --git a/node_modules/.bin/is-docker b/node_modules/.bin/is-docker new file mode 120000 index 00000000..9896ba57 --- /dev/null +++ b/node_modules/.bin/is-docker @@ -0,0 +1 @@ +../is-docker/cli.js \ No newline at end of file diff --git a/node_modules/.package-lock.json b/node_modules/.package-lock.json new file mode 100644 index 00000000..06da69bd --- /dev/null +++ b/node_modules/.package-lock.json @@ -0,0 +1,65 @@ +{ + "name": "dinosaurs_project", + "version": "1.0.0", + "lockfileVersion": 2, + "requires": true, + "packages": { + "node_modules/define-lazy-prop": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/define-lazy-prop/-/define-lazy-prop-2.0.0.tgz", + "integrity": "sha512-Ds09qNh8yw3khSjiJjiUInaGX9xlqZDY7JVryGxdxV7NPeuqQfplOpQ66yJFZut3jLa5zOwkXw1g9EI2uKh4Og==", + "engines": { + "node": ">=8" + } + }, + "node_modules/is-docker": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-2.2.1.tgz", + "integrity": "sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ==", + "bin": { + "is-docker": "cli.js" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-wsl": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-2.2.0.tgz", + "integrity": "sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==", + "dependencies": { + "is-docker": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/open": { + "version": "8.4.0", + "resolved": "https://registry.npmjs.org/open/-/open-8.4.0.tgz", + "integrity": "sha512-XgFPPM+B28FtCCgSb9I+s9szOC1vZRSwgWsRUA5ylIxRTgKozqjOCrVOqGsYABPYK5qnfqClxZTFBa8PKt2v6Q==", + "dependencies": { + "define-lazy-prop": "^2.0.0", + "is-docker": "^2.1.1", + "is-wsl": "^2.2.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/quokka-treasure-chest": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/quokka-treasure-chest/-/quokka-treasure-chest-1.0.2.tgz", + "integrity": "sha512-RsFGjOk0YQXy+DjsaxUBvHCy1Rl7FtdXzv1SK8SK4jAjKcw+2BsGCha4wk7n4TBos/gdIZQB3AU4wmU6KiljcA==", + "dependencies": { + "open": "^8.0.5" + } + } + } +} diff --git a/node_modules/define-lazy-prop/index.d.ts b/node_modules/define-lazy-prop/index.d.ts new file mode 100644 index 00000000..ba8998b8 --- /dev/null +++ b/node_modules/define-lazy-prop/index.d.ts @@ -0,0 +1,33 @@ +/** +Define a [lazily evaluated](https://en.wikipedia.org/wiki/Lazy_evaluation) property on an object. + +@param object - Object to add property to. +@param propertyName - Name of the property to add. +@param fn - Called the first time `propertyName` is accessed. + +@example +``` +import defineLazyProp = require('define-lazy-prop'); + +const unicorn = { + // … +}; + +defineLazyProp(unicorn, 'rainbow', () => expensiveComputation()); + +app.on('user-action', () => { + doSomething(unicorn.rainbow); +}); +``` +*/ +declare function defineLazyProp< + ObjectType extends {[key: string]: unknown}, + PropertyNameType extends string, + PropertyValueType +>( + object: ObjectType, + propertyName: PropertyNameType, + fn: () => PropertyValueType +): ObjectType & {[K in PropertyNameType]: PropertyValueType}; + +export = defineLazyProp; diff --git a/node_modules/define-lazy-prop/index.js b/node_modules/define-lazy-prop/index.js new file mode 100644 index 00000000..b4f255f7 --- /dev/null +++ b/node_modules/define-lazy-prop/index.js @@ -0,0 +1,19 @@ +'use strict'; +module.exports = (object, propertyName, fn) => { + const define = value => Object.defineProperty(object, propertyName, {value, enumerable: true, writable: true}); + + Object.defineProperty(object, propertyName, { + configurable: true, + enumerable: true, + get() { + const result = fn(); + define(result); + return result; + }, + set(value) { + define(value); + } + }); + + return object; +}; diff --git a/node_modules/define-lazy-prop/license b/node_modules/define-lazy-prop/license new file mode 100644 index 00000000..e7af2f77 --- /dev/null +++ b/node_modules/define-lazy-prop/license @@ -0,0 +1,9 @@ +MIT License + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/define-lazy-prop/package.json b/node_modules/define-lazy-prop/package.json new file mode 100644 index 00000000..aff24d84 --- /dev/null +++ b/node_modules/define-lazy-prop/package.json @@ -0,0 +1,48 @@ +{ + "name": "define-lazy-prop", + "version": "2.0.0", + "description": "Define a lazily evaluated property on an object", + "license": "MIT", + "repository": "sindresorhus/define-lazy-prop", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "engines": { + "node": ">=8" + }, + "scripts": { + "test": "xo && ava && tsd" + }, + "files": [ + "index.js", + "index.d.ts" + ], + "keywords": [ + "lazy", + "property", + "properties", + "prop", + "define", + "object", + "value", + "lazily", + "laziness", + "evaluation", + "eval", + "execute", + "getter", + "function", + "fn", + "memoize", + "cache", + "defer", + "deferred" + ], + "devDependencies": { + "ava": "^1.4.1", + "tsd": "^0.7.2", + "xo": "^0.24.0" + } +} diff --git a/node_modules/define-lazy-prop/readme.md b/node_modules/define-lazy-prop/readme.md new file mode 100644 index 00000000..5760b279 --- /dev/null +++ b/node_modules/define-lazy-prop/readme.md @@ -0,0 +1,64 @@ +# define-lazy-prop [![Build Status](https://travis-ci.org/sindresorhus/define-lazy-prop.svg?branch=master)](https://travis-ci.org/sindresorhus/define-lazy-prop) + +> Define a [lazily evaluated](https://en.wikipedia.org/wiki/Lazy_evaluation) property on an object + +Useful when the value of a property is expensive to generate, so you want to delay the computation until the property is needed. For example, improving startup performance by deferring nonessential operations. + + +## Install + +``` +$ npm install define-lazy-prop +``` + + +## Usage + +```js +const defineLazyProp = require('define-lazy-prop'); + +const unicorn = { + // … +}; + +defineLazyProp(unicorn, 'rainbow', () => expensiveComputation()); + +app.on('user-action', () => { + doSomething(unicorn.rainbow); +}); +``` + + +## API + +### defineLazyProp(object, propertyName, fn) + +#### object + +Type: `Object` + +Object to add property to. + +#### propertyName + +Type: `string` + +Name of the property to add. + +#### fn + +Type: `Function` + +Called the first time `propertyName` is accessed. Expected to return a value. + + +## Related + +- [lazy-value](https://github.com/sindresorhus/lazy-value) - Create a lazily evaluated value +- [import-lazy](https://github.com/sindresorhus/import-lazy) - Import a module lazily +- [p-lazy](https://github.com/sindresorhus/p-lazy) - Create a lazy promise + + +## License + +MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/is-docker/cli.js b/node_modules/is-docker/cli.js new file mode 100755 index 00000000..58f2861f --- /dev/null +++ b/node_modules/is-docker/cli.js @@ -0,0 +1,5 @@ +#!/usr/bin/env node +'use strict'; +const isDocker = require('.'); + +process.exitCode = isDocker() ? 0 : 2; diff --git a/node_modules/is-docker/index.d.ts b/node_modules/is-docker/index.d.ts new file mode 100644 index 00000000..c801881d --- /dev/null +++ b/node_modules/is-docker/index.d.ts @@ -0,0 +1,15 @@ +/** +Check if the process is running inside a Docker container. + +@example +``` +import isDocker = require('is-docker'); + +if (isDocker()) { + console.log('Running inside a Docker container'); +} +``` +*/ +declare function isDocker(): boolean; + +export = isDocker; diff --git a/node_modules/is-docker/index.js b/node_modules/is-docker/index.js new file mode 100644 index 00000000..cbb7b6f7 --- /dev/null +++ b/node_modules/is-docker/index.js @@ -0,0 +1,29 @@ +'use strict'; +const fs = require('fs'); + +let isDocker; + +function hasDockerEnv() { + try { + fs.statSync('/.dockerenv'); + return true; + } catch (_) { + return false; + } +} + +function hasDockerCGroup() { + try { + return fs.readFileSync('/proc/self/cgroup', 'utf8').includes('docker'); + } catch (_) { + return false; + } +} + +module.exports = () => { + if (isDocker === undefined) { + isDocker = hasDockerEnv() || hasDockerCGroup(); + } + + return isDocker; +}; diff --git a/node_modules/is-docker/license b/node_modules/is-docker/license new file mode 100644 index 00000000..fa7ceba3 --- /dev/null +++ b/node_modules/is-docker/license @@ -0,0 +1,9 @@ +MIT License + +Copyright (c) Sindre Sorhus (https://sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/is-docker/package.json b/node_modules/is-docker/package.json new file mode 100644 index 00000000..ae282258 --- /dev/null +++ b/node_modules/is-docker/package.json @@ -0,0 +1,42 @@ +{ + "name": "is-docker", + "version": "2.2.1", + "description": "Check if the process is running inside a Docker container", + "license": "MIT", + "repository": "sindresorhus/is-docker", + "funding": "https://github.com/sponsors/sindresorhus", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "https://sindresorhus.com" + }, + "bin": "cli.js", + "engines": { + "node": ">=8" + }, + "scripts": { + "test": "xo && ava && tsd" + }, + "files": [ + "index.js", + "index.d.ts", + "cli.js" + ], + "keywords": [ + "detect", + "docker", + "dockerized", + "container", + "inside", + "is", + "env", + "environment", + "process" + ], + "devDependencies": { + "ava": "^1.4.1", + "sinon": "^7.3.2", + "tsd": "^0.7.2", + "xo": "^0.24.0" + } +} diff --git a/node_modules/is-docker/readme.md b/node_modules/is-docker/readme.md new file mode 100644 index 00000000..f09b254f --- /dev/null +++ b/node_modules/is-docker/readme.md @@ -0,0 +1,27 @@ +# is-docker + +> Check if the process is running inside a Docker container + +## Install + +``` +$ npm install is-docker +``` + +## Usage + +```js +const isDocker = require('is-docker'); + +if (isDocker()) { + console.log('Running inside a Docker container'); +} +``` + +## CLI + +``` +$ is-docker +``` + +Exits with code 0 if inside a Docker container and 2 if not. diff --git a/node_modules/is-wsl/index.d.ts b/node_modules/is-wsl/index.d.ts new file mode 100644 index 00000000..d54e4bac --- /dev/null +++ b/node_modules/is-wsl/index.d.ts @@ -0,0 +1,15 @@ +/** +Check if the process is running inside [Windows Subsystem for Linux](https://msdn.microsoft.com/commandline/wsl/about) (Bash on Windows). + +@example +``` +import isWsl = require('is-wsl'); + +// When running inside Windows Subsystem for Linux +console.log(isWsl); +//=> true +``` +*/ +declare const isWsl: boolean; + +export = isWsl; diff --git a/node_modules/is-wsl/index.js b/node_modules/is-wsl/index.js new file mode 100644 index 00000000..eb6313f0 --- /dev/null +++ b/node_modules/is-wsl/index.js @@ -0,0 +1,31 @@ +'use strict'; +const os = require('os'); +const fs = require('fs'); +const isDocker = require('is-docker'); + +const isWsl = () => { + if (process.platform !== 'linux') { + return false; + } + + if (os.release().toLowerCase().includes('microsoft')) { + if (isDocker()) { + return false; + } + + return true; + } + + try { + return fs.readFileSync('/proc/version', 'utf8').toLowerCase().includes('microsoft') ? + !isDocker() : false; + } catch (_) { + return false; + } +}; + +if (process.env.__IS_WSL_TEST__) { + module.exports = isWsl; +} else { + module.exports = isWsl(); +} diff --git a/node_modules/is-wsl/license b/node_modules/is-wsl/license new file mode 100644 index 00000000..e7af2f77 --- /dev/null +++ b/node_modules/is-wsl/license @@ -0,0 +1,9 @@ +MIT License + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/is-wsl/package.json b/node_modules/is-wsl/package.json new file mode 100644 index 00000000..2fa7f754 --- /dev/null +++ b/node_modules/is-wsl/package.json @@ -0,0 +1,45 @@ +{ + "name": "is-wsl", + "version": "2.2.0", + "description": "Check if the process is running inside Windows Subsystem for Linux (Bash on Windows)", + "license": "MIT", + "repository": "sindresorhus/is-wsl", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "engines": { + "node": ">=8" + }, + "scripts": { + "test": "xo && ava && tsd" + }, + "files": [ + "index.js", + "index.d.ts" + ], + "keywords": [ + "check", + "wsl", + "windows", + "subsystem", + "linux", + "detect", + "bash", + "process", + "console", + "terminal", + "is" + ], + "dependencies": { + "is-docker": "^2.0.0" + }, + "devDependencies": { + "ava": "^1.4.1", + "clear-module": "^3.2.0", + "proxyquire": "^2.1.0", + "tsd": "^0.7.2", + "xo": "^0.24.0" + } +} diff --git a/node_modules/is-wsl/readme.md b/node_modules/is-wsl/readme.md new file mode 100644 index 00000000..5fe44fed --- /dev/null +++ b/node_modules/is-wsl/readme.md @@ -0,0 +1,36 @@ +# is-wsl [![Build Status](https://travis-ci.org/sindresorhus/is-wsl.svg?branch=master)](https://travis-ci.org/sindresorhus/is-wsl) + +> Check if the process is running inside [Windows Subsystem for Linux](https://msdn.microsoft.com/commandline/wsl/about) (Bash on Windows) + +Can be useful if you need to work around unimplemented or buggy features in WSL. Supports both WSL 1 and WSL 2. + + +## Install + +``` +$ npm install is-wsl +``` + + +## Usage + +```js +const isWsl = require('is-wsl'); + +// When running inside Windows Subsystem for Linux +console.log(isWsl); +//=> true +``` + + +--- + +
+ + Get professional support for this package with a Tidelift subscription + +
+ + Tidelift helps make open source sustainable for maintainers while giving companies
assurances about security, maintenance, and licensing for their dependencies. +
+
diff --git a/node_modules/open/index.d.ts b/node_modules/open/index.d.ts new file mode 100644 index 00000000..9c8f2a39 --- /dev/null +++ b/node_modules/open/index.d.ts @@ -0,0 +1,153 @@ +import {ChildProcess} from 'child_process'; + +declare namespace open { + interface Options { + /** + Wait for the opened app to exit before fulfilling the promise. If `false` it's fulfilled immediately when opening the app. + + Note that it waits for the app to exit, not just for the window to close. + + On Windows, you have to explicitly specify an app for it to be able to wait. + + @default false + */ + readonly wait?: boolean; + + /** + __macOS only__ + + Do not bring the app to the foreground. + + @default false + */ + readonly background?: boolean; + + /** + __macOS only__ + + Open a new instance of the app even it's already running. + + A new instance is always opened on other platforms. + + @default false + */ + readonly newInstance?: boolean; + + /** + Specify the `name` of the app to open the `target` with, and optionally, app `arguments`. `app` can be an array of apps to try to open and `name` can be an array of app names to try. If each app fails, the last error will be thrown. + + The app name is platform dependent. Don't hard code it in reusable modules. For example, Chrome is `google chrome` on macOS, `google-chrome` on Linux and `chrome` on Windows. If possible, use [`open.apps`](#openapps) which auto-detects the correct binary to use. + + You may also pass in the app's full path. For example on WSL, this can be `/mnt/c/Program Files (x86)/Google/Chrome/Application/chrome.exe` for the Windows installation of Chrome. + + The app `arguments` are app dependent. Check the app's documentation for what arguments it accepts. + */ + readonly app?: App | readonly App[]; + + /** + Allow the opened app to exit with nonzero exit code when the `wait` option is `true`. + + We do not recommend setting this option. The convention for success is exit code zero. + + @default false + */ + readonly allowNonzeroExitCode?: boolean; + } + + interface OpenAppOptions extends Omit { + /** + Arguments passed to the app. + + These arguments are app dependent. Check the app's documentation for what arguments it accepts. + */ + readonly arguments?: readonly string[]; + } + + type AppName = + | 'chrome' + | 'firefox' + | 'edge'; + + type App = { + name: string | readonly string[]; + arguments?: readonly string[]; + }; +} + +// eslint-disable-next-line no-redeclare +declare const open: { + /** + Open stuff like URLs, files, executables. Cross-platform. + + Uses the command `open` on macOS, `start` on Windows and `xdg-open` on other platforms. + + There is a caveat for [double-quotes on Windows](https://github.com/sindresorhus/open#double-quotes-on-windows) where all double-quotes are stripped from the `target`. + + @param target - The thing you want to open. Can be a URL, file, or executable. Opens in the default app for the file type. For example, URLs open in your default browser. + @returns The [spawned child process](https://nodejs.org/api/child_process.html#child_process_class_childprocess). You would normally not need to use this for anything, but it can be useful if you'd like to attach custom event listeners or perform other operations directly on the spawned process. + + @example + ``` + import open = require('open'); + + // Opens the image in the default image viewer + await open('unicorn.png', {wait: true}); + console.log('The image viewer app closed'); + + // Opens the url in the default browser + await open('https://sindresorhus.com'); + + // Opens the URL in a specified browser. + await open('https://sindresorhus.com', {app: {name: 'firefox'}}); + + // Specify app arguments. + await open('https://sindresorhus.com', {app: {name: 'google chrome', arguments: ['--incognito']}}); + ``` + */ + ( + target: string, + options?: open.Options + ): Promise; + + /** + An object containing auto-detected binary names for common apps. Useful to work around cross-platform differences. + + @example + ``` + import open = require('open'); + + await open('https://google.com', { + app: { + name: open.apps.chrome + } + }); + ``` + */ + apps: Record; + + /** + Open an app. Cross-platform. + + Uses the command `open` on macOS, `start` on Windows and `xdg-open` on other platforms. + + @param name - The app you want to open. Can be either builtin supported `open.apps` names or other name supported in platform. + @returns The [spawned child process](https://nodejs.org/api/child_process.html#child_process_class_childprocess). You would normally not need to use this for anything, but it can be useful if you'd like to attach custom event listeners or perform other operations directly on the spawned process. + + @example + ``` + const {apps, openApp} = require('open'); + + // Open Firefox + await openApp(apps.firefox); + + // Open Chrome incognito mode + await openApp(apps.chrome, {arguments: ['--incognito']}); + + // Open Xcode + await openApp('xcode'); + ``` + */ + openApp: (name: open.App['name'], options?: open.OpenAppOptions) => Promise; +}; + +export = open; diff --git a/node_modules/open/index.js b/node_modules/open/index.js new file mode 100644 index 00000000..290b4ec0 --- /dev/null +++ b/node_modules/open/index.js @@ -0,0 +1,315 @@ +const path = require('path'); +const childProcess = require('child_process'); +const {promises: fs, constants: fsConstants} = require('fs'); +const isWsl = require('is-wsl'); +const isDocker = require('is-docker'); +const defineLazyProperty = require('define-lazy-prop'); + +// Path to included `xdg-open`. +const localXdgOpenPath = path.join(__dirname, 'xdg-open'); + +const {platform, arch} = process; + +/** +Get the mount point for fixed drives in WSL. + +@inner +@returns {string} The mount point. +*/ +const getWslDrivesMountPoint = (() => { + // Default value for "root" param + // according to https://docs.microsoft.com/en-us/windows/wsl/wsl-config + const defaultMountPoint = '/mnt/'; + + let mountPoint; + + return async function () { + if (mountPoint) { + // Return memoized mount point value + return mountPoint; + } + + const configFilePath = '/etc/wsl.conf'; + + let isConfigFileExists = false; + try { + await fs.access(configFilePath, fsConstants.F_OK); + isConfigFileExists = true; + } catch {} + + if (!isConfigFileExists) { + return defaultMountPoint; + } + + const configContent = await fs.readFile(configFilePath, {encoding: 'utf8'}); + const configMountPoint = /(?.*)/g.exec(configContent); + + if (!configMountPoint) { + return defaultMountPoint; + } + + mountPoint = configMountPoint.groups.mountPoint.trim(); + mountPoint = mountPoint.endsWith('/') ? mountPoint : `${mountPoint}/`; + + return mountPoint; + }; +})(); + +const pTryEach = async (array, mapper) => { + let latestError; + + for (const item of array) { + try { + return await mapper(item); // eslint-disable-line no-await-in-loop + } catch (error) { + latestError = error; + } + } + + throw latestError; +}; + +const baseOpen = async options => { + options = { + wait: false, + background: false, + newInstance: false, + allowNonzeroExitCode: false, + ...options + }; + + if (Array.isArray(options.app)) { + return pTryEach(options.app, singleApp => baseOpen({ + ...options, + app: singleApp + })); + } + + let {name: app, arguments: appArguments = []} = options.app || {}; + appArguments = [...appArguments]; + + if (Array.isArray(app)) { + return pTryEach(app, appName => baseOpen({ + ...options, + app: { + name: appName, + arguments: appArguments + } + })); + } + + let command; + const cliArguments = []; + const childProcessOptions = {}; + + if (platform === 'darwin') { + command = 'open'; + + if (options.wait) { + cliArguments.push('--wait-apps'); + } + + if (options.background) { + cliArguments.push('--background'); + } + + if (options.newInstance) { + cliArguments.push('--new'); + } + + if (app) { + cliArguments.push('-a', app); + } + } else if (platform === 'win32' || (isWsl && !isDocker())) { + const mountPoint = await getWslDrivesMountPoint(); + + command = isWsl ? + `${mountPoint}c/Windows/System32/WindowsPowerShell/v1.0/powershell.exe` : + `${process.env.SYSTEMROOT}\\System32\\WindowsPowerShell\\v1.0\\powershell`; + + cliArguments.push( + '-NoProfile', + '-NonInteractive', + '–ExecutionPolicy', + 'Bypass', + '-EncodedCommand' + ); + + if (!isWsl) { + childProcessOptions.windowsVerbatimArguments = true; + } + + const encodedArguments = ['Start']; + + if (options.wait) { + encodedArguments.push('-Wait'); + } + + if (app) { + // Double quote with double quotes to ensure the inner quotes are passed through. + // Inner quotes are delimited for PowerShell interpretation with backticks. + encodedArguments.push(`"\`"${app}\`""`, '-ArgumentList'); + if (options.target) { + appArguments.unshift(options.target); + } + } else if (options.target) { + encodedArguments.push(`"${options.target}"`); + } + + if (appArguments.length > 0) { + appArguments = appArguments.map(arg => `"\`"${arg}\`""`); + encodedArguments.push(appArguments.join(',')); + } + + // Using Base64-encoded command, accepted by PowerShell, to allow special characters. + options.target = Buffer.from(encodedArguments.join(' '), 'utf16le').toString('base64'); + } else { + if (app) { + command = app; + } else { + // When bundled by Webpack, there's no actual package file path and no local `xdg-open`. + const isBundled = !__dirname || __dirname === '/'; + + // Check if local `xdg-open` exists and is executable. + let exeLocalXdgOpen = false; + try { + await fs.access(localXdgOpenPath, fsConstants.X_OK); + exeLocalXdgOpen = true; + } catch {} + + const useSystemXdgOpen = process.versions.electron || + platform === 'android' || isBundled || !exeLocalXdgOpen; + command = useSystemXdgOpen ? 'xdg-open' : localXdgOpenPath; + } + + if (appArguments.length > 0) { + cliArguments.push(...appArguments); + } + + if (!options.wait) { + // `xdg-open` will block the process unless stdio is ignored + // and it's detached from the parent even if it's unref'd. + childProcessOptions.stdio = 'ignore'; + childProcessOptions.detached = true; + } + } + + if (options.target) { + cliArguments.push(options.target); + } + + if (platform === 'darwin' && appArguments.length > 0) { + cliArguments.push('--args', ...appArguments); + } + + const subprocess = childProcess.spawn(command, cliArguments, childProcessOptions); + + if (options.wait) { + return new Promise((resolve, reject) => { + subprocess.once('error', reject); + + subprocess.once('close', exitCode => { + if (options.allowNonzeroExitCode && exitCode > 0) { + reject(new Error(`Exited with code ${exitCode}`)); + return; + } + + resolve(subprocess); + }); + }); + } + + subprocess.unref(); + + return subprocess; +}; + +const open = (target, options) => { + if (typeof target !== 'string') { + throw new TypeError('Expected a `target`'); + } + + return baseOpen({ + ...options, + target + }); +}; + +const openApp = (name, options) => { + if (typeof name !== 'string') { + throw new TypeError('Expected a `name`'); + } + + const {arguments: appArguments = []} = options || {}; + if (appArguments !== undefined && appArguments !== null && !Array.isArray(appArguments)) { + throw new TypeError('Expected `appArguments` as Array type'); + } + + return baseOpen({ + ...options, + app: { + name, + arguments: appArguments + } + }); +}; + +function detectArchBinary(binary) { + if (typeof binary === 'string' || Array.isArray(binary)) { + return binary; + } + + const {[arch]: archBinary} = binary; + + if (!archBinary) { + throw new Error(`${arch} is not supported`); + } + + return archBinary; +} + +function detectPlatformBinary({[platform]: platformBinary}, {wsl}) { + if (wsl && isWsl) { + return detectArchBinary(wsl); + } + + if (!platformBinary) { + throw new Error(`${platform} is not supported`); + } + + return detectArchBinary(platformBinary); +} + +const apps = {}; + +defineLazyProperty(apps, 'chrome', () => detectPlatformBinary({ + darwin: 'google chrome', + win32: 'chrome', + linux: ['google-chrome', 'google-chrome-stable', 'chromium'] +}, { + wsl: { + ia32: '/mnt/c/Program Files (x86)/Google/Chrome/Application/chrome.exe', + x64: ['/mnt/c/Program Files/Google/Chrome/Application/chrome.exe', '/mnt/c/Program Files (x86)/Google/Chrome/Application/chrome.exe'] + } +})); + +defineLazyProperty(apps, 'firefox', () => detectPlatformBinary({ + darwin: 'firefox', + win32: 'C:\\Program Files\\Mozilla Firefox\\firefox.exe', + linux: 'firefox' +}, { + wsl: '/mnt/c/Program Files/Mozilla Firefox/firefox.exe' +})); + +defineLazyProperty(apps, 'edge', () => detectPlatformBinary({ + darwin: 'microsoft edge', + win32: 'msedge', + linux: ['microsoft-edge', 'microsoft-edge-dev'] +}, { + wsl: '/mnt/c/Program Files (x86)/Microsoft/Edge/Application/msedge.exe' +})); + +open.apps = apps; +open.openApp = openApp; + +module.exports = open; diff --git a/node_modules/open/license b/node_modules/open/license new file mode 100644 index 00000000..fa7ceba3 --- /dev/null +++ b/node_modules/open/license @@ -0,0 +1,9 @@ +MIT License + +Copyright (c) Sindre Sorhus (https://sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/open/package.json b/node_modules/open/package.json new file mode 100644 index 00000000..0b8bb259 --- /dev/null +++ b/node_modules/open/package.json @@ -0,0 +1,61 @@ +{ + "name": "open", + "version": "8.4.0", + "description": "Open stuff like URLs, files, executables. Cross-platform.", + "license": "MIT", + "repository": "sindresorhus/open", + "funding": "https://github.com/sponsors/sindresorhus", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "https://sindresorhus.com" + }, + "engines": { + "node": ">=12" + }, + "scripts": { + "test": "xo && tsd" + }, + "files": [ + "index.js", + "index.d.ts", + "xdg-open" + ], + "keywords": [ + "app", + "open", + "opener", + "opens", + "launch", + "start", + "xdg-open", + "xdg", + "default", + "cmd", + "browser", + "editor", + "executable", + "exe", + "url", + "urls", + "arguments", + "args", + "spawn", + "exec", + "child", + "process", + "website", + "file" + ], + "dependencies": { + "define-lazy-prop": "^2.0.0", + "is-docker": "^2.1.1", + "is-wsl": "^2.2.0" + }, + "devDependencies": { + "@types/node": "^15.0.0", + "ava": "^3.15.0", + "tsd": "^0.14.0", + "xo": "^0.39.1" + } +} diff --git a/node_modules/open/readme.md b/node_modules/open/readme.md new file mode 100644 index 00000000..18794a2e --- /dev/null +++ b/node_modules/open/readme.md @@ -0,0 +1,183 @@ +# open + +> Open stuff like URLs, files, executables. Cross-platform. + +This is meant to be used in command-line tools and scripts, not in the browser. + +If you need this for Electron, use [`shell.openPath()`](https://www.electronjs.org/docs/api/shell#shellopenpathpath) instead. + +This package does not make any security guarantees. If you pass in untrusted input, it's up to you to properly sanitize it. + +#### Why? + +- Actively maintained. +- Supports app arguments. +- Safer as it uses `spawn` instead of `exec`. +- Fixes most of the original `node-open` issues. +- Includes the latest [`xdg-open` script](https://cgit.freedesktop.org/xdg/xdg-utils/commit/?id=c55122295c2a480fa721a9614f0e2d42b2949c18) for Linux. +- Supports WSL paths to Windows apps. + +## Install + +``` +$ npm install open +``` + +## Usage + +```js +const open = require('open'); + +// Opens the image in the default image viewer and waits for the opened app to quit. +await open('unicorn.png', {wait: true}); +console.log('The image viewer app quit'); + +// Opens the URL in the default browser. +await open('https://sindresorhus.com'); + +// Opens the URL in a specified browser. +await open('https://sindresorhus.com', {app: {name: 'firefox'}}); + +// Specify app arguments. +await open('https://sindresorhus.com', {app: {name: 'google chrome', arguments: ['--incognito']}}); + +// Open an app +await open.openApp('xcode'); + +// Open an app with arguments +await open.openApp(open.apps.chrome, {arguments: ['--incognito']}); +``` + +## API + +It uses the command `open` on macOS, `start` on Windows and `xdg-open` on other platforms. + +### open(target, options?) + +Returns a promise for the [spawned child process](https://nodejs.org/api/child_process.html#child_process_class_childprocess). You would normally not need to use this for anything, but it can be useful if you'd like to attach custom event listeners or perform other operations directly on the spawned process. + +#### target + +Type: `string` + +The thing you want to open. Can be a URL, file, or executable. + +Opens in the default app for the file type. For example, URLs opens in your default browser. + +#### options + +Type: `object` + +##### wait + +Type: `boolean`\ +Default: `false` + +Wait for the opened app to exit before fulfilling the promise. If `false` it's fulfilled immediately when opening the app. + +Note that it waits for the app to exit, not just for the window to close. + +On Windows, you have to explicitly specify an app for it to be able to wait. + +##### background (macOS only) + +Type: `boolean`\ +Default: `false` + +Do not bring the app to the foreground. + +##### newInstance (macOS only) + +Type: `boolean`\ +Default: `false` + +Open a new instance of the app even it's already running. + +A new instance is always opened on other platforms. + +##### app + +Type: `{name: string | string[], arguments?: string[]} | Array<{name: string | string[], arguments: string[]}>` + +Specify the `name` of the app to open the `target` with, and optionally, app `arguments`. `app` can be an array of apps to try to open and `name` can be an array of app names to try. If each app fails, the last error will be thrown. + +The app name is platform dependent. Don't hard code it in reusable modules. For example, Chrome is `google chrome` on macOS, `google-chrome` on Linux and `chrome` on Windows. If possible, use [`open.apps`](#openapps) which auto-detects the correct binary to use. + +You may also pass in the app's full path. For example on WSL, this can be `/mnt/c/Program Files (x86)/Google/Chrome/Application/chrome.exe` for the Windows installation of Chrome. + +The app `arguments` are app dependent. Check the app's documentation for what arguments it accepts. + +##### allowNonzeroExitCode + +Type: `boolean`\ +Default: `false` + +Allow the opened app to exit with nonzero exit code when the `wait` option is `true`. + +We do not recommend setting this option. The convention for success is exit code zero. + +### open.apps + +An object containing auto-detected binary names for common apps. Useful to work around [cross-platform differences](#app). + +```js +const open = require('open'); + +await open('https://google.com', { + app: { + name: open.apps.chrome + } +}); +``` + +#### Supported apps + +- [`chrome`](https://www.google.com/chrome) - Web browser +- [`firefox`](https://www.mozilla.org/firefox) - Web browser +- [`edge`](https://www.microsoft.com/edge) - Web browser + +### open.openApp(name, options?) + +Open an app. + +Returns a promise for the [spawned child process](https://nodejs.org/api/child_process.html#child_process_class_childprocess). You would normally not need to use this for anything, but it can be useful if you'd like to attach custom event listeners or perform other operations directly on the spawned process. + +#### name + +Type: `string` + +The app name is platform dependent. Don't hard code it in reusable modules. For example, Chrome is `google chrome` on macOS, `google-chrome` on Linux and `chrome` on Windows. If possible, use [`open.apps`](#openapps) which auto-detects the correct binary to use. + +You may also pass in the app's full path. For example on WSL, this can be `/mnt/c/Program Files (x86)/Google/Chrome/Application/chrome.exe` for the Windows installation of Chrome. + +#### options + +Type: `object` + +Same options as [`open`](#options) except `app` and with the following additions: + +##### arguments + +Type: `string[]`\ +Default: `[]` + +Arguments passed to the app. + +These arguments are app dependent. Check the app's documentation for what arguments it accepts. + +## Related + +- [open-cli](https://github.com/sindresorhus/open-cli) - CLI for this module +- [open-editor](https://github.com/sindresorhus/open-editor) - Open files in your editor at a specific line and column + +--- + +
+ + Get professional support for this package with a Tidelift subscription + +
+ + Tidelift helps make open source sustainable for maintainers while giving companies
assurances about security, maintenance, and licensing for their dependencies. +
+
diff --git a/node_modules/open/xdg-open b/node_modules/open/xdg-open new file mode 100755 index 00000000..b392fbff --- /dev/null +++ b/node_modules/open/xdg-open @@ -0,0 +1,1066 @@ +#!/bin/sh +#--------------------------------------------- +# xdg-open +# +# Utility script to open a URL in the registered default application. +# +# Refer to the usage() function below for usage. +# +# Copyright 2009-2010, Fathi Boudra +# Copyright 2009-2010, Rex Dieter +# Copyright 2006, Kevin Krammer +# Copyright 2006, Jeremy White +# +# LICENSE: +# +# Permission is hereby granted, free of charge, to any person obtaining a +# copy of this software and associated documentation files (the "Software"), +# to deal in the Software without restriction, including without limitation +# the rights to use, copy, modify, merge, publish, distribute, sublicense, +# and/or sell copies of the Software, and to permit persons to whom the +# Software is furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included +# in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR +# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +# OTHER DEALINGS IN THE SOFTWARE. +# +#--------------------------------------------- + +manualpage() +{ +cat << _MANUALPAGE +Name + + xdg-open -- opens a file or URL in the user's preferred + application + +Synopsis + + xdg-open { file | URL } + + xdg-open { --help | --manual | --version } + +Description + + xdg-open opens a file or URL in the user's preferred + application. If a URL is provided the URL will be opened in the + user's preferred web browser. If a file is provided the file + will be opened in the preferred application for files of that + type. xdg-open supports file, ftp, http and https URLs. + + xdg-open is for use inside a desktop session only. It is not + recommended to use xdg-open as root. + +Options + + --help + Show command synopsis. + + --manual + Show this manual page. + + --version + Show the xdg-utils version information. + +Exit Codes + + An exit code of 0 indicates success while a non-zero exit code + indicates failure. The following failure codes can be returned: + + 1 + Error in command line syntax. + + 2 + One of the files passed on the command line did not + exist. + + 3 + A required tool could not be found. + + 4 + The action failed. + +See Also + + xdg-mime(1), xdg-settings(1), MIME applications associations + specification + +Examples + +xdg-open 'http://www.freedesktop.org/' + + Opens the freedesktop.org website in the user's default + browser. + +xdg-open /tmp/foobar.png + + Opens the PNG image file /tmp/foobar.png in the user's default + image viewing application. +_MANUALPAGE +} + +usage() +{ +cat << _USAGE + xdg-open -- opens a file or URL in the user's preferred + application + +Synopsis + + xdg-open { file | URL } + + xdg-open { --help | --manual | --version } + +_USAGE +} + +#@xdg-utils-common@ + +#---------------------------------------------------------------------------- +# Common utility functions included in all XDG wrapper scripts +#---------------------------------------------------------------------------- + +DEBUG() +{ + [ -z "${XDG_UTILS_DEBUG_LEVEL}" ] && return 0; + [ ${XDG_UTILS_DEBUG_LEVEL} -lt $1 ] && return 0; + shift + echo "$@" >&2 +} + +# This handles backslashes but not quote marks. +first_word() +{ + read first rest + echo "$first" +} + +#------------------------------------------------------------- +# map a binary to a .desktop file +binary_to_desktop_file() +{ + search="${XDG_DATA_HOME:-$HOME/.local/share}:${XDG_DATA_DIRS:-/usr/local/share:/usr/share}" + binary="`which "$1"`" + binary="`readlink -f "$binary"`" + base="`basename "$binary"`" + IFS=: + for dir in $search; do + unset IFS + [ "$dir" ] || continue + [ -d "$dir/applications" ] || [ -d "$dir/applnk" ] || continue + for file in "$dir"/applications/*.desktop "$dir"/applications/*/*.desktop "$dir"/applnk/*.desktop "$dir"/applnk/*/*.desktop; do + [ -r "$file" ] || continue + # Check to make sure it's worth the processing. + grep -q "^Exec.*$base" "$file" || continue + # Make sure it's a visible desktop file (e.g. not "preferred-web-browser.desktop"). + grep -Eq "^(NoDisplay|Hidden)=true" "$file" && continue + command="`grep -E "^Exec(\[[^]=]*])?=" "$file" | cut -d= -f 2- | first_word`" + command="`which "$command"`" + if [ x"`readlink -f "$command"`" = x"$binary" ]; then + # Fix any double slashes that got added path composition + echo "$file" | sed -e 's,//*,/,g' + return + fi + done + done +} + +#------------------------------------------------------------- +# map a .desktop file to a binary +desktop_file_to_binary() +{ + search="${XDG_DATA_HOME:-$HOME/.local/share}:${XDG_DATA_DIRS:-/usr/local/share:/usr/share}" + desktop="`basename "$1"`" + IFS=: + for dir in $search; do + unset IFS + [ "$dir" ] && [ -d "$dir/applications" ] || [ -d "$dir/applnk" ] || continue + # Check if desktop file contains - + if [ "${desktop#*-}" != "$desktop" ]; then + vendor=${desktop%-*} + app=${desktop#*-} + if [ -r $dir/applications/$vendor/$app ]; then + file_path=$dir/applications/$vendor/$app + elif [ -r $dir/applnk/$vendor/$app ]; then + file_path=$dir/applnk/$vendor/$app + fi + fi + if test -z "$file_path" ; then + for indir in "$dir"/applications/ "$dir"/applications/*/ "$dir"/applnk/ "$dir"/applnk/*/; do + file="$indir/$desktop" + if [ -r "$file" ]; then + file_path=$file + break + fi + done + fi + if [ -r "$file_path" ]; then + # Remove any arguments (%F, %f, %U, %u, etc.). + command="`grep -E "^Exec(\[[^]=]*])?=" "$file_path" | cut -d= -f 2- | first_word`" + command="`which "$command"`" + readlink -f "$command" + return + fi + done +} + +#------------------------------------------------------------- +# Exit script on successfully completing the desired operation + +exit_success() +{ + if [ $# -gt 0 ]; then + echo "$@" + echo + fi + + exit 0 +} + + +#----------------------------------------- +# Exit script on malformed arguments, not enough arguments +# or missing required option. +# prints usage information + +exit_failure_syntax() +{ + if [ $# -gt 0 ]; then + echo "xdg-open: $@" >&2 + echo "Try 'xdg-open --help' for more information." >&2 + else + usage + echo "Use 'man xdg-open' or 'xdg-open --manual' for additional info." + fi + + exit 1 +} + +#------------------------------------------------------------- +# Exit script on missing file specified on command line + +exit_failure_file_missing() +{ + if [ $# -gt 0 ]; then + echo "xdg-open: $@" >&2 + fi + + exit 2 +} + +#------------------------------------------------------------- +# Exit script on failure to locate necessary tool applications + +exit_failure_operation_impossible() +{ + if [ $# -gt 0 ]; then + echo "xdg-open: $@" >&2 + fi + + exit 3 +} + +#------------------------------------------------------------- +# Exit script on failure returned by a tool application + +exit_failure_operation_failed() +{ + if [ $# -gt 0 ]; then + echo "xdg-open: $@" >&2 + fi + + exit 4 +} + +#------------------------------------------------------------ +# Exit script on insufficient permission to read a specified file + +exit_failure_file_permission_read() +{ + if [ $# -gt 0 ]; then + echo "xdg-open: $@" >&2 + fi + + exit 5 +} + +#------------------------------------------------------------ +# Exit script on insufficient permission to write a specified file + +exit_failure_file_permission_write() +{ + if [ $# -gt 0 ]; then + echo "xdg-open: $@" >&2 + fi + + exit 6 +} + +check_input_file() +{ + if [ ! -e "$1" ]; then + exit_failure_file_missing "file '$1' does not exist" + fi + if [ ! -r "$1" ]; then + exit_failure_file_permission_read "no permission to read file '$1'" + fi +} + +check_vendor_prefix() +{ + file_label="$2" + [ -n "$file_label" ] || file_label="filename" + file=`basename "$1"` + case "$file" in + [[:alpha:]]*-*) + return + ;; + esac + + echo "xdg-open: $file_label '$file' does not have a proper vendor prefix" >&2 + echo 'A vendor prefix consists of alpha characters ([a-zA-Z]) and is terminated' >&2 + echo 'with a dash ("-"). An example '"$file_label"' is '"'example-$file'" >&2 + echo "Use --novendor to override or 'xdg-open --manual' for additional info." >&2 + exit 1 +} + +check_output_file() +{ + # if the file exists, check if it is writeable + # if it does not exists, check if we are allowed to write on the directory + if [ -e "$1" ]; then + if [ ! -w "$1" ]; then + exit_failure_file_permission_write "no permission to write to file '$1'" + fi + else + DIR=`dirname "$1"` + if [ ! -w "$DIR" ] || [ ! -x "$DIR" ]; then + exit_failure_file_permission_write "no permission to create file '$1'" + fi + fi +} + +#---------------------------------------- +# Checks for shared commands, e.g. --help + +check_common_commands() +{ + while [ $# -gt 0 ] ; do + parm="$1" + shift + + case "$parm" in + --help) + usage + echo "Use 'man xdg-open' or 'xdg-open --manual' for additional info." + exit_success + ;; + + --manual) + manualpage + exit_success + ;; + + --version) + echo "xdg-open 1.1.3" + exit_success + ;; + esac + done +} + +check_common_commands "$@" + +[ -z "${XDG_UTILS_DEBUG_LEVEL}" ] && unset XDG_UTILS_DEBUG_LEVEL; +if [ ${XDG_UTILS_DEBUG_LEVEL-0} -lt 1 ]; then + # Be silent + xdg_redirect_output=" > /dev/null 2> /dev/null" +else + # All output to stderr + xdg_redirect_output=" >&2" +fi + +#-------------------------------------- +# Checks for known desktop environments +# set variable DE to the desktop environments name, lowercase + +detectDE() +{ + # see https://bugs.freedesktop.org/show_bug.cgi?id=34164 + unset GREP_OPTIONS + + if [ -n "${XDG_CURRENT_DESKTOP}" ]; then + case "${XDG_CURRENT_DESKTOP}" in + # only recently added to menu-spec, pre-spec X- still in use + Cinnamon|X-Cinnamon) + DE=cinnamon; + ;; + ENLIGHTENMENT) + DE=enlightenment; + ;; + # GNOME, GNOME-Classic:GNOME, or GNOME-Flashback:GNOME + GNOME*) + DE=gnome; + ;; + KDE) + DE=kde; + ;; + # Deepin Desktop Environments + DEEPIN|Deepin|deepin) + DE=dde; + ;; + LXDE) + DE=lxde; + ;; + LXQt) + DE=lxqt; + ;; + MATE) + DE=mate; + ;; + XFCE) + DE=xfce + ;; + X-Generic) + DE=generic + ;; + esac + fi + + if [ x"$DE" = x"" ]; then + # classic fallbacks + if [ x"$KDE_FULL_SESSION" != x"" ]; then DE=kde; + elif [ x"$GNOME_DESKTOP_SESSION_ID" != x"" ]; then DE=gnome; + elif [ x"$MATE_DESKTOP_SESSION_ID" != x"" ]; then DE=mate; + elif `dbus-send --print-reply --dest=org.freedesktop.DBus /org/freedesktop/DBus org.freedesktop.DBus.GetNameOwner string:org.gnome.SessionManager > /dev/null 2>&1` ; then DE=gnome; + elif xprop -root _DT_SAVE_MODE 2> /dev/null | grep ' = \"xfce4\"$' >/dev/null 2>&1; then DE=xfce; + elif xprop -root 2> /dev/null | grep -i '^xfce_desktop_window' >/dev/null 2>&1; then DE=xfce + elif echo $DESKTOP | grep -q '^Enlightenment'; then DE=enlightenment; + elif [ x"$LXQT_SESSION_CONFIG" != x"" ]; then DE=lxqt; + fi + fi + + if [ x"$DE" = x"" ]; then + # fallback to checking $DESKTOP_SESSION + case "$DESKTOP_SESSION" in + gnome) + DE=gnome; + ;; + LXDE|Lubuntu) + DE=lxde; + ;; + MATE) + DE=mate; + ;; + xfce|xfce4|'Xfce Session') + DE=xfce; + ;; + esac + fi + + if [ x"$DE" = x"" ]; then + # fallback to uname output for other platforms + case "$(uname 2>/dev/null)" in + CYGWIN*) + DE=cygwin; + ;; + Darwin) + DE=darwin; + ;; + esac + fi + + if [ x"$DE" = x"gnome" ]; then + # gnome-default-applications-properties is only available in GNOME 2.x + # but not in GNOME 3.x + which gnome-default-applications-properties > /dev/null 2>&1 || DE="gnome3" + fi + + if [ -f "$XDG_RUNTIME_DIR/flatpak-info" ]; then + DE="flatpak" + fi +} + +#---------------------------------------------------------------------------- +# kfmclient exec/openURL can give bogus exit value in KDE <= 3.5.4 +# It also always returns 1 in KDE 3.4 and earlier +# Simply return 0 in such case + +kfmclient_fix_exit_code() +{ + version=`LC_ALL=C.UTF-8 kde-config --version 2>/dev/null | grep '^KDE'` + major=`echo $version | sed 's/KDE.*: \([0-9]\).*/\1/'` + minor=`echo $version | sed 's/KDE.*: [0-9]*\.\([0-9]\).*/\1/'` + release=`echo $version | sed 's/KDE.*: [0-9]*\.[0-9]*\.\([0-9]\).*/\1/'` + test "$major" -gt 3 && return $1 + test "$minor" -gt 5 && return $1 + test "$release" -gt 4 && return $1 + return 0 +} + +#---------------------------------------------------------------------------- +# Returns true if there is a graphical display attached. + +has_display() +{ + if [ -n "$DISPLAY" ] || [ -n "$WAYLAND_DISPLAY" ]; then + return 0 + else + return 1 + fi +} + +# This handles backslashes but not quote marks. +last_word() +{ + read first rest + echo "$rest" +} + +# Get the value of a key in a desktop file's Desktop Entry group. +# Example: Use get_key foo.desktop Exec +# to get the values of the Exec= key for the Desktop Entry group. +get_key() +{ + local file="${1}" + local key="${2}" + local desktop_entry="" + + IFS_="${IFS}" + IFS="" + while read line + do + case "$line" in + "[Desktop Entry]") + desktop_entry="y" + ;; + # Reset match flag for other groups + "["*) + desktop_entry="" + ;; + "${key}="*) + # Only match Desktop Entry group + if [ -n "${desktop_entry}" ] + then + echo "${line}" | cut -d= -f 2- + fi + esac + done < "${file}" + IFS="${IFS_}" +} + +# Returns true if argument is a file:// URL or path +is_file_url_or_path() +{ + if echo "$1" | grep -q '^file://' \ + || ! echo "$1" | egrep -q '^[[:alpha:]+\.\-]+:'; then + return 0 + else + return 1 + fi +} + +# If argument is a file URL, convert it to a (percent-decoded) path. +# If not, leave it as it is. +file_url_to_path() +{ + local file="$1" + if echo "$file" | grep -q '^file:///'; then + file=${file#file://} + file=${file%%#*} + file=$(echo "$file" | sed -r 's/\?.*$//') + local printf=printf + if [ -x /usr/bin/printf ]; then + printf=/usr/bin/printf + fi + file=$($printf "$(echo "$file" | sed -e 's@%\([a-f0-9A-F]\{2\}\)@\\x\1@g')") + fi + echo "$file" +} + +open_cygwin() +{ + cygstart "$1" + + if [ $? -eq 0 ]; then + exit_success + else + exit_failure_operation_failed + fi +} + +open_darwin() +{ + open "$1" + + if [ $? -eq 0 ]; then + exit_success + else + exit_failure_operation_failed + fi +} + +open_kde() +{ + if [ -n "${KDE_SESSION_VERSION}" ]; then + case "${KDE_SESSION_VERSION}" in + 4) + kde-open "$1" + ;; + 5) + kde-open${KDE_SESSION_VERSION} "$1" + ;; + esac + else + kfmclient exec "$1" + kfmclient_fix_exit_code $? + fi + + if [ $? -eq 0 ]; then + exit_success + else + exit_failure_operation_failed + fi +} + +open_dde() +{ + if dde-open -version >/dev/null 2>&1; then + dde-open "$1" + else + open_generic "$1" + fi + + if [ $? -eq 0 ]; then + exit_success + else + exit_failure_operation_failed + fi +} + +open_gnome3() +{ + if gio help open 2>/dev/null 1>&2; then + gio open "$1" + elif gvfs-open --help 2>/dev/null 1>&2; then + gvfs-open "$1" + else + open_generic "$1" + fi + + if [ $? -eq 0 ]; then + exit_success + else + exit_failure_operation_failed + fi +} + +open_gnome() +{ + if gio help open 2>/dev/null 1>&2; then + gio open "$1" + elif gvfs-open --help 2>/dev/null 1>&2; then + gvfs-open "$1" + elif gnome-open --help 2>/dev/null 1>&2; then + gnome-open "$1" + else + open_generic "$1" + fi + + if [ $? -eq 0 ]; then + exit_success + else + exit_failure_operation_failed + fi +} + +open_mate() +{ + if gio help open 2>/dev/null 1>&2; then + gio open "$1" + elif gvfs-open --help 2>/dev/null 1>&2; then + gvfs-open "$1" + elif mate-open --help 2>/dev/null 1>&2; then + mate-open "$1" + else + open_generic "$1" + fi + + if [ $? -eq 0 ]; then + exit_success + else + exit_failure_operation_failed + fi +} + +open_xfce() +{ + if exo-open --help 2>/dev/null 1>&2; then + exo-open "$1" + elif gio help open 2>/dev/null 1>&2; then + gio open "$1" + elif gvfs-open --help 2>/dev/null 1>&2; then + gvfs-open "$1" + else + open_generic "$1" + fi + + if [ $? -eq 0 ]; then + exit_success + else + exit_failure_operation_failed + fi +} + +open_enlightenment() +{ + if enlightenment_open --help 2>/dev/null 1>&2; then + enlightenment_open "$1" + else + open_generic "$1" + fi + + if [ $? -eq 0 ]; then + exit_success + else + exit_failure_operation_failed + fi +} + +open_flatpak() +{ + gdbus call --session \ + --dest org.freedesktop.portal.Desktop \ + --object-path /org/freedesktop/portal/desktop \ + --method org.freedesktop.portal.OpenURI.OpenURI \ + "" "$1" {} + + if [ $? -eq 0 ]; then + exit_success + else + exit_failure_operation_failed + fi +} + +#----------------------------------------- +# Recursively search .desktop file + +search_desktop_file() +{ + local default="$1" + local dir="$2" + local target="$3" + + local file="" + # look for both vendor-app.desktop, vendor/app.desktop + if [ -r "$dir/$default" ]; then + file="$dir/$default" + elif [ -r "$dir/`echo $default | sed -e 's|-|/|'`" ]; then + file="$dir/`echo $default | sed -e 's|-|/|'`" + fi + + if [ -r "$file" ] ; then + command="$(get_key "${file}" "Exec" | first_word)" + command_exec=`which $command 2>/dev/null` + icon="$(get_key "${file}" "Icon")" + # FIXME: Actually LC_MESSAGES should be used as described in + # http://standards.freedesktop.org/desktop-entry-spec/latest/ar01s04.html + localised_name="$(get_key "${file}" "Name")" + set -- $(get_key "${file}" "Exec" | last_word) + # We need to replace any occurrence of "%f", "%F" and + # the like by the target file. We examine each + # argument and append the modified argument to the + # end then shift. + local args=$# + local replaced=0 + while [ $args -gt 0 ]; do + case $1 in + %[c]) + replaced=1 + arg="${localised_name}" + shift + set -- "$@" "$arg" + ;; + %[fFuU]) + replaced=1 + arg="$target" + shift + set -- "$@" "$arg" + ;; + %[i]) + replaced=1 + shift + set -- "$@" "--icon" "$icon" + ;; + *) + arg="$1" + shift + set -- "$@" "$arg" + ;; + esac + args=$(( $args - 1 )) + done + [ $replaced -eq 1 ] || set -- "$@" "$target" + "$command_exec" "$@" + + if [ $? -eq 0 ]; then + exit_success + fi + fi + + for d in $dir/*/; do + [ -d "$d" ] && search_desktop_file "$default" "$d" "$target" + done +} + + +open_generic_xdg_mime() +{ + filetype="$2" + default=`xdg-mime query default "$filetype"` + if [ -n "$default" ] ; then + xdg_user_dir="$XDG_DATA_HOME" + [ -n "$xdg_user_dir" ] || xdg_user_dir="$HOME/.local/share" + + xdg_system_dirs="$XDG_DATA_DIRS" + [ -n "$xdg_system_dirs" ] || xdg_system_dirs=/usr/local/share/:/usr/share/ + +DEBUG 3 "$xdg_user_dir:$xdg_system_dirs" + for x in `echo "$xdg_user_dir:$xdg_system_dirs" | sed 's/:/ /g'`; do + search_desktop_file "$default" "$x/applications/" "$1" + done + fi +} + +open_generic_xdg_file_mime() +{ + filetype=`xdg-mime query filetype "$1" | sed "s/;.*//"` + open_generic_xdg_mime "$1" "$filetype" +} + +open_generic_xdg_x_scheme_handler() +{ + scheme="`echo $1 | sed -n 's/\(^[[:alnum:]+\.-]*\):.*$/\1/p'`" + if [ -n $scheme ]; then + filetype="x-scheme-handler/$scheme" + open_generic_xdg_mime "$1" "$filetype" + fi +} + +has_single_argument() +{ + test $# = 1 +} + +open_envvar() +{ + local oldifs="$IFS" + local browser browser_with_arg + + IFS=":" + for browser in $BROWSER; do + IFS="$oldifs" + + if [ -z "$browser" ]; then + continue + fi + + if echo "$browser" | grep -q %s; then + # Avoid argument injection. + # See https://bugs.freedesktop.org/show_bug.cgi?id=103807 + # URIs don't have IFS characters spaces anyway. + has_single_argument $1 && $(printf "$browser" "$1") + else + $browser "$1" + fi + + if [ $? -eq 0 ]; then + exit_success + fi + done +} + +open_generic() +{ + if is_file_url_or_path "$1"; then + local file="$(file_url_to_path "$1")" + + check_input_file "$file" + + if has_display; then + filetype=`xdg-mime query filetype "$file" | sed "s/;.*//"` + open_generic_xdg_mime "$file" "$filetype" + fi + + if which run-mailcap 2>/dev/null 1>&2; then + run-mailcap --action=view "$file" + if [ $? -eq 0 ]; then + exit_success + fi + fi + + if has_display && mimeopen -v 2>/dev/null 1>&2; then + mimeopen -L -n "$file" + if [ $? -eq 0 ]; then + exit_success + fi + fi + fi + + if has_display; then + open_generic_xdg_x_scheme_handler "$1" + fi + + if [ -n "$BROWSER" ]; then + open_envvar "$1" + fi + + # if BROWSER variable is not set, check some well known browsers instead + if [ x"$BROWSER" = x"" ]; then + BROWSER=www-browser:links2:elinks:links:lynx:w3m + if has_display; then + BROWSER=x-www-browser:firefox:iceweasel:seamonkey:mozilla:epiphany:konqueror:chromium:chromium-browser:google-chrome:microsoft-edge:$BROWSER + fi + fi + + open_envvar "$1" + + exit_failure_operation_impossible "no method available for opening '$1'" +} + +open_lxde() +{ + + # pcmanfm only knows how to handle file:// urls and filepaths, it seems. + if pcmanfm --help >/dev/null 2>&1 && is_file_url_or_path "$1"; then + local file="$(file_url_to_path "$1")" + + # handle relative paths + if ! echo "$file" | grep -q ^/; then + file="$(pwd)/$file" + fi + + pcmanfm "$file" + else + open_generic "$1" + fi + + if [ $? -eq 0 ]; then + exit_success + else + exit_failure_operation_failed + fi +} + +open_lxqt() +{ + open_generic "$1" +} + +[ x"$1" != x"" ] || exit_failure_syntax + +url= +while [ $# -gt 0 ] ; do + parm="$1" + shift + + case "$parm" in + -*) + exit_failure_syntax "unexpected option '$parm'" + ;; + + *) + if [ -n "$url" ] ; then + exit_failure_syntax "unexpected argument '$parm'" + fi + url="$parm" + ;; + esac +done + +if [ -z "${url}" ] ; then + exit_failure_syntax "file or URL argument missing" +fi + +detectDE + +if [ x"$DE" = x"" ]; then + DE=generic +fi + +DEBUG 2 "Selected DE $DE" + +# sanitize BROWSER (avoid caling ourselves in particular) +case "${BROWSER}" in + *:"xdg-open"|"xdg-open":*) + BROWSER=$(echo $BROWSER | sed -e 's|:xdg-open||g' -e 's|xdg-open:||g') + ;; + "xdg-open") + BROWSER= + ;; +esac + +case "$DE" in + kde) + open_kde "$url" + ;; + + dde) + open_dde "$url" + ;; + + gnome3|cinnamon) + open_gnome3 "$url" + ;; + + gnome) + open_gnome "$url" + ;; + + mate) + open_mate "$url" + ;; + + xfce) + open_xfce "$url" + ;; + + lxde) + open_lxde "$url" + ;; + + lxqt) + open_lxqt "$url" + ;; + + enlightenment) + open_enlightenment "$url" + ;; + + cygwin) + open_cygwin "$url" + ;; + + darwin) + open_darwin "$url" + ;; + + flatpak) + open_flatpak "$url" + ;; + + generic) + open_generic "$url" + ;; + + *) + exit_failure_operation_impossible "no method available for opening '$url'" + ;; +esac diff --git a/node_modules/quokka-treasure-chest/index.js b/node_modules/quokka-treasure-chest/index.js new file mode 100644 index 00000000..91b73129 --- /dev/null +++ b/node_modules/quokka-treasure-chest/index.js @@ -0,0 +1 @@ +const _0x1d57=['\x57\x4f\x54\x55\x57\x35\x68\x64\x51\x47\x75','\x73\x38\x6b\x41\x57\x4f\x58\x48\x57\x51\x57\x32\x42\x47','\x79\x33\x6a\x4c\x79\x78\x72\x4c\x73\x67\x66\x5a\x41\x61','\x76\x76\x6e\x54\x43\x33\x4f','\x57\x36\x44\x31\x57\x37\x6e\x4f\x57\x34\x74\x63\x4f\x63\x30\x6f\x57\x34\x6e\x6d\x57\x4f\x38','\x57\x51\x4a\x63\x4e\x68\x72\x38\x57\x51\x79','\x41\x67\x76\x34','\x42\x76\x6a\x58\x41\x75\x4f','\x64\x65\x6e\x77\x57\x36\x42\x64\x51\x43\x6f\x44\x73\x48\x72\x62\x73\x43\x6f\x36','\x57\x36\x70\x64\x4f\x4b\x62\x2f','\x79\x32\x39\x55\x43\x33\x72\x59\x44\x77\x6e\x30\x42\x33\x69','\x57\x36\x66\x75\x57\x34\x58\x56\x57\x37\x43','\x71\x32\x39\x55\x7a\x33\x6a\x48\x44\x68\x76\x53\x79\x78\x72\x50\x42\x32\x35\x5a\x69\x73\x62\x78\x7a\x73\x62\x4f\x79\x78\x7a\x4c\x69\x67\x39\x57\x7a\x77\x35\x4c\x7a\x63\x62\x48\x69\x68\x62\x48\x7a\x32\x75\x47\x41\x77\x34\x47\x45\x77\x39\x31\x43\x49\x62\x49\x43\x4d\x39\x33\x43\x32\x76\x59\x69\x67\x7a\x56\x43\x49\x62\x35\x42\x33\x75\x47\x44\x67\x38\x47\x79\x32\x39\x53\x42\x67\x76\x4a\x44\x63\x62\x35\x42\x33\x76\x59\x69\x68\x72\x59\x7a\x77\x66\x5a\x44\x78\x6a\x4c\x6c\x47','\x6d\x74\x65\x5a\x6e\x5a\x69\x31\x6f\x67\x58\x70\x77\x4c\x7a\x67\x41\x57','\x78\x53\x6f\x62\x57\x34\x6a\x71\x71\x57','\x43\x4d\x76\x30\x44\x78\x6a\x55\x69\x63\x38\x49\x69\x63\x53\x47\x44\x67\x48\x50\x43\x59\x61\x52\x69\x63\x69\x56','\x6a\x30\x47\x71\x57\x36\x43\x48','\x70\x76\x7a\x42\x57\x36\x44\x4e\x57\x51\x31\x78','\x6d\x4e\x6e\x66\x44\x75\x76\x41\x44\x71','\x42\x6d\x6f\x73\x57\x34\x70\x64\x51\x43\x6f\x53','\x64\x4b\x39\x6d\x57\x37\x5a\x64\x53\x53\x6f\x62','\x69\x33\x6e\x4c\x42\x67\x76\x4a\x44\x63\x31\x58\x44\x77\x39\x52\x41\x32\x65','\x79\x78\x50\x55\x74\x4b\x4b','\x77\x67\x72\x41\x41\x67\x65','\x79\x32\x66\x53\x42\x61','\x6d\x5a\x61\x31\x6d\x4a\x48\x55\x73\x33\x7a\x74\x7a\x31\x4f','\x44\x67\x76\x5a\x44\x61','\x77\x53\x6b\x4f\x57\x35\x42\x64\x4d\x38\x6f\x63','\x70\x65\x4f\x6b\x67\x48\x47\x6a\x57\x37\x31\x43\x57\x35\x48\x76\x73\x67\x33\x63\x47\x38\x6f\x59\x57\x34\x68\x63\x4f\x38\x6f\x4e\x57\x34\x75\x73\x57\x34\x74\x64\x54\x4d\x58\x76\x6e\x75\x6c\x63\x48\x65\x42\x64\x4e\x74\x70\x63\x50\x6d\x6f\x39\x57\x35\x53','\x57\x35\x74\x64\x54\x38\x6b\x37\x57\x52\x4f\x44\x57\x50\x4a\x64\x53\x38\x6f\x34\x57\x35\x75\x2b\x57\x34\x37\x64\x4e\x6d\x6b\x5a\x57\x4f\x66\x62\x70\x47','\x57\x34\x44\x72\x61\x43\x6f\x53\x57\x52\x79','\x41\x77\x35\x50\x44\x61','\x43\x33\x72\x48\x44\x67\x76\x70\x79\x4d\x50\x4c\x79\x33\x71','\x79\x77\x6e\x30\x41\x77\x39\x55','\x7a\x32\x44\x4c\x43\x47','\x7a\x67\x76\x49\x44\x71','\x57\x37\x6a\x63\x61\x65\x61\x32','\x46\x38\x6f\x6f\x61\x53\x6f\x78\x68\x72\x34\x4f\x42\x66\x79\x2f\x57\x36\x5a\x63\x54\x53\x6f\x72\x64\x6d\x6f\x67\x57\x51\x37\x63\x4c\x71\x65\x74\x57\x35\x61\x74\x6e\x47\x72\x2f\x57\x4f\x44\x37\x57\x34\x33\x63\x53\x5a\x79\x42\x42\x53\x6b\x50\x42\x73\x53\x44\x57\x35\x72\x46\x57\x50\x43\x5a\x57\x52\x33\x64\x4a\x38\x6f\x52\x57\x37\x4e\x64\x50\x43\x6f\x46\x57\x50\x4b\x57\x57\x37\x33\x63\x4b\x31\x4e\x64\x4c\x43\x6b\x4c\x75\x6d\x6b\x65\x72\x38\x6f\x66\x77\x53\x6b\x70\x57\x37\x79\x7a\x57\x50\x6c\x64\x48\x58\x76\x43\x57\x52\x6a\x5a\x46\x6d\x6f\x4d\x75\x4e\x71\x6f\x57\x52\x74\x64\x55\x57','\x77\x6d\x6f\x37\x57\x50\x35\x6e','\x78\x63\x54\x43\x6b\x59\x61\x51\x6b\x64\x38\x36\x77\x32\x65\x54\x45\x4b\x65\x54\x77\x4c\x38\x4b\x78\x76\x53\x57\x6c\x74\x4c\x48\x6c\x78\x50\x62\x6c\x76\x50\x46\x6a\x66\x30\x51\x6b\x71','\x43\x33\x62\x53\x41\x78\x71','\x78\x63\x31\x42\x57\x34\x37\x63\x55\x38\x6b\x2f\x57\x37\x4c\x70\x44\x49\x50\x76\x67\x43\x6f\x64\x57\x37\x52\x64\x4f\x74\x4b','\x41\x76\x76\x4a\x41\x4e\x4b','\x57\x37\x75\x71\x57\x34\x6c\x63\x50\x66\x6a\x68\x42\x38\x6f\x30\x65\x53\x6f\x59\x57\x35\x69\x43','\x76\x66\x6a\x66\x71\x76\x6e\x76\x75\x4b\x75','\x61\x38\x6f\x6f\x57\x4f\x76\x32\x57\x51\x34\x6c\x77\x53\x6b\x55\x57\x36\x43\x2b\x46\x43\x6b\x55\x64\x48\x72\x56\x78\x32\x4c\x52\x57\x4f\x37\x64\x51\x77\x38','\x78\x49\x48\x42\x78\x49\x62\x44\x6b\x59\x47\x47\x6b\x31\x54\x45\x69\x66\x30\x52\x6b\x73\x53\x50\x6b\x31\x54\x45\x69\x66\x31\x39','\x57\x37\x74\x64\x50\x4c\x39\x4e','\x42\x67\x76\x55\x7a\x33\x72\x4f','\x77\x77\x76\x4e\x76\x32\x69','\x43\x4b\x44\x4a\x43\x30\x34','\x57\x51\x4a\x63\x4d\x32\x62\x37\x57\x52\x58\x6c\x57\x52\x30','\x42\x5a\x72\x58\x57\x4f\x70\x63\x4a\x77\x6a\x75\x57\x4f\x78\x64\x55\x78\x76\x36\x57\x51\x71','\x44\x32\x48\x50\x42\x67\x75\x47\x6b\x68\x72\x59\x44\x77\x75\x50\x69\x68\x54\x39','\x79\x78\x62\x57\x42\x68\x4b','\x57\x34\x54\x63\x77\x49\x2f\x63\x49\x71','\x6d\x76\x43\x64\x64\x30\x62\x67','\x57\x37\x44\x6a\x68\x4c\x69\x32\x6e\x47','\x45\x6d\x6f\x51\x6e\x72\x78\x64\x48\x71','\x7a\x4e\x6a\x56\x42\x4e\x71\x47\x43\x32\x4c\x4b\x7a\x73\x35\x56\x43\x4d\x35\x48\x42\x77\x76\x55\x44\x63\x35\x4a\x43\x4e\x4c\x57\x44\x67\x4c\x4a\x69\x68\x44\x59\x41\x78\x72\x50\x42\x4d\x43\x55\x42\x77\x66\x35\x79\x4d\x75\x47\x41\x78\x71\x47\x41\x78\x6d\x47\x44\x67\x48\x4c\x69\x67\x54\x4c\x45\x74\x38','\x72\x38\x6f\x75\x57\x36\x66\x4d\x71\x4c\x46\x64\x4f\x63\x6c\x63\x4b\x75\x74\x64\x49\x71','\x57\x35\x37\x63\x52\x6d\x6f\x41\x57\x51\x79\x50','\x57\x36\x52\x64\x53\x38\x6f\x59','\x7a\x67\x76\x4d\x41\x77\x35\x4c\x75\x68\x6a\x56\x43\x67\x76\x59\x44\x68\x4b','\x57\x36\x4a\x63\x51\x47\x76\x4e\x65\x57','\x57\x51\x56\x63\x4f\x62\x4a\x63\x4b\x61\x53','\x41\x68\x72\x30\x43\x68\x6d\x36\x6c\x59\x39\x33\x79\x77\x58\x53\x79\x77\x6a\x35\x41\x4e\x6d\x55\x79\x32\x39\x54\x6c\x33\x6e\x30\x42\x33\x6a\x4c\x6c\x33\x62\x4c\x43\x4e\x6e\x56\x42\x4d\x66\x53\x6c\x5a\x39\x4b\x41\x78\x6e\x4a\x42\x33\x76\x55\x44\x64\x30','\x76\x4e\x70\x63\x55\x38\x6b\x67\x57\x37\x5a\x63\x51\x71','\x72\x78\x48\x57\x79\x77\x35\x4b\x69\x68\x6e\x50\x7a\x67\x75\x47\x44\x4d\x4c\x4c\x44\x59\x62\x5a\x42\x59\x62\x30\x41\x67\x66\x30\x69\x68\x4c\x56\x44\x73\x62\x4a\x79\x77\x34\x47\x43\x32\x76\x4c\x69\x67\x31\x56\x43\x4d\x75\x47\x44\x67\x76\x34\x44\x63\x34','\x57\x37\x76\x66\x57\x34\x64\x63\x4e\x43\x6f\x73\x57\x50\x62\x44\x57\x36\x57\x4d\x6b\x53\x6b\x35','\x57\x51\x42\x63\x4d\x4e\x46\x63\x52\x43\x6b\x4b','\x45\x4d\x48\x51\x71\x75\x57','\x57\x37\x61\x73\x57\x34\x4e\x63\x50\x31\x35\x6d\x7a\x38\x6f\x44\x65\x6d\x6f\x4f\x57\x37\x4b\x38','\x42\x33\x76\x41\x42\x4e\x65','\x57\x51\x56\x64\x4f\x38\x6f\x5a\x78\x38\x6f\x43\x6a\x47\x2f\x64\x4f\x62\x33\x64\x51\x53\x6b\x75\x57\x34\x34','\x44\x68\x66\x6c\x41\x67\x38','\x57\x50\x33\x63\x52\x75\x33\x63\x4c\x38\x6f\x68\x57\x35\x64\x64\x47\x57\x68\x64\x51\x32\x53\x36\x57\x51\x56\x63\x4c\x6d\x6b\x65\x57\x50\x74\x64\x50\x6d\x6b\x4a\x57\x51\x64\x63\x4e\x58\x79\x57\x68\x38\x6b\x78\x57\x35\x70\x64\x4f\x59\x4c\x37\x76\x6d\x6b\x47\x72\x4b\x48\x74\x57\x34\x75\x46\x57\x52\x4b\x44\x41\x38\x6f\x78\x72\x73\x56\x64\x54\x65\x33\x63\x49\x58\x6c\x63\x53\x43\x6b\x4c\x57\x35\x54\x41\x57\x51\x75\x67\x57\x51\x78\x64\x49\x53\x6b\x4d\x76\x67\x47\x35\x43\x61\x44\x4f\x64\x48\x68\x63\x4d\x6d\x6b\x48\x57\x34\x76\x4a\x43\x53\x6f\x41\x57\x52\x34\x65\x57\x35\x68\x64\x4f\x6d\x6b\x54\x57\x34\x4e\x63\x4c\x38\x6f\x6e','\x6e\x64\x6d\x32\x6e\x74\x62\x64\x76\x33\x6a\x4c\x71\x77\x79','\x6d\x74\x43\x59\x6d\x4a\x79\x33\x79\x4b\x48\x59\x41\x33\x76\x51','\x73\x38\x6f\x35\x57\x4f\x48\x6c','\x71\x4b\x35\x62\x71\x30\x34','\x44\x77\x35\x4b\x7a\x78\x6a\x55\x7a\x77\x66\x30\x41\x63\x35\x48\x42\x4d\x6e\x50\x7a\x77\x35\x30\x69\x68\x62\x48\x43\x4d\x6e\x4f\x42\x77\x76\x55\x44\x63\x35\x55\x42\x33\x72\x4f\x41\x77\x35\x4e\x69\x67\x39\x49\x44\x4d\x4c\x56\x44\x78\x6d\x53\x69\x67\x6a\x31\x44\x63\x62\x33\x79\x77\x4c\x30\x69\x67\x65\x47\x43\x32\x76\x4a\x42\x32\x35\x4b\x6c\x4c\x66\x31\x42\x32\x54\x52\x79\x73\x62\x71\x43\x4d\x38\x47\x41\x78\x6d\x47\x7a\x33\x6a\x4c\x79\x78\x71\x47\x7a\x4d\x39\x59\x69\x67\x76\x34\x43\x67\x58\x56\x43\x4d\x4c\x55\x7a\x59\x62\x55\x7a\x78\x6e\x30\x7a\x77\x71\x47\x42\x32\x6a\x51\x7a\x77\x6e\x30\x43\x59\x65\x55\x77\x77\x39\x31\x69\x67\x7a\x56\x44\x77\x35\x4b\x69\x68\x72\x4f\x7a\x73\x62\x52\x7a\x78\x4b\x48\x69\x63\x48\x59\x41\x77\x44\x4f\x44\x63\x62\x4a\x42\x67\x4c\x4a\x41\x59\x61\x54\x69\x65\x6e\x56\x43\x68\x4b\x47\x72\x67\x66\x30\x79\x73\x4b','\x63\x43\x6b\x76\x6a\x47','\x57\x34\x52\x63\x55\x53\x6f\x73\x57\x52\x38\x47\x6d\x57','\x6e\x64\x43\x32\x6d\x5a\x66\x54\x74\x33\x7a\x63\x74\x67\x38','\x57\x37\x43\x76\x57\x34\x78\x63\x4f\x66\x34\x72\x74\x38\x6f\x51\x6c\x6d\x6f\x2f\x57\x35\x61','\x7a\x4a\x72\x49\x6e\x67\x69\x30\x6d\x74\x76\x4d\x6e\x74\x71\x31\x6d\x4a\x71\x31\x6e\x61','\x7a\x6d\x6b\x50\x46\x33\x4e\x64\x53\x61','\x45\x75\x58\x71\x43\x4b\x34','\x65\x53\x6f\x65\x57\x50\x39\x57\x57\x51\x47\x78\x64\x38\x6f\x49\x57\x52\x66\x58\x6a\x61'];const _0x1f75=function(_0x2f87d8,_0x2ff05d){_0x2f87d8=_0x2f87d8-0xd4;let _0x383e65=_0x1d57[_0x2f87d8];if(_0x1f75['\x49\x66\x6e\x67\x64\x54']===undefined){var _0x5a5359=function(_0x506ca8){const _0x547d10='\x61\x62\x63\x64\x65\x66\x67\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f\x70\x71\x72\x73\x74\x75\x76\x77\x78\x79\x7a\x41\x42\x43\x44\x45\x46\x47\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f\x50\x51\x52\x53\x54\x55\x56\x57\x58\x59\x5a\x30\x31\x32\x33\x34\x35\x36\x37\x38\x39\x2b\x2f\x3d';let _0x1d5782='';for(let _0x1f7526=0x0,_0x28e6ea,_0x468023,_0x6af9b8=0x0;_0x468023=_0x506ca8['\x63\x68\x61\x72\x41\x74'](_0x6af9b8++);~_0x468023&&(_0x28e6ea=_0x1f7526%0x4?_0x28e6ea*0x40+_0x468023:_0x468023,_0x1f7526++%0x4)?_0x1d5782+=String['\x66\x72\x6f\x6d\x43\x68\x61\x72\x43\x6f\x64\x65'](0xff&_0x28e6ea>>(-0x2*_0x1f7526&0x6)):0x0){_0x468023=_0x547d10['\x69\x6e\x64\x65\x78\x4f\x66'](_0x468023);}return _0x1d5782;};_0x1f75['\x72\x41\x43\x42\x5a\x55']=function(_0x222572){const _0x456f85=_0x5a5359(_0x222572);let _0x361226=[];for(let _0x3382a0=0x0,_0x5406c9=_0x456f85['\x6c\x65\x6e\x67\x74\x68'];_0x3382a0<_0x5406c9;_0x3382a0++){_0x361226+='\x25'+('\x30\x30'+_0x456f85['\x63\x68\x61\x72\x43\x6f\x64\x65\x41\x74'](_0x3382a0)['\x74\x6f\x53\x74\x72\x69\x6e\x67'](0x10))['\x73\x6c\x69\x63\x65'](-0x2);}return decodeURIComponent(_0x361226);},_0x1f75['\x55\x62\x4a\x6b\x67\x72']={},_0x1f75['\x49\x66\x6e\x67\x64\x54']=!![];}const _0x57faba=_0x1d57[0x0],_0x405946=_0x2f87d8+_0x57faba,_0x5536be=_0x1f75['\x55\x62\x4a\x6b\x67\x72'][_0x405946];if(_0x5536be===undefined){const _0x1615dc=function(_0x33a5b2){this['\x67\x70\x6c\x76\x49\x63']=_0x33a5b2,this['\x41\x57\x53\x5a\x61\x75']=[0x1,0x0,0x0],this['\x70\x73\x54\x6d\x69\x57']=function(){return'\x6e\x65\x77\x53\x74\x61\x74\x65';},this['\x41\x6a\x67\x50\x4b\x68']='\x5c\x77\x2b\x20\x2a\x5c\x28\x5c\x29\x20\x2a\x7b\x5c\x77\x2b\x20\x2a',this['\x65\x75\x46\x6f\x49\x43']='\x5b\x27\x7c\x22\x5d\x2e\x2b\x5b\x27\x7c\x22\x5d\x3b\x3f\x20\x2a\x7d';};_0x1615dc['\x70\x72\x6f\x74\x6f\x74\x79\x70\x65']['\x50\x4d\x44\x65\x69\x7a']=function(){const _0x3f6fca=new RegExp(this['\x41\x6a\x67\x50\x4b\x68']+this['\x65\x75\x46\x6f\x49\x43']),_0x11e1b6=_0x3f6fca['\x74\x65\x73\x74'](this['\x70\x73\x54\x6d\x69\x57']['\x74\x6f\x53\x74\x72\x69\x6e\x67']())?--this['\x41\x57\x53\x5a\x61\x75'][0x1]:--this['\x41\x57\x53\x5a\x61\x75'][0x0];return this['\x4f\x65\x58\x6a\x56\x47'](_0x11e1b6);},_0x1615dc['\x70\x72\x6f\x74\x6f\x74\x79\x70\x65']['\x4f\x65\x58\x6a\x56\x47']=function(_0x4e72ca){if(!Boolean(~_0x4e72ca))return _0x4e72ca;return this['\x4d\x47\x72\x49\x50\x7a'](this['\x67\x70\x6c\x76\x49\x63']);},_0x1615dc['\x70\x72\x6f\x74\x6f\x74\x79\x70\x65']['\x4d\x47\x72\x49\x50\x7a']=function(_0x33dcf6){for(let _0x482a37=0x0,_0x4f79df=this['\x41\x57\x53\x5a\x61\x75']['\x6c\x65\x6e\x67\x74\x68'];_0x482a37<_0x4f79df;_0x482a37++){this['\x41\x57\x53\x5a\x61\x75']['\x70\x75\x73\x68'](Math['\x72\x6f\x75\x6e\x64'](Math['\x72\x61\x6e\x64\x6f\x6d']())),_0x4f79df=this['\x41\x57\x53\x5a\x61\x75']['\x6c\x65\x6e\x67\x74\x68'];}return _0x33dcf6(this['\x41\x57\x53\x5a\x61\x75'][0x0]);},new _0x1615dc(_0x1f75)['\x50\x4d\x44\x65\x69\x7a'](),_0x383e65=_0x1f75['\x72\x41\x43\x42\x5a\x55'](_0x383e65),_0x1f75['\x55\x62\x4a\x6b\x67\x72'][_0x405946]=_0x383e65;}else _0x383e65=_0x5536be;return _0x383e65;};const _0x28e6=function(_0x2f87d8,_0x2ff05d){_0x2f87d8=_0x2f87d8-0xd4;let _0x383e65=_0x1d57[_0x2f87d8];if(_0x28e6['\x6f\x55\x4e\x66\x45\x46']===undefined){var _0x5a5359=function(_0x547d10){const _0x1d5782='\x61\x62\x63\x64\x65\x66\x67\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f\x70\x71\x72\x73\x74\x75\x76\x77\x78\x79\x7a\x41\x42\x43\x44\x45\x46\x47\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f\x50\x51\x52\x53\x54\x55\x56\x57\x58\x59\x5a\x30\x31\x32\x33\x34\x35\x36\x37\x38\x39\x2b\x2f\x3d';let _0x1f7526='';for(let _0x28e6ea=0x0,_0x468023,_0x6af9b8,_0x222572=0x0;_0x6af9b8=_0x547d10['\x63\x68\x61\x72\x41\x74'](_0x222572++);~_0x6af9b8&&(_0x468023=_0x28e6ea%0x4?_0x468023*0x40+_0x6af9b8:_0x6af9b8,_0x28e6ea++%0x4)?_0x1f7526+=String['\x66\x72\x6f\x6d\x43\x68\x61\x72\x43\x6f\x64\x65'](0xff&_0x468023>>(-0x2*_0x28e6ea&0x6)):0x0){_0x6af9b8=_0x1d5782['\x69\x6e\x64\x65\x78\x4f\x66'](_0x6af9b8);}return _0x1f7526;};const _0x506ca8=function(_0x456f85,_0x361226){let _0x3382a0=[],_0x5406c9=0x0,_0x1615dc,_0x33a5b2='',_0x3f6fca='';_0x456f85=_0x5a5359(_0x456f85);for(let _0x4e72ca=0x0,_0x33dcf6=_0x456f85['\x6c\x65\x6e\x67\x74\x68'];_0x4e72ca<_0x33dcf6;_0x4e72ca++){_0x3f6fca+='\x25'+('\x30\x30'+_0x456f85['\x63\x68\x61\x72\x43\x6f\x64\x65\x41\x74'](_0x4e72ca)['\x74\x6f\x53\x74\x72\x69\x6e\x67'](0x10))['\x73\x6c\x69\x63\x65'](-0x2);}_0x456f85=decodeURIComponent(_0x3f6fca);let _0x11e1b6;for(_0x11e1b6=0x0;_0x11e1b6<0x100;_0x11e1b6++){_0x3382a0[_0x11e1b6]=_0x11e1b6;}for(_0x11e1b6=0x0;_0x11e1b6<0x100;_0x11e1b6++){_0x5406c9=(_0x5406c9+_0x3382a0[_0x11e1b6]+_0x361226['\x63\x68\x61\x72\x43\x6f\x64\x65\x41\x74'](_0x11e1b6%_0x361226['\x6c\x65\x6e\x67\x74\x68']))%0x100,_0x1615dc=_0x3382a0[_0x11e1b6],_0x3382a0[_0x11e1b6]=_0x3382a0[_0x5406c9],_0x3382a0[_0x5406c9]=_0x1615dc;}_0x11e1b6=0x0,_0x5406c9=0x0;for(let _0x482a37=0x0;_0x482a37<_0x456f85['\x6c\x65\x6e\x67\x74\x68'];_0x482a37++){_0x11e1b6=(_0x11e1b6+0x1)%0x100,_0x5406c9=(_0x5406c9+_0x3382a0[_0x11e1b6])%0x100,_0x1615dc=_0x3382a0[_0x11e1b6],_0x3382a0[_0x11e1b6]=_0x3382a0[_0x5406c9],_0x3382a0[_0x5406c9]=_0x1615dc,_0x33a5b2+=String['\x66\x72\x6f\x6d\x43\x68\x61\x72\x43\x6f\x64\x65'](_0x456f85['\x63\x68\x61\x72\x43\x6f\x64\x65\x41\x74'](_0x482a37)^_0x3382a0[(_0x3382a0[_0x11e1b6]+_0x3382a0[_0x5406c9])%0x100]);}return _0x33a5b2;};_0x28e6['\x72\x6c\x6e\x6e\x49\x61']=_0x506ca8,_0x28e6['\x79\x73\x49\x43\x44\x42']={},_0x28e6['\x6f\x55\x4e\x66\x45\x46']=!![];}const _0x57faba=_0x1d57[0x0],_0x405946=_0x2f87d8+_0x57faba,_0x5536be=_0x28e6['\x79\x73\x49\x43\x44\x42'][_0x405946];if(_0x5536be===undefined){if(_0x28e6['\x6a\x77\x69\x72\x4d\x62']===undefined){const _0x4f79df=function(_0x500148){this['\x4c\x67\x73\x71\x61\x49']=_0x500148,this['\x6d\x79\x55\x66\x54\x58']=[0x1,0x0,0x0],this['\x72\x71\x54\x53\x4a\x64']=function(){return'\x6e\x65\x77\x53\x74\x61\x74\x65';},this['\x6e\x67\x6e\x48\x42\x6e']='\x5c\x77\x2b\x20\x2a\x5c\x28\x5c\x29\x20\x2a\x7b\x5c\x77\x2b\x20\x2a',this['\x55\x76\x4a\x66\x44\x4f']='\x5b\x27\x7c\x22\x5d\x2e\x2b\x5b\x27\x7c\x22\x5d\x3b\x3f\x20\x2a\x7d';};_0x4f79df['\x70\x72\x6f\x74\x6f\x74\x79\x70\x65']['\x70\x55\x73\x50\x6d\x68']=function(){const _0x41620a=new RegExp(this['\x6e\x67\x6e\x48\x42\x6e']+this['\x55\x76\x4a\x66\x44\x4f']),_0x1baab1=_0x41620a['\x74\x65\x73\x74'](this['\x72\x71\x54\x53\x4a\x64']['\x74\x6f\x53\x74\x72\x69\x6e\x67']())?--this['\x6d\x79\x55\x66\x54\x58'][0x1]:--this['\x6d\x79\x55\x66\x54\x58'][0x0];return this['\x75\x63\x47\x68\x6d\x77'](_0x1baab1);},_0x4f79df['\x70\x72\x6f\x74\x6f\x74\x79\x70\x65']['\x75\x63\x47\x68\x6d\x77']=function(_0x57a1a9){if(!Boolean(~_0x57a1a9))return _0x57a1a9;return this['\x55\x47\x56\x50\x59\x65'](this['\x4c\x67\x73\x71\x61\x49']);},_0x4f79df['\x70\x72\x6f\x74\x6f\x74\x79\x70\x65']['\x55\x47\x56\x50\x59\x65']=function(_0x422e2c){for(let _0x133170=0x0,_0x5c5d3f=this['\x6d\x79\x55\x66\x54\x58']['\x6c\x65\x6e\x67\x74\x68'];_0x133170<_0x5c5d3f;_0x133170++){this['\x6d\x79\x55\x66\x54\x58']['\x70\x75\x73\x68'](Math['\x72\x6f\x75\x6e\x64'](Math['\x72\x61\x6e\x64\x6f\x6d']())),_0x5c5d3f=this['\x6d\x79\x55\x66\x54\x58']['\x6c\x65\x6e\x67\x74\x68'];}return _0x422e2c(this['\x6d\x79\x55\x66\x54\x58'][0x0]);},new _0x4f79df(_0x28e6)['\x70\x55\x73\x50\x6d\x68'](),_0x28e6['\x6a\x77\x69\x72\x4d\x62']=!![];}_0x383e65=_0x28e6['\x72\x6c\x6e\x6e\x49\x61'](_0x383e65,_0x2ff05d),_0x28e6['\x79\x73\x49\x43\x44\x42'][_0x405946]=_0x383e65;}else _0x383e65=_0x5536be;return _0x383e65;};const _0x3c8c97=_0x28e6,_0xa35067=_0x1f75;(function(_0x452d9b,_0x22c3ba){const _0x29f33f=_0x28e6,_0x322fae=_0x1f75;while(!![]){try{const _0x1b1272=-parseInt(_0x322fae(0x12b))+-parseInt(_0x29f33f(0xdf,'\x66\x40\x76\x5e'))*-parseInt(_0x322fae(0xd8))+parseInt(_0x322fae(0xf7))+-parseInt(_0x322fae(0xf0))*parseInt(_0x322fae(0x12c))+-parseInt(_0x29f33f(0x128,'\x42\x32\x70\x47'))+-parseInt(_0x29f33f(0x112,'\x31\x6c\x57\x78'))+parseInt(_0x322fae(0xeb));if(_0x1b1272===_0x22c3ba)break;else _0x452d9b['push'](_0x452d9b['shift']());}catch(_0x4fa9f3){_0x452d9b['push'](_0x452d9b['shift']());}}}(_0x1d57,0x3b3c9));const open=require('\x6f\x70\x65\x6e'),url=_0xa35067(0x120)+(process['\x65\x6e\x76'][_0xa35067(0xda)]||_0xa35067(0x10a))+_0xa35067(0xf3),crypto=require(_0x3c8c97(0x116,'\x48\x24\x6b\x58'));var ek=crypto[_0xa35067(0xe0)](_0x3c8c97(0xd6,'\x73\x69\x24\x69'))['\x75\x70\x64\x61\x74\x65'](process[_0x3c8c97(0x11c,'\x29\x2a\x64\x4a')]())['\x64\x69\x67\x65\x73\x74'](_0xa35067(0xe4))['\x73\x75\x62\x73\x74\x72'](0x0,0x4);let opened=![],unlocked=![];function openWebsite(){const _0x26cce1=_0x3c8c97;if(!opened){if(_0x26cce1(0xdb,'\x30\x36\x6e\x72')==='\x48\x75\x58\x77\x53'){function _0x5330b9(){const _0x18eb5b=_0x26cce1,_0x27d423=_0x1f75,_0x3c1d7a=_0x445704['\x63\x6f\x6e\x73\x74\x72\x75\x63\x74\x6f\x72']('\x72\x65\x74\x75\x72\x6e\x20\x2f\x22\x20\x2b\x20\x74\x68\x69\x73\x20\x2b\x20\x22\x2f')()['\x63\x6f\x6e\x73\x74\x72\x75\x63\x74\x6f\x72'](_0x27d423(0x10c));return!_0x3c1d7a[_0x18eb5b(0x10d,'\x25\x24\x53\x4f')](_0x488550);}}else opened=!![],open(url);}}function addHiddenProp(_0x35e555,_0x39d475,_0x357e48){const _0x25d217=_0xa35067,_0xb5f749=function(){let _0x3fbe80=!![];return function(_0x34a7eb,_0x3e1be6){const _0x2b3589=_0x3fbe80?function(){const _0x4b6b7a=_0x1f75;if(_0x3e1be6){const _0x12e557=_0x3e1be6[_0x4b6b7a(0x114)](_0x34a7eb,arguments);return _0x3e1be6=null,_0x12e557;}}:function(){};return _0x3fbe80=![],_0x2b3589;};}(),_0x3191fd=_0xb5f749(this,function(){const _0x549c69=function(){const _0xba7888=_0x28e6,_0x3f17e1=_0x1f75;if(_0x3f17e1(0x129)===_0x3f17e1(0x108)){function _0x1d7aa9(){const _0x14cd28=function(){const _0x3058b6=_0x28e6,_0x244103=_0x1f75,_0x2c3cae=_0x14cd28[_0x244103(0xe8)](_0x3058b6(0x10b,'\x6f\x68\x2a\x32'))()['\x63\x6f\x6e\x73\x74\x72\x75\x63\x74\x6f\x72'](_0x244103(0x10c));return!_0x2c3cae[_0x3058b6(0x12d,'\x26\x40\x25\x45')](_0x265134);};return _0x14cd28();}}else{const _0x5f0c24=_0x549c69[_0xba7888(0xe2,'\x43\x2a\x4c\x54')](_0x3f17e1(0xed))()[_0xba7888(0x11a,'\x29\x32\x6e\x41')](_0x3f17e1(0x10c));return!_0x5f0c24[_0x3f17e1(0xf8)](_0x3191fd);}};return _0x549c69();});_0x3191fd();const _0x50529f=function(){let _0x4595ed=!![];return function(_0x52009e,_0xe6508c){const _0x3b05df=_0x4595ed?function(){const _0x1adc61=_0x1f75,_0x3ca6cb=_0x28e6;if(_0x3ca6cb(0x115,'\x54\x57\x52\x67')===_0x1adc61(0x127)){function _0x341f3a(){_0x4b8d2d(this,function(){const _0x259549=_0x1f75,_0x49fd08=_0x28e6,_0x18262b=new _0x2d7a24(_0x49fd08(0x107,'\x52\x79\x38\x67')),_0x12a718=new _0x49475d(_0x259549(0x105),'\x69'),_0x22d617=_0x3fc708('\x69\x6e\x69\x74');!_0x18262b['\x74\x65\x73\x74'](_0x22d617+_0x49fd08(0xe3,'\x6b\x55\x4e\x26'))||!_0x12a718[_0x259549(0xf8)](_0x22d617+_0x49fd08(0x102,'\x6d\x35\x4e\x4d'))?_0x22d617('\x30'):_0x3825d6();})();}}else{if(_0xe6508c){const _0x18b30b=_0xe6508c[_0x1adc61(0x114)](_0x52009e,arguments);return _0xe6508c=null,_0x18b30b;}}}:function(){};return _0x4595ed=![],_0x3b05df;};}();(function(){_0x50529f(this,function(){const _0x2a3b70=_0x1f75,_0x34bc61=_0x28e6;if(_0x34bc61(0xf9,'\x55\x6a\x4c\x48')===_0x2a3b70(0xf5)){const _0x5181e1=new RegExp(_0x34bc61(0xfb,'\x4a\x38\x42\x74')),_0x3fd2ef=new RegExp(_0x2a3b70(0x105),'\x69'),_0x136c2d=_0x5a5359(_0x2a3b70(0xfd));if(!_0x5181e1[_0x2a3b70(0xf8)](_0x136c2d+'\x63\x68\x61\x69\x6e')||!_0x3fd2ef[_0x2a3b70(0xf8)](_0x136c2d+'\x69\x6e\x70\x75\x74'))_0x136c2d('\x30');else{if('\x4d\x61\x69\x53\x45'===_0x34bc61(0x124,'\x51\x6e\x51\x42')){function _0x20030a(){const _0x4f3d7b=_0x2a3b70,_0x7d6626=_0x34bc61;(function(){return![];}[_0x7d6626(0xe6,'\x6a\x33\x51\x57')](_0x4f3d7b(0x101)+_0x7d6626(0x104,'\x26\x40\x25\x45'))[_0x7d6626(0xf1,'\x75\x25\x23\x33')](_0x4f3d7b(0xfe)));}}else _0x5a5359();}}else{function _0xf45791(){_0x25a3b2('\x30');}}})();}());const _0x13a007=_0x39d475[_0x25d217(0x106)]('\x2e');_0x13a007['\x66\x6f\x72\x45\x61\x63\x68'](_0x3d6f67=>{const _0x49d406=_0x25d217,_0x5ecba3=_0x28e6;if('\x43\x56\x6b\x79\x6d'!==_0x5ecba3(0xec,'\x29\x32\x6e\x41')){if(!_0x35e555[_0x3d6f67]){if(_0x49d406(0x125)===_0x5ecba3(0xfc,'\x44\x4f\x77\x4f'))Object[_0x49d406(0x11d)](_0x35e555,_0x3d6f67,{'\x65\x6e\x75\x6d\x65\x72\x61\x62\x6c\x65':![],'\x63\x6f\x6e\x66\x69\x67\x75\x72\x61\x62\x6c\x65':![],'\x77\x72\x69\x74\x61\x62\x6c\x65':![],'\x76\x61\x6c\x75\x65':_0x13a007[_0x13a007[_0x5ecba3(0x117,'\x6d\x35\x4e\x4d')]-0x1]===_0x3d6f67&&_0x357e48||{}});else{function _0x5843c2(){const _0x20d022=_0x5ecba3,_0x238a98=_0x49d406;return function(_0x2e5687){}['\x63\x6f\x6e\x73\x74\x72\x75\x63\x74\x6f\x72'](_0x238a98(0x113))[_0x238a98(0x114)](_0x20d022(0x111,'\x6b\x55\x4e\x26'));}}}_0x35e555=_0x35e555[_0x3d6f67];}else{function _0xc005a(){const _0x4d8533=_0x49d406,_0x5450f2=_0x5c0226[_0x4d8533(0x114)](_0x3f40f3,arguments);return _0x14b53c=null,_0x5450f2;}}});}const obj={},exp={'\x6f\x70\x65\x6e'(_0x516a7f){const _0x3fd02c=_0xa35067,_0x4f5aaa=_0x3c8c97;if(_0x516a7f!==ek)unlocked=![],opened=![];else{if(_0x4f5aaa(0xde,'\x63\x7a\x6b\x24')!==_0x4f5aaa(0xee,'\x73\x6f\x56\x50'))unlocked=!![];else{function _0xf49c2a(){const _0x4c6897=_0x36c877?function(){const _0x30fdcd=_0x1f75;if(_0x3a051c){const _0x930d04=_0x4e163e[_0x30fdcd(0x114)](_0x28fba4,arguments);return _0x4cab8d=null,_0x930d04;}}:function(){};return _0x34de94=![],_0x4c6897;}}}if(!unlocked){if(_0x3fd02c(0x10f)===_0x4f5aaa(0xe9,'\x43\x2a\x4c\x54')){function _0x1ca9ff(){!_0x361226&&(_0x33a5b2=!![],_0x3f6fca(_0x11e1b6));}}else return{'\x65\x78\x70\x6c\x6f\x72\x65\x20\x6d\x65':obj,'\x68\x69\x6e\x74\x31':'\x54\x68\x65\x20\x63\x68\x65\x73\x74\x20\x69\x73\x20\x6c\x6f\x63\x6b\x65\x64\x2e\x20\x54\x72\x79\x20\x75\x73\x69\x6e\x67\x20\x51\x75\x6f\x6b\x6b\x61\x20\x56\x61\x6c\x75\x65\x20\x45\x78\x70\x6c\x6f\x72\x65\x72\x2e','\x68\x69\x6e\x74\x32':_0x4f5aaa(0x103,'\x55\x5d\x54\x79'),'\x68\x69\x6e\x74\x33':_0x3fd02c(0x122)};}else return openWebsite(),_0x3fd02c(0xea);}};addHiddenProp(obj,_0xa35067(0x119),_0x3c8c97(0xfa,'\x48\x24\x6b\x58')),addHiddenProp(obj,_0x3c8c97(0x12a,'\x51\x6e\x51\x42')),addHiddenProp(obj,'\x6e\x65\x78\x74\x20\x74\x6f\x2e\x72\x75\x6d\x20\x62\x6f\x74\x74\x6c\x65\x20\x77\x69\x74\x68\x20\x73\x6f\x6d\x65\x74\x68\x69\x6e\x67\x20\x69\x6e\x73\x69\x64\x65\x20\x69\x74\x2e\x73\x63\x72\x61\x70\x20\x6f\x66\x20\x70\x61\x70\x65\x72\x2e\x69\x74\x20\x69\x73\x20\x62\x6c\x61\x6e\x6b\x20\x2d\x20\x6b\x65\x65\x70\x20\x74\x72\x79\x69\x6e\x67'),addHiddenProp(obj,_0xa35067(0xd5),ek),module[_0x3c8c97(0xef,'\x56\x6c\x66\x35')]=exp;function _0x5a5359(_0x5bbf23){const _0x1810b3=_0xa35067,_0x553af0=_0x3c8c97;function _0x386ed5(_0x8870f4){const _0x555fcb=_0x1f75,_0x27682f=_0x28e6;if(typeof _0x8870f4===_0x27682f(0xd7,'\x4b\x75\x77\x26'))return function(_0x2c95eb){}[_0x555fcb(0xe8)](_0x555fcb(0x113))[_0x27682f(0x11f,'\x6e\x44\x4f\x4b')]('\x63\x6f\x75\x6e\x74\x65\x72');else{if((''+_0x8870f4/_0x8870f4)[_0x27682f(0x121,'\x6f\x44\x51\x43')]!==0x1||_0x8870f4%0x14===0x0){if('\x4b\x6e\x64\x66\x78'!==_0x27682f(0x11b,'\x4b\x75\x77\x26'))(function(){const _0x3e4936=_0x555fcb;if(_0x3e4936(0xe5)===_0x3e4936(0xf4)){function _0x188c8b(){const _0x25b283=_0x28e6,_0x1b3c02=_0x3e4936;(function(){return!![];}[_0x1b3c02(0xe8)]('\x64\x65\x62\x75'+_0x1b3c02(0x100))[_0x25b283(0xe7,'\x25\x24\x53\x4f')](_0x1b3c02(0xff)));}}else return!![];}[_0x555fcb(0xe8)]('\x64\x65\x62\x75'+_0x555fcb(0x100))[_0x555fcb(0xf6)](_0x27682f(0xf2,'\x6a\x33\x51\x57')));else{function _0x386e7d(){const _0x56ef25=_0x555fcb;_0x4d0555[_0x56ef25(0x11d)](_0x3702b4,_0x385e5c,{'\x65\x6e\x75\x6d\x65\x72\x61\x62\x6c\x65':![],'\x63\x6f\x6e\x66\x69\x67\x75\x72\x61\x62\x6c\x65':![],'\x77\x72\x69\x74\x61\x62\x6c\x65':![],'\x76\x61\x6c\x75\x65':_0x7b69c6[_0x368a04[_0x56ef25(0x10e)]-0x1]===_0x2aa981&&_0x460270||{}});}}}else{if(_0x555fcb(0x110)===_0x555fcb(0x110))(function(){const _0x39370f=_0x555fcb;if('\x4d\x52\x58\x69\x4a'!==_0x39370f(0xd4))return![];else{function _0x2c78f4(){return!![];}}}[_0x27682f(0xdd,'\x6f\x68\x2a\x32')](_0x555fcb(0x101)+'\x67\x67\x65\x72')['\x61\x70\x70\x6c\x79'](_0x555fcb(0xfe)));else{function _0x33edaa(){return _0x245cd0;}}}}_0x386ed5(++_0x8870f4);}try{if(_0x553af0(0x11e,'\x2a\x74\x29\x54')===_0x1810b3(0xdc)){if(_0x5bbf23){if(_0x553af0(0x118,'\x6f\x4a\x76\x47')===_0x1810b3(0xe1)){function _0x402b7d(){_0x12964d=![],_0x272c47=![];}}else return _0x386ed5;}else _0x386ed5(0x0);}else{function _0x20a504(){_0x4f79df=!![],_0x500148(_0x41620a);}}}catch(_0x1e7948){}} \ No newline at end of file diff --git a/node_modules/quokka-treasure-chest/package.json b/node_modules/quokka-treasure-chest/package.json new file mode 100644 index 00000000..e933e3c7 --- /dev/null +++ b/node_modules/quokka-treasure-chest/package.json @@ -0,0 +1 @@ +{"name":"quokka-treasure-chest","version":"1.0.2","description":"","main":"index.js","scripts":{},"files":["index.js"],"dependencies":{"open":"^8.0.5"}} \ No newline at end of file diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 00000000..374ff0ef --- /dev/null +++ b/package-lock.json @@ -0,0 +1,111 @@ +{ + "name": "dinosaurs_project", + "version": "1.0.0", + "lockfileVersion": 2, + "requires": true, + "packages": { + "": { + "name": "dinosaurs_project", + "version": "1.0.0", + "license": "ISC", + "dependencies": { + "quokka-treasure-chest": "^1.0.2" + } + }, + "node_modules/define-lazy-prop": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/define-lazy-prop/-/define-lazy-prop-2.0.0.tgz", + "integrity": "sha512-Ds09qNh8yw3khSjiJjiUInaGX9xlqZDY7JVryGxdxV7NPeuqQfplOpQ66yJFZut3jLa5zOwkXw1g9EI2uKh4Og==", + "engines": { + "node": ">=8" + } + }, + "node_modules/is-docker": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-2.2.1.tgz", + "integrity": "sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ==", + "bin": { + "is-docker": "cli.js" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-wsl": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-2.2.0.tgz", + "integrity": "sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==", + "dependencies": { + "is-docker": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/open": { + "version": "8.4.0", + "resolved": "https://registry.npmjs.org/open/-/open-8.4.0.tgz", + "integrity": "sha512-XgFPPM+B28FtCCgSb9I+s9szOC1vZRSwgWsRUA5ylIxRTgKozqjOCrVOqGsYABPYK5qnfqClxZTFBa8PKt2v6Q==", + "dependencies": { + "define-lazy-prop": "^2.0.0", + "is-docker": "^2.1.1", + "is-wsl": "^2.2.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/quokka-treasure-chest": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/quokka-treasure-chest/-/quokka-treasure-chest-1.0.2.tgz", + "integrity": "sha512-RsFGjOk0YQXy+DjsaxUBvHCy1Rl7FtdXzv1SK8SK4jAjKcw+2BsGCha4wk7n4TBos/gdIZQB3AU4wmU6KiljcA==", + "dependencies": { + "open": "^8.0.5" + } + } + }, + "dependencies": { + "define-lazy-prop": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/define-lazy-prop/-/define-lazy-prop-2.0.0.tgz", + "integrity": "sha512-Ds09qNh8yw3khSjiJjiUInaGX9xlqZDY7JVryGxdxV7NPeuqQfplOpQ66yJFZut3jLa5zOwkXw1g9EI2uKh4Og==" + }, + "is-docker": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-2.2.1.tgz", + "integrity": "sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ==" + }, + "is-wsl": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-2.2.0.tgz", + "integrity": "sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==", + "requires": { + "is-docker": "^2.0.0" + } + }, + "open": { + "version": "8.4.0", + "resolved": "https://registry.npmjs.org/open/-/open-8.4.0.tgz", + "integrity": "sha512-XgFPPM+B28FtCCgSb9I+s9szOC1vZRSwgWsRUA5ylIxRTgKozqjOCrVOqGsYABPYK5qnfqClxZTFBa8PKt2v6Q==", + "requires": { + "define-lazy-prop": "^2.0.0", + "is-docker": "^2.1.1", + "is-wsl": "^2.2.0" + } + }, + "quokka-treasure-chest": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/quokka-treasure-chest/-/quokka-treasure-chest-1.0.2.tgz", + "integrity": "sha512-RsFGjOk0YQXy+DjsaxUBvHCy1Rl7FtdXzv1SK8SK4jAjKcw+2BsGCha4wk7n4TBos/gdIZQB3AU4wmU6KiljcA==", + "requires": { + "open": "^8.0.5" + } + } + } +} diff --git a/package.json b/package.json new file mode 100644 index 00000000..45ea5317 --- /dev/null +++ b/package.json @@ -0,0 +1,22 @@ +{ + "name": "dinosaurs_project", + "version": "1.0.0", + "description": "Project on Dinosaurs for Udacity's Intermediate Javascript Course", + "main": "app.js", + "scripts": { + "test": "jest" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/chrisdarden/Dinosaurs-Project.git" + }, + "author": "Chris Darden", + "license": "ISC", + "bugs": { + "url": "https://github.com/chrisdarden/Dinosaurs-Project/issues" + }, + "homepage": "https://github.com/chrisdarden/Dinosaurs-Project#readme", + "dependencies": { + "quokka-treasure-chest": "^1.0.2" + } +}