diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md new file mode 100644 index 00000000..0102501f --- /dev/null +++ b/.github/CONTRIBUTING.md @@ -0,0 +1,11 @@ +## Contributing + +> To get started... + +- 🍴 Fork this repo [here](https://github.com/fvcproductions/dotfiles#fork-destination-box) +- 🔨 Hack away +- 👥 Add yourself as a contributor under credits +- 🔧 Make a pull request [here](https://github.com/fvcproductions/dotfiles/compare) +- 🎉 Get your pull request approved - success! + +Or just [create an issue](https://github.com/fvcproductions/dotfiles/issues) - any little bit of help counts! 😊 \ No newline at end of file diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md new file mode 100644 index 00000000..e045a226 --- /dev/null +++ b/CODE_OF_CONDUCT.md @@ -0,0 +1,74 @@ +# Contributor Covenant Code of Conduct + +## Our Pledge + +In the interest of fostering an open and welcoming environment, we as +contributors and maintainers pledge to making participation in our project and +our community a harassment-free experience for everyone, regardless of age, body +size, disability, ethnicity, gender identity and expression, level of experience, +nationality, personal appearance, race, religion, or sexual identity and +orientation. + +## Our Standards + +Examples of behavior that contributes to creating a positive environment +include: + +* Using welcoming and inclusive language +* Being respectful of differing viewpoints and experiences +* Gracefully accepting constructive criticism +* Focusing on what is best for the community +* Showing empathy towards other community members + +Examples of unacceptable behavior by participants include: + +* The use of sexualized language or imagery and unwelcome sexual attention or +advances +* Trolling, insulting/derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or electronic + address, without explicit permission +* Other conduct which could reasonably be considered inappropriate in a + professional setting + +## Our Responsibilities + +Project maintainers are responsible for clarifying the standards of acceptable +behavior and are expected to take appropriate and fair corrective action in +response to any instances of unacceptable behavior. + +Project maintainers have the right and responsibility to remove, edit, or +reject comments, commits, code, wiki edits, issues, and other contributions +that are not aligned to this Code of Conduct, or to ban temporarily or +permanently any contributor for other behaviors that they deem inappropriate, +threatening, offensive, or harmful. + +## Scope + +This Code of Conduct applies both within project spaces and in public spaces +when an individual is representing the project or its community. Examples of +representing a project or community include using an official project e-mail +address, posting via an official social media account, or acting as an appointed +representative at an online or offline event. Representation of a project may be +further defined and clarified by project maintainers. + +## Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behavior may be +reported by contacting the project team at hello@fvcproductions.com. All +complaints will be reviewed and investigated and will result in a response that +is deemed necessary and appropriate to the circumstances. The project team is +obligated to maintain confidentiality with regard to the reporter of an incident. +Further details of specific enforcement policies may be posted separately. + +Project maintainers who do not follow or enforce the Code of Conduct in good +faith may face temporary or permanent repercussions as determined by other +members of the project's leadership. + +## Attribution + +This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, +available at [http://contributor-covenant.org/version/1/4][version] + +[homepage]: http://contributor-covenant.org +[version]: http://contributor-covenant.org/version/1/4/ diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 00000000..d33aa715 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,11 @@ +## Contributing + +I'm very open to contributions so please feel free to + +1. 🍴 [Fork this repo](https://github.com/fvcproductions/dotfiles#fork-destination-box) +2. 🔨 Make some awesome changes! +3. 👥 Add yourself as a contributor under the Kudos section +4. 🔧 [Make a pull request](https://github.com/fvcproductions/dotfiles/compare) +5. 🎉 Get your pull request approved - success! + +Or just [create an issue](https://github.com/fvcproductions/dotfiles/issues) - any little bit of help counts! 😊 \ No newline at end of file diff --git a/README.md b/README.md index 34a32291..edac294f 100644 --- a/README.md +++ b/README.md @@ -1,158 +1,287 @@ +```txt + ******** ** ** ****** +/**///// /** /** **////** +/** /** /** ** // +/******* //** ** /** +/**//// //** ** /** +/** //**** //** ** +/** //** //****** +// // ////// + ++-+-+-+-+-+-+-+-+ +|D|o|t|f|i|l|e|s| ++-+-+-+-+-+-+-+-+ +``` + # Dotfiles +[![GitHub Issues](https://img.shields.io/github/issues/fvcproductions/dotfiles.svg?style=flat-square)](https://github.com/fvcproductions/dotfiles/issues) [![GitHub Pull Requests](https://img.shields.io/github/issues-pr/fvcproductions/dotfiles.svg?style=flat-square)](https://github.com/fvcproductions/dotfiles/pulls) [![MIT License](https://img.shields.io/github/license/fvcproductions/dotfiles.svg?style=flat-square)](http://badges.mit-license.org) [![Become a Patron!](https://img.shields.io/badge/Patreon-Become%20a%20Patron!-orange.svg?style=flat-square)](https://www.patreon.com/fvcproductions) + > This sets up my dev environment to be very Material Design friendly. -![Showcase](img/showcase.png) - -## To-Do - -- make all online apps into casks - - [Airtable](https://airtable.com/mac) - - [Zeit Now]() - - WakaTime Plugins - - [Sketch](https://github.com/wakatime/sketch-wakatime/releases/latest) -- Abstract -- Amazon Drive -- Amazon Music -- Jetbrains -- Docker -- Gitscout -- Google App Engine -- Google Drive -- iTerm 2 -- Image Optim -- Lepton -- Visual Studio Code -- Fonts - -## Requirements - -**[Xcode](https://developer.apple.com/xcode/)** & **[Command Line Tools](https://developer.apple.com/downloads)** +![Showcase](https://i.imgur.com/0FtAWo2.jpg) + + + +- [Installation](#installation) + - [Apps](#apps) + - [Automatic](#automatic) + - [Manual](#manual) + - [Chrome](#chrome) + - [Alfred](#alfred) + - [Editors](#editors) + - [Visual Studio Code](#visual-studio-code) + - [Sublime Text](#sublime-text) + - [Atom](#atom) + - [Shells](#shells) + - [Hyper](#hyper) + - [iTerm 2](#iterm-2) + - [Terminal](#terminal) +- [Usage](#usage) + - [Theming](#theming) + - [Tools](#tools) +- [Contributing](#contributing) + - [Code of Conduct](#code-of-conduct) +- [Credits](#credits) + - [Kudos](#kudos) + + + +## Installation The `sudo` command is necessary for Homebrew to be installed and for some others. -### To get started run these commands... - ```bash -# download latest version from Github +# Download latest version from Github curl -L -O https://github.com/fvcproductions/dotfiles/archive/3.0.zip -# unzip the file and move to my GitHub folder inside of Dropbox -unzip 3.0.zip && mv dotfiles-3.0 ~/Dropbox/github/dotfiles - -# run bootstrap! -sh ~/Dropbox/github/dotfiles/bootstrap.sh -``` +# Unzip the file and move to Dropbox +unzip 3.0.zip && mv dotfiles-3.0 ~/Dropbox/Code/dotfiles -## Initialize Dotfiles +# Run bootstrap! +sh ~/Dropbox/Code/dotfiles/bootstrap.sh -```bash # Installs npm and certain npm packages -sh ~/Dropbox/github/dotfiles/init/.npm +sh ~/Dropbox/Code/dotfiles/init/.npm # Installs casks and taps to caskroom-versions -sh ~/Dropbox/github/dotfiles/init/.casks +sh ~/Dropbox/Code/dotfiles/init/.casks # Installs Sublime Text 3, Package Control, theme, and packages -sh ~/Dropbox/github/dotfiles/init/.subl +sh ~/Dropbox/Code/dotfiles/init/.subl # Installs Atom and Packages -sh ~/Dropbox/github/dotfiles/init/.atom +sh ~/Dropbox/Code/dotfiles/init/.atom # Installs oh-my-zsh, terminal theme, oh-my-zsh theme and configs -sh ~/Dropbox/github/dotfiles/init/.shell +sh ~/Dropbox/Code/dotfiles/init/.shell -# OSX optimal awesome settings -sh ~/Dropbox/github/dotfiles/init/.osx +# Installs optimal macOS system settings +sh ~/Dropbox/Code/dotfiles/init/.osx # Installs fonts for coding and docs -sh ~/Dropbox/github/dotfiles/init/.fonts +sh ~/Dropbox/Code/dotfiles/init/.fonts -# Guide that helps you setup your git configuration and ssh-key setup for Github and Bitbucket -sh ~/Dropbox/github/dotfiles/init/.gituser +# Setups git configuration settings +sh ~/Dropbox/Code/dotfiles/init/.gituser ``` -## Atom +### Apps + +#### Automatic + +A full list of the apps installed automatically using Homebrew Casks can be found at [`init/.casks`](.init/.casks). + +- [1Password](https://1password.com/) +- [Adobe Acrobat Reader](https://get.adobe.com/reader/) +- [Adobe Air](https://get.adobe.com/air/) +- [Airtable](https://airtable.com/) +- [Atom](https://atom.io/) +- [Bartender](https://www.macbartender.com/) +- [Between](https://between.us/?lang=en) +- [Caption](https://getcaption.co/) +- [CleanMyMac](https://macpaw.com/cleanmymac) +- [CodeKit](https://codekitapp.com/) +- [Dash](https://kapeli.com/dash) +- [Discord](https://discordapp.com/) +- [Dropbox](https://www.dropbox.com) +- [Flux](https://justgetflux.com/) +- [Franz](https://meetfranz.com/) +- [GitHub Desktop](https://desktop.github.com/) +- [Gitify](https://github.com/manosim/gitify) +- [Google Backup And Sync](https://www.google.com/drive/download/) +- [Google Chrome](https://www.google.com/chrome/browser/desktop/index.html) +- [Google App Engine](https://cloud.google.com/appengine/) +- [Grammarly](https://grammarly.com/) +- [Handbrake](https://handbrake.fr/) +- [Hyper](https://hyper.is/) +- [Image2icon](http://www.img2icnsapp.com/) +- [Join.me](https://www.join.me/) +- [Lepton](http://hackjutsu.com/Lepton/) +- [mac2imgur](https://github.com/mileswd/mac2imgur) +- [Material Colors](https://github.com/romannurik/MaterialColorsApp) +- [Musixmatch](https://www.musixmatch.com/) +- [Muzzle](https://muzzleapp.com/) +- [Quick Look Plugins](https://github.com/sindresorhus/quick-look-plugins) +- [Sketch](https://www.sketchapp.com/) +- [Skype](https://www.skype.com/en/) +- [Spotify](https://www.spotify.com/us/) +- [Steam](http://store.steampowered.com/) +- [Sublime Text](https://www.sublimetext.com/) +- [The Unarchiver](https://theunarchiver.com/) +- [uTorrent](http://www.utorrent.com/) +- [Visual Studio Code](https://code.visualstudio.com/) +- [VLC](https://www.videolan.org/vlc/index.html) +- [YNAB](https://www.youneedabudget.com/) + +#### Manual + +These applications need to be manually downloaded or transferred from the App Store or Dropbox upon a fresh install. + +- [Alfred](https://www.alfredapp.com/) +- [Amphetamine](https://itunes.apple.com/us/app/amphetamine/id937984704?mt=12) +- [BetterSnapTool](https://itunes.apple.com/us/app/bettersnaptool/id417375580?mt=12) +- [Blotter](https://itunes.apple.com/us/app/blotter/id406580224?mt=12) +- [BusyCal](https://www.busymac.com/busycal/) +- [Candlelight](https://itunes.apple.com/us/app/candlelight/id655899740?mt=12) +- [Cashew](https://itunes.apple.com/us/app/cashew/id1126100185?mt=12) +- [CodeRunner](https://coderunnerapp.com/) +- [Day One Classic](http://dayoneapp.com/) +- [Gemini](https://macpaw.com/gemini) +- [Fantastical](https://flexibits.com/fantastical) +- [iStat Menus](https://bjango.com/mac/istatmenus/) +- [Kaleidoscope](https://www.kaleidoscopeapp.com/) +- [LittleIpsum](https://itunes.apple.com/us/app/littleipsum/id405772121?mt=12) +- [Living Earth Desktop](http://www.livingearthapp.com/) +- [Marked](http://marked2app.com/) +- [Monodraw](https://monodraw.helftone.com/) +- [Monosnap](https://monosnap.com/welcome) +- [Prepo](https://itunes.apple.com/us/app/prepo/id476533227?mt=12) +- [Promotee](http://www.netwalkapps.com/app/promotee) +- [Redacted](https://itunes.apple.com/us/app/redacted/id984968384?mt=12) +- [Sip](https://sipapp.io/) +- [SiteSucker](http://ricks-apps.com/osx/sitesucker/) +- [Spectrum](http://www.eigenlogik.com/spectrum/mac) +- [Tower](https://www.git-tower.com/mac/) +- [Tyke](http://tyke.io/) +- [Unsplash Wallpaper](https://unsplash.com/wallpaper) +- [Web Snapper](https://www.tastyapps.com/websnapper.html) +- [Yoink](https://eternalstorms.at/yoink/) +- [HemingwayEditor](http://www.hemingwayapp.com/) +- [Fotor Photo Editor](http://www.fotor.com/) +- [Boxy](http://www.boxyapp.co/) + +### Chrome + +I use a theme I made myself called [Materialize](https://www.themebeta.com/chrome/theme/856926) which anyone can install from [ThemeBeta](https://www.themebeta.com). + +![Materialize Chrome Theme](https://i.imgur.com/VwGjdAs.png) + +### Alfred + +With Alfred, I use a theme called [Materialize](https://www.alfredapp.com/extras/theme/5hT6cEQ6h1/) that is published online for anyone to install through Alfred Themes. + +![Alfred](https://i.imgur.com/on1ZDB7.png) + +### Editors + +#### Visual Studio Code + +Using [Settings Sync](https://marketplace.visualstudio.com/items?itemName=Shan.code-settings-sync) extension with this [Gist](https://gist.github.com/fvcproductions/10a8ad61c7bbd2a618af29a2f7bf05c1). + +![Visual Studio Code](https://i.imgur.com/NBiUCtM.png) + +#### Sublime Text + +Using [SyncSettings](https://github.com/mfuentesg/SyncSettings) package with this [Gist](https://gist.github.com/fvcproductions/6452da691c3a5b37e6b27d2423cb3a26). + +![Sublime Text](https://i.imgur.com/JUpBQVU.png) + +#### Atom + +Using [Sync Settings](https://atom.io/packages/sync-settings) package with this [Gist](https://gist.github.com/fvcproductions/ae1c2069a9ad59e71e321c7f7ba85d53). + +![Atom](https://i.imgur.com/JVhDvcq.png) + +### Shells + +I'm using the oh-my-zsh [pure](https://github.com/sindresorhus/pure) theme. -![atom](https://i.imgur.com/HQKpe76.png) +Once the theme has loaded, you might want to replace the shell's startup command in `Preferences` under `Profiles > Shell Tab`: -```bash -# move .atom to .dotfiles -mv ~/.atom/ ~/Dropbox/github/dotfiles/ +`login -fpql fvcproductions /bin/zsh` to `login -fpql YOURNAME /bin/zsh` -# create a symlink to the directory inside dotfiles -ln -s ~/Dropbox/github/dotfiles/.atom/ ~/.atom -``` +#### Hyper -## Alfred 3 +![Hyper](https://i.imgur.com/Qvej6BG.png) -![alfred](img/alfred.png) +#### iTerm 2 -## Sublime Text 3 +![iTerm 2](https://i.imgur.com/8XcQqsh.png) -```bash -cd ~/Library/Application\ Support/Sublime\ Text\ 3/Packages/ -rm -r User -ln -s /Users/fvcproductions/Dropbox/GitHub/dotfiles/bin/subl/User/ -``` +#### Terminal -![sublime-text](img/sublime-text.png) +![Terminal](https://i.imgur.com/kaqt9BC.png) -## Terminal and Z-shell Theme +## Usage -Once the theme has loaded, you might want to replace the shell's startup command in `Preferences` under `Profiles > Shell Tab`: +If you decide to utilize or folk these configurations, please make sure to give me some kudos as I have done with the folks that have inspired me. 😊 -`login -fpql fvcproductions /bin/zsh` to `login -fpql YOURNAME /bin/zsh` +### Theming -![terminal](img/terminal.png) +Accents are as follows in accordance to [Sublime Text 3 Material Theme](https://github.com/equinusocio/material-theme): -## Find Scope +- Lime: `#7CB342` +- Purple: `#AB47BC` +- Red: `#E57373` +- Red Orange: `#F74A50` +- Orange: `#FF7042` +- Yellow: `#FFA000` +- Indigo: `#5C6BC0` +- Pink: `#FF4081` +- Blue: `#2979FF` +- Cyan: `#00BCD4` -``` -, -*/.atom/.apm/*, -*/.git/*, -*/.atom/.node-gyp/* -``` +### Tools + +There is a LOT going on within these dotfiles. + +A few tools I've used, in no particular order, for the process include: + +- Homebrew +- Monodraw +- oh-my-zsh +- ThemeBeta + +## Contributing + +I'm very open to contributions so please feel free to + +1. 🍴 [Fork this repo](https://github.com/fvcproductions/dotfiles#fork-destination-box) +2. 🔨 Follow the [contributing guidelines](CONTRIBUTING.md) +3. 👥 Add yourself as a contributor under the Kudos section +4. 🔧 [Make a pull request](https://github.com/fvcproductions/dotfiles/compare) +5. 🎉 Get your pull request approved - success! -## Theming +Or just [create an issue](https://github.com/fvcproductions/dotfiles/issues) - any little bit of help counts! 😊 -Accents are as follows in accordance to the [ST3 Material Theme by equinusocio](https://github.com/equinusocio/material-theme): +### Code of Conduct -- Lime: #7CB342 -- Purple: #AB47BC -- Red: #E57373 -- Red Orange: #F74A50 -- Orange: #FF7042 -- Yellow: #FFA000 -- Indigo: #5C6BC0 -- Pink: #FF4081 -- Blue: #2979FF -- Cyan: #00BCD4 +In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation. + +More details can be found at this project's [code of conduct](CODE_OF_CONDUCT.md). ## Credits -- [@fvcproductions](https://github.com/fvcproductions/) +- [FVCproductions](https://github.com/fvcproductions) 🍓🍫 + +### Kudos + +- README Badges from [Shields.io](http://shields.io/) - [@mathiasbynens](https://github.com/mathiasbynens/dotfiles) - [@necolas](https://github.com/necolas/dotfiles) - [@cowboy](https://github.com/cowboy/dotfiles/) - [@ptb](https://github.com/ptb/Mac-OS-X-Lion-Setup) - [@pongstr](https://twitter.com/pongstr) - -## Donations - -> Feed me... 🍕 - -[![Donate via PayPal](https://raw.github.com/xioTechnologies/PayPal-Button/master/PayPal%20Button.png)](http://paypal.me/fvcproductions) - -```txt - ******** ** ** ****** -/**///// /** /** **////** -/** /** /** ** // -/******* //** ** /** -/**//// //** ** /** -/** //**** //** ** -/** //** //****** -// // ////// - -+-+-+-+-+-+-+-+-+ -|D|o|t|f|i|l|e|s| -+-+-+-+-+-+-+-+-+ -``` +- [@sindresorhus](https://github.com/sindresorhus) +- [@equinusocio](https://github.com/equinusocio) \ No newline at end of file diff --git a/Screenshot 2017-09-24 09.55.39.png b/Screenshot 2017-09-24 09.55.39.png deleted file mode 100644 index 276c4a40..00000000 Binary files a/Screenshot 2017-09-24 09.55.39.png and /dev/null differ diff --git a/bin/alfred/Alfred.alfredpreferences/themes/81DE1BF8-1C08-4220-BCC9-0D292414D3DF/theme.json b/bin/alfred/Alfred.alfredpreferences/themes/81DE1BF8-1C08-4220-BCC9-0D292414D3DF/theme.json index c03e3234..ce851809 100644 --- a/bin/alfred/Alfred.alfredpreferences/themes/81DE1BF8-1C08-4220-BCC9-0D292414D3DF/theme.json +++ b/bin/alfred/Alfred.alfredpreferences/themes/81DE1BF8-1C08-4220-BCC9-0D292414D3DF/theme.json @@ -56,6 +56,6 @@ "color" : "#ECEFF226", "thickness" : 2 }, - "name" : "Materialize" + "name" : "Materialize - Full" } } \ No newline at end of file diff --git a/bin/alfred/Alfred.alfredpreferences/themes/theme.custom.C071A7EF-3946-4165-BCEE-9C566DF6B956/theme.json b/bin/alfred/Alfred.alfredpreferences/themes/theme.custom.C071A7EF-3946-4165-BCEE-9C566DF6B956/theme.json new file mode 100644 index 00000000..8a422c28 --- /dev/null +++ b/bin/alfred/Alfred.alfredpreferences/themes/theme.custom.C071A7EF-3946-4165-BCEE-9C566DF6B956/theme.json @@ -0,0 +1,61 @@ +{ + "alfredtheme" : { + "result" : { + "textSpacing" : 7, + "subtext" : { + "size" : 11, + "colorSelected" : "#B0BEC6FF", + "font" : "System", + "color" : "#ECEFF235" + }, + "shortcut" : { + "size" : 24, + "colorSelected" : "#00BCD3FF", + "font" : "System", + "color" : "#00BCD3FF" + }, + "backgroundSelected" : "#ECEFF23F", + "text" : { + "size" : 25, + "colorSelected" : "#FEFFFFFF", + "font" : "System", + "color" : "#5D7D87BF" + }, + "iconPaddingHorizontal" : 15, + "paddingVertical" : 8, + "iconSize" : 40 + }, + "search" : { + "paddingVertical" : 7, + "background" : "#26323800", + "spacing" : 10, + "text" : { + "size" : 55, + "colorSelected" : "#000000FF", + "font" : "System", + "color" : "#ECEFF2FF" + }, + "backgroundSelected" : "#B2D7FFFF" + }, + "window" : { + "color" : "#263239FF", + "paddingHorizontal" : 0, + "width" : 560, + "borderPadding" : 10, + "borderColor" : "#26323900", + "blur" : 40, + "roundness" : 5, + "paddingVertical" : 10 + }, + "credit" : "FVCproductions", + "separator" : { + "color" : "#FFFFFF00", + "thickness" : 1 + }, + "scrollbar" : { + "color" : "#ECEFF226", + "thickness" : 2 + }, + "name" : "Materialize" + } +} \ No newline at end of file diff --git a/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj deleted file mode 120000 index 06c1553b..00000000 --- a/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj +++ /dev/null @@ -1 +0,0 @@ -/usr/local/lib/node_modules/alfred-emoj \ No newline at end of file diff --git a/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/icon.png b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/icon.png new file mode 100644 index 00000000..61a8b758 Binary files /dev/null and b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/icon.png differ diff --git a/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/index.js b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/index.js new file mode 100644 index 00000000..874c4ff1 --- /dev/null +++ b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/index.js @@ -0,0 +1,34 @@ +'use strict'; +const alfy = require('alfy'); + +alfy.fetch('emoji.getdango.com/api/emoji', { + query: { + q: alfy.input + } +}).then(data => { + let all = ''; + + const items = data.results + .map(x => { + const emoji = x.text; + all += emoji; + + return { + title: emoji, + arg: emoji, + icon: { + path: ' ' // Hide icon + } + }; + }); + + items.push({ + title: all, + arg: all, + icon: { + path: ' ' + } + }); + + alfy.output(items); +}); diff --git a/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/info.plist b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/info.plist new file mode 100644 index 00000000..8eacbae8 --- /dev/null +++ b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/info.plist @@ -0,0 +1,120 @@ + + + + + bundleid + com.sindresorhus.emoj + category + Productivity + connections + + 81E50DB1-23ED-46C6-BB73-4AA70B96FE96 + + + destinationuid + FAE7F0FF-CBA9-49C7-9C3E-6CD447146F74 + modifiers + 0 + modifiersubtext + + vitoclose + + + + + createdby + Sindre Sorhus + description + Alfred 3 workflow to find relevant emoji from text + disabled + + name + Emoj + objects + + + config + + autopaste + + clipboardtext + {query} + transient + + + type + alfred.workflow.output.clipboard + uid + FAE7F0FF-CBA9-49C7-9C3E-6CD447146F74 + version + 2 + + + config + + alfredfiltersresults + + argumenttype + 0 + escaping + 102 + keyword + emoji + queuedelaycustom + 3 + queuedelayimmediatelyinitially + + queuedelaymode + 0 + queuemode + 2 + runningsubtext + Searching... + script + ./node_modules/.bin/run-node index.js "$1" + scriptargtype + 1 + scriptfile + index.js + subtext + + title + Find relevant emoji + type + 0 + withspace + + + type + alfred.workflow.input.scriptfilter + uid + 81E50DB1-23ED-46C6-BB73-4AA70B96FE96 + version + 2 + + + readme + + uidata + + 81E50DB1-23ED-46C6-BB73-4AA70B96FE96 + + xpos + 10 + ypos + 10 + + FAE7F0FF-CBA9-49C7-9C3E-6CD447146F74 + + xpos + 150 + ypos + 10 + + + version + 1.0.0 + webaddress + https://github.com/sindresorhus/alfred-emoj#readme + + diff --git a/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/license b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/license new file mode 100644 index 00000000..654d0bfe --- /dev/null +++ b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +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/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/.bin/alfred-link b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/.bin/alfred-link new file mode 100755 index 00000000..1668e4b1 --- /dev/null +++ b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/.bin/alfred-link @@ -0,0 +1,16 @@ +#!/usr/bin/env node +'use strict'; +const alfredLink = require('./'); + +const npmGlobal = process.env.npm_config_global; + +if (npmGlobal === '') { + // Prevent linking if the script was part of a non-global npm (install) command + process.exit(0); +} + +// Only transform if `alfred-link` is called from `npm -g` +alfredLink.link({transform: npmGlobal}).catch(err => { + console.error(err); + process.exit(1); +}); diff --git a/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/.bin/alfred-unlink b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/.bin/alfred-unlink new file mode 100755 index 00000000..3acc2652 --- /dev/null +++ b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/.bin/alfred-unlink @@ -0,0 +1,8 @@ +#!/usr/bin/env node +'use strict'; +const alfredLink = require('./'); + +alfredLink.unlink().catch(err => { + console.error(err); + process.exit(1); +}); diff --git a/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/.bin/alfy-cleanup b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/.bin/alfy-cleanup new file mode 100755 index 00000000..ea8c30be --- /dev/null +++ b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/.bin/alfy-cleanup @@ -0,0 +1,11 @@ +#!/usr/bin/env node +'use strict'; +const execa = require('execa'); +const npmRunPath = require('npm-run-path'); + +const env = npmRunPath.env({cwd: __dirname}); + +execa('alfred-unlink', {env}).catch(err => { + console.error(err); + process.exit(1); +}); diff --git a/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/.bin/alfy-init b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/.bin/alfy-init new file mode 100755 index 00000000..55287782 --- /dev/null +++ b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/.bin/alfy-init @@ -0,0 +1,11 @@ +#!/usr/bin/env node +'use strict'; +const execa = require('execa'); +const npmRunPath = require('npm-run-path'); + +const env = npmRunPath.env({cwd: __dirname}); + +execa('alfred-link', {env}).catch(err => { + console.error(err); + process.exit(1); +}); diff --git a/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/.bin/mkdirp b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/.bin/mkdirp new file mode 100755 index 00000000..d95de15a --- /dev/null +++ b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/.bin/mkdirp @@ -0,0 +1,33 @@ +#!/usr/bin/env node + +var mkdirp = require('../'); +var minimist = require('minimist'); +var fs = require('fs'); + +var argv = minimist(process.argv.slice(2), { + alias: { m: 'mode', h: 'help' }, + string: [ 'mode' ] +}); +if (argv.help) { + fs.createReadStream(__dirname + '/usage.txt').pipe(process.stdout); + return; +} + +var paths = argv._.slice(); +var mode = argv.mode ? parseInt(argv.mode, 8) : undefined; + +(function next () { + if (paths.length === 0) return; + var p = paths.shift(); + + if (mode === undefined) mkdirp(p, cb) + else mkdirp(p, mode, cb) + + function cb (err) { + if (err) { + console.error(err.message); + process.exit(1); + } + else next(); + } +})(); diff --git a/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/.bin/rc b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/.bin/rc new file mode 100755 index 00000000..6f8f1139 --- /dev/null +++ b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/.bin/rc @@ -0,0 +1,60 @@ +#! /usr/bin/env node +var cc = require('./lib/utils') +var join = require('path').join +var deepExtend = require('deep-extend') +var etc = '/etc' +var win = process.platform === "win32" +var home = win + ? process.env.USERPROFILE + : process.env.HOME + +module.exports = function (name, defaults, argv, parse) { + if('string' !== typeof name) + throw new Error('rc(name): name *must* be string') + if(!argv) + argv = require('minimist')(process.argv.slice(2)) + defaults = ( + 'string' === typeof defaults + ? cc.json(defaults) : defaults + ) || {} + + parse = parse || cc.parse + + var env = cc.env(name + '_') + + var configs = [defaults] + var configFiles = [] + function addConfigFile (file) { + if (configFiles.indexOf(file) >= 0) return + var fileConfig = cc.file(file) + if (fileConfig) { + configs.push(parse(fileConfig)) + configFiles.push(file) + } + } + + // which files do we look at? + if (!win) + [join(etc, name, 'config'), + join(etc, name + 'rc')].forEach(addConfigFile) + if (home) + [join(home, '.config', name, 'config'), + join(home, '.config', name), + join(home, '.' + name, 'config'), + join(home, '.' + name + 'rc')].forEach(addConfigFile) + addConfigFile(cc.find('.'+name+'rc')) + if (env.config) addConfigFile(env.config) + if (argv.config) addConfigFile(argv.config) + + return deepExtend.apply(null, configs.concat([ + env, + argv, + configFiles.length ? {configs: configFiles, config: configFiles[configFiles.length - 1]} : undefined, + ])) +} + +if(!module.parent) { + console.log( + JSON.stringify(module.exports(process.argv[2]), false, 2) + ) +} diff --git a/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/.bin/rimraf b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/.bin/rimraf new file mode 100755 index 00000000..0d1e17be --- /dev/null +++ b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/.bin/rimraf @@ -0,0 +1,50 @@ +#!/usr/bin/env node + +var rimraf = require('./') + +var help = false +var dashdash = false +var noglob = false +var args = process.argv.slice(2).filter(function(arg) { + if (dashdash) + return !!arg + else if (arg === '--') + dashdash = true + else if (arg === '--no-glob' || arg === '-G') + noglob = true + else if (arg === '--glob' || arg === '-g') + noglob = false + else if (arg.match(/^(-+|\/)(h(elp)?|\?)$/)) + help = true + else + return !!arg +}) + +if (help || args.length === 0) { + // If they didn't ask for help, then this is not a "success" + var log = help ? console.log : console.error + log('Usage: rimraf [ ...]') + log('') + log(' Deletes all files and folders at "path" recursively.') + log('') + log('Options:') + log('') + log(' -h, --help Display this usage info') + log(' -G, --no-glob Do not expand glob patterns in arguments') + log(' -g, --glob Expand glob patterns in arguments (default)') + process.exit(help ? 0 : 1) +} else + go(0) + +function go (n) { + if (n >= args.length) + return + var options = {} + if (noglob) + options = { glob: false } + rimraf(args[n], options, function (er) { + if (er) + throw er + go(n+1) + }) +} diff --git a/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/.bin/run-node b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/.bin/run-node new file mode 100755 index 00000000..bff9d95a --- /dev/null +++ b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/.bin/run-node @@ -0,0 +1,49 @@ +#!/bin/bash + +if [[ -z "$alfred_workflow_cache" ]]; then + echo "This script must be called from Alfred, \$alfred_workflow_cache is missing. Make sure a Bundle ID is set." + exit 1 +fi + +if [[ ! -d "$alfred_workflow_cache" ]]; then + mkdir -p "$alfred_workflow_cache" +fi + +PATH_CACHE="$alfred_workflow_cache"/node_path + +get_user_path() { + eval $(/usr/libexec/path_helper -s) + echo "$($SHELL -i -l -c 'echo -e "\n"PATH=\"$PATH:\$PATH\""\n"' 2>/dev/null | grep "^PATH=")" > "$PATH_CACHE" +} + +set_path() { + if [[ -f "$PATH_CACHE" ]]; then + . "$PATH_CACHE" + else + get_user_path + . "$PATH_CACHE" + fi + + export PATH +} + +has_node() { + command -v node >/dev/null 2>&1 +} + +# check if we have node, otherwise inherit path from user shell +if ! has_node; then + set_path + + # retry by deleting old path cache + if ! has_node; then + rm "$PATH_CACHE" + set_path + fi +fi + +if has_node; then + node "$@" +else + echo $'{"items":[{"title": "Couldn\'t find the `node` binary", "subtitle": "Symlink it to `/usr/local/bin`"}]}' +fi diff --git a/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/.bin/semver b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/.bin/semver new file mode 100755 index 00000000..c5f2e857 --- /dev/null +++ b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/.bin/semver @@ -0,0 +1,133 @@ +#!/usr/bin/env node +// Standalone semver comparison program. +// Exits successfully and prints matching version(s) if +// any supplied version is valid and passes all tests. + +var argv = process.argv.slice(2) + , versions = [] + , range = [] + , gt = [] + , lt = [] + , eq = [] + , inc = null + , version = require("../package.json").version + , loose = false + , identifier = undefined + , semver = require("../semver") + , reverse = false + +main() + +function main () { + if (!argv.length) return help() + while (argv.length) { + var a = argv.shift() + var i = a.indexOf('=') + if (i !== -1) { + a = a.slice(0, i) + argv.unshift(a.slice(i + 1)) + } + switch (a) { + case "-rv": case "-rev": case "--rev": case "--reverse": + reverse = true + break + case "-l": case "--loose": + loose = true + break + case "-v": case "--version": + versions.push(argv.shift()) + break + case "-i": case "--inc": case "--increment": + switch (argv[0]) { + case "major": case "minor": case "patch": case "prerelease": + case "premajor": case "preminor": case "prepatch": + inc = argv.shift() + break + default: + inc = "patch" + break + } + break + case "--preid": + identifier = argv.shift() + break + case "-r": case "--range": + range.push(argv.shift()) + break + case "-h": case "--help": case "-?": + return help() + default: + versions.push(a) + break + } + } + + versions = versions.filter(function (v) { + return semver.valid(v, loose) + }) + if (!versions.length) return fail() + if (inc && (versions.length !== 1 || range.length)) + return failInc() + + for (var i = 0, l = range.length; i < l ; i ++) { + versions = versions.filter(function (v) { + return semver.satisfies(v, range[i], loose) + }) + if (!versions.length) return fail() + } + return success(versions) +} + +function failInc () { + console.error("--inc can only be used on a single version with no range") + fail() +} + +function fail () { process.exit(1) } + +function success () { + var compare = reverse ? "rcompare" : "compare" + versions.sort(function (a, b) { + return semver[compare](a, b, loose) + }).map(function (v) { + return semver.clean(v, loose) + }).map(function (v) { + return inc ? semver.inc(v, inc, loose, identifier) : v + }).forEach(function (v,i,_) { console.log(v) }) +} + +function help () { + console.log(["SemVer " + version + ,"" + ,"A JavaScript implementation of the http://semver.org/ specification" + ,"Copyright Isaac Z. Schlueter" + ,"" + ,"Usage: semver [options] [ [...]]" + ,"Prints valid versions sorted by SemVer precedence" + ,"" + ,"Options:" + ,"-r --range " + ," Print versions that match the specified range." + ,"" + ,"-i --increment []" + ," Increment a version by the specified level. Level can" + ," be one of: major, minor, patch, premajor, preminor," + ," prepatch, or prerelease. Default level is 'patch'." + ," Only one version may be specified." + ,"" + ,"--preid " + ," Identifier to be used to prefix premajor, preminor," + ," prepatch or prerelease version increments." + ,"" + ,"-l --loose" + ," Interpret versions and ranges loosely" + ,"" + ,"Program exits successfully if any valid version satisfies" + ,"all supplied ranges, and prints all satisfying versions." + ,"" + ,"If no satisfying versions are found, then exits failure." + ,"" + ,"Versions are printed in ascending order, so supplying" + ,"multiple versions to the utility will just sort them." + ].join("\n")) +} diff --git a/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/.bin/which b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/.bin/which new file mode 100755 index 00000000..7cee3729 --- /dev/null +++ b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/.bin/which @@ -0,0 +1,52 @@ +#!/usr/bin/env node +var which = require("../") +if (process.argv.length < 3) + usage() + +function usage () { + console.error('usage: which [-as] program ...') + process.exit(1) +} + +var all = false +var silent = false +var dashdash = false +var args = process.argv.slice(2).filter(function (arg) { + if (dashdash || !/^-/.test(arg)) + return true + + if (arg === '--') { + dashdash = true + return false + } + + var flags = arg.substr(1).split('') + for (var f = 0; f < flags.length; f++) { + var flag = flags[f] + switch (flag) { + case 's': + silent = true + break + case 'a': + all = true + break + default: + console.error('which: illegal option -- ' + flag) + usage() + } + } + return false +}) + +process.exit(args.reduce(function (pv, current) { + try { + var f = which.sync(current, { all: all }) + if (all) + f = f.join('\n') + if (!silent) + console.log(f) + return pv; + } catch (e) { + return 1; + } +}, 0)) diff --git a/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/alfred-link/index.js b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/alfred-link/index.js new file mode 100644 index 00000000..0733753e --- /dev/null +++ b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/alfred-link/index.js @@ -0,0 +1,57 @@ +'use strict'; +const path = require('path'); +const pathExists = require('path-exists'); +const readPkgUp = require('read-pkg-up'); +const resolveAlfredPrefs = require('resolve-alfred-prefs'); +const sudoBlock = require('sudo-block'); +const plistTransform = require('./lib/plist-transform'); +const link = require('./lib/link'); +const unlink = require('./lib/unlink'); + +// Prevent running as `sudo` +sudoBlock(); + +const getWorkflowDir = () => resolveAlfredPrefs().then(prefs => path.join(prefs, 'workflows')); + +const readPkg = workflowDir => pathExists(workflowDir) + .then(exists => { + if (!exists) { + throw new Error(`Workflow directory \`${workflowDir}\` does not exist`); + } + + return readPkgUp(); + }); + +exports.link = opts => { + const options = Object.assign({ + transform: true + }, opts); + + let workflowDir; + + return getWorkflowDir() + .then(dir => { + workflowDir = dir; + + return readPkg(dir); + }) + .then(result => { + const pkg = result.pkg; + const filePath = result.path; + + const src = path.dirname(filePath); + const dest = path.join(workflowDir, pkg.name); + + if (!options.transform) { + return link(src, dest); + } + + return plistTransform(path.dirname(filePath), pkg) + .then(() => link(src, dest)); + }); +}; + +exports.unlink = () => getWorkflowDir() + .then(dir => readPkg(dir) + .then(res => unlink(path.join(dir, res.pkg.name))) + ); diff --git a/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/alfred-link/lib/link.js b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/alfred-link/lib/link.js new file mode 100644 index 00000000..c9d4bb8d --- /dev/null +++ b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/alfred-link/lib/link.js @@ -0,0 +1,8 @@ +'use strict'; +const fs = require('fs'); +const pify = require('pify'); +const del = require('del'); + +const fsP = pify(fs); + +module.exports = (src, dest) => del(dest, {force: true}).then(() => fsP.symlink(src, dest)); diff --git a/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/alfred-link/lib/plist-transform.js b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/alfred-link/lib/plist-transform.js new file mode 100644 index 00000000..87280c88 --- /dev/null +++ b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/alfred-link/lib/plist-transform.js @@ -0,0 +1,40 @@ +'use strict'; +const path = require('path'); +const fs = require('fs'); +const plist = require('plist'); +const pify = require('pify'); + +const fsP = pify(fs); + +// Fixes some inconsistencies when running `plist.parse` +// https://github.com/TooTallNate/plist.js/issues/75 +const fix = obj => { + for (const key of Object.keys(obj)) { + const val = obj[key]; + + if (val === null || val === undefined) { + obj[key] = ''; + } else if (Array.isArray(val)) { + obj[key] = val.map(fix); + } else if (typeof val === 'object') { + obj[key] = fix(val); + } + } + + return obj; +}; + +module.exports = (dir, pkg) => { + const file = path.join(dir, 'info.plist'); + + return fsP.readFile(file, 'utf8') + .then(content => { + const data = fix(plist.parse(content)); + data.version = pkg.version || ''; + data.description = pkg.description || ''; + data.webaddress = pkg.homepage || pkg.author.url || ''; + data.createdby = pkg.author.name || ''; + + return fsP.writeFile(file, plist.build(data)); + }); +}; diff --git a/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/alfred-link/lib/unlink.js b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/alfred-link/lib/unlink.js new file mode 100644 index 00000000..fde0ecae --- /dev/null +++ b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/alfred-link/lib/unlink.js @@ -0,0 +1,25 @@ +/* eslint-disable indent */ +'use strict'; +const path = require('path'); +const fs = require('fs'); +const del = require('del'); +const pify = require('pify'); +const userHome = require('user-home'); + +const fsP = pify(fs); + +const idRegexp = /bundleid<\/key>[\s]*(.*?)<\/string>/; + +// Remove the symlink +const unlink = dir => del(path.join(dir), {force: true}); + +// Cleanup config and cache data +const cleanup = dir => fsP.readFile(path.join(dir, 'info.plist'), 'utf8') + .then(content => idRegexp.exec(content)[1]) + .then(bundleid => Promise.all([ + unlink(path.join(userHome, 'Library/Application Support/Alfred 3/Workflow Data', bundleid)), + unlink(path.join(userHome, 'Library/Caches/com.runningwithcrayons.Alfred-3/Workflow Data', bundleid)) + ])); + +module.exports = dir => cleanup(dir) + .then(unlink(dir)); diff --git a/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/alfred-link/license b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/alfred-link/license new file mode 100644 index 00000000..78b08554 --- /dev/null +++ b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/alfred-link/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Sam Verschueren (github.com/SamVerschueren) + +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/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/alfred-link/link.js b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/alfred-link/link.js new file mode 100755 index 00000000..1668e4b1 --- /dev/null +++ b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/alfred-link/link.js @@ -0,0 +1,16 @@ +#!/usr/bin/env node +'use strict'; +const alfredLink = require('./'); + +const npmGlobal = process.env.npm_config_global; + +if (npmGlobal === '') { + // Prevent linking if the script was part of a non-global npm (install) command + process.exit(0); +} + +// Only transform if `alfred-link` is called from `npm -g` +alfredLink.link({transform: npmGlobal}).catch(err => { + console.error(err); + process.exit(1); +}); diff --git a/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/alfred-link/package.json b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/alfred-link/package.json new file mode 100644 index 00000000..d42408c8 --- /dev/null +++ b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/alfred-link/package.json @@ -0,0 +1,123 @@ +{ + "_args": [ + [ + { + "raw": "alfred-link@^0.2.0", + "scope": null, + "escapedName": "alfred-link", + "name": "alfred-link", + "rawSpec": "^0.2.0", + "spec": ">=0.2.0 <0.3.0", + "type": "range" + }, + "/Users/frances.coronel/.nvm/versions/node/v6.10.1/lib/node_modules/alfred-emoj/node_modules/alfy" + ] + ], + "_from": "alfred-link@>=0.2.0 <0.3.0", + "_id": "alfred-link@0.2.0", + "_inCache": true, + "_location": "/alfred-emoj/alfred-link", + "_nodeVersion": "4.4.3", + "_npmOperationalInternal": { + "host": "packages-18-east.internal.npmjs.com", + "tmp": "tmp/alfred-link-0.2.0.tgz_1478460866033_0.45773612265475094" + }, + "_npmUser": { + "name": "samverschueren", + "email": "sam.verschueren@gmail.com" + }, + "_npmVersion": "2.15.1", + "_phantomChildren": {}, + "_requested": { + "raw": "alfred-link@^0.2.0", + "scope": null, + "escapedName": "alfred-link", + "name": "alfred-link", + "rawSpec": "^0.2.0", + "spec": ">=0.2.0 <0.3.0", + "type": "range" + }, + "_requiredBy": [ + "/alfred-emoj/alfy" + ], + "_resolved": "https://registry.npmjs.org/alfred-link/-/alfred-link-0.2.0.tgz", + "_shasum": "bb456ce5a4ecbfbc57fb4a020a29cd1bfa4d78d2", + "_shrinkwrap": null, + "_spec": "alfred-link@^0.2.0", + "_where": "/Users/frances.coronel/.nvm/versions/node/v6.10.1/lib/node_modules/alfred-emoj/node_modules/alfy", + "author": { + "name": "Sam Verschueren", + "email": "sam.verschueren@gmail.com", + "url": "github.com/SamVerschueren" + }, + "bin": { + "alfred-link": "link.js", + "alfred-unlink": "unlink.js" + }, + "bugs": { + "url": "https://github.com/samverschueren/alfred-link/issues" + }, + "dependencies": { + "del": "^2.2.2", + "path-exists": "^3.0.0", + "pify": "^2.3.0", + "plist": "^2.0.1", + "read-pkg-up": "^1.0.1", + "resolve-alfred-prefs": "^1.0.0", + "sudo-block": "^1.2.0", + "user-home": "^2.0.0" + }, + "description": "Make your Alfred workflows installable from npm", + "devDependencies": { + "xo": "*" + }, + "directories": {}, + "dist": { + "shasum": "bb456ce5a4ecbfbc57fb4a020a29cd1bfa4d78d2", + "tarball": "https://registry.npmjs.org/alfred-link/-/alfred-link-0.2.0.tgz" + }, + "engines": { + "node": ">=4" + }, + "files": [ + "index.js", + "link.js", + "unlink.js", + "lib" + ], + "gitHead": "dcfa93e6693fa6671cd41ce387bc94dc1f93aed8", + "homepage": "https://github.com/samverschueren/alfred-link#readme", + "keywords": [ + "cli-app", + "cli", + "alfred", + "link", + "symlink", + "packal" + ], + "license": "MIT", + "maintainers": [ + { + "name": "samverschueren", + "email": "sam.verschueren@gmail.com" + }, + { + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" + } + ], + "name": "alfred-link", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/samverschueren/alfred-link.git" + }, + "scripts": { + "test": "xo" + }, + "version": "0.2.0", + "xo": { + "esnext": true + } +} diff --git a/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/alfred-link/readme.md b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/alfred-link/readme.md new file mode 100644 index 00000000..524985be --- /dev/null +++ b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/alfred-link/readme.md @@ -0,0 +1,70 @@ +# alfred-link [![Build Status](https://travis-ci.org/SamVerschueren/alfred-link.svg?branch=master)](https://travis-ci.org/SamVerschueren/alfred-link) + +> Make your [Alfred](https://www.alfredapp.com/) workflows installable from npm + + +## Install + +``` +$ npm install --save alfred-link +``` + + +## Usage + +Add the `alfred-link` command as `postinstall` script of your Alfred package and add `alfred-unlink` as `preuninstall` script to clean up the resources when the workflow gets uninstalled. + +```json +{ + "name": "alfred-unicorn", + "scripts": { + "postinstall": "alfred-link", + "preuninstall": "alfred-unlink" + } +} +``` + +You can now install the `alfred-unicorn` package like this + +``` +$ npm install -g alfred-unicorn. +``` + +This will update `info.plist` with the information from `package.json` and creates a `unicorn` symlink inside the Alfred workflows directory that points to the location of the `alfred-unicorn` module. + + +## info.plist + +This package will update the `info.plist` file when the workflow is being installed. The following properties in `info.plist` can be safely omitted. The corresponding values in `package.json` are added to the plist file. + +| info.plist | package.json | +|-------------|--------------| +| version | version | +| description | description | +| webaddress | homepage | +| createdby | author.name | + + +## Development + +When developing an Alfred workflow, you can call `alfred-link` directly from your cli. Either by installing `alfred-link` globally or by calling `alfred-link` from your `node_modules/.bin` directory. This will create a symlink in the Alfred workflows directory pointing to your development location without transforming `info.plist`. + +``` +$ ./node_modules/.bin/alfred-link +``` + +To remove the symlink afterwards, you can call `alfred-unlink`. + +``` +$ ./node_modules/.bin/alfred-unlink +``` + + +## Related + +- [alfy](https://github.com/sindresorhus/alfy) - Create Alfred workflows with ease + + +## License + +MIT © [Sam Verschueren](https://github.com/SamVerschueren) diff --git a/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/alfred-link/unlink.js b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/alfred-link/unlink.js new file mode 100755 index 00000000..3acc2652 --- /dev/null +++ b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/alfred-link/unlink.js @@ -0,0 +1,8 @@ +#!/usr/bin/env node +'use strict'; +const alfredLink = require('./'); + +alfredLink.unlink().catch(err => { + console.error(err); + process.exit(1); +}); diff --git a/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/alfred-notifier/check.js b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/alfred-notifier/check.js new file mode 100755 index 00000000..69124eb2 --- /dev/null +++ b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/alfred-notifier/check.js @@ -0,0 +1,39 @@ +#!/usr/bin/env node +'use strict'; +const readPkg = require('read-pkg'); +const latestVersion = require('latest-version'); +const semver = require('semver'); +const execa = require('execa'); +const CacheConf = require('cache-conf'); +const notify = require('./lib/notify'); +const pkg = require('./package.json'); + +const ONE_DAY = 86400000; + +const workflowPath = process.cwd(); +const conf = new CacheConf({projectName: pkg.name}); + +const checkNpm = pkg => latestVersion(pkg.name).then(version => ({ + latest: version, + current: pkg.version, + name: pkg.name +})); + +readPkg(workflowPath) + .then(pkg => { + if (conf.has(pkg.name)) { + // Skip checking if a valid entry exists + return; + } + + return checkNpm(pkg).then(res => { + // Store the latest version in the cache for one day + conf.set(res.name, res.latest, {maxAge: ONE_DAY}); + + if (!semver.eq(res.latest, res.current)) { + // Overwrite `info.plist` and reload the workflows + return notify(workflowPath, `Update available: ${res.current} → ${res.latest}. Run \`npm install -g ${res.name}\``) + .then(() => execa('open', ['-n', '-a', 'Alfred 3'])); + } + }); + }); diff --git a/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/alfred-notifier/index.js b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/alfred-notifier/index.js new file mode 100644 index 00000000..505a842c --- /dev/null +++ b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/alfred-notifier/index.js @@ -0,0 +1,8 @@ +'use strict'; +const path = require('path'); +const execa = require('execa'); + +module.exports = () => { + const cp = execa(path.join(__dirname, 'check.js')); + cp.unref(); +}; diff --git a/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/alfred-notifier/lib/notify.js b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/alfred-notifier/lib/notify.js new file mode 100644 index 00000000..b35eef92 --- /dev/null +++ b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/alfred-notifier/lib/notify.js @@ -0,0 +1,42 @@ +'use strict'; +const path = require('path'); +const fs = require('fs'); +const plist = require('plist'); +const pify = require('pify'); + +const fsP = pify(fs); + +// Fixes some inconsistencies when running `plist.parse` +// https://github.com/TooTallNate/plist.js/issues/75 +const fix = obj => { + for (const key of Object.keys(obj)) { + const val = obj[key]; + + if (val === null || val === undefined) { + obj[key] = ''; + } else if (Array.isArray(val)) { + obj[key] = val.map(fix); + } else if (typeof val === 'object') { + obj[key] = fix(val); + } + } + + return obj; +}; + +module.exports = (dir, message) => { + const file = path.join(dir, 'info.plist'); + + return fsP.readFile(file, 'utf8') + .then(content => { + const data = fix(plist.parse(content)); + + for (const obj of data.objects) { + if (obj.config.subtext !== undefined) { + obj.config.subtext = message; + } + } + + return fsP.writeFile(file, plist.build(data)); + }); +}; diff --git a/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/alfred-notifier/license b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/alfred-notifier/license new file mode 100644 index 00000000..78b08554 --- /dev/null +++ b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/alfred-notifier/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Sam Verschueren (github.com/SamVerschueren) + +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/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/alfred-notifier/node_modules/cache-conf/index.js b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/alfred-notifier/node_modules/cache-conf/index.js new file mode 100644 index 00000000..f73f93ec --- /dev/null +++ b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/alfred-notifier/node_modules/cache-conf/index.js @@ -0,0 +1,46 @@ +'use strict'; +const Conf = require('conf'); + +class CacheConf extends Conf { + + get(key) { + if (this.isExpired(key)) { + super.delete(key); + return; + } + + const item = super.get(key); + + return item && item.data; + } + + set(key, val, opts) { + opts = opts || {}; + + super.set(key, { + timestamp: opts.maxAge && Date.now() + opts.maxAge, + data: val + }); + } + + has(key) { + if (!super.has(key)) { + return false; + } + + if (this.isExpired(key)) { + super.delete(key); + return false; + } + + return true; + } + + isExpired(key) { + const item = super.get(key); + + return Boolean(item && item.timestamp && item.timestamp < Date.now()); + } +} + +module.exports = CacheConf; diff --git a/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/alfred-notifier/node_modules/cache-conf/license b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/alfred-notifier/node_modules/cache-conf/license new file mode 100644 index 00000000..78b08554 --- /dev/null +++ b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/alfred-notifier/node_modules/cache-conf/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Sam Verschueren (github.com/SamVerschueren) + +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/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/alfred-notifier/node_modules/cache-conf/package.json b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/alfred-notifier/node_modules/cache-conf/package.json new file mode 100644 index 00000000..8b9fbd6f --- /dev/null +++ b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/alfred-notifier/node_modules/cache-conf/package.json @@ -0,0 +1,120 @@ +{ + "_args": [ + [ + { + "raw": "cache-conf@^0.1.0", + "scope": null, + "escapedName": "cache-conf", + "name": "cache-conf", + "rawSpec": "^0.1.0", + "spec": ">=0.1.0 <0.2.0", + "type": "range" + }, + "/Users/frances.coronel/.nvm/versions/node/v6.10.1/lib/node_modules/alfred-emoj/node_modules/alfred-notifier" + ] + ], + "_from": "cache-conf@>=0.1.0 <0.2.0", + "_id": "cache-conf@0.1.0", + "_inCache": true, + "_location": "/alfred-emoj/alfred-notifier/cache-conf", + "_nodeVersion": "4.4.3", + "_npmOperationalInternal": { + "host": "packages-16-east.internal.npmjs.com", + "tmp": "tmp/cache-conf-0.1.0.tgz_1473192470528_0.6410382445901632" + }, + "_npmUser": { + "name": "samverschueren", + "email": "sam.verschueren@gmail.com" + }, + "_npmVersion": "2.15.1", + "_phantomChildren": {}, + "_requested": { + "raw": "cache-conf@^0.1.0", + "scope": null, + "escapedName": "cache-conf", + "name": "cache-conf", + "rawSpec": "^0.1.0", + "spec": ">=0.1.0 <0.2.0", + "type": "range" + }, + "_requiredBy": [ + "/alfred-emoj/alfred-notifier" + ], + "_resolved": "https://registry.npmjs.org/cache-conf/-/cache-conf-0.1.0.tgz", + "_shasum": "0b5bf1d0447f84f983347a027ace55b00d26ee6b", + "_shrinkwrap": null, + "_spec": "cache-conf@^0.1.0", + "_where": "/Users/frances.coronel/.nvm/versions/node/v6.10.1/lib/node_modules/alfred-emoj/node_modules/alfred-notifier", + "author": { + "name": "Sam Verschueren", + "email": "sam.verschueren@gmail.com", + "url": "github.com/SamVerschueren" + }, + "bugs": { + "url": "https://github.com/samverschueren/cache-conf/issues" + }, + "dependencies": { + "conf": "^0.11.2" + }, + "description": "Simple cache config handling for your app or module", + "devDependencies": { + "ava": "*", + "delay": "^1.3.1", + "tempfile": "^1.1.1", + "xo": "*" + }, + "directories": {}, + "dist": { + "shasum": "0b5bf1d0447f84f983347a027ace55b00d26ee6b", + "tarball": "https://registry.npmjs.org/cache-conf/-/cache-conf-0.1.0.tgz" + }, + "engines": { + "node": ">=4" + }, + "files": [ + "index.js" + ], + "gitHead": "9d52a2d07a75b08d8452ba4f5ff812257112adbf", + "homepage": "https://github.com/samverschueren/cache-conf#readme", + "keywords": [ + "cache", + "caching", + "config", + "store", + "app", + "storage", + "conf", + "configuration", + "settings", + "preferences", + "json", + "data", + "persist", + "persistent", + "save", + "load", + "read", + "write" + ], + "license": "MIT", + "maintainers": [ + { + "name": "samverschueren", + "email": "sam.verschueren@gmail.com" + } + ], + "name": "cache-conf", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/samverschueren/cache-conf.git" + }, + "scripts": { + "test": "xo && ava" + }, + "version": "0.1.0", + "xo": { + "esnext": true + } +} diff --git a/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/alfred-notifier/node_modules/cache-conf/readme.md b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/alfred-notifier/node_modules/cache-conf/readme.md new file mode 100644 index 00000000..18850b9f --- /dev/null +++ b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/alfred-notifier/node_modules/cache-conf/readme.md @@ -0,0 +1,73 @@ +# cache-conf [![Build Status](https://travis-ci.org/SamVerschueren/cache-conf.svg?branch=master)](https://travis-ci.org/SamVerschueren/cache-conf) + +> Simple cache config handling for your app or module + +If you don't need caching, you should use [conf](https://github.com/sindresorhus/conf) instead. This module extends that module and +abstracts away the caching mechanism. + + +## Install + +``` +$ npm install --save cache-conf +``` + + +## Usage + +```js +const delay = require('delay'); +const CacheConf = require('cache-conf'); +const config = new CacheConf(); + +config.set('unicorn', '🦄', {maxAge: 5000}); +console.log(config.get('unicorn')); +//=> '🦄' + +// Wait 5 seconds +await delay(5000); + +console.log(config.get('unicorn')); +//=> undefined +``` + + +## API + +### CacheConf([options]) + +Returns a new instance. + +#### options + +Any of the [conf options](https://github.com/sindresorhus/conf#options). + +### Instance + +An extended [conf](https://github.com/sindresorhus/conf#instance) instance. + +#### set(key, value, [options]) + +Set an item. + +##### options + +###### maxAge + +Type: `number` + +Number of milliseconds the cached value is valid. + +#### isExpired(key) + +Boolean indicating if the cached data is expired. + + +## Related + +- [conf](https://github.com/sindresorhus/conf) - Simple config handling for your app or module + + +## License + +MIT © [Sam Verschueren](https://github.com/SamVerschueren) diff --git a/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/alfred-notifier/node_modules/execa/index.js b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/alfred-notifier/node_modules/execa/index.js new file mode 100644 index 00000000..5f3714a0 --- /dev/null +++ b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/alfred-notifier/node_modules/execa/index.js @@ -0,0 +1,172 @@ +'use strict'; +var childProcess = require('child_process'); +var crossSpawnAsync = require('cross-spawn-async'); +var stripEof = require('strip-eof'); +var objectAssign = require('object-assign'); +var npmRunPath = require('npm-run-path'); +var isStream = require('is-stream'); +var pathKey = require('path-key')(); +var TEN_MEBIBYTE = 1024 * 1024 * 10; + +function handleArgs(cmd, args, opts) { + var parsed; + + if (opts && opts.__winShell === true) { + delete opts.__winShell; + parsed = { + command: cmd, + args: args, + options: opts, + file: cmd, + original: cmd + }; + } else { + parsed = crossSpawnAsync._parse(cmd, args, opts); + } + + opts = objectAssign({ + maxBuffer: TEN_MEBIBYTE, + stripEof: true, + preferLocal: true, + encoding: 'utf8' + }, parsed.options); + + if (opts.preferLocal) { + opts.env = objectAssign({}, opts.env || process.env); + opts.env[pathKey] = npmRunPath({ + cwd: opts.cwd, + path: opts.env[pathKey] + }); + } + + return { + cmd: parsed.command, + args: parsed.args, + opts: opts + }; +} + +function handleInput(spawned, opts) { + var input = opts.input; + + if (input === null || input === undefined) { + return; + } + + if (isStream(input)) { + input.pipe(spawned.stdin); + } else { + spawned.stdin.end(input); + } +} + +function handleOutput(opts, val) { + if (opts.stripEof) { + val = stripEof(val); + } + + return val; +} + +function handleShell(fn, cmd, opts) { + var file; + var args; + + opts = objectAssign({}, opts); + + if (process.platform === 'win32') { + opts.__winShell = true; + file = process.env.comspec || 'cmd.exe'; + args = ['/s', '/c', '"' + cmd + '"']; + opts.windowsVerbatimArguments = true; + } else { + file = '/bin/sh'; + args = ['-c', cmd]; + } + + if (opts.shell) { + file = opts.shell; + } + + return fn(file, args, opts); +} + +module.exports = function (cmd, args, opts) { + var spawned; + + var promise = new Promise(function (resolve, reject) { + var parsed = handleArgs(cmd, args, opts); + + spawned = childProcess.execFile(parsed.cmd, parsed.args, parsed.opts, function (err, stdout, stderr) { + if (err) { + err.stdout = stdout; + err.stderr = stderr; + err.message += stdout; + reject(err); + return; + } + + resolve({ + stdout: handleOutput(parsed.opts, stdout), + stderr: handleOutput(parsed.opts, stderr) + }); + }); + + crossSpawnAsync._enoent.hookChildProcess(spawned, parsed); + + handleInput(spawned, parsed.opts); + }); + + spawned.then = promise.then.bind(promise); + spawned.catch = promise.catch.bind(promise); + + return spawned; +}; + +module.exports.stdout = function () { + // TODO: set `stderr: 'ignore'` when that option is implemented + return module.exports.apply(null, arguments).then(function (x) { + return x.stdout; + }); +}; + +module.exports.stderr = function () { + // TODO: set `stdout: 'ignore'` when that option is implemented + return module.exports.apply(null, arguments).then(function (x) { + return x.stderr; + }); +}; + +module.exports.shell = function (cmd, opts) { + return handleShell(module.exports, cmd, opts); +}; + +module.exports.spawn = function (cmd, args, opts) { + var parsed = handleArgs(cmd, args, opts); + var spawned = childProcess.spawn(parsed.cmd, parsed.args, parsed.opts); + + crossSpawnAsync._enoent.hookChildProcess(spawned, parsed); + + return spawned; +}; + +module.exports.sync = function (cmd, args, opts) { + var parsed = handleArgs(cmd, args, opts); + + if (isStream(parsed.opts.input)) { + throw new TypeError('The `input` option cannot be a stream in sync mode'); + } + + var result = childProcess.spawnSync(parsed.cmd, parsed.args, parsed.opts); + + if (parsed.opts.stripEof) { + result.stdout = stripEof(result.stdout); + result.stderr = stripEof(result.stderr); + } + + return result; +}; + +module.exports.shellSync = function (cmd, opts) { + return handleShell(module.exports.sync, cmd, opts); +}; diff --git a/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/alfred-notifier/node_modules/execa/license b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/alfred-notifier/node_modules/execa/license new file mode 100644 index 00000000..654d0bfe --- /dev/null +++ b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/alfred-notifier/node_modules/execa/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +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/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/alfred-notifier/node_modules/execa/package.json b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/alfred-notifier/node_modules/execa/package.json new file mode 100644 index 00000000..d6484380 --- /dev/null +++ b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/alfred-notifier/node_modules/execa/package.json @@ -0,0 +1,122 @@ +{ + "_args": [ + [ + { + "raw": "execa@^0.4.0", + "scope": null, + "escapedName": "execa", + "name": "execa", + "rawSpec": "^0.4.0", + "spec": ">=0.4.0 <0.5.0", + "type": "range" + }, + "/Users/frances.coronel/.nvm/versions/node/v6.10.1/lib/node_modules/alfred-emoj/node_modules/alfred-notifier" + ] + ], + "_from": "execa@>=0.4.0 <0.5.0", + "_id": "execa@0.4.0", + "_inCache": true, + "_location": "/alfred-emoj/alfred-notifier/execa", + "_nodeVersion": "4.4.2", + "_npmOperationalInternal": { + "host": "packages-12-west.internal.npmjs.com", + "tmp": "tmp/execa-0.4.0.tgz_1461691655825_0.48842903040349483" + }, + "_npmUser": { + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" + }, + "_npmVersion": "3.8.8", + "_phantomChildren": {}, + "_requested": { + "raw": "execa@^0.4.0", + "scope": null, + "escapedName": "execa", + "name": "execa", + "rawSpec": "^0.4.0", + "spec": ">=0.4.0 <0.5.0", + "type": "range" + }, + "_requiredBy": [ + "/alfred-emoj/alfred-notifier" + ], + "_resolved": "https://registry.npmjs.org/execa/-/execa-0.4.0.tgz", + "_shasum": "4eb6467a36a095fabb2970ff9d5e3fb7bce6ebc3", + "_shrinkwrap": null, + "_spec": "execa@^0.4.0", + "_where": "/Users/frances.coronel/.nvm/versions/node/v6.10.1/lib/node_modules/alfred-emoj/node_modules/alfred-notifier", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/execa/issues" + }, + "dependencies": { + "cross-spawn-async": "^2.1.1", + "is-stream": "^1.1.0", + "npm-run-path": "^1.0.0", + "object-assign": "^4.0.1", + "path-key": "^1.0.0", + "strip-eof": "^1.0.0" + }, + "description": "A better `child_process`", + "devDependencies": { + "ava": "*", + "cat-names": "^1.0.2", + "coveralls": "^2.11.9", + "get-stream": "^2.0.0", + "nyc": "^6.4.0", + "xo": "*" + }, + "directories": {}, + "dist": { + "shasum": "4eb6467a36a095fabb2970ff9d5e3fb7bce6ebc3", + "tarball": "https://registry.npmjs.org/execa/-/execa-0.4.0.tgz" + }, + "engines": { + "node": ">=0.12" + }, + "files": [ + "index.js" + ], + "gitHead": "c72609605b1ce2fcf42b913cd91e74503cd8d629", + "homepage": "https://github.com/sindresorhus/execa#readme", + "keywords": [ + "exec", + "child", + "process", + "execute", + "fork", + "execfile", + "spawn", + "file", + "shell", + "bin", + "binary", + "binaries", + "npm", + "path", + "local" + ], + "license": "MIT", + "maintainers": [ + { + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" + } + ], + "name": "execa", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/execa.git" + }, + "scripts": { + "coveralls": "nyc report --reporter=text-lcov | coveralls", + "test": "xo && nyc ava" + }, + "version": "0.4.0" +} diff --git a/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/alfred-notifier/node_modules/execa/readme.md b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/alfred-notifier/node_modules/execa/readme.md new file mode 100644 index 00000000..1231e6d8 --- /dev/null +++ b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/alfred-notifier/node_modules/execa/readme.md @@ -0,0 +1,137 @@ +# execa [![Build Status: Linux](https://travis-ci.org/sindresorhus/execa.svg?branch=master)](https://travis-ci.org/sindresorhus/execa) [![Build status: Windows](https://ci.appveyor.com/api/projects/status/x5ajamxtjtt93cqv/branch/master?svg=true)](https://ci.appveyor.com/project/sindresorhus/execa/branch/master) [![Coverage Status](https://coveralls.io/repos/github/sindresorhus/execa/badge.svg?branch=master)](https://coveralls.io/github/sindresorhus/execa?branch=master) + +> A better [`child_process`](https://nodejs.org/api/child_process.html) + + +## Why + +- Promise interface. +- [Strips EOF](https://github.com/sindresorhus/strip-eof) from the output so you don't have to `stdout.trim()`. +- Supports [shebang](https://en.wikipedia.org/wiki/Shebang_(Unix)) binaries cross-platform. +- [Improved Windows support.](https://github.com/IndigoUnited/node-cross-spawn-async#why) +- Higher max buffer. 10 MB instead of 200 KB. +- [Executes locally installed binaries by name.](#preferlocal) + + +## Install + +``` +$ npm install --save execa +``` + + +## Usage + +```js +const execa = require('execa'); + +execa('echo', ['unicorns']).then(result => { + console.log(result.stdout); + //=> 'unicorns' +}); + +execa.shell('echo unicorns').then(result => { + console.log(result.stdout); + //=> 'unicorns' +}); + +// example of catching an error +execa.shell('exit 3').catch(error => { + console.log(error); + /* + { + message: 'Command failed: /bin/sh -c exit 3' + killed: false, + code: 3, + signal: null, + cmd: '/bin/sh -c exit 3', + stdout: '', + stderr: '' + } + */ +}); +``` + + +## API + +### execa(file, [arguments], [options]) + +Execute a file. + +Same options as [`child_process.execFile`](https://nodejs.org/api/child_process.html#child_process_child_process_execfile_file_args_options_callback). + +Returns a [`child_process` instance](https://nodejs.org/api/child_process.html#child_process_class_childprocess). + +The `child_process` instance is enhanced to also be promise for a result object with `stdout` and `stderr` properties. + +### execa.stdout(file, [arguments], [options]) + +Same as `execa()`, but returns only `stdout`. + +### execa.stderr(file, [arguments], [options]) + +Same as `execa()`, but returns only `stderr`. + +### execa.shell(command, [options]) + +Execute a command through the system shell. Prefer `execa()` whenever possible, as it's both faster and safer. + +Same options as [`child_process.exec`](https://nodejs.org/api/child_process.html#child_process_child_process_exec_command_options_callback). + +Returns a [`child_process` instance](https://nodejs.org/api/child_process.html#child_process_class_childprocess). + +The `child_process` instance is enhanced to also be promise for a result object with `stdout` and `stderr` properties. + +### execa.spawn(file, [arguments], [options]) + +Spawn a file. + +Same API as [`child_process.spawn`](https://nodejs.org/api/child_process.html#child_process_child_process_spawn_command_args_options). + +### execa.sync(file, [arguments], [options]) + +Execute a file synchronously. + +Same options as [`child_process.execFileSync`](https://nodejs.org/api/child_process.html#child_process_child_process_execfilesync_file_args_options), except the default encoding is `utf8` instead of `buffer`. + +Returns the same result object as [`child_process.spawnSync`](https://nodejs.org/api/child_process.html#child_process_child_process_spawnsync_command_args_options). + +### execa.shellSync(file, [options]) + +Execute a command synchronously through the system shell. + +Same options as [`child_process.execSync`](https://nodejs.org/api/child_process.html#child_process_child_process_execsync_command_options), except the default encoding is `utf8` instead of `buffer`. + +Returns the same result object as [`child_process.spawnSync`](https://nodejs.org/api/child_process.html#child_process_child_process_spawnsync_command_args_options). + +### options + +Additional options: + +#### stripEof + +Type: `boolean`
+Default: `true` + +[Strip EOF](https://github.com/sindresorhus/strip-eof) (last newline) from the output. + +#### preferLocal + +Type: `boolean`
+Default: `true` + +Prefer locally installed binaries when looking for a binary to execute.
+If you `$ npm install foo`, you can then `execa('foo')`. + +#### input + +Type: `string` `Buffer` `ReadableStream` + +Write some input to the `stdin` of your binary.
+Streams are not allowed when using the synchronous methods. + + +## License + +MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/alfred-notifier/node_modules/npm-run-path/index.js b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/alfred-notifier/node_modules/npm-run-path/index.js new file mode 100644 index 00000000..92b8d7dc --- /dev/null +++ b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/alfred-notifier/node_modules/npm-run-path/index.js @@ -0,0 +1,23 @@ +'use strict'; +var path = require('path'); +var pathKey = require('path-key'); + +module.exports = function (opts) { + opts = opts || {}; + + var prev; + var pth = path.resolve(opts.cwd || '.'); + + var ret = []; + + while (prev !== pth) { + ret.push(path.join(pth, 'node_modules/.bin')); + prev = pth; + pth = path.resolve(pth, '..'); + } + + // ensure the running `node` binary is used + ret.push(path.dirname(process.execPath)); + + return ret.concat(opts.path || process.env[pathKey()]).join(path.delimiter); +}; diff --git a/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/alfred-notifier/node_modules/npm-run-path/license b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/alfred-notifier/node_modules/npm-run-path/license new file mode 100644 index 00000000..654d0bfe --- /dev/null +++ b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/alfred-notifier/node_modules/npm-run-path/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +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/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/alfred-notifier/node_modules/npm-run-path/package.json b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/alfred-notifier/node_modules/npm-run-path/package.json new file mode 100644 index 00000000..189e7839 --- /dev/null +++ b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/alfred-notifier/node_modules/npm-run-path/package.json @@ -0,0 +1,105 @@ +{ + "_args": [ + [ + { + "raw": "npm-run-path@^1.0.0", + "scope": null, + "escapedName": "npm-run-path", + "name": "npm-run-path", + "rawSpec": "^1.0.0", + "spec": ">=1.0.0 <2.0.0", + "type": "range" + }, + "/Users/frances.coronel/.nvm/versions/node/v6.10.1/lib/node_modules/alfred-emoj/node_modules/alfred-notifier/node_modules/execa" + ] + ], + "_from": "npm-run-path@>=1.0.0 <2.0.0", + "_id": "npm-run-path@1.0.0", + "_inCache": true, + "_location": "/alfred-emoj/alfred-notifier/npm-run-path", + "_nodeVersion": "4.2.4", + "_npmUser": { + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" + }, + "_npmVersion": "2.14.12", + "_phantomChildren": {}, + "_requested": { + "raw": "npm-run-path@^1.0.0", + "scope": null, + "escapedName": "npm-run-path", + "name": "npm-run-path", + "rawSpec": "^1.0.0", + "spec": ">=1.0.0 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/alfred-emoj/alfred-notifier/execa" + ], + "_resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-1.0.0.tgz", + "_shasum": "f5c32bf595fe81ae927daec52e82f8b000ac3c8f", + "_shrinkwrap": null, + "_spec": "npm-run-path@^1.0.0", + "_where": "/Users/frances.coronel/.nvm/versions/node/v6.10.1/lib/node_modules/alfred-emoj/node_modules/alfred-notifier/node_modules/execa", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/npm-run-path/issues" + }, + "dependencies": { + "path-key": "^1.0.0" + }, + "description": "Get your PATH prepended with locally installed binaries", + "devDependencies": { + "ava": "*", + "xo": "*" + }, + "directories": {}, + "dist": { + "shasum": "f5c32bf595fe81ae927daec52e82f8b000ac3c8f", + "tarball": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-1.0.0.tgz" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "gitHead": "8565fe56a35dd58bde38d20409339ba2e0200bd0", + "homepage": "https://github.com/sindresorhus/npm-run-path", + "keywords": [ + "npm", + "run", + "path", + "package", + "bin", + "binary", + "binaries", + "script", + "cli", + "command-line", + "execute", + "executable" + ], + "license": "MIT", + "maintainers": [ + { + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" + } + ], + "name": "npm-run-path", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/npm-run-path.git" + }, + "scripts": { + "test": "xo && ava" + }, + "version": "1.0.0" +} diff --git a/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/alfred-notifier/node_modules/npm-run-path/readme.md b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/alfred-notifier/node_modules/npm-run-path/readme.md new file mode 100644 index 00000000..da6d13e8 --- /dev/null +++ b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/alfred-notifier/node_modules/npm-run-path/readme.md @@ -0,0 +1,66 @@ +# npm-run-path [![Build Status](https://travis-ci.org/sindresorhus/npm-run-path.svg?branch=master)](https://travis-ci.org/sindresorhus/npm-run-path) + +> Get your [PATH](https://en.wikipedia.org/wiki/PATH_(variable)) prepended with locally installed binaries + +In [npm run scripts](https://docs.npmjs.com/cli/run-script) you can execute locally installed binaries by name. This enables the same outside npm. + + +## Install + +``` +$ npm install --save npm-run-path +``` + + +## Usage + +```js +const childProcess = require('child_process'); +const npmRunPath = require('npm-run-path'); + +console.log(process.env.PATH); +//=> '/usr/local/bin' + +console.log(npmRunPath()); +//=> '/Users/sindresorhus/dev/foo/node_modules/.bin:/Users/sindresorhus/dev/node_modules/.bin:/Users/sindresorhus/node_modules/.bin:/Users/node_modules/.bin:/node_modules/.bin:/usr/local/bin' + +// `foo` is a locally installed binary +childProcess.execFileSync('foo', { + env: { + PATH: npmRunPath() + } +}); +``` + + +## API + +### npmRunPath([options]) + +#### options + +##### cwd + +Type: `string` +Default: `process.cwd()` + +Working directory. + +##### path + +Type: `string` +Default: [`PATH`](https://github.com/sindresorhus/path-key) + +PATH to be appended.
+Set it to an empty string to exclude the default PATH. + + +## Related + +- [npm-run-path-cli](https://github.com/sindresorhus/npm-run-path-cli) - CLI for this module +- [execa](https://github.com/sindresorhus/execa) - Execute a locally installed binary + + +## License + +MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/alfred-notifier/package.json b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/alfred-notifier/package.json new file mode 100644 index 00000000..9ac7da1e --- /dev/null +++ b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/alfred-notifier/package.json @@ -0,0 +1,127 @@ +{ + "_args": [ + [ + { + "raw": "alfred-notifier@^0.2.0", + "scope": null, + "escapedName": "alfred-notifier", + "name": "alfred-notifier", + "rawSpec": "^0.2.0", + "spec": ">=0.2.0 <0.3.0", + "type": "range" + }, + "/Users/frances.coronel/.nvm/versions/node/v6.10.1/lib/node_modules/alfred-emoj/node_modules/alfy" + ] + ], + "_from": "alfred-notifier@>=0.2.0 <0.3.0", + "_id": "alfred-notifier@0.2.1", + "_inCache": true, + "_location": "/alfred-emoj/alfred-notifier", + "_nodeVersion": "6.9.1", + "_npmOperationalInternal": { + "host": "s3://npm-registry-packages", + "tmp": "tmp/alfred-notifier-0.2.1.tgz_1498150534290_0.3020026129670441" + }, + "_npmUser": { + "name": "samverschueren", + "email": "sam.verschueren@gmail.com" + }, + "_npmVersion": "3.10.8", + "_phantomChildren": { + "conf": "0.11.2", + "cross-spawn-async": "2.2.5", + "is-stream": "1.1.0", + "object-assign": "4.1.1", + "path-key": "1.0.0", + "strip-eof": "1.0.0" + }, + "_requested": { + "raw": "alfred-notifier@^0.2.0", + "scope": null, + "escapedName": "alfred-notifier", + "name": "alfred-notifier", + "rawSpec": "^0.2.0", + "spec": ">=0.2.0 <0.3.0", + "type": "range" + }, + "_requiredBy": [ + "/alfred-emoj/alfy" + ], + "_resolved": "https://registry.npmjs.org/alfred-notifier/-/alfred-notifier-0.2.1.tgz", + "_shasum": "057e9efafae58c71378a57740366148171e10955", + "_shrinkwrap": null, + "_spec": "alfred-notifier@^0.2.0", + "_where": "/Users/frances.coronel/.nvm/versions/node/v6.10.1/lib/node_modules/alfred-emoj/node_modules/alfy", + "author": { + "name": "Sam Verschueren", + "email": "sam.verschueren@gmail.com", + "url": "github.com/SamVerschueren" + }, + "bugs": { + "url": "https://github.com/samverschueren/alfred-notifier/issues" + }, + "dependencies": { + "cache-conf": "^0.1.0", + "execa": "^0.4.0", + "latest-version": "^2.0.0", + "pify": "^2.3.0", + "plist": "^2.0.1", + "read-pkg": "^1.1.0", + "semver": "^5.3.0" + }, + "description": "Update notifications for your Alfred workflow", + "devDependencies": { + "xo": "*" + }, + "directories": {}, + "dist": { + "shasum": "057e9efafae58c71378a57740366148171e10955", + "tarball": "https://registry.npmjs.org/alfred-notifier/-/alfred-notifier-0.2.1.tgz" + }, + "engines": { + "node": ">=4" + }, + "files": [ + "index.js", + "check.js", + "lib" + ], + "gitHead": "ba0c1b0dbe8d13a018001864703946f11d335fc5", + "homepage": "https://github.com/samverschueren/alfred-notifier#readme", + "keywords": [ + "alfred", + "alfy", + "workflow", + "update", + "updater", + "notify", + "notifier", + "module", + "version" + ], + "license": "MIT", + "maintainers": [ + { + "name": "samverschueren", + "email": "sam.verschueren@gmail.com" + }, + { + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" + } + ], + "name": "alfred-notifier", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/samverschueren/alfred-notifier.git" + }, + "scripts": { + "test": "xo" + }, + "version": "0.2.1", + "xo": { + "esnext": true + } +} diff --git a/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/alfred-notifier/readme.md b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/alfred-notifier/readme.md new file mode 100644 index 00000000..8c739d6c --- /dev/null +++ b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/alfred-notifier/readme.md @@ -0,0 +1,50 @@ +# alfred-notifier [![Build Status](https://travis-ci.org/SamVerschueren/alfred-notifier.svg?branch=master)](https://travis-ci.org/SamVerschueren/alfred-notifier) + +> Update notifications for your [Alfred](https://www.alfredapp.com/) workflow + + + + +## Install + +``` +$ npm install --save alfred-notifier +``` + + +## Usage + +### Simple example + +```js +const alfredNotifier = require('alfred-notifier'); + +alfredNotifier(); +``` + +### Comprehensive example + +```js +const alfy = require('alfy'); +const alfredNotifier = require('alfred-notifier'); + +// Checks for available update and updates the `info.plist` +alfredNotifier(); + +alfy.output([ + {title: '🦄'}, + {title: '🌈'} +]); +``` + + +## API + +### alfredNotifier() + +Checks if there is an available update. If an update is available, it will add a message as subtext of your workflow. + + +## License + +MIT © [Sam Verschueren](https://github.com/SamVerschueren) diff --git a/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/alfy/cleanup.js b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/alfy/cleanup.js new file mode 100755 index 00000000..ea8c30be --- /dev/null +++ b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/alfy/cleanup.js @@ -0,0 +1,11 @@ +#!/usr/bin/env node +'use strict'; +const execa = require('execa'); +const npmRunPath = require('npm-run-path'); + +const env = npmRunPath.env({cwd: __dirname}); + +execa('alfred-unlink', {env}).catch(err => { + console.error(err); + process.exit(1); +}); diff --git a/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/alfy/index.js b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/alfy/index.js new file mode 100644 index 00000000..3fdc3c72 --- /dev/null +++ b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/alfy/index.js @@ -0,0 +1,164 @@ +'use strict'; +/* eslint-disable dot-notation */ +const os = require('os'); +const Conf = require('conf'); +const got = require('got'); +const hookStd = require('hook-std'); +const loudRejection = require('loud-rejection'); +const cleanStack = require('clean-stack'); +const dotProp = require('dot-prop'); +const CacheConf = require('cache-conf'); +const updateNotification = require('./lib/update-notification'); + +const alfy = module.exports; + +updateNotification(); + +const getIcon = name => `/System/Library/CoreServices/CoreTypes.bundle/Contents/Resources/${name}.icns`; +const getEnv = key => process.env[`alfred_${key}`]; + +alfy.meta = { + name: getEnv('workflow_name'), + version: getEnv('workflow_version'), + uid: getEnv('workflow_uid'), + bundleId: getEnv('workflow_bundleid') +}; + +alfy.alfred = { + version: getEnv('version'), + theme: getEnv('theme'), + themeBackground: getEnv('theme_background'), + themeSelectionBackground: getEnv('theme_selection_background'), + themeSubtext: Number(getEnv('theme_subtext')), + data: getEnv('workflow_data'), + cache: getEnv('workflow_cache'), + preferences: getEnv('preferences'), + preferencesLocalHash: getEnv('preferences_localhash') +}; + +alfy.input = process.argv[2]; + +alfy.output = arr => { + console.log(JSON.stringify({items: arr}, null, '\t')); +}; + +alfy.matches = (input, list, item) => { + input = input.toLowerCase().normalize(); + + return list.filter(x => { + if (typeof item === 'string') { + x = dotProp.get(x, item); + } + + if (typeof x === 'string') { + x = x.toLowerCase(); + } + + if (typeof item === 'function') { + return item(x, input); + } + + return x.includes(input); + }); +}; + +alfy.inputMatches = (list, item) => alfy.matches(alfy.input, list, item); + +alfy.log = str => { + if (alfy.debug) { + console.log(str); + } +}; + +alfy.error = err => { + const stack = cleanStack(err.stack || err); + + const copy = ` +\`\`\` +${stack} +\`\`\` + +- +${alfy.meta.name} ${alfy.meta.version} +Alfred ${alfy.alfred.version} +${process.platform} ${process.arch} ${os.release()} + `.trim(); + + alfy.output([{ + title: err.stack ? `${err.name}: ${err.message}` : err, + subtitle: 'Press ⌘L to see the full error and ⌘C to copy it.', + valid: false, + text: { + copy, + largetype: stack + }, + icon: { + path: exports.icon.error + } + }]); +}; + +alfy.config = new Conf({ + cwd: alfy.alfred.data +}); + +alfy.cache = new CacheConf({ + configName: 'cache', + cwd: alfy.alfred.cache, + version: alfy.meta.version +}); + +alfy.fetch = (url, opts) => { + opts = Object.assign({ + json: true + }, opts); + + if (typeof url !== 'string') { + return Promise.reject(new TypeError(`Expected \`url\` to be a \`string\`, got \`${typeof url}\``)); + } + + if (opts.transform && typeof opts.transform !== 'function') { + return Promise.reject(new TypeError(`Expected \`transform\` to be a \`function\`, got \`${typeof opts.transform}\``)); + } + + const rawKey = url + JSON.stringify(opts); + const key = rawKey.replace(/\./g, '\\.'); + const cachedResponse = alfy.cache.store[rawKey] && alfy.cache.store[rawKey].data; + + if (cachedResponse && !alfy.cache.isExpired(key)) { + return Promise.resolve(cachedResponse); + } + + return got(url, opts) + .then(res => opts.transform ? opts.transform(res.body) : res.body) + .then(data => { + if (opts.maxAge) { + alfy.cache.set(key, data, {maxAge: opts.maxAge}); + } + + return data; + }) + .catch(err => { + if (cachedResponse) { + return cachedResponse; + } + + throw err; + }); +}; + +alfy.debug = getEnv('debug') === '1'; + +alfy.icon = { + get: getIcon, + info: getIcon('ToolbarInfo'), + warning: getIcon('AlertCautionIcon'), + error: getIcon('AlertStopIcon'), + alert: getIcon('Actions'), + like: getIcon('ToolbarFavoritesIcon'), + delete: getIcon('ToolbarDeleteIcon') +}; + +loudRejection(alfy.error); +process.on('uncaughtException', alfy.error); +hookStd.stderr(alfy.error); diff --git a/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/alfy/init.js b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/alfy/init.js new file mode 100755 index 00000000..55287782 --- /dev/null +++ b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/alfy/init.js @@ -0,0 +1,11 @@ +#!/usr/bin/env node +'use strict'; +const execa = require('execa'); +const npmRunPath = require('npm-run-path'); + +const env = npmRunPath.env({cwd: __dirname}); + +execa('alfred-link', {env}).catch(err => { + console.error(err); + process.exit(1); +}); diff --git a/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/alfy/lib/update-notification.js b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/alfy/lib/update-notification.js new file mode 100644 index 00000000..7a30e49f --- /dev/null +++ b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/alfy/lib/update-notification.js @@ -0,0 +1,13 @@ +'use strict'; +const readPkgUp = require('read-pkg-up'); +const alfredNotifier = require('alfred-notifier'); + +module.exports = () => { + readPkgUp().then(result => { + const alfy = result.pkg.alfy || {}; + + if (alfy.updateNotification !== false) { + alfredNotifier(); + } + }); +}; diff --git a/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/alfy/license b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/alfy/license new file mode 100644 index 00000000..654d0bfe --- /dev/null +++ b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/alfy/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +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/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/alfy/package.json b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/alfy/package.json new file mode 100644 index 00000000..fa391a20 --- /dev/null +++ b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/alfy/package.json @@ -0,0 +1,134 @@ +{ + "_args": [ + [ + { + "raw": "alfy@^0.6.0", + "scope": null, + "escapedName": "alfy", + "name": "alfy", + "rawSpec": "^0.6.0", + "spec": ">=0.6.0 <0.7.0", + "type": "range" + }, + "/Users/frances.coronel/.nvm/versions/node/v6.10.1/lib/node_modules/alfred-emoj" + ] + ], + "_from": "alfy@>=0.6.0 <0.7.0", + "_id": "alfy@0.6.0", + "_inCache": true, + "_location": "/alfred-emoj/alfy", + "_nodeVersion": "4.4.3", + "_npmOperationalInternal": { + "host": "packages-12-west.internal.npmjs.com", + "tmp": "tmp/alfy-0.6.0.tgz_1478527420616_0.11623611347749829" + }, + "_npmUser": { + "name": "samverschueren", + "email": "sam.verschueren@gmail.com" + }, + "_npmVersion": "2.15.1", + "_phantomChildren": {}, + "_requested": { + "raw": "alfy@^0.6.0", + "scope": null, + "escapedName": "alfy", + "name": "alfy", + "rawSpec": "^0.6.0", + "spec": ">=0.6.0 <0.7.0", + "type": "range" + }, + "_requiredBy": [ + "/alfred-emoj" + ], + "_resolved": "https://registry.npmjs.org/alfy/-/alfy-0.6.0.tgz", + "_shasum": "3c1ddf03e44b3cf9a4877af4bceb7acd96831d71", + "_shrinkwrap": null, + "_spec": "alfy@^0.6.0", + "_where": "/Users/frances.coronel/.nvm/versions/node/v6.10.1/lib/node_modules/alfred-emoj", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "bin": { + "run-node": "run-node.sh", + "alfy-init": "init.js", + "alfy-cleanup": "cleanup.js" + }, + "bugs": { + "url": "https://github.com/sindresorhus/alfy/issues" + }, + "dependencies": { + "alfred-link": "^0.2.0", + "alfred-notifier": "^0.2.0", + "cache-conf": "^0.3.0", + "clean-stack": "^1.0.0", + "conf": "^0.11.0", + "dot-prop": "^4.0.0", + "execa": "^0.5.0", + "got": "^6.3.0", + "hook-std": "^0.2.0", + "loud-rejection": "^1.6.0", + "npm-run-path": "^2.0.2", + "read-pkg-up": "^1.0.1" + }, + "description": "Create Alfred workflows with ease", + "devDependencies": { + "ava": "*", + "delay": "^1.3.1", + "nock": "^8.0.0", + "tempfile": "^1.1.1", + "xo": "*" + }, + "directories": {}, + "dist": { + "shasum": "3c1ddf03e44b3cf9a4877af4bceb7acd96831d71", + "tarball": "https://registry.npmjs.org/alfy/-/alfy-0.6.0.tgz" + }, + "engines": { + "node": ">=4" + }, + "files": [ + "index.js", + "init.js", + "cleanup.js", + "run-node.sh", + "lib" + ], + "gitHead": "eb7f444fa74ffbcc80ef190f401799c3e1332466", + "homepage": "https://github.com/sindresorhus/alfy#readme", + "keywords": [ + "alfred", + "app", + "workflow", + "plugin", + "helper", + "util", + "utility", + "macos", + "mac", + "osx" + ], + "license": "MIT", + "maintainers": [ + { + "name": "samverschueren", + "email": "sam.verschueren@gmail.com" + }, + { + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" + } + ], + "name": "alfy", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/alfy.git" + }, + "scripts": { + "test": "xo && ava" + }, + "version": "0.6.0" +} diff --git a/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/alfy/readme.md b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/alfy/readme.md new file mode 100644 index 00000000..55dbd71f --- /dev/null +++ b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/alfy/readme.md @@ -0,0 +1,523 @@ +# ![Alfy](https://cdn.rawgit.com/sindresorhus/alfy/4b50f0323dd99eafdd34523dc8de0680be04e049/media/header.svg) + +> Create [Alfred workflows](https://www.alfredapp.com/workflows/) with ease + +[![Build Status](https://travis-ci.org/sindresorhus/alfy.svg?branch=master)](https://travis-ci.org/sindresorhus/alfy) + + +## Highlights + +- Easy input↔output. +- Config and [cache](#caching) handling built-in. +- Fetching remote files with optional caching. +- Publish your workflow to npm. +- Automatic [update notifications](#update-notifications). +- Easily [testable workflows](#testing). +- [Finds the `node` binary.](run-node.sh) +- Presents uncaught exceptions and unhandled Promise rejections to the user.
+ *No need to manually `.catch()` top-level promises.* + + +## Prerequisites + +You need [Node.js 4+](https://nodejs.org) and [Alfred 3](https://www.alfredapp.com) with the paid [Powerpack](https://www.alfredapp.com/powerpack/) upgrade. + + +## Install + +``` +$ npm install --save alfy +``` + + +## Usage + +Create a new Alfred workflow and add a Script Filter with the following script: + +```sh +./node_modules/.bin/run-node index.js "$1" +``` + +*We can't call `node` directly as GUI apps on macOS doesn't inherit the $PATH.* + +In the workflow directory, create a `index.js` file, import `alfy`, and do your thing. + +> Tip: you can use [generator-alfred](https://github.com/SamVerschueren/generator-alfred) to scaffold out an `alfy` based workflow. + + +## Example + +Here we fetch some JSON from a placeholder API and present matching items to the user: + +```js +const alfy = require('alfy'); + +alfy.fetch('jsonplaceholder.typicode.com/posts').then(data => { + const items = alfy + .inputMatches(data, 'title') + .map(x => ({ + title: x.title, + subtitle: x.body, + arg: x.id + })); + + alfy.output(items); +}); +``` + + + + +###### More + +Some example usage in the wild: [`alfred-npms`](https://github.com/sindresorhus/alfred-npms), [`alfred-emoj`](https://github.com/sindresorhus/alfred-emoj), [`alfred-ng2`](https://github.com/SamVerschueren/alfred-ng2). + + +## Update notifications + +Alfy uses [alfred-notifier](https://github.com/SamVerschueren/alfred-notifier) in the background to show a notification when an update for your workflow is available. + + + + +## Caching + +Alfy offers the possibility of caching data, either with the [fetch](#fetchurl-options) or directly through the [cache](#cache) object. + +An important thing to note is that the cached data gets invalidated automatically when you update your workflow. This offers the flexibility for developers to change the structure of the cached data between workflows without having to worry about invalid older data. + + +## Publish to npm + +By adding `alfy-init` as `postinstall` and `alfy-cleanup` as `preuninstall` script, you can publish your package to [npm](https://npmjs.org) instead of to [Packal](http://www.packal.org). This way, your packages are only one simple `npm install` command away. + +```json +{ + "name": "alfred-unicorn", + "version": "1.0.0", + "description": "My awesome unicorn workflow", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "scripts": { + "postinstall": "alfy-init", + "preuninstall": "alfy-cleanup" + }, + "dependencies": { + "alfy": "*" + } +} +``` + +> Tip: Prefix your workflow with `alfred-` to make them easy searchable through npm. + +You can remove [these](https://github.com/samverschueren/alfred-link#infoplist) properties from your `info.plist` file as they are being added automatically at install time. + +After publishing your workflow to npm, your users can easily install or update the workflow. + +``` +$ npm install --global alfred-unicorn +``` + +> Tip: instead of manually updating every workflow yourself, use the [alfred-updater](https://github.com/SamVerschueren/alfred-updater) workflow to do that for you. + + +## Testing + +Workflows can easily be tested with [alfy-test](https://github.com/SamVerschueren/alfy-test). Here is a small example. + +```js +import test from 'ava'; +import alfyTest from 'alfy-test'; + +test(async t => { + const alfy = alfyTest(); + + const result = await alfy('workflow input'); + + t.deepEqual(result, [ + { + title: 'foo', + subtitle: 'bar' + } + ]); +}); +``` + + +## API + +### alfy + +#### input + +Type: `string` + +Input from Alfred. What the user wrote in the input box. + +#### output(list) + +Return output to Alfred. + +##### list + +Type: `Array` + +List of `Object` with any of the [supported properties](https://www.alfredapp.com/help/workflows/inputs/script-filter/json/). + +Example: + +```js +alfy.output([{ + title: 'Unicorn' +}, { + title: 'Rainbow' +}]); +``` + + + +#### matches(input, list, [item]) + +Returns an `Array` of items in `list` that case-insensitively contains `input`. + +```js +alfy.matches('Corn', ['foo', 'unicorn']); +//=> ['unicorn'] +``` + +##### input + +Type: `string` + +Text to match against the `list` items. + +##### list + +Type: `Array` + +List to be matched against. + +##### item + +Type: `string` `Function` + +By default it will match against the `list` items. + +Specify a string to match against an object property: + +```js +const list = [{ + title: 'foo' +}, { + title: 'unicorn' +}]; + +alfy.matches('Unicorn', list, 'title'); +//=> [{title: 'unicorn'}] +``` + +Or [nested property](https://github.com/sindresorhus/dot-prop): + +```js +const list = [{ + name: { + first: 'John', + last: 'Doe' + } +}, { + name: { + first: 'Sindre', + last: 'Sorhus' + } +}]; + +alfy.matches('sindre', list, 'name.first'); +//=> [{name: {first: 'Sindre', last: 'Sorhus'}}] +``` + +Specify a function to handle the matching yourself. The function receives the list item and input, both lowercased, as arguments, and is expected to return a boolean whether it matches: + +```js +const list = ['foo', 'unicorn']; + +// here we do an exact match +// `Foo` matches the item since it's lowercased for you +alfy.matches('Foo', list, (item, input) => item === input); +//=> ['foo'] +``` + +#### inputMatches(list, [item]) + +Same as `matches()`, but with `alfy.input` as `input`. + +#### log(text) + +##### text + +Type: `string` + +Text to be logged to the debug panel. Only logs when `alfred.debug` is `true`, so not to interfere with the normal output. + +#### error(err) + +Display an error or error message in Alfred. + +**Note:** You don't need to `.catch()` top-level promises. Alfy handles that for you. + +##### err + +Type: `Error` `string` + +Error or error message to be displayed. + + + +#### fetch(url, [options]) + +Returns a `Promise` that returns the body of the response. + +##### url + +Type: `string` + +URL to fetch. + +##### options + +Type: `Object` + +Any of the [`got` options](https://github.com/sindresorhus/got#options). + +###### json + +Type: `boolean`
+Default: `true` + +Parse response body with `JSON.parse` and set `accept` header to `application/json`. + +###### maxAge + +Type: `number` + +Number of milliseconds this request should be cached. + +###### transform + +Type: `Function` + +Transform the response before it gets cached. + +```js +alfy.fetch('https://api.foo.com', { + transform: body => { + body.foo = 'bar'; + return body; + } +}) +``` + +You can also return a Promise. + +```js +const xml2js = require('xmls2js'); +const pify = require('pify'); + +const parseString = pify(xml2js.parseString); + +alfy.fetch('https://api.foo.com', { + transform: body => parseString(body) +}) +``` + +#### config + +Type: `Object` + +Persist config data. + +Exports a [`conf` instance](https://github.com/sindresorhus/conf#instance) with the correct config path set. + +Example: + +```js +alfy.config.set('unicorn', '🦄'); + +alfy.config.get('unicorn'); +//=> '🦄' +``` + +#### cache + +Type: `Object` + +Persist cache data. + +Exports a modified [`conf` instance](https://github.com/sindresorhus/conf#instance) with the correct cache path set. + +Example: + +```js +alfy.cache.set('unicorn', '🦄'); + +alfy.cache.get('unicorn'); +//=> '🦄' +``` + +##### maxAge + +The `set` method of this instance accepts an optional third argument where you can provide a `maxAge` option. `maxAge` is +the number of milliseconds the value is valid in the cache. + +Example: + +```js +const delay = require('delay'); + +alfy.cache.set('foo', 'bar', {maxAge: 5000}); + +alfy.cache.get('foo'); +//=> 'bar' + +// Wait 5 seconds +await delay(5000); + +alfy.cache.get('foo'); +//=> undefined +``` + +#### debug + +Type: `boolean` + +Whether the user currently has the [workflow debugger](https://www.alfredapp.com/help/workflows/advanced/debugger/) open. + +#### icon + +Type: `Object`
+Keys: `info` `warning` `error` `alert` `like` `delete` + +Get various default system icons. + +The most useful ones are included as keys. The rest you can get with `icon.get()`. Go to `/System/Library/CoreServices/CoreTypes.bundle/Contents/Resources` in Finder to see them all. + +Example: + +```js +console.log(alfy.icon.error); +//=> '/System/Library/CoreServices/CoreTypes.bundle/Contents/Resources/AlertStopIcon.icns' + +console.log(alfy.icon.get('Clock')); +//=> '/System/Library/CoreServices/CoreTypes.bundle/Contents/Resources/Clock.icns' +``` + +#### meta + +Type: `Object` + +Example: + +```js +{ + name: 'Emoj', + version: '0.2.5', + uid: 'user.workflow.B0AC54EC-601C-479A-9428-01F9FD732959', + bundleId: 'com.sindresorhus.emoj' +} +``` + +#### alfred + +Type: `Object` + +Alfred metadata. + +##### version + +Example: `'3.0.2'` + +Find out which version the user is currently running. This may be useful if your workflow depends on a particular Alfred version's features. + +##### theme + +Example: `'alfred.theme.yosemite'` + +Current theme used. + +##### themeBackground + +Example: `'rgba(255,255,255,0.98)'` + +If you're creating icons on the fly, this allows you to find out the color of the theme background. + +##### themeSelectionBackground + +Example: `'rgba(255,255,255,0.98)'` + +The color of the selected result. + +##### themeSubtext + +Example: `3` + +Find out what subtext mode the user has selected in the Appearance preferences. + +> Usability note: This is available so developers can tweak the result text based on the user's selected mode, but a workflow's result text should not be bloated unnecessarily based on this, as the main reason users generally hide the subtext is to make Alfred look cleaner. + +##### data + +Example: `'/Users/sindresorhus/Library/Application Support/Alfred 3/Workflow Data/com.sindresorhus.npms'` + +Recommended location for non-volatile data. Just use `alfy.data` which uses this path. + +##### cache + +Example: `'/Users/sindresorhus/Library/Caches/com.runningwithcrayons.Alfred-3/Workflow Data/com.sindresorhus.npms'` + +Recommended location for volatile data. Just use `alfy.cache` which uses this path. + +##### preferences + +Example: `'/Users/sindresorhus/Dropbox/Alfred/Alfred.alfredpreferences'` + +This is the location of the `Alfred.alfredpreferences`. If a user has synced their settings, this will allow you to find out where their settings are regardless of sync state. + +##### preferencesLocalHash + +Example: `'adbd4f66bc3ae8493832af61a41ee609b20d8705'` + +Non-synced local preferences are stored within `Alfred.alfredpreferences` under `…/preferences/local/${preferencesLocalHash}/`. + + +## Users + +*Alfred workflows using Alfy* + +- [alfred-emoj](https://github.com/sindresorhus/alfred-emoj) - Find relevant emoji from text +- [alfred-npms](https://github.com/sindresorhus/alfred-npms) - Search for npm packages with npms.io +- [alfred-ng2](https://github.com/SamVerschueren/alfred-ng2) - Search for Angular 2 API references +- [alfred-react-native](https://github.com/ekonstantinidis/alfred-react-native) - Access the React Native documentation +- [alfred-hl](https://github.com/importre/alfred-hl) - Syntax highlight code in the clipboard +- [alfred-workflow-docs-elastic](https://github.com/spinscale/alfred-workflow-elastic-docs) - Search the Elastic.co documentation +- [alfredinary](https://github.com/urre/alfredinary) - Capture screenshots and upload to Cloudinary + + +## Related + +- [alfred-simple](https://github.com/sindresorhus/alfred-simple) - Simple theme for Alfred *(Used in the screenshots)* +- [alfred-updater](https://github.com/SamVerschueren/alfred-updater) - Workflow updater +- [alfred-notifier](https://github.com/SamVerschueren/alfred-notifier) - Update notifications for your workflow +- [generator-alfred](https://github.com/samverschueren/generator-alfred) - Scaffold out an Alfred workflow + + +## Created by + +- [Sindre Sorhus](https://github.com/sindresorhus) +- [Sam Verschueren](https://github.com/SamVerschueren) + + +## License + +MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/alfy/run-node.sh b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/alfy/run-node.sh new file mode 100755 index 00000000..bff9d95a --- /dev/null +++ b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/alfy/run-node.sh @@ -0,0 +1,49 @@ +#!/bin/bash + +if [[ -z "$alfred_workflow_cache" ]]; then + echo "This script must be called from Alfred, \$alfred_workflow_cache is missing. Make sure a Bundle ID is set." + exit 1 +fi + +if [[ ! -d "$alfred_workflow_cache" ]]; then + mkdir -p "$alfred_workflow_cache" +fi + +PATH_CACHE="$alfred_workflow_cache"/node_path + +get_user_path() { + eval $(/usr/libexec/path_helper -s) + echo "$($SHELL -i -l -c 'echo -e "\n"PATH=\"$PATH:\$PATH\""\n"' 2>/dev/null | grep "^PATH=")" > "$PATH_CACHE" +} + +set_path() { + if [[ -f "$PATH_CACHE" ]]; then + . "$PATH_CACHE" + else + get_user_path + . "$PATH_CACHE" + fi + + export PATH +} + +has_node() { + command -v node >/dev/null 2>&1 +} + +# check if we have node, otherwise inherit path from user shell +if ! has_node; then + set_path + + # retry by deleting old path cache + if ! has_node; then + rm "$PATH_CACHE" + set_path + fi +fi + +if has_node; then + node "$@" +else + echo $'{"items":[{"title": "Couldn\'t find the `node` binary", "subtitle": "Symlink it to `/usr/local/bin`"}]}' +fi diff --git a/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/ansi-regex/index.js b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/ansi-regex/index.js new file mode 100644 index 00000000..b9574ed7 --- /dev/null +++ b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/ansi-regex/index.js @@ -0,0 +1,4 @@ +'use strict'; +module.exports = function () { + return /[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-PRZcf-nqry=><]/g; +}; diff --git a/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/ansi-regex/license b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/ansi-regex/license new file mode 100644 index 00000000..654d0bfe --- /dev/null +++ b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/ansi-regex/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +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/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/ansi-regex/package.json b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/ansi-regex/package.json new file mode 100644 index 00000000..b8598038 --- /dev/null +++ b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/ansi-regex/package.json @@ -0,0 +1,132 @@ +{ + "_args": [ + [ + { + "raw": "ansi-regex@^2.0.0", + "scope": null, + "escapedName": "ansi-regex", + "name": "ansi-regex", + "rawSpec": "^2.0.0", + "spec": ">=2.0.0 <3.0.0", + "type": "range" + }, + "/Users/frances.coronel/.nvm/versions/node/v6.10.1/lib/node_modules/alfred-emoj/node_modules/has-ansi" + ] + ], + "_from": "ansi-regex@>=2.0.0 <3.0.0", + "_id": "ansi-regex@2.1.1", + "_inCache": true, + "_location": "/alfred-emoj/ansi-regex", + "_nodeVersion": "0.10.32", + "_npmOperationalInternal": { + "host": "packages-18-east.internal.npmjs.com", + "tmp": "tmp/ansi-regex-2.1.1.tgz_1484363378013_0.4482989883981645" + }, + "_npmUser": { + "name": "qix", + "email": "i.am.qix@gmail.com" + }, + "_npmVersion": "2.14.2", + "_phantomChildren": {}, + "_requested": { + "raw": "ansi-regex@^2.0.0", + "scope": null, + "escapedName": "ansi-regex", + "name": "ansi-regex", + "rawSpec": "^2.0.0", + "spec": ">=2.0.0 <3.0.0", + "type": "range" + }, + "_requiredBy": [ + "/alfred-emoj/has-ansi", + "/alfred-emoj/strip-ansi" + ], + "_resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "_shasum": "c3b33ab5ee360d86e0e628f0468ae7ef27d654df", + "_shrinkwrap": null, + "_spec": "ansi-regex@^2.0.0", + "_where": "/Users/frances.coronel/.nvm/versions/node/v6.10.1/lib/node_modules/alfred-emoj/node_modules/has-ansi", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/chalk/ansi-regex/issues" + }, + "dependencies": {}, + "description": "Regular expression for matching ANSI escape codes", + "devDependencies": { + "ava": "0.17.0", + "xo": "0.16.0" + }, + "directories": {}, + "dist": { + "shasum": "c3b33ab5ee360d86e0e628f0468ae7ef27d654df", + "tarball": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "gitHead": "7c908e7b4eb6cd82bfe1295e33fdf6d166c7ed85", + "homepage": "https://github.com/chalk/ansi-regex#readme", + "keywords": [ + "ansi", + "styles", + "color", + "colour", + "colors", + "terminal", + "console", + "cli", + "string", + "tty", + "escape", + "formatting", + "rgb", + "256", + "shell", + "xterm", + "command-line", + "text", + "regex", + "regexp", + "re", + "match", + "test", + "find", + "pattern" + ], + "license": "MIT", + "maintainers": [ + { + "name": "qix", + "email": "i.am.qix@gmail.com" + }, + { + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" + } + ], + "name": "ansi-regex", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/chalk/ansi-regex.git" + }, + "scripts": { + "test": "xo && ava --verbose", + "view-supported": "node fixtures/view-codes.js" + }, + "version": "2.1.1", + "xo": { + "rules": { + "guard-for-in": 0, + "no-loop-func": 0 + } + } +} diff --git a/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/ansi-regex/readme.md b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/ansi-regex/readme.md new file mode 100644 index 00000000..6a928edf --- /dev/null +++ b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/ansi-regex/readme.md @@ -0,0 +1,39 @@ +# ansi-regex [![Build Status](https://travis-ci.org/chalk/ansi-regex.svg?branch=master)](https://travis-ci.org/chalk/ansi-regex) + +> Regular expression for matching [ANSI escape codes](http://en.wikipedia.org/wiki/ANSI_escape_code) + + +## Install + +``` +$ npm install --save ansi-regex +``` + + +## Usage + +```js +const ansiRegex = require('ansi-regex'); + +ansiRegex().test('\u001b[4mcake\u001b[0m'); +//=> true + +ansiRegex().test('cake'); +//=> false + +'\u001b[4mcake\u001b[0m'.match(ansiRegex()); +//=> ['\u001b[4m', '\u001b[0m'] +``` + +## FAQ + +### Why do you test for codes not in the ECMA 48 standard? + +Some of the codes we run as a test are codes that we acquired finding various lists of non-standard or manufacturer specific codes. If I recall correctly, we test for both standard and non-standard codes, as most of them follow the same or similar format and can be safely matched in strings without the risk of removing actual string content. There are a few non-standard control codes that do not follow the traditional format (i.e. they end in numbers) thus forcing us to exclude them from the test because we cannot reliably match them. + +On the historical side, those ECMA standards were established in the early 90's whereas the VT100, for example, was designed in the mid/late 70's. At that point in time, control codes were still pretty ungoverned and engineers used them for a multitude of things, namely to activate hardware ports that may have been proprietary. Somewhere else you see a similar 'anarchy' of codes is in the x86 architecture for processors; there are a ton of "interrupts" that can mean different things on certain brands of processors, most of which have been phased out. + + +## License + +MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/ansi-styles/index.js b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/ansi-styles/index.js new file mode 100644 index 00000000..78945278 --- /dev/null +++ b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/ansi-styles/index.js @@ -0,0 +1,65 @@ +'use strict'; + +function assembleStyles () { + var styles = { + modifiers: { + reset: [0, 0], + bold: [1, 22], // 21 isn't widely supported and 22 does the same thing + dim: [2, 22], + italic: [3, 23], + underline: [4, 24], + inverse: [7, 27], + hidden: [8, 28], + strikethrough: [9, 29] + }, + colors: { + black: [30, 39], + red: [31, 39], + green: [32, 39], + yellow: [33, 39], + blue: [34, 39], + magenta: [35, 39], + cyan: [36, 39], + white: [37, 39], + gray: [90, 39] + }, + bgColors: { + bgBlack: [40, 49], + bgRed: [41, 49], + bgGreen: [42, 49], + bgYellow: [43, 49], + bgBlue: [44, 49], + bgMagenta: [45, 49], + bgCyan: [46, 49], + bgWhite: [47, 49] + } + }; + + // fix humans + styles.colors.grey = styles.colors.gray; + + Object.keys(styles).forEach(function (groupName) { + var group = styles[groupName]; + + Object.keys(group).forEach(function (styleName) { + var style = group[styleName]; + + styles[styleName] = group[styleName] = { + open: '\u001b[' + style[0] + 'm', + close: '\u001b[' + style[1] + 'm' + }; + }); + + Object.defineProperty(styles, groupName, { + value: group, + enumerable: false + }); + }); + + return styles; +} + +Object.defineProperty(module, 'exports', { + enumerable: true, + get: assembleStyles +}); diff --git a/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/ansi-styles/license b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/ansi-styles/license new file mode 100644 index 00000000..654d0bfe --- /dev/null +++ b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/ansi-styles/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +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/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/ansi-styles/package.json b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/ansi-styles/package.json new file mode 100644 index 00000000..a76e4778 --- /dev/null +++ b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/ansi-styles/package.json @@ -0,0 +1,114 @@ +{ + "_args": [ + [ + { + "raw": "ansi-styles@^2.2.1", + "scope": null, + "escapedName": "ansi-styles", + "name": "ansi-styles", + "rawSpec": "^2.2.1", + "spec": ">=2.2.1 <3.0.0", + "type": "range" + }, + "/Users/frances.coronel/.nvm/versions/node/v6.10.1/lib/node_modules/alfred-emoj/node_modules/chalk" + ] + ], + "_from": "ansi-styles@>=2.2.1 <3.0.0", + "_id": "ansi-styles@2.2.1", + "_inCache": true, + "_location": "/alfred-emoj/ansi-styles", + "_nodeVersion": "4.3.0", + "_npmOperationalInternal": { + "host": "packages-12-west.internal.npmjs.com", + "tmp": "tmp/ansi-styles-2.2.1.tgz_1459197317833_0.9694824463222176" + }, + "_npmUser": { + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" + }, + "_npmVersion": "3.8.3", + "_phantomChildren": {}, + "_requested": { + "raw": "ansi-styles@^2.2.1", + "scope": null, + "escapedName": "ansi-styles", + "name": "ansi-styles", + "rawSpec": "^2.2.1", + "spec": ">=2.2.1 <3.0.0", + "type": "range" + }, + "_requiredBy": [ + "/alfred-emoj/chalk" + ], + "_resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", + "_shasum": "b432dd3358b634cf75e1e4664368240533c1ddbe", + "_shrinkwrap": null, + "_spec": "ansi-styles@^2.2.1", + "_where": "/Users/frances.coronel/.nvm/versions/node/v6.10.1/lib/node_modules/alfred-emoj/node_modules/chalk", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/chalk/ansi-styles/issues" + }, + "dependencies": {}, + "description": "ANSI escape codes for styling strings in the terminal", + "devDependencies": { + "mocha": "*" + }, + "directories": {}, + "dist": { + "shasum": "b432dd3358b634cf75e1e4664368240533c1ddbe", + "tarball": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "gitHead": "95c59b23be760108b6530ca1c89477c21b258032", + "homepage": "https://github.com/chalk/ansi-styles#readme", + "keywords": [ + "ansi", + "styles", + "color", + "colour", + "colors", + "terminal", + "console", + "cli", + "string", + "tty", + "escape", + "formatting", + "rgb", + "256", + "shell", + "xterm", + "log", + "logging", + "command-line", + "text" + ], + "license": "MIT", + "maintainers": [ + { + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" + } + ], + "name": "ansi-styles", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/chalk/ansi-styles.git" + }, + "scripts": { + "test": "mocha" + }, + "version": "2.2.1" +} diff --git a/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/ansi-styles/readme.md b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/ansi-styles/readme.md new file mode 100644 index 00000000..3f933f61 --- /dev/null +++ b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/ansi-styles/readme.md @@ -0,0 +1,86 @@ +# ansi-styles [![Build Status](https://travis-ci.org/chalk/ansi-styles.svg?branch=master)](https://travis-ci.org/chalk/ansi-styles) + +> [ANSI escape codes](http://en.wikipedia.org/wiki/ANSI_escape_code#Colors_and_Styles) for styling strings in the terminal + +You probably want the higher-level [chalk](https://github.com/chalk/chalk) module for styling your strings. + +![](screenshot.png) + + +## Install + +``` +$ npm install --save ansi-styles +``` + + +## Usage + +```js +var ansi = require('ansi-styles'); + +console.log(ansi.green.open + 'Hello world!' + ansi.green.close); +``` + + +## API + +Each style has an `open` and `close` property. + + +## Styles + +### Modifiers + +- `reset` +- `bold` +- `dim` +- `italic` *(not widely supported)* +- `underline` +- `inverse` +- `hidden` +- `strikethrough` *(not widely supported)* + +### Colors + +- `black` +- `red` +- `green` +- `yellow` +- `blue` +- `magenta` +- `cyan` +- `white` +- `gray` + +### Background colors + +- `bgBlack` +- `bgRed` +- `bgGreen` +- `bgYellow` +- `bgBlue` +- `bgMagenta` +- `bgCyan` +- `bgWhite` + + +## Advanced usage + +By default you get a map of styles, but the styles are also available as groups. They are non-enumerable so they don't show up unless you access them explicitly. This makes it easier to expose only a subset in a higher-level module. + +- `ansi.modifiers` +- `ansi.colors` +- `ansi.bgColors` + + +###### Example + +```js +console.log(ansi.colors.green.open); +``` + + +## License + +MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/array-find-index/index.js b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/array-find-index/index.js new file mode 100644 index 00000000..e2dcd9a0 --- /dev/null +++ b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/array-find-index/index.js @@ -0,0 +1,25 @@ +'use strict'; +module.exports = function (arr, predicate, ctx) { + if (typeof Array.prototype.findIndex === 'function') { + return arr.findIndex(predicate, ctx); + } + + if (typeof predicate !== 'function') { + throw new TypeError('predicate must be a function'); + } + + var list = Object(arr); + var len = list.length; + + if (len === 0) { + return -1; + } + + for (var i = 0; i < len; i++) { + if (predicate.call(ctx, list[i], i, list)) { + return i; + } + } + + return -1; +}; diff --git a/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/array-find-index/license b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/array-find-index/license new file mode 100644 index 00000000..654d0bfe --- /dev/null +++ b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/array-find-index/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +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/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/array-find-index/package.json b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/array-find-index/package.json new file mode 100644 index 00000000..03663702 --- /dev/null +++ b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/array-find-index/package.json @@ -0,0 +1,103 @@ +{ + "_args": [ + [ + { + "raw": "array-find-index@^1.0.1", + "scope": null, + "escapedName": "array-find-index", + "name": "array-find-index", + "rawSpec": "^1.0.1", + "spec": ">=1.0.1 <2.0.0", + "type": "range" + }, + "/Users/frances.coronel/.nvm/versions/node/v6.10.1/lib/node_modules/alfred-emoj/node_modules/currently-unhandled" + ] + ], + "_from": "array-find-index@>=1.0.1 <2.0.0", + "_id": "array-find-index@1.0.2", + "_inCache": true, + "_location": "/alfred-emoj/array-find-index", + "_nodeVersion": "4.5.0", + "_npmOperationalInternal": { + "host": "packages-12-west.internal.npmjs.com", + "tmp": "tmp/array-find-index-1.0.2.tgz_1475224789159_0.7274378235451877" + }, + "_npmUser": { + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" + }, + "_npmVersion": "2.15.9", + "_phantomChildren": {}, + "_requested": { + "raw": "array-find-index@^1.0.1", + "scope": null, + "escapedName": "array-find-index", + "name": "array-find-index", + "rawSpec": "^1.0.1", + "spec": ">=1.0.1 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/alfred-emoj/currently-unhandled" + ], + "_resolved": "https://registry.npmjs.org/array-find-index/-/array-find-index-1.0.2.tgz", + "_shasum": "df010aa1287e164bbda6f9723b0a96a1ec4187a1", + "_shrinkwrap": null, + "_spec": "array-find-index@^1.0.1", + "_where": "/Users/frances.coronel/.nvm/versions/node/v6.10.1/lib/node_modules/alfred-emoj/node_modules/currently-unhandled", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/array-find-index/issues" + }, + "dependencies": {}, + "description": "ES2015 `Array#findIndex()` ponyfill", + "devDependencies": { + "ava": "*", + "xo": "*" + }, + "directories": {}, + "dist": { + "shasum": "df010aa1287e164bbda6f9723b0a96a1ec4187a1", + "tarball": "https://registry.npmjs.org/array-find-index/-/array-find-index-1.0.2.tgz" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "gitHead": "983f4c827ad22fa0353182b1ddcbfaecd4412859", + "homepage": "https://github.com/sindresorhus/array-find-index#readme", + "keywords": [ + "es2015", + "ponyfill", + "polyfill", + "shim", + "find", + "index", + "findindex", + "array" + ], + "license": "MIT", + "maintainers": [ + { + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" + } + ], + "name": "array-find-index", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/array-find-index.git" + }, + "scripts": { + "test": "xo && ava" + }, + "version": "1.0.2" +} diff --git a/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/array-find-index/readme.md b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/array-find-index/readme.md new file mode 100644 index 00000000..31663411 --- /dev/null +++ b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/array-find-index/readme.md @@ -0,0 +1,30 @@ +# array-find-index [![Build Status](https://travis-ci.org/sindresorhus/array-find-index.svg?branch=master)](https://travis-ci.org/sindresorhus/array-find-index) + +> ES2015 [`Array#findIndex()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex) [ponyfill](https://ponyfill.com) + + +## Install + +``` +$ npm install --save array-find-index +``` + + +## Usage + +```js +const arrayFindIndex = require('array-find-index'); + +arrayFindIndex(['rainbow', 'unicorn', 'pony'], x => x === 'unicorn'); +//=> 1 +``` + + +## API + +Same as `Array#findIndex()`, but with the input array as the first argument. + + +## License + +MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/array-union/index.js b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/array-union/index.js new file mode 100644 index 00000000..e33f38a1 --- /dev/null +++ b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/array-union/index.js @@ -0,0 +1,6 @@ +'use strict'; +var arrayUniq = require('array-uniq'); + +module.exports = function () { + return arrayUniq([].concat.apply([], arguments)); +}; diff --git a/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/array-union/license b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/array-union/license new file mode 100644 index 00000000..654d0bfe --- /dev/null +++ b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/array-union/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +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/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/array-union/package.json b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/array-union/package.json new file mode 100644 index 00000000..942ae9ef --- /dev/null +++ b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/array-union/package.json @@ -0,0 +1,107 @@ +{ + "_args": [ + [ + { + "raw": "array-union@^1.0.1", + "scope": null, + "escapedName": "array-union", + "name": "array-union", + "rawSpec": "^1.0.1", + "spec": ">=1.0.1 <2.0.0", + "type": "range" + }, + "/Users/frances.coronel/.nvm/versions/node/v6.10.1/lib/node_modules/alfred-emoj/node_modules/globby" + ] + ], + "_from": "array-union@>=1.0.1 <2.0.0", + "_id": "array-union@1.0.2", + "_inCache": true, + "_location": "/alfred-emoj/array-union", + "_nodeVersion": "4.4.2", + "_npmOperationalInternal": { + "host": "packages-16-east.internal.npmjs.com", + "tmp": "tmp/array-union-1.0.2.tgz_1466079411551_0.23353995219804347" + }, + "_npmUser": { + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" + }, + "_npmVersion": "2.15.0", + "_phantomChildren": {}, + "_requested": { + "raw": "array-union@^1.0.1", + "scope": null, + "escapedName": "array-union", + "name": "array-union", + "rawSpec": "^1.0.1", + "spec": ">=1.0.1 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/alfred-emoj/globby" + ], + "_resolved": "https://registry.npmjs.org/array-union/-/array-union-1.0.2.tgz", + "_shasum": "9a34410e4f4e3da23dea375be5be70f24778ec39", + "_shrinkwrap": null, + "_spec": "array-union@^1.0.1", + "_where": "/Users/frances.coronel/.nvm/versions/node/v6.10.1/lib/node_modules/alfred-emoj/node_modules/globby", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/array-union/issues" + }, + "dependencies": { + "array-uniq": "^1.0.1" + }, + "description": "Create an array of unique values, in order, from the input arrays", + "devDependencies": { + "ava": "*", + "xo": "*" + }, + "directories": {}, + "dist": { + "shasum": "9a34410e4f4e3da23dea375be5be70f24778ec39", + "tarball": "https://registry.npmjs.org/array-union/-/array-union-1.0.2.tgz" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "gitHead": "34e1d6a80baa4eac9723795a0674c14119ace1bd", + "homepage": "https://github.com/sindresorhus/array-union#readme", + "keywords": [ + "array", + "arr", + "set", + "uniq", + "unique", + "duplicate", + "remove", + "union", + "combine", + "merge" + ], + "license": "MIT", + "maintainers": [ + { + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" + } + ], + "name": "array-union", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/array-union.git" + }, + "scripts": { + "test": "xo && ava" + }, + "version": "1.0.2" +} diff --git a/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/array-union/readme.md b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/array-union/readme.md new file mode 100644 index 00000000..ea472dd0 --- /dev/null +++ b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/array-union/readme.md @@ -0,0 +1,28 @@ +# array-union [![Build Status](https://travis-ci.org/sindresorhus/array-union.svg?branch=master)](https://travis-ci.org/sindresorhus/array-union) + +> Create an array of unique values, in order, from the input arrays + + +## Install + +``` +$ npm install --save array-union +``` + + +## Usage + +```js +const arrayUnion = require('array-union'); + +arrayUnion([1, 1, 2, 3], [2, 3]); +//=> [1, 2, 3] + +arrayUnion(['foo', 'foo', 'bar'], ['foo']); +//=> ['foo', 'bar'] +``` + + +## License + +MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/array-uniq/index.js b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/array-uniq/index.js new file mode 100644 index 00000000..edd09f81 --- /dev/null +++ b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/array-uniq/index.js @@ -0,0 +1,62 @@ +'use strict'; + +// there's 3 implementations written in increasing order of efficiency + +// 1 - no Set type is defined +function uniqNoSet(arr) { + var ret = []; + + for (var i = 0; i < arr.length; i++) { + if (ret.indexOf(arr[i]) === -1) { + ret.push(arr[i]); + } + } + + return ret; +} + +// 2 - a simple Set type is defined +function uniqSet(arr) { + var seen = new Set(); + return arr.filter(function (el) { + if (!seen.has(el)) { + seen.add(el); + return true; + } + + return false; + }); +} + +// 3 - a standard Set type is defined and it has a forEach method +function uniqSetWithForEach(arr) { + var ret = []; + + (new Set(arr)).forEach(function (el) { + ret.push(el); + }); + + return ret; +} + +// V8 currently has a broken implementation +// https://github.com/joyent/node/issues/8449 +function doesForEachActuallyWork() { + var ret = false; + + (new Set([true])).forEach(function (el) { + ret = el; + }); + + return ret === true; +} + +if ('Set' in global) { + if (typeof Set.prototype.forEach === 'function' && doesForEachActuallyWork()) { + module.exports = uniqSetWithForEach; + } else { + module.exports = uniqSet; + } +} else { + module.exports = uniqNoSet; +} diff --git a/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/array-uniq/license b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/array-uniq/license new file mode 100644 index 00000000..654d0bfe --- /dev/null +++ b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/array-uniq/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +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/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/array-uniq/package.json b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/array-uniq/package.json new file mode 100644 index 00000000..3ced76b8 --- /dev/null +++ b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/array-uniq/package.json @@ -0,0 +1,105 @@ +{ + "_args": [ + [ + { + "raw": "array-uniq@^1.0.1", + "scope": null, + "escapedName": "array-uniq", + "name": "array-uniq", + "rawSpec": "^1.0.1", + "spec": ">=1.0.1 <2.0.0", + "type": "range" + }, + "/Users/frances.coronel/.nvm/versions/node/v6.10.1/lib/node_modules/alfred-emoj/node_modules/array-union" + ] + ], + "_from": "array-uniq@>=1.0.1 <2.0.0", + "_id": "array-uniq@1.0.3", + "_inCache": true, + "_location": "/alfred-emoj/array-uniq", + "_nodeVersion": "4.4.2", + "_npmOperationalInternal": { + "host": "packages-12-west.internal.npmjs.com", + "tmp": "tmp/array-uniq-1.0.3.tgz_1466079716839_0.9139188586268574" + }, + "_npmUser": { + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" + }, + "_npmVersion": "2.15.0", + "_phantomChildren": {}, + "_requested": { + "raw": "array-uniq@^1.0.1", + "scope": null, + "escapedName": "array-uniq", + "name": "array-uniq", + "rawSpec": "^1.0.1", + "spec": ">=1.0.1 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/alfred-emoj/array-union" + ], + "_resolved": "https://registry.npmjs.org/array-uniq/-/array-uniq-1.0.3.tgz", + "_shasum": "af6ac877a25cc7f74e058894753858dfdb24fdb6", + "_shrinkwrap": null, + "_spec": "array-uniq@^1.0.1", + "_where": "/Users/frances.coronel/.nvm/versions/node/v6.10.1/lib/node_modules/alfred-emoj/node_modules/array-union", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/array-uniq/issues" + }, + "dependencies": {}, + "description": "Create an array without duplicates", + "devDependencies": { + "ava": "*", + "es6-set": "^0.1.0", + "require-uncached": "^1.0.2", + "xo": "*" + }, + "directories": {}, + "dist": { + "shasum": "af6ac877a25cc7f74e058894753858dfdb24fdb6", + "tarball": "https://registry.npmjs.org/array-uniq/-/array-uniq-1.0.3.tgz" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "gitHead": "3b5bf5a90a585b3950284d575f33d09663f6083a", + "homepage": "https://github.com/sindresorhus/array-uniq#readme", + "keywords": [ + "array", + "arr", + "set", + "uniq", + "unique", + "es6", + "duplicate", + "remove" + ], + "license": "MIT", + "maintainers": [ + { + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" + } + ], + "name": "array-uniq", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/array-uniq.git" + }, + "scripts": { + "test": "xo && ava" + }, + "version": "1.0.3" +} diff --git a/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/array-uniq/readme.md b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/array-uniq/readme.md new file mode 100644 index 00000000..f0bd98c4 --- /dev/null +++ b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/array-uniq/readme.md @@ -0,0 +1,30 @@ +# array-uniq [![Build Status](https://travis-ci.org/sindresorhus/array-uniq.svg?branch=master)](https://travis-ci.org/sindresorhus/array-uniq) + +> Create an array without duplicates + +It's already pretty fast, but will be much faster when [Set](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set) becomes available in V8 (especially with large arrays). + + +## Install + +``` +$ npm install --save array-uniq +``` + + +## Usage + +```js +const arrayUniq = require('array-uniq'); + +arrayUniq([1, 1, 2, 3, 3]); +//=> [1, 2, 3] + +arrayUniq(['foo', 'foo', 'bar', 'foo']); +//=> ['foo', 'bar'] +``` + + +## License + +MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/arrify/index.js b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/arrify/index.js new file mode 100644 index 00000000..2a2fdeeb --- /dev/null +++ b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/arrify/index.js @@ -0,0 +1,8 @@ +'use strict'; +module.exports = function (val) { + if (val === null || val === undefined) { + return []; + } + + return Array.isArray(val) ? val : [val]; +}; diff --git a/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/arrify/license b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/arrify/license new file mode 100644 index 00000000..654d0bfe --- /dev/null +++ b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/arrify/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +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/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/arrify/package.json b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/arrify/package.json new file mode 100644 index 00000000..92f4b036 --- /dev/null +++ b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/arrify/package.json @@ -0,0 +1,97 @@ +{ + "_args": [ + [ + { + "raw": "arrify@^1.0.0", + "scope": null, + "escapedName": "arrify", + "name": "arrify", + "rawSpec": "^1.0.0", + "spec": ">=1.0.0 <2.0.0", + "type": "range" + }, + "/Users/frances.coronel/.nvm/versions/node/v6.10.1/lib/node_modules/alfred-emoj/node_modules/globby" + ] + ], + "_from": "arrify@>=1.0.0 <2.0.0", + "_id": "arrify@1.0.1", + "_inCache": true, + "_location": "/alfred-emoj/arrify", + "_nodeVersion": "4.2.1", + "_npmUser": { + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" + }, + "_npmVersion": "3.5.2", + "_phantomChildren": {}, + "_requested": { + "raw": "arrify@^1.0.0", + "scope": null, + "escapedName": "arrify", + "name": "arrify", + "rawSpec": "^1.0.0", + "spec": ">=1.0.0 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/alfred-emoj/globby" + ], + "_resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", + "_shasum": "898508da2226f380df904728456849c1501a4b0d", + "_shrinkwrap": null, + "_spec": "arrify@^1.0.0", + "_where": "/Users/frances.coronel/.nvm/versions/node/v6.10.1/lib/node_modules/alfred-emoj/node_modules/globby", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/arrify/issues" + }, + "dependencies": {}, + "description": "Convert a value to an array", + "devDependencies": { + "ava": "*", + "xo": "*" + }, + "directories": {}, + "dist": { + "shasum": "898508da2226f380df904728456849c1501a4b0d", + "tarball": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "gitHead": "087edee1a58d5adaac6cae5a107886121ef43783", + "homepage": "https://github.com/sindresorhus/arrify#readme", + "keywords": [ + "array", + "arr", + "arrify", + "arrayify", + "convert", + "value" + ], + "license": "MIT", + "maintainers": [ + { + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" + } + ], + "name": "arrify", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/arrify.git" + }, + "scripts": { + "test": "xo && ava" + }, + "version": "1.0.1" +} diff --git a/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/arrify/readme.md b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/arrify/readme.md new file mode 100644 index 00000000..183d0757 --- /dev/null +++ b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/arrify/readme.md @@ -0,0 +1,36 @@ +# arrify [![Build Status](https://travis-ci.org/sindresorhus/arrify.svg?branch=master)](https://travis-ci.org/sindresorhus/arrify) + +> Convert a value to an array + + +## Install + +``` +$ npm install --save arrify +``` + + +## Usage + +```js +const arrify = require('arrify'); + +arrify('unicorn'); +//=> ['unicorn'] + +arrify(['unicorn']); +//=> ['unicorn'] + +arrify(null); +//=> [] + +arrify(undefined); +//=> [] +``` + +*Supplying `null` or `undefined` results in an empty array.* + + +## License + +MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/balanced-match/.npmignore b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/balanced-match/.npmignore new file mode 100644 index 00000000..ae5d8c36 --- /dev/null +++ b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/balanced-match/.npmignore @@ -0,0 +1,5 @@ +test +.gitignore +.travis.yml +Makefile +example.js diff --git a/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/balanced-match/LICENSE.md b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/balanced-match/LICENSE.md new file mode 100644 index 00000000..2cdc8e41 --- /dev/null +++ b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/balanced-match/LICENSE.md @@ -0,0 +1,21 @@ +(MIT) + +Copyright (c) 2013 Julian Gruber <julian@juliangruber.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/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/balanced-match/README.md b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/balanced-match/README.md new file mode 100644 index 00000000..08e918c0 --- /dev/null +++ b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/balanced-match/README.md @@ -0,0 +1,91 @@ +# balanced-match + +Match balanced string pairs, like `{` and `}` or `` and ``. Supports regular expressions as well! + +[![build status](https://secure.travis-ci.org/juliangruber/balanced-match.svg)](http://travis-ci.org/juliangruber/balanced-match) +[![downloads](https://img.shields.io/npm/dm/balanced-match.svg)](https://www.npmjs.org/package/balanced-match) + +[![testling badge](https://ci.testling.com/juliangruber/balanced-match.png)](https://ci.testling.com/juliangruber/balanced-match) + +## Example + +Get the first matching pair of braces: + +```js +var balanced = require('balanced-match'); + +console.log(balanced('{', '}', 'pre{in{nested}}post')); +console.log(balanced('{', '}', 'pre{first}between{second}post')); +console.log(balanced(/\s+\{\s+/, /\s+\}\s+/, 'pre { in{nest} } post')); +``` + +The matches are: + +```bash +$ node example.js +{ start: 3, end: 14, pre: 'pre', body: 'in{nested}', post: 'post' } +{ start: 3, + end: 9, + pre: 'pre', + body: 'first', + post: 'between{second}post' } +{ start: 3, end: 17, pre: 'pre', body: 'in{nest}', post: 'post' } +``` + +## API + +### var m = balanced(a, b, str) + +For the first non-nested matching pair of `a` and `b` in `str`, return an +object with those keys: + +* **start** the index of the first match of `a` +* **end** the index of the matching `b` +* **pre** the preamble, `a` and `b` not included +* **body** the match, `a` and `b` not included +* **post** the postscript, `a` and `b` not included + +If there's no match, `undefined` will be returned. + +If the `str` contains more `a` than `b` / there are unmatched pairs, the first match that was closed will be used. For example, `{{a}` will match `['{', 'a', '']` and `{a}}` will match `['', 'a', '}']`. + +### var r = balanced.range(a, b, str) + +For the first non-nested matching pair of `a` and `b` in `str`, return an +array with indexes: `[ , ]`. + +If there's no match, `undefined` will be returned. + +If the `str` contains more `a` than `b` / there are unmatched pairs, the first match that was closed will be used. For example, `{{a}` will match `[ 1, 3 ]` and `{a}}` will match `[0, 2]`. + +## Installation + +With [npm](https://npmjs.org) do: + +```bash +npm install balanced-match +``` + +## License + +(MIT) + +Copyright (c) 2013 Julian Gruber <julian@juliangruber.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/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/balanced-match/index.js b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/balanced-match/index.js new file mode 100644 index 00000000..1685a762 --- /dev/null +++ b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/balanced-match/index.js @@ -0,0 +1,59 @@ +'use strict'; +module.exports = balanced; +function balanced(a, b, str) { + if (a instanceof RegExp) a = maybeMatch(a, str); + if (b instanceof RegExp) b = maybeMatch(b, str); + + var r = range(a, b, str); + + return r && { + start: r[0], + end: r[1], + pre: str.slice(0, r[0]), + body: str.slice(r[0] + a.length, r[1]), + post: str.slice(r[1] + b.length) + }; +} + +function maybeMatch(reg, str) { + var m = str.match(reg); + return m ? m[0] : null; +} + +balanced.range = range; +function range(a, b, str) { + var begs, beg, left, right, result; + var ai = str.indexOf(a); + var bi = str.indexOf(b, ai + 1); + var i = ai; + + if (ai >= 0 && bi > 0) { + begs = []; + left = str.length; + + while (i >= 0 && !result) { + if (i == ai) { + begs.push(i); + ai = str.indexOf(a, i + 1); + } else if (begs.length == 1) { + result = [ begs.pop(), bi ]; + } else { + beg = begs.pop(); + if (beg < left) { + left = beg; + right = bi; + } + + bi = str.indexOf(b, i + 1); + } + + i = ai < bi && ai >= 0 ? ai : bi; + } + + if (begs.length) { + result = [ left, right ]; + } + } + + return result; +} diff --git a/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/balanced-match/package.json b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/balanced-match/package.json new file mode 100644 index 00000000..49810c7a --- /dev/null +++ b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/balanced-match/package.json @@ -0,0 +1,112 @@ +{ + "_args": [ + [ + { + "raw": "balanced-match@^1.0.0", + "scope": null, + "escapedName": "balanced-match", + "name": "balanced-match", + "rawSpec": "^1.0.0", + "spec": ">=1.0.0 <2.0.0", + "type": "range" + }, + "/Users/frances.coronel/.nvm/versions/node/v6.10.1/lib/node_modules/alfred-emoj/node_modules/brace-expansion" + ] + ], + "_from": "balanced-match@>=1.0.0 <2.0.0", + "_id": "balanced-match@1.0.0", + "_inCache": true, + "_location": "/alfred-emoj/balanced-match", + "_nodeVersion": "7.8.0", + "_npmOperationalInternal": { + "host": "s3://npm-registry-packages", + "tmp": "tmp/balanced-match-1.0.0.tgz_1497251909645_0.8755026108119637" + }, + "_npmUser": { + "name": "juliangruber", + "email": "julian@juliangruber.com" + }, + "_npmVersion": "4.2.0", + "_phantomChildren": {}, + "_requested": { + "raw": "balanced-match@^1.0.0", + "scope": null, + "escapedName": "balanced-match", + "name": "balanced-match", + "rawSpec": "^1.0.0", + "spec": ">=1.0.0 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/alfred-emoj/brace-expansion" + ], + "_resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", + "_shasum": "89b4d199ab2bee49de164ea02b89ce462d71b767", + "_shrinkwrap": null, + "_spec": "balanced-match@^1.0.0", + "_where": "/Users/frances.coronel/.nvm/versions/node/v6.10.1/lib/node_modules/alfred-emoj/node_modules/brace-expansion", + "author": { + "name": "Julian Gruber", + "email": "mail@juliangruber.com", + "url": "http://juliangruber.com" + }, + "bugs": { + "url": "https://github.com/juliangruber/balanced-match/issues" + }, + "dependencies": {}, + "description": "Match balanced character pairs, like \"{\" and \"}\"", + "devDependencies": { + "matcha": "^0.7.0", + "tape": "^4.6.0" + }, + "directories": {}, + "dist": { + "shasum": "89b4d199ab2bee49de164ea02b89ce462d71b767", + "tarball": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz" + }, + "gitHead": "d701a549a7653a874eebce7eca25d3577dc868ac", + "homepage": "https://github.com/juliangruber/balanced-match", + "keywords": [ + "match", + "regexp", + "test", + "balanced", + "parse" + ], + "license": "MIT", + "main": "index.js", + "maintainers": [ + { + "name": "juliangruber", + "email": "julian@juliangruber.com" + } + ], + "name": "balanced-match", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/juliangruber/balanced-match.git" + }, + "scripts": { + "bench": "make bench", + "test": "make test" + }, + "testling": { + "files": "test/*.js", + "browsers": [ + "ie/8..latest", + "firefox/20..latest", + "firefox/nightly", + "chrome/25..latest", + "chrome/canary", + "opera/12..latest", + "opera/next", + "safari/5.1..latest", + "ipad/6.0..latest", + "iphone/6.0..latest", + "android-browser/4.2..latest" + ] + }, + "version": "1.0.0" +} diff --git a/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/base64-js/LICENSE b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/base64-js/LICENSE new file mode 100644 index 00000000..96d3f68a --- /dev/null +++ b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/base64-js/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014 + +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/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/base64-js/README.md b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/base64-js/README.md new file mode 100644 index 00000000..e546d86d --- /dev/null +++ b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/base64-js/README.md @@ -0,0 +1,32 @@ +base64-js +========= + +`base64-js` does basic base64 encoding/decoding in pure JS. + +[![build status](https://secure.travis-ci.org/beatgammit/base64-js.png)](http://travis-ci.org/beatgammit/base64-js) + +[![testling badge](https://ci.testling.com/beatgammit/base64-js.png)](https://ci.testling.com/beatgammit/base64-js) + +Many browsers already have base64 encoding/decoding functionality, but it is for text data, not all-purpose binary data. + +Sometimes encoding/decoding binary data in the browser is useful, and that is what this module does. + +## install + +With [npm](https://npmjs.org) do: + +`npm install base64-js` + +## methods + +`var base64 = require('base64-js')` + +`base64` has three exposed functions, `byteLength`, `toByteArray` and `fromByteArray`, which both take a single argument. + +* `byteLength` - Takes a base64 string and returns length of byte array +* `toByteArray` - Takes a base64 string and returns a byte array +* `fromByteArray` - Takes a byte array and returns a base64 string + +## license + +MIT diff --git a/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/base64-js/base64js.min.js b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/base64-js/base64js.min.js new file mode 100644 index 00000000..22ad8077 --- /dev/null +++ b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/base64-js/base64js.min.js @@ -0,0 +1 @@ +(function(r){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=r()}else if(typeof define==="function"&&define.amd){define([],r)}else{var e;if(typeof window!=="undefined"){e=window}else if(typeof global!=="undefined"){e=global}else if(typeof self!=="undefined"){e=self}else{e=this}e.base64js=r()}})(function(){var r,e,t;return function r(e,t,n){function o(i,a){if(!t[i]){if(!e[i]){var u=typeof require=="function"&&require;if(!a&&u)return u(i,!0);if(f)return f(i,!0);var d=new Error("Cannot find module '"+i+"'");throw d.code="MODULE_NOT_FOUND",d}var c=t[i]={exports:{}};e[i][0].call(c.exports,function(r){var t=e[i][1][r];return o(t?t:r)},c,c.exports,r,e,t,n)}return t[i].exports}var f=typeof require=="function"&&require;for(var i=0;i0){throw new Error("Invalid string. Length must be a multiple of 4")}return r[e-2]==="="?2:r[e-1]==="="?1:0}function c(r){return r.length*3/4-d(r)}function v(r){var e,t,n,i,a,u;var c=r.length;a=d(r);u=new f(c*3/4-a);n=a>0?c-4:c;var v=0;for(e=0,t=0;e>16&255;u[v++]=i>>8&255;u[v++]=i&255}if(a===2){i=o[r.charCodeAt(e)]<<2|o[r.charCodeAt(e+1)]>>4;u[v++]=i&255}else if(a===1){i=o[r.charCodeAt(e)]<<10|o[r.charCodeAt(e+1)]<<4|o[r.charCodeAt(e+2)]>>2;u[v++]=i>>8&255;u[v++]=i&255}return u}function l(r){return n[r>>18&63]+n[r>>12&63]+n[r>>6&63]+n[r&63]}function h(r,e,t){var n;var o=[];for(var f=e;fd?d:u+a))}if(o===1){e=r[t-1];f+=n[e>>2];f+=n[e<<4&63];f+="=="}else if(o===2){e=(r[t-2]<<8)+r[t-1];f+=n[e>>10];f+=n[e>>4&63];f+=n[e<<2&63];f+="="}i.push(f);return i.join("")}},{}]},{},[])("/")}); diff --git a/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/base64-js/index.js b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/base64-js/index.js new file mode 100644 index 00000000..8e806ac4 --- /dev/null +++ b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/base64-js/index.js @@ -0,0 +1,114 @@ +'use strict' + +exports.byteLength = byteLength +exports.toByteArray = toByteArray +exports.fromByteArray = fromByteArray + +var lookup = [] +var revLookup = [] +var Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array + +var code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/' +for (var i = 0, len = code.length; i < len; ++i) { + lookup[i] = code[i] + revLookup[code.charCodeAt(i)] = i +} + +revLookup['-'.charCodeAt(0)] = 62 +revLookup['_'.charCodeAt(0)] = 63 + +function placeHoldersCount (b64) { + var len = b64.length + if (len % 4 > 0) { + throw new Error('Invalid string. Length must be a multiple of 4') + } + + // the number of equal signs (place holders) + // if there are two placeholders, than the two characters before it + // represent one byte + // if there is only one, then the three characters before it represent 2 bytes + // this is just a cheap hack to not do indexOf twice + return b64[len - 2] === '=' ? 2 : b64[len - 1] === '=' ? 1 : 0 +} + +function byteLength (b64) { + // base64 is 4/3 + up to two characters of the original data + return b64.length * 3 / 4 - placeHoldersCount(b64) +} + +function toByteArray (b64) { + var i, j, l, tmp, placeHolders, arr + var len = b64.length + placeHolders = placeHoldersCount(b64) + + arr = new Arr(len * 3 / 4 - placeHolders) + + // if there are placeholders, only get up to the last complete 4 chars + l = placeHolders > 0 ? len - 4 : len + + var L = 0 + + for (i = 0, j = 0; i < l; i += 4, j += 3) { + tmp = (revLookup[b64.charCodeAt(i)] << 18) | (revLookup[b64.charCodeAt(i + 1)] << 12) | (revLookup[b64.charCodeAt(i + 2)] << 6) | revLookup[b64.charCodeAt(i + 3)] + arr[L++] = (tmp >> 16) & 0xFF + arr[L++] = (tmp >> 8) & 0xFF + arr[L++] = tmp & 0xFF + } + + if (placeHolders === 2) { + tmp = (revLookup[b64.charCodeAt(i)] << 2) | (revLookup[b64.charCodeAt(i + 1)] >> 4) + arr[L++] = tmp & 0xFF + } else if (placeHolders === 1) { + tmp = (revLookup[b64.charCodeAt(i)] << 10) | (revLookup[b64.charCodeAt(i + 1)] << 4) | (revLookup[b64.charCodeAt(i + 2)] >> 2) + arr[L++] = (tmp >> 8) & 0xFF + arr[L++] = tmp & 0xFF + } + + return arr +} + +function tripletToBase64 (num) { + return lookup[num >> 18 & 0x3F] + lookup[num >> 12 & 0x3F] + lookup[num >> 6 & 0x3F] + lookup[num & 0x3F] +} + +function encodeChunk (uint8, start, end) { + var tmp + var output = [] + for (var i = start; i < end; i += 3) { + tmp = (uint8[i] << 16) + (uint8[i + 1] << 8) + (uint8[i + 2]) + output.push(tripletToBase64(tmp)) + } + return output.join('') +} + +function fromByteArray (uint8) { + var tmp + var len = uint8.length + var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes + var output = '' + var parts = [] + var maxChunkLength = 16383 // must be multiple of 3 + + // go through the array every three bytes, we'll deal with trailing stuff later + for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) { + parts.push(encodeChunk(uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength))) + } + + // pad the end with zeros, but make sure to not forget the extra bytes + if (extraBytes === 1) { + tmp = uint8[len - 1] + output += lookup[tmp >> 2] + output += lookup[(tmp << 4) & 0x3F] + output += '==' + } else if (extraBytes === 2) { + tmp = (uint8[len - 2] << 8) + (uint8[len - 1]) + output += lookup[tmp >> 10] + output += lookup[(tmp >> 4) & 0x3F] + output += lookup[(tmp << 2) & 0x3F] + output += '=' + } + + parts.push(output) + + return parts.join('') +} diff --git a/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/base64-js/package.json b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/base64-js/package.json new file mode 100644 index 00000000..4f43fafc --- /dev/null +++ b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/base64-js/package.json @@ -0,0 +1,105 @@ +{ + "_args": [ + [ + { + "raw": "base64-js@1.2.0", + "scope": null, + "escapedName": "base64-js", + "name": "base64-js", + "rawSpec": "1.2.0", + "spec": "1.2.0", + "type": "version" + }, + "/Users/frances.coronel/.nvm/versions/node/v6.10.1/lib/node_modules/alfred-emoj/node_modules/plist" + ] + ], + "_from": "base64-js@1.2.0", + "_id": "base64-js@1.2.0", + "_inCache": true, + "_location": "/alfred-emoj/base64-js", + "_nodeVersion": "6.5.0", + "_npmOperationalInternal": { + "host": "packages-16-east.internal.npmjs.com", + "tmp": "tmp/base64-js-1.2.0.tgz_1474574119286_0.4763944323640317" + }, + "_npmUser": { + "name": "feross", + "email": "feross@feross.org" + }, + "_npmVersion": "3.10.3", + "_phantomChildren": {}, + "_requested": { + "raw": "base64-js@1.2.0", + "scope": null, + "escapedName": "base64-js", + "name": "base64-js", + "rawSpec": "1.2.0", + "spec": "1.2.0", + "type": "version" + }, + "_requiredBy": [ + "/alfred-emoj/plist" + ], + "_resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.2.0.tgz", + "_shasum": "a39992d723584811982be5e290bb6a53d86700f1", + "_shrinkwrap": null, + "_spec": "base64-js@1.2.0", + "_where": "/Users/frances.coronel/.nvm/versions/node/v6.10.1/lib/node_modules/alfred-emoj/node_modules/plist", + "author": { + "name": "T. Jameson Little", + "email": "t.jameson.little@gmail.com" + }, + "bugs": { + "url": "https://github.com/beatgammit/base64-js/issues" + }, + "dependencies": {}, + "description": "Base64 encoding/decoding in pure JS", + "devDependencies": { + "benchmark": "^2.1.0", + "browserify": "^13.0.0", + "standard": "*", + "tape": "4.x", + "uglify-js": "^2.6.2" + }, + "directories": {}, + "dist": { + "shasum": "a39992d723584811982be5e290bb6a53d86700f1", + "tarball": "https://registry.npmjs.org/base64-js/-/base64-js-1.2.0.tgz" + }, + "files": [ + "test", + "index.js", + "base64js.min.js" + ], + "gitHead": "18bb7b2f20af653e60ae186bd879d3c4e6e6d8e6", + "homepage": "https://github.com/beatgammit/base64-js", + "keywords": [ + "base64" + ], + "license": "MIT", + "main": "index.js", + "maintainers": [ + { + "name": "beatgammit", + "email": "t.jameson.little@gmail.com" + }, + { + "name": "feross", + "email": "feross@feross.org" + } + ], + "name": "base64-js", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/beatgammit/base64-js.git" + }, + "scripts": { + "build": "browserify -s base64js -r ./ | uglifyjs -m > base64js.min.js", + "lint": "standard", + "test": "npm run lint && npm run unit", + "unit": "tape test/*.js" + }, + "version": "1.2.0" +} diff --git a/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/base64-js/test/big-data.js b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/base64-js/test/big-data.js new file mode 100644 index 00000000..be16ebe6 --- /dev/null +++ b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/base64-js/test/big-data.js @@ -0,0 +1,24 @@ +var test = require('tape') +var b64 = require('../') + +test('convert big data to base64', function (t) { + var b64str, arr, i, length + var big = new Uint8Array(64 * 1024 * 1024) + for (i = 0, length = big.length; i < length; ++i) { + big[i] = i % 256 + } + b64str = b64.fromByteArray(big) + arr = b64.toByteArray(b64str) + t.ok(equal(arr, big)) + t.end() +}) + +function equal (a, b) { + var i + var length = a.length + if (length !== b.length) return false + for (i = 0; i < length; ++i) { + if (a[i] !== b[i]) return false + } + return true +} diff --git a/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/base64-js/test/convert.js b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/base64-js/test/convert.js new file mode 100644 index 00000000..d68e105d --- /dev/null +++ b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/base64-js/test/convert.js @@ -0,0 +1,48 @@ +var test = require('tape') +var b64 = require('../') +var checks = [ + 'a', + 'aa', + 'aaa', + 'hi', + 'hi!', + 'hi!!', + 'sup', + 'sup?', + 'sup?!' +] + +test('convert to base64 and back', function (t) { + t.plan(checks.length * 2) + + for (var i = 0; i < checks.length; i++) { + var check = checks[i] + var b64Str, arr, str + + b64Str = b64.fromByteArray(map(check, function (char) { return char.charCodeAt(0) })) + + arr = b64.toByteArray(b64Str) + str = map(arr, function (byte) { return String.fromCharCode(byte) }).join('') + + t.equal(check, str, 'Checked ' + check) + t.equal(b64.byteLength(b64Str), arr.length, 'Checked length for ' + check) + } +}) + +function map (arr, callback) { + var res = [] + var kValue, mappedValue + + for (var k = 0, len = arr.length; k < len; k++) { + if ((typeof arr === 'string' && !!arr.charAt(k))) { + kValue = arr.charAt(k) + mappedValue = callback(kValue, k, arr) + res[k] = mappedValue + } else if (typeof arr !== 'string' && k in arr) { + kValue = arr[k] + mappedValue = callback(kValue, k, arr) + res[k] = mappedValue + } + } + return res +} diff --git a/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/base64-js/test/url-safe.js b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/base64-js/test/url-safe.js new file mode 100644 index 00000000..3203b33d --- /dev/null +++ b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/base64-js/test/url-safe.js @@ -0,0 +1,18 @@ +var test = require('tape') +var b64 = require('../') + +test('decode url-safe style base64 strings', function (t) { + var expected = [0xff, 0xff, 0xbe, 0xff, 0xef, 0xbf, 0xfb, 0xef, 0xff] + + var actual = b64.toByteArray('//++/++/++//') + for (var i = 0; i < actual.length; i++) { + t.equal(actual[i], expected[i]) + } + + actual = b64.toByteArray('__--_--_--__') + for (i = 0; i < actual.length; i++) { + t.equal(actual[i], expected[i]) + } + + t.end() +}) diff --git a/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/big-integer/BigInteger.d.ts b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/big-integer/BigInteger.d.ts new file mode 100644 index 00000000..1c12fcf6 --- /dev/null +++ b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/big-integer/BigInteger.d.ts @@ -0,0 +1,2364 @@ +/** + * Type definitions for BigInteger.js + * Definitions by: Tommy Frazier + */ +export = bigInt; +export as namespace bigInt; + +declare var bigInt: bigInt.BigIntegerStatic; + +declare namespace bigInt { + type BigNumber = number | string | BigInteger; + + interface BigIntegerStatic { + /** + * Equivalent to bigInt(0). + */ + (): BigInteger; + + /** + * Parse a Javascript number into a bigInt. + */ + (number: number): BigInteger; + + /** + * Parse a string into a bigInt. + */ + (string: string, base?: BigNumber): BigInteger; + + /** + * no-op. + */ + (bigInt: BigInteger): BigInteger; + + /** + * Constructs a bigInt from an array of digits in specified base. + * The optional isNegative flag will make the number negative. + */ + fromArray: (digits: BigNumber[], base?: BigNumber, isNegative?: boolean) => BigInteger; + + /** + * Finds the greatest common denominator of a and b. + */ + gcd: (a: BigNumber, b: BigNumber) => BigInteger; + + + /** + * Returns true if x is a BigInteger, false otherwise. + */ + isInstance: (x: any) => boolean; + + /** + * Finds the least common multiple of a and b. + */ + lcm: (a: BigNumber, b: BigNumber) => BigInteger; + + /** + * Returns the largest of a and b. + */ + max: (a: BigNumber, b: BigNumber) => BigInteger; + + /** + * Returns the smallest of a and b. + */ + min: (a: BigNumber, b: BigNumber) => BigInteger; + + /** + * Equivalent to bigInt(-1). + */ + minusOne: BigInteger; + + /** + * Equivalent to bigInt(1). + */ + one: BigInteger; + + /** + * Returns a random number between min and max. + */ + randBetween: (min: BigNumber, max: BigNumber) => BigInteger; + + /** + * Equivalent to bigInt(0). + */ + zero: BigInteger; + } + + interface BigInteger { + /** + * Returns the absolute value of a bigInt. + */ + abs(): BigInteger; + + /** + * Performs addition. + */ + add(number: BigNumber): BigInteger; + + /** + * Performs the bitwise AND operation. + */ + and(number: BigNumber): BigInteger; + + /** + * Performs a comparison between two numbers. If the numbers are equal, it returns 0. + * If the first number is greater, it returns 1. If the first number is lesser, it returns -1. + */ + compare(number: BigNumber): number; + + /** + * Performs a comparison between the absolute value of two numbers. + */ + compareAbs(number: BigNumber): number; + + /** + * Alias for the compare method. + */ + compareTo(number: BigNumber): number; + + /** + * Performs integer division, disregarding the remainder. + */ + divide(number: BigNumber): BigInteger; + + /** + * Performs division and returns an object with two properties: quotient and remainder. + * The sign of the remainder will match the sign of the dividend. + */ + divmod(number: BigNumber): {quotient: BigInteger, remainder: BigInteger}; + + /** + * Alias for the equals method. + */ + eq(number: BigNumber): boolean; + + /** + * Checks if two numbers are equal. + */ + equals(number: BigNumber): boolean; + + /** + * Alias for the greaterOrEquals method. + */ + geq(number: BigNumber): boolean; + + /** + * Checks if the first number is greater than the second. + */ + greater(number: BigNumber): boolean; + + /** + * Checks if the first number is greater than or equal to the second. + */ + greaterOrEquals(number: BigNumber): boolean; + + /** + * Alias for the greater method. + */ + gt(number: BigNumber): boolean; + + /** + * Returns true if the first number is divisible by the second number, false otherwise. + */ + isDivisibleBy(number: BigNumber): boolean; + + /** + * Returns true if the number is even, false otherwise. + */ + isEven(): boolean; + + /** + * Returns true if the number is negative, false otherwise. + * Returns false for 0 and true for -0. + */ + isNegative(): boolean; + + /** + * Returns true if the number is odd, false otherwise. + */ + isOdd(): boolean; + + /** + * Return true if the number is positive, false otherwise. + * Returns true for 0 and false for -0. + */ + isPositive(): boolean; + + /** + * Returns true if the number is prime, false otherwise. + */ + isPrime(): boolean; + + /** + * Returns true if the number is very likely to be prime, false otherwise. + */ + isProbablePrime(iterations?: number): boolean; + + /** + * Returns true if the number is 1 or -1, false otherwise. + */ + isUnit(): boolean; + + /** + * Return true if the number is 0 or -0, false otherwise. + */ + isZero(): boolean; + + /** + * Alias for the lesserOrEquals method. + */ + leq(number: BigNumber): boolean; + + /** + * Checks if the first number is lesser than the second. + */ + lesser(number: BigNumber): boolean; + + /** + * Checks if the first number is less than or equal to the second. + */ + lesserOrEquals(number: BigNumber): boolean; + + /** + * Alias for the lesser method. + */ + lt(number: BigNumber): boolean; + + /** + * Alias for the subtract method. + */ + minus(number: BigNumber): BigInteger; + + /** + * Performs division and returns the remainder, disregarding the quotient. + * The sign of the remainder will match the sign of the dividend. + */ + mod(number: BigNumber): BigInteger; + + /** + * Finds the multiplicative inverse of the number modulo mod. + */ + modInv(number: BigNumber): BigInteger; + + /** + * Takes the number to the power exp modulo mod. + */ + modPow(exp: BigNumber, mod: BigNumber): BigInteger; + + /** + * Performs multiplication. + */ + multiply(number: BigNumber): BigInteger; + + /** + * Reverses the sign of the number. + */ + negate(): BigInteger; + + /** + * Alias for the notEquals method. + */ + neq(number: BigNumber): boolean; + + /** + * Adds one to the number. + */ + next(): BigInteger; + + /** + * Performs the bitwise NOT operation. + */ + not(): BigInteger; + + /** + * Checks if two numbers are not equal. + */ + notEquals(number: BigNumber): boolean; + + /** + * Performs the bitwise OR operation. + */ + or(number: BigNumber): BigInteger; + + /** + * Alias for the divide method. + */ + over(number: BigNumber): BigInteger; + + /** + * Alias for the add method. + */ + plus(number: BigNumber): BigInteger; + + /** + * Performs exponentiation. If the exponent is less than 0, pow returns 0. + * bigInt.zero.pow(0) returns 1. + */ + pow(number: BigNumber): BigInteger; + + /** + * Subtracts one from the number. + */ + prev(): BigInteger; + + /** + * Alias for the mod method. + */ + remainder(number: BigNumber): BigInteger; + + /** + * Shifts the number left by n places in its binary representation. + * If a negative number is provided, it will shift right. + * + * Throws an error if number is outside of the range [-9007199254740992, 9007199254740992]. + */ + shiftLeft(number: BigNumber): BigInteger; + + /** + * Shifts the number right by n places in its binary representation. + * If a negative number is provided, it will shift left. + * + * Throws an error if number is outside of the range [-9007199254740992, 9007199254740992]. + */ + shiftRight(number: BigNumber): BigInteger; + + /** + * Squares the number. + */ + square(): BigInteger; + + /** + * Performs subtraction. + */ + subtract(number: BigNumber): BigInteger; + + /** + * Alias for the multiply method. + */ + times(number: BigNumber): BigInteger; + + /** + * Converts a bigInt into a native Javascript number. Loses precision for numbers outside the range. + */ + toJSNumber(): number; + + /** + * Converts a bigInt to a string. + */ + toString(radix?: number): string; + + /** + * Converts a bigInt to a native Javascript number. This override allows you to use native + * arithmetic operators without explicit conversion. + */ + valueOf(): number; + + /** + * Performs the bitwise XOR operation. + */ + xor(number: BigNumber): BigInteger; + } + + // Array constant accessors + interface BigIntegerStatic { + '-999': BigInteger; + '-998': BigInteger; + '-997': BigInteger; + '-996': BigInteger; + '-995': BigInteger; + '-994': BigInteger; + '-993': BigInteger; + '-992': BigInteger; + '-991': BigInteger; + '-990': BigInteger; + '-989': BigInteger; + '-988': BigInteger; + '-987': BigInteger; + '-986': BigInteger; + '-985': BigInteger; + '-984': BigInteger; + '-983': BigInteger; + '-982': BigInteger; + '-981': BigInteger; + '-980': BigInteger; + '-979': BigInteger; + '-978': BigInteger; + '-977': BigInteger; + '-976': BigInteger; + '-975': BigInteger; + '-974': BigInteger; + '-973': BigInteger; + '-972': BigInteger; + '-971': BigInteger; + '-970': BigInteger; + '-969': BigInteger; + '-968': BigInteger; + '-967': BigInteger; + '-966': BigInteger; + '-965': BigInteger; + '-964': BigInteger; + '-963': BigInteger; + '-962': BigInteger; + '-961': BigInteger; + '-960': BigInteger; + '-959': BigInteger; + '-958': BigInteger; + '-957': BigInteger; + '-956': BigInteger; + '-955': BigInteger; + '-954': BigInteger; + '-953': BigInteger; + '-952': BigInteger; + '-951': BigInteger; + '-950': BigInteger; + '-949': BigInteger; + '-948': BigInteger; + '-947': BigInteger; + '-946': BigInteger; + '-945': BigInteger; + '-944': BigInteger; + '-943': BigInteger; + '-942': BigInteger; + '-941': BigInteger; + '-940': BigInteger; + '-939': BigInteger; + '-938': BigInteger; + '-937': BigInteger; + '-936': BigInteger; + '-935': BigInteger; + '-934': BigInteger; + '-933': BigInteger; + '-932': BigInteger; + '-931': BigInteger; + '-930': BigInteger; + '-929': BigInteger; + '-928': BigInteger; + '-927': BigInteger; + '-926': BigInteger; + '-925': BigInteger; + '-924': BigInteger; + '-923': BigInteger; + '-922': BigInteger; + '-921': BigInteger; + '-920': BigInteger; + '-919': BigInteger; + '-918': BigInteger; + '-917': BigInteger; + '-916': BigInteger; + '-915': BigInteger; + '-914': BigInteger; + '-913': BigInteger; + '-912': BigInteger; + '-911': BigInteger; + '-910': BigInteger; + '-909': BigInteger; + '-908': BigInteger; + '-907': BigInteger; + '-906': BigInteger; + '-905': BigInteger; + '-904': BigInteger; + '-903': BigInteger; + '-902': BigInteger; + '-901': BigInteger; + '-900': BigInteger; + '-899': BigInteger; + '-898': BigInteger; + '-897': BigInteger; + '-896': BigInteger; + '-895': BigInteger; + '-894': BigInteger; + '-893': BigInteger; + '-892': BigInteger; + '-891': BigInteger; + '-890': BigInteger; + '-889': BigInteger; + '-888': BigInteger; + '-887': BigInteger; + '-886': BigInteger; + '-885': BigInteger; + '-884': BigInteger; + '-883': BigInteger; + '-882': BigInteger; + '-881': BigInteger; + '-880': BigInteger; + '-879': BigInteger; + '-878': BigInteger; + '-877': BigInteger; + '-876': BigInteger; + '-875': BigInteger; + '-874': BigInteger; + '-873': BigInteger; + '-872': BigInteger; + '-871': BigInteger; + '-870': BigInteger; + '-869': BigInteger; + '-868': BigInteger; + '-867': BigInteger; + '-866': BigInteger; + '-865': BigInteger; + '-864': BigInteger; + '-863': BigInteger; + '-862': BigInteger; + '-861': BigInteger; + '-860': BigInteger; + '-859': BigInteger; + '-858': BigInteger; + '-857': BigInteger; + '-856': BigInteger; + '-855': BigInteger; + '-854': BigInteger; + '-853': BigInteger; + '-852': BigInteger; + '-851': BigInteger; + '-850': BigInteger; + '-849': BigInteger; + '-848': BigInteger; + '-847': BigInteger; + '-846': BigInteger; + '-845': BigInteger; + '-844': BigInteger; + '-843': BigInteger; + '-842': BigInteger; + '-841': BigInteger; + '-840': BigInteger; + '-839': BigInteger; + '-838': BigInteger; + '-837': BigInteger; + '-836': BigInteger; + '-835': BigInteger; + '-834': BigInteger; + '-833': BigInteger; + '-832': BigInteger; + '-831': BigInteger; + '-830': BigInteger; + '-829': BigInteger; + '-828': BigInteger; + '-827': BigInteger; + '-826': BigInteger; + '-825': BigInteger; + '-824': BigInteger; + '-823': BigInteger; + '-822': BigInteger; + '-821': BigInteger; + '-820': BigInteger; + '-819': BigInteger; + '-818': BigInteger; + '-817': BigInteger; + '-816': BigInteger; + '-815': BigInteger; + '-814': BigInteger; + '-813': BigInteger; + '-812': BigInteger; + '-811': BigInteger; + '-810': BigInteger; + '-809': BigInteger; + '-808': BigInteger; + '-807': BigInteger; + '-806': BigInteger; + '-805': BigInteger; + '-804': BigInteger; + '-803': BigInteger; + '-802': BigInteger; + '-801': BigInteger; + '-800': BigInteger; + '-799': BigInteger; + '-798': BigInteger; + '-797': BigInteger; + '-796': BigInteger; + '-795': BigInteger; + '-794': BigInteger; + '-793': BigInteger; + '-792': BigInteger; + '-791': BigInteger; + '-790': BigInteger; + '-789': BigInteger; + '-788': BigInteger; + '-787': BigInteger; + '-786': BigInteger; + '-785': BigInteger; + '-784': BigInteger; + '-783': BigInteger; + '-782': BigInteger; + '-781': BigInteger; + '-780': BigInteger; + '-779': BigInteger; + '-778': BigInteger; + '-777': BigInteger; + '-776': BigInteger; + '-775': BigInteger; + '-774': BigInteger; + '-773': BigInteger; + '-772': BigInteger; + '-771': BigInteger; + '-770': BigInteger; + '-769': BigInteger; + '-768': BigInteger; + '-767': BigInteger; + '-766': BigInteger; + '-765': BigInteger; + '-764': BigInteger; + '-763': BigInteger; + '-762': BigInteger; + '-761': BigInteger; + '-760': BigInteger; + '-759': BigInteger; + '-758': BigInteger; + '-757': BigInteger; + '-756': BigInteger; + '-755': BigInteger; + '-754': BigInteger; + '-753': BigInteger; + '-752': BigInteger; + '-751': BigInteger; + '-750': BigInteger; + '-749': BigInteger; + '-748': BigInteger; + '-747': BigInteger; + '-746': BigInteger; + '-745': BigInteger; + '-744': BigInteger; + '-743': BigInteger; + '-742': BigInteger; + '-741': BigInteger; + '-740': BigInteger; + '-739': BigInteger; + '-738': BigInteger; + '-737': BigInteger; + '-736': BigInteger; + '-735': BigInteger; + '-734': BigInteger; + '-733': BigInteger; + '-732': BigInteger; + '-731': BigInteger; + '-730': BigInteger; + '-729': BigInteger; + '-728': BigInteger; + '-727': BigInteger; + '-726': BigInteger; + '-725': BigInteger; + '-724': BigInteger; + '-723': BigInteger; + '-722': BigInteger; + '-721': BigInteger; + '-720': BigInteger; + '-719': BigInteger; + '-718': BigInteger; + '-717': BigInteger; + '-716': BigInteger; + '-715': BigInteger; + '-714': BigInteger; + '-713': BigInteger; + '-712': BigInteger; + '-711': BigInteger; + '-710': BigInteger; + '-709': BigInteger; + '-708': BigInteger; + '-707': BigInteger; + '-706': BigInteger; + '-705': BigInteger; + '-704': BigInteger; + '-703': BigInteger; + '-702': BigInteger; + '-701': BigInteger; + '-700': BigInteger; + '-699': BigInteger; + '-698': BigInteger; + '-697': BigInteger; + '-696': BigInteger; + '-695': BigInteger; + '-694': BigInteger; + '-693': BigInteger; + '-692': BigInteger; + '-691': BigInteger; + '-690': BigInteger; + '-689': BigInteger; + '-688': BigInteger; + '-687': BigInteger; + '-686': BigInteger; + '-685': BigInteger; + '-684': BigInteger; + '-683': BigInteger; + '-682': BigInteger; + '-681': BigInteger; + '-680': BigInteger; + '-679': BigInteger; + '-678': BigInteger; + '-677': BigInteger; + '-676': BigInteger; + '-675': BigInteger; + '-674': BigInteger; + '-673': BigInteger; + '-672': BigInteger; + '-671': BigInteger; + '-670': BigInteger; + '-669': BigInteger; + '-668': BigInteger; + '-667': BigInteger; + '-666': BigInteger; + '-665': BigInteger; + '-664': BigInteger; + '-663': BigInteger; + '-662': BigInteger; + '-661': BigInteger; + '-660': BigInteger; + '-659': BigInteger; + '-658': BigInteger; + '-657': BigInteger; + '-656': BigInteger; + '-655': BigInteger; + '-654': BigInteger; + '-653': BigInteger; + '-652': BigInteger; + '-651': BigInteger; + '-650': BigInteger; + '-649': BigInteger; + '-648': BigInteger; + '-647': BigInteger; + '-646': BigInteger; + '-645': BigInteger; + '-644': BigInteger; + '-643': BigInteger; + '-642': BigInteger; + '-641': BigInteger; + '-640': BigInteger; + '-639': BigInteger; + '-638': BigInteger; + '-637': BigInteger; + '-636': BigInteger; + '-635': BigInteger; + '-634': BigInteger; + '-633': BigInteger; + '-632': BigInteger; + '-631': BigInteger; + '-630': BigInteger; + '-629': BigInteger; + '-628': BigInteger; + '-627': BigInteger; + '-626': BigInteger; + '-625': BigInteger; + '-624': BigInteger; + '-623': BigInteger; + '-622': BigInteger; + '-621': BigInteger; + '-620': BigInteger; + '-619': BigInteger; + '-618': BigInteger; + '-617': BigInteger; + '-616': BigInteger; + '-615': BigInteger; + '-614': BigInteger; + '-613': BigInteger; + '-612': BigInteger; + '-611': BigInteger; + '-610': BigInteger; + '-609': BigInteger; + '-608': BigInteger; + '-607': BigInteger; + '-606': BigInteger; + '-605': BigInteger; + '-604': BigInteger; + '-603': BigInteger; + '-602': BigInteger; + '-601': BigInteger; + '-600': BigInteger; + '-599': BigInteger; + '-598': BigInteger; + '-597': BigInteger; + '-596': BigInteger; + '-595': BigInteger; + '-594': BigInteger; + '-593': BigInteger; + '-592': BigInteger; + '-591': BigInteger; + '-590': BigInteger; + '-589': BigInteger; + '-588': BigInteger; + '-587': BigInteger; + '-586': BigInteger; + '-585': BigInteger; + '-584': BigInteger; + '-583': BigInteger; + '-582': BigInteger; + '-581': BigInteger; + '-580': BigInteger; + '-579': BigInteger; + '-578': BigInteger; + '-577': BigInteger; + '-576': BigInteger; + '-575': BigInteger; + '-574': BigInteger; + '-573': BigInteger; + '-572': BigInteger; + '-571': BigInteger; + '-570': BigInteger; + '-569': BigInteger; + '-568': BigInteger; + '-567': BigInteger; + '-566': BigInteger; + '-565': BigInteger; + '-564': BigInteger; + '-563': BigInteger; + '-562': BigInteger; + '-561': BigInteger; + '-560': BigInteger; + '-559': BigInteger; + '-558': BigInteger; + '-557': BigInteger; + '-556': BigInteger; + '-555': BigInteger; + '-554': BigInteger; + '-553': BigInteger; + '-552': BigInteger; + '-551': BigInteger; + '-550': BigInteger; + '-549': BigInteger; + '-548': BigInteger; + '-547': BigInteger; + '-546': BigInteger; + '-545': BigInteger; + '-544': BigInteger; + '-543': BigInteger; + '-542': BigInteger; + '-541': BigInteger; + '-540': BigInteger; + '-539': BigInteger; + '-538': BigInteger; + '-537': BigInteger; + '-536': BigInteger; + '-535': BigInteger; + '-534': BigInteger; + '-533': BigInteger; + '-532': BigInteger; + '-531': BigInteger; + '-530': BigInteger; + '-529': BigInteger; + '-528': BigInteger; + '-527': BigInteger; + '-526': BigInteger; + '-525': BigInteger; + '-524': BigInteger; + '-523': BigInteger; + '-522': BigInteger; + '-521': BigInteger; + '-520': BigInteger; + '-519': BigInteger; + '-518': BigInteger; + '-517': BigInteger; + '-516': BigInteger; + '-515': BigInteger; + '-514': BigInteger; + '-513': BigInteger; + '-512': BigInteger; + '-511': BigInteger; + '-510': BigInteger; + '-509': BigInteger; + '-508': BigInteger; + '-507': BigInteger; + '-506': BigInteger; + '-505': BigInteger; + '-504': BigInteger; + '-503': BigInteger; + '-502': BigInteger; + '-501': BigInteger; + '-500': BigInteger; + '-499': BigInteger; + '-498': BigInteger; + '-497': BigInteger; + '-496': BigInteger; + '-495': BigInteger; + '-494': BigInteger; + '-493': BigInteger; + '-492': BigInteger; + '-491': BigInteger; + '-490': BigInteger; + '-489': BigInteger; + '-488': BigInteger; + '-487': BigInteger; + '-486': BigInteger; + '-485': BigInteger; + '-484': BigInteger; + '-483': BigInteger; + '-482': BigInteger; + '-481': BigInteger; + '-480': BigInteger; + '-479': BigInteger; + '-478': BigInteger; + '-477': BigInteger; + '-476': BigInteger; + '-475': BigInteger; + '-474': BigInteger; + '-473': BigInteger; + '-472': BigInteger; + '-471': BigInteger; + '-470': BigInteger; + '-469': BigInteger; + '-468': BigInteger; + '-467': BigInteger; + '-466': BigInteger; + '-465': BigInteger; + '-464': BigInteger; + '-463': BigInteger; + '-462': BigInteger; + '-461': BigInteger; + '-460': BigInteger; + '-459': BigInteger; + '-458': BigInteger; + '-457': BigInteger; + '-456': BigInteger; + '-455': BigInteger; + '-454': BigInteger; + '-453': BigInteger; + '-452': BigInteger; + '-451': BigInteger; + '-450': BigInteger; + '-449': BigInteger; + '-448': BigInteger; + '-447': BigInteger; + '-446': BigInteger; + '-445': BigInteger; + '-444': BigInteger; + '-443': BigInteger; + '-442': BigInteger; + '-441': BigInteger; + '-440': BigInteger; + '-439': BigInteger; + '-438': BigInteger; + '-437': BigInteger; + '-436': BigInteger; + '-435': BigInteger; + '-434': BigInteger; + '-433': BigInteger; + '-432': BigInteger; + '-431': BigInteger; + '-430': BigInteger; + '-429': BigInteger; + '-428': BigInteger; + '-427': BigInteger; + '-426': BigInteger; + '-425': BigInteger; + '-424': BigInteger; + '-423': BigInteger; + '-422': BigInteger; + '-421': BigInteger; + '-420': BigInteger; + '-419': BigInteger; + '-418': BigInteger; + '-417': BigInteger; + '-416': BigInteger; + '-415': BigInteger; + '-414': BigInteger; + '-413': BigInteger; + '-412': BigInteger; + '-411': BigInteger; + '-410': BigInteger; + '-409': BigInteger; + '-408': BigInteger; + '-407': BigInteger; + '-406': BigInteger; + '-405': BigInteger; + '-404': BigInteger; + '-403': BigInteger; + '-402': BigInteger; + '-401': BigInteger; + '-400': BigInteger; + '-399': BigInteger; + '-398': BigInteger; + '-397': BigInteger; + '-396': BigInteger; + '-395': BigInteger; + '-394': BigInteger; + '-393': BigInteger; + '-392': BigInteger; + '-391': BigInteger; + '-390': BigInteger; + '-389': BigInteger; + '-388': BigInteger; + '-387': BigInteger; + '-386': BigInteger; + '-385': BigInteger; + '-384': BigInteger; + '-383': BigInteger; + '-382': BigInteger; + '-381': BigInteger; + '-380': BigInteger; + '-379': BigInteger; + '-378': BigInteger; + '-377': BigInteger; + '-376': BigInteger; + '-375': BigInteger; + '-374': BigInteger; + '-373': BigInteger; + '-372': BigInteger; + '-371': BigInteger; + '-370': BigInteger; + '-369': BigInteger; + '-368': BigInteger; + '-367': BigInteger; + '-366': BigInteger; + '-365': BigInteger; + '-364': BigInteger; + '-363': BigInteger; + '-362': BigInteger; + '-361': BigInteger; + '-360': BigInteger; + '-359': BigInteger; + '-358': BigInteger; + '-357': BigInteger; + '-356': BigInteger; + '-355': BigInteger; + '-354': BigInteger; + '-353': BigInteger; + '-352': BigInteger; + '-351': BigInteger; + '-350': BigInteger; + '-349': BigInteger; + '-348': BigInteger; + '-347': BigInteger; + '-346': BigInteger; + '-345': BigInteger; + '-344': BigInteger; + '-343': BigInteger; + '-342': BigInteger; + '-341': BigInteger; + '-340': BigInteger; + '-339': BigInteger; + '-338': BigInteger; + '-337': BigInteger; + '-336': BigInteger; + '-335': BigInteger; + '-334': BigInteger; + '-333': BigInteger; + '-332': BigInteger; + '-331': BigInteger; + '-330': BigInteger; + '-329': BigInteger; + '-328': BigInteger; + '-327': BigInteger; + '-326': BigInteger; + '-325': BigInteger; + '-324': BigInteger; + '-323': BigInteger; + '-322': BigInteger; + '-321': BigInteger; + '-320': BigInteger; + '-319': BigInteger; + '-318': BigInteger; + '-317': BigInteger; + '-316': BigInteger; + '-315': BigInteger; + '-314': BigInteger; + '-313': BigInteger; + '-312': BigInteger; + '-311': BigInteger; + '-310': BigInteger; + '-309': BigInteger; + '-308': BigInteger; + '-307': BigInteger; + '-306': BigInteger; + '-305': BigInteger; + '-304': BigInteger; + '-303': BigInteger; + '-302': BigInteger; + '-301': BigInteger; + '-300': BigInteger; + '-299': BigInteger; + '-298': BigInteger; + '-297': BigInteger; + '-296': BigInteger; + '-295': BigInteger; + '-294': BigInteger; + '-293': BigInteger; + '-292': BigInteger; + '-291': BigInteger; + '-290': BigInteger; + '-289': BigInteger; + '-288': BigInteger; + '-287': BigInteger; + '-286': BigInteger; + '-285': BigInteger; + '-284': BigInteger; + '-283': BigInteger; + '-282': BigInteger; + '-281': BigInteger; + '-280': BigInteger; + '-279': BigInteger; + '-278': BigInteger; + '-277': BigInteger; + '-276': BigInteger; + '-275': BigInteger; + '-274': BigInteger; + '-273': BigInteger; + '-272': BigInteger; + '-271': BigInteger; + '-270': BigInteger; + '-269': BigInteger; + '-268': BigInteger; + '-267': BigInteger; + '-266': BigInteger; + '-265': BigInteger; + '-264': BigInteger; + '-263': BigInteger; + '-262': BigInteger; + '-261': BigInteger; + '-260': BigInteger; + '-259': BigInteger; + '-258': BigInteger; + '-257': BigInteger; + '-256': BigInteger; + '-255': BigInteger; + '-254': BigInteger; + '-253': BigInteger; + '-252': BigInteger; + '-251': BigInteger; + '-250': BigInteger; + '-249': BigInteger; + '-248': BigInteger; + '-247': BigInteger; + '-246': BigInteger; + '-245': BigInteger; + '-244': BigInteger; + '-243': BigInteger; + '-242': BigInteger; + '-241': BigInteger; + '-240': BigInteger; + '-239': BigInteger; + '-238': BigInteger; + '-237': BigInteger; + '-236': BigInteger; + '-235': BigInteger; + '-234': BigInteger; + '-233': BigInteger; + '-232': BigInteger; + '-231': BigInteger; + '-230': BigInteger; + '-229': BigInteger; + '-228': BigInteger; + '-227': BigInteger; + '-226': BigInteger; + '-225': BigInteger; + '-224': BigInteger; + '-223': BigInteger; + '-222': BigInteger; + '-221': BigInteger; + '-220': BigInteger; + '-219': BigInteger; + '-218': BigInteger; + '-217': BigInteger; + '-216': BigInteger; + '-215': BigInteger; + '-214': BigInteger; + '-213': BigInteger; + '-212': BigInteger; + '-211': BigInteger; + '-210': BigInteger; + '-209': BigInteger; + '-208': BigInteger; + '-207': BigInteger; + '-206': BigInteger; + '-205': BigInteger; + '-204': BigInteger; + '-203': BigInteger; + '-202': BigInteger; + '-201': BigInteger; + '-200': BigInteger; + '-199': BigInteger; + '-198': BigInteger; + '-197': BigInteger; + '-196': BigInteger; + '-195': BigInteger; + '-194': BigInteger; + '-193': BigInteger; + '-192': BigInteger; + '-191': BigInteger; + '-190': BigInteger; + '-189': BigInteger; + '-188': BigInteger; + '-187': BigInteger; + '-186': BigInteger; + '-185': BigInteger; + '-184': BigInteger; + '-183': BigInteger; + '-182': BigInteger; + '-181': BigInteger; + '-180': BigInteger; + '-179': BigInteger; + '-178': BigInteger; + '-177': BigInteger; + '-176': BigInteger; + '-175': BigInteger; + '-174': BigInteger; + '-173': BigInteger; + '-172': BigInteger; + '-171': BigInteger; + '-170': BigInteger; + '-169': BigInteger; + '-168': BigInteger; + '-167': BigInteger; + '-166': BigInteger; + '-165': BigInteger; + '-164': BigInteger; + '-163': BigInteger; + '-162': BigInteger; + '-161': BigInteger; + '-160': BigInteger; + '-159': BigInteger; + '-158': BigInteger; + '-157': BigInteger; + '-156': BigInteger; + '-155': BigInteger; + '-154': BigInteger; + '-153': BigInteger; + '-152': BigInteger; + '-151': BigInteger; + '-150': BigInteger; + '-149': BigInteger; + '-148': BigInteger; + '-147': BigInteger; + '-146': BigInteger; + '-145': BigInteger; + '-144': BigInteger; + '-143': BigInteger; + '-142': BigInteger; + '-141': BigInteger; + '-140': BigInteger; + '-139': BigInteger; + '-138': BigInteger; + '-137': BigInteger; + '-136': BigInteger; + '-135': BigInteger; + '-134': BigInteger; + '-133': BigInteger; + '-132': BigInteger; + '-131': BigInteger; + '-130': BigInteger; + '-129': BigInteger; + '-128': BigInteger; + '-127': BigInteger; + '-126': BigInteger; + '-125': BigInteger; + '-124': BigInteger; + '-123': BigInteger; + '-122': BigInteger; + '-121': BigInteger; + '-120': BigInteger; + '-119': BigInteger; + '-118': BigInteger; + '-117': BigInteger; + '-116': BigInteger; + '-115': BigInteger; + '-114': BigInteger; + '-113': BigInteger; + '-112': BigInteger; + '-111': BigInteger; + '-110': BigInteger; + '-109': BigInteger; + '-108': BigInteger; + '-107': BigInteger; + '-106': BigInteger; + '-105': BigInteger; + '-104': BigInteger; + '-103': BigInteger; + '-102': BigInteger; + '-101': BigInteger; + '-100': BigInteger; + '-99': BigInteger; + '-98': BigInteger; + '-97': BigInteger; + '-96': BigInteger; + '-95': BigInteger; + '-94': BigInteger; + '-93': BigInteger; + '-92': BigInteger; + '-91': BigInteger; + '-90': BigInteger; + '-89': BigInteger; + '-88': BigInteger; + '-87': BigInteger; + '-86': BigInteger; + '-85': BigInteger; + '-84': BigInteger; + '-83': BigInteger; + '-82': BigInteger; + '-81': BigInteger; + '-80': BigInteger; + '-79': BigInteger; + '-78': BigInteger; + '-77': BigInteger; + '-76': BigInteger; + '-75': BigInteger; + '-74': BigInteger; + '-73': BigInteger; + '-72': BigInteger; + '-71': BigInteger; + '-70': BigInteger; + '-69': BigInteger; + '-68': BigInteger; + '-67': BigInteger; + '-66': BigInteger; + '-65': BigInteger; + '-64': BigInteger; + '-63': BigInteger; + '-62': BigInteger; + '-61': BigInteger; + '-60': BigInteger; + '-59': BigInteger; + '-58': BigInteger; + '-57': BigInteger; + '-56': BigInteger; + '-55': BigInteger; + '-54': BigInteger; + '-53': BigInteger; + '-52': BigInteger; + '-51': BigInteger; + '-50': BigInteger; + '-49': BigInteger; + '-48': BigInteger; + '-47': BigInteger; + '-46': BigInteger; + '-45': BigInteger; + '-44': BigInteger; + '-43': BigInteger; + '-42': BigInteger; + '-41': BigInteger; + '-40': BigInteger; + '-39': BigInteger; + '-38': BigInteger; + '-37': BigInteger; + '-36': BigInteger; + '-35': BigInteger; + '-34': BigInteger; + '-33': BigInteger; + '-32': BigInteger; + '-31': BigInteger; + '-30': BigInteger; + '-29': BigInteger; + '-28': BigInteger; + '-27': BigInteger; + '-26': BigInteger; + '-25': BigInteger; + '-24': BigInteger; + '-23': BigInteger; + '-22': BigInteger; + '-21': BigInteger; + '-20': BigInteger; + '-19': BigInteger; + '-18': BigInteger; + '-17': BigInteger; + '-16': BigInteger; + '-15': BigInteger; + '-14': BigInteger; + '-13': BigInteger; + '-12': BigInteger; + '-11': BigInteger; + '-10': BigInteger; + '-9': BigInteger; + '-8': BigInteger; + '-7': BigInteger; + '-6': BigInteger; + '-5': BigInteger; + '-4': BigInteger; + '-3': BigInteger; + '-2': BigInteger; + '-1': BigInteger; + '0': BigInteger; + '1': BigInteger; + '2': BigInteger; + '3': BigInteger; + '4': BigInteger; + '5': BigInteger; + '6': BigInteger; + '7': BigInteger; + '8': BigInteger; + '9': BigInteger; + '10': BigInteger; + '11': BigInteger; + '12': BigInteger; + '13': BigInteger; + '14': BigInteger; + '15': BigInteger; + '16': BigInteger; + '17': BigInteger; + '18': BigInteger; + '19': BigInteger; + '20': BigInteger; + '21': BigInteger; + '22': BigInteger; + '23': BigInteger; + '24': BigInteger; + '25': BigInteger; + '26': BigInteger; + '27': BigInteger; + '28': BigInteger; + '29': BigInteger; + '30': BigInteger; + '31': BigInteger; + '32': BigInteger; + '33': BigInteger; + '34': BigInteger; + '35': BigInteger; + '36': BigInteger; + '37': BigInteger; + '38': BigInteger; + '39': BigInteger; + '40': BigInteger; + '41': BigInteger; + '42': BigInteger; + '43': BigInteger; + '44': BigInteger; + '45': BigInteger; + '46': BigInteger; + '47': BigInteger; + '48': BigInteger; + '49': BigInteger; + '50': BigInteger; + '51': BigInteger; + '52': BigInteger; + '53': BigInteger; + '54': BigInteger; + '55': BigInteger; + '56': BigInteger; + '57': BigInteger; + '58': BigInteger; + '59': BigInteger; + '60': BigInteger; + '61': BigInteger; + '62': BigInteger; + '63': BigInteger; + '64': BigInteger; + '65': BigInteger; + '66': BigInteger; + '67': BigInteger; + '68': BigInteger; + '69': BigInteger; + '70': BigInteger; + '71': BigInteger; + '72': BigInteger; + '73': BigInteger; + '74': BigInteger; + '75': BigInteger; + '76': BigInteger; + '77': BigInteger; + '78': BigInteger; + '79': BigInteger; + '80': BigInteger; + '81': BigInteger; + '82': BigInteger; + '83': BigInteger; + '84': BigInteger; + '85': BigInteger; + '86': BigInteger; + '87': BigInteger; + '88': BigInteger; + '89': BigInteger; + '90': BigInteger; + '91': BigInteger; + '92': BigInteger; + '93': BigInteger; + '94': BigInteger; + '95': BigInteger; + '96': BigInteger; + '97': BigInteger; + '98': BigInteger; + '99': BigInteger; + '100': BigInteger; + '101': BigInteger; + '102': BigInteger; + '103': BigInteger; + '104': BigInteger; + '105': BigInteger; + '106': BigInteger; + '107': BigInteger; + '108': BigInteger; + '109': BigInteger; + '110': BigInteger; + '111': BigInteger; + '112': BigInteger; + '113': BigInteger; + '114': BigInteger; + '115': BigInteger; + '116': BigInteger; + '117': BigInteger; + '118': BigInteger; + '119': BigInteger; + '120': BigInteger; + '121': BigInteger; + '122': BigInteger; + '123': BigInteger; + '124': BigInteger; + '125': BigInteger; + '126': BigInteger; + '127': BigInteger; + '128': BigInteger; + '129': BigInteger; + '130': BigInteger; + '131': BigInteger; + '132': BigInteger; + '133': BigInteger; + '134': BigInteger; + '135': BigInteger; + '136': BigInteger; + '137': BigInteger; + '138': BigInteger; + '139': BigInteger; + '140': BigInteger; + '141': BigInteger; + '142': BigInteger; + '143': BigInteger; + '144': BigInteger; + '145': BigInteger; + '146': BigInteger; + '147': BigInteger; + '148': BigInteger; + '149': BigInteger; + '150': BigInteger; + '151': BigInteger; + '152': BigInteger; + '153': BigInteger; + '154': BigInteger; + '155': BigInteger; + '156': BigInteger; + '157': BigInteger; + '158': BigInteger; + '159': BigInteger; + '160': BigInteger; + '161': BigInteger; + '162': BigInteger; + '163': BigInteger; + '164': BigInteger; + '165': BigInteger; + '166': BigInteger; + '167': BigInteger; + '168': BigInteger; + '169': BigInteger; + '170': BigInteger; + '171': BigInteger; + '172': BigInteger; + '173': BigInteger; + '174': BigInteger; + '175': BigInteger; + '176': BigInteger; + '177': BigInteger; + '178': BigInteger; + '179': BigInteger; + '180': BigInteger; + '181': BigInteger; + '182': BigInteger; + '183': BigInteger; + '184': BigInteger; + '185': BigInteger; + '186': BigInteger; + '187': BigInteger; + '188': BigInteger; + '189': BigInteger; + '190': BigInteger; + '191': BigInteger; + '192': BigInteger; + '193': BigInteger; + '194': BigInteger; + '195': BigInteger; + '196': BigInteger; + '197': BigInteger; + '198': BigInteger; + '199': BigInteger; + '200': BigInteger; + '201': BigInteger; + '202': BigInteger; + '203': BigInteger; + '204': BigInteger; + '205': BigInteger; + '206': BigInteger; + '207': BigInteger; + '208': BigInteger; + '209': BigInteger; + '210': BigInteger; + '211': BigInteger; + '212': BigInteger; + '213': BigInteger; + '214': BigInteger; + '215': BigInteger; + '216': BigInteger; + '217': BigInteger; + '218': BigInteger; + '219': BigInteger; + '220': BigInteger; + '221': BigInteger; + '222': BigInteger; + '223': BigInteger; + '224': BigInteger; + '225': BigInteger; + '226': BigInteger; + '227': BigInteger; + '228': BigInteger; + '229': BigInteger; + '230': BigInteger; + '231': BigInteger; + '232': BigInteger; + '233': BigInteger; + '234': BigInteger; + '235': BigInteger; + '236': BigInteger; + '237': BigInteger; + '238': BigInteger; + '239': BigInteger; + '240': BigInteger; + '241': BigInteger; + '242': BigInteger; + '243': BigInteger; + '244': BigInteger; + '245': BigInteger; + '246': BigInteger; + '247': BigInteger; + '248': BigInteger; + '249': BigInteger; + '250': BigInteger; + '251': BigInteger; + '252': BigInteger; + '253': BigInteger; + '254': BigInteger; + '255': BigInteger; + '256': BigInteger; + '257': BigInteger; + '258': BigInteger; + '259': BigInteger; + '260': BigInteger; + '261': BigInteger; + '262': BigInteger; + '263': BigInteger; + '264': BigInteger; + '265': BigInteger; + '266': BigInteger; + '267': BigInteger; + '268': BigInteger; + '269': BigInteger; + '270': BigInteger; + '271': BigInteger; + '272': BigInteger; + '273': BigInteger; + '274': BigInteger; + '275': BigInteger; + '276': BigInteger; + '277': BigInteger; + '278': BigInteger; + '279': BigInteger; + '280': BigInteger; + '281': BigInteger; + '282': BigInteger; + '283': BigInteger; + '284': BigInteger; + '285': BigInteger; + '286': BigInteger; + '287': BigInteger; + '288': BigInteger; + '289': BigInteger; + '290': BigInteger; + '291': BigInteger; + '292': BigInteger; + '293': BigInteger; + '294': BigInteger; + '295': BigInteger; + '296': BigInteger; + '297': BigInteger; + '298': BigInteger; + '299': BigInteger; + '300': BigInteger; + '301': BigInteger; + '302': BigInteger; + '303': BigInteger; + '304': BigInteger; + '305': BigInteger; + '306': BigInteger; + '307': BigInteger; + '308': BigInteger; + '309': BigInteger; + '310': BigInteger; + '311': BigInteger; + '312': BigInteger; + '313': BigInteger; + '314': BigInteger; + '315': BigInteger; + '316': BigInteger; + '317': BigInteger; + '318': BigInteger; + '319': BigInteger; + '320': BigInteger; + '321': BigInteger; + '322': BigInteger; + '323': BigInteger; + '324': BigInteger; + '325': BigInteger; + '326': BigInteger; + '327': BigInteger; + '328': BigInteger; + '329': BigInteger; + '330': BigInteger; + '331': BigInteger; + '332': BigInteger; + '333': BigInteger; + '334': BigInteger; + '335': BigInteger; + '336': BigInteger; + '337': BigInteger; + '338': BigInteger; + '339': BigInteger; + '340': BigInteger; + '341': BigInteger; + '342': BigInteger; + '343': BigInteger; + '344': BigInteger; + '345': BigInteger; + '346': BigInteger; + '347': BigInteger; + '348': BigInteger; + '349': BigInteger; + '350': BigInteger; + '351': BigInteger; + '352': BigInteger; + '353': BigInteger; + '354': BigInteger; + '355': BigInteger; + '356': BigInteger; + '357': BigInteger; + '358': BigInteger; + '359': BigInteger; + '360': BigInteger; + '361': BigInteger; + '362': BigInteger; + '363': BigInteger; + '364': BigInteger; + '365': BigInteger; + '366': BigInteger; + '367': BigInteger; + '368': BigInteger; + '369': BigInteger; + '370': BigInteger; + '371': BigInteger; + '372': BigInteger; + '373': BigInteger; + '374': BigInteger; + '375': BigInteger; + '376': BigInteger; + '377': BigInteger; + '378': BigInteger; + '379': BigInteger; + '380': BigInteger; + '381': BigInteger; + '382': BigInteger; + '383': BigInteger; + '384': BigInteger; + '385': BigInteger; + '386': BigInteger; + '387': BigInteger; + '388': BigInteger; + '389': BigInteger; + '390': BigInteger; + '391': BigInteger; + '392': BigInteger; + '393': BigInteger; + '394': BigInteger; + '395': BigInteger; + '396': BigInteger; + '397': BigInteger; + '398': BigInteger; + '399': BigInteger; + '400': BigInteger; + '401': BigInteger; + '402': BigInteger; + '403': BigInteger; + '404': BigInteger; + '405': BigInteger; + '406': BigInteger; + '407': BigInteger; + '408': BigInteger; + '409': BigInteger; + '410': BigInteger; + '411': BigInteger; + '412': BigInteger; + '413': BigInteger; + '414': BigInteger; + '415': BigInteger; + '416': BigInteger; + '417': BigInteger; + '418': BigInteger; + '419': BigInteger; + '420': BigInteger; + '421': BigInteger; + '422': BigInteger; + '423': BigInteger; + '424': BigInteger; + '425': BigInteger; + '426': BigInteger; + '427': BigInteger; + '428': BigInteger; + '429': BigInteger; + '430': BigInteger; + '431': BigInteger; + '432': BigInteger; + '433': BigInteger; + '434': BigInteger; + '435': BigInteger; + '436': BigInteger; + '437': BigInteger; + '438': BigInteger; + '439': BigInteger; + '440': BigInteger; + '441': BigInteger; + '442': BigInteger; + '443': BigInteger; + '444': BigInteger; + '445': BigInteger; + '446': BigInteger; + '447': BigInteger; + '448': BigInteger; + '449': BigInteger; + '450': BigInteger; + '451': BigInteger; + '452': BigInteger; + '453': BigInteger; + '454': BigInteger; + '455': BigInteger; + '456': BigInteger; + '457': BigInteger; + '458': BigInteger; + '459': BigInteger; + '460': BigInteger; + '461': BigInteger; + '462': BigInteger; + '463': BigInteger; + '464': BigInteger; + '465': BigInteger; + '466': BigInteger; + '467': BigInteger; + '468': BigInteger; + '469': BigInteger; + '470': BigInteger; + '471': BigInteger; + '472': BigInteger; + '473': BigInteger; + '474': BigInteger; + '475': BigInteger; + '476': BigInteger; + '477': BigInteger; + '478': BigInteger; + '479': BigInteger; + '480': BigInteger; + '481': BigInteger; + '482': BigInteger; + '483': BigInteger; + '484': BigInteger; + '485': BigInteger; + '486': BigInteger; + '487': BigInteger; + '488': BigInteger; + '489': BigInteger; + '490': BigInteger; + '491': BigInteger; + '492': BigInteger; + '493': BigInteger; + '494': BigInteger; + '495': BigInteger; + '496': BigInteger; + '497': BigInteger; + '498': BigInteger; + '499': BigInteger; + '500': BigInteger; + '501': BigInteger; + '502': BigInteger; + '503': BigInteger; + '504': BigInteger; + '505': BigInteger; + '506': BigInteger; + '507': BigInteger; + '508': BigInteger; + '509': BigInteger; + '510': BigInteger; + '511': BigInteger; + '512': BigInteger; + '513': BigInteger; + '514': BigInteger; + '515': BigInteger; + '516': BigInteger; + '517': BigInteger; + '518': BigInteger; + '519': BigInteger; + '520': BigInteger; + '521': BigInteger; + '522': BigInteger; + '523': BigInteger; + '524': BigInteger; + '525': BigInteger; + '526': BigInteger; + '527': BigInteger; + '528': BigInteger; + '529': BigInteger; + '530': BigInteger; + '531': BigInteger; + '532': BigInteger; + '533': BigInteger; + '534': BigInteger; + '535': BigInteger; + '536': BigInteger; + '537': BigInteger; + '538': BigInteger; + '539': BigInteger; + '540': BigInteger; + '541': BigInteger; + '542': BigInteger; + '543': BigInteger; + '544': BigInteger; + '545': BigInteger; + '546': BigInteger; + '547': BigInteger; + '548': BigInteger; + '549': BigInteger; + '550': BigInteger; + '551': BigInteger; + '552': BigInteger; + '553': BigInteger; + '554': BigInteger; + '555': BigInteger; + '556': BigInteger; + '557': BigInteger; + '558': BigInteger; + '559': BigInteger; + '560': BigInteger; + '561': BigInteger; + '562': BigInteger; + '563': BigInteger; + '564': BigInteger; + '565': BigInteger; + '566': BigInteger; + '567': BigInteger; + '568': BigInteger; + '569': BigInteger; + '570': BigInteger; + '571': BigInteger; + '572': BigInteger; + '573': BigInteger; + '574': BigInteger; + '575': BigInteger; + '576': BigInteger; + '577': BigInteger; + '578': BigInteger; + '579': BigInteger; + '580': BigInteger; + '581': BigInteger; + '582': BigInteger; + '583': BigInteger; + '584': BigInteger; + '585': BigInteger; + '586': BigInteger; + '587': BigInteger; + '588': BigInteger; + '589': BigInteger; + '590': BigInteger; + '591': BigInteger; + '592': BigInteger; + '593': BigInteger; + '594': BigInteger; + '595': BigInteger; + '596': BigInteger; + '597': BigInteger; + '598': BigInteger; + '599': BigInteger; + '600': BigInteger; + '601': BigInteger; + '602': BigInteger; + '603': BigInteger; + '604': BigInteger; + '605': BigInteger; + '606': BigInteger; + '607': BigInteger; + '608': BigInteger; + '609': BigInteger; + '610': BigInteger; + '611': BigInteger; + '612': BigInteger; + '613': BigInteger; + '614': BigInteger; + '615': BigInteger; + '616': BigInteger; + '617': BigInteger; + '618': BigInteger; + '619': BigInteger; + '620': BigInteger; + '621': BigInteger; + '622': BigInteger; + '623': BigInteger; + '624': BigInteger; + '625': BigInteger; + '626': BigInteger; + '627': BigInteger; + '628': BigInteger; + '629': BigInteger; + '630': BigInteger; + '631': BigInteger; + '632': BigInteger; + '633': BigInteger; + '634': BigInteger; + '635': BigInteger; + '636': BigInteger; + '637': BigInteger; + '638': BigInteger; + '639': BigInteger; + '640': BigInteger; + '641': BigInteger; + '642': BigInteger; + '643': BigInteger; + '644': BigInteger; + '645': BigInteger; + '646': BigInteger; + '647': BigInteger; + '648': BigInteger; + '649': BigInteger; + '650': BigInteger; + '651': BigInteger; + '652': BigInteger; + '653': BigInteger; + '654': BigInteger; + '655': BigInteger; + '656': BigInteger; + '657': BigInteger; + '658': BigInteger; + '659': BigInteger; + '660': BigInteger; + '661': BigInteger; + '662': BigInteger; + '663': BigInteger; + '664': BigInteger; + '665': BigInteger; + '666': BigInteger; + '667': BigInteger; + '668': BigInteger; + '669': BigInteger; + '670': BigInteger; + '671': BigInteger; + '672': BigInteger; + '673': BigInteger; + '674': BigInteger; + '675': BigInteger; + '676': BigInteger; + '677': BigInteger; + '678': BigInteger; + '679': BigInteger; + '680': BigInteger; + '681': BigInteger; + '682': BigInteger; + '683': BigInteger; + '684': BigInteger; + '685': BigInteger; + '686': BigInteger; + '687': BigInteger; + '688': BigInteger; + '689': BigInteger; + '690': BigInteger; + '691': BigInteger; + '692': BigInteger; + '693': BigInteger; + '694': BigInteger; + '695': BigInteger; + '696': BigInteger; + '697': BigInteger; + '698': BigInteger; + '699': BigInteger; + '700': BigInteger; + '701': BigInteger; + '702': BigInteger; + '703': BigInteger; + '704': BigInteger; + '705': BigInteger; + '706': BigInteger; + '707': BigInteger; + '708': BigInteger; + '709': BigInteger; + '710': BigInteger; + '711': BigInteger; + '712': BigInteger; + '713': BigInteger; + '714': BigInteger; + '715': BigInteger; + '716': BigInteger; + '717': BigInteger; + '718': BigInteger; + '719': BigInteger; + '720': BigInteger; + '721': BigInteger; + '722': BigInteger; + '723': BigInteger; + '724': BigInteger; + '725': BigInteger; + '726': BigInteger; + '727': BigInteger; + '728': BigInteger; + '729': BigInteger; + '730': BigInteger; + '731': BigInteger; + '732': BigInteger; + '733': BigInteger; + '734': BigInteger; + '735': BigInteger; + '736': BigInteger; + '737': BigInteger; + '738': BigInteger; + '739': BigInteger; + '740': BigInteger; + '741': BigInteger; + '742': BigInteger; + '743': BigInteger; + '744': BigInteger; + '745': BigInteger; + '746': BigInteger; + '747': BigInteger; + '748': BigInteger; + '749': BigInteger; + '750': BigInteger; + '751': BigInteger; + '752': BigInteger; + '753': BigInteger; + '754': BigInteger; + '755': BigInteger; + '756': BigInteger; + '757': BigInteger; + '758': BigInteger; + '759': BigInteger; + '760': BigInteger; + '761': BigInteger; + '762': BigInteger; + '763': BigInteger; + '764': BigInteger; + '765': BigInteger; + '766': BigInteger; + '767': BigInteger; + '768': BigInteger; + '769': BigInteger; + '770': BigInteger; + '771': BigInteger; + '772': BigInteger; + '773': BigInteger; + '774': BigInteger; + '775': BigInteger; + '776': BigInteger; + '777': BigInteger; + '778': BigInteger; + '779': BigInteger; + '780': BigInteger; + '781': BigInteger; + '782': BigInteger; + '783': BigInteger; + '784': BigInteger; + '785': BigInteger; + '786': BigInteger; + '787': BigInteger; + '788': BigInteger; + '789': BigInteger; + '790': BigInteger; + '791': BigInteger; + '792': BigInteger; + '793': BigInteger; + '794': BigInteger; + '795': BigInteger; + '796': BigInteger; + '797': BigInteger; + '798': BigInteger; + '799': BigInteger; + '800': BigInteger; + '801': BigInteger; + '802': BigInteger; + '803': BigInteger; + '804': BigInteger; + '805': BigInteger; + '806': BigInteger; + '807': BigInteger; + '808': BigInteger; + '809': BigInteger; + '810': BigInteger; + '811': BigInteger; + '812': BigInteger; + '813': BigInteger; + '814': BigInteger; + '815': BigInteger; + '816': BigInteger; + '817': BigInteger; + '818': BigInteger; + '819': BigInteger; + '820': BigInteger; + '821': BigInteger; + '822': BigInteger; + '823': BigInteger; + '824': BigInteger; + '825': BigInteger; + '826': BigInteger; + '827': BigInteger; + '828': BigInteger; + '829': BigInteger; + '830': BigInteger; + '831': BigInteger; + '832': BigInteger; + '833': BigInteger; + '834': BigInteger; + '835': BigInteger; + '836': BigInteger; + '837': BigInteger; + '838': BigInteger; + '839': BigInteger; + '840': BigInteger; + '841': BigInteger; + '842': BigInteger; + '843': BigInteger; + '844': BigInteger; + '845': BigInteger; + '846': BigInteger; + '847': BigInteger; + '848': BigInteger; + '849': BigInteger; + '850': BigInteger; + '851': BigInteger; + '852': BigInteger; + '853': BigInteger; + '854': BigInteger; + '855': BigInteger; + '856': BigInteger; + '857': BigInteger; + '858': BigInteger; + '859': BigInteger; + '860': BigInteger; + '861': BigInteger; + '862': BigInteger; + '863': BigInteger; + '864': BigInteger; + '865': BigInteger; + '866': BigInteger; + '867': BigInteger; + '868': BigInteger; + '869': BigInteger; + '870': BigInteger; + '871': BigInteger; + '872': BigInteger; + '873': BigInteger; + '874': BigInteger; + '875': BigInteger; + '876': BigInteger; + '877': BigInteger; + '878': BigInteger; + '879': BigInteger; + '880': BigInteger; + '881': BigInteger; + '882': BigInteger; + '883': BigInteger; + '884': BigInteger; + '885': BigInteger; + '886': BigInteger; + '887': BigInteger; + '888': BigInteger; + '889': BigInteger; + '890': BigInteger; + '891': BigInteger; + '892': BigInteger; + '893': BigInteger; + '894': BigInteger; + '895': BigInteger; + '896': BigInteger; + '897': BigInteger; + '898': BigInteger; + '899': BigInteger; + '900': BigInteger; + '901': BigInteger; + '902': BigInteger; + '903': BigInteger; + '904': BigInteger; + '905': BigInteger; + '906': BigInteger; + '907': BigInteger; + '908': BigInteger; + '909': BigInteger; + '910': BigInteger; + '911': BigInteger; + '912': BigInteger; + '913': BigInteger; + '914': BigInteger; + '915': BigInteger; + '916': BigInteger; + '917': BigInteger; + '918': BigInteger; + '919': BigInteger; + '920': BigInteger; + '921': BigInteger; + '922': BigInteger; + '923': BigInteger; + '924': BigInteger; + '925': BigInteger; + '926': BigInteger; + '927': BigInteger; + '928': BigInteger; + '929': BigInteger; + '930': BigInteger; + '931': BigInteger; + '932': BigInteger; + '933': BigInteger; + '934': BigInteger; + '935': BigInteger; + '936': BigInteger; + '937': BigInteger; + '938': BigInteger; + '939': BigInteger; + '940': BigInteger; + '941': BigInteger; + '942': BigInteger; + '943': BigInteger; + '944': BigInteger; + '945': BigInteger; + '946': BigInteger; + '947': BigInteger; + '948': BigInteger; + '949': BigInteger; + '950': BigInteger; + '951': BigInteger; + '952': BigInteger; + '953': BigInteger; + '954': BigInteger; + '955': BigInteger; + '956': BigInteger; + '957': BigInteger; + '958': BigInteger; + '959': BigInteger; + '960': BigInteger; + '961': BigInteger; + '962': BigInteger; + '963': BigInteger; + '964': BigInteger; + '965': BigInteger; + '966': BigInteger; + '967': BigInteger; + '968': BigInteger; + '969': BigInteger; + '970': BigInteger; + '971': BigInteger; + '972': BigInteger; + '973': BigInteger; + '974': BigInteger; + '975': BigInteger; + '976': BigInteger; + '977': BigInteger; + '978': BigInteger; + '979': BigInteger; + '980': BigInteger; + '981': BigInteger; + '982': BigInteger; + '983': BigInteger; + '984': BigInteger; + '985': BigInteger; + '986': BigInteger; + '987': BigInteger; + '988': BigInteger; + '989': BigInteger; + '990': BigInteger; + '991': BigInteger; + '992': BigInteger; + '993': BigInteger; + '994': BigInteger; + '995': BigInteger; + '996': BigInteger; + '997': BigInteger; + '998': BigInteger; + '999': BigInteger; + } +} diff --git a/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/big-integer/BigInteger.js b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/big-integer/BigInteger.js new file mode 100644 index 00000000..bcb7eb46 --- /dev/null +++ b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/big-integer/BigInteger.js @@ -0,0 +1,1251 @@ +var bigInt = (function (undefined) { + "use strict"; + + var BASE = 1e7, + LOG_BASE = 7, + MAX_INT = 9007199254740992, + MAX_INT_ARR = smallToArray(MAX_INT), + LOG_MAX_INT = Math.log(MAX_INT); + + function Integer(v, radix) { + if (typeof v === "undefined") return Integer[0]; + if (typeof radix !== "undefined") return +radix === 10 ? parseValue(v) : parseBase(v, radix); + return parseValue(v); + } + + function BigInteger(value, sign) { + this.value = value; + this.sign = sign; + this.isSmall = false; + } + BigInteger.prototype = Object.create(Integer.prototype); + + function SmallInteger(value) { + this.value = value; + this.sign = value < 0; + this.isSmall = true; + } + SmallInteger.prototype = Object.create(Integer.prototype); + + function isPrecise(n) { + return -MAX_INT < n && n < MAX_INT; + } + + function smallToArray(n) { // For performance reasons doesn't reference BASE, need to change this function if BASE changes + if (n < 1e7) + return [n]; + if (n < 1e14) + return [n % 1e7, Math.floor(n / 1e7)]; + return [n % 1e7, Math.floor(n / 1e7) % 1e7, Math.floor(n / 1e14)]; + } + + function arrayToSmall(arr) { // If BASE changes this function may need to change + trim(arr); + var length = arr.length; + if (length < 4 && compareAbs(arr, MAX_INT_ARR) < 0) { + switch (length) { + case 0: return 0; + case 1: return arr[0]; + case 2: return arr[0] + arr[1] * BASE; + default: return arr[0] + (arr[1] + arr[2] * BASE) * BASE; + } + } + return arr; + } + + function trim(v) { + var i = v.length; + while (v[--i] === 0); + v.length = i + 1; + } + + function createArray(length) { // function shamelessly stolen from Yaffle's library https://github.com/Yaffle/BigInteger + var x = new Array(length); + var i = -1; + while (++i < length) { + x[i] = 0; + } + return x; + } + + function truncate(n) { + if (n > 0) return Math.floor(n); + return Math.ceil(n); + } + + function add(a, b) { // assumes a and b are arrays with a.length >= b.length + var l_a = a.length, + l_b = b.length, + r = new Array(l_a), + carry = 0, + base = BASE, + sum, i; + for (i = 0; i < l_b; i++) { + sum = a[i] + b[i] + carry; + carry = sum >= base ? 1 : 0; + r[i] = sum - carry * base; + } + while (i < l_a) { + sum = a[i] + carry; + carry = sum === base ? 1 : 0; + r[i++] = sum - carry * base; + } + if (carry > 0) r.push(carry); + return r; + } + + function addAny(a, b) { + if (a.length >= b.length) return add(a, b); + return add(b, a); + } + + function addSmall(a, carry) { // assumes a is array, carry is number with 0 <= carry < MAX_INT + var l = a.length, + r = new Array(l), + base = BASE, + sum, i; + for (i = 0; i < l; i++) { + sum = a[i] - base + carry; + carry = Math.floor(sum / base); + r[i] = sum - carry * base; + carry += 1; + } + while (carry > 0) { + r[i++] = carry % base; + carry = Math.floor(carry / base); + } + return r; + } + + BigInteger.prototype.add = function (v) { + var n = parseValue(v); + if (this.sign !== n.sign) { + return this.subtract(n.negate()); + } + var a = this.value, b = n.value; + if (n.isSmall) { + return new BigInteger(addSmall(a, Math.abs(b)), this.sign); + } + return new BigInteger(addAny(a, b), this.sign); + }; + BigInteger.prototype.plus = BigInteger.prototype.add; + + SmallInteger.prototype.add = function (v) { + var n = parseValue(v); + var a = this.value; + if (a < 0 !== n.sign) { + return this.subtract(n.negate()); + } + var b = n.value; + if (n.isSmall) { + if (isPrecise(a + b)) return new SmallInteger(a + b); + b = smallToArray(Math.abs(b)); + } + return new BigInteger(addSmall(b, Math.abs(a)), a < 0); + }; + SmallInteger.prototype.plus = SmallInteger.prototype.add; + + function subtract(a, b) { // assumes a and b are arrays with a >= b + var a_l = a.length, + b_l = b.length, + r = new Array(a_l), + borrow = 0, + base = BASE, + i, difference; + for (i = 0; i < b_l; i++) { + difference = a[i] - borrow - b[i]; + if (difference < 0) { + difference += base; + borrow = 1; + } else borrow = 0; + r[i] = difference; + } + for (i = b_l; i < a_l; i++) { + difference = a[i] - borrow; + if (difference < 0) difference += base; + else { + r[i++] = difference; + break; + } + r[i] = difference; + } + for (; i < a_l; i++) { + r[i] = a[i]; + } + trim(r); + return r; + } + + function subtractAny(a, b, sign) { + var value; + if (compareAbs(a, b) >= 0) { + value = subtract(a,b); + } else { + value = subtract(b, a); + sign = !sign; + } + value = arrayToSmall(value); + if (typeof value === "number") { + if (sign) value = -value; + return new SmallInteger(value); + } + return new BigInteger(value, sign); + } + + function subtractSmall(a, b, sign) { // assumes a is array, b is number with 0 <= b < MAX_INT + var l = a.length, + r = new Array(l), + carry = -b, + base = BASE, + i, difference; + for (i = 0; i < l; i++) { + difference = a[i] + carry; + carry = Math.floor(difference / base); + difference %= base; + r[i] = difference < 0 ? difference + base : difference; + } + r = arrayToSmall(r); + if (typeof r === "number") { + if (sign) r = -r; + return new SmallInteger(r); + } return new BigInteger(r, sign); + } + + BigInteger.prototype.subtract = function (v) { + var n = parseValue(v); + if (this.sign !== n.sign) { + return this.add(n.negate()); + } + var a = this.value, b = n.value; + if (n.isSmall) + return subtractSmall(a, Math.abs(b), this.sign); + return subtractAny(a, b, this.sign); + }; + BigInteger.prototype.minus = BigInteger.prototype.subtract; + + SmallInteger.prototype.subtract = function (v) { + var n = parseValue(v); + var a = this.value; + if (a < 0 !== n.sign) { + return this.add(n.negate()); + } + var b = n.value; + if (n.isSmall) { + return new SmallInteger(a - b); + } + return subtractSmall(b, Math.abs(a), a >= 0); + }; + SmallInteger.prototype.minus = SmallInteger.prototype.subtract; + + BigInteger.prototype.negate = function () { + return new BigInteger(this.value, !this.sign); + }; + SmallInteger.prototype.negate = function () { + var sign = this.sign; + var small = new SmallInteger(-this.value); + small.sign = !sign; + return small; + }; + + BigInteger.prototype.abs = function () { + return new BigInteger(this.value, false); + }; + SmallInteger.prototype.abs = function () { + return new SmallInteger(Math.abs(this.value)); + }; + + function multiplyLong(a, b) { + var a_l = a.length, + b_l = b.length, + l = a_l + b_l, + r = createArray(l), + base = BASE, + product, carry, i, a_i, b_j; + for (i = 0; i < a_l; ++i) { + a_i = a[i]; + for (var j = 0; j < b_l; ++j) { + b_j = b[j]; + product = a_i * b_j + r[i + j]; + carry = Math.floor(product / base); + r[i + j] = product - carry * base; + r[i + j + 1] += carry; + } + } + trim(r); + return r; + } + + function multiplySmall(a, b) { // assumes a is array, b is number with |b| < BASE + var l = a.length, + r = new Array(l), + base = BASE, + carry = 0, + product, i; + for (i = 0; i < l; i++) { + product = a[i] * b + carry; + carry = Math.floor(product / base); + r[i] = product - carry * base; + } + while (carry > 0) { + r[i++] = carry % base; + carry = Math.floor(carry / base); + } + return r; + } + + function shiftLeft(x, n) { + var r = []; + while (n-- > 0) r.push(0); + return r.concat(x); + } + + function multiplyKaratsuba(x, y) { + var n = Math.max(x.length, y.length); + + if (n <= 30) return multiplyLong(x, y); + n = Math.ceil(n / 2); + + var b = x.slice(n), + a = x.slice(0, n), + d = y.slice(n), + c = y.slice(0, n); + + var ac = multiplyKaratsuba(a, c), + bd = multiplyKaratsuba(b, d), + abcd = multiplyKaratsuba(addAny(a, b), addAny(c, d)); + + var product = addAny(addAny(ac, shiftLeft(subtract(subtract(abcd, ac), bd), n)), shiftLeft(bd, 2 * n)); + trim(product); + return product; + } + + // The following function is derived from a surface fit of a graph plotting the performance difference + // between long multiplication and karatsuba multiplication versus the lengths of the two arrays. + function useKaratsuba(l1, l2) { + return -0.012 * l1 - 0.012 * l2 + 0.000015 * l1 * l2 > 0; + } + + BigInteger.prototype.multiply = function (v) { + var n = parseValue(v), + a = this.value, b = n.value, + sign = this.sign !== n.sign, + abs; + if (n.isSmall) { + if (b === 0) return Integer[0]; + if (b === 1) return this; + if (b === -1) return this.negate(); + abs = Math.abs(b); + if (abs < BASE) { + return new BigInteger(multiplySmall(a, abs), sign); + } + b = smallToArray(abs); + } + if (useKaratsuba(a.length, b.length)) // Karatsuba is only faster for certain array sizes + return new BigInteger(multiplyKaratsuba(a, b), sign); + return new BigInteger(multiplyLong(a, b), sign); + }; + + BigInteger.prototype.times = BigInteger.prototype.multiply; + + function multiplySmallAndArray(a, b, sign) { // a >= 0 + if (a < BASE) { + return new BigInteger(multiplySmall(b, a), sign); + } + return new BigInteger(multiplyLong(b, smallToArray(a)), sign); + } + SmallInteger.prototype._multiplyBySmall = function (a) { + if (isPrecise(a.value * this.value)) { + return new SmallInteger(a.value * this.value); + } + return multiplySmallAndArray(Math.abs(a.value), smallToArray(Math.abs(this.value)), this.sign !== a.sign); + }; + BigInteger.prototype._multiplyBySmall = function (a) { + if (a.value === 0) return Integer[0]; + if (a.value === 1) return this; + if (a.value === -1) return this.negate(); + return multiplySmallAndArray(Math.abs(a.value), this.value, this.sign !== a.sign); + }; + SmallInteger.prototype.multiply = function (v) { + return parseValue(v)._multiplyBySmall(this); + }; + SmallInteger.prototype.times = SmallInteger.prototype.multiply; + + function square(a) { + var l = a.length, + r = createArray(l + l), + base = BASE, + product, carry, i, a_i, a_j; + for (i = 0; i < l; i++) { + a_i = a[i]; + for (var j = 0; j < l; j++) { + a_j = a[j]; + product = a_i * a_j + r[i + j]; + carry = Math.floor(product / base); + r[i + j] = product - carry * base; + r[i + j + 1] += carry; + } + } + trim(r); + return r; + } + + BigInteger.prototype.square = function () { + return new BigInteger(square(this.value), false); + }; + + SmallInteger.prototype.square = function () { + var value = this.value * this.value; + if (isPrecise(value)) return new SmallInteger(value); + return new BigInteger(square(smallToArray(Math.abs(this.value))), false); + }; + + function divMod1(a, b) { // Left over from previous version. Performs faster than divMod2 on smaller input sizes. + var a_l = a.length, + b_l = b.length, + base = BASE, + result = createArray(b.length), + divisorMostSignificantDigit = b[b_l - 1], + // normalization + lambda = Math.ceil(base / (2 * divisorMostSignificantDigit)), + remainder = multiplySmall(a, lambda), + divisor = multiplySmall(b, lambda), + quotientDigit, shift, carry, borrow, i, l, q; + if (remainder.length <= a_l) remainder.push(0); + divisor.push(0); + divisorMostSignificantDigit = divisor[b_l - 1]; + for (shift = a_l - b_l; shift >= 0; shift--) { + quotientDigit = base - 1; + if (remainder[shift + b_l] !== divisorMostSignificantDigit) { + quotientDigit = Math.floor((remainder[shift + b_l] * base + remainder[shift + b_l - 1]) / divisorMostSignificantDigit); + } + // quotientDigit <= base - 1 + carry = 0; + borrow = 0; + l = divisor.length; + for (i = 0; i < l; i++) { + carry += quotientDigit * divisor[i]; + q = Math.floor(carry / base); + borrow += remainder[shift + i] - (carry - q * base); + carry = q; + if (borrow < 0) { + remainder[shift + i] = borrow + base; + borrow = -1; + } else { + remainder[shift + i] = borrow; + borrow = 0; + } + } + while (borrow !== 0) { + quotientDigit -= 1; + carry = 0; + for (i = 0; i < l; i++) { + carry += remainder[shift + i] - base + divisor[i]; + if (carry < 0) { + remainder[shift + i] = carry + base; + carry = 0; + } else { + remainder[shift + i] = carry; + carry = 1; + } + } + borrow += carry; + } + result[shift] = quotientDigit; + } + // denormalization + remainder = divModSmall(remainder, lambda)[0]; + return [arrayToSmall(result), arrayToSmall(remainder)]; + } + + function divMod2(a, b) { // Implementation idea shamelessly stolen from Silent Matt's library http://silentmatt.com/biginteger/ + // Performs faster than divMod1 on larger input sizes. + var a_l = a.length, + b_l = b.length, + result = [], + part = [], + base = BASE, + guess, xlen, highx, highy, check; + while (a_l) { + part.unshift(a[--a_l]); + trim(part); + if (compareAbs(part, b) < 0) { + result.push(0); + continue; + } + xlen = part.length; + highx = part[xlen - 1] * base + part[xlen - 2]; + highy = b[b_l - 1] * base + b[b_l - 2]; + if (xlen > b_l) { + highx = (highx + 1) * base; + } + guess = Math.ceil(highx / highy); + do { + check = multiplySmall(b, guess); + if (compareAbs(check, part) <= 0) break; + guess--; + } while (guess); + result.push(guess); + part = subtract(part, check); + } + result.reverse(); + return [arrayToSmall(result), arrayToSmall(part)]; + } + + function divModSmall(value, lambda) { + var length = value.length, + quotient = createArray(length), + base = BASE, + i, q, remainder, divisor; + remainder = 0; + for (i = length - 1; i >= 0; --i) { + divisor = remainder * base + value[i]; + q = truncate(divisor / lambda); + remainder = divisor - q * lambda; + quotient[i] = q | 0; + } + return [quotient, remainder | 0]; + } + + function divModAny(self, v) { + var value, n = parseValue(v); + var a = self.value, b = n.value; + var quotient; + if (b === 0) throw new Error("Cannot divide by zero"); + if (self.isSmall) { + if (n.isSmall) { + return [new SmallInteger(truncate(a / b)), new SmallInteger(a % b)]; + } + return [Integer[0], self]; + } + if (n.isSmall) { + if (b === 1) return [self, Integer[0]]; + if (b == -1) return [self.negate(), Integer[0]]; + var abs = Math.abs(b); + if (abs < BASE) { + value = divModSmall(a, abs); + quotient = arrayToSmall(value[0]); + var remainder = value[1]; + if (self.sign) remainder = -remainder; + if (typeof quotient === "number") { + if (self.sign !== n.sign) quotient = -quotient; + return [new SmallInteger(quotient), new SmallInteger(remainder)]; + } + return [new BigInteger(quotient, self.sign !== n.sign), new SmallInteger(remainder)]; + } + b = smallToArray(abs); + } + var comparison = compareAbs(a, b); + if (comparison === -1) return [Integer[0], self]; + if (comparison === 0) return [Integer[self.sign === n.sign ? 1 : -1], Integer[0]]; + + // divMod1 is faster on smaller input sizes + if (a.length + b.length <= 200) + value = divMod1(a, b); + else value = divMod2(a, b); + + quotient = value[0]; + var qSign = self.sign !== n.sign, + mod = value[1], + mSign = self.sign; + if (typeof quotient === "number") { + if (qSign) quotient = -quotient; + quotient = new SmallInteger(quotient); + } else quotient = new BigInteger(quotient, qSign); + if (typeof mod === "number") { + if (mSign) mod = -mod; + mod = new SmallInteger(mod); + } else mod = new BigInteger(mod, mSign); + return [quotient, mod]; + } + + BigInteger.prototype.divmod = function (v) { + var result = divModAny(this, v); + return { + quotient: result[0], + remainder: result[1] + }; + }; + SmallInteger.prototype.divmod = BigInteger.prototype.divmod; + + BigInteger.prototype.divide = function (v) { + return divModAny(this, v)[0]; + }; + SmallInteger.prototype.over = SmallInteger.prototype.divide = BigInteger.prototype.over = BigInteger.prototype.divide; + + BigInteger.prototype.mod = function (v) { + return divModAny(this, v)[1]; + }; + SmallInteger.prototype.remainder = SmallInteger.prototype.mod = BigInteger.prototype.remainder = BigInteger.prototype.mod; + + BigInteger.prototype.pow = function (v) { + var n = parseValue(v), + a = this.value, + b = n.value, + value, x, y; + if (b === 0) return Integer[1]; + if (a === 0) return Integer[0]; + if (a === 1) return Integer[1]; + if (a === -1) return n.isEven() ? Integer[1] : Integer[-1]; + if (n.sign) { + return Integer[0]; + } + if (!n.isSmall) throw new Error("The exponent " + n.toString() + " is too large."); + if (this.isSmall) { + if (isPrecise(value = Math.pow(a, b))) + return new SmallInteger(truncate(value)); + } + x = this; + y = Integer[1]; + while (true) { + if (b & 1 === 1) { + y = y.times(x); + --b; + } + if (b === 0) break; + b /= 2; + x = x.square(); + } + return y; + }; + SmallInteger.prototype.pow = BigInteger.prototype.pow; + + BigInteger.prototype.modPow = function (exp, mod) { + exp = parseValue(exp); + mod = parseValue(mod); + if (mod.isZero()) throw new Error("Cannot take modPow with modulus 0"); + var r = Integer[1], + base = this.mod(mod); + while (exp.isPositive()) { + if (base.isZero()) return Integer[0]; + if (exp.isOdd()) r = r.multiply(base).mod(mod); + exp = exp.divide(2); + base = base.square().mod(mod); + } + return r; + }; + SmallInteger.prototype.modPow = BigInteger.prototype.modPow; + + function compareAbs(a, b) { + if (a.length !== b.length) { + return a.length > b.length ? 1 : -1; + } + for (var i = a.length - 1; i >= 0; i--) { + if (a[i] !== b[i]) return a[i] > b[i] ? 1 : -1; + } + return 0; + } + + BigInteger.prototype.compareAbs = function (v) { + var n = parseValue(v), + a = this.value, + b = n.value; + if (n.isSmall) return 1; + return compareAbs(a, b); + }; + SmallInteger.prototype.compareAbs = function (v) { + var n = parseValue(v), + a = Math.abs(this.value), + b = n.value; + if (n.isSmall) { + b = Math.abs(b); + return a === b ? 0 : a > b ? 1 : -1; + } + return -1; + }; + + BigInteger.prototype.compare = function (v) { + // See discussion about comparison with Infinity: + // https://github.com/peterolson/BigInteger.js/issues/61 + if (v === Infinity) { + return -1; + } + if (v === -Infinity) { + return 1; + } + + var n = parseValue(v), + a = this.value, + b = n.value; + if (this.sign !== n.sign) { + return n.sign ? 1 : -1; + } + if (n.isSmall) { + return this.sign ? -1 : 1; + } + return compareAbs(a, b) * (this.sign ? -1 : 1); + }; + BigInteger.prototype.compareTo = BigInteger.prototype.compare; + + SmallInteger.prototype.compare = function (v) { + if (v === Infinity) { + return -1; + } + if (v === -Infinity) { + return 1; + } + + var n = parseValue(v), + a = this.value, + b = n.value; + if (n.isSmall) { + return a == b ? 0 : a > b ? 1 : -1; + } + if (a < 0 !== n.sign) { + return a < 0 ? -1 : 1; + } + return a < 0 ? 1 : -1; + }; + SmallInteger.prototype.compareTo = SmallInteger.prototype.compare; + + BigInteger.prototype.equals = function (v) { + return this.compare(v) === 0; + }; + SmallInteger.prototype.eq = SmallInteger.prototype.equals = BigInteger.prototype.eq = BigInteger.prototype.equals; + + BigInteger.prototype.notEquals = function (v) { + return this.compare(v) !== 0; + }; + SmallInteger.prototype.neq = SmallInteger.prototype.notEquals = BigInteger.prototype.neq = BigInteger.prototype.notEquals; + + BigInteger.prototype.greater = function (v) { + return this.compare(v) > 0; + }; + SmallInteger.prototype.gt = SmallInteger.prototype.greater = BigInteger.prototype.gt = BigInteger.prototype.greater; + + BigInteger.prototype.lesser = function (v) { + return this.compare(v) < 0; + }; + SmallInteger.prototype.lt = SmallInteger.prototype.lesser = BigInteger.prototype.lt = BigInteger.prototype.lesser; + + BigInteger.prototype.greaterOrEquals = function (v) { + return this.compare(v) >= 0; + }; + SmallInteger.prototype.geq = SmallInteger.prototype.greaterOrEquals = BigInteger.prototype.geq = BigInteger.prototype.greaterOrEquals; + + BigInteger.prototype.lesserOrEquals = function (v) { + return this.compare(v) <= 0; + }; + SmallInteger.prototype.leq = SmallInteger.prototype.lesserOrEquals = BigInteger.prototype.leq = BigInteger.prototype.lesserOrEquals; + + BigInteger.prototype.isEven = function () { + return (this.value[0] & 1) === 0; + }; + SmallInteger.prototype.isEven = function () { + return (this.value & 1) === 0; + }; + + BigInteger.prototype.isOdd = function () { + return (this.value[0] & 1) === 1; + }; + SmallInteger.prototype.isOdd = function () { + return (this.value & 1) === 1; + }; + + BigInteger.prototype.isPositive = function () { + return !this.sign; + }; + SmallInteger.prototype.isPositive = function () { + return this.value > 0; + }; + + BigInteger.prototype.isNegative = function () { + return this.sign; + }; + SmallInteger.prototype.isNegative = function () { + return this.value < 0; + }; + + BigInteger.prototype.isUnit = function () { + return false; + }; + SmallInteger.prototype.isUnit = function () { + return Math.abs(this.value) === 1; + }; + + BigInteger.prototype.isZero = function () { + return false; + }; + SmallInteger.prototype.isZero = function () { + return this.value === 0; + }; + BigInteger.prototype.isDivisibleBy = function (v) { + var n = parseValue(v); + var value = n.value; + if (value === 0) return false; + if (value === 1) return true; + if (value === 2) return this.isEven(); + return this.mod(n).equals(Integer[0]); + }; + SmallInteger.prototype.isDivisibleBy = BigInteger.prototype.isDivisibleBy; + + function isBasicPrime(v) { + var n = v.abs(); + if (n.isUnit()) return false; + if (n.equals(2) || n.equals(3) || n.equals(5)) return true; + if (n.isEven() || n.isDivisibleBy(3) || n.isDivisibleBy(5)) return false; + if (n.lesser(25)) return true; + // we don't know if it's prime: let the other functions figure it out + } + + BigInteger.prototype.isPrime = function () { + var isPrime = isBasicPrime(this); + if (isPrime !== undefined) return isPrime; + var n = this.abs(), + nPrev = n.prev(); + var a = [2, 3, 5, 7, 11, 13, 17, 19], + b = nPrev, + d, t, i, x; + while (b.isEven()) b = b.divide(2); + for (i = 0; i < a.length; i++) { + x = bigInt(a[i]).modPow(b, n); + if (x.equals(Integer[1]) || x.equals(nPrev)) continue; + for (t = true, d = b; t && d.lesser(nPrev) ; d = d.multiply(2)) { + x = x.square().mod(n); + if (x.equals(nPrev)) t = false; + } + if (t) return false; + } + return true; + }; + SmallInteger.prototype.isPrime = BigInteger.prototype.isPrime; + + BigInteger.prototype.isProbablePrime = function (iterations) { + var isPrime = isBasicPrime(this); + if (isPrime !== undefined) return isPrime; + var n = this.abs(); + var t = iterations === undefined ? 5 : iterations; + // use the Fermat primality test + for (var i = 0; i < t; i++) { + var a = bigInt.randBetween(2, n.minus(2)); + if (!a.modPow(n.prev(), n).isUnit()) return false; // definitely composite + } + return true; // large chance of being prime + }; + SmallInteger.prototype.isProbablePrime = BigInteger.prototype.isProbablePrime; + + BigInteger.prototype.modInv = function (n) { + var t = bigInt.zero, newT = bigInt.one, r = parseValue(n), newR = this.abs(), q, lastT, lastR; + while (!newR.equals(bigInt.zero)) { + q = r.divide(newR); + lastT = t; + lastR = r; + t = newT; + r = newR; + newT = lastT.subtract(q.multiply(newT)); + newR = lastR.subtract(q.multiply(newR)); + } + if (!r.equals(1)) throw new Error(this.toString() + " and " + n.toString() + " are not co-prime"); + if (t.compare(0) === -1) { + t = t.add(n); + } + if (this.isNegative()) { + return t.negate(); + } + return t; + }; + + SmallInteger.prototype.modInv = BigInteger.prototype.modInv; + + BigInteger.prototype.next = function () { + var value = this.value; + if (this.sign) { + return subtractSmall(value, 1, this.sign); + } + return new BigInteger(addSmall(value, 1), this.sign); + }; + SmallInteger.prototype.next = function () { + var value = this.value; + if (value + 1 < MAX_INT) return new SmallInteger(value + 1); + return new BigInteger(MAX_INT_ARR, false); + }; + + BigInteger.prototype.prev = function () { + var value = this.value; + if (this.sign) { + return new BigInteger(addSmall(value, 1), true); + } + return subtractSmall(value, 1, this.sign); + }; + SmallInteger.prototype.prev = function () { + var value = this.value; + if (value - 1 > -MAX_INT) return new SmallInteger(value - 1); + return new BigInteger(MAX_INT_ARR, true); + }; + + var powersOfTwo = [1]; + while (powersOfTwo[powersOfTwo.length - 1] <= BASE) powersOfTwo.push(2 * powersOfTwo[powersOfTwo.length - 1]); + var powers2Length = powersOfTwo.length, highestPower2 = powersOfTwo[powers2Length - 1]; + + function shift_isSmall(n) { + return ((typeof n === "number" || typeof n === "string") && +Math.abs(n) <= BASE) || + (n instanceof BigInteger && n.value.length <= 1); + } + + BigInteger.prototype.shiftLeft = function (n) { + if (!shift_isSmall(n)) { + throw new Error(String(n) + " is too large for shifting."); + } + n = +n; + if (n < 0) return this.shiftRight(-n); + var result = this; + while (n >= powers2Length) { + result = result.multiply(highestPower2); + n -= powers2Length - 1; + } + return result.multiply(powersOfTwo[n]); + }; + SmallInteger.prototype.shiftLeft = BigInteger.prototype.shiftLeft; + + BigInteger.prototype.shiftRight = function (n) { + var remQuo; + if (!shift_isSmall(n)) { + throw new Error(String(n) + " is too large for shifting."); + } + n = +n; + if (n < 0) return this.shiftLeft(-n); + var result = this; + while (n >= powers2Length) { + if (result.isZero()) return result; + remQuo = divModAny(result, highestPower2); + result = remQuo[1].isNegative() ? remQuo[0].prev() : remQuo[0]; + n -= powers2Length - 1; + } + remQuo = divModAny(result, powersOfTwo[n]); + return remQuo[1].isNegative() ? remQuo[0].prev() : remQuo[0]; + }; + SmallInteger.prototype.shiftRight = BigInteger.prototype.shiftRight; + + function bitwise(x, y, fn) { + y = parseValue(y); + var xSign = x.isNegative(), ySign = y.isNegative(); + var xRem = xSign ? x.not() : x, + yRem = ySign ? y.not() : y; + var xBits = [], yBits = []; + var xStop = false, yStop = false; + while (!xStop || !yStop) { + if (xRem.isZero()) { // virtual sign extension for simulating two's complement + xStop = true; + xBits.push(xSign ? 1 : 0); + } + else if (xSign) xBits.push(xRem.isEven() ? 1 : 0); // two's complement for negative numbers + else xBits.push(xRem.isEven() ? 0 : 1); + + if (yRem.isZero()) { + yStop = true; + yBits.push(ySign ? 1 : 0); + } + else if (ySign) yBits.push(yRem.isEven() ? 1 : 0); + else yBits.push(yRem.isEven() ? 0 : 1); + + xRem = xRem.over(2); + yRem = yRem.over(2); + } + var result = []; + for (var i = 0; i < xBits.length; i++) result.push(fn(xBits[i], yBits[i])); + var sum = bigInt(result.pop()).negate().times(bigInt(2).pow(result.length)); + while (result.length) { + sum = sum.add(bigInt(result.pop()).times(bigInt(2).pow(result.length))); + } + return sum; + } + + BigInteger.prototype.not = function () { + return this.negate().prev(); + }; + SmallInteger.prototype.not = BigInteger.prototype.not; + + BigInteger.prototype.and = function (n) { + return bitwise(this, n, function (a, b) { return a & b; }); + }; + SmallInteger.prototype.and = BigInteger.prototype.and; + + BigInteger.prototype.or = function (n) { + return bitwise(this, n, function (a, b) { return a | b; }); + }; + SmallInteger.prototype.or = BigInteger.prototype.or; + + BigInteger.prototype.xor = function (n) { + return bitwise(this, n, function (a, b) { return a ^ b; }); + }; + SmallInteger.prototype.xor = BigInteger.prototype.xor; + + var LOBMASK_I = 1 << 30, LOBMASK_BI = (BASE & -BASE) * (BASE & -BASE) | LOBMASK_I; + function roughLOB(n) { // get lowestOneBit (rough) + // SmallInteger: return Min(lowestOneBit(n), 1 << 30) + // BigInteger: return Min(lowestOneBit(n), 1 << 14) [BASE=1e7] + var v = n.value, x = typeof v === "number" ? v | LOBMASK_I : v[0] + v[1] * BASE | LOBMASK_BI; + return x & -x; + } + + function max(a, b) { + a = parseValue(a); + b = parseValue(b); + return a.greater(b) ? a : b; + } + function min(a, b) { + a = parseValue(a); + b = parseValue(b); + return a.lesser(b) ? a : b; + } + function gcd(a, b) { + a = parseValue(a).abs(); + b = parseValue(b).abs(); + if (a.equals(b)) return a; + if (a.isZero()) return b; + if (b.isZero()) return a; + var c = Integer[1], d, t; + while (a.isEven() && b.isEven()) { + d = Math.min(roughLOB(a), roughLOB(b)); + a = a.divide(d); + b = b.divide(d); + c = c.multiply(d); + } + while (a.isEven()) { + a = a.divide(roughLOB(a)); + } + do { + while (b.isEven()) { + b = b.divide(roughLOB(b)); + } + if (a.greater(b)) { + t = b; b = a; a = t; + } + b = b.subtract(a); + } while (!b.isZero()); + return c.isUnit() ? a : a.multiply(c); + } + function lcm(a, b) { + a = parseValue(a).abs(); + b = parseValue(b).abs(); + return a.divide(gcd(a, b)).multiply(b); + } + function randBetween(a, b) { + a = parseValue(a); + b = parseValue(b); + var low = min(a, b), high = max(a, b); + var range = high.subtract(low); + if (range.isSmall) return low.add(Math.round(Math.random() * range)); + var length = range.value.length - 1; + var result = [], restricted = true; + for (var i = length; i >= 0; i--) { + var top = restricted ? range.value[i] : BASE; + var digit = truncate(Math.random() * top); + result.unshift(digit); + if (digit < top) restricted = false; + } + result = arrayToSmall(result); + return low.add(typeof result === "number" ? new SmallInteger(result) : new BigInteger(result, false)); + } + var parseBase = function (text, base) { + var length = text.length; + var i; + var absBase = Math.abs(base); + for(var i = 0; i < length; i++) { + var c = text[i].toLowerCase(); + if(c === "-") continue; + if(/[a-z0-9]/.test(c)) { + if(/[0-9]/.test(c) && +c >= absBase) { + if(c === "1" && absBase === 1) continue; + throw new Error(c + " is not a valid digit in base " + base + "."); + } else if(c.charCodeAt(0) - 87 >= absBase) { + throw new Error(c + " is not a valid digit in base " + base + "."); + } + } + } + if (2 <= base && base <= 36) { + if (length <= LOG_MAX_INT / Math.log(base)) { + var result = parseInt(text, base); + if(isNaN(result)) { + throw new Error(c + " is not a valid digit in base " + base + "."); + } + return new SmallInteger(parseInt(text, base)); + } + } + base = parseValue(base); + var digits = []; + var isNegative = text[0] === "-"; + for (i = isNegative ? 1 : 0; i < text.length; i++) { + var c = text[i].toLowerCase(), + charCode = c.charCodeAt(0); + if (48 <= charCode && charCode <= 57) digits.push(parseValue(c)); + else if (97 <= charCode && charCode <= 122) digits.push(parseValue(c.charCodeAt(0) - 87)); + else if (c === "<") { + var start = i; + do { i++; } while (text[i] !== ">"); + digits.push(parseValue(text.slice(start + 1, i))); + } + else throw new Error(c + " is not a valid character"); + } + return parseBaseFromArray(digits, base, isNegative); + }; + + function parseBaseFromArray(digits, base, isNegative) { + var val = Integer[0], pow = Integer[1], i; + for (i = digits.length - 1; i >= 0; i--) { + val = val.add(digits[i].times(pow)); + pow = pow.times(base); + } + return isNegative ? val.negate() : val; + } + + function stringify(digit) { + var v = digit.value; + if (typeof v === "number") v = [v]; + if (v.length === 1 && v[0] <= 35) { + return "0123456789abcdefghijklmnopqrstuvwxyz".charAt(v[0]); + } + return "<" + v + ">"; + } + function toBase(n, base) { + base = bigInt(base); + if (base.isZero()) { + if (n.isZero()) return "0"; + throw new Error("Cannot convert nonzero numbers to base 0."); + } + if (base.equals(-1)) { + if (n.isZero()) return "0"; + if (n.isNegative()) return new Array(1 - n).join("10"); + return "1" + new Array(+n).join("01"); + } + var minusSign = ""; + if (n.isNegative() && base.isPositive()) { + minusSign = "-"; + n = n.abs(); + } + if (base.equals(1)) { + if (n.isZero()) return "0"; + return minusSign + new Array(+n + 1).join(1); + } + var out = []; + var left = n, divmod; + while (left.isNegative() || left.compareAbs(base) >= 0) { + divmod = left.divmod(base); + left = divmod.quotient; + var digit = divmod.remainder; + if (digit.isNegative()) { + digit = base.minus(digit).abs(); + left = left.next(); + } + out.push(stringify(digit)); + } + out.push(stringify(left)); + return minusSign + out.reverse().join(""); + } + + BigInteger.prototype.toString = function (radix) { + if (radix === undefined) radix = 10; + if (radix !== 10) return toBase(this, radix); + var v = this.value, l = v.length, str = String(v[--l]), zeros = "0000000", digit; + while (--l >= 0) { + digit = String(v[l]); + str += zeros.slice(digit.length) + digit; + } + var sign = this.sign ? "-" : ""; + return sign + str; + }; + SmallInteger.prototype.toString = function (radix) { + if (radix === undefined) radix = 10; + if (radix != 10) return toBase(this, radix); + return String(this.value); + }; + + BigInteger.prototype.valueOf = function () { + return +this.toString(); + }; + BigInteger.prototype.toJSNumber = BigInteger.prototype.valueOf; + + SmallInteger.prototype.valueOf = function () { + return this.value; + }; + SmallInteger.prototype.toJSNumber = SmallInteger.prototype.valueOf; + + function parseStringValue(v) { + if (isPrecise(+v)) { + var x = +v; + if (x === truncate(x)) + return new SmallInteger(x); + throw "Invalid integer: " + v; + } + var sign = v[0] === "-"; + if (sign) v = v.slice(1); + var split = v.split(/e/i); + if (split.length > 2) throw new Error("Invalid integer: " + split.join("e")); + if (split.length === 2) { + var exp = split[1]; + if (exp[0] === "+") exp = exp.slice(1); + exp = +exp; + if (exp !== truncate(exp) || !isPrecise(exp)) throw new Error("Invalid integer: " + exp + " is not a valid exponent."); + var text = split[0]; + var decimalPlace = text.indexOf("."); + if (decimalPlace >= 0) { + exp -= text.length - decimalPlace - 1; + text = text.slice(0, decimalPlace) + text.slice(decimalPlace + 1); + } + if (exp < 0) throw new Error("Cannot include negative exponent part for integers"); + text += (new Array(exp + 1)).join("0"); + v = text; + } + var isValid = /^([0-9][0-9]*)$/.test(v); + if (!isValid) throw new Error("Invalid integer: " + v); + var r = [], max = v.length, l = LOG_BASE, min = max - l; + while (max > 0) { + r.push(+v.slice(min, max)); + min -= l; + if (min < 0) min = 0; + max -= l; + } + trim(r); + return new BigInteger(r, sign); + } + + function parseNumberValue(v) { + if (isPrecise(v)) { + if (v !== truncate(v)) throw new Error(v + " is not an integer."); + return new SmallInteger(v); + } + return parseStringValue(v.toString()); + } + + function parseValue(v) { + if (typeof v === "number") { + return parseNumberValue(v); + } + if (typeof v === "string") { + return parseStringValue(v); + } + return v; + } + // Pre-define numbers in range [-999,999] + for (var i = 0; i < 1000; i++) { + Integer[i] = new SmallInteger(i); + if (i > 0) Integer[-i] = new SmallInteger(-i); + } + // Backwards compatibility + Integer.one = Integer[1]; + Integer.zero = Integer[0]; + Integer.minusOne = Integer[-1]; + Integer.max = max; + Integer.min = min; + Integer.gcd = gcd; + Integer.lcm = lcm; + Integer.isInstance = function (x) { return x instanceof BigInteger || x instanceof SmallInteger; }; + Integer.randBetween = randBetween; + + Integer.fromArray = function (digits, base, isNegative) { + return parseBaseFromArray(digits.map(parseValue), parseValue(base || 10), isNegative); + }; + + return Integer; +})(); + +// Node.js check +if (typeof module !== "undefined" && module.hasOwnProperty("exports")) { + module.exports = bigInt; +} + +//amd check +if ( typeof define === "function" && define.amd ) { + define( "big-integer", [], function() { + return bigInt; + }); +} diff --git a/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/big-integer/BigInteger.min.js b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/big-integer/BigInteger.min.js new file mode 100644 index 00000000..8ee9a894 --- /dev/null +++ b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/big-integer/BigInteger.min.js @@ -0,0 +1 @@ +var bigInt=function(undefined){"use strict";var BASE=1e7,LOG_BASE=7,MAX_INT=9007199254740992,MAX_INT_ARR=smallToArray(MAX_INT),LOG_MAX_INT=Math.log(MAX_INT);function Integer(v,radix){if(typeof v==="undefined")return Integer[0];if(typeof radix!=="undefined")return+radix===10?parseValue(v):parseBase(v,radix);return parseValue(v)}function BigInteger(value,sign){this.value=value;this.sign=sign;this.isSmall=false}BigInteger.prototype=Object.create(Integer.prototype);function SmallInteger(value){this.value=value;this.sign=value<0;this.isSmall=true}SmallInteger.prototype=Object.create(Integer.prototype);function isPrecise(n){return-MAX_INT0)return Math.floor(n);return Math.ceil(n)}function add(a,b){var l_a=a.length,l_b=b.length,r=new Array(l_a),carry=0,base=BASE,sum,i;for(i=0;i=base?1:0;r[i]=sum-carry*base}while(i0)r.push(carry);return r}function addAny(a,b){if(a.length>=b.length)return add(a,b);return add(b,a)}function addSmall(a,carry){var l=a.length,r=new Array(l),base=BASE,sum,i;for(i=0;i0){r[i++]=carry%base;carry=Math.floor(carry/base)}return r}BigInteger.prototype.add=function(v){var n=parseValue(v);if(this.sign!==n.sign){return this.subtract(n.negate())}var a=this.value,b=n.value;if(n.isSmall){return new BigInteger(addSmall(a,Math.abs(b)),this.sign)}return new BigInteger(addAny(a,b),this.sign)};BigInteger.prototype.plus=BigInteger.prototype.add;SmallInteger.prototype.add=function(v){var n=parseValue(v);var a=this.value;if(a<0!==n.sign){return this.subtract(n.negate())}var b=n.value;if(n.isSmall){if(isPrecise(a+b))return new SmallInteger(a+b);b=smallToArray(Math.abs(b))}return new BigInteger(addSmall(b,Math.abs(a)),a<0)};SmallInteger.prototype.plus=SmallInteger.prototype.add;function subtract(a,b){var a_l=a.length,b_l=b.length,r=new Array(a_l),borrow=0,base=BASE,i,difference;for(i=0;i=0){value=subtract(a,b)}else{value=subtract(b,a);sign=!sign}value=arrayToSmall(value);if(typeof value==="number"){if(sign)value=-value;return new SmallInteger(value)}return new BigInteger(value,sign)}function subtractSmall(a,b,sign){var l=a.length,r=new Array(l),carry=-b,base=BASE,i,difference;for(i=0;i=0)};SmallInteger.prototype.minus=SmallInteger.prototype.subtract;BigInteger.prototype.negate=function(){return new BigInteger(this.value,!this.sign)};SmallInteger.prototype.negate=function(){var sign=this.sign;var small=new SmallInteger(-this.value);small.sign=!sign;return small};BigInteger.prototype.abs=function(){return new BigInteger(this.value,false)};SmallInteger.prototype.abs=function(){return new SmallInteger(Math.abs(this.value))};function multiplyLong(a,b){var a_l=a.length,b_l=b.length,l=a_l+b_l,r=createArray(l),base=BASE,product,carry,i,a_i,b_j;for(i=0;i0){r[i++]=carry%base;carry=Math.floor(carry/base)}return r}function shiftLeft(x,n){var r=[];while(n-- >0)r.push(0);return r.concat(x)}function multiplyKaratsuba(x,y){var n=Math.max(x.length,y.length);if(n<=30)return multiplyLong(x,y);n=Math.ceil(n/2);var b=x.slice(n),a=x.slice(0,n),d=y.slice(n),c=y.slice(0,n);var ac=multiplyKaratsuba(a,c),bd=multiplyKaratsuba(b,d),abcd=multiplyKaratsuba(addAny(a,b),addAny(c,d));var product=addAny(addAny(ac,shiftLeft(subtract(subtract(abcd,ac),bd),n)),shiftLeft(bd,2*n));trim(product);return product}function useKaratsuba(l1,l2){return-.012*l1-.012*l2+15e-6*l1*l2>0}BigInteger.prototype.multiply=function(v){var n=parseValue(v),a=this.value,b=n.value,sign=this.sign!==n.sign,abs;if(n.isSmall){if(b===0)return Integer[0];if(b===1)return this;if(b===-1)return this.negate();abs=Math.abs(b);if(abs=0;shift--){quotientDigit=base-1;if(remainder[shift+b_l]!==divisorMostSignificantDigit){quotientDigit=Math.floor((remainder[shift+b_l]*base+remainder[shift+b_l-1])/divisorMostSignificantDigit)}carry=0;borrow=0;l=divisor.length;for(i=0;ib_l){highx=(highx+1)*base}guess=Math.ceil(highx/highy);do{check=multiplySmall(b,guess);if(compareAbs(check,part)<=0)break;guess--}while(guess);result.push(guess);part=subtract(part,check)}result.reverse();return[arrayToSmall(result),arrayToSmall(part)]}function divModSmall(value,lambda){var length=value.length,quotient=createArray(length),base=BASE,i,q,remainder,divisor;remainder=0;for(i=length-1;i>=0;--i){divisor=remainder*base+value[i];q=truncate(divisor/lambda);remainder=divisor-q*lambda;quotient[i]=q|0}return[quotient,remainder|0]}function divModAny(self,v){var value,n=parseValue(v);var a=self.value,b=n.value;var quotient;if(b===0)throw new Error("Cannot divide by zero");if(self.isSmall){if(n.isSmall){return[new SmallInteger(truncate(a/b)),new SmallInteger(a%b)]}return[Integer[0],self]}if(n.isSmall){if(b===1)return[self,Integer[0]];if(b==-1)return[self.negate(),Integer[0]];var abs=Math.abs(b);if(absb.length?1:-1}for(var i=a.length-1;i>=0;i--){if(a[i]!==b[i])return a[i]>b[i]?1:-1}return 0}BigInteger.prototype.compareAbs=function(v){var n=parseValue(v),a=this.value,b=n.value;if(n.isSmall)return 1;return compareAbs(a,b)};SmallInteger.prototype.compareAbs=function(v){var n=parseValue(v),a=Math.abs(this.value),b=n.value;if(n.isSmall){b=Math.abs(b);return a===b?0:a>b?1:-1}return-1};BigInteger.prototype.compare=function(v){if(v===Infinity){return-1}if(v===-Infinity){return 1}var n=parseValue(v),a=this.value,b=n.value;if(this.sign!==n.sign){return n.sign?1:-1}if(n.isSmall){return this.sign?-1:1}return compareAbs(a,b)*(this.sign?-1:1)};BigInteger.prototype.compareTo=BigInteger.prototype.compare;SmallInteger.prototype.compare=function(v){if(v===Infinity){return-1}if(v===-Infinity){return 1}var n=parseValue(v),a=this.value,b=n.value;if(n.isSmall){return a==b?0:a>b?1:-1}if(a<0!==n.sign){return a<0?-1:1}return a<0?1:-1};SmallInteger.prototype.compareTo=SmallInteger.prototype.compare;BigInteger.prototype.equals=function(v){return this.compare(v)===0};SmallInteger.prototype.eq=SmallInteger.prototype.equals=BigInteger.prototype.eq=BigInteger.prototype.equals;BigInteger.prototype.notEquals=function(v){return this.compare(v)!==0};SmallInteger.prototype.neq=SmallInteger.prototype.notEquals=BigInteger.prototype.neq=BigInteger.prototype.notEquals;BigInteger.prototype.greater=function(v){return this.compare(v)>0};SmallInteger.prototype.gt=SmallInteger.prototype.greater=BigInteger.prototype.gt=BigInteger.prototype.greater;BigInteger.prototype.lesser=function(v){return this.compare(v)<0};SmallInteger.prototype.lt=SmallInteger.prototype.lesser=BigInteger.prototype.lt=BigInteger.prototype.lesser;BigInteger.prototype.greaterOrEquals=function(v){return this.compare(v)>=0};SmallInteger.prototype.geq=SmallInteger.prototype.greaterOrEquals=BigInteger.prototype.geq=BigInteger.prototype.greaterOrEquals;BigInteger.prototype.lesserOrEquals=function(v){return this.compare(v)<=0};SmallInteger.prototype.leq=SmallInteger.prototype.lesserOrEquals=BigInteger.prototype.leq=BigInteger.prototype.lesserOrEquals;BigInteger.prototype.isEven=function(){return(this.value[0]&1)===0};SmallInteger.prototype.isEven=function(){return(this.value&1)===0};BigInteger.prototype.isOdd=function(){return(this.value[0]&1)===1};SmallInteger.prototype.isOdd=function(){return(this.value&1)===1};BigInteger.prototype.isPositive=function(){return!this.sign};SmallInteger.prototype.isPositive=function(){return this.value>0};BigInteger.prototype.isNegative=function(){return this.sign};SmallInteger.prototype.isNegative=function(){return this.value<0};BigInteger.prototype.isUnit=function(){return false};SmallInteger.prototype.isUnit=function(){return Math.abs(this.value)===1};BigInteger.prototype.isZero=function(){return false};SmallInteger.prototype.isZero=function(){return this.value===0};BigInteger.prototype.isDivisibleBy=function(v){var n=parseValue(v);var value=n.value;if(value===0)return false;if(value===1)return true;if(value===2)return this.isEven();return this.mod(n).equals(Integer[0])};SmallInteger.prototype.isDivisibleBy=BigInteger.prototype.isDivisibleBy;function isBasicPrime(v){var n=v.abs();if(n.isUnit())return false;if(n.equals(2)||n.equals(3)||n.equals(5))return true;if(n.isEven()||n.isDivisibleBy(3)||n.isDivisibleBy(5))return false;if(n.lesser(25))return true}BigInteger.prototype.isPrime=function(){var isPrime=isBasicPrime(this);if(isPrime!==undefined)return isPrime;var n=this.abs(),nPrev=n.prev();var a=[2,3,5,7,11,13,17,19],b=nPrev,d,t,i,x;while(b.isEven())b=b.divide(2);for(i=0;i-MAX_INT)return new SmallInteger(value-1);return new BigInteger(MAX_INT_ARR,true)};var powersOfTwo=[1];while(powersOfTwo[powersOfTwo.length-1]<=BASE)powersOfTwo.push(2*powersOfTwo[powersOfTwo.length-1]);var powers2Length=powersOfTwo.length,highestPower2=powersOfTwo[powers2Length-1];function shift_isSmall(n){return(typeof n==="number"||typeof n==="string")&&+Math.abs(n)<=BASE||n instanceof BigInteger&&n.value.length<=1}BigInteger.prototype.shiftLeft=function(n){if(!shift_isSmall(n)){throw new Error(String(n)+" is too large for shifting.")}n=+n;if(n<0)return this.shiftRight(-n);var result=this;while(n>=powers2Length){result=result.multiply(highestPower2);n-=powers2Length-1}return result.multiply(powersOfTwo[n])};SmallInteger.prototype.shiftLeft=BigInteger.prototype.shiftLeft;BigInteger.prototype.shiftRight=function(n){var remQuo;if(!shift_isSmall(n)){throw new Error(String(n)+" is too large for shifting.")}n=+n;if(n<0)return this.shiftLeft(-n);var result=this;while(n>=powers2Length){if(result.isZero())return result;remQuo=divModAny(result,highestPower2);result=remQuo[1].isNegative()?remQuo[0].prev():remQuo[0];n-=powers2Length-1}remQuo=divModAny(result,powersOfTwo[n]);return remQuo[1].isNegative()?remQuo[0].prev():remQuo[0]};SmallInteger.prototype.shiftRight=BigInteger.prototype.shiftRight;function bitwise(x,y,fn){y=parseValue(y);var xSign=x.isNegative(),ySign=y.isNegative();var xRem=xSign?x.not():x,yRem=ySign?y.not():y;var xBits=[],yBits=[];var xStop=false,yStop=false;while(!xStop||!yStop){if(xRem.isZero()){xStop=true;xBits.push(xSign?1:0)}else if(xSign)xBits.push(xRem.isEven()?1:0);else xBits.push(xRem.isEven()?0:1);if(yRem.isZero()){yStop=true;yBits.push(ySign?1:0)}else if(ySign)yBits.push(yRem.isEven()?1:0);else yBits.push(yRem.isEven()?0:1);xRem=xRem.over(2);yRem=yRem.over(2)}var result=[];for(var i=0;i=0;i--){var top=restricted?range.value[i]:BASE;var digit=truncate(Math.random()*top);result.unshift(digit);if(digit=absBase){if(c==="1"&&absBase===1)continue;throw new Error(c+" is not a valid digit in base "+base+".")}else if(c.charCodeAt(0)-87>=absBase){throw new Error(c+" is not a valid digit in base "+base+".")}}}if(2<=base&&base<=36){if(length<=LOG_MAX_INT/Math.log(base)){var result=parseInt(text,base);if(isNaN(result)){throw new Error(c+" is not a valid digit in base "+base+".")}return new SmallInteger(parseInt(text,base))}}base=parseValue(base);var digits=[];var isNegative=text[0]==="-";for(i=isNegative?1:0;i");digits.push(parseValue(text.slice(start+1,i)))}else throw new Error(c+" is not a valid character")}return parseBaseFromArray(digits,base,isNegative)};function parseBaseFromArray(digits,base,isNegative){var val=Integer[0],pow=Integer[1],i;for(i=digits.length-1;i>=0;i--){val=val.add(digits[i].times(pow));pow=pow.times(base)}return isNegative?val.negate():val}function stringify(digit){var v=digit.value;if(typeof v==="number")v=[v];if(v.length===1&&v[0]<=35){return"0123456789abcdefghijklmnopqrstuvwxyz".charAt(v[0])}return"<"+v+">"}function toBase(n,base){base=bigInt(base);if(base.isZero()){if(n.isZero())return"0";throw new Error("Cannot convert nonzero numbers to base 0.")}if(base.equals(-1)){if(n.isZero())return"0";if(n.isNegative())return new Array(1-n).join("10");return"1"+new Array(+n).join("01")}var minusSign="";if(n.isNegative()&&base.isPositive()){minusSign="-";n=n.abs()}if(base.equals(1)){if(n.isZero())return"0";return minusSign+new Array(+n+1).join(1)}var out=[];var left=n,divmod;while(left.isNegative()||left.compareAbs(base)>=0){divmod=left.divmod(base);left=divmod.quotient;var digit=divmod.remainder;if(digit.isNegative()){digit=base.minus(digit).abs();left=left.next()}out.push(stringify(digit))}out.push(stringify(left));return minusSign+out.reverse().join("")}BigInteger.prototype.toString=function(radix){if(radix===undefined)radix=10;if(radix!==10)return toBase(this,radix);var v=this.value,l=v.length,str=String(v[--l]),zeros="0000000",digit;while(--l>=0){digit=String(v[l]);str+=zeros.slice(digit.length)+digit}var sign=this.sign?"-":"";return sign+str};SmallInteger.prototype.toString=function(radix){if(radix===undefined)radix=10;if(radix!=10)return toBase(this,radix);return String(this.value)};BigInteger.prototype.valueOf=function(){return+this.toString()};BigInteger.prototype.toJSNumber=BigInteger.prototype.valueOf;SmallInteger.prototype.valueOf=function(){return this.value};SmallInteger.prototype.toJSNumber=SmallInteger.prototype.valueOf;function parseStringValue(v){if(isPrecise(+v)){var x=+v;if(x===truncate(x))return new SmallInteger(x);throw"Invalid integer: "+v}var sign=v[0]==="-";if(sign)v=v.slice(1);var split=v.split(/e/i);if(split.length>2)throw new Error("Invalid integer: "+split.join("e"));if(split.length===2){var exp=split[1];if(exp[0]==="+")exp=exp.slice(1);exp=+exp;if(exp!==truncate(exp)||!isPrecise(exp))throw new Error("Invalid integer: "+exp+" is not a valid exponent.");var text=split[0];var decimalPlace=text.indexOf(".");if(decimalPlace>=0){exp-=text.length-decimalPlace-1;text=text.slice(0,decimalPlace)+text.slice(decimalPlace+1)}if(exp<0)throw new Error("Cannot include negative exponent part for integers");text+=new Array(exp+1).join("0");v=text}var isValid=/^([0-9][0-9]*)$/.test(v);if(!isValid)throw new Error("Invalid integer: "+v);var r=[],max=v.length,l=LOG_BASE,min=max-l;while(max>0){r.push(+v.slice(min,max));min-=l;if(min<0)min=0;max-=l}trim(r);return new BigInteger(r,sign)}function parseNumberValue(v){if(isPrecise(v)){if(v!==truncate(v))throw new Error(v+" is not an integer.");return new SmallInteger(v)}return parseStringValue(v.toString())}function parseValue(v){if(typeof v==="number"){return parseNumberValue(v)}if(typeof v==="string"){return parseStringValue(v)}return v}for(var i=0;i<1e3;i++){Integer[i]=new SmallInteger(i);if(i>0)Integer[-i]=new SmallInteger(-i)}Integer.one=Integer[1];Integer.zero=Integer[0];Integer.minusOne=Integer[-1];Integer.max=max;Integer.min=min;Integer.gcd=gcd;Integer.lcm=lcm;Integer.isInstance=function(x){return x instanceof BigInteger||x instanceof SmallInteger};Integer.randBetween=randBetween;Integer.fromArray=function(digits,base,isNegative){return parseBaseFromArray(digits.map(parseValue),parseValue(base||10),isNegative)};return Integer}();if(typeof module!=="undefined"&&module.hasOwnProperty("exports")){module.exports=bigInt}if(typeof define==="function"&&define.amd){define("big-integer",[],function(){return bigInt})} \ No newline at end of file diff --git a/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/big-integer/LICENSE b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/big-integer/LICENSE new file mode 100644 index 00000000..3ce22da3 --- /dev/null +++ b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/big-integer/LICENSE @@ -0,0 +1,24 @@ +This is free and unencumbered software released into the public domain. + +Anyone is free to copy, modify, publish, use, compile, sell, or +distribute this software, either in source code form or as a compiled +binary, for any purpose, commercial or non-commercial, and by any +means. + +In jurisdictions that recognize copyright laws, the author or authors +of this software dedicate any and all copyright interest in the +software to the public domain. We make this dedication for the benefit +of the public at large and to the detriment of our heirs and +successors. We intend this dedication to be an overt act of +relinquishment in perpetuity of all present and future rights to this +software under copyright law. + +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 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. + +For more information, please refer to diff --git a/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/big-integer/README.md b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/big-integer/README.md new file mode 100644 index 00000000..81d9288a --- /dev/null +++ b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/big-integer/README.md @@ -0,0 +1,520 @@ +# BigInteger.js [![Build Status][travis-img]][travis-url] [![Coverage Status][coveralls-img]][coveralls-url] [![Monthly Downloads][downloads-img]][downloads-url] + +[travis-url]: https://travis-ci.org/peterolson/BigInteger.js +[travis-img]: https://travis-ci.org/peterolson/BigInteger.js.svg?branch=master +[coveralls-url]: https://coveralls.io/github/peterolson/BigInteger.js?branch=master +[coveralls-img]: https://coveralls.io/repos/peterolson/BigInteger.js/badge.svg?branch=master&service=github +[downloads-url]: https://www.npmjs.com/package/big-integer +[downloads-img]: https://img.shields.io/npm/dm/big-integer.svg + +**BigInteger.js** is an arbitrary-length integer library for Javascript, allowing arithmetic operations on integers of unlimited size, notwithstanding memory and time limitations. + +## Installation + +If you are using a browser, you can download [BigInteger.js from GitHub](http://peterolson.github.com/BigInteger.js/BigInteger.min.js) or just hotlink to it: + + + +If you are using node, you can install BigInteger with [npm](https://npmjs.org/). + + npm install big-integer + +Then you can include it in your code: + + var bigInt = require("big-integer"); + + +## Usage +### `bigInt(number, [base])` + +You can create a bigInt by calling the `bigInt` function. You can pass in + + - a string, which it will parse as an bigInt and throw an `"Invalid integer"` error if the parsing fails. + - a Javascript number, which it will parse as an bigInt and throw an `"Invalid integer"` error if the parsing fails. + - another bigInt. + - nothing, and it will return `bigInt.zero`. + + If you provide a second parameter, then it will parse `number` as a number in base `base`. Note that `base` can be any bigInt (even negative or zero). The letters "a-z" and "A-Z" will be interpreted as the numbers 10 to 35. Higher digits can be specified in angle brackets (`<` and `>`). + +Examples: + + var zero = bigInt(); + var ninetyThree = bigInt(93); + var largeNumber = bigInt("75643564363473453456342378564387956906736546456235345"); + var googol = bigInt("1e100"); + var bigNumber = bigInt(largeNumber); + + var maximumByte = bigInt("FF", 16); + var fiftyFiveGoogol = bigInt("<55>0", googol); + +Note that Javascript numbers larger than `9007199254740992` and smaller than `-9007199254740992` are not precisely represented numbers and will not produce exact results. If you are dealing with numbers outside that range, it is better to pass in strings. + +### Method Chaining + +Note that bigInt operations return bigInts, which allows you to chain methods, for example: + + var salary = bigInt(dollarsPerHour).times(hoursWorked).plus(randomBonuses) + +### Constants + +There are three named constants already stored that you do not have to construct with the `bigInt` function yourself: + + - `bigInt.one`, equivalent to `bigInt(1)` + - `bigInt.zero`, equivalent to `bigInt(0)` + - `bigInt.minusOne`, equivalent to `bigInt(-1)` + +The numbers from -999 to 999 are also already prestored and can be accessed using `bigInt[index]`, for example: + + - `bigInt[-999]`, equivalent to `bigInt(-999)` + - `bigInt[256]`, equivalent to `bigInt(256)` + +### Methods + +#### `abs()` + +Returns the absolute value of a bigInt. + + - `bigInt(-45).abs()` => `45` + - `bigInt(45).abs()` => `45` + +#### `add(number)` + +Performs addition. + + - `bigInt(5).add(7)` => `12` + +[View benchmarks for this method](http://peterolson.github.io/BigInteger.js/benchmark/#Addition) + +#### `and(number)` + +Performs the bitwise AND operation. The operands are treated as if they were represented using [two's complement representation](http://en.wikipedia.org/wiki/Two%27s_complement). + + - `bigInt(6).and(3)` => `2` + - `bigInt(6).and(-3)` => `4` + +#### `compare(number)` + +Performs a comparison between two numbers. If the numbers are equal, it returns `0`. If the first number is greater, it returns `1`. If the first number is lesser, it returns `-1`. + + - `bigInt(5).compare(5)` => `0` + - `bigInt(5).compare(4)` => `1` + - `bigInt(4).compare(5)` => `-1` + +#### `compareAbs(number)` + +Performs a comparison between the absolute value of two numbers. + + - `bigInt(5).compareAbs(-5)` => `0` + - `bigInt(5).compareAbs(4)` => `1` + - `bigInt(4).compareAbs(-5)` => `-1` + +#### `compareTo(number)` + +Alias for the `compare` method. + +#### `divide(number)` + +Performs integer division, disregarding the remainder. + + - `bigInt(59).divide(5)` => `11` + +[View benchmarks for this method](http://peterolson.github.io/BigInteger.js/benchmark/#Division) + +#### `divmod(number)` + +Performs division and returns an object with two properties: `quotient` and `remainder`. The sign of the remainder will match the sign of the dividend. + + - `bigInt(59).divmod(5)` => `{quotient: bigInt(11), remainder: bigInt(4) }` + - `bigInt(-5).divmod(2)` => `{quotient: bigInt(-2), remainder: bigInt(-1) }` + +[View benchmarks for this method](http://peterolson.github.io/BigInteger.js/benchmark/#Division) + +#### `eq(number)` + +Alias for the `equals` method. + +#### `equals(number)` + +Checks if two numbers are equal. + + - `bigInt(5).equals(5)` => `true` + - `bigInt(4).equals(7)` => `false` + +#### `geq(number)` + +Alias for the `greaterOrEquals` method. + + +#### `greater(number)` + +Checks if the first number is greater than the second. + + - `bigInt(5).greater(6)` => `false` + - `bigInt(5).greater(5)` => `false` + - `bigInt(5).greater(4)` => `true` + +#### `greaterOrEquals(number)` + +Checks if the first number is greater than or equal to the second. + + - `bigInt(5).greaterOrEquals(6)` => `false` + - `bigInt(5).greaterOrEquals(5)` => `true` + - `bigInt(5).greaterOrEquals(4)` => `true` + +#### `gt(number)` + +Alias for the `greater` method. + +#### `isDivisibleBy(number)` + +Returns `true` if the first number is divisible by the second number, `false` otherwise. + + - `bigInt(999).isDivisibleBy(333)` => `true` + - `bigInt(99).isDivisibleBy(5)` => `false` + +#### `isEven()` + +Returns `true` if the number is even, `false` otherwise. + + - `bigInt(6).isEven()` => `true` + - `bigInt(3).isEven()` => `false` + +#### `isNegative()` + +Returns `true` if the number is negative, `false` otherwise. +Returns `false` for `0` and `-0`. + + - `bigInt(-23).isNegative()` => `true` + - `bigInt(50).isNegative()` => `false` + +#### `isOdd()` + +Returns `true` if the number is odd, `false` otherwise. + + - `bigInt(13).isOdd()` => `true` + - `bigInt(40).isOdd()` => `false` + +#### `isPositive()` + +Return `true` if the number is positive, `false` otherwise. +Returns `false` for `0` and `-0`. + + - `bigInt(54).isPositive()` => `true` + - `bigInt(-1).isPositive()` => `false` + +#### `isPrime()` + +Returns `true` if the number is prime, `false` otherwise. + + - `bigInt(5).isPrime()` => `true` + - `bigInt(6).isPrime()` => `false` + +#### `isProbablePrime([iterations])` + +Returns `true` if the number is very likely to be prime, `false` otherwise. +Argument is optional and determines the amount of iterations of the test (default: `5`). The more iterations, the lower chance of getting a false positive. +This uses the [Fermat primality test](https://en.wikipedia.org/wiki/Fermat_primality_test). + + - `bigInt(5).isProbablePrime()` => `true` + - `bigInt(49).isProbablePrime()` => `false` + - `bigInt(1729).isProbablePrime(50)` => `false` + +Note that this function is not deterministic, since it relies on random sampling of factors, so the result for some numbers is not always the same. [Carmichael numbers](https://en.wikipedia.org/wiki/Carmichael_number) are particularly prone to give unreliable results. + +For example, `bigInt(1729).isProbablePrime()` returns `false` about 76% of the time and `true` about 24% of the time. The correct result is `false`. + +#### `isUnit()` + +Returns `true` if the number is `1` or `-1`, `false` otherwise. + + - `bigInt.one.isUnit()` => `true` + - `bigInt.minusOne.isUnit()` => `true` + - `bigInt(5).isUnit()` => `false` + +#### `isZero()` + +Return `true` if the number is `0` or `-0`, `false` otherwise. + + - `bigInt.zero.isZero()` => `true` + - `bigInt("-0").isZero()` => `true` + - `bigInt(50).isZero()` => `false` + +#### `leq(number)` + +Alias for the `lesserOrEquals` method. + +#### `lesser(number)` + +Checks if the first number is lesser than the second. + + - `bigInt(5).lesser(6)` => `true` + - `bigInt(5).lesser(5)` => `false` + - `bigInt(5).lesser(4)` => `false` + +#### `lesserOrEquals(number)` + +Checks if the first number is less than or equal to the second. + + - `bigInt(5).lesserOrEquals(6)` => `true` + - `bigInt(5).lesserOrEquals(5)` => `true` + - `bigInt(5).lesserOrEquals(4)` => `false` + +#### `lt(number)` + +Alias for the `lesser` method. + +#### `minus(number)` + +Alias for the `subtract` method. + + - `bigInt(3).minus(5)` => `-2` + +[View benchmarks for this method](http://peterolson.github.io/BigInteger.js/benchmark/#Subtraction) + +#### `mod(number)` + +Performs division and returns the remainder, disregarding the quotient. The sign of the remainder will match the sign of the dividend. + + - `bigInt(59).mod(5)` => `4` + - `bigInt(-5).mod(2)` => `-1` + +[View benchmarks for this method](http://peterolson.github.io/BigInteger.js/benchmark/#Division) + +#### `modInv(mod)` + +Finds the [multiplicative inverse](https://en.wikipedia.org/wiki/Modular_multiplicative_inverse) of the number modulo `mod`. + + - `bigInt(3).modInv(11)` => `4` + - `bigInt(42).modInv(2017)` => `1969` + +#### `modPow(exp, mod)` + +Takes the number to the power `exp` modulo `mod`. + + - `bigInt(10).modPow(3, 30)` => `10` + +#### `multiply(number)` + +Performs multiplication. + + - `bigInt(111).multiply(111)` => `12321` + +[View benchmarks for this method](http://peterolson.github.io/BigInteger.js/benchmark/#Multiplication) + +#### `neq(number)` + +Alias for the `notEquals` method. + +#### `next()` + +Adds one to the number. + + - `bigInt(6).next()` => `7` + +#### `not()` + +Performs the bitwise NOT operation. The operands are treated as if they were represented using [two's complement representation](http://en.wikipedia.org/wiki/Two%27s_complement). + + - `bigInt(10).not()` => `-11` + - `bigInt(0).not()` => `-1` + +#### `notEquals(number)` + +Checks if two numbers are not equal. + + - `bigInt(5).notEquals(5)` => `false` + - `bigInt(4).notEquals(7)` => `true` + +#### `or(number)` + +Performs the bitwise OR operation. The operands are treated as if they were represented using [two's complement representation](http://en.wikipedia.org/wiki/Two%27s_complement). + + - `bigInt(13).or(10)` => `15` + - `bigInt(13).or(-8)` => `-3` + +#### `over(number)` + +Alias for the `divide` method. + + - `bigInt(59).over(5)` => `11` + +[View benchmarks for this method](http://peterolson.github.io/BigInteger.js/benchmark/#Division) + +#### `plus(number)` + +Alias for the `add` method. + + - `bigInt(5).plus(7)` => `12` + +[View benchmarks for this method](http://peterolson.github.io/BigInteger.js/benchmark/#Addition) + +#### `pow(number)` + +Performs exponentiation. If the exponent is less than `0`, `pow` returns `0`. `bigInt.zero.pow(0)` returns `1`. + + - `bigInt(16).pow(16)` => `18446744073709551616` + +[View benchmarks for this method](http://peterolson.github.io/BigInteger.js/benchmark/#Exponentiation) + +#### `prev(number)` + +Subtracts one from the number. + + - `bigInt(6).prev()` => `5` + +#### `remainder(number)` + +Alias for the `mod` method. + +[View benchmarks for this method](http://peterolson.github.io/BigInteger.js/benchmark/#Division) + +#### `shiftLeft(n)` + +Shifts the number left by `n` places in its binary representation. If a negative number is provided, it will shift right. Throws an error if `n` is outside of the range `[-9007199254740992, 9007199254740992]`. + + - `bigInt(8).shiftLeft(2)` => `32` + - `bigInt(8).shiftLeft(-2)` => `2` + +#### `shiftRight(n)` + +Shifts the number right by `n` places in its binary representation. If a negative number is provided, it will shift left. Throws an error if `n` is outside of the range `[-9007199254740992, 9007199254740992]`. + + - `bigInt(8).shiftRight(2)` => `2` + - `bigInt(8).shiftRight(-2)` => `32` + +#### `square()` + +Squares the number + + - `bigInt(3).square()` => `9` + +[View benchmarks for this method](http://peterolson.github.io/BigInteger.js/benchmark/#Squaring) + +#### `subtract(number)` + +Performs subtraction. + + - `bigInt(3).subtract(5)` => `-2` + +[View benchmarks for this method](http://peterolson.github.io/BigInteger.js/benchmark/#Subtraction) + +#### `times(number)` + +Alias for the `multiply` method. + + - `bigInt(111).times(111)` => `12321` + +[View benchmarks for this method](http://peterolson.github.io/BigInteger.js/benchmark/#Multiplication) + +#### `toJSNumber()` + +Converts a bigInt into a native Javascript number. Loses precision for numbers outside the range `[-9007199254740992, 9007199254740992]`. + + - `bigInt("18446744073709551616").toJSNumber()` => `18446744073709552000` + +#### `xor(number)` + +Performs the bitwise XOR operation. The operands are treated as if they were represented using [two's complement representation](http://en.wikipedia.org/wiki/Two%27s_complement). + + - `bigInt(12).xor(5)` => `9` + - `bigInt(12).xor(-5)` => `-9` + +### Static Methods + +#### `fromArray(digits, base = 10, isNegative?)` + +Constructs a bigInt from an array of digits in base `base`. The optional `isNegative` flag will make the number negative. + + - `bigInt.fromArray([1, 2, 3, 4, 5], 10)` => `12345` + - `bigInt.fromArray([1, 0, 0], 2, true)` => `-4` + +#### `gcd(a, b)` + +Finds the greatest common denominator of `a` and `b`. + + - `bigInt.gcd(42,56)` => `14` + +#### `isInstance(x)` + +Returns `true` if `x` is a BigInteger, `false` otherwise. + + - `bigInt.isInstance(bigInt(14))` => `true` + - `bigInt.isInstance(14)` => `false` + +#### `lcm(a,b)` + +Finds the least common multiple of `a` and `b`. + + - `bigInt.lcm(21, 6)` => `42` + +#### `max(a,b)` + +Returns the largest of `a` and `b`. + + - `bigInt.max(77, 432)` => `432` + +#### `min(a,b)` + +Returns the smallest of `a` and `b`. + + - `bigInt.min(77, 432)` => `77` + +#### `randBetween(min, max)` + +Returns a random number between `min` and `max`. + + - `bigInt.randBetween("-1e100", "1e100")` => (for example) `8494907165436643479673097939554427056789510374838494147955756275846226209006506706784609314471378745` + + +### Override Methods + +#### `toString(radix = 10)` + +Converts a bigInt to a string. There is an optional radix parameter (which defaults to 10) that converts the number to the given radix. Digits in the range `10-35` will use the letters `a-z`. + + - `bigInt("1e9").toString()` => `"1000000000"` + - `bigInt("1e9").toString(16)` => `"3b9aca00"` + +**Note that arithmetical operators will trigger the `valueOf` function rather than the `toString` function.** When converting a bigInteger to a string, you should use the `toString` method or the `String` function instead of adding the empty string. + + - `bigInt("999999999999999999").toString()` => `"999999999999999999"` + - `String(bigInt("999999999999999999"))` => `"999999999999999999"` + - `bigInt("999999999999999999") + ""` => `1000000000000000000` + +Bases larger than 36 are supported. If a digit is greater than or equal to 36, it will be enclosed in angle brackets. + + - `bigInt(567890).toString(100)` => `"<56><78><90>"` + +Negative bases are also supported. + + - `bigInt(12345).toString(-10)` => `"28465"` + +Base 1 and base -1 are also supported. + + - `bigInt(-15).toString(1)` => `"-111111111111111"` + - `bigInt(-15).toString(-1)` => `"101010101010101010101010101010"` + +Base 0 is only allowed for the number zero. + + - `bigInt(0).toString(0)` => `0` + - `bigInt(1).toString(0)` => `Error: Cannot convert nonzero numbers to base 0.` + +[View benchmarks for this method](http://peterolson.github.io/BigInteger.js/benchmark/#toString) + +#### `valueOf()` + +Converts a bigInt to a native Javascript number. This override allows you to use native arithmetic operators without explicit conversion: + + - `bigInt("100") + bigInt("200") === 300; //true` + +## Contributors + +To contribute, just fork the project, make some changes, and submit a pull request. Please verify that the unit tests pass before submitting. + +The unit tests are contained in the `spec/spec.js` file. You can run them locally by opening the `spec/SpecRunner.html` or file or running `npm test`. You can also [run the tests online from GitHub](http://peterolson.github.io/BigInteger.js/spec/SpecRunner.html). + +There are performance benchmarks that can be viewed from the `benchmarks/index.html` page. You can [run them online from GitHub](http://peterolson.github.io/BigInteger.js/benchmark/). + +## License + +This project is public domain. For more details, read about the [Unlicense](http://unlicense.org/). diff --git a/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/big-integer/bower.json b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/big-integer/bower.json new file mode 100644 index 00000000..c7446058 --- /dev/null +++ b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/big-integer/bower.json @@ -0,0 +1,29 @@ +{ + "name": "big-integer", + "description": "An arbitrary length integer library for Javascript", + "main": "./BigInteger.js", + "authors": [ + "Peter Olson" + ], + "license": "Unlicense", + "keywords": [ + "math", + "big", + "bignum", + "bigint", + "biginteger", + "integer", + "arbitrary", + "precision", + "arithmetic" + ], + "homepage": "https://github.com/peterolson/BigInteger.js", + "ignore": [ + "**/.*", + "node_modules", + "bower_components", + "test", + "coverage", + "tests" + ] +} diff --git a/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/big-integer/package.json b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/big-integer/package.json new file mode 100644 index 00000000..d16d316e --- /dev/null +++ b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/big-integer/package.json @@ -0,0 +1,115 @@ +{ + "_args": [ + [ + { + "raw": "big-integer@^1.6.7", + "scope": null, + "escapedName": "big-integer", + "name": "big-integer", + "rawSpec": "^1.6.7", + "spec": ">=1.6.7 <2.0.0", + "type": "range" + }, + "/Users/frances.coronel/.nvm/versions/node/v6.10.1/lib/node_modules/alfred-emoj/node_modules/bplist-parser" + ] + ], + "_from": "big-integer@>=1.6.7 <2.0.0", + "_id": "big-integer@1.6.24", + "_inCache": true, + "_location": "/alfred-emoj/big-integer", + "_nodeVersion": "6.10.3", + "_npmOperationalInternal": { + "host": "s3://npm-registry-packages", + "tmp": "tmp/big-integer-1.6.24.tgz_1503027511676_0.881959781749174" + }, + "_npmUser": { + "name": "peterolson", + "email": "peter.e.c.olson+npm@gmail.com" + }, + "_npmVersion": "3.10.10", + "_phantomChildren": {}, + "_requested": { + "raw": "big-integer@^1.6.7", + "scope": null, + "escapedName": "big-integer", + "name": "big-integer", + "rawSpec": "^1.6.7", + "spec": ">=1.6.7 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/alfred-emoj/bplist-parser" + ], + "_resolved": "https://registry.npmjs.org/big-integer/-/big-integer-1.6.24.tgz", + "_shasum": "1ed84d018ac3c1c72b307e7f7d94008e8ee20311", + "_shrinkwrap": null, + "_spec": "big-integer@^1.6.7", + "_where": "/Users/frances.coronel/.nvm/versions/node/v6.10.1/lib/node_modules/alfred-emoj/node_modules/bplist-parser", + "author": { + "name": "Peter Olson", + "email": "peter.e.c.olson+npm@gmail.com" + }, + "bin": {}, + "bugs": { + "url": "https://github.com/peterolson/BigInteger.js/issues" + }, + "contributors": [], + "dependencies": {}, + "description": "An arbitrary length integer library for Javascript", + "devDependencies": { + "@types/lodash": "^4.14.64", + "@types/node": "^7.0.22", + "coveralls": "^2.11.4", + "jasmine": "2.1.x", + "jasmine-core": "^2.3.4", + "karma": "^0.13.3", + "karma-coverage": "^0.4.2", + "karma-jasmine": "^0.3.6", + "karma-phantomjs-launcher": "^1.0.4", + "lodash": "^4.17.4", + "typescript": "^2.3.3", + "uglifyjs": "^2.4.10" + }, + "directories": {}, + "dist": { + "shasum": "1ed84d018ac3c1c72b307e7f7d94008e8ee20311", + "tarball": "https://registry.npmjs.org/big-integer/-/big-integer-1.6.24.tgz" + }, + "engines": { + "node": ">=0.6" + }, + "gitHead": "8ac5ef5b7c4abce8e943776fa2f18d3d41697988", + "homepage": "https://github.com/peterolson/BigInteger.js#readme", + "keywords": [ + "math", + "big", + "bignum", + "bigint", + "biginteger", + "integer", + "arbitrary", + "precision", + "arithmetic" + ], + "license": "Unlicense", + "main": "./BigInteger", + "maintainers": [ + { + "name": "peterolson", + "email": "peter.e.c.olson+npm@gmail.com" + } + ], + "name": "big-integer", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+ssh://git@github.com/peterolson/BigInteger.js.git" + }, + "scripts": { + "minify": "uglifyjs BigInteger.js -o BigInteger.min.js", + "test": "tsc && node_modules/.bin/karma start my.conf.js && node spec/tsDefinitions.js" + }, + "typings": "./BigInteger.d.ts", + "version": "1.6.24" +} diff --git a/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/big-integer/tsconfig.json b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/big-integer/tsconfig.json new file mode 100644 index 00000000..920c4ceb --- /dev/null +++ b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/big-integer/tsconfig.json @@ -0,0 +1,25 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": false, + "baseUrl": "./", + "moduleResolution": "node", + "allowJs": true, + "typeRoots": [ + "./" + ], + "types": [ + "node" + ], + "forceConsistentCasingInFileNames": true + }, + "files": [ + "BigInteger.d.ts", + "spec/tsDefinitions.ts" + ] +} \ No newline at end of file diff --git a/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/bplist-parser/.npmignore b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/bplist-parser/.npmignore new file mode 100644 index 00000000..a9b46eab --- /dev/null +++ b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/bplist-parser/.npmignore @@ -0,0 +1,8 @@ +/build/* +node_modules +*.node +*.sh +*.swp +.lock* +npm-debug.log +.idea diff --git a/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/bplist-parser/README.md b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/bplist-parser/README.md new file mode 100644 index 00000000..37e5e1c4 --- /dev/null +++ b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/bplist-parser/README.md @@ -0,0 +1,47 @@ +bplist-parser +============= + +Binary Mac OS X Plist (property list) parser. + +## Installation + +```bash +$ npm install bplist-parser +``` + +## Quick Examples + +```javascript +var bplist = require('bplist-parser'); + +bplist.parseFile('myPlist.bplist', function(err, obj) { + if (err) throw err; + + console.log(JSON.stringify(obj)); +}); +``` + +## License + +(The MIT License) + +Copyright (c) 2012 Near Infinity Corporation + +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/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/bplist-parser/bplistParser.js b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/bplist-parser/bplistParser.js new file mode 100644 index 00000000..f8335bcd --- /dev/null +++ b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/bplist-parser/bplistParser.js @@ -0,0 +1,357 @@ +'use strict'; + +// adapted from http://code.google.com/p/plist/source/browse/trunk/src/com/dd/plist/BinaryPropertyListParser.java + +var fs = require('fs'); +var bigInt = require("big-integer"); +var debug = false; + +exports.maxObjectSize = 100 * 1000 * 1000; // 100Meg +exports.maxObjectCount = 32768; + +// EPOCH = new SimpleDateFormat("yyyy MM dd zzz").parse("2001 01 01 GMT").getTime(); +// ...but that's annoying in a static initializer because it can throw exceptions, ick. +// So we just hardcode the correct value. +var EPOCH = 978307200000; + +// UID object definition +var UID = exports.UID = function(id) { + this.UID = id; +} + +var parseFile = exports.parseFile = function (fileNameOrBuffer, callback) { + function tryParseBuffer(buffer) { + var err = null; + var result; + try { + result = parseBuffer(buffer); + } catch (ex) { + err = ex; + } + callback(err, result); + } + + if (Buffer.isBuffer(fileNameOrBuffer)) { + return tryParseBuffer(fileNameOrBuffer); + } else { + fs.readFile(fileNameOrBuffer, function (err, data) { + if (err) { return callback(err); } + tryParseBuffer(data); + }); + } +}; + +var parseBuffer = exports.parseBuffer = function (buffer) { + var result = {}; + + // check header + var header = buffer.slice(0, 'bplist'.length).toString('utf8'); + if (header !== 'bplist') { + throw new Error("Invalid binary plist. Expected 'bplist' at offset 0."); + } + + // Handle trailer, last 32 bytes of the file + var trailer = buffer.slice(buffer.length - 32, buffer.length); + // 6 null bytes (index 0 to 5) + var offsetSize = trailer.readUInt8(6); + if (debug) { + console.log("offsetSize: " + offsetSize); + } + var objectRefSize = trailer.readUInt8(7); + if (debug) { + console.log("objectRefSize: " + objectRefSize); + } + var numObjects = readUInt64BE(trailer, 8); + if (debug) { + console.log("numObjects: " + numObjects); + } + var topObject = readUInt64BE(trailer, 16); + if (debug) { + console.log("topObject: " + topObject); + } + var offsetTableOffset = readUInt64BE(trailer, 24); + if (debug) { + console.log("offsetTableOffset: " + offsetTableOffset); + } + + if (numObjects > exports.maxObjectCount) { + throw new Error("maxObjectCount exceeded"); + } + + // Handle offset table + var offsetTable = []; + + for (var i = 0; i < numObjects; i++) { + var offsetBytes = buffer.slice(offsetTableOffset + i * offsetSize, offsetTableOffset + (i + 1) * offsetSize); + offsetTable[i] = readUInt(offsetBytes, 0); + if (debug) { + console.log("Offset for Object #" + i + " is " + offsetTable[i] + " [" + offsetTable[i].toString(16) + "]"); + } + } + + // Parses an object inside the currently parsed binary property list. + // For the format specification check + // + // Apple's binary property list parser implementation. + function parseObject(tableOffset) { + var offset = offsetTable[tableOffset]; + var type = buffer[offset]; + var objType = (type & 0xF0) >> 4; //First 4 bits + var objInfo = (type & 0x0F); //Second 4 bits + switch (objType) { + case 0x0: + return parseSimple(); + case 0x1: + return parseInteger(); + case 0x8: + return parseUID(); + case 0x2: + return parseReal(); + case 0x3: + return parseDate(); + case 0x4: + return parseData(); + case 0x5: // ASCII + return parsePlistString(); + case 0x6: // UTF-16 + return parsePlistString(true); + case 0xA: + return parseArray(); + case 0xD: + return parseDictionary(); + default: + throw new Error("Unhandled type 0x" + objType.toString(16)); + } + + function parseSimple() { + //Simple + switch (objInfo) { + case 0x0: // null + return null; + case 0x8: // false + return false; + case 0x9: // true + return true; + case 0xF: // filler byte + return null; + default: + throw new Error("Unhandled simple type 0x" + objType.toString(16)); + } + } + + function bufferToHexString(buffer) { + var str = ''; + var i; + for (i = 0; i < buffer.length; i++) { + if (buffer[i] != 0x00) { + break; + } + } + for (; i < buffer.length; i++) { + var part = '00' + buffer[i].toString(16); + str += part.substr(part.length - 2); + } + return str; + } + + function parseInteger() { + var length = Math.pow(2, objInfo); + if (length > 4) { + var data = buffer.slice(offset + 1, offset + 1 + length); + var str = bufferToHexString(data); + return bigInt(str, 16); + } if (length < exports.maxObjectSize) { + return readUInt(buffer.slice(offset + 1, offset + 1 + length)); + } else { + throw new Error("To little heap space available! Wanted to read " + length + " bytes, but only " + exports.maxObjectSize + " are available."); + } + } + + function parseUID() { + var length = objInfo + 1; + if (length < exports.maxObjectSize) { + return new UID(readUInt(buffer.slice(offset + 1, offset + 1 + length))); + } else { + throw new Error("To little heap space available! Wanted to read " + length + " bytes, but only " + exports.maxObjectSize + " are available."); + } + } + + function parseReal() { + var length = Math.pow(2, objInfo); + if (length < exports.maxObjectSize) { + var realBuffer = buffer.slice(offset + 1, offset + 1 + length); + if (length === 4) { + return realBuffer.readFloatBE(0); + } + else if (length === 8) { + return realBuffer.readDoubleBE(0); + } + } else { + throw new Error("To little heap space available! Wanted to read " + length + " bytes, but only " + exports.maxObjectSize + " are available."); + } + } + + function parseDate() { + if (objInfo != 0x3) { + console.error("Unknown date type :" + objInfo + ". Parsing anyway..."); + } + var dateBuffer = buffer.slice(offset + 1, offset + 9); + return new Date(EPOCH + (1000 * dateBuffer.readDoubleBE(0))); + } + + function parseData() { + var dataoffset = 1; + var length = objInfo; + if (objInfo == 0xF) { + var int_type = buffer[offset + 1]; + var intType = (int_type & 0xF0) / 0x10; + if (intType != 0x1) { + console.error("0x4: UNEXPECTED LENGTH-INT TYPE! " + intType); + } + var intInfo = int_type & 0x0F; + var intLength = Math.pow(2, intInfo); + dataoffset = 2 + intLength; + if (intLength < 3) { + length = readUInt(buffer.slice(offset + 2, offset + 2 + intLength)); + } else { + length = readUInt(buffer.slice(offset + 2, offset + 2 + intLength)); + } + } + if (length < exports.maxObjectSize) { + return buffer.slice(offset + dataoffset, offset + dataoffset + length); + } else { + throw new Error("To little heap space available! Wanted to read " + length + " bytes, but only " + exports.maxObjectSize + " are available."); + } + } + + function parsePlistString (isUtf16) { + isUtf16 = isUtf16 || 0; + var enc = "utf8"; + var length = objInfo; + var stroffset = 1; + if (objInfo == 0xF) { + var int_type = buffer[offset + 1]; + var intType = (int_type & 0xF0) / 0x10; + if (intType != 0x1) { + console.err("UNEXPECTED LENGTH-INT TYPE! " + intType); + } + var intInfo = int_type & 0x0F; + var intLength = Math.pow(2, intInfo); + var stroffset = 2 + intLength; + if (intLength < 3) { + length = readUInt(buffer.slice(offset + 2, offset + 2 + intLength)); + } else { + length = readUInt(buffer.slice(offset + 2, offset + 2 + intLength)); + } + } + // length is String length -> to get byte length multiply by 2, as 1 character takes 2 bytes in UTF-16 + length *= (isUtf16 + 1); + if (length < exports.maxObjectSize) { + var plistString = new Buffer(buffer.slice(offset + stroffset, offset + stroffset + length)); + if (isUtf16) { + plistString = swapBytes(plistString); + enc = "ucs2"; + } + return plistString.toString(enc); + } else { + throw new Error("To little heap space available! Wanted to read " + length + " bytes, but only " + exports.maxObjectSize + " are available."); + } + } + + function parseArray() { + var length = objInfo; + var arrayoffset = 1; + if (objInfo == 0xF) { + var int_type = buffer[offset + 1]; + var intType = (int_type & 0xF0) / 0x10; + if (intType != 0x1) { + console.error("0xa: UNEXPECTED LENGTH-INT TYPE! " + intType); + } + var intInfo = int_type & 0x0F; + var intLength = Math.pow(2, intInfo); + arrayoffset = 2 + intLength; + if (intLength < 3) { + length = readUInt(buffer.slice(offset + 2, offset + 2 + intLength)); + } else { + length = readUInt(buffer.slice(offset + 2, offset + 2 + intLength)); + } + } + if (length * objectRefSize > exports.maxObjectSize) { + throw new Error("To little heap space available!"); + } + var array = []; + for (var i = 0; i < length; i++) { + var objRef = readUInt(buffer.slice(offset + arrayoffset + i * objectRefSize, offset + arrayoffset + (i + 1) * objectRefSize)); + array[i] = parseObject(objRef); + } + return array; + } + + function parseDictionary() { + var length = objInfo; + var dictoffset = 1; + if (objInfo == 0xF) { + var int_type = buffer[offset + 1]; + var intType = (int_type & 0xF0) / 0x10; + if (intType != 0x1) { + console.error("0xD: UNEXPECTED LENGTH-INT TYPE! " + intType); + } + var intInfo = int_type & 0x0F; + var intLength = Math.pow(2, intInfo); + dictoffset = 2 + intLength; + if (intLength < 3) { + length = readUInt(buffer.slice(offset + 2, offset + 2 + intLength)); + } else { + length = readUInt(buffer.slice(offset + 2, offset + 2 + intLength)); + } + } + if (length * 2 * objectRefSize > exports.maxObjectSize) { + throw new Error("To little heap space available!"); + } + if (debug) { + console.log("Parsing dictionary #" + tableOffset); + } + var dict = {}; + for (var i = 0; i < length; i++) { + var keyRef = readUInt(buffer.slice(offset + dictoffset + i * objectRefSize, offset + dictoffset + (i + 1) * objectRefSize)); + var valRef = readUInt(buffer.slice(offset + dictoffset + (length * objectRefSize) + i * objectRefSize, offset + dictoffset + (length * objectRefSize) + (i + 1) * objectRefSize)); + var key = parseObject(keyRef); + var val = parseObject(valRef); + if (debug) { + console.log(" DICT #" + tableOffset + ": Mapped " + key + " to " + val); + } + dict[key] = val; + } + return dict; + } + } + + return [ parseObject(topObject) ]; +}; + +function readUInt(buffer, start) { + start = start || 0; + + var l = 0; + for (var i = start; i < buffer.length; i++) { + l <<= 8; + l |= buffer[i] & 0xFF; + } + return l; +} + +// we're just going to toss the high order bits because javascript doesn't have 64-bit ints +function readUInt64BE(buffer, start) { + var data = buffer.slice(start, start + 8); + return data.readUInt32BE(4, 8); +} + +function swapBytes(buffer) { + var len = buffer.length; + for (var i = 0; i < len; i += 2) { + var a = buffer[i]; + buffer[i] = buffer[i+1]; + buffer[i+1] = a; + } + return buffer; +} diff --git a/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/bplist-parser/package.json b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/bplist-parser/package.json new file mode 100644 index 00000000..3e9ad35a --- /dev/null +++ b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/bplist-parser/package.json @@ -0,0 +1,89 @@ +{ + "_args": [ + [ + { + "raw": "bplist-parser@^0.1.1", + "scope": null, + "escapedName": "bplist-parser", + "name": "bplist-parser", + "rawSpec": "^0.1.1", + "spec": ">=0.1.1 <0.2.0", + "type": "range" + }, + "/Users/frances.coronel/.nvm/versions/node/v6.10.1/lib/node_modules/alfred-emoj/node_modules/resolve-alfred-prefs" + ] + ], + "_from": "bplist-parser@>=0.1.1 <0.2.0", + "_id": "bplist-parser@0.1.1", + "_inCache": true, + "_location": "/alfred-emoj/bplist-parser", + "_nodeVersion": "5.1.0", + "_npmUser": { + "name": "joeferner", + "email": "joe@fernsroth.com" + }, + "_npmVersion": "3.4.0", + "_phantomChildren": {}, + "_requested": { + "raw": "bplist-parser@^0.1.1", + "scope": null, + "escapedName": "bplist-parser", + "name": "bplist-parser", + "rawSpec": "^0.1.1", + "spec": ">=0.1.1 <0.2.0", + "type": "range" + }, + "_requiredBy": [ + "/alfred-emoj/resolve-alfred-prefs" + ], + "_resolved": "https://registry.npmjs.org/bplist-parser/-/bplist-parser-0.1.1.tgz", + "_shasum": "d60d5dcc20cba6dc7e1f299b35d3e1f95dafbae6", + "_shrinkwrap": null, + "_spec": "bplist-parser@^0.1.1", + "_where": "/Users/frances.coronel/.nvm/versions/node/v6.10.1/lib/node_modules/alfred-emoj/node_modules/resolve-alfred-prefs", + "author": { + "name": "Joe Ferner", + "email": "joe.ferner@nearinfinity.com" + }, + "bugs": { + "url": "https://github.com/nearinfinity/node-bplist-parser/issues" + }, + "dependencies": { + "big-integer": "^1.6.7" + }, + "description": "Binary plist parser.", + "devDependencies": { + "nodeunit": "~0.9.1" + }, + "directories": {}, + "dist": { + "shasum": "d60d5dcc20cba6dc7e1f299b35d3e1f95dafbae6", + "tarball": "https://registry.npmjs.org/bplist-parser/-/bplist-parser-0.1.1.tgz" + }, + "gitHead": "c4f22650de2cc95edd21a6e609ff0654a2b951bd", + "homepage": "https://github.com/nearinfinity/node-bplist-parser#readme", + "keywords": [ + "bplist", + "plist", + "parser" + ], + "license": "MIT", + "main": "bplistParser.js", + "maintainers": [ + { + "name": "joeferner", + "email": "joe@fernsroth.com" + } + ], + "name": "bplist-parser", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/nearinfinity/node-bplist-parser.git" + }, + "scripts": { + "test": "./node_modules/nodeunit/bin/nodeunit test" + }, + "version": "0.1.1" +} diff --git a/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/bplist-parser/test/airplay.bplist b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/bplist-parser/test/airplay.bplist new file mode 100644 index 00000000..931adea1 Binary files /dev/null and b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/bplist-parser/test/airplay.bplist differ diff --git a/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/bplist-parser/test/iTunes-small.bplist b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/bplist-parser/test/iTunes-small.bplist new file mode 100644 index 00000000..b7edb14a Binary files /dev/null and b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/bplist-parser/test/iTunes-small.bplist differ diff --git a/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/bplist-parser/test/int64.bplist b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/bplist-parser/test/int64.bplist new file mode 100644 index 00000000..6da9c046 Binary files /dev/null and b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/bplist-parser/test/int64.bplist differ diff --git a/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/bplist-parser/test/int64.xml b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/bplist-parser/test/int64.xml new file mode 100644 index 00000000..cc6cb03d --- /dev/null +++ b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/bplist-parser/test/int64.xml @@ -0,0 +1,10 @@ + + + + + zero + 0 + int64item + 12345678901234567890 + + diff --git a/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/bplist-parser/test/parseTest.js b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/bplist-parser/test/parseTest.js new file mode 100644 index 00000000..67e7bfa4 --- /dev/null +++ b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/bplist-parser/test/parseTest.js @@ -0,0 +1,159 @@ +'use strict'; + +// tests are adapted from https://github.com/TooTallNate/node-plist + +var path = require('path'); +var nodeunit = require('nodeunit'); +var bplist = require('../'); + +module.exports = { + 'iTunes Small': function (test) { + var file = path.join(__dirname, "iTunes-small.bplist"); + var startTime1 = new Date(); + + bplist.parseFile(file, function (err, dicts) { + if (err) { + throw err; + } + + var endTime = new Date(); + console.log('Parsed "' + file + '" in ' + (endTime - startTime1) + 'ms'); + var dict = dicts[0]; + test.equal(dict['Application Version'], "9.0.3"); + test.equal(dict['Library Persistent ID'], "6F81D37F95101437"); + test.done(); + }); + }, + + 'sample1': function (test) { + var file = path.join(__dirname, "sample1.bplist"); + var startTime = new Date(); + + bplist.parseFile(file, function (err, dicts) { + if (err) { + throw err; + } + + var endTime = new Date(); + console.log('Parsed "' + file + '" in ' + (endTime - startTime) + 'ms'); + var dict = dicts[0]; + test.equal(dict['CFBundleIdentifier'], 'com.apple.dictionary.MySample'); + test.done(); + }); + }, + + 'sample2': function (test) { + var file = path.join(__dirname, "sample2.bplist"); + var startTime = new Date(); + + bplist.parseFile(file, function (err, dicts) { + if (err) { + throw err; + } + + var endTime = new Date(); + console.log('Parsed "' + file + '" in ' + (endTime - startTime) + 'ms'); + var dict = dicts[0]; + test.equal(dict['PopupMenu'][2]['Key'], "\n #import \n\n#import \n\nint main(int argc, char *argv[])\n{\n return macruby_main(\"rb_main.rb\", argc, argv);\n}\n"); + test.done(); + }); + }, + + 'airplay': function (test) { + var file = path.join(__dirname, "airplay.bplist"); + var startTime = new Date(); + + bplist.parseFile(file, function (err, dicts) { + if (err) { + throw err; + } + + var endTime = new Date(); + console.log('Parsed "' + file + '" in ' + (endTime - startTime) + 'ms'); + + var dict = dicts[0]; + test.equal(dict['duration'], 5555.0495000000001); + test.equal(dict['position'], 4.6269989039999997); + test.done(); + }); + }, + + 'utf16': function (test) { + var file = path.join(__dirname, "utf16.bplist"); + var startTime = new Date(); + + bplist.parseFile(file, function (err, dicts) { + if (err) { + throw err; + } + + var endTime = new Date(); + console.log('Parsed "' + file + '" in ' + (endTime - startTime) + 'ms'); + + var dict = dicts[0]; + test.equal(dict['CFBundleName'], 'sellStuff'); + test.equal(dict['CFBundleShortVersionString'], '2.6.1'); + test.equal(dict['NSHumanReadableCopyright'], '©2008-2012, sellStuff, Inc.'); + test.done(); + }); + }, + + 'utf16chinese': function (test) { + var file = path.join(__dirname, "utf16_chinese.plist"); + var startTime = new Date(); + + bplist.parseFile(file, function (err, dicts) { + if (err) { + throw err; + } + + var endTime = new Date(); + console.log('Parsed "' + file + '" in ' + (endTime - startTime) + 'ms'); + + var dict = dicts[0]; + test.equal(dict['CFBundleName'], '天翼阅读'); + test.equal(dict['CFBundleDisplayName'], '天翼阅读'); + test.done(); + }); + }, + + + + 'uid': function (test) { + var file = path.join(__dirname, "uid.bplist"); + var startTime = new Date(); + + bplist.parseFile(file, function (err, dicts) { + if (err) { + throw err; + } + + var endTime = new Date(); + console.log('Parsed "' + file + '" in ' + (endTime - startTime) + 'ms'); + + var dict = dicts[0]; + test.deepEqual(dict['$objects'][1]['NS.keys'], [{UID:2}, {UID:3}, {UID:4}]); + test.deepEqual(dict['$objects'][1]['NS.objects'], [{UID: 5}, {UID:6}, {UID:7}]); + test.deepEqual(dict['$top']['root'], {UID:1}); + test.done(); + }); + }, + + 'int64': function (test) { + var file = path.join(__dirname, "int64.bplist"); + var startTime = new Date(); + + bplist.parseFile(file, function (err, dicts) { + if (err) { + throw err; + } + + var endTime = new Date(); + console.log('Parsed "' + file + '" in ' + (endTime - startTime) + 'ms'); + var dict = dicts[0]; + test.equal(dict['zero'], '0'); + test.equal(dict['int64item'], '12345678901234567890'); + test.done(); + }); + } +}; diff --git a/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/bplist-parser/test/sample1.bplist b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/bplist-parser/test/sample1.bplist new file mode 100644 index 00000000..5b808ff2 Binary files /dev/null and b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/bplist-parser/test/sample1.bplist differ diff --git a/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/bplist-parser/test/sample2.bplist b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/bplist-parser/test/sample2.bplist new file mode 100644 index 00000000..fc429798 Binary files /dev/null and b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/bplist-parser/test/sample2.bplist differ diff --git a/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/bplist-parser/test/uid.bplist b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/bplist-parser/test/uid.bplist new file mode 100644 index 00000000..59f341e0 Binary files /dev/null and b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/bplist-parser/test/uid.bplist differ diff --git a/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/bplist-parser/test/utf16.bplist b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/bplist-parser/test/utf16.bplist new file mode 100644 index 00000000..ba4bcfa9 Binary files /dev/null and b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/bplist-parser/test/utf16.bplist differ diff --git a/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/bplist-parser/test/utf16_chinese.plist b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/bplist-parser/test/utf16_chinese.plist new file mode 100755 index 00000000..ba1e2d7f Binary files /dev/null and b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/bplist-parser/test/utf16_chinese.plist differ diff --git a/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/brace-expansion/README.md b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/brace-expansion/README.md new file mode 100644 index 00000000..ed2ec1fd --- /dev/null +++ b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/brace-expansion/README.md @@ -0,0 +1,123 @@ +# brace-expansion + +[Brace expansion](https://www.gnu.org/software/bash/manual/html_node/Brace-Expansion.html), +as known from sh/bash, in JavaScript. + +[![build status](https://secure.travis-ci.org/juliangruber/brace-expansion.svg)](http://travis-ci.org/juliangruber/brace-expansion) +[![downloads](https://img.shields.io/npm/dm/brace-expansion.svg)](https://www.npmjs.org/package/brace-expansion) +[![Greenkeeper badge](https://badges.greenkeeper.io/juliangruber/brace-expansion.svg)](https://greenkeeper.io/) + +[![testling badge](https://ci.testling.com/juliangruber/brace-expansion.png)](https://ci.testling.com/juliangruber/brace-expansion) + +## Example + +```js +var expand = require('brace-expansion'); + +expand('file-{a,b,c}.jpg') +// => ['file-a.jpg', 'file-b.jpg', 'file-c.jpg'] + +expand('-v{,,}') +// => ['-v', '-v', '-v'] + +expand('file{0..2}.jpg') +// => ['file0.jpg', 'file1.jpg', 'file2.jpg'] + +expand('file-{a..c}.jpg') +// => ['file-a.jpg', 'file-b.jpg', 'file-c.jpg'] + +expand('file{2..0}.jpg') +// => ['file2.jpg', 'file1.jpg', 'file0.jpg'] + +expand('file{0..4..2}.jpg') +// => ['file0.jpg', 'file2.jpg', 'file4.jpg'] + +expand('file-{a..e..2}.jpg') +// => ['file-a.jpg', 'file-c.jpg', 'file-e.jpg'] + +expand('file{00..10..5}.jpg') +// => ['file00.jpg', 'file05.jpg', 'file10.jpg'] + +expand('{{A..C},{a..c}}') +// => ['A', 'B', 'C', 'a', 'b', 'c'] + +expand('ppp{,config,oe{,conf}}') +// => ['ppp', 'pppconfig', 'pppoe', 'pppoeconf'] +``` + +## API + +```js +var expand = require('brace-expansion'); +``` + +### var expanded = expand(str) + +Return an array of all possible and valid expansions of `str`. If none are +found, `[str]` is returned. + +Valid expansions are: + +```js +/^(.*,)+(.+)?$/ +// {a,b,...} +``` + +A comma seperated list of options, like `{a,b}` or `{a,{b,c}}` or `{,a,}`. + +```js +/^-?\d+\.\.-?\d+(\.\.-?\d+)?$/ +// {x..y[..incr]} +``` + +A numeric sequence from `x` to `y` inclusive, with optional increment. +If `x` or `y` start with a leading `0`, all the numbers will be padded +to have equal length. Negative numbers and backwards iteration work too. + +```js +/^-?\d+\.\.-?\d+(\.\.-?\d+)?$/ +// {x..y[..incr]} +``` + +An alphabetic sequence from `x` to `y` inclusive, with optional increment. +`x` and `y` must be exactly one character, and if given, `incr` must be a +number. + +For compatibility reasons, the string `${` is not eligible for brace expansion. + +## Installation + +With [npm](https://npmjs.org) do: + +```bash +npm install brace-expansion +``` + +## Contributors + +- [Julian Gruber](https://github.com/juliangruber) +- [Isaac Z. Schlueter](https://github.com/isaacs) + +## License + +(MIT) + +Copyright (c) 2013 Julian Gruber <julian@juliangruber.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/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/brace-expansion/index.js b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/brace-expansion/index.js new file mode 100644 index 00000000..0478be81 --- /dev/null +++ b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/brace-expansion/index.js @@ -0,0 +1,201 @@ +var concatMap = require('concat-map'); +var balanced = require('balanced-match'); + +module.exports = expandTop; + +var escSlash = '\0SLASH'+Math.random()+'\0'; +var escOpen = '\0OPEN'+Math.random()+'\0'; +var escClose = '\0CLOSE'+Math.random()+'\0'; +var escComma = '\0COMMA'+Math.random()+'\0'; +var escPeriod = '\0PERIOD'+Math.random()+'\0'; + +function numeric(str) { + return parseInt(str, 10) == str + ? parseInt(str, 10) + : str.charCodeAt(0); +} + +function escapeBraces(str) { + return str.split('\\\\').join(escSlash) + .split('\\{').join(escOpen) + .split('\\}').join(escClose) + .split('\\,').join(escComma) + .split('\\.').join(escPeriod); +} + +function unescapeBraces(str) { + return str.split(escSlash).join('\\') + .split(escOpen).join('{') + .split(escClose).join('}') + .split(escComma).join(',') + .split(escPeriod).join('.'); +} + + +// Basically just str.split(","), but handling cases +// where we have nested braced sections, which should be +// treated as individual members, like {a,{b,c},d} +function parseCommaParts(str) { + if (!str) + return ['']; + + var parts = []; + var m = balanced('{', '}', str); + + if (!m) + return str.split(','); + + var pre = m.pre; + var body = m.body; + var post = m.post; + var p = pre.split(','); + + p[p.length-1] += '{' + body + '}'; + var postParts = parseCommaParts(post); + if (post.length) { + p[p.length-1] += postParts.shift(); + p.push.apply(p, postParts); + } + + parts.push.apply(parts, p); + + return parts; +} + +function expandTop(str) { + if (!str) + return []; + + // I don't know why Bash 4.3 does this, but it does. + // Anything starting with {} will have the first two bytes preserved + // but *only* at the top level, so {},a}b will not expand to anything, + // but a{},b}c will be expanded to [a}c,abc]. + // One could argue that this is a bug in Bash, but since the goal of + // this module is to match Bash's rules, we escape a leading {} + if (str.substr(0, 2) === '{}') { + str = '\\{\\}' + str.substr(2); + } + + return expand(escapeBraces(str), true).map(unescapeBraces); +} + +function identity(e) { + return e; +} + +function embrace(str) { + return '{' + str + '}'; +} +function isPadded(el) { + return /^-?0\d/.test(el); +} + +function lte(i, y) { + return i <= y; +} +function gte(i, y) { + return i >= y; +} + +function expand(str, isTop) { + var expansions = []; + + var m = balanced('{', '}', str); + if (!m || /\$$/.test(m.pre)) return [str]; + + var isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body); + var isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body); + var isSequence = isNumericSequence || isAlphaSequence; + var isOptions = m.body.indexOf(',') >= 0; + if (!isSequence && !isOptions) { + // {a},b} + if (m.post.match(/,.*\}/)) { + str = m.pre + '{' + m.body + escClose + m.post; + return expand(str); + } + return [str]; + } + + var n; + if (isSequence) { + n = m.body.split(/\.\./); + } else { + n = parseCommaParts(m.body); + if (n.length === 1) { + // x{{a,b}}y ==> x{a}y x{b}y + n = expand(n[0], false).map(embrace); + if (n.length === 1) { + var post = m.post.length + ? expand(m.post, false) + : ['']; + return post.map(function(p) { + return m.pre + n[0] + p; + }); + } + } + } + + // at this point, n is the parts, and we know it's not a comma set + // with a single entry. + + // no need to expand pre, since it is guaranteed to be free of brace-sets + var pre = m.pre; + var post = m.post.length + ? expand(m.post, false) + : ['']; + + var N; + + if (isSequence) { + var x = numeric(n[0]); + var y = numeric(n[1]); + var width = Math.max(n[0].length, n[1].length) + var incr = n.length == 3 + ? Math.abs(numeric(n[2])) + : 1; + var test = lte; + var reverse = y < x; + if (reverse) { + incr *= -1; + test = gte; + } + var pad = n.some(isPadded); + + N = []; + + for (var i = x; test(i, y); i += incr) { + var c; + if (isAlphaSequence) { + c = String.fromCharCode(i); + if (c === '\\') + c = ''; + } else { + c = String(i); + if (pad) { + var need = width - c.length; + if (need > 0) { + var z = new Array(need + 1).join('0'); + if (i < 0) + c = '-' + z + c.slice(1); + else + c = z + c; + } + } + } + N.push(c); + } + } else { + N = concatMap(n, function(el) { return expand(el, false) }); + } + + for (var j = 0; j < N.length; j++) { + for (var k = 0; k < post.length; k++) { + var expansion = pre + N[j] + post[k]; + if (!isTop || isSequence || expansion) + expansions.push(expansion); + } + } + + return expansions; +} + diff --git a/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/brace-expansion/package.json b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/brace-expansion/package.json new file mode 100644 index 00000000..c99d1904 --- /dev/null +++ b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/brace-expansion/package.json @@ -0,0 +1,114 @@ +{ + "_args": [ + [ + { + "raw": "brace-expansion@^1.1.7", + "scope": null, + "escapedName": "brace-expansion", + "name": "brace-expansion", + "rawSpec": "^1.1.7", + "spec": ">=1.1.7 <2.0.0", + "type": "range" + }, + "/Users/frances.coronel/.nvm/versions/node/v6.10.1/lib/node_modules/alfred-emoj/node_modules/minimatch" + ] + ], + "_from": "brace-expansion@>=1.1.7 <2.0.0", + "_id": "brace-expansion@1.1.8", + "_inCache": true, + "_location": "/alfred-emoj/brace-expansion", + "_nodeVersion": "7.8.0", + "_npmOperationalInternal": { + "host": "s3://npm-registry-packages", + "tmp": "tmp/brace-expansion-1.1.8.tgz_1497251980593_0.6575565172825009" + }, + "_npmUser": { + "name": "juliangruber", + "email": "julian@juliangruber.com" + }, + "_npmVersion": "4.2.0", + "_phantomChildren": {}, + "_requested": { + "raw": "brace-expansion@^1.1.7", + "scope": null, + "escapedName": "brace-expansion", + "name": "brace-expansion", + "rawSpec": "^1.1.7", + "spec": ">=1.1.7 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/alfred-emoj/minimatch" + ], + "_resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.8.tgz", + "_shasum": "c07b211c7c952ec1f8efd51a77ef0d1d3990a292", + "_shrinkwrap": null, + "_spec": "brace-expansion@^1.1.7", + "_where": "/Users/frances.coronel/.nvm/versions/node/v6.10.1/lib/node_modules/alfred-emoj/node_modules/minimatch", + "author": { + "name": "Julian Gruber", + "email": "mail@juliangruber.com", + "url": "http://juliangruber.com" + }, + "bugs": { + "url": "https://github.com/juliangruber/brace-expansion/issues" + }, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + }, + "description": "Brace expansion as known from sh/bash", + "devDependencies": { + "matcha": "^0.7.0", + "tape": "^4.6.0" + }, + "directories": {}, + "dist": { + "shasum": "c07b211c7c952ec1f8efd51a77ef0d1d3990a292", + "tarball": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.8.tgz" + }, + "gitHead": "8f59e68bd5c915a0d624e8e39354e1ccf672edf6", + "homepage": "https://github.com/juliangruber/brace-expansion", + "keywords": [], + "license": "MIT", + "main": "index.js", + "maintainers": [ + { + "name": "juliangruber", + "email": "julian@juliangruber.com" + }, + { + "name": "isaacs", + "email": "isaacs@npmjs.com" + } + ], + "name": "brace-expansion", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/juliangruber/brace-expansion.git" + }, + "scripts": { + "bench": "matcha test/perf/bench.js", + "gentest": "bash test/generate.sh", + "test": "tape test/*.js" + }, + "testling": { + "files": "test/*.js", + "browsers": [ + "ie/8..latest", + "firefox/20..latest", + "firefox/nightly", + "chrome/25..latest", + "chrome/canary", + "opera/12..latest", + "opera/next", + "safari/5.1..latest", + "ipad/6.0..latest", + "iphone/6.0..latest", + "android-browser/4.2..latest" + ] + }, + "version": "1.1.8" +} diff --git a/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/builtin-modules/builtin-modules.json b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/builtin-modules/builtin-modules.json new file mode 100644 index 00000000..72670f6b --- /dev/null +++ b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/builtin-modules/builtin-modules.json @@ -0,0 +1,35 @@ +[ + "assert", + "buffer", + "child_process", + "cluster", + "console", + "constants", + "crypto", + "dgram", + "dns", + "domain", + "events", + "fs", + "http", + "https", + "module", + "net", + "os", + "path", + "process", + "punycode", + "querystring", + "readline", + "repl", + "stream", + "string_decoder", + "timers", + "tls", + "tty", + "url", + "util", + "v8", + "vm", + "zlib" +] diff --git a/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/builtin-modules/index.js b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/builtin-modules/index.js new file mode 100644 index 00000000..9ef35ab0 --- /dev/null +++ b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/builtin-modules/index.js @@ -0,0 +1,10 @@ +'use strict'; + +var blacklist = [ + 'freelist', + 'sys' +]; + +module.exports = Object.keys(process.binding('natives')).filter(function (el) { + return !/^_|^internal|\//.test(el) && blacklist.indexOf(el) === -1; +}).sort(); diff --git a/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/builtin-modules/license b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/builtin-modules/license new file mode 100644 index 00000000..654d0bfe --- /dev/null +++ b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/builtin-modules/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +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/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/builtin-modules/package.json b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/builtin-modules/package.json new file mode 100644 index 00000000..bf8e0861 --- /dev/null +++ b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/builtin-modules/package.json @@ -0,0 +1,104 @@ +{ + "_args": [ + [ + { + "raw": "builtin-modules@^1.0.0", + "scope": null, + "escapedName": "builtin-modules", + "name": "builtin-modules", + "rawSpec": "^1.0.0", + "spec": ">=1.0.0 <2.0.0", + "type": "range" + }, + "/Users/frances.coronel/.nvm/versions/node/v6.10.1/lib/node_modules/alfred-emoj/node_modules/is-builtin-module" + ] + ], + "_from": "builtin-modules@>=1.0.0 <2.0.0", + "_id": "builtin-modules@1.1.1", + "_inCache": true, + "_location": "/alfred-emoj/builtin-modules", + "_nodeVersion": "5.3.0", + "_npmUser": { + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" + }, + "_npmVersion": "3.3.12", + "_phantomChildren": {}, + "_requested": { + "raw": "builtin-modules@^1.0.0", + "scope": null, + "escapedName": "builtin-modules", + "name": "builtin-modules", + "rawSpec": "^1.0.0", + "spec": ">=1.0.0 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/alfred-emoj/is-builtin-module" + ], + "_resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz", + "_shasum": "270f076c5a72c02f5b65a47df94c5fe3a278892f", + "_shrinkwrap": null, + "_spec": "builtin-modules@^1.0.0", + "_where": "/Users/frances.coronel/.nvm/versions/node/v6.10.1/lib/node_modules/alfred-emoj/node_modules/is-builtin-module", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/builtin-modules/issues" + }, + "dependencies": {}, + "description": "List of the Node.js builtin modules", + "devDependencies": { + "ava": "*", + "xo": "*" + }, + "directories": {}, + "dist": { + "shasum": "270f076c5a72c02f5b65a47df94c5fe3a278892f", + "tarball": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js", + "static.js", + "builtin-modules.json" + ], + "gitHead": "0ea253452b1d8cb3a70d16464f909dbc0bc370fe", + "homepage": "https://github.com/sindresorhus/builtin-modules#readme", + "keywords": [ + "builtin", + "built-in", + "builtins", + "node", + "modules", + "core", + "bundled", + "list", + "array", + "names" + ], + "license": "MIT", + "maintainers": [ + { + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" + } + ], + "name": "builtin-modules", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/builtin-modules.git" + }, + "scripts": { + "make": "node make.js", + "test": "xo && ava" + }, + "version": "1.1.1" +} diff --git a/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/builtin-modules/readme.md b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/builtin-modules/readme.md new file mode 100644 index 00000000..f1894b18 --- /dev/null +++ b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/builtin-modules/readme.md @@ -0,0 +1,41 @@ +# builtin-modules [![Build Status](https://travis-ci.org/sindresorhus/builtin-modules.svg?branch=master)](https://travis-ci.org/sindresorhus/builtin-modules) + +> List of the Node.js builtin modules + +The list is just a [JSON file](builtin-modules.json) and can be used wherever. + + +## Install + +``` +$ npm install --save builtin-modules +``` + + +## Usage + +```js +var builtinModules = require('builtin-modules'); + +console.log(builinModules); +//=> ['assert', 'buffer', ...] +``` + + +## API + +Returns an array of builtin modules fetched from the running Node.js version. + +### Static list + +This module also comes bundled with a static array of builtin modules generated from the latest Node.js version. You can get it with `require('builtin-modules/static');` + + +## Related + +- [is-builtin-module](https://github.com/sindresorhus/is-builtin-module) - Check if a string matches the name of a Node.js builtin module + + +## License + +MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/builtin-modules/static.js b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/builtin-modules/static.js new file mode 100644 index 00000000..9508f8f4 --- /dev/null +++ b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/builtin-modules/static.js @@ -0,0 +1,2 @@ +'use strict'; +module.exports = require('./builtin-modules.json'); diff --git a/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/cache-conf/index.js b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/cache-conf/index.js new file mode 100644 index 00000000..86af8038 --- /dev/null +++ b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/cache-conf/index.js @@ -0,0 +1,82 @@ +'use strict'; +const path = require('path'); +const Conf = require('conf'); +const pkgUp = require('pkg-up'); + +const parentDir = path.dirname(module.parent.filename); + +class CacheConf extends Conf { + + constructor(options) { + const pkgPath = pkgUp.sync(parentDir); + + options = Object.assign({ + projectName: pkgPath && require(pkgPath).name // eslint-disable-line import/no-dynamic-require + }, options); + + super(options); + + this.version = options.version; + } + + get(key) { + if (this.isExpired(key)) { + super.delete(key); + return; + } + + const item = super.get(key); + + return item && item.data; + } + + set(key, val, opts) { + opts = opts || {}; + + if (typeof key === 'object') { + opts = val || {}; + + Object.keys(key).forEach(k => { + super.set(k, { + timestamp: opts.maxAge && Date.now() + opts.maxAge, + version: this.version, + data: key[k] + }); + }); + } else { + super.set(key, { + timestamp: opts.maxAge && Date.now() + opts.maxAge, + version: this.version, + data: val + }); + } + } + + has(key) { + if (!super.has(key)) { + return false; + } + + if (this.isExpired(key)) { + super.delete(key); + return false; + } + + return true; + } + + isExpired(key) { + const item = super.get(key); + + if (!item) { + return false; + } + + const invalidTimestamp = item.timestamp && item.timestamp < Date.now(); + const invalidVersion = item.version !== this.version; + + return Boolean(invalidTimestamp || invalidVersion); + } +} + +module.exports = CacheConf; diff --git a/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/cache-conf/license b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/cache-conf/license new file mode 100644 index 00000000..78b08554 --- /dev/null +++ b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/cache-conf/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Sam Verschueren (github.com/SamVerschueren) + +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/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/cache-conf/package.json b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/cache-conf/package.json new file mode 100644 index 00000000..a348510f --- /dev/null +++ b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/cache-conf/package.json @@ -0,0 +1,121 @@ +{ + "_args": [ + [ + { + "raw": "cache-conf@^0.3.0", + "scope": null, + "escapedName": "cache-conf", + "name": "cache-conf", + "rawSpec": "^0.3.0", + "spec": ">=0.3.0 <0.4.0", + "type": "range" + }, + "/Users/frances.coronel/.nvm/versions/node/v6.10.1/lib/node_modules/alfred-emoj/node_modules/alfy" + ] + ], + "_from": "cache-conf@>=0.3.0 <0.4.0", + "_id": "cache-conf@0.3.0", + "_inCache": true, + "_location": "/alfred-emoj/cache-conf", + "_nodeVersion": "4.4.3", + "_npmOperationalInternal": { + "host": "packages-12-west.internal.npmjs.com", + "tmp": "tmp/cache-conf-0.3.0.tgz_1477245098941_0.22077992744743824" + }, + "_npmUser": { + "name": "samverschueren", + "email": "sam.verschueren@gmail.com" + }, + "_npmVersion": "2.15.1", + "_phantomChildren": {}, + "_requested": { + "raw": "cache-conf@^0.3.0", + "scope": null, + "escapedName": "cache-conf", + "name": "cache-conf", + "rawSpec": "^0.3.0", + "spec": ">=0.3.0 <0.4.0", + "type": "range" + }, + "_requiredBy": [ + "/alfred-emoj/alfy" + ], + "_resolved": "https://registry.npmjs.org/cache-conf/-/cache-conf-0.3.0.tgz", + "_shasum": "de224f8244eaf946bea4fc8e49ab9bd29f3ad14e", + "_shrinkwrap": null, + "_spec": "cache-conf@^0.3.0", + "_where": "/Users/frances.coronel/.nvm/versions/node/v6.10.1/lib/node_modules/alfred-emoj/node_modules/alfy", + "author": { + "name": "Sam Verschueren", + "email": "sam.verschueren@gmail.com", + "url": "github.com/SamVerschueren" + }, + "bugs": { + "url": "https://github.com/samverschueren/cache-conf/issues" + }, + "dependencies": { + "conf": "^0.11.2", + "pkg-up": "^1.0.0" + }, + "description": "Simple cache config handling for your app or module", + "devDependencies": { + "ava": "*", + "delay": "^1.3.1", + "tempfile": "^1.1.1", + "xo": "*" + }, + "directories": {}, + "dist": { + "shasum": "de224f8244eaf946bea4fc8e49ab9bd29f3ad14e", + "tarball": "https://registry.npmjs.org/cache-conf/-/cache-conf-0.3.0.tgz" + }, + "engines": { + "node": ">=4" + }, + "files": [ + "index.js" + ], + "gitHead": "75140d4b9a3f14ff723f74036c48e2a43d6563cd", + "homepage": "https://github.com/samverschueren/cache-conf#readme", + "keywords": [ + "cache", + "caching", + "config", + "store", + "app", + "storage", + "conf", + "configuration", + "settings", + "preferences", + "json", + "data", + "persist", + "persistent", + "save", + "load", + "read", + "write" + ], + "license": "MIT", + "maintainers": [ + { + "name": "samverschueren", + "email": "sam.verschueren@gmail.com" + } + ], + "name": "cache-conf", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/samverschueren/cache-conf.git" + }, + "scripts": { + "test": "xo && ava" + }, + "version": "0.3.0", + "xo": { + "esnext": true + } +} diff --git a/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/cache-conf/readme.md b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/cache-conf/readme.md new file mode 100644 index 00000000..fb4a1031 --- /dev/null +++ b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/cache-conf/readme.md @@ -0,0 +1,83 @@ +# cache-conf [![Build Status](https://travis-ci.org/SamVerschueren/cache-conf.svg?branch=master)](https://travis-ci.org/SamVerschueren/cache-conf) + +> Simple cache config handling for your app or module + +If you don't need caching, you should use [conf](https://github.com/sindresorhus/conf) instead. This module extends that module and +abstracts away the caching mechanism. + + +## Install + +``` +$ npm install --save cache-conf +``` + + +## Usage + +```js +const delay = require('delay'); +const CacheConf = require('cache-conf'); +const config = new CacheConf(); + +config.set('unicorn', '🦄', {maxAge: 5000}); +console.log(config.get('unicorn')); +//=> '🦄' + +// Wait 5 seconds +await delay(5000); + +console.log(config.get('unicorn')); +//=> undefined +``` + + +## API + +### CacheConf([options]) + +Returns a new instance. + +#### options + +Any of the [conf options](https://github.com/sindresorhus/conf#options). + +### Instance + +An extended [conf](https://github.com/sindresorhus/conf#instance) instance. + +#### set(key, value, [options]) + +Set an item. + +#### set(object, [options]) + +Set multiple items at once. + +##### options + +###### maxAge + +Type: `number` + +Number of milliseconds the cached value is valid. + +###### version + +Type: `string` + +Version number of the data. If the version provided is not the same as the version of the cached data, the data will be invalid. + +#### isExpired(key) + +Boolean indicating if the cached data is expired. + + +## Related + +- [conf](https://github.com/sindresorhus/conf) - Simple config handling for your app or module + + +## License + +MIT © [Sam Verschueren](https://github.com/SamVerschueren) diff --git a/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/capture-stack-trace/index.js b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/capture-stack-trace/index.js new file mode 100644 index 00000000..1b696c8b --- /dev/null +++ b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/capture-stack-trace/index.js @@ -0,0 +1,18 @@ +'use strict'; + +module.exports = Error.captureStackTrace || function (error) { + var container = new Error(); + + Object.defineProperty(error, 'stack', { + configurable: true, + get: function getStack() { + var stack = container.stack; + + Object.defineProperty(this, 'stack', { + value: stack + }); + + return stack; + } + }); +}; diff --git a/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/capture-stack-trace/package.json b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/capture-stack-trace/package.json new file mode 100644 index 00000000..be1b1a91 --- /dev/null +++ b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/capture-stack-trace/package.json @@ -0,0 +1,91 @@ +{ + "_args": [ + [ + { + "raw": "capture-stack-trace@^1.0.0", + "scope": null, + "escapedName": "capture-stack-trace", + "name": "capture-stack-trace", + "rawSpec": "^1.0.0", + "spec": ">=1.0.0 <2.0.0", + "type": "range" + }, + "/Users/frances.coronel/.nvm/versions/node/v6.10.1/lib/node_modules/alfred-emoj/node_modules/create-error-class" + ] + ], + "_from": "capture-stack-trace@>=1.0.0 <2.0.0", + "_id": "capture-stack-trace@1.0.0", + "_inCache": true, + "_location": "/alfred-emoj/capture-stack-trace", + "_npmUser": { + "name": "floatdrop", + "email": "floatdrop@gmail.com" + }, + "_npmVersion": "1.4.28", + "_phantomChildren": {}, + "_requested": { + "raw": "capture-stack-trace@^1.0.0", + "scope": null, + "escapedName": "capture-stack-trace", + "name": "capture-stack-trace", + "rawSpec": "^1.0.0", + "spec": ">=1.0.0 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/alfred-emoj/create-error-class" + ], + "_resolved": "https://registry.npmjs.org/capture-stack-trace/-/capture-stack-trace-1.0.0.tgz", + "_shasum": "4a6fa07399c26bba47f0b2496b4d0fb408c5550d", + "_shrinkwrap": null, + "_spec": "capture-stack-trace@^1.0.0", + "_where": "/Users/frances.coronel/.nvm/versions/node/v6.10.1/lib/node_modules/alfred-emoj/node_modules/create-error-class", + "author": { + "name": "Vsevolod Strukchinsky", + "email": "floatdrop@gmail.com", + "url": "github.com/floatdrop" + }, + "bugs": { + "url": "https://github.com/floatdrop/capture-stack-trace/issues" + }, + "dependencies": {}, + "description": "Error.captureStackTrace ponyfill", + "devDependencies": { + "mocha": "*" + }, + "directories": {}, + "dist": { + "shasum": "4a6fa07399c26bba47f0b2496b4d0fb408c5550d", + "tarball": "https://registry.npmjs.org/capture-stack-trace/-/capture-stack-trace-1.0.0.tgz" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "gitHead": "eb46ce326fa9074b6ce17a94d4b76500321a331f", + "homepage": "https://github.com/floatdrop/capture-stack-trace", + "keywords": [ + "Error", + "captureStackTrace" + ], + "license": "MIT", + "maintainers": [ + { + "name": "floatdrop", + "email": "floatdrop@gmail.com" + } + ], + "name": "capture-stack-trace", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/floatdrop/capture-stack-trace.git" + }, + "scripts": { + "test": "mocha" + }, + "version": "1.0.0" +} diff --git a/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/capture-stack-trace/readme.md b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/capture-stack-trace/readme.md new file mode 100644 index 00000000..a944ab96 --- /dev/null +++ b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/capture-stack-trace/readme.md @@ -0,0 +1,36 @@ +# capture-stack-trace [![Build Status](https://travis-ci.org/floatdrop/capture-stack-trace.svg?branch=master)](https://travis-ci.org/floatdrop/capture-stack-trace) + +> Ponyfill for Error.captureStackTrace + + +## Install + +``` +$ npm install --save capture-stack-trace +``` + + +## Usage + +```js +var captureStackTrace = require('capture-stack-trace'); + +captureStackTrace({}); +// => {stack: ...} +``` + + +## API + +### captureStackTrace(error) + +#### error + +*Required* +Type: `Object` + +Target Object, that will recieve stack property. + +## License + +MIT © [Vsevolod Strukchinsky](http://github.com/floatdrop) diff --git a/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/chalk/index.js b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/chalk/index.js new file mode 100644 index 00000000..2d85a917 --- /dev/null +++ b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/chalk/index.js @@ -0,0 +1,116 @@ +'use strict'; +var escapeStringRegexp = require('escape-string-regexp'); +var ansiStyles = require('ansi-styles'); +var stripAnsi = require('strip-ansi'); +var hasAnsi = require('has-ansi'); +var supportsColor = require('supports-color'); +var defineProps = Object.defineProperties; +var isSimpleWindowsTerm = process.platform === 'win32' && !/^xterm/i.test(process.env.TERM); + +function Chalk(options) { + // detect mode if not set manually + this.enabled = !options || options.enabled === undefined ? supportsColor : options.enabled; +} + +// use bright blue on Windows as the normal blue color is illegible +if (isSimpleWindowsTerm) { + ansiStyles.blue.open = '\u001b[94m'; +} + +var styles = (function () { + var ret = {}; + + Object.keys(ansiStyles).forEach(function (key) { + ansiStyles[key].closeRe = new RegExp(escapeStringRegexp(ansiStyles[key].close), 'g'); + + ret[key] = { + get: function () { + return build.call(this, this._styles.concat(key)); + } + }; + }); + + return ret; +})(); + +var proto = defineProps(function chalk() {}, styles); + +function build(_styles) { + var builder = function () { + return applyStyle.apply(builder, arguments); + }; + + builder._styles = _styles; + builder.enabled = this.enabled; + // __proto__ is used because we must return a function, but there is + // no way to create a function with a different prototype. + /* eslint-disable no-proto */ + builder.__proto__ = proto; + + return builder; +} + +function applyStyle() { + // support varags, but simply cast to string in case there's only one arg + var args = arguments; + var argsLen = args.length; + var str = argsLen !== 0 && String(arguments[0]); + + if (argsLen > 1) { + // don't slice `arguments`, it prevents v8 optimizations + for (var a = 1; a < argsLen; a++) { + str += ' ' + args[a]; + } + } + + if (!this.enabled || !str) { + return str; + } + + var nestedStyles = this._styles; + var i = nestedStyles.length; + + // Turns out that on Windows dimmed gray text becomes invisible in cmd.exe, + // see https://github.com/chalk/chalk/issues/58 + // If we're on Windows and we're dealing with a gray color, temporarily make 'dim' a noop. + var originalDim = ansiStyles.dim.open; + if (isSimpleWindowsTerm && (nestedStyles.indexOf('gray') !== -1 || nestedStyles.indexOf('grey') !== -1)) { + ansiStyles.dim.open = ''; + } + + while (i--) { + var code = ansiStyles[nestedStyles[i]]; + + // Replace any instances already present with a re-opening code + // otherwise only the part of the string until said closing code + // will be colored, and the rest will simply be 'plain'. + str = code.open + str.replace(code.closeRe, code.open) + code.close; + } + + // Reset the original 'dim' if we changed it to work around the Windows dimmed gray issue. + ansiStyles.dim.open = originalDim; + + return str; +} + +function init() { + var ret = {}; + + Object.keys(styles).forEach(function (name) { + ret[name] = { + get: function () { + return build.call(this, [name]); + } + }; + }); + + return ret; +} + +defineProps(Chalk.prototype, init()); + +module.exports = new Chalk(); +module.exports.styles = ansiStyles; +module.exports.hasColor = hasAnsi; +module.exports.stripColor = stripAnsi; +module.exports.supportsColor = supportsColor; diff --git a/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/chalk/license b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/chalk/license new file mode 100644 index 00000000..654d0bfe --- /dev/null +++ b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/chalk/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +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/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/chalk/package.json b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/chalk/package.json new file mode 100644 index 00000000..c30a7825 --- /dev/null +++ b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/chalk/package.json @@ -0,0 +1,140 @@ +{ + "_args": [ + [ + { + "raw": "chalk@^1.0.0", + "scope": null, + "escapedName": "chalk", + "name": "chalk", + "rawSpec": "^1.0.0", + "spec": ">=1.0.0 <2.0.0", + "type": "range" + }, + "/Users/frances.coronel/.nvm/versions/node/v6.10.1/lib/node_modules/alfred-emoj/node_modules/sudo-block" + ] + ], + "_from": "chalk@>=1.0.0 <2.0.0", + "_id": "chalk@1.1.3", + "_inCache": true, + "_location": "/alfred-emoj/chalk", + "_nodeVersion": "0.10.32", + "_npmOperationalInternal": { + "host": "packages-12-west.internal.npmjs.com", + "tmp": "tmp/chalk-1.1.3.tgz_1459210604109_0.3892582862172276" + }, + "_npmUser": { + "name": "qix", + "email": "i.am.qix@gmail.com" + }, + "_npmVersion": "2.14.2", + "_phantomChildren": {}, + "_requested": { + "raw": "chalk@^1.0.0", + "scope": null, + "escapedName": "chalk", + "name": "chalk", + "rawSpec": "^1.0.0", + "spec": ">=1.0.0 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/alfred-emoj/sudo-block" + ], + "_resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "_shasum": "a8115c55e4a702fe4d150abd3872822a7e09fc98", + "_shrinkwrap": null, + "_spec": "chalk@^1.0.0", + "_where": "/Users/frances.coronel/.nvm/versions/node/v6.10.1/lib/node_modules/alfred-emoj/node_modules/sudo-block", + "bugs": { + "url": "https://github.com/chalk/chalk/issues" + }, + "dependencies": { + "ansi-styles": "^2.2.1", + "escape-string-regexp": "^1.0.2", + "has-ansi": "^2.0.0", + "strip-ansi": "^3.0.0", + "supports-color": "^2.0.0" + }, + "description": "Terminal string styling done right. Much color.", + "devDependencies": { + "coveralls": "^2.11.2", + "matcha": "^0.6.0", + "mocha": "*", + "nyc": "^3.0.0", + "require-uncached": "^1.0.2", + "resolve-from": "^1.0.0", + "semver": "^4.3.3", + "xo": "*" + }, + "directories": {}, + "dist": { + "shasum": "a8115c55e4a702fe4d150abd3872822a7e09fc98", + "tarball": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "gitHead": "0d8d8c204eb87a4038219131ad4d8369c9f59d24", + "homepage": "https://github.com/chalk/chalk#readme", + "keywords": [ + "color", + "colour", + "colors", + "terminal", + "console", + "cli", + "string", + "str", + "ansi", + "style", + "styles", + "tty", + "formatting", + "rgb", + "256", + "shell", + "xterm", + "log", + "logging", + "command-line", + "text" + ], + "license": "MIT", + "maintainers": [ + { + "name": "qix", + "email": "i.am.qix@gmail.com" + }, + { + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" + }, + { + "name": "unicorn", + "email": "sindresorhus+unicorn@gmail.com" + } + ], + "name": "chalk", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/chalk/chalk.git" + }, + "scripts": { + "bench": "matcha benchmark.js", + "coverage": "nyc npm test && nyc report", + "coveralls": "nyc npm test && nyc report --reporter=text-lcov | coveralls", + "test": "xo && mocha" + }, + "version": "1.1.3", + "xo": { + "envs": [ + "node", + "mocha" + ] + } +} diff --git a/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/chalk/readme.md b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/chalk/readme.md new file mode 100644 index 00000000..5cf111e3 --- /dev/null +++ b/bin/alfred/Alfred.alfredpreferences/workflows/alfred-emoj/node_modules/chalk/readme.md @@ -0,0 +1,213 @@ +

+
+
+ chalk +
+
+
+

+ +> Terminal string styling done right + +[![Build Status](https://travis-ci.org/chalk/chalk.svg?branch=master)](https://travis-ci.org/chalk/chalk) +[![Coverage Status](https://coveralls.io/repos/chalk/chalk/badge.svg?branch=master)](https://coveralls.io/r/chalk/chalk?branch=master) +[![](http://img.shields.io/badge/unicorn-approved-ff69b4.svg)](https://www.youtube.com/watch?v=9auOCbH5Ns4) + + +[colors.js](https://github.com/Marak/colors.js) used to be the most popular string styling module, but it has serious deficiencies like extending `String.prototype` which causes all kinds of [problems](https://github.com/yeoman/yo/issues/68). Although there are other ones, they either do too much or not enough. + +**Chalk is a clean and focused alternative.** + +![](https://github.com/chalk/ansi-styles/raw/master/screenshot.png) + + +## Why + +- Highly performant +- Doesn't extend `String.prototype` +- Expressive API +- Ability to nest styles +- Clean and focused +- Auto-detects color support +- Actively maintained +- [Used by ~4500 modules](https://www.npmjs.com/browse/depended/chalk) as of July 15, 2015 + + +## Install + +``` +$ npm install --save chalk +``` + + +## Usage + +Chalk comes with an easy to use composable API where you just chain and nest the styles you want. + +```js +var chalk = require('chalk'); + +// style a string +chalk.blue('Hello world!'); + +// combine styled and normal strings +chalk.blue('Hello') + 'World' + chalk.red('!'); + +// compose multiple styles using the chainable API +chalk.blue.bgRed.bold('Hello world!'); + +// pass in multiple arguments +chalk.blue('Hello', 'World!', 'Foo', 'bar', 'biz', 'baz'); + +// nest styles +chalk.red('Hello', chalk.underline.bgBlue('world') + '!'); + +// nest styles of the same type even (color, underline, background) +chalk.green( + 'I am a green line ' + + chalk.blue.underline.bold('with a blue substring') + + ' that becomes green again!' +); +``` + +Easily define your own themes. + +```js +var chalk = require('chalk'); +var error = chalk.bold.red; +console.log(error('Error!')); +``` + +Take advantage of console.log [string substitution](http://nodejs.org/docs/latest/api/console.html#console_console_log_data). + +```js +var name = 'Sindre'; +console.log(chalk.green('Hello %s'), name); +//=> Hello Sindre +``` + + +## API + +### chalk.`